Commit be6b622d3ce194ccf066acadd212ce4ed4622641

Authored by Jean-Philippe Bernard
1 parent c3a36456
Exists in master

Trimmed unused code, including param_func, run_ion_frac, ...

src/idl/dustem_activate_plugins.pro
... ... @@ -67,13 +67,17 @@ IF isa((*!dustem_fit).fixed_param_descs) THEN BEGIN
67 67 param_values = param_values[sort(param_descs)] ;should we put it back to the way it was?
68 68 param_descs = param_descs[sort(param_descs)]
69 69 ;Taking care of the param_func vector (not sure if this is of any use anymore)
70   - dustem_set_func_ind, param_descs, param_values ; this sets (*(*!dustem_fit).param_func)
71   - param_func = (*(*!dustem_fit).param_func)
72   - dustem_set_func_ind, (*(*!dustem_fit).param_descs), p_dim ;setting the pointers back to their original valyes
  70 + ;Trimmed JPB on 08 March 2024
  71 + ;dustem_set_func_ind, param_descs, param_values ; this sets (*(*!dustem_fit).param_func)
  72 + ;param_func = (*(*!dustem_fit).param_func)
  73 + ;param_func =0 ;not used anyway later in dustem_run_plugins
  74 + ;Trimmed JPB on 08 March 2024
  75 + ;dustem_set_func_ind, (*(*!dustem_fit).param_descs), p_dim ;setting the pointers back to their original valyes
73 76 ENDIF ELSE BEGIN
74 77 param_descs = (*(*!dustem_fit).param_descs)
75 78 param_values = p_dim
76   - param_func = (*(*!dustem_fit).param_func)
  79 + ;param_func = (*(*!dustem_fit).param_func)
  80 + ;param_func=0 ;not used anyway later in dustem_run_plugins
77 81 ENDELSE
78 82  
79 83 ;stop
... ... @@ -88,17 +92,22 @@ ENDELSE
88 92 ;using '**' so not to write the entire scope
89 93  
90 94 ;=== This runs the plugins
  95 +;JPB: Removed allusion to param_func not used in dustem_run_plugins.pro (08 March 2024)
91 96 ;dustem_run_plugins, p_dim ,param_descs, param_values, param_func, ['ADD_SED'], avoid=1,use_previous_fortran=use_previous_fortran
92   -dustem_run_plugins, p_dim ,param_descs, param_values, param_func, 1, avoid=1,use_previous_fortran=use_previous_fortran
  97 +;dustem_run_plugins, p_dim ,param_descs, param_values, param_func, 1, avoid=1,use_previous_fortran=use_previous_fortran
  98 +dustem_run_plugins, p_dim ,param_descs, param_values, 1, avoid=1,use_previous_fortran=use_previous_fortran
93 99  
94 100 ;dustem_run_plugins, p_dim ,param_descs, param_values, param_func, ['ADD_ISRF','REPLACE_ISRF'] ,force_dustem_run=1,st=st,use_previous_fortran=use_previous_fortran ;dustem output is available at this step.
95   -dustem_run_plugins, p_dim ,param_descs, param_values, param_func, 2,force_dustem_run=1,st=st,use_previous_fortran=use_previous_fortran ;dustem output is available at this step.
  101 +;dustem_run_plugins, p_dim ,param_descs, param_values, param_func, 2,force_dustem_run=1,st=st,use_previous_fortran=use_previous_fortran ;dustem output is available at this step.
  102 +dustem_run_plugins, p_dim ,param_descs, param_values, 2,force_dustem_run=1,st=st,use_previous_fortran=use_previous_fortran ;dustem output is available at this step.
96 103  
97 104 ;dustem_run_plugins, p_dim ,param_descs, param_values, param_func, ['REPLACE_SED'],use_previous_fortran=use_previous_fortran
98   -dustem_run_plugins, p_dim ,param_descs, param_values, param_func, 3,use_previous_fortran=use_previous_fortran
  105 +;dustem_run_plugins, p_dim ,param_descs, param_values, param_func, 3,use_previous_fortran=use_previous_fortran
  106 +dustem_run_plugins, p_dim ,param_descs, param_values, 3,use_previous_fortran=use_previous_fortran
99 107  
100 108 ;dustem_run_plugins, p_dim ,param_descs, param_values, param_func, ['REPLACE_SED'],use_previous_fortran=use_previous_fortran
101   -dustem_run_plugins, p_dim ,param_descs, param_values, param_func, 4,use_previous_fortran=use_previous_fortran
  109 +;dustem_run_plugins, p_dim ,param_descs, param_values, param_func, 4,use_previous_fortran=use_previous_fortran
  110 +dustem_run_plugins, p_dim ,param_descs, param_values, 4,use_previous_fortran=use_previous_fortran
102 111  
103 112  
104 113 the_end:
... ...
src/idl/dustem_create_ionfrac.pro
... ... @@ -52,7 +52,10 @@ function dustem_create_ionfrac, key=key, val=val,help=help
52 52 goto, the_end
53 53 end
54 54  
55   -
  55 +message,'Obsolete. Should not be run',/continue
  56 +stop
  57 +GOTO,the_end
  58 +
56 59 ;PURPOSE :
57 60 ;--------
58 61 ; pour une Tempรฉrature et une densitรฉ donnรฉe
... ... @@ -271,6 +274,6 @@ function dustem_create_ionfrac, key=key, val=val,help=help
271 274 endif
272 275  
273 276 the_end:
274   - return,0
  277 +RETURN,0
275 278  
276 279 end
... ...
src/idl/dustem_init.pro
... ... @@ -171,7 +171,9 @@ defsysv, '!dustem_iter', {prv:1,act:1}
171 171  
172 172 ;define !dustem_fit
173 173 dustem_fit_st={data:ptr_new(), $ ;,wavelength:ptr_new(), ;because wavelength arrays in the different datasets (data) can be different
174   - param_descs:ptr_new(),param_init_values:ptr_new(),param_func:ptr_new(), $
  174 + param_descs:ptr_new(), $
  175 + param_init_values:ptr_new(), $
  176 + ;param_func:ptr_new(), $ ;Should be Trimmed (JPB) not used anymore
175 177 fixed_param_descs:ptr_new(),fixed_param_init_values:ptr_new(), $
176 178 chi2:0.D0,rchi2:0.D0, $
177 179 qchi2:0.D0,qrchi2:0.D0, $
... ... @@ -301,7 +303,8 @@ defsysv, '!dustem_params', ptr_new() ;Contains the values of all Desert Model pa
301 303  
302 304 ;The following is not used in the RELEASE version of the code, only in VERSTRAETE
303 305 ;IF getenv('DUSTEM_WHICH') EQ 'VERSTRAETE' THEN BEGIN
304   - defsysv, '!run_ionfrac', 0. ; 0:no call to dustem_create_ionfrac UNLESS it is called as a param
  306 +;JPB:Trimmed on March 08 2024
  307 +;defsysv, '!run_ionfrac', 0. ; 0:no call to dustem_create_ionfrac UNLESS it is called as a param
305 308 ; 1:call to dustem_create_ionfrac with the MIX_xxx.DAT files
306 309 ; 2:call to dustem_create_ionfrac with the SIZE_xxx.DAT files
307 310 ;ENDIF
... ...
src/idl/dustem_init_fixed_params.pro
... ... @@ -80,14 +80,15 @@ need_save=0
80 80 IF ptr_valid((*!dustem_fit).param_descs) THEN BEGIN
81 81 pd=*(*!dustem_fit).param_descs
82 82 iv=*(*!dustem_fit).param_init_values
83   - find=*(*!dustem_fit).param_func
  83 + ;find=*(*!dustem_fit).param_func
84 84 need_save=1
85 85 ENDIF
86 86  
87 87 ;temporarily use the regular parameter system variables to update
88 88 (*!dustem_fit).param_descs=ptr_new(fpd)
89 89 (*!dustem_fit).param_init_values=ptr_new(fiv)
90   -dustem_set_func_ind,fpd,fiv
  90 +;Trimmed JPB on 08 March 2024
  91 +;dustem_set_func_ind,fpd,fiv
91 92 ind=where(fpd NE '',count)
92 93  
93 94 ;fixing the parameters
... ... @@ -104,7 +105,7 @@ ENDIF
104 105 IF need_save EQ 1 THEN BEGIN
105 106 (*!dustem_fit).param_descs=ptr_new(pd)
106 107 (*!dustem_fit).param_init_values=ptr_new(iv)
107   - (*!dustem_fit).param_func=ptr_new(find)
  108 + ;(*!dustem_fit).param_func=ptr_new(find)
108 109 ENDIF
109 110  
110 111 the_end:
... ...
src/idl/dustem_init_parinfo.pro
... ... @@ -54,9 +54,10 @@ END
54 54 (*!dustem_fit).param_init_values=ptr_new(iv)
55 55  
56 56 (*!dustem_fit).current_param_values = ptr_new(iv/iv) ;These are normalized to the initial values
57   -;stop
58   -dustem_set_func_ind,pd,iv
59 57  
  58 +;stop
  59 +;JPB: cutting this which is not used anymore (March 8 2024)
  60 +;dustem_set_func_ind,pd,iv
60 61  
61 62 one_parinfo={value:0.D0, fixed:0, limited:[0,0], limits:[0.D0,0], parname:'', relstep:0., step:0.0, mpside:0, tied:''}
62 63 Npar=n_elements(pd)
... ...
src/idl/dustem_mpfit_run.pro
... ... @@ -62,7 +62,8 @@ ENDIF
62 62  
63 63 p_dim=p_min*(*(*!dustem_fit).param_init_values)
64 64  
65   -IF !run_ionfrac gt 0. THEN toto = dustem_create_ionfrac()
  65 +;Trimmed JPB on 08 March 2024
  66 +;IF !run_ionfrac gt 0. THEN toto = dustem_create_ionfrac()
66 67  
67 68 ;RUN THE MODEL AND GET THE SPECTRUM
68 69  
... ...
src/idl/dustem_set_func_ind.pro
... ... @@ -32,6 +32,9 @@ PRO dustem_set_func_ind,pd,iv
32 32 ; Written by NF,JPB,DP Jan-2007
33 33 ;-
34 34  
  35 +message,'Obsolete. Should not be run',/continue
  36 +stop
  37 +GOTO,the_end
35 38  
36 39 ;nparam = n_elements(*(*!dustem_fit).param_descs)
37 40  
... ... @@ -129,4 +132,6 @@ FOR i=0L,nparam-1 DO BEGIN
129 132 ENDIF
130 133 ENDFOR
131 134  
  135 +the_end:
  136 +
132 137 END
133 138 \ No newline at end of file
... ...
src/idl/dustem_set_params.pro
... ... @@ -63,7 +63,8 @@ ENDIF
63 63  
64 64 Nparams=n_elements(*(*!dustem_fit).param_descs)
65 65  
66   -dustem_set_func_ind,*(*!dustem_fit).param_descs,params
  66 +;Trimmed JPB on 08 March 2024
  67 +;dustem_set_func_ind,*(*!dustem_fit).param_descs,params
67 68  
68 69 ;SET THE PARAMETER VALUES IN DUSTEM INPUT FILES
69 70 FOR i=0L,Nparams-1 DO BEGIN
... ...