-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprintmodels.pro
More file actions
87 lines (72 loc) · 2.19 KB
/
Copy pathprintmodels.pro
File metadata and controls
87 lines (72 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
; +
; NAME:
; printmodels
;
; PURPOSE:
; Restore save data for specified object and pass to modelfit
; via 'params' structure.
;
; INPUTS:
; NAME1: Name of object to be analyzed. Main identifier.
; FITTYPE: Model to be fitted (in order of appearance below)
; 1) 'single' - Single grain model
; 2) 'multi' - Two discrete grain populations, (T1,a1), (T2,a2)
; 3) 'disk' - Continuous radial distribution of particles
; PS:
; NSTEP: number of steps for MCMC to take
; AMIN: Minimum grain size (units?)
; NUM_CHAINS: Number of MCMC chains to run
;
; OUTPUTS:
; NONE
;
; AUTHORS:
; Tushar Mittal - mittal.tushar22@gmail.com
; Christine Chen - cchen@stsci.edu
; Emil Christensen - chris2er@dukes.jmu.edu
;
; DISCLAIMER
; This software is provided as is without any warranty whatsoever.
; Permission to use, copy, modify, and distribute modified or
; unmodified copies is granted, provided this disclaimer
; is included unchanged.
;
; MODIFICATION HISTORY:
; Written by TM (June 2013) as printmodels_new.pro
; Organized and commented by EC (6/24/2014)
; -
; *************************************************** ;
pro printmodels, name1, fittype=fittype,ps=ps,nstep=nstep,$
thin_val=thin_val,teff=teff,dist=dist,amin=amin,seed=seed,$
cnt=cnt,scale_val =scale_val,num_chains=num_chains
COMMON file_path, in_dir, out_dir
; Assign default if fit type not set
if not keyword_set(fittype) then begin
print, 'Error: fit type not set. Exiting at printmodels'
return
endif
; Load object data from IDL savefile
restore,in_dir+'/'+name1+'.sav' ; Changed to new directory name for the time being
; Fill 'params' structure with data passed by fits
; and with data from object savefile
params={distval:dist,$
teff_val:teff,$
amin_val:amin,$
lambdafit:final_wave,$
diskfit:final_spec,$
errfit:final_specerr,$
name_obj:name1,$
seed : seed,$
nstep :nstep,$
thin_val:thin_val,$
ps : ps,$
cnt:cnt,$
scale_val:scale_val,$
num_chains: num_chains}
; Print fit type to console
print,fittype
; Pass 'params' to modelfit
modelfit,param_struc=params,fittype=fittype
; End program
return
end