FUNCTION dustem_make_empty_fortran_st,Ngrains ;This makes an empty fortran structure. ;May have to be adapted for polarized models ... ;st=dustem_make_empty_fortran_st(3) ;IDL> help,st,/str ;** Structure , 2 tags, length=57600, data length=54400, refs=1: ; SED STRUCT -> Array[800] ; EXT STRUCT -> Array[800] ;IDL> help,st.ext ; STRUCT = -> Array[800] ;IDL> help,st.sed ; STRUCT = -> Array[800] ;IDL> help,st.sed,/str ;** Structure , 5 tags, length=40, data length=36, refs=2: ; WAV FLOAT 0.0400000 ; EM_GRAIN_1 DOUBLE 0.0000000 ; EM_GRAIN_2 DOUBLE 0.0000000 ; EM_GRAIN_3 DOUBLE 0.0000000 ; EM_TOT DOUBLE 0.0000000 ;IDL> help,st.ext,/str ;** Structure , 4 tags, length=32, data length=32, refs=2: ; WAV FLOAT 0.0400000 ; ABS_GRAIN FLOAT Array[3] ; SCA_GRAIN FLOAT Array[3] ; EXT_TOT FLOAT 0.00000 lambir=dustem_get_wavelengths() Nwavs=n_elements(lambir) ;do the sed structure instruc='one_st={wav:0.,' FOR i=0L,Ngrains-1 DO BEGIN instruc=instruc+'em_grain_'+strtrim(i+1,2)+':0.,' ENDFOR instruc=instruc+'em_tot:0.}' toto=execute(instruc) sed_st=replicate(one_st,Nwavs) sed_st.wav=lambir ;do the ext structure abs_g=fltarr(Ngrains) ext_g=fltarr(Ngrains) one_st={wav:0.,abs_grain:abs_g,sca_grain:abs_g,ext_tot:0.} ext_st=replicate(one_st,Nwavs) ext_st.wav=lambir st={sed:sed_st,ext:ext_st} RETURN,st END