PRO dustem_set_params,params ;if empty description, do nothing ind=where(*(*!dustem_fit).param_descs EQ '',count) IF count EQ n_elements(*(*!dustem_fit).param_descs) THEN goto,the_end Nparams=n_elements(*(*!dustem_fit).param_descs) dustem_set_func_ind,*(*!dustem_fit).param_descs,params ;SET THE PARAMETER VALUES IN DUSTEM INPUT FILES FOR i=0L,Nparams-1 DO BEGIN IF (*(*!dustem_fit).param_func)(i) EQ 0 THEN BEGIN str=(*(*!dustem_fit).param_descs)(i)+'=params(i)' toto=execute(str) print,params(i) IF !dustem_verbose NE 0 THEN message,str,/info ENDIF ELSE BEGIN length=strlen((*(*!dustem_fit).param_descs)(i)) strr=strmid((*(*!dustem_fit).param_descs)(i),14,length-16) ; stop IF strr NE 'continuum' THEN BEGIN IF strr eq 'isrf2' then strr = 'isrf' ; IF getenv('DUSTEM_WHICH') EQ 'VERSTRAETE' THEN BEGIN IF !dustem_which EQ 'VERSTRAETE' THEN BEGIN ; ddir=GETENV('DUSTEM_DAT')+'les_DAT/' ddir=!dustem_dat+'les_DAT/' ENDIF ELSE BEGIN ; ddir=GETENV('DUSTEM_DAT') ddir=!dustem_dat ENDELSE ; JPB: Caution this line reads ISRF.DAT through an execute statement str='(*!dustem_params).'+strr+'=dustem_read_'+strr+'('+"'"+ddir+strupcase(strr)+'.DAT'+"'"+',/silent)' toto=execute(str) IF toto NE 1 then BEGIN message,'Could not execute ',str ENDIF IF !dustem_verbose NE 0 THEN message,str,/info ENDIF ENDELSE ENDFOR ;print,'before dustem_write' ;stop ;dustem_write_all,*!dustem_params,getenv('DUSTEM_DAT') dustem_write_all,*!dustem_params,!dustem_dat the_end: END