This file is indexed.

/usr/include/astrometry/xylist.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
/*
  This file is part of the Astrometry.net suite.
  Copyright 2006-2008 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 XYLIST_H
#define XYLIST_H

#include "starxy.h"
#include "fitstable.h"

#define AN_FILETYPE_XYLS "XYLS"

/**
 Writing:

 xylist_open_for_writing()
 xylist_write_primary_header()

 for (each extension) {
   // optionally:
   xylist_add_tagalong_column()

   xylist_write_header()
 
   // either:
   xylist_write_one_row() // repeatedly
   // or:
   xylist_write_field()

   // optionally:
   xylist_write_tagalong_column()

   xylist_fix_header()

   xylist_next_field()
 }

 xylist_fix_primary_header()
 xylist_close()



Reading:


 xylist_t* xyls = xylist_open("my.xyls");
 int nf = xylist_n_fields(xyls);
 starxy_t* xy = xylist_read_field(xyls, NULL);


 */

/*
  One table per field.
  One row per star.
*/
struct xylist_t {
	int parity;

    fitstable_t* table;

	char* antype; // Astrometry.net filetype string.

    const char* xname;
    const char* yname;
    const char* xunits;
    const char* yunits;
    tfits_type xtype;
    tfits_type ytype;

    anbool include_flux;
    anbool include_background;

    // When reading: total number of fields in this file.
    int nfields;
};
typedef struct xylist_t xylist_t;

xylist_t* xylist_open(const char* fn);

xylist_t* xylist_open_for_writing(const char* fn);

void xylist_set_antype(xylist_t* ls, const char* type);

void xylist_set_xname(xylist_t* ls, const char* name);
void xylist_set_yname(xylist_t* ls, const char* name);
void xylist_set_xtype(xylist_t* ls, tfits_type type);
void xylist_set_ytype(xylist_t* ls, tfits_type type);
void xylist_set_xunits(xylist_t* ls, const char* units);
void xylist_set_yunits(xylist_t* ls, const char* units);

void xylist_set_include_flux(xylist_t* ls, anbool inc);
void xylist_set_include_background(xylist_t* ls, anbool inc);


// when writing.
// Returns the column number of the added column; use this number
// in the call to xylist_write_tagalong_column.
int xylist_add_tagalong_column(xylist_t* ls, tfits_type c_type,
                               int arraysize, tfits_type fits_type,
                               const char* name, const char* units);
int xylist_write_tagalong_column(xylist_t* ls, int colnum,
                                 int offset, int N,
                                 void* data, int datastride);

// when reading.
// Returns the tagged-along column names.
// If 'lst' is non-NULL, the names will be added to it; otherwise a new
// sl* will be allocated and returned.
sl* xylist_get_tagalong_column_names(xylist_t* ls, sl* lst);

void* xylist_read_tagalong_column(xylist_t* ls, const char* colname,
                                  tfits_type c_type);

int xylist_write_primary_header(xylist_t* ls);

int xylist_fix_primary_header(xylist_t* ls);

int xylist_next_field(xylist_t* ls);

//int xylist_start_field(xylist_t* ls);

int xylist_open_field(xylist_t* ls, int i);

int xylist_write_header(xylist_t* ls);

int xylist_write_field(xylist_t* ls, starxy_t* fld);

int xylist_write_one_row(xylist_t* ls, starxy_t* fld, int row);

int xylist_write_one_row_data(xylist_t* ls, double x, double y, double flux, double bg);

// (input starxy_t* is optional; if not given, a new one is allocated and returned.)
starxy_t* xylist_read_field(xylist_t* ls, starxy_t* fld);

starxy_t* xylist_read_field_num(xylist_t* ls, int ext, starxy_t* fld);

int xylist_fix_header(xylist_t* ls);

int xylist_close(xylist_t* ls);

qfits_header* xylist_get_primary_header(xylist_t* ls);

qfits_header* xylist_get_header(xylist_t* ls);

int xylist_get_imagew(xylist_t* ls);
int xylist_get_imageh(xylist_t* ls);

int xylist_n_fields(xylist_t* ls);

// Is the given filename an xylist?
anbool xylist_is_file_xylist(const char* fn, const char* xcolumn, const char* ycolumn,
                           char** reason);

#endif