Commit 6ad05c388cf6ac218b14f466b3ec583cbadb74af

Authored by Jean-Philippe Bernard
2 parents a84e0595 33d72651
Exists in master

Merge branch 'master' of https://gitlab.irap.omp.eu/OV-GSO-DC/dustem-wrapper_idl

src/idl/dustem_get_wavelengths.pro
... ... @@ -54,17 +54,15 @@ IF keyword_set(help) THEN BEGIN
54 54 goto,the_end
55 55 ENDIF
56 56  
57   -
58 57 IF !dustem_which EQ 'DESERT' THEN BEGIN
59 58 lambir=((*!dustem_params).gemissiv.lambir)
60 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 61 ENDELSE
63 62  
64 63 isrf_wavelengths=(*!dustem_params).ISRF.lambisrf
65 64  
66 65 the_end:
67   -;RETURN,lambir[1:*]
68 66 RETURN,lambir
69 67  
70 68 END
... ...
src/idl/dustem_read_dustem_lv.pro
... ... @@ -117,11 +117,8 @@ FOR i=0L,Ngrains-1 DO BEGIN
117 117 ENDFOR
118 118 st.em_tot=em_tot
119 119  
120   -;==== Longji, go ahaead there:
121 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 122 ENDIF
126 123  
127 124 ;stop
... ...
src/idl/dustem_read_lambda.pro
... ... @@ -49,22 +49,21 @@ IF keyword_set(help) THEN BEGIN
49 49 st=0.
50 50 goto,the_end
51 51 ENDIF
52   -
53 52  
54 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 55 ;ie st.(0)
58 56 ;{
59 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 64 one_st={lambda:0.}
66 65 st=replicate(one_st,Nlambda)
67   -st.lambda=lambda
  66 +st.lambda=lambda[1:Nlambda]
68 67  
69 68 the_end:
70 69 return,st
... ...
src/idl/dustem_write_lambda.pro
... ... @@ -54,14 +54,14 @@ PRO dustem_write_lambda,file,st,help=help
54 54 goto,the_end
55 55 ENDIF
56 56  
57   -
58   -;stop
59 57 openw,unit,file,/get_lun
60 58  
61 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 65 printf,unit,st(i).lambda,format=frmt
66 66 ENDFOR
67 67  
... ...