diff --git a/src/idl/dustem_write_fits_table.pro b/src/idl/dustem_write_fits_table.pro index c767318..c20ea81 100755 --- a/src/idl/dustem_write_fits_table.pro +++ b/src/idl/dustem_write_fits_table.pro @@ -3,30 +3,43 @@ PRO dustem_write_fits_table,filename=filename,help=help ;+ ; NAME: ; dustem_write_fits_table +; ; PURPOSE: ; Write a FITS table with content of current DustEMWrap system variables +; ; CATEGORY: ; DustEMWrap, Distributed, High-Level, User Convenience +; ; CALLING SEQUENCE: ; dustem_write_fits_table,file[,/help] +; ; INPUTS: ; file = File name to be written (default='./dustemwrap_results.fits') +; ; OPTIONAL INPUT PARAMETERS: ; None +; ; OUTPUTS: ; None +; ; OPTIONAL OUTPUT PARAMETERS: ; None +; ; ACCEPTED KEY-WORDS: ; help = If set, print this help +; ; COMMON BLOCKS: ; None +; ; SIDE EFFECTS: ; Output FITS file is written to disk. +; ; RESTRICTIONS: ; The DustEMWrap IDL code must be installed +; ; PROCEDURE: ; None +; ; EXAMPLES ; ; MODIFICATION HISTORY: @@ -43,14 +56,15 @@ ENDIF ;===== run dustem to get predicted spectrum and sed dustem_predicted_sed=dustem_compute_sed(*(*!dustem_fit).current_param_values,out_st=dustem_spectra_st) -;stop + IF !run_pol THEN BEGIN ;This is needed to compute Q,U of both SED and spectra - dustem_predicted_polsed=dustem_compute_stokes(*(*!dustem_fit).current_param_values,bidon, $ - dustem_predicted_Qsed,dustem_predicted_Used, $ - dustem_predicted_Q_spec,dustem_predicted_U_spec,dustem_predicted_PSI_spec, $ - dustem_psi_em,out_st=out_st) - ;Same in extinction, but does not work in polarization extinction was not fitted. + dustem_predicted_polsed=dustem_compute_stokes(*(*!dustem_fit).current_param_values,bidon, $ + dustem_predicted_Qsed,dustem_predicted_Used, $ + dustem_predicted_Q_spec,dustem_predicted_U_spec,dustem_predicted_PSI_spec, $ + dustem_psi_em,out_st=out_st) + +;Same in extinction, but does not work in polarization extinction was not fitted. ; dustem_predicted_polext=dustem_compute_stokext(*(*!dustem_fit).current_param_values,bidon, $ ; dustem_predicted_Qext,dustem_predicted_Uext, $ ; dustem_predicted_Qext_spec,dustem_predicted_Uext_spec,dustem_predicted_PSI_ext, $ @@ -80,7 +94,7 @@ str_predicted_EXT=replicate(one_str_predicted_SED,N_predicted_sed) fully_undefined_sed=str_predicted_SED str_predicted_SED.FILTER=(*(*!dustem_data).sed).filt_names ;taken from input SED str_predicted_SED.Wavelength=(*(*!dustem_data).sed).wav ;taken from input SED -str_predicted_SED.I=dustem_predicted_sed ;but where is Q,U ?? +str_predicted_SED.I=dustem_predicted_sed ;stop IF !run_pol THEN BEGIN str_predicted_SED.Q=dustem_predicted_Qsed @@ -215,7 +229,7 @@ ENDFOR sxaddpar,header_predicted_SED,'COMMENT','===================================================',after='PARF'+strtrim(i,2) ;===== complement extension header for predicted spectrum total -sxaddpar,header_predicted_spectrum_tot,'TITLE','OUTPUT BEST FIT TOTAL SPECTRUM BY DUSTEMWRAP' +;sxaddpar,header_predicted_spectrum_tot,'TITLE','OUTPUT BEST FIT TOTAL SPECTRUM BY DUSTEMWRAP' sxaddpar,header_predicted_spectra,'TITLE','OUTPUT BEST FIT PER-GRAIN AND TOTAL EMISSION SPECTRA BY DUSTEMWRAP' sxaddpar,header_predicted_extinctions,'TITLE','OUTPUT BEST FIT PER-GRAIN AND TOTAL EXTINCTION BY DUSTEMWRAP' -- libgit2 0.21.2