-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathradon_wrapper.readme
131 lines (86 loc) · 4.1 KB
/
radon_wrapper.readme
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
79
80
81
82
83
84
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
###############
####Summary####
###############
The program, radon_wrapper.pro, is my own personal script to load
MaNGA data, prepare the data, apply the radon transformation, analyze
the radon transformation, and save the output. The steps it goes through are:
1) Load MAPS data (either stellar or gas velocities)
2) recenter the maps so the optical center is directly over the central pixel
3) (Optional) apply an additional offset if a alternate center is known
4) Mask any bad data (combine existing masks as well as a SNR cut)
5) apply the radon transform, including propagating the covariance
matrix if requested
6) Trace the ridge in the radon transformation defined by where the
value of theta where the transformation is minimized as a function of
theta
7) Save the output to a fits file, and create a diagnostic plot
###########################
###Description of Output###
###########################
The wrapper writes a fits file with 13 different extensions each
containing different useful information. The following is a short
explanation of each extension (extension number and extension name,
followed by the description):
Extension 0 -- Empty
Extension 1 -- 'velocity'
The velocity field (after preprocessing)
Extension 2 -- 'velocity_error'
The input velocity field errors (after preprocessing)
Extension 3 -- 'velocity_mask'
The velocity field mask (after preprocessing)
Extension 4 -- 'radon'
The absolute radon transform of the veloctity field
Extension 5 -- 'radon_rescale'
A rescaled version of the radon transform where the range of
values at fixed rho (each row in the matrix) range from 0 to
1. This is mostly for viewing purposes.
Extension 6 -- 'radon_mask'
A mask indicating where the radon transform may be
unreliable. It flags infinite values, zeros, regions where
the radon "aperture" overlapped masked data in the velocity
field, and regions where the radon "aperture" extended over
the edge of the map.
Extension 7 -- 'radon_error'
Error on radon transform
Extension 8 -- 'radon_theta'
Array of theta values for this transform (x-axis)
Extension 9 -- 'radon_rho'
Array of rho values for this transform (y-axis)
Extension 10 -- 'radon_length'
Number of pixels used to calculate the transform at a given
(rho,theta) location. This can vary due if the radon
aperture is not finite, near the edge or masked regions of a
velocity field, and small variations will occur to the the
finite pixel size and nearest-neighbor interpolation used
when calculating the radon transformation.
Extension 11 -- 'radon_maskfrac'
Map indicating hte fraction of data in the velocity field
that was within the radon aperture but masked (these values
can be biased)
Extension 12 -- 'radon_edge'
Map indicating whether the radon aperture at a given point
overlapped the edge of the velocity field
Extension 13 -- 'trace'
The results of the radon transform trace along the ridge
where the transform is minimized as a function of rho. The
contents are:
RHO -- distance from center
THETA -- angle where RT is minimized (basically position angle but
offset by 90 degrees)
ETHETA -- uncertainty on theta
STATUS -- status returned by MPFIT (see their documentation
for further details). Typically we want to avoid anything <
1.
SLICE_LENGTH -- fraction of data at fixed rho which was
usable. The trace can perform poorly when slice_length gets
small, although this depends on exactly which data are
masked (see "bias_flag" for an attempt at a more robust way
of flagging theta measurements where missing data becomes a
problem).
BIAS_FLAG -- indicates that the estimate of theta may be
biased by missing data. For each radius, rho[i], I check to
see if the value of theta at the previous radius, rho[i-1],
falls inside a masked region at the current rho[i]. If it
does, then it is flagged
When I plot these traces, I typically use the selector:
sel=where(status gt 0 and 1-bias_flag)