Blame view

src/idl/dustem_fill_sed_dependent_columns.pro 1.54 KB
b6561251   Jean-Philippe Bernard   First commit
1
2
3
4
5
FUNCTION dustem_fill_sed_dependent_columns,sed,help=help

;+
; NAME:
;    dustem_fill_sed_dependent_columns
ea4bdd98   Annie Hughes   minor/cant remember
6
;
b6561251   Jean-Philippe Bernard   First commit
7
; PURPOSE:
50bb5343   Annie Hughes   minor changes to ...
8
;    fill up columns of a DustEMWrap SED that are depednent on I,Q,U and associated (co-)variances
ea4bdd98   Annie Hughes   minor/cant remember
9
;
b6561251   Jean-Philippe Bernard   First commit
10
; CATEGORY:
50bb5343   Annie Hughes   minor changes to ...
11
;    DustEMWrap, Distributed, High-Level, User-convenience
ea4bdd98   Annie Hughes   minor/cant remember
12
;
b6561251   Jean-Philippe Bernard   First commit
13
14
; CALLING SEQUENCE:
;    output=dustem_fill_sed_dependent_columns(sed[,/help])
ea4bdd98   Annie Hughes   minor/cant remember
15
;
b6561251   Jean-Philippe Bernard   First commit
16
17
; INPUTS:
;    sed    : a valid dustemwrap sed
ea4bdd98   Annie Hughes   minor/cant remember
18
;
b6561251   Jean-Philippe Bernard   First commit
19
20
; OPTIONAL INPUT PARAMETERS:
;    None
ea4bdd98   Annie Hughes   minor/cant remember
21
;
b6561251   Jean-Philippe Bernard   First commit
22
23
; OUTPUTS:
;    None
ea4bdd98   Annie Hughes   minor/cant remember
24
;
b6561251   Jean-Philippe Bernard   First commit
25
26
; OPTIONAL OUTPUT PARAMETERS:
;    None
ea4bdd98   Annie Hughes   minor/cant remember
27
;
b6561251   Jean-Philippe Bernard   First commit
28
29
; ACCEPTED KEY-WORDS:
;    help      = If set print this help
ea4bdd98   Annie Hughes   minor/cant remember
30
;
b6561251   Jean-Philippe Bernard   First commit
31
32
; COMMON BLOCKS:
;    None
ea4bdd98   Annie Hughes   minor/cant remember
33
;
b6561251   Jean-Philippe Bernard   First commit
34
35
; SIDE EFFECTS:
;    None
ea4bdd98   Annie Hughes   minor/cant remember
36
;
b6561251   Jean-Philippe Bernard   First commit
37
; RESTRICTIONS:
50bb5343   Annie Hughes   minor changes to ...
38
;    The DustEMWrap IDL code must be installed
ea4bdd98   Annie Hughes   minor/cant remember
39
;
b6561251   Jean-Philippe Bernard   First commit
40
41
; PROCEDURE:
;    None
ea4bdd98   Annie Hughes   minor/cant remember
42
;
b6561251   Jean-Philippe Bernard   First commit
43
44
; EXAMPLES
;    filled_sed=dustem_fill_sed_dependent_columns(sed)
ea4bdd98   Annie Hughes   minor/cant remember
45
;
b6561251   Jean-Philippe Bernard   First commit
46
; MODIFICATION HISTORY:
50bb5343   Annie Hughes   minor changes to ...
47
48
49
;    Written by JPB June-2022
;    Evolution details on the DustEMWrap gitlab.
;    See http://dustemwrap.irap.omp.eu/ for FAQ and help.  
b6561251   Jean-Philippe Bernard   First commit
50
51
;-

50bb5343   Annie Hughes   minor changes to ...
52

b6561251   Jean-Philippe Bernard   First commit
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
IF keyword_set(help) THEN BEGIN
  doc_library,'dustem_fill_sed_dependent_columns'
  output=0
  goto,the_end
ENDIF

output=sed

polar_iqu2ippsi,sed.stokesI,sed.stokesQ,sed.stokesU,p,psi,p2=p2,/lac
output.smallp=p
output.psi=psi
output.largep=la_mul(output.smallp,output.stokesI)

polar_variance_iqu2ippsi,sed.stokesI,sed.stokesQ,sed.stokesU,sed.sigmaII,sed.sigmaQQ,sed.sigmaUU,sed.sigmaIQ,sed.sigmaIU,sed.sigmaQU, $
						variance_smallp,variance_psi,variance_largep,/lac

output.sigma_largep=variance_largep
output.sigma_smallp=variance_smallp
output.sigma_psi=variance_psi

the_end:

RETURN,output
50bb5343   Annie Hughes   minor changes to ...
76
END