dustem_initialize_sed.pro
3.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
FUNCTION dustem_initialize_sed,Nsed,comments=comments,help=help
;+
; NAME:
; dustem_initialize_sed
;
; PURPOSE:
; Initializes an empty DustEMWrapper SED structure
;
; CATEGORY:
; DustEMWrapper, Distributed, Lowlevel
;
; CALLING SEQUENCE:
; st=dustem_initialize_sed(Nsed[,/help])
;
; INPUTS:
; Nsed: Number of elements/filters in the SED structure
;
; OPTIONAL INPUT PARAMETERS:
; None
;
; OUTPUTS:
; st = SED structure
; The structure contains the following tags
; instru : name of the instrument. Actually not used by DustemWrap.
; filter : name of the filter. Actually defines the wavelength, the flux convention, etc ...
; wave : wavelength in microns. Actually not used by DustemWrap. [microns]
; spec : Total intensity Intensity (a.k.a. Stokes I) [MJy/sr]
; StokesQ : Stokes Q intensity [MJy/sr]
; StokesU : Stokes U intensity [MJy/sr]
; largeP : polarized intensity [MJy/sr] (computed from StokesQ,StokesU)
; smallp : polarization fraction [] (computed from StokesI, StokesQ,StokesU)
; psi : polarization angle [deg] (computed from StokesQ,StokesU)
; sigmaII : = error^2 (for completness on sigmas) [MJy/sr^2]
; sigmaQQ : variance on Q [MJy/sr^2]
; sigmaUU : variance on U [MJy/sr^2]
; sigmaIQ : IQ covariance [MJy/sr^2]
; sigmaIU : IU covariance [MJy/sr^2]
; sigmaQU : QU covariance [MJy/sr^2]
; sigma_largep : uncertainty on largep [MJy/sr]
; sigma_smallp: uncertainty on smallp []
; sigma_psi : uncertainty on psi [deg]
;
; OPTIONAL OUTPUT PARAMETERS:
; comments : string comments about the SED
;
; ACCEPTED KEY-WORDS:
; help = if set, print this help
;
; COMMON BLOCKS:
; None
;
; SIDE EFFECTS:
; None
;
; RESTRICTIONS:
; None
;
; PROCEDURE:
; Straightforward
;
; EXAMPLES
; st=dustem_initialize_sed(10)
; help,st
;
; MODIFICATION HISTORY:
; Written by JPB
; Evolution details on the DustEMWrap gitlab.
; See http://dustemwrap.irap.omp.eu/ for FAQ and help.
;-
IF keyword_set(help) THEN BEGIN
doc_library,'dustem_initialize_sed'
sed=0.
goto,the_end
ENDIF
;one_st={instru:'',filter:'',wave:0.,spec:0.,error:0.}
iv=la_undef(4)
one_st={instru:'',filter:'',wave:iv,StokesI:iv,StokesQ:iv,StokesU:iv,largeP:iv,smallp:iv,psi:iv,sigmaII:iv,sigmaQQ:iv,sigmaUU:iv,sigmaIQ:iv,sigmaIU:iv,sigmaQU:iv,sigma_largep:iv,sigma_smallp:iv,sigma_psi:iv}
comments=['Dustem-Wrap SED']
comments=[comments,'instru: Instrument name']
comments=[comments,'filter: Instrument filter']
comments=[comments,'wave: Filter reference wavelength [mic]']
comments=[comments,'StokesI: SED intensity [MJy/sr]']
comments=[comments,'StokesQ: Q Stokes parameter intensity [MJy/sr]']
comments=[comments,'StokesU: U Stokes parameter intensity [MJy/sr]']
comments=[comments,'largeP: Polarized intensity P [MJy/sr]']
comments=[comments,'smallp: polarization fraction []']
comments=[comments,'psi: polarization angle [deg]']
comments=[comments,'sigmaII: variance on Stokes I [(MJy/sr)^2]']
comments=[comments,'sigmaQQ: variance on Stokes Q [(MJy/sr)^2]']
comments=[comments,'sigmaUU: variance on Stokes U [(MJy/sr)^2]']
comments=[comments,'sigmaIQ: covariance on Stokes I and Q [(MJy/sr)^2]']
comments=[comments,'sigmaIU: covariance on Stokes I and U [(MJy/sr)^2]']
comments=[comments,'sigmaQU: covariance on Stokes Q and U [(MJy/sr)^2]']
comments=[comments,'sigma_largep: variance on Polarized Intensity (P) [(MJy/sr)^2]']
comments=[comments,'sigma_smallp: variance on polarisation fraction (p) []']
comments=[comments,'sigma_psi: variance on polarisation fraction (psi) [deg^2]']
comments=[comments,'CAUTION: p, P and psi values are NOT debiased']
sed=replicate(one_st,Nsed)
the_end:
RETURN,sed
END