Commit 9331f1cd684203a4e7b0b4365e864639a9e2cbd0
1 parent
bcbe1386
Exists in
master
introduced use of system variable dustem_nocatch
Showing
3 changed files
with
17 additions
and
10 deletions
Show diff stats
src/idl/dustem_mpfit_data.pro
... | ... | @@ -99,10 +99,11 @@ FOR j=0,n_elements(fields)-1 DO BEGIN |
99 | 99 | ENDFOR |
100 | 100 | |
101 | 101 | ;stop |
102 | +nocatch=!dustem_nocatch | |
102 | 103 | p_min = dustem_mpfitfun(func_name,wav,values,sigma, $ |
103 | 104 | parinfo=(*!dustem_parinfo), perror=perror, yfit=yfit, $ |
104 | 105 | bestnorm=bestnorm, dof=dof,quiet=quiet, status=status, xtol=xtol, niter=niter_completed, ftol=use_tol, $ |
105 | - maxiter=use_Nitermax,gtol=gtol,errmsg=errmsg,functargs=_extra) | |
106 | + maxiter=use_Nitermax,gtol=gtol,errmsg=errmsg,functargs=_extra,nocatch=nocatch) | |
106 | 107 | message,errmsg,/info |
107 | 108 | message,'mpfitfun Status='+strtrim(status,2),/info |
108 | 109 | p_dim=p_min*(*(*!dustem_fit).param_init_values) | ... | ... |
src/idl/dustem_mpfit_sed.pro
... | ... | @@ -12,6 +12,7 @@ ENDELSE |
12 | 12 | |
13 | 13 | use_tol=1.e-14 ;Default tolerance value |
14 | 14 | use_Nitermax=100 ;Default maximum number of iterations |
15 | +nocatch=!dustem_nocatch | |
15 | 16 | |
16 | 17 | IF keyword_set(tol) THEN use_tol=tol |
17 | 18 | IF keyword_set(Nitermax) THEN use_Nitermax=Nitermax |
... | ... | @@ -22,7 +23,7 @@ IF keyword_set(Nitermax) THEN use_Nitermax=Nitermax |
22 | 23 | p_min = dustem_mpfitfun(func_name,(*!dustem_data.sed).wav,(*!dustem_data.sed).values,(*!dustem_data.sed).sigma, $ |
23 | 24 | parinfo=(*!dustem_parinfo), perror=perror, yfit=yfit, $ |
24 | 25 | bestnorm=bestnorm, dof=dof,quiet=quiet, status=status, xtol=xtol, niter=niter_completed, ftol=use_tol, $ |
25 | - maxiter=use_Nitermax,gtol=gtol,errmsg=errmsg,functargs=_extra) | |
26 | + maxiter=use_Nitermax,gtol=gtol,errmsg=errmsg,functargs=_extra,nocatch=nocatch) | |
26 | 27 | message,errmsg,/info |
27 | 28 | message,'mpfitfun Status='+strtrim(status,2),/info |
28 | 29 | ... | ... |
src/idl/dustem_set_data.pro
... | ... | @@ -59,14 +59,19 @@ ENDIF |
59 | 59 | !dustem_data.sed = ptr_new() |
60 | 60 | !dustem_data.ext = ptr_new() |
61 | 61 | |
62 | -ind=where(sed.largeP NE la_undef(),NP) | |
63 | -if NP NE 0 then !dustem_data.polsed = ptr_new() | |
64 | - | |
65 | -ind=where(sed.StokesQ NE la_undef(),NQ) | |
66 | -if NQ NE 0 then !dustem_data.qsed = ptr_new() | |
67 | - | |
68 | -ind=where(sed.StokesU NE la_undef(),NU) | |
69 | -if NU NE 0 then !dustem_data.used = ptr_new() | |
62 | +NP=0 | |
63 | +NQ=0 | |
64 | +NU=0 | |
65 | +IF !run_pol THEN BEGIN | |
66 | + ind=where(sed.largeP NE la_undef(),NP) | |
67 | + if NP NE 0 then !dustem_data.polsed = ptr_new() | |
68 | + | |
69 | + ind=where(sed.StokesQ NE la_undef(),NQ) | |
70 | + if NQ NE 0 then !dustem_data.qsed = ptr_new() | |
71 | + | |
72 | + ind=where(sed.StokesU NE la_undef(),NU) | |
73 | + if NU NE 0 then !dustem_data.used = ptr_new() | |
74 | +ENDIF | |
70 | 75 | |
71 | 76 | ;NOTA BENE: if we want to make a similar change to the ext structure we have to find a name |
72 | 77 | ;that suits polext and the cos and sin components | ... | ... |