Blame view

src/idl/dustem_initialize_sed.pro 3.44 KB
9fb4644d   Jean-Philippe Bernard   added comments ke...
1
FUNCTION dustem_initialize_sed,Nsed,comments=comments,help=help
427f1205   Jean-Michel Glorian   version 4.2 merged
2

ef75e0b6   Jean-Philippe Bernard   added polarizatio...
3
4
5
6
7
8
9
10
11
12
;+
; NAME:
;    dustem_initialize_sed
; PURPOSE:
;    Initializes an empty Dustem SED structure
; CATEGORY:
;    DUSTEM Wrapper
; CALLING SEQUENCE:
;    st=dustem_initialize_sed(Nsed[,/help])
; INPUTS:
4fd64cbb   Ilyes Choubani   dustem_fit_sed_po...
13
;    Nsed: Number of elements/filters in the SED structure
ef75e0b6   Jean-Philippe Bernard   added polarizatio...
14
; OPTIONAL INPUT PARAMETERS:
9fb4644d   Jean-Philippe Bernard   added comments ke...
15
;    None
ef75e0b6   Jean-Philippe Bernard   added polarizatio...
16
17
18
19
20
; 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 ...
9fb4644d   Jean-Philippe Bernard   added comments ke...
21
22
;      wave    : wavelength in microns. Actually not used by DustemWrap. [microns]
;      spec    : Total intensity Intensity (a.k.a. Stokes I) [MJy/sr]
9fb4644d   Jean-Philippe Bernard   added comments ke...
23
24
25
26
27
28
29
30
31
32
33
34
35
36
;      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]
ef75e0b6   Jean-Philippe Bernard   added polarizatio...
37
; OPTIONAL OUTPUT PARAMETERS:
9fb4644d   Jean-Philippe Bernard   added comments ke...
38
;    comments : string comments about the SED
ef75e0b6   Jean-Philippe Bernard   added polarizatio...
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
; 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 
;-

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.}
9fb4644d   Jean-Philippe Bernard   added comments ke...
63
iv=la_undef(4)
0c7104bf   Jean-Philippe Bernard   adapted to new fi...
64
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}
9fb4644d   Jean-Philippe Bernard   added comments ke...
65
66
67
68
comments=['Dustem-Wrap SED']
comments=[comments,'instru: Instrument name']
comments=[comments,'filter: Instrument filter']
comments=[comments,'wave: Filter reference wavelength [mic]']
8a88c1a3   Jean-Philippe Bernard   can't remember wh...
69
comments=[comments,'StokesI: SED intensity [MJy/sr]']
9fb4644d   Jean-Philippe Bernard   added comments ke...
70
71
72
73
74
75
76
77
78
79
80
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]']
66d0acb9   Jean-Philippe Bernard   replaced P,p,psi ...
81
82
83
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]']
9fb4644d   Jean-Philippe Bernard   added comments ke...
84

427f1205   Jean-Michel Glorian   version 4.2 merged
85
86
sed=replicate(one_st,Nsed)

ef75e0b6   Jean-Philippe Bernard   added polarizatio...
87
the_end:
427f1205   Jean-Michel Glorian   version 4.2 merged
88
89
90
RETURN,sed

END