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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
// This code is generated by generate_code.py, do not modify it manually.
//! This module contains all the known columns in the allwise_original_valid table.
use crate::traits::{Column, Table};
/// AllWISE source catalogue
/// Reference paper:
/// Wright et al. 2010, AJ, 140, 1868
/// Mainzer et al. 2011, ApJ, 731, 53
/// Original catalogue:
/// http://irsadist.ipac.caltech.edu/wise-allwise/
/// http://wise2.ipac.caltech.edu/docs/release/allwise/expsup/index.html
/// Catalogue curator:
/// SSDC - ASI Space Science Data Center
/// https://www.ssdc.asi.it/
#[allow(non_camel_case_types)]
pub struct allwise_original_valid;
impl Table for allwise_original_valid {
fn string(&self) -> String {
"allwise_original_valid".to_string()
}
}
/// The columns in the allwise_original_valid table.
#[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, strum::Display)]
pub enum Col {
/// Incremental unique numeric identifier (increasing with declination).
/// This is the only field which was not in the original allWISE catalogue,
/// but was added for cross-match purposes.
allwise_oid,
/// Sexagesimal, equatorial position-based source name in the form:
/// hhmmss.ss+ddmmss.s.
/// The full naming convention for AllWISE Source Catalog sources has the
/// form
/// “WISEA Jhhmmss.ss+ddmmss.s,” where “WISEA” indicates the source is from
/// the AllWISE Source Catalog, and “J” indicates the position is J2000. The
/// “WISEA” acronym is not listed explicitly in the designation column.
designation,
/// J2000 right ascension with respect to the 2MASS PSC reference frame from
/// the non-moving source extraction.
/// The sky coverage depth for sources in the AllWISE Catalog is
/// approximately twice as large in W1 and W2 as it is in W3 and W4. AllWISE
/// combined W1 and W2 Single-exposure images from the WISE 4-Band Cryo,
/// 3-Band Cryo and NEOWISE Post-Cryo survey phases, and W3 and W4 images
/// from the 4-Band Cryo phase only. The additional epoch of W1 and W2
/// coverage accenuates the weight of those two bands in determining source
/// properties such as position and motion.
ra,
/// J2000 declination with respect to the 2MASS PSC reference frame from the
/// non-moving source extraction.
/// The sky coverage depth for sources in the AllWISE Catalog is
/// approximately twice as large in W1 and W2 as it is in W3 and W4. AllWISE
/// combined W1 and W2 Single-exposure images from the WISE 4-Band Cryo,
/// 3-Band Cryo and NEOWISE Post-Cryo survey phases, and W3 and W4 images
/// from the 4-Band Cryo phase only. The additional epoch of W1 and W2
/// coverage accenuates the weight of those two bands in determining source
/// properties such as position and motion.
dec,
/// One-sigma uncertainty in right ascension coordinate from the non-moving
/// source extraction.
ra_error,
/// One-sigma uncertainty in declination coordinate from the non-moving
/// source extraction.
dec_error,
/// The co-sigma (radecCoError) of the equatorial position uncertainties
/// (raError and decError). Unit arcsec.
/// The covariance between the position errors, C_{\alpha \delta} can be
/// derived from the co-sigma by the formula:
/// C_{\alpha \delta} = radecCoError * |radecError|.
radec_co_error,
/// W1 magnitude measured with profile-fitting photometry, or the magnitude
/// of the 95% confidence brightness upper limit if the W1 flux measurement
/// has SNR<2. This column is null if the source is nominally detected in
/// W1, but no useful brightness estimate could be made. The corresponding
/// error column is null if the W1 profile-fit magnitude is a 95% confidence
/// upper limit.
/// CAUTION: WISE profile-fit (w?mpro) measurements are optimized for point
/// sources and will systematically underestimate the true flux of resolved
/// objects. If a source entry has extFlag>0, you may wish to examine the
/// elliptical aperture photometry which are measured using areas that are
/// scaled from 2MASS XSC morphologies.
w1mpro,
/// W1 profile-fit photometric measurement uncertainty in mag units. This
/// column is null if the W1 profile-fit magnitude is a 95% confidence upper
/// limit or if the source is not measurable.
w1mpro_error,
/// W2 magnitude measured with profile-fitting photometry, or the magnitude
/// of the 95% confidence brightness upper limit if the W2 flux measurement
/// has SNR<2. This column is null if the source is nominally detected in
/// W2, but no useful brightness estimate could be made. The corresponding
/// error column is null if the W2 profile-fit magnitude is a 95% confidence
/// upper limit.
/// CAUTION: WISE profile-fit (w?mpro) measurements are optimized for point
/// sources and will systematically underestimate the true flux of resolved
/// objects. If a source entry has extFlag>0, you may wish to examine the
/// elliptical aperture photometry which are measured using areas that are
/// scaled from 2MASS XSC morphologies.
w2mpro,
/// W2 profile-fit photometric measurement uncertainty in mag units. This
/// column is null if the W2 profile-fit magnitude is a 95% confidence upper
/// limit or if the source is not measurable.
w2mpro_error,
/// W3 magnitude measured with profile-fitting photometry, or the magnitude
/// of the 95% confidence brightness upper limit if the W3 flux measurement
/// has SNR<2. This column is null if the source is nominally detected in
/// W3, but no useful brightness estimate could be made. The corresponding
/// error column is null if the W3 profile-fit magnitude is a 95% confidence
/// upper limit.
/// CAUTION: WISE profile-fit (w?mpro) measurements are optimized for point
/// sources and will systematically underestimate the true flux of resolved
/// objects. If a source entry has extFlag>0, you may wish to examine the
/// elliptical aperture photometry which are measured using areas that are
/// scaled from 2MASS XSC morphologies.
w3mpro,
/// W3 profile-fit photometric measurement uncertainty in mag units. This
/// column is null if the W3 profile-fit magnitude is a 95% confidence upper
/// limit or if the source is not measurable.
w3mpro_error,
/// W4 magnitude measured with profile-fitting photometry, or the magnitude
/// of the 95% confidence brightness upper limit if the W4 flux measurement
/// has SNR<2. This column is null if the source is nominally detected in
/// W4, but no useful brightness estimate could be made. The corresponding
/// error column is null if the W1 profile-fit magnitude is a 95% confidence
/// upper limit.
/// CAUTION: WISE profile-fit (w?mpro) measurements are optimized for point
/// sources and will systematically underestimate the true flux of resolved
/// objects. If a source entry has extFlag>0, you may wish to examine the
/// elliptical aperture photometry which are measured using areas that are
/// scaled from 2MASS XSC morphologies.
w4mpro,
/// W4 profile-fit photometric measurement uncertainty in mag units. This
/// column is null if the W4 profile-fit magnitude is a 95% confidence upper
/// limit or if the source is not measurable.
w4mpro_error,
/// Contamination and confusion flag.
/// Four character string, one character per band [W1/W2/W3/W4], that
/// indicates that the photometry and/or position measurements of a source
/// may be contaminated or biased due to proximity to an image artifact.
/// The type of artifact that may contaminate the measurements is denoted by
/// the following codes. Lower-case letters correspond to instances in which
/// the source detection in a band is believed to be real but the
/// measurement may be contaminated by the artifact. Upper-case letters are
/// instances in which the source detection in a band may be a spurious
/// detection of an artifact.
///
/// - D,d - Diffraction spike. Source may be a spurious detection of (D)
/// or contaminated by (d) a diffraction spike from a nearby bright star
/// on the same image, or
///
/// - P,p - Persistence. Source may be a spurious detection of (P) or
/// contaminated by (p) a short-term latent image left by a bright
/// source, or
///
/// - H,h - Halo. Source may be a spurious detection of (H) or
/// contaminated by (h) the scattered light halo surrounding a nearby
/// bright source, or
///
/// - O,o (letter “o”) - Optical ghost. Source may be a spurious detection
/// of (O) or contaminated by (o) an optical ghost image caused by a
/// nearby bright source, or
///
/// - 0 (number zero) - Source is unaffected by known artifacts.
///
/// A source extraction may be affected by more than one type of artifact or
/// condition. In this event, the ccFlags value in each band is set in the
/// following priority order: D,P,H,O,d,p,h,o,0.
/// A source can appear in the AllWISE Source Catalog even if it is flagged
/// as a spurious artifact detection in a band if there is a reliable
/// detection in another band that is not flagged as a spurious artifact
/// detection.
/// CAUTION: Non-zero ccFlags values in any band indicate the the
/// measurement in that band may be contaminated and the photometry should
/// be used with caution.
cc_flags,
/// Extended source flag.
/// This is an integer flag, the value of which indicates whether or not the
/// morphology of a source is consistent with the WISE point spread function
/// in any band, or whether the source is associated with or superimposed on
/// a previously known extended object from the 2MASS Extended Source
/// Catalog (XSC).
/// The values of the extFlag indicate the following conditions:
///
/// - 0 - The source shape is consistent with a point-source and the
/// source is not associated with or superimposed on a 2MASS XSC source
///
/// - 1 - The profile-fit photometry goodness-of-fit is >3.0 in one or
/// more bands.
///
/// - 2 - The source falls within the extrapolated isophotal footprint of
/// a 2MASS XSC source.
///
/// - 3 - The profile-fit photometry goodness-of-fit is >3.0 in one or
/// more bands, and the source falls within the extrapolated isophotal
/// footprint of a 2MASS XSC source.
///
/// - 4 - The source position falls within 5 arcsec of a 2MASS XSC source.
///
/// - 5 - The profile-fit photometry goodness-of-fit is >3.0 in one or
/// more bands, and the source position falls within 5 arcsec of a 2MASS
/// XSC source.
///
/// CAUTION: WISE profile-fit (w?mpro) measurements are optimized for point
/// sources and will systematically underestimate the true flux of resolved
/// objects. If a source entry has extFlag>0, you may wish to examine the
/// elliptical aperture photometry which are measured using areas that are
/// scaled from 2MASS XSC morphologies.
ext_flag,
/// Variability flag.
/// The variability flag is a four-character string, one character per band,
/// in which the value for each band is related to the probability that the
/// source flux measured on the individual WISE exposures was not constant
/// with time.
/// The probability is computed for a band only when there are at least six
/// single-exposure measurements available that satisfy minimum quality
/// criteria.
/// A value of “n” in a band indicates insufficient or inadequate data to
/// make a determination of possible variability.
/// Values of “0” through “9” indicate increasing probabilities of
/// variation. Values of “0” through “5” are most likely not variables.
/// Sources with values of “6” and “7” are likely flux variables, but are
/// the most susceptible to false-positive variability.
/// VarFlag values greater than “7” have the highest probability of being
/// true flux variables in a band.
/// CAUTION: Estimation of flux variability is unreliable for sources that
/// are extended (extFlag>0), and sources whose measurements are
/// contaminated by image artifacts in a band (ccFlags[band] != 0).
var_flag,
/// Photometric quality flag.
/// Four character flag, one character per band [W1/W2/W3/W4], that provides
/// a shorthand summary of the quality of the profile-fit photometry
/// measurement in each band, as derived from the measurement
/// signal-to-noise ratio.
///
/// - A - Source is detected in this band with a flux signal-to-noise
/// ratio >10.
///
/// - B - Source is detected in this band with a flux signal-to-noise
/// ratio 3<snr<10.
///
/// - C - Source is detected in this band with a flux signal-to-noise
/// ratio 2<snr<3.
///
/// - U - Upper limit on magnitude. Source measurement has w?snr<2. The
/// profile-fit magnitude w?mpro is a 95% confidence upper limit.
///
/// - X - A profile-fit measurement was not possible at this location in
/// this band. The value of w?mpro and w?sigmpro will be “null” in this
/// band.
///
/// - Z - A profile-fit source flux measurement was made at this location,
/// but the flux uncertainty could not be measured. The value of
/// w?sigmpro will be “null” in this band. The value of w?mpro will be
/// “null” if the measured flux, w?flux, is negative, but will not be
/// “null” if the flux is positive. If a non-null magnitude is present,
/// it corresponds to the true flux, and not the 95% confidence upper
/// limit. This occurs for a small number of sources found in a narrow
/// range of ecliptic longitude which were covered by a large number of
/// saturated pixels from 3-Band Cryo single-exposures.
ph_qual,
/// The average modified Julian Date (mJD) of the W1 single-exposures
/// covering the source.
w1mjd_mean,
/// The average modified Julian Date (mJD) of the W2 single-exposures
/// covering the source.
w2mjd_mean,
/// The average modified Julian Date (mJD) of the W3 single-exposures
/// covering the source.
w3mjd_mean,
/// The average modified Julian Date (mJD) of the W4 single-exposures
/// covering the source.
w4mjd_mean,
/// W1 magnitude of source measured in the elliptical aperture.
/// WISE profile-fit (w?mpro) measurements are optimized for point sources
/// and will systematically underestimate the true flux of resolved objects.
/// If a source entry has extFlag>0, you may wish to examine the elliptical
/// aperture photometry which are measured using areas that are scaled from
/// 2MASS XSC morphologies.
w1gmag,
/// Uncertainty in the W1 magnitude of source measured in elliptical
/// aperture.
/// CAUTION: A w1gerr value of 9.999 indicates that the measurement
/// uncertainty is very large, or the uncertainty could not be computed. In
/// either case, the w1gmag measurement should be considered highly suspect.
w1gmag_error,
/// W2 magnitude of source measured in the elliptical aperture.
/// WISE profile-fit (w?mpro) measurements are optimized for point sources
/// and will systematically underestimate the true flux of resolved objects.
/// If a source entry has extFlag>0, you may wish to examine the elliptical
/// aperture photometry which are measured using areas that are scaled from
/// 2MASS XSC morphologies.
w2gmag,
/// Uncertainty in the W2 magnitude of source measured in elliptical
/// aperture.
///
/// CAUTION: A w2gerr value of 9.999 indicates that the measurement
/// uncertainty is very large, or the uncertainty could not be computed. In
/// either case, the w2gmag measurement should be considered highly suspect.
w2gmag_error,
/// W3 magnitude of source measured in the elliptical aperture.
/// WISE profile-fit (w?mpro) measurements are optimized for point sources
/// and will systematically underestimate the true flux of resolved objects.
/// If a source entry has extFlag>0, you may wish to examine the elliptical
/// aperture photometry which are measured using areas that are scaled from
/// 2MASS XSC morphologies.
w3gmag,
/// Uncertainty in the W3 magnitude of source measured in elliptical
/// aperture.
///
/// CAUTION: A w3gerr value of 9.999 indicates that the measurement
/// uncertainty is very large, or the uncertainty could not be computed. In
/// either case, the w3gmag measurement should be considered highly suspect.
w3gmag_error,
/// W4 magnitude of source measured in the elliptical aperture.
/// WISE profile-fit (w?mpro) measurements are optimized for point sources
/// and will systematically underestimate the true flux of resolved objects.
/// If a source entry has extFlag>0, you may wish to examine the elliptical
/// aperture photometry which are measured using areas that are scaled from
/// 2MASS XSC morphologies.
w4gmag,
/// Uncertainty in the W4 magnitude of source measured in elliptical
/// aperture.
///
/// CAUTION: A w4gError value of 9.999 indicates that the measurement
/// uncertainty is very large, or the uncertainty could not be computed. In
/// either case, the w4gmag measurement should be considered highly suspect.
w4gmag_error,
/// 2MASS PSC association.
/// Unique identifier of the closest source in the 2MASS Point Source
/// Catalog (PSC) that falls within 3 arcsec of the non-motion fit position
/// of this WISE source. This is equivalent to the pts_key in the 2MASS PSC
/// entry.
/// This column is “null” if there is no 2MASS PSC source within 3 arcsec of
/// the WISE source position.
tmass_key,
}
impl Column for Col {}
#[cfg(test)]
/// Collects all the known columns in the allwise_original_valid table.
pub fn collect_known(map: &mut std::collections::HashMap<String, Vec<String>>) {
let mut col_strings = Vec::new();
col_strings.push(Col::allwise_oid.to_string());
col_strings.push(Col::designation.to_string());
col_strings.push(Col::ra.to_string());
col_strings.push(Col::dec.to_string());
col_strings.push(Col::ra_error.to_string());
col_strings.push(Col::dec_error.to_string());
col_strings.push(Col::radec_co_error.to_string());
col_strings.push(Col::w1mpro.to_string());
col_strings.push(Col::w1mpro_error.to_string());
col_strings.push(Col::w2mpro.to_string());
col_strings.push(Col::w2mpro_error.to_string());
col_strings.push(Col::w3mpro.to_string());
col_strings.push(Col::w3mpro_error.to_string());
col_strings.push(Col::w4mpro.to_string());
col_strings.push(Col::w4mpro_error.to_string());
col_strings.push(Col::cc_flags.to_string());
col_strings.push(Col::ext_flag.to_string());
col_strings.push(Col::var_flag.to_string());
col_strings.push(Col::ph_qual.to_string());
col_strings.push(Col::w1mjd_mean.to_string());
col_strings.push(Col::w2mjd_mean.to_string());
col_strings.push(Col::w3mjd_mean.to_string());
col_strings.push(Col::w4mjd_mean.to_string());
col_strings.push(Col::w1gmag.to_string());
col_strings.push(Col::w1gmag_error.to_string());
col_strings.push(Col::w2gmag.to_string());
col_strings.push(Col::w2gmag_error.to_string());
col_strings.push(Col::w3gmag.to_string());
col_strings.push(Col::w3gmag_error.to_string());
col_strings.push(Col::w4gmag.to_string());
col_strings.push(Col::w4gmag_error.to_string());
col_strings.push(Col::tmass_key.to_string());
map.insert(allwise_original_valid.string(), col_strings);
}