Commit fdf4c603391e26c5b476e633f96cce638b4d8cbd

Authored by Annie Hughes
1 parent f9089dc2
Exists in master

cosmetic changes to help

Showing 1 changed file with 22 additions and 8 deletions   Show diff stats
src/idl/dustem_write_fits_table.pro
... ... @@ -3,30 +3,43 @@ PRO dustem_write_fits_table,filename=filename,help=help
3 3 ;+
4 4 ; NAME:
5 5 ; dustem_write_fits_table
  6 +;
6 7 ; PURPOSE:
7 8 ; Write a FITS table with content of current DustEMWrap system variables
  9 +;
8 10 ; CATEGORY:
9 11 ; DustEMWrap, Distributed, High-Level, User Convenience
  12 +;
10 13 ; CALLING SEQUENCE:
11 14 ; dustem_write_fits_table,file[,/help]
  15 +;
12 16 ; INPUTS:
13 17 ; file = File name to be written (default='./dustemwrap_results.fits')
  18 +;
14 19 ; OPTIONAL INPUT PARAMETERS:
15 20 ; None
  21 +;
16 22 ; OUTPUTS:
17 23 ; None
  24 +;
18 25 ; OPTIONAL OUTPUT PARAMETERS:
19 26 ; None
  27 +;
20 28 ; ACCEPTED KEY-WORDS:
21 29 ; help = If set, print this help
  30 +;
22 31 ; COMMON BLOCKS:
23 32 ; None
  33 +;
24 34 ; SIDE EFFECTS:
25 35 ; Output FITS file is written to disk.
  36 +;
26 37 ; RESTRICTIONS:
27 38 ; The DustEMWrap IDL code must be installed
  39 +;
28 40 ; PROCEDURE:
29 41 ; None
  42 +;
30 43 ; EXAMPLES
31 44 ;
32 45 ; MODIFICATION HISTORY:
... ... @@ -43,14 +56,15 @@ ENDIF
43 56  
44 57 ;===== run dustem to get predicted spectrum and sed
45 58 dustem_predicted_sed=dustem_compute_sed(*(*!dustem_fit).current_param_values,out_st=dustem_spectra_st)
46   -;stop
  59 +
47 60 IF !run_pol THEN BEGIN
48 61 ;This is needed to compute Q,U of both SED and spectra
49   - dustem_predicted_polsed=dustem_compute_stokes(*(*!dustem_fit).current_param_values,bidon, $
50   - dustem_predicted_Qsed,dustem_predicted_Used, $
51   - dustem_predicted_Q_spec,dustem_predicted_U_spec,dustem_predicted_PSI_spec, $
52   - dustem_psi_em,out_st=out_st)
53   - ;Same in extinction, but does not work in polarization extinction was not fitted.
  62 + dustem_predicted_polsed=dustem_compute_stokes(*(*!dustem_fit).current_param_values,bidon, $
  63 + dustem_predicted_Qsed,dustem_predicted_Used, $
  64 + dustem_predicted_Q_spec,dustem_predicted_U_spec,dustem_predicted_PSI_spec, $
  65 + dustem_psi_em,out_st=out_st)
  66 +
  67 +;Same in extinction, but does not work in polarization extinction was not fitted.
54 68 ; dustem_predicted_polext=dustem_compute_stokext(*(*!dustem_fit).current_param_values,bidon, $
55 69 ; dustem_predicted_Qext,dustem_predicted_Uext, $
56 70 ; 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)
80 94 fully_undefined_sed=str_predicted_SED
81 95 str_predicted_SED.FILTER=(*(*!dustem_data).sed).filt_names ;taken from input SED
82 96 str_predicted_SED.Wavelength=(*(*!dustem_data).sed).wav ;taken from input SED
83   -str_predicted_SED.I=dustem_predicted_sed ;but where is Q,U ??
  97 +str_predicted_SED.I=dustem_predicted_sed
84 98 ;stop
85 99 IF !run_pol THEN BEGIN
86 100 str_predicted_SED.Q=dustem_predicted_Qsed
... ... @@ -215,7 +229,7 @@ ENDFOR
215 229 sxaddpar,header_predicted_SED,'COMMENT','===================================================',after='PARF'+strtrim(i,2)
216 230  
217 231 ;===== complement extension header for predicted spectrum total
218   -sxaddpar,header_predicted_spectrum_tot,'TITLE','OUTPUT BEST FIT TOTAL SPECTRUM BY DUSTEMWRAP'
  232 +;sxaddpar,header_predicted_spectrum_tot,'TITLE','OUTPUT BEST FIT TOTAL SPECTRUM BY DUSTEMWRAP'
219 233 sxaddpar,header_predicted_spectra,'TITLE','OUTPUT BEST FIT PER-GRAIN AND TOTAL EMISSION SPECTRA BY DUSTEMWRAP'
220 234 sxaddpar,header_predicted_extinctions,'TITLE','OUTPUT BEST FIT PER-GRAIN AND TOTAL EXTINCTION BY DUSTEMWRAP'
221 235  
... ...