Commit 6ad05c388cf6ac218b14f466b3ec583cbadb74af
Exists in
master
Merge branch 'master' of https://gitlab.irap.omp.eu/OV-GSO-DC/dustem-wrapper_idl
Showing
4 changed files
with
12 additions
and
18 deletions
Show diff stats
src/idl/dustem_get_wavelengths.pro
@@ -54,17 +54,15 @@ IF keyword_set(help) THEN BEGIN | @@ -54,17 +54,15 @@ IF keyword_set(help) THEN BEGIN | ||
54 | goto,the_end | 54 | goto,the_end |
55 | ENDIF | 55 | ENDIF |
56 | 56 | ||
57 | - | ||
58 | IF !dustem_which EQ 'DESERT' THEN BEGIN | 57 | IF !dustem_which EQ 'DESERT' THEN BEGIN |
59 | lambir=((*!dustem_params).gemissiv.lambir) | 58 | lambir=((*!dustem_params).gemissiv.lambir) |
60 | ENDIF ELSE BEGIN | 59 | ENDIF ELSE BEGIN |
61 | - lambir=((*!dustem_params).lambda.lambda) ; there is an error here that I have noticed a long time ago. Temporary fix is @ the returned value | 60 | + lambir=((*!dustem_params).lambda.lambda) |
62 | ENDELSE | 61 | ENDELSE |
63 | 62 | ||
64 | isrf_wavelengths=(*!dustem_params).ISRF.lambisrf | 63 | isrf_wavelengths=(*!dustem_params).ISRF.lambisrf |
65 | 64 | ||
66 | the_end: | 65 | the_end: |
67 | -;RETURN,lambir[1:*] | ||
68 | RETURN,lambir | 66 | RETURN,lambir |
69 | 67 | ||
70 | END | 68 | END |
src/idl/dustem_read_dustem_lv.pro
@@ -117,11 +117,8 @@ FOR i=0L,Ngrains-1 DO BEGIN | @@ -117,11 +117,8 @@ FOR i=0L,Ngrains-1 DO BEGIN | ||
117 | ENDFOR | 117 | ENDFOR |
118 | st.em_tot=em_tot | 118 | st.em_tot=em_tot |
119 | 119 | ||
120 | -;==== Longji, go ahaead there: | ||
121 | IF !dustem_redshift NE 0. THEN BEGIN | 120 | IF !dustem_redshift NE 0. THEN BEGIN |
122 | - st.wav=st.wav*(1+!dustem_redshift) | ||
123 | - ;help,st,/str | ||
124 | - ;help,st.wav | 121 | + st.wav=st.wav*(1+!dustem_redshift) |
125 | ENDIF | 122 | ENDIF |
126 | 123 | ||
127 | ;stop | 124 | ;stop |
src/idl/dustem_read_lambda.pro
@@ -49,22 +49,21 @@ IF keyword_set(help) THEN BEGIN | @@ -49,22 +49,21 @@ IF keyword_set(help) THEN BEGIN | ||
49 | st=0. | 49 | st=0. |
50 | goto,the_end | 50 | goto,the_end |
51 | ENDIF | 51 | ENDIF |
52 | - | ||
53 | 52 | ||
54 | readcol,file,lambda,silent=silent,comment='#',format='F' | 53 | readcol,file,lambda,silent=silent,comment='#',format='F' |
55 | -;IC | ||
56 | -;this will actually read the number of wavelengths as the first value in the output structure which is wrong. $ | 54 | +;this will actually read the number of wavelengths as the first value in the output structure |
57 | ;ie st.(0) | 55 | ;ie st.(0) |
58 | ;{ | 56 | ;{ |
59 | ; "LAMBDA": 800.00000 | 57 | ; "LAMBDA": 800.00000 |
60 | ;} | 58 | ;} |
61 | -;The wrapper has a fix elsewhere in dustem_get_wavelengths() but this | ||
62 | -;should really be fixed here. | ||
63 | 59 | ||
64 | -Nlambda=n_elements(lambda) | 60 | +;The wrapper formerly dropped this leading element in dustem_get_wavelengths() but |
61 | +;we now enforce this fix here | ||
62 | + | ||
63 | +Nlambda=n_elements(lambda)-1 ; i.e. remove first element | ||
65 | one_st={lambda:0.} | 64 | one_st={lambda:0.} |
66 | st=replicate(one_st,Nlambda) | 65 | st=replicate(one_st,Nlambda) |
67 | -st.lambda=lambda | 66 | +st.lambda=lambda[1:Nlambda] |
68 | 67 | ||
69 | the_end: | 68 | the_end: |
70 | return,st | 69 | return,st |
src/idl/dustem_write_lambda.pro
@@ -54,14 +54,14 @@ PRO dustem_write_lambda,file,st,help=help | @@ -54,14 +54,14 @@ PRO dustem_write_lambda,file,st,help=help | ||
54 | goto,the_end | 54 | goto,the_end |
55 | ENDIF | 55 | ENDIF |
56 | 56 | ||
57 | - | ||
58 | -;stop | ||
59 | openw,unit,file,/get_lun | 57 | openw,unit,file,/get_lun |
60 | 58 | ||
61 | Nwaves=n_elements(st) | 59 | Nwaves=n_elements(st) |
62 | -printf,unit,fix(st(0).lambda) | 60 | +;printf,unit,fix(st(0).lambda) |
61 | +printf,unit,Nwaves | ||
63 | 62 | ||
64 | -FOR i=1L,Nwaves-1 DO BEGIN | 63 | +;FOR i=1L,Nwaves-1 DO BEGIN |
64 | +FOR i=0L,Nwaves-1 DO BEGIN | ||
65 | printf,unit,st(i).lambda,format=frmt | 65 | printf,unit,st(i).lambda,format=frmt |
66 | ENDFOR | 66 | ENDFOR |
67 | 67 |