dustem_define_dustem_data.pro
2.26 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
FUNCTION dustem_define_dustem_data,polarization=polarization,rchi2_weight=rchi2_weight
;+
; NAME:
; dustem_define_dustem_data
;
; PURPOSE:
; Returns data structure with appropriate tags (format depends on polarized vs non polarized run)
;
; CATEGORY:
; DustEMWrap, Distributed, LowLevel
;
; CALLING SEQUENCE:
; dustem_data = dustem_define_dustem_data([/pol],[rchi2=outvar])
;
; INPUTS:
; None
;
; OPTIONAL INPUT PARAMETERS:
; None
;
; OUTPUTS:
; data structure with appropriate tags
;
; OPTIONAL OUTPUT PARAMETERS:
; structure with the same tags for the corresponding reduced chi2 weights
;
; ACCEPTED KEY-WORDS:
;
; COMMON BLOCKS:
; None
;
; SIDE EFFECTS:
;
; RESTRICTIONS:
; The DustEMWrap idl code must be installed
;
; PROCEDURES AND SUBROUTINES USED:
;
; EXAMPLES
; dustem_data = dustem_define_dustem_data(pol=1)
;
; MODIFICATION HISTORY:
; Written by JPB
; Evolution details on the DustEMWrap gitlab.
; See http://dustemwrap.irap.omp.eu/ for FAQ and help.
;-
if keyword_set(polarization) then begin
dustem_data_st ={ $ ;Structure contaning the data to fit
sed: ptr_new(), $ ;
ext: ptr_new(), $ ;
qsed: ptr_new(), $ ;
used: ptr_new(), $ ;
polsed: ptr_new(), $ ;
polfrac: ptr_new(), $ ;
psi_em: ptr_new(), $ ;
qext: ptr_new(), $ ;
uext: ptr_new(), $ ;
polext: ptr_new(), $ ;
fpolext: ptr_new(), $ ;
psi_ext: ptr_new() $ ;
}
rchi2_weight = {sed: 0.,ext: 0.,qsed:0.,used:0.,polsed:0.,polfrac:0.,psi_em:0.,qext:0.,uext:0.,polext:0.,psi_ext:0.}
endif else begin
dustem_data_st = { $
sed: ptr_new(), $
ext: ptr_new() $
}
rchi2_weight = {sed: 0.,ext: 0.}
endelse
RETURN,dustem_data_st
END