Blame view

src/idl/dustem_restore_sed_fit.pro 2.29 KB
427f1205   Jean-Michel Glorian   version 4.2 merged
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
PRO dustem_restore_sed_fit,file,help=help

;+
; NAME:
;    dustem_restore_sed_fit
; PURPOSE:
;    Restore Dustem SED fit results from a file.
; CATEGORY:
;    Dustem
; CALLING SEQUENCE:
;    dustem_restore_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:
;    The !dustem_fit structure is updated
;    The !dustem_data, !dustem_filters, !dustem_verbose and
;    !run_ionfrac are also affected.
; RESTRICTIONS:
;    The dustem idl wrapper must be installed
; PROCEDURE:
;    None
; EXAMPLES
;    dustem_fit_sed_readme
;    file=getenv('DUSTEM_RES')+'DUSTEM_fit_example.sav'
;    dustem_restore_sed_fit,file
; 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_restore_sed_fit'
  goto,the_end
ENDIF


;stop
;Restores results of a SED fit into a save set.
restore,file

;!dustem_fit_sed=ptr_new(dustem_fit_sed)
(*!dustem_fit).param_descs=ptr_new(param_desc)
(*!dustem_fit).param_init_values=ptr_new(init_value)
IF fixed_init_value NE !indef THEN BEGIN
  (*!dustem_fit).fixed_param_descs=ptr_new(fixed_param_desc)
ENDIF ELSE BEGIN
  (*!dustem_fit).fixed_param_descs=ptr_new()
ENDELSE
IF fixed_init_value NE !indef THEN BEGIN
  (*!dustem_fit).fixed_param_init_values=ptr_new(fixed_init_value)
ENDIF ELSE BEGIN
  (*!dustem_fit).fixed_param_init_values=ptr_new()
ENDELSE
(*!dustem_fit).chi2=dustem_fit_chi2
(*!dustem_fit).rchi2=dustem_fit_rchi2
(*!dustem_fit).current_param_values=ptr_new(dfp)
(*!dustem_fit).param_func=ptr_new(func_ind)
!run_ionfrac=run_ionfrac
;VGb: dustem_data is now a structure containing sed, ext, polext
;!dustem_data=ptr_new(dustem_data)
!dustem_data=dustem_data
;VGe
!dustem_filters=ptr_new(dustem_filters)
!dustem_verbose=dustem_verbose
(*!dustem_fit).current_param_errors=ptr_new(errors)
;!dustem_ext=ptr_new(extinction)

IF ptr_valid((*!dustem_fit).fixed_param_descs) THEN BEGIN
  dustem_init_fixed_params,*(*!dustem_fit).fixed_param_descs,*(*!dustem_fit).fixed_param_init_values
ENDIF

the_end:

END