Commit 502f6450266baf21bcfb131c3d5a085fab4f8e09
Exists in
master
Merge branch 'master' of https://gitlab.irap.omp.eu/OV-GSO-DC/dustem-wrapper_idl
Showing
2 changed files
with
35 additions
and
8 deletions
Show diff stats
src/idl/dustem_read_fits_table.pro
... | ... | @@ -3,29 +3,42 @@ PRO dustem_read_fits_table,filename=filename,help=help,dustem_spectra_st=dustem_ |
3 | 3 | ;+ |
4 | 4 | ; NAME: |
5 | 5 | ; dustem_read_fits_table |
6 | +; | |
6 | 7 | ; PURPOSE: |
7 | 8 | ; Reads a Dustem fits table into current DustEMWrap system variables |
9 | +; | |
8 | 10 | ; CATEGORY: |
9 | 11 | ; DustEMWrap, High-Level, Distributed, User convenience |
12 | +; | |
10 | 13 | ; CALLING SEQUENCE: |
11 | 14 | ; dustem_read_fits_table[,filename=][,/help] |
15 | +; | |
12 | 16 | ; INPUTS: |
17 | +; | |
13 | 18 | ; OPTIONAL INPUT PARAMETERS: |
14 | 19 | ; filename = File name to be read (default='./dustemwrap_results.fits') |
20 | +; | |
15 | 21 | ; OUTPUTS: |
16 | 22 | ; None |
23 | +; | |
17 | 24 | ; OPTIONAL OUTPUT PARAMETERS: |
18 | 25 | ; dustem_spectra_st = emission and extinction spectra (total and for each grain type) |
26 | +; | |
19 | 27 | ; ACCEPTED KEY-WORDS: |
20 | 28 | ; help = If set, print this help |
29 | +; | |
21 | 30 | ; COMMON BLOCKS: |
22 | 31 | ; None |
32 | +; | |
23 | 33 | ; SIDE EFFECTS: |
24 | 34 | ; DustEMWrap system variables are set |
35 | +; | |
25 | 36 | ; RESTRICTIONS: |
26 | 37 | ; The DustEMWrap IDL code must be installed |
38 | +; | |
27 | 39 | ; PROCEDURE: |
28 | 40 | ; None |
41 | +; | |
29 | 42 | ; EXAMPLES |
30 | 43 | ; |
31 | 44 | ; MODIFICATION HISTORY: | ... | ... |
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 | ... | ... |