From 283845dadec7d4b6c754c8cc72ecaabb536c3526 Mon Sep 17 00:00:00 2001 From: ichoubani Date: Wed, 2 Nov 2022 00:31:12 +0100 Subject: [PATCH] Small corrections to test on scopes in write_isrf_lv + starting to update help sections for "compute" procs --- src/idl/dustem_compute_ext.pro | 8 ++++---- src/idl/dustem_compute_polext.pro | 3 ++- src/idl/dustem_compute_polsed.pro | 3 ++- src/idl/dustem_compute_sed.pro | 4 ++-- src/idl/dustem_compute_stokes.pro | 3 ++- src/idl/dustem_compute_stokext.pro | 3 ++- src/idl/dustem_mpfit_run.pro | 12 ++++++------ src/idl/dustem_write_isrf_lv.pro | 2 +- 8 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/idl/dustem_compute_ext.pro b/src/idl/dustem_compute_ext.pro index cf2c36a..6460f90 100755 --- a/src/idl/dustem_compute_ext.pro +++ b/src/idl/dustem_compute_ext.pro @@ -1,16 +1,16 @@ -FUNCTION dustem_compute_ext,p_dim,st,$ +FUNCTION dustem_compute_ext,p_dim,$ +st=st,$ EXT_spec=EXT_spec,$ out_st=out_st,$ wave0=wave0,$ _extra=extra,$ help=help - ;+ ; NAME: -; dustem_compute_sed +; dustem_compute_ext ; PURPOSE: -; Computes an EXT curve from a given Dustem spectrum +; Computes an extinction curve from a given Dustem spectrum ; CATEGORY: ; Dustem ; CALLING SEQUENCE: diff --git a/src/idl/dustem_compute_polext.pro b/src/idl/dustem_compute_polext.pro index 4e2f422..b3181b0 100644 --- a/src/idl/dustem_compute_polext.pro +++ b/src/idl/dustem_compute_polext.pro @@ -1,4 +1,5 @@ -FUNCTION dustem_compute_polext ,p_dim,sti,$ +FUNCTION dustem_compute_polext ,p_dim,$ +sti=sti,$ POLEXT_spec=POLEXT_spec,$ SPEXT_spec=SPEXT_spec,$ dustem_fpolext=dustem_fpolext,$ diff --git a/src/idl/dustem_compute_polsed.pro b/src/idl/dustem_compute_polsed.pro index 5662a17..c6241d8 100755 --- a/src/idl/dustem_compute_polsed.pro +++ b/src/idl/dustem_compute_polsed.pro @@ -1,4 +1,5 @@ -FUNCTION dustem_compute_polsed,p_dim,st,$ +FUNCTION dustem_compute_polsed,p_dim,$ +st=st,$ P_spec=P_spec,SP_spec=SP_spec,$ dustem_polfrac=dustem_polfrac,$ out_st=out_st,$ diff --git a/src/idl/dustem_compute_sed.pro b/src/idl/dustem_compute_sed.pro index 397a360..2e89ece 100755 --- a/src/idl/dustem_compute_sed.pro +++ b/src/idl/dustem_compute_sed.pro @@ -1,4 +1,5 @@ -FUNCTION dustem_compute_sed,p_dim,st,$ +FUNCTION dustem_compute_sed,p_dim,$ +st=st,$ SED_spec=SED_spec,out_st=out_st,$ wave0=wave0,$ _extra=extra,$ @@ -50,7 +51,6 @@ ENDIF IF not keyword_set(st) THEN BEGIN dustem_activate_plugins,p_dim/(*(*!dustem_fit).param_init_values),st - ;st=dustem_run(p_dim) ENDIF diff --git a/src/idl/dustem_compute_stokes.pro b/src/idl/dustem_compute_stokes.pro index 7eeafc7..9de1df7 100755 --- a/src/idl/dustem_compute_stokes.pro +++ b/src/idl/dustem_compute_stokes.pro @@ -1,4 +1,5 @@ -FUNCTION dustem_compute_stokes,p_dim,st,$ +FUNCTION dustem_compute_stokes,p_dim,$ +st=st,$ Q_spec=Q_spec,$ U_spec=U_spec,$ PSI_spec=PSI_spec,$ diff --git a/src/idl/dustem_compute_stokext.pro b/src/idl/dustem_compute_stokext.pro index 332aff6..09ae59e 100755 --- a/src/idl/dustem_compute_stokext.pro +++ b/src/idl/dustem_compute_stokext.pro @@ -1,4 +1,5 @@ -FUNCTION dustem_compute_stokext,p_dim,st,$ +FUNCTION dustem_compute_stokext,p_dim,$ +st=st,$ QEXT_spec=QEXT_spec,$ UEXT_spec=UEXT_spec,$ PSIEXT_spec=PSIEXT_spec,$ diff --git a/src/idl/dustem_mpfit_run.pro b/src/idl/dustem_mpfit_run.pro index 40e011e..0c0b3f6 100755 --- a/src/idl/dustem_mpfit_run.pro +++ b/src/idl/dustem_mpfit_run.pro @@ -99,7 +99,7 @@ FOR i_tag=0,count_data_tag-1 DO BEGIN CASE tagnames(ind_data_tag(i_tag)) OF 'SED' : BEGIN - dustem_sed = dustem_compute_sed(p_dim,st,SED_spec=SED_spec) + dustem_sed = dustem_compute_sed(p_dim,st=st,SED_spec=SED_spec) chi2_sed = total(((*(*!dustem_data).sed).values-dustem_sed)^2/(*(*!dustem_data).sed).sigma^2) n_sed = n_elements((*(*!dustem_data).sed).values) rchi2_sed = chi2_sed / n_sed @@ -126,7 +126,7 @@ FOR i_tag=0,count_data_tag-1 DO BEGIN END 'EXT' : BEGIN - dustem_ext = dustem_compute_ext(p_dim,st,EXT_spec=EXT_spec) + dustem_ext = dustem_compute_ext(p_dim,st=st,EXT_spec=EXT_spec) chi2_ext = total(((*(*!dustem_data).ext).values-dustem_ext)^2/(*(*!dustem_data).ext).sigma^2) n_ext = n_elements((*(*!dustem_data).ext).values) rchi2_ext = chi2_ext / n_ext @@ -153,14 +153,14 @@ FOR i_tag=0,count_data_tag-1 DO BEGIN IF !run_lin then begin - dustem_polext = dustem_compute_polext(p_dim,st,POLEXT_spec=POLEXT_spec,SPEXT_spec=SPEXT_spec,dustem_fpolext=dustem_fpolext,dustem_ext=dustem_ext) + dustem_polext = dustem_compute_polext(p_dim,st=st,POLEXT_spec=POLEXT_spec,SPEXT_spec=SPEXT_spec,dustem_fpolext=dustem_fpolext,dustem_ext=dustem_ext) ENDIF END 'QSED': BEGIN - stokes = dustem_compute_stokes(p_dim,st,Q_spec=Q_spec,U_spec=U_spec,PSI_spec=PSI_spec,dustem_psi_em=dustem_psi_em) + stokes = dustem_compute_stokes(p_dim,st=st,Q_spec=Q_spec,U_spec=U_spec,PSI_spec=PSI_spec,dustem_psi_em=dustem_psi_em) dustem_qsed = stokes[0] ;taking care of the color correction for spass ; SHOULD NOT LEAVE THIS ON ;dustem_qsed(-1)=dustem_qsed(-2) @@ -194,7 +194,7 @@ FOR i_tag=0,count_data_tag-1 DO BEGIN IF !run_pol and !run_lin THEN BEGIN ;the keyword for dustem_sed here is used so that the function uses it to compute the polarization fraction instead of ;running dustem_compute_sed again in the procedure. Which it used to do. - dustem_polsed = dustem_compute_polsed(p_dim,st,P_spec=P_spec,SP_spec=SP_spec,dustem_polfrac=dustem_polfrac,dustem_sed=dustem_sed) + dustem_polsed = dustem_compute_polsed(p_dim,st=st,P_spec=P_spec,SP_spec=SP_spec,dustem_polfrac=dustem_polfrac,dustem_sed=dustem_sed) ENDIF END @@ -202,7 +202,7 @@ FOR i_tag=0,count_data_tag-1 DO BEGIN 'QEXT': BEGIN ;UPDATED - Stokext = dustem_compute_stokext(p_dim,st,QEXT_spec=QEXT_spec,UEXT_spec=UEXT_spec,PSIEXT_spec=PSIEXT_spec,dustem_psi_ext=dustem_psi_ext) + Stokext = dustem_compute_stokext(p_dim,st=st,QEXT_spec=QEXT_spec,UEXT_spec=UEXT_spec,PSIEXT_spec=PSIEXT_spec,dustem_psi_ext=dustem_psi_ext) dustem_qext = stokext[0] chi2_qext =total(((*(*!dustem_data).qext).values-dustem_qext)^2/(*(*!dustem_data).qext).sigma^2) n_qext = n_elements((*(*!dustem_data).qext).values) diff --git a/src/idl/dustem_write_isrf_lv.pro b/src/idl/dustem_write_isrf_lv.pro index 36e636e..71239d4 100755 --- a/src/idl/dustem_write_isrf_lv.pro +++ b/src/idl/dustem_write_isrf_lv.pro @@ -42,7 +42,7 @@ scopes = strarr(n_tags(*!dustem_plugin)) IF (tag_names(*!dustem_plugin))[0] EQ 'NONE' then goto, the_after ;Getting the actual scopes FOR i=0L, n_tags(*!dustem_plugin)-1 DO BEGIN - if isa((*(*!dustem_plugin).(i).scope)) THEN BEGIN + if isa((*!dustem_plugin).(i).scope) THEN BEGIN scopes[i] = (*(*!dustem_plugin).(i).scope) ENDIF ELSE goto, the_after ENDFOR -- libgit2 0.21.2