Blame view

src/idl/dustem_initialize_ext.pro 3.83 KB
90bee736   Ilyes Choubani   replicated ext fo...
1
2
3
4
5
FUNCTION dustem_initialize_ext,Next,comments=comments,help=help

;+
; NAME:
;    dustem_initialize_ext
f09e876c   Annie Hughes   updated doc help
6
;
90bee736   Ilyes Choubani   replicated ext fo...
7
8
; PURPOSE:
;    Initializes an empty Dustem EXT structure
f09e876c   Annie Hughes   updated doc help
9
;
90bee736   Ilyes Choubani   replicated ext fo...
10
; CATEGORY:
f09e876c   Annie Hughes   updated doc help
11
12
;    DUSTEM Wrapper, Distribued, Low-Level
;
90bee736   Ilyes Choubani   replicated ext fo...
13
14
; CALLING SEQUENCE:
;    st=dustem_initialize_ext(Next[,/help])
f09e876c   Annie Hughes   updated doc help
15
;
90bee736   Ilyes Choubani   replicated ext fo...
16
17
; INPUTS:
;    Next: Number of elements/filters in the EXT structure
f09e876c   Annie Hughes   updated doc help
18

90bee736   Ilyes Choubani   replicated ext fo...
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
; OPTIONAL INPUT PARAMETERS:
;    None
; OUTPUTS:
;    st = EXT 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]
;      EXT_I   : Total Extinction Cross-section (a.k.a. Ext_I) [cm^2/H]
;      EXT_Q   : Q Extinction Cross-section [cm^2/H]
;      EXT_U   : U Extintion Cross-section  [cm^2/H]
;      EXT_P   : P Extinction Cross-section [cm^2/H] (computed from EXT_Q,EXT_U or directly from VG's models)
;      EXT_smallp  : Smallp Extinction Cross-section (Extinction polarization fraction) []
;      psi     : polarization angle [deg] (computed from EXT_Q,EXT_U)
;      sigextII : = error^2 (for completness on sigmas) [cm^2/H^2]
;      sigextQQ : variance on Q [cm^2/H^2]
;      sigextUU : variance on U [cm^2/H^2]
;      sigextIQ : IQ covariance [cm^2/H^2]
;      sigextIU : IU covariance [cm^2/H^2]
;      sigextQU : QU covariance [cm^2/H^2]
;      sigextP : uncertainty on largep [cm^2/H]
;      sigextsmallp = uncertainty on smallp [] 
;      sigextpsi  : uncertainty on psi [deg]
d9a78683   Annie Hughes   updated help
42
;
90bee736   Ilyes Choubani   replicated ext fo...
43
44
; OPTIONAL OUTPUT PARAMETERS:
;    comments : string comments about the EXT SED
d9a78683   Annie Hughes   updated help
45
;
90bee736   Ilyes Choubani   replicated ext fo...
46
47
; ACCEPTED KEY-WORDS:
;    help                  = if set, print this help
d9a78683   Annie Hughes   updated help
48
;
90bee736   Ilyes Choubani   replicated ext fo...
49
50
; COMMON BLOCKS:
;    None
d9a78683   Annie Hughes   updated help
51
;
90bee736   Ilyes Choubani   replicated ext fo...
52
53
; SIDE EFFECTS:
;    None
d9a78683   Annie Hughes   updated help
54
;
90bee736   Ilyes Choubani   replicated ext fo...
55
56
; RESTRICTIONS:
;    None
d9a78683   Annie Hughes   updated help
57
;
90bee736   Ilyes Choubani   replicated ext fo...
58
59
; PROCEDURE:
;    Straightforward
d9a78683   Annie Hughes   updated help
60
;
90bee736   Ilyes Choubani   replicated ext fo...
61
62
63
; EXAMPLES
;    st=dustem_initialize_ext(10)
;    help,st
d9a78683   Annie Hughes   updated help
64
;
90bee736   Ilyes Choubani   replicated ext fo...
65
; MODIFICATION HISTORY:
f09e876c   Annie Hughes   updated doc help
66
67
68
;    Written by JPB 2009
;    Evolution details on the DustEMWrap gitlab.
;    See http://dustemwrap.irap.omp.eu/ for FAQ and help.  
90bee736   Ilyes Choubani   replicated ext fo...
69
70
;-

f09e876c   Annie Hughes   updated doc help
71

90bee736   Ilyes Choubani   replicated ext fo...
72
73
74
75
76
77
78
79
80
81
IF keyword_set(help) THEN BEGIN
  doc_library,'dustem_initialize_ext'
  sed=0.
  goto,the_end
ENDIF

iv=la_undef(4)
one_st={instru:'',filter:'',wave:iv,EXT_I:iv,EXT_Q:iv,EXT_U:iv,EXT_P:iv,EXT_smallp:iv,psi:iv,sigextII:iv,sigextQQ:iv,sigextUU:iv,sigextIQ:iv,sigextIU:iv,sigextQU:iv,sigextP:iv,sigextsmallp:iv,sigext_psi:iv}

comments=['Dustem-Wrap EXT']
b4e8a0f5   Annie Hughes   minor/cant remember
82
83
84
comments=[comments,'Comment lines start with \']
comments=[comments,'Undefined/missing value is -32768.0']
comments=[comments,'Assumes a reference N(H) = *!dustem_HCD']
90bee736   Ilyes Choubani   replicated ext fo...
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
comments=[comments,'instru: Instrument name']
comments=[comments,'filter: Instrument filter']
comments=[comments,'wave: Filter reference wavelength [mic]']
comments=[comments,'EXT_I: EXT intensity [cm^2/H]']
comments=[comments,'EXT_Q: Q Stokes parameter extinction cross-section [cm^2/H]']
comments=[comments,'EXT_U: U Stokes parameter extinction cross-section [cm^2/H]']
comments=[comments,'EXT_P: Extinction Polarized Intensity [cm^2/H]']
comments=[comments,'EXT_smallp: Extinction Polarized Fraction []']
comments=[comments,'psi: polarization angle [deg]']
comments=[comments,'sigextII: variance on EXT_I [(cm^2/H)^2]']
comments=[comments,'sigextQQ: variance on EXT_Q [(cm^2/H)^2]']
comments=[comments,'sigextUU: variance on EXT_U [(cm^2/H)^2]']
comments=[comments,'sigextIQ: covariance on EXT_I and EXT_Q [(cm^2/H)^2]']
comments=[comments,'sigextIU: covariance on EXT_I and EXT_U [(cm^2/H)^2]']
comments=[comments,'sigextQU: covariance on EXT_Q and EXT_U [(cm^2/Hs)^2]']
comments=[comments,'sigextP: variance on Extinction Polarized Intensity (P) [(cm^2/H)^2]']
comments=[comments,'sigextsmallp: variance on Extinction Polarized fraction (EXT_P) []']
comments=[comments,'sigextpsi: variance on polarisation fraction (psi) [deg^2]']

sed=replicate(one_st,Next)

the_end:
RETURN,sed

END