Commit 392ede91411d637c54759c03bd5e6a533d14b7b5

Authored by Jean-Philippe Bernard
1 parent 9eb53891
Exists in master

included an help section

src/idl/dustem_init_plugins.pro
1   -PRO dustem_init_plugins, pd, fpd
  1 +PRO dustem_init_plugins,pd,fpd,help=help
  2 +
  3 +;+
  4 +; NAME:
  5 +; dustem_init_plugins
  6 +; PURPOSE:
  7 +; initializes variable !dustem_plugin
  8 +; CATEGORY:
  9 +; DustEMWrap
  10 +; CALLING SEQUENCE:
  11 +; dustem_init_plugins,pd[,fpd]
  12 +; INPUTS:
  13 +; pd : variable parameters description
  14 +; OPTIONAL INPUT PARAMETERS:
  15 +; fpd : fixed parameters description
  16 +; OUTPUTS:
  17 +; None
  18 +; OPTIONAL OUTPUT PARAMETERS:
  19 +; None
  20 +; ACCEPTED KEY-WORDS:
  21 +; help
  22 +; COMMON BLOCKS:
  23 +; None
  24 +; SIDE EFFECTS:
  25 +; !dustem_plugin is set
  26 +; RESTRICTIONS:
  27 +; The DustEM fortran code must be installed
  28 +; The DustEMWrap IDL code must be installed
  29 +; PROCEDURES AND SUBROUTINES USED:
  30 +;
  31 +; EXAMPLES
  32 +;
  33 +; MODIFICATION HISTORY:
  34 +; Written by Ilyes Choubani
  35 +; Evolution details on the DustEMWrap gitlab.
  36 +;-
  37 +
  38 +IF keyword_set(help) THEN BEGIN
  39 + doc_library,'dustem_init_plugins'
  40 + goto,the_end
  41 +END
2 42  
3 43  
4 44 plugin_names=['']
... ... @@ -63,5 +103,6 @@ ENDIF
63 103  
64 104 defsysv, '!dustem_plugin', ptr_new(strct) ; Need the use of the pointer because dustem_init_plugins is called in dustem_init (avoid conflicting structures error).
65 105  
  106 +the_end:
66 107  
67   -end
  108 +END
... ...
src/idl/dustemwrap_plot.pro
1   -PRO dustemwrap_plot,p_dim,st,dustem_sed,SED_spec,dustem_qsed,Q_spec,dustem_used,U_spec,dustem_polsed,P_spec,dustem_polfrac,SP_spec,dustem_psi_em,PSI_spec,dustem_ext,EXT_spec,dustem_qext,QEXT_spec,dustem_uext,UEXT_spec,dustem_polext,POLEXT_spec,dustem_fpolext,SPEXT_spec,dustem_psi_ext,PSIEXT_spec,_extra=_extra
2   -
  1 +PRO dustemwrap_plot,p_dim,st, $
  2 + dustem_sed,SED_spec, $
  3 + dustem_qsed,Q_spec, $
  4 + dustem_used,U_spec, $
  5 + dustem_polsed,P_spec, $
  6 + dustem_polfrac,SP_spec, $
  7 + dustem_psi_em,PSI_spec, $
  8 + dustem_ext,EXT_spec, $
  9 + dustem_qext,QEXT_spec, $
  10 + dustem_uext,UEXT_spec, $
  11 + dustem_polext,POLEXT_spec, $
  12 + dustem_fpolext,SPEXT_spec, $
  13 + dustem_psi_ext,PSIEXT_spec, $
  14 + _extra=_extra,help=help
  15 +
  16 +;+
  17 +; NAME:
  18 +; dustemwrap_plot
  19 +; PURPOSE:
  20 +; plots dustemwrap observed sed, predicted sed, predicted spectra for total Intensity, polarization in emission and extinction
  21 +; CATEGORY:
  22 +; DustEMWrap
  23 +; CALLING SEQUENCE:
  24 +; dustemwrap_plot,p_dim,st,dustem_sed,SED_spec,dustem_qsed,Q_spec,dustem_used,U_spec,dustem_polsed,P_spec,dustem_polfrac,SP_spec,dustem_psi_em,PSI_spec,dustem_ext,EXT_spec,dustem_qext,QEXT_spec,dustem_uext,UEXT_spec,dustem_polext,POLEXT_spec,dustem_fpolext,SPEXT_spec,dustem_psi_ext,PSIEXT_spec,_extra=_extra
  25 +; INPUTS:
  26 +; p_dim
  27 +; OPTIONAL INPUT PARAMETERS:
  28 +; st
  29 +; dustem_sed
  30 +; dustem_qsed
  31 +; dustem_used
  32 +; dustem_polsed
  33 +; dustem_polfrac
  34 +; dustem_psi_em
  35 +; dustem_ext
  36 +; dustem_qext
  37 +; dustem_uext
  38 +; dustem_polext
  39 +; dustem_fpolext
  40 +; dustem_psi_ext
  41 +; OUTPUTS:
  42 +; dustem_sed
  43 +; dustem_qsed
  44 +; dustem_used
  45 +; dustem_polsed
  46 +; dustem_polfrac
  47 +; dustem_psi_em
  48 +; dustem_ext
  49 +; dustem_qext
  50 +; dustem_uext
  51 +; dustem_polext
  52 +; dustem_fpolext
  53 +; dustem_psi_ext
  54 +; SED_spec
  55 +; Q_spec
  56 +; U_spec
  57 +; P_spec
  58 +; SP_spec
  59 +; PSI_spec
  60 +; EXT_spec
  61 +; QEXT_spec
  62 +; UEXT_spec
  63 +; POLEXT_spec
  64 +; SPEXT_spec
  65 +; PSIEXT_spec
  66 +; OPTIONAL OUTPUT PARAMETERS:
  67 +;
  68 +
  69 +; ACCEPTED KEY-WORDS:
  70 +; help
  71 +; COMMON BLOCKS:
  72 +; None
  73 +; SIDE EFFECTS:
  74 +; Does a plot
  75 +; RESTRICTIONS:
  76 +; The DustEM fortran code must be installed
  77 +; The DustEMWrap IDL code must be installed
  78 +; PROCEDURES AND SUBROUTINES USED:
  79 +;
  80 +; EXAMPLES
  81 +;
  82 +; MODIFICATION HISTORY:
  83 +; Written by Ilyes Choubani
  84 +; Evolution details on the DustEMWrap gitlab.
  85 +;-
  86 +
  87 +IF keyword_set(help) THEN BEGIN
  88 + doc_library,'dustemwrap_plot'
  89 + goto,the_end
  90 +END
3 91  
4 92 ;This is also necessary for the plotting of the results of the fit (Last iteration)
5 93 IF not keyword_set(st) THEN BEGIN
... ... @@ -83,8 +171,25 @@ new_mouchard=mouchard[0]
83 171 new_mouchard.iteration=!dustem_iter.act
84 172 new_mouchard.chi2=(*!dustem_fit).chi2
85 173 new_mouchard.rchi2=(*!dustem_fit).rchi2
86   -new_mouchard.recomputed_chi2=recomputed_chi2_sed
87   -new_mouchard.recomputed_rchi2=recomputed_rchi2_sed
  174 +;new_mouchard.recomputed_chi2=recomputed_chi2_sed
  175 +;new_mouchard.recomputed_rchi2=recomputed_rchi2_sed
  176 +
  177 +;JPB: need here to store values of current parameter values (including plugins) into !iteration_mouchard
  178 +help,(*!dustem_fit).CURRENT_PARAM_VALUES ;This is not currently filled up ...
  179 +;Below will work only for non plugin parameters
  180 +goto,skip1
  181 +param_descs=*(*!dustem_fit).param_descs
  182 +params_current=[0.D0]
  183 +FOR i=0L,n_elements(param_descs)-1 DO BEGIN
  184 + str='params_current=[params_current,'+param_descs[i]+']'
  185 + print,str
  186 + toto=execute(str)
  187 +ENDFOR
  188 +params_current=params_current[1:*]
  189 +print,params_current
  190 +
  191 +stop
  192 +skip1:
88 193  
89 194 mouchard=[mouchard,new_mouchard]
90 195 !iteration_mouchard=ptr_new(mouchard)
... ... @@ -1066,4 +1171,6 @@ IF (tag_names(*!dustem_plugin))(0) NE 'NONE' THEN BEGIN
1066 1171  
1067 1172 ENDIF
1068 1173  
  1174 +the_end:
  1175 +
1069 1176 END
... ...