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
// This code is generated by generate_code.py, do not modify it manually.
//! This module contains all the known columns in the oa_neuron_information table.
use crate::traits::{Column, Table};
/// This is the table hosting the content of a Self-Organized Map calculated from a dataset composed by outliers by the Apsis module OA. Each entry corresponds to parameters estimated for one particular neuron of the map. The prototype BP/RP spectrum for a particular neuron is available in another table: {\tt OaNeuronXpSpectra}. See Section~\ref{ssec:cu8par_apsis_oa} for further details.
#[allow(non_camel_case_types)]
pub struct oa_neuron_information;
impl Table for oa_neuron_information {
fn string(&self) -> String {
"oa_neuron_information".to_string()
}
}
/// The columns in the oa_neuron_information table.
#[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, strum::Display)]
pub enum Col {
/// Solution Identifier
solution_id,
/// Self-Organized Map identifier
som_id,
/// Neuron identifier
neuron_id,
/// Row index of the neuron in the Self-Organised Map lattice
neuron_row_index,
/// Column index of the neuron in the Self-Organised Map lattice
neuron_column_index,
/// Number of sources populating the neuron
hits,
/// Astronomical class estimated for the neuron
class_label,
/// Identifier of the Gaia source that minimizes the classification distance to the neuron
centroid_id,
/// Squared Euclidean distance between the centroid XP spectrum and the neuron XP prototype
centroid_distance,
/// Squared Euclidean distance between the reference XP template and the neuron XP prototype
template_distance,
/// Mean $G$ value for the sources that belong to the neuron
g_mag_mean,
/// Standard deviation of $G$ values for the sources that belong to the neuron
g_mag_std_dev,
/// Minimum $G$ value for the sources that belong to the neuron
g_mag_min,
/// Maximum $G$ value for the sources that belong to the neuron
g_mag_max,
/// Mean $G_{\rm BP}$ value for the sources that belong to the neuron
bp_mag_mean,
/// Standard deviation of $G_{\rm BP}$ values for the sources that belong to the neuron
bp_mag_std_dev,
/// Minimum value of $G_{\rm BP}$ for the sources that belong to the neuron
bp_mag_min,
/// Maximum value of $G_{\rm BP}$ for the sources that belong to the neuron
bp_mag_max,
/// Mean $G_{\rm RP}$ value for the sources that belong to the neuron neuron
rp_mag_mean,
/// Standard deviation of $G_{\rm RP}$ values for the sources that belong to the neuron
rp_mag_std_dev,
/// Minimum value of $G_{\rm RP}$ for the sources that belong to the neuron
rp_mag_min,
/// Maximum value of $G_{\rm RP}$ for the sources that belong to the neuron
rp_mag_max,
/// Mean value of the proper motion in right ascension for the sources that belong to the neuron
pm_ra_mean,
/// Standard deviation of the proper motion in right ascension for the sources that belong to the neuron
pm_ra_std_dev,
/// Minimum value of the proper motion in right ascension for the sources that belong to the neuron
pm_ra_min,
/// Maximum value of the proper motion in right ascension for the sources that belong to the neuron
pm_ra_max,
/// Mean value of the proper motion in declination for the sources that belong to the neuron
pm_dec_mean,
/// Standard deviation of the proper motion in declination for the sources that belong to the neuron
pm_dec_std_dev,
/// Minimum value of the proper motion in declination for the sources that belong to the neuron
pm_dec_min,
/// Maximum value of the proper motion in declination for the sources that belong to the neuron
pm_dec_max,
/// Mean parallax value for the sources that belong to the neuron
parallax_mean,
/// Standard deviation of the parallax values for the sources that belong to the neuron
parallax_std_dev,
/// Minimum parallax value for the sources that belong to the neuron
parallax_min,
/// Maximum parallax value for the sources that belong to the neuron
parallax_max,
/// Mean galactic latitude for the sources that belong to the neuron
gal_latitude_mean,
/// Standard deviation of the galactic latitude values for the sources that belong to the neuron
gal_latitude_std_dev,
/// Minimum galactic latitude for the sources that belong to the neuron
gal_latitude_min,
/// Maximum galactic latitude for the sources that belong to the neuron
gal_latitude_max,
/// Mean value of the squared Euclidean distance between each of the XP sources in the neuron and the neuron prototype
intra_neuron_distance_mean,
/// Standard deviation of the squared Euclidean distance between each of the XP sources in the neuron and the neuron prototype
intra_neuron_distance_std_dev,
/// Minimum squared Euclidean distance between each of the XP sources in the neuron and the neuron prototype
intra_neuron_distance_min,
/// Maximum squared Euclidean distance between each of the XP sources in the neuron and the neuron prototype
intra_neuron_distance_max,
/// Mean value of the squared Euclidean distance between the neuron XP prototype and the XP prototypes of its immediate neighbours
inter_neuron_distance_mean,
/// Standard deviation of the squared Euclidean distance between the neuron XP prototype and the XP prototypes of its immediate neighbours
inter_neuron_distance_std_dev,
/// Minimum value of the squared Euclidean distance between the neuron XP prototype and the XP prototypes of its immediate neighbours
inter_neuron_distance_min,
/// Maximum value of the squared Euclidean distance between the neuron XP prototype and the XP prototypes of its immediate neighbours
inter_neuron_distance_max,
/// Name of the template used to describe the neuron
template_name,
/// 25th percentile value for the intra-neuron distance distribution
distance_percentile25,
/// 50th percentile value for the intra-neuron distance distribution
distance_percentile50,
/// 68th percentile value for the intra-neuron distance distribution
///
distance_percentile68,
/// 75th percentile value for the intra-neuron distance distribution
///
distance_percentile75,
/// 95th percentile value for the intra-neuron distance distribution
///
distance_percentile95,
/// Full Width at Half Maximum value for the intra-neuron distance distribution
distance_fwhm,
/// Skewness value for the intra-neuron distance distribution
distance_skew,
/// Kurtosis value for the intra-neuron distance distribution
distance_kurtosis,
/// Inter-Quartile Range value for the intra-neuron distance distribution
distance_i_q_r,
/// Normalized FWHM value for the intra-neuron distance distribution
distance_fwhm_norm,
/// Quality category assigned to the neuron, where 0 corresponds to the most homogeneous neurons and 6 to the most heterogeneous ones
quality_category,
/// Mean value of the number of BP transits for the sources that belong to the neuron
bp_transits_mean,
/// Standard deviation of the number of BP transits for the sources that belong to the neuron
bp_transits_std_dev,
/// Minimum value of the number of BP transits for the sources that belong to the neuron
///
bp_transits_min,
/// Maximum value of the number of BP transits for the sources that belong to the neuron
bp_transits_max,
/// Mean value of the number of RP transits for the sources that belong to the neuron
///
rp_transits_mean,
/// Standard deviation of the number of RP transits for the sources that belong to the neuron
rp_transits_std_dev,
/// Minimum value of the number of RP transits for the sources that belong to the neuron
rp_transits_min,
/// Maximum value of the number of RP transits for the sources that belong to the neuron
rp_transits_max,
/// Mean value of the renormalised unit weight error for the sources that belong to the neuron
ruwe_mean,
/// Standard deviation of the renormalised unit weight error for the sources that belong to the neuron
ruwe_std_dev,
/// Minimum value of the renormalised unit weight error for the sources that belong to the neuron
ruwe_min,
/// Maximum value of the renormalised unit weight error for the sources that belong to the neuron
///
ruwe_max,
/// Mean value of the BP/RP flux excess for the sources that belong to the neuron
bprp_mean_flux_excess_mean,
/// Standard deviation of the BP/RP flux excess for the sources that belong to the neuron
bprp_mean_flux_excess_std_dev,
/// Minimum value of the BP/RP flux excess for the sources that belong to the neuron
bprp_mean_flux_excess_min,
/// Maximum value of the BP/RP flux excess for the sources that belong to the neuron
bprp_mean_flux_excess_max,
/// Mean value of the $G_{\rm BP}-G_{\rm RP}$ colour for the sources that belong to the neuron
bprp_colour_mean,
/// Standard deviation of the $G_{\rm BP}-G_{\rm RP}$ colour for the sources that belong to the neuron
bprp_colour_std_dev,
/// Minimum value of the $G_{\rm BP}-G_{\rm RP}$ colour for the sources that belong to the neuron
bprp_colour_min,
/// Maximum value of the $G_{\rm BP}-G_{\rm RP}$ colour for the sources that belong to the neuron
bprp_colour_max,
}
impl Column for Col {}
#[cfg(test)]
/// Collects all the known columns in the oa_neuron_information table.
pub fn collect_known(map: &mut std::collections::HashMap<String, Vec<String>>) {
let mut col_strings = Vec::new();
col_strings.push(Col::solution_id.to_string());
col_strings.push(Col::som_id.to_string());
col_strings.push(Col::neuron_id.to_string());
col_strings.push(Col::neuron_row_index.to_string());
col_strings.push(Col::neuron_column_index.to_string());
col_strings.push(Col::hits.to_string());
col_strings.push(Col::class_label.to_string());
col_strings.push(Col::centroid_id.to_string());
col_strings.push(Col::centroid_distance.to_string());
col_strings.push(Col::template_distance.to_string());
col_strings.push(Col::g_mag_mean.to_string());
col_strings.push(Col::g_mag_std_dev.to_string());
col_strings.push(Col::g_mag_min.to_string());
col_strings.push(Col::g_mag_max.to_string());
col_strings.push(Col::bp_mag_mean.to_string());
col_strings.push(Col::bp_mag_std_dev.to_string());
col_strings.push(Col::bp_mag_min.to_string());
col_strings.push(Col::bp_mag_max.to_string());
col_strings.push(Col::rp_mag_mean.to_string());
col_strings.push(Col::rp_mag_std_dev.to_string());
col_strings.push(Col::rp_mag_min.to_string());
col_strings.push(Col::rp_mag_max.to_string());
col_strings.push(Col::pm_ra_mean.to_string());
col_strings.push(Col::pm_ra_std_dev.to_string());
col_strings.push(Col::pm_ra_min.to_string());
col_strings.push(Col::pm_ra_max.to_string());
col_strings.push(Col::pm_dec_mean.to_string());
col_strings.push(Col::pm_dec_std_dev.to_string());
col_strings.push(Col::pm_dec_min.to_string());
col_strings.push(Col::pm_dec_max.to_string());
col_strings.push(Col::parallax_mean.to_string());
col_strings.push(Col::parallax_std_dev.to_string());
col_strings.push(Col::parallax_min.to_string());
col_strings.push(Col::parallax_max.to_string());
col_strings.push(Col::gal_latitude_mean.to_string());
col_strings.push(Col::gal_latitude_std_dev.to_string());
col_strings.push(Col::gal_latitude_min.to_string());
col_strings.push(Col::gal_latitude_max.to_string());
col_strings.push(Col::intra_neuron_distance_mean.to_string());
col_strings.push(Col::intra_neuron_distance_std_dev.to_string());
col_strings.push(Col::intra_neuron_distance_min.to_string());
col_strings.push(Col::intra_neuron_distance_max.to_string());
col_strings.push(Col::inter_neuron_distance_mean.to_string());
col_strings.push(Col::inter_neuron_distance_std_dev.to_string());
col_strings.push(Col::inter_neuron_distance_min.to_string());
col_strings.push(Col::inter_neuron_distance_max.to_string());
col_strings.push(Col::template_name.to_string());
col_strings.push(Col::distance_percentile25.to_string());
col_strings.push(Col::distance_percentile50.to_string());
col_strings.push(Col::distance_percentile68.to_string());
col_strings.push(Col::distance_percentile75.to_string());
col_strings.push(Col::distance_percentile95.to_string());
col_strings.push(Col::distance_fwhm.to_string());
col_strings.push(Col::distance_skew.to_string());
col_strings.push(Col::distance_kurtosis.to_string());
col_strings.push(Col::distance_i_q_r.to_string());
col_strings.push(Col::distance_fwhm_norm.to_string());
col_strings.push(Col::quality_category.to_string());
col_strings.push(Col::bp_transits_mean.to_string());
col_strings.push(Col::bp_transits_std_dev.to_string());
col_strings.push(Col::bp_transits_min.to_string());
col_strings.push(Col::bp_transits_max.to_string());
col_strings.push(Col::rp_transits_mean.to_string());
col_strings.push(Col::rp_transits_std_dev.to_string());
col_strings.push(Col::rp_transits_min.to_string());
col_strings.push(Col::rp_transits_max.to_string());
col_strings.push(Col::ruwe_mean.to_string());
col_strings.push(Col::ruwe_std_dev.to_string());
col_strings.push(Col::ruwe_min.to_string());
col_strings.push(Col::ruwe_max.to_string());
col_strings.push(Col::bprp_mean_flux_excess_mean.to_string());
col_strings.push(Col::bprp_mean_flux_excess_std_dev.to_string());
col_strings.push(Col::bprp_mean_flux_excess_min.to_string());
col_strings.push(Col::bprp_mean_flux_excess_max.to_string());
col_strings.push(Col::bprp_colour_mean.to_string());
col_strings.push(Col::bprp_colour_std_dev.to_string());
col_strings.push(Col::bprp_colour_min.to_string());
col_strings.push(Col::bprp_colour_max.to_string());
map.insert(oa_neuron_information.string(), col_strings);
}