dustem_save_sed_fit.pro
2.26 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
80
81
82
83
84
85
86
87
88
PRO dustem_save_sed_fit,file,help=help
;+
; NAME:
; dustem_save_sed_fit
; PURPOSE:
; Save Dustem SED fit results in a file
; CATEGORY:
; Dustem
; CALLING SEQUENCE:
; dustem_save_sed_fit,file[,/help]
; INPUTS:
; file = File name
; OPTIONAL INPUT PARAMETERS:
; None
; OUTPUTS:
; None
; OPTIONAL OUTPUT PARAMETERS:
; None
; ACCEPTED KEY-WORDS:
; help = If set, print this help
; COMMON BLOCKS:
; None
; SIDE EFFECTS:
; File is stored.
; The stored data are taken from !dustem_fit, !dustem_data,
; !dustem_filters, !dustem_verbose and !run_ionfrac
; RESTRICTIONS:
; The dustem idl wrapper must be installed
; PROCEDURE:
; None
; EXAMPLES
;
; MODIFICATION HISTORY:
; Written by J.-Ph. Bernard
; see evolution details on the dustem cvs maintained at CESR
; Contact J.-Ph. Bernard (Jean-Philippe.Bernard@cesr.fr) in case of problems.
;-
IF keyword_set(help) THEN BEGIN
doc_library,'dustem_save_sed_fit'
goto,the_end
ENDIF
message,'Obsolete. Use dustem_save_system_variables.pro'
;stop
;Save results of a SED fit into a save set.
;dustem_fit_sed=*!dustem_fit_sed
param_desc=*(*!dustem_fit).param_descs
init_value=*(*!dustem_fit).param_init_values
IF ptr_valid((*!dustem_fit).fixed_param_descs) THEN BEGIN
fixed_param_desc=*(*!dustem_fit).fixed_param_descs
ENDIF ELSE BEGIN
fixed_param_desc=!indef
ENDELSE
IF ptr_valid((*!dustem_fit).fixed_param_init_values) THEN BEGIN
fixed_init_value=*(*!dustem_fit).fixed_param_init_values
ENDIF ELSE BEGIN
fixed_init_value=!indef
ENDELSE
dustem_fit_chi2=(*!dustem_fit).chi2
dustem_fit_rchi2=(*!dustem_fit).rchi2
dfp=*(*!dustem_fit).current_param_values
func_ind=*(*!dustem_fit).param_func
run_ionfrac=!run_ionfrac
;VGb: dustem_data is now a structure containing sed, ext, polext
;dustem_data=*!dustem_data
dustem_data=!dustem_data
;VGe
dustem_filters=*!dustem_filters
dustem_verbose=!dustem_verbose
errors=*(*!dustem_fit).current_param_errors
;Modified JPB on Jul 9th 2010 because ext not recorded anymore.
;extinction=*!dustem_ext
save,param_desc,init_value,fixed_param_desc,fixed_init_value, $
dustem_fit_chi2,dustem_fit_rchi2,dfp,func_ind, $
;lambda_sed, $
run_ionfrac, $
dustem_data,dustem_filters,dustem_verbose,errors, $
; dustem_fit_sed, $
file=file
the_end:
END