/usr/include/astrometry/catalog.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 | /*
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 CATUTILS_H
#define CATUTILS_H
#include <sys/types.h>
#include <stdint.h>
#include "fitsbin.h"
#include "bl.h"
#include "an-bool.h"
#define AN_FILETYPE_CATALOG "OBJS"
struct catalog {
int numstars;
int healpix;
int hpnside;
double* stars;
// optional table: star magnitudes and mag errors.
float* mag;
float* mag_err;
// optional tables: positional error ellipses, proper motions
float* sigma_radec; // sigma_ra, sigma_dec
float* proper_motion; // motion_ra, motion_dec
float* sigma_pm; // sigma_motion_ra, sigma_motion_dec
// optional table: star IDs
uint64_t* starids;
// while writing: storage for the extra fields.
fl* maglist;
fl* magerrlist;
fl* siglist;
fl* pmlist;
fl* sigpmlist;
bl* idlist;
fitsbin_t* fb;
};
typedef struct catalog catalog;
catalog* catalog_open(char* catfn);
catalog* catalog_open_for_writing(char* catfn);
double* catalog_get_star(catalog* cat, int sid);
double* catalog_get_base(catalog* cat);
int catalog_write_star(catalog* cat, double* star);
int catalog_close(catalog* cat);
//void catalog_compute_radecminmax(catalog* cat);
int catalog_write_header(catalog* cat);
qfits_header* catalog_get_header(catalog* cat);
int catalog_fix_header(catalog* cat);
anbool catalog_has_mag(const catalog* cat);
void catalog_add_mag(catalog* cat, float mag);
void catalog_add_mag_err(catalog* cat, float magerr);
void catalog_add_sigmas(catalog* cat, float sra, float sdec);
void catalog_add_pms(catalog* cat, float sra, float sdec);
void catalog_add_sigma_pms(catalog* cat, float sra, float sdec);
void catalog_add_id(catalog* cat, uint64_t id);
/*
This should be called after writing all the star positions and
calling catalog_fix_header(). It appends the data in "cat->mags"
to the file as an extra FITS table.
*/
int catalog_write_mags(catalog* cat);
int catalog_write_mag_errs(catalog* cat);
int catalog_write_sigmas(catalog* cat);
int catalog_write_pms(catalog* cat);
int catalog_write_sigma_pms(catalog* cat);
int catalog_write_ids(catalog* cat);
#endif
|