This file is indexed.

/usr/include/astrometry/2mass.h is in astrometry.net 0.46-0ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
/*
  This file is part of the Astrometry.net suite.
  Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis.

  The Astrometry.net suite is free software; you can redistribute
  it and/or modify it under the terms of the GNU General Public License
  as published by the Free Software Foundation, version 2.

  The Astrometry.net suite is distributed in the hope that it will be
  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with the Astrometry.net suite ; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
*/

#ifndef TWOMASS_H
#define TWOMASS_H

#include <stdint.h>

#include "an-bool.h"

/**

   See:
   .    ftp://ftp.ipac.caltech.edu/pub/2mass/allsky/format_psc.html

*/
struct twomass_entry {
	// [degrees] - J2000 ICRS
	double ra;
	// [degrees] - J2000 ICRS
	double dec;

	// unique id of this object.
	unsigned int key;

	// [degrees] - one-sigma positional error ellipse: major axis
	float err_major;
	// [degrees] - one-sigma positional error ellipse: minor axis
	float err_minor;
	// [degrees] - rotation east of north of the major axis of the error ellipse
    float err_angle;

	// hhmmssss[+-]ddmmsss[ABC...]
	char designation[18];

	// is this in the northern hemisphere?
	// TRUE=northern, FALSE=southern.
	anbool northern_hemisphere;

	// [mag] - J magnitude
	float j_m;
	// [mag] - J corrected photometric uncertainty
	float j_cmsig;
	// [mag] - J total photometric uncertainty
	float j_msigcom;
	// J signal-to-noise
	float j_snr;

	// [mag] - H magnitude
	float h_m;
	// [mag] - H corrected photometric uncertainty
	float h_cmsig;
	// [mag] - H total photometric uncertainty
	float h_msigcom;
	// H signal-to-noise
	float h_snr;

	// [mag] - K magnitude
	float k_m;
	// [mag] - K corrected photometric uncertainty
	float k_cmsig;
	// [mag] - K total photometric uncertainty
	float k_msigcom;
	// K signal-to-noise
	float k_snr;

	// [code: twomass_quality_val] photometric quality flags
	char j_quality;
	char h_quality;
	char k_quality;

	// read flags: where did the data come from?
	uint8_t j_read_flag;
	uint8_t h_read_flag;
	uint8_t k_read_flag;

	// blend flags: how many source measurements were blended?
	uint8_t h_blend_flag;
	uint8_t j_blend_flag;
	uint8_t k_blend_flag;

	// [code: twomass_cc_val] contamination and confusion flags: object detection.
	char j_cc;
	char h_cc;
	char k_cc;

	// number of detections (M=seen, N=possible)
	uint8_t j_ndet_M;
	uint8_t j_ndet_N;
	uint8_t h_ndet_M;
	uint8_t h_ndet_N;
	uint8_t k_ndet_M;
	uint8_t k_ndet_N;

	// may be a foreground star superimposed on a galaxy.
	uint8_t galaxy_contam;

	// [degrees] - proximity to the nearest other source in the catalog.
	float proximity;
	// [degrees] - angle east of north to the nearest object
    float prox_angle;
	// key of the nearest neighbour.
	unsigned int prox_key;

	// day the observation run was started
	uint16_t date_year;
	uint8_t date_month;
	uint8_t date_day;

	// [days]: Julian date (+- 30 seconds) of the measurement.
	double jdate;

	// nightly scan number
	uint16_t scan;
	// may be a minor planet, comet, asteroid, etc.
	anbool minor_planet;

	// [degrees] - angle east of north to optical counterpart
    float phi_opt;

	// [degrees] - galactic longitude
	float glon;
	// [degrees] - galactic latitude
	float glat;

	// [degrees]
	float x_scan;

	// (null)
	float j_psfchi;
	// [mag] (null)
	float j_m_stdap;
	// [mag] (null)
	float j_msig_stdap;

	// (null)
	float h_psfchi;
	// [mag] (null)
	float h_m_stdap;
	// [mag] (null)
	float h_msig_stdap;

	// (null)
	float k_psfchi;
	// [mag] (null)
	float k_m_stdap;
	// [mag] (null)
	float k_msig_stdap;

	// [degrees] (null):
	float dist_opt;
	// [mag] (null)
	float b_m_opt;
	// [mag] (null)
	float vr_m_opt;

    // [degrees]
	float dist_edge_ns;
    // [degrees]
	float dist_edge_ew;
	// TRUE=north
	anbool dist_flag_ns;
	// TRUE=east
	anbool dist_flag_ew;

	uint8_t dup_src;
	anbool use_src;

    // [code: twomass_association_val]
    char association;

	uint8_t nopt_mchs;

	uint16_t coadd;

	unsigned int scan_key;

	// AKA ext_key (null)
	unsigned int xsc_key;

	unsigned int coadd_key;
};
typedef struct twomass_entry twomass_entry;

#define TWOMASS_NULL NAN

#define TWOMASS_KEY_NULL 0xffffff

enum twomass_association_val {
	TWOMASS_ASSOCIATION_NONE,
	TWOMASS_ASSOCIATION_TYCHO,
	TWOMASS_ASSOCIATION_USNOA2
};

enum twomass_quality_val {
	TWOMASS_QUALITY_NO_BRIGHTNESS,    // X flag
	TWOMASS_QUALITY_UPPER_LIMIT_MAG,  // U
	TWOMASS_QUALITY_NO_SIGMA,         // F
	TWOMASS_QUALITY_BAD_FIT,          // E
	TWOMASS_QUALITY_A,
	TWOMASS_QUALITY_B,
	TWOMASS_QUALITY_C,
	TWOMASS_QUALITY_D
};

enum twomass_cc_val {
	TWOMASS_CC_NONE,            // 0 flag
	TWOMASS_CC_PERSISTENCE,     // p flag
	TWOMASS_CC_CONFUSION,       // c
	TWOMASS_CC_DIFFRACTION,     // d
	TWOMASS_CC_STRIPE,          // s
	TWOMASS_CC_BANDMERGE        // b
};

int twomass_is_value_null(float val);

int twomass_parse_entry(twomass_entry* entry, const char* line);

int twomass_cc_flag(unsigned char val, unsigned char flag);

int twomass_quality_flag(unsigned char val, unsigned char flag);

int twomass_is_null_float(float f);

#endif