gaia_access 0.1.4

Access the Gaia ESA Archive for astronomical data.
Documentation
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
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
// This code is generated by generate_code.py, do not modify it manually.

//! This module contains all the known columns in the hipparcos_newreduction table.

use crate::traits::{Column, Table};

/// Hipparcos New Reduction: The Astrometric Catalogue
///
/// Hipparcos, the new Reduction of the Raw data
///      van Leeuwen F.
/// Astron. Astrophys. 474, 653 (2007)
/// http://dx.doi.org/10.1051/0004-6361:20078357
///
/// A new reduction of the astrometric data as produced by the Hipparcos
///     mission has been published, claiming accuracies for nearly all stars
///     brighter than magnitude Hp=8 to be better, by up to a factor 4, than
///     in the original catalogue.
///
///     The new Hipparcos astrometric catalogue is checked for the quality of
///     the data and the consistency of the formal errors as well as the
///     possible presence of error correlations. The differences with the
///     earlier publication are explained.
///
///     Methods. The internal errors are followed through the reduction
///     process, and the external errors are investigated on the basis of a
///     comparison with radio observations of a small selection of stars, and
///     the distribution of negative parallaxes. Error correlation levels are
///     investigated and the reduction by more than a factor 10 as obtained in
///     the new catalogue is explained.
///
///     Results. The formal errors on the parallaxes for the new catalogue are
///     confirmed. The presence of a small amount of additional noise, though
///     unlikely, cannot be ruled out.
///
///     Conclusions. The new reduction of the Hipparcos astrometric data
///     provides an improvement by a factor 2.2 in the total weight compared
///     to the catalogue published in 1997, and provides much improved data
///     for a wide range of studies on stellar luminosities and local galactic
///     kinematics.
#[allow(non_camel_case_types)]
pub struct hipparcos_newreduction;

impl Table for hipparcos_newreduction {
    fn string(&self) -> String {
        "hipparcos_newreduction".to_string()
    }
}

/// The columns in the hipparcos_newreduction table.
#[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, strum::Display)]
pub enum Col {
    /// Hipparcos identifier
    hip,
    /// Entry in one of the suppl.catalogues
    ic,
    /// Right Ascension in ICRS, Ep=1991.25
    ra,
    /// Declination in ICRS, Ep=1991.25
    dec,
    /// Right Ascension in ICRS, Ep=1991.25
    ra_rad,
    /// Declination in ICRS, Ep=1991.25
    de_rad,
    /// Parallax
    plx,
    /// Proper motion in Right Ascension
    pm_ra,
    /// Proper motion in Declination
    pm_de,
    /// Formal error on RArad
    e_ra_rad,
    /// Formal error on DErad
    e_de_rad,
    /// Formal error on Plx
    e_plx,
    /// Formal error on pmRA
    e_pm_ra,
    /// Formal error on pmDE
    e_pm_de,
    /// Percentage rejected data
    f1,
    /// Goodness of fit
    f2,
    /// Number of components
    nc,
    /// Number of field transits used
    ntr,
    /// Upper-triangular weight matrix element 3
    ///
    /// The upper-triangular weight matrix U is related to the
    ///      covariance matrix C by
    ///          C-1 = ∼U U    (∼U represents transposed U)
    ///      The elements Ui forming the upper triangular matrix are stored as
    ///          ±                         -+
    ///          |  (1)  (2)  (4)  (7)  (11) |
    ///          |   0   (3)  (5)  (8)  (12) |
    ///          |   0    0   (6)  (9)  (13) |
    ///          |   0    0    0  (10)  (14) |
    ///          |   0    0    0    0   (15) |
    ///          ±                         -+
    ///      on the astrometric parameters RA, Dec, plx, pmRA, pmDE,
    ///      and derivatives of proper motions for 7- and 9-parameter
    ///      solutions.
    u3,
    /// Upper-triangular weight matrix element 4
    ///
    /// The upper-triangular weight matrix U is related to the
    ///      covariance matrix C by
    ///          C-1 = ∼U U    (∼U represents transposed U)
    ///      The elements Ui forming the upper triangular matrix are stored as
    ///          ±                         -+
    ///          |  (1)  (2)  (4)  (7)  (11) |
    ///          |   0   (3)  (5)  (8)  (12) |
    ///          |   0    0   (6)  (9)  (13) |
    ///          |   0    0    0  (10)  (14) |
    ///          |   0    0    0    0   (15) |
    ///          ±                         -+
    ///      on the astrometric parameters RA, Dec, plx, pmRA, pmDE,
    ///      and derivatives of proper motions for 7- and 9-parameter
    ///      solutions.
    u4,
    /// Upper-triangular weight matrix element 5
    ///
    /// The upper-triangular weight matrix U is related to the
    ///      covariance matrix C by
    ///          C-1 = ∼U U    (∼U represents transposed U)
    ///      The elements Ui forming the upper triangular matrix are stored as
    ///          ±                         -+
    ///          |  (1)  (2)  (4)  (7)  (11) |
    ///          |   0   (3)  (5)  (8)  (12) |
    ///          |   0    0   (6)  (9)  (13) |
    ///          |   0    0    0  (10)  (14) |
    ///          |   0    0    0    0   (15) |
    ///          ±                         -+
    ///      on the astrometric parameters RA, Dec, plx, pmRA, pmDE,
    ///      and derivatives of proper motions for 7- and 9-parameter
    ///      solutions.
    u5,
    /// Upper-triangular weight matrix element 6
    ///
    /// The upper-triangular weight matrix U is related to the
    ///      covariance matrix C by
    ///          C-1 = ∼U U    (∼U represents transposed U)
    ///      The elements Ui forming the upper triangular matrix are stored as
    ///          ±                         -+
    ///          |  (1)  (2)  (4)  (7)  (11) |
    ///          |   0   (3)  (5)  (8)  (12) |
    ///          |   0    0   (6)  (9)  (13) |
    ///          |   0    0    0  (10)  (14) |
    ///          |   0    0    0    0   (15) |
    ///          ±                         -+
    ///      on the astrometric parameters RA, Dec, plx, pmRA, pmDE,
    ///      and derivatives of proper motions for 7- and 9-parameter
    ///      solutions.
    u6,
    /// Upper-triangular weight matrix element 7
    ///
    /// The upper-triangular weight matrix U is related to the
    ///      covariance matrix C by
    ///          C-1 = ∼U U    (∼U represents transposed U)
    ///      The elements Ui forming the upper triangular matrix are stored as
    ///          ±                         -+
    ///          |  (1)  (2)  (4)  (7)  (11) |
    ///          |   0   (3)  (5)  (8)  (12) |
    ///          |   0    0   (6)  (9)  (13) |
    ///          |   0    0    0  (10)  (14) |
    ///          |   0    0    0    0   (15) |
    ///          ±                         -+
    ///      on the astrometric parameters RA, Dec, plx, pmRA, pmDE,
    ///      and derivatives of proper motions for 7- and 9-parameter
    ///      solutions.
    u7,
    /// Upper-triangular weight matrix element 8
    ///
    /// The upper-triangular weight matrix U is related to the
    ///      covariance matrix C by
    ///          C-1 = ∼U U    (∼U represents transposed U)
    ///      The elements Ui forming the upper triangular matrix are stored as
    ///          ±                         -+
    ///          |  (1)  (2)  (4)  (7)  (11) |
    ///          |   0   (3)  (5)  (8)  (12) |
    ///          |   0    0   (6)  (9)  (13) |
    ///          |   0    0    0  (10)  (14) |
    ///          |   0    0    0    0   (15) |
    ///          ±                         -+
    ///      on the astrometric parameters RA, Dec, plx, pmRA, pmDE,
    ///      and derivatives of proper motions for 7- and 9-parameter
    ///      solutions.
    u8,
    /// Upper-triangular weight matrix element 9
    ///
    /// The upper-triangular weight matrix U is related to the
    ///      covariance matrix C by
    ///          C-1 = ∼U U    (∼U represents transposed U)
    ///      The elements Ui forming the upper triangular matrix are stored as
    ///          ±                         -+
    ///          |  (1)  (2)  (4)  (7)  (11) |
    ///          |   0   (3)  (5)  (8)  (12) |
    ///          |   0    0   (6)  (9)  (13) |
    ///          |   0    0    0  (10)  (14) |
    ///          |   0    0    0    0   (15) |
    ///          ±                         -+
    ///      on the astrometric parameters RA, Dec, plx, pmRA, pmDE,
    ///      and derivatives of proper motions for 7- and 9-parameter
    ///      solutions.
    u9,
    /// [0,159] Solution type new reduction
    ///
    /// The solution type is a number 10xd+s consisting of two parts d and s:
    ///     - s describes the type of solution adopted:
    ///       1 = stochastic solution (dispersion is given in the 'var' column)
    ///       3 = VIM solution (additional parameters in file hipvim.dat)
    ///       5 = 5-parameter solution (this file)
    ///       7 = 7-parameter solution (additional parameters in hip7p.dat)
    ///       9 = 9-parameter solution (additional parameters in hip9p.dat)
    ///     - d describes peculiarities, as a combination of values:
    ///       0 = single star
    ///       1 = double star
    ///       2 = variable in the system with amplitude > 0.2mag
    ///       4 = astrometry refers to the photocenter
    ///       8 = measurements concern the secondary (fainter) in the double system
    sn,
    /// [0,5] Solution type old reduction
    ///
    /// as follows:
    ///       0 = standard 5-parameter solution
    ///       1 = 7- or 9-parameter solution
    ///       2 = stochastic solution
    ///       3 = double and multiple stars
    ///       4 = orbital binary as resolved in the published catalog
    ///       5 = VIM (variability-induced mover) solution
    so,
    /// Cosmic dispersion added (stochastic solution)
    var,
    /// Upper-triangular weight matrix element 1
    ///
    /// The upper-triangular weight matrix U is related to the
    ///      covariance matrix C by
    ///          C-1 = ∼U U    (∼U represents transposed U)
    ///      The elements Ui forming the upper triangular matrix are stored as
    ///          ±                         -+
    ///          |  (1)  (2)  (4)  (7)  (11) |
    ///          |   0   (3)  (5)  (8)  (12) |
    ///          |   0    0   (6)  (9)  (13) |
    ///          |   0    0    0  (10)  (14) |
    ///          |   0    0    0    0   (15) |
    ///          ±                         -+
    ///      on the astrometric parameters RA, Dec, plx, pmRA, pmDE,
    ///      and derivatives of proper motions for 7- and 9-parameter
    ///      solutions.
    u1,
    /// Upper-triangular weight matrix element 2
    ///
    /// The upper-triangular weight matrix U is related to the
    ///      covariance matrix C by
    ///          C-1 = ∼U U    (∼U represents transposed U)
    ///      The elements Ui forming the upper triangular matrix are stored as
    ///          ±                         -+
    ///          |  (1)  (2)  (4)  (7)  (11) |
    ///          |   0   (3)  (5)  (8)  (12) |
    ///          |   0    0   (6)  (9)  (13) |
    ///          |   0    0    0  (10)  (14) |
    ///          |   0    0    0    0   (15) |
    ///          ±                         -+
    ///      on the astrometric parameters RA, Dec, plx, pmRA, pmDE,
    ///      and derivatives of proper motions for 7- and 9-parameter
    ///      solutions.
    u2,
    /// Upper-triangular weight matrix element 10
    ///
    /// The upper-triangular weight matrix U is related to the
    ///      covariance matrix C by
    ///          C-1 = ∼U U    (∼U represents transposed U)
    ///      The elements Ui forming the upper triangular matrix are stored as
    ///          ±                         -+
    ///          |  (1)  (2)  (4)  (7)  (11) |
    ///          |   0   (3)  (5)  (8)  (12) |
    ///          |   0    0   (6)  (9)  (13) |
    ///          |   0    0    0  (10)  (14) |
    ///          |   0    0    0    0   (15) |
    ///          ±                         -+
    ///      on the astrometric parameters RA, Dec, plx, pmRA, pmDE,
    ///      and derivatives of proper motions for 7- and 9-parameter
    ///      solutions.
    u10,
    /// Upper-triangular weight matrix element 11
    ///
    /// The upper-triangular weight matrix U is related to the
    ///      covariance matrix C by
    ///          C-1 = ∼U U    (∼U represents transposed U)
    ///      The elements Ui forming the upper triangular matrix are stored as
    ///          ±                         -+
    ///          |  (1)  (2)  (4)  (7)  (11) |
    ///          |   0   (3)  (5)  (8)  (12) |
    ///          |   0    0   (6)  (9)  (13) |
    ///          |   0    0    0  (10)  (14) |
    ///          |   0    0    0    0   (15) |
    ///          ±                         -+
    ///      on the astrometric parameters RA, Dec, plx, pmRA, pmDE,
    ///      and derivatives of proper motions for 7- and 9-parameter
    ///      solutions.
    u11,
    /// Upper-triangular weight matrix element 12
    ///
    /// The upper-triangular weight matrix U is related to the
    ///      covariance matrix C by
    ///          C-1 = ∼U U    (∼U represents transposed U)
    ///      The elements Ui forming the upper triangular matrix are stored as
    ///          ±                         -+
    ///          |  (1)  (2)  (4)  (7)  (11) |
    ///          |   0   (3)  (5)  (8)  (12) |
    ///          |   0    0   (6)  (9)  (13) |
    ///          |   0    0    0  (10)  (14) |
    ///          |   0    0    0    0   (15) |
    ///          ±                         -+
    ///      on the astrometric parameters RA, Dec, plx, pmRA, pmDE,
    ///      and derivatives of proper motions for 7- and 9-parameter
    ///      solutions.
    u12,
    /// Upper-triangular weight matrix element 13
    ///
    /// The upper-triangular weight matrix U is related to the
    ///      covariance matrix C by
    ///          C-1 = ∼U U    (∼U represents transposed U)
    ///      The elements Ui forming the upper triangular matrix are stored as
    ///          ±                         -+
    ///          |  (1)  (2)  (4)  (7)  (11) |
    ///          |   0   (3)  (5)  (8)  (12) |
    ///          |   0    0   (6)  (9)  (13) |
    ///          |   0    0    0  (10)  (14) |
    ///          |   0    0    0    0   (15) |
    ///          ±                         -+
    ///      on the astrometric parameters RA, Dec, plx, pmRA, pmDE,
    ///      and derivatives of proper motions for 7- and 9-parameter
    ///      solutions.
    u13,
    /// Upper-triangular weight matrix element 14
    ///
    /// The upper-triangular weight matrix U is related to the
    ///      covariance matrix C by
    ///          C-1 = ∼U U    (∼U represents transposed U)
    ///      The elements Ui forming the upper triangular matrix are stored as
    ///          ±                         -+
    ///          |  (1)  (2)  (4)  (7)  (11) |
    ///          |   0   (3)  (5)  (8)  (12) |
    ///          |   0    0   (6)  (9)  (13) |
    ///          |   0    0    0  (10)  (14) |
    ///          |   0    0    0    0   (15) |
    ///          ±                         -+
    ///      on the astrometric parameters RA, Dec, plx, pmRA, pmDE,
    ///      and derivatives of proper motions for 7- and 9-parameter
    ///      solutions.
    u14,
    /// Upper-triangular weight matrix element 15
    ///
    /// The upper-triangular weight matrix U is related to the
    ///      covariance matrix C by
    ///          C-1 = ∼U U    (∼U represents transposed U)
    ///      The elements Ui forming the upper triangular matrix are stored as
    ///          ±                         -+
    ///          |  (1)  (2)  (4)  (7)  (11) |
    ///          |   0   (3)  (5)  (8)  (12) |
    ///          |   0    0   (6)  (9)  (13) |
    ///          |   0    0    0  (10)  (14) |
    ///          |   0    0    0    0   (15) |
    ///          ±                         -+
    ///      on the astrometric parameters RA, Dec, plx, pmRA, pmDE,
    ///      and derivatives of proper motions for 7- and 9-parameter
    ///      solutions.
    u15,
    /// Hipparcos magnitude
    hp_mag,
    /// Colour index
    b_v,
    /// V-I colour index
    v_i,
    /// Error on mean Hpmag
    e_hp_mag,
    /// Formal error on colour index
    e_b_v,
    /// Scatter of Hpmag
    s_hp,
    /// [0,2] Reference to variability annex
    va,
}

impl Column for Col {}

#[cfg(test)]
/// Collects all the known columns in the hipparcos_newreduction table.
pub fn collect_known(map: &mut std::collections::HashMap<String, Vec<String>>) {
    let mut col_strings = Vec::new();
    col_strings.push(Col::hip.to_string());
    col_strings.push(Col::ic.to_string());
    col_strings.push(Col::ra.to_string());
    col_strings.push(Col::dec.to_string());
    col_strings.push(Col::ra_rad.to_string());
    col_strings.push(Col::de_rad.to_string());
    col_strings.push(Col::plx.to_string());
    col_strings.push(Col::pm_ra.to_string());
    col_strings.push(Col::pm_de.to_string());
    col_strings.push(Col::e_ra_rad.to_string());
    col_strings.push(Col::e_de_rad.to_string());
    col_strings.push(Col::e_plx.to_string());
    col_strings.push(Col::e_pm_ra.to_string());
    col_strings.push(Col::e_pm_de.to_string());
    col_strings.push(Col::f1.to_string());
    col_strings.push(Col::f2.to_string());
    col_strings.push(Col::nc.to_string());
    col_strings.push(Col::ntr.to_string());
    col_strings.push(Col::u3.to_string());
    col_strings.push(Col::u4.to_string());
    col_strings.push(Col::u5.to_string());
    col_strings.push(Col::u6.to_string());
    col_strings.push(Col::u7.to_string());
    col_strings.push(Col::u8.to_string());
    col_strings.push(Col::u9.to_string());
    col_strings.push(Col::sn.to_string());
    col_strings.push(Col::so.to_string());
    col_strings.push(Col::var.to_string());
    col_strings.push(Col::u1.to_string());
    col_strings.push(Col::u2.to_string());
    col_strings.push(Col::u10.to_string());
    col_strings.push(Col::u11.to_string());
    col_strings.push(Col::u12.to_string());
    col_strings.push(Col::u13.to_string());
    col_strings.push(Col::u14.to_string());
    col_strings.push(Col::u15.to_string());
    col_strings.push(Col::hp_mag.to_string());
    col_strings.push(Col::b_v.to_string());
    col_strings.push(Col::v_i.to_string());
    col_strings.push(Col::e_hp_mag.to_string());
    col_strings.push(Col::e_b_v.to_string());
    col_strings.push(Col::s_hp.to_string());
    col_strings.push(Col::va.to_string());
    map.insert(hipparcos_newreduction.string(), col_strings);
}