Blame view

src/idl/dustem_fill_sed_dependent_columns.pro 1.52 KB
b6561251   Jean-Philippe Bernard   First commit
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
FUNCTION dustem_fill_sed_dependent_columns,sed,help=help

;+
; NAME:
;    dustem_fill_sed_dependent_columns
; PURPOSE:
;    fill up columns of a dustewrap sed which are depednent on I,Q,U and associated (co-)variances
; CATEGORY:
;    Dustem
; CALLING SEQUENCE:
;    output=dustem_fill_sed_dependent_columns(sed[,/help])
; INPUTS:
;    sed    : a valid dustemwrap sed
; OPTIONAL INPUT PARAMETERS:
;    None
; OUTPUTS:
;    None
; OPTIONAL OUTPUT PARAMETERS:
;    None
; ACCEPTED KEY-WORDS:
;    help      = If set print this help
; COMMON BLOCKS:
;    None
; SIDE EFFECTS:
;    None
; RESTRICTIONS:
;    The dustem idl wrapper must be installed
; PROCEDURE:
;    None
; EXAMPLES
;    filled_sed=dustem_fill_sed_dependent_columns(sed)
; MODIFICATION HISTORY:
;    Written by J.P. Bernard Sept 16th 2022
;    see evolution details on the dustem cvs maintained at IRAP
;    Contact J.-Ph. Bernard (Jean-Philippe.Bernard@irap.omp.eu) in case of problems.
;-

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
END