fitsfile.h | fitsfile.h | |||
---|---|---|---|---|
/*** File fitsfile.h FITS and IRAF file access subroutines | /*** File fitsfile.h FITS and IRAF file access subroutines | |||
*** June 11, 2007 | *** September 25, 2009 | |||
*** By Doug Mink, dmink@cfa.harvard.edu | *** By Doug Mink, dmink@cfa.harvard.edu | |||
*** Harvard-Smithsonian Center for Astrophysics | *** Harvard-Smithsonian Center for Astrophysics | |||
*** Copyright (C) 1996-2007 | *** Copyright (C) 1996-2009 | |||
*** Smithsonian Astrophysical Observatory, Cambridge, MA, USA | *** Smithsonian Astrophysical Observatory, Cambridge, MA, USA | |||
This library is free software; you can redistribute it and/or | This library is free software; you can redistribute it and/or | |||
modify it under the terms of the GNU Lesser General Public | modify it under the terms of the GNU Lesser General Public | |||
License as published by the Free Software Foundation; either | License as published by the Free Software Foundation; either | |||
version 2 of the License, or (at your option) any later version. | version 2 of the License, or (at your option) any later version. | |||
This library is distributed in the hope that it will be useful, | This library is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
skipping to change at line 46 | skipping to change at line 46 | |||
#define FITSBLOCK 2880 | #define FITSBLOCK 2880 | |||
/* FITS table keyword structure */ | /* FITS table keyword structure */ | |||
struct Keyword { | struct Keyword { | |||
char kname[10]; /* Keyword for table entry */ | char kname[10]; /* Keyword for table entry */ | |||
int lname; /* Length of keyword name */ | int lname; /* Length of keyword name */ | |||
int kn; /* Index of entry on line */ | int kn; /* Index of entry on line */ | |||
int kf; /* Index in line of first character of entry */ | int kf; /* Index in line of first character of entry */ | |||
int kl; /* Length of entry value */ | int kl; /* Length of entry value */ | |||
char kform[8]; /* Format for this value */ | ||||
}; | }; | |||
/* Structure for access to tokens within a string */ | /* Structure for access to tokens within a string */ | |||
#define MAXTOKENS 1000 /* Maximum number of tokens to parse */ | #define MAXTOKENS 1000 /* Maximum number of tokens to parse */ | |||
#define MAXWHITE 20 /* Maximum number of different whitespace character s */ | #define MAXWHITE 20 /* Maximum number of different whitespace character s */ | |||
struct Tokens { | struct Tokens { | |||
char *line; /* Line which has been parsed */ | char *line; /* Line which has been parsed */ | |||
int lline; /* Number of characters in line */ | int lline; /* Number of characters in line */ | |||
int ntok; /* Number of tokens on line */ | int ntok; /* Number of tokens on line */ | |||
int nwhite; /* Number of whitespace characters */ | int nwhite; /* Number of whitespace characters */ | |||
skipping to change at line 180 | skipping to change at line 181 | |||
* as double */ | * as double */ | |||
char *entry, /* Row or entry from table */ | char *entry, /* Row or entry from table */ | |||
struct Keyword *kw); /* Table column information from FITS header */ | struct Keyword *kw); /* Table column information from FITS header */ | |||
int ftgetc( /* Extract column for keyword from FITS tabl e line | int ftgetc( /* Extract column for keyword from FITS tabl e line | |||
* as char string */ | * as char string */ | |||
char *entry, /* Row or entry from table */ | char *entry, /* Row or entry from table */ | |||
struct Keyword *kw, /* Table column information from FITS header */ | struct Keyword *kw, /* Table column information from FITS header */ | |||
char *string, /* Returned string */ | char *string, /* Returned string */ | |||
int maxchar); /* Maximum number of characters in returned string * / | int maxchar); /* Maximum number of characters in returned string * / | |||
void moveb ( /* Copy nbytes bytes from source+offs to dest+offd */ | ||||
char *source, /* Pointer to source */ | ||||
char *dest, /* Pointer to destination */ | ||||
int nbytes, /* Number of bytes to move */ | ||||
int offs, /* Offset in bytes in source from which to start cop | ||||
ying */ | ||||
int offd); /* Offset in bytes in destination to which to start | ||||
copying */ | ||||
/* IRAF file access subroutines in imhfile.c */ | /* IRAF file access subroutines in imhfile.c */ | |||
char *irafrhead( /* Read IRAF .imh header file and translate to FITS header */ | char *irafrhead( /* Read IRAF .imh header file and translate to FITS header */ | |||
char *filename, /* Name of IRAF header file */ | char *filename, /* Name of IRAF header file */ | |||
int *lihead); /* Length of IRAF image header in bytes (returned) * / | int *lihead); /* Length of IRAF image header in bytes (returned) * / | |||
char *irafrimage( /* Read IRAF image pixels (call after irafrhead) */ | char *irafrimage( /* Read IRAF image pixels (call after irafrhead) */ | |||
char *fitsheader); /* FITS image header (filled) */ | char *fitsheader); /* FITS image header (filled) */ | |||
int irafwhead( /* Write IRAF .imh header file */ | int irafwhead( /* Write IRAF .imh header file */ | |||
char *hdrname, /* Name of IRAF header file */ | char *hdrname, /* Name of IRAF header file */ | |||
int lhead, /* Length of IRAF header */ | int lhead, /* Length of IRAF header */ | |||
skipping to change at line 436 | skipping to change at line 444 | |||
int getoken( /* Get specified token from tokenized string */ | int getoken( /* Get specified token from tokenized string */ | |||
struct Tokens *tokens, /* Token structure returned */ | struct Tokens *tokens, /* Token structure returned */ | |||
int itok, /* token sequence number of token | int itok, /* token sequence number of token | |||
* if <0, get whole string after token -itok | * if <0, get whole string after token -itok | |||
* if =0, get whole string */ | * if =0, get whole string */ | |||
char *token, /* token (returned) */ | char *token, /* token (returned) */ | |||
int maxchars); /* Maximum length of token */ | int maxchars); /* Maximum length of token */ | |||
/* Subroutines for translating dates and times in dateutil.c */ | /* Subroutines for translating dates and times in dateutil.c */ | |||
/* Subroutines to convert between floating point and vigesimal angles * | ||||
/ | ||||
void ang2hr ( /* Fractional degrees to hours as hh:mm:ss.ss */ | ||||
double angle, /* Angle in fractional degrees */ | ||||
int lstr, /* Maximum number of characters in string */ | ||||
char *string); /* Character string (hh:mm:ss.ss returned) */ | ||||
void ang2deg ( /* Fractional degrees to degrees as dd:mm:ss.ss */ | ||||
double angle, /* Angle in fractional degrees */ | ||||
int lstr, /* Maximum number of characters in string */ | ||||
char *string); /* Character string (dd:mm:ss.ss returned) */ | ||||
double deg2ang ( /* Degrees as dd:mm:ss.ss to fractional degrees */ | ||||
char *angle); /* Angle as dd:mm:ss.ss */ | ||||
double hr2ang ( /* Hours as hh:mm:ss.ss to fractional degrees */ | ||||
char *angle); /* Angle in sexigesimal hours (hh:mm:ss.sss) */ | ||||
/* Subroutines to convert from year and day of year */ | /* Subroutines to convert from year and day of year */ | |||
void doy2dt( /* Year and day of year to yyyy.mmdd hh.mmss */ | void doy2dt( /* Year and day of year to yyyy.mmdd hh.mmss */ | |||
int year, /* Year */ | int year, /* Year */ | |||
double doy, /* Day of year with fraction */ | double doy, /* Day of year with fraction */ | |||
double *date, /* Date as yyyy.mmdd (returned) */ | double *date, /* Date as yyyy.mmdd (returned) */ | |||
double *time); /* Time as hh.mmssxxxx (returned) */ | double *time); /* Time as hh.mmssxxxx (returned) */ | |||
double doy2ep( /* Year and day of year to fractional year (epoch) * / | double doy2ep( /* Year and day of year to fractional year (epoch) * / | |||
int year, /* Year */ | int year, /* Year */ | |||
double doy); /* Day of year with fraction */ | double doy); /* Day of year with fraction */ | |||
skipping to change at line 961 | skipping to change at line 984 | |||
/* FITS table file access subroutines in fitsfile.c */ | /* FITS table file access subroutines in fitsfile.c */ | |||
extern int fitsrtopen(); | extern int fitsrtopen(); | |||
extern int fitsrthead(); | extern int fitsrthead(); | |||
extern void fitsrtlset(); | extern void fitsrtlset(); | |||
extern int fitsrtline(); | extern int fitsrtline(); | |||
extern short ftgeti2(); | extern short ftgeti2(); | |||
extern int ftgeti4(); | extern int ftgeti4(); | |||
extern float ftgetr4(); | extern float ftgetr4(); | |||
extern double ftgetr8(); | extern double ftgetr8(); | |||
extern int ftgetc(); | extern int ftgetc(); | |||
extern void moveb(); /* Copy nbytes bytes from source+offs to dest+offd * / | ||||
/* IRAF file access subroutines in imhfile.c */ | /* IRAF file access subroutines in imhfile.c */ | |||
extern char *irafrhead(); | extern char *irafrhead(); | |||
extern char *irafrimage(); | extern char *irafrimage(); | |||
extern int irafwhead(); | extern int irafwhead(); | |||
extern int irafwimage(); | extern int irafwimage(); | |||
extern int isiraf(); | extern int isiraf(); | |||
extern char *iraf2fits(); | extern char *iraf2fits(); | |||
extern char *fits2iraf(); | extern char *fits2iraf(); | |||
skipping to change at line 1014 | skipping to change at line 1038 | |||
extern int isgif(); | extern int isgif(); | |||
extern int first_token(); | extern int first_token(); | |||
/* Subroutines for access to tokens within a string from fileutil.c */ | /* Subroutines for access to tokens within a string from fileutil.c */ | |||
int setoken(); /* Tokenize a string for easy decoding */ | int setoken(); /* Tokenize a string for easy decoding */ | |||
int nextoken(); /* Get next token from tokenized string */ | int nextoken(); /* Get next token from tokenized string */ | |||
int getoken(); /* Get specified token from tokenized string */ | int getoken(); /* Get specified token from tokenized string */ | |||
/* Subroutines for translating dates and times in dateutil.c */ | /* Subroutines for translating dates and times in dateutil.c */ | |||
void ang2hr(); /* Fractional degrees to hours as hh:mm:ss.ss */ | ||||
void ang2deg(); /* Fractional degrees to degrees as dd:mm:ss | ||||
.ss */ | ||||
double deg2ang(); /* Degrees as dd:mm:ss.ss to fractional degrees */ | ||||
double hr2ang(); /* Hours as hh:mm:ss.ss to fractional degrees */ | ||||
void doy2dt(); /* year and day of year to yyyy.mmdd hh.mmss */ | void doy2dt(); /* year and day of year to yyyy.mmdd hh.mmss */ | |||
double doy2ep(); /* year and day of year to fractional year (epoch) */ | double doy2ep(); /* year and day of year to fractional year (epoch) */ | |||
double doy2epb(); /* year and day of year to Besselian epoch */ | double doy2epb(); /* year and day of year to Besselian epoch */ | |||
double doy2epj(); /* year and day of year to Julian epoch */ | double doy2epj(); /* year and day of year to Julian epoch */ | |||
char *doy2fd(); /* year and day of year to FITS date */ | char *doy2fd(); /* year and day of year to FITS date */ | |||
double doy2jd(); /* year and day of year to Julian date */ | double doy2jd(); /* year and day of year to Julian date */ | |||
double doy2mjd(); /* year and day of year to modified Julian date */ | double doy2mjd(); /* year and day of year to modified Julian date */ | |||
double doy2ts(); /* year and day of year to seconds since 1950.0 */ | double doy2ts(); /* year and day of year to seconds since 1950.0 */ | |||
int doy2tsi(); /* year and day of year to IRAF seconds since 1980-01-01 */ | int doy2tsi(); /* year and day of year to IRAF seconds since 1980-01-01 */ | |||
skipping to change at line 1250 | skipping to change at line 1279 | |||
* Oct 14 2005 Add tsd2fd(), tsd2dt(), epj2ep(), epb2ep(), tsi2dt() | * Oct 14 2005 Add tsd2fd(), tsd2dt(), epj2ep(), epb2ep(), tsi2dt() | |||
* | * | |||
* Feb 23 2006 Add fitsrtail() to read appended FITS header | * Feb 23 2006 Add fitsrtail() to read appended FITS header | |||
* Feb 23 2006 Add istiff(), isjpeg(), isgif() to check TIFF, JPEG, GIF fil es | * Feb 23 2006 Add istiff(), isjpeg(), isgif() to check TIFF, JPEG, GIF fil es | |||
* Sep 6 2006 Add heliocentric time conversions | * Sep 6 2006 Add heliocentric time conversions | |||
* Oct 5 2006 Add local sidereal time conversions | * Oct 5 2006 Add local sidereal time conversions | |||
* | * | |||
* Jan 9 2007 Add ANSI prototypes | * Jan 9 2007 Add ANSI prototypes | |||
* Jan 11 2007 Add token subroutines from catutil.c/wcscat.h to fileutil.c | * Jan 11 2007 Add token subroutines from catutil.c/wcscat.h to fileutil.c | |||
* Jun 11 2007 Add minvec() subroutine in imio.c | * Jun 11 2007 Add minvec() subroutine in imio.c | |||
* Nov 28 2007 Add kform format to FITS table keyword data structure | ||||
* | ||||
* Sep 8 2008 Add ag2hr(), ang2deg(), deg2ang(), and hr2ang() | ||||
* | ||||
* Sep 25 2009 Add moveb() | ||||
*/ | */ | |||
End of changes. 8 change blocks. | ||||
2 lines changed or deleted | 40 lines changed or added | |||
wcscat.h | wcscat.h | |||
---|---|---|---|---|
/*** File libwcs/wcscat.h | /*** File libwcs/wcscat.h | |||
*** July 18, 2007 | *** November 2, 2009 | |||
*** By Doug Mink, dmink@cfa.harvard.edu | *** By Doug Mink, dmink@cfa.harvard.edu | |||
*** Copyright (C) 1998-2007 | *** Copyright (C) 1998-2009 | |||
*** Smithsonian Astrophysical Observatory, Cambridge, MA, USA | *** Smithsonian Astrophysical Observatory, Cambridge, MA, USA | |||
This library is free software; you can redistribute it and/or | This library is free software; you can redistribute it and/or | |||
modify it under the terms of the GNU Lesser General Public | modify it under the terms of the GNU Lesser General Public | |||
License as published by the Free Software Foundation; either | License as published by the Free Software Foundation; either | |||
version 2 of the License, or (at your option) any later version. | version 2 of the License, or (at your option) any later version. | |||
This library is distributed in the hope that it will be useful, | This library is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
skipping to change at line 31 | skipping to change at line 31 | |||
Correspondence concerning WCSTools should be addressed as follows: | Correspondence concerning WCSTools should be addressed as follows: | |||
Internet email: dmink@cfa.harvard.edu | Internet email: dmink@cfa.harvard.edu | |||
Postal address: Doug Mink | Postal address: Doug Mink | |||
Smithsonian Astrophysical Observatory | Smithsonian Astrophysical Observatory | |||
60 Garden St. | 60 Garden St. | |||
Cambridge, MA 02138 USA | Cambridge, MA 02138 USA | |||
*/ | */ | |||
#ifndef _wcscat_h_ | #ifndef _wcscat_h_ | |||
#define _wcscat_h_ | #define _wcscat_h_ | |||
#define MAXNMAG 20 | ||||
/* Data structure for SAO TDC ASCII and binary star catalog entries */ | /* Data structure for SAO TDC ASCII and binary star catalog entries */ | |||
struct Star { | struct Star { | |||
float rdum; | float rdum; | |||
float xno; /* Catalog number */ | float xno; /* Catalog number */ | |||
double ra; /* Right Ascension (degrees) */ | double ra; /* Right Ascension (degrees) */ | |||
double dec; /* Declination (degrees) */ | double dec; /* Declination (degrees) */ | |||
double errra; /* Right Ascension (degrees) */ | ||||
double errdec; /* Declination (degrees) */ | ||||
char isp[24]; /* Spectral type or other 2-char identifier */ | char isp[24]; /* Spectral type or other 2-char identifier */ | |||
short mag[11]; /* Up to 10 Magnitudes * 100 */ | short mag[MAXNMAG+1]; /* Up to MAXNMAG Magnitudes * 100 */ | |||
double rapm; /* RA proper motion (degrees per year) */ | double rapm; /* RA proper motion (degrees per year) */ | |||
double decpm; /* Dec proper motion (degrees per year) */ | double decpm; /* Dec proper motion (degrees per year) */ | |||
double xmag[11]; /* Up to 10 Magnitudes */ | double errpmr; /* RA proper motion error (degrees per year) */ | |||
double errpmd; /* Dec proper motion error (degrees per year) */ | ||||
double xmag[MAXNMAG+1]; /* Up to MAXNMAG Magnitudes */ | ||||
double num; /* Actual star number */ | double num; /* Actual star number */ | |||
int coorsys; /* Coordinate system (WCS_J2000, WCS_B1950,...) */ | int coorsys; /* Coordinate system (WCS_J2000, WCS_B1950,...) */ | |||
double equinox; /* Equinox of coordinate system as fractional year * / | double equinox; /* Equinox of coordinate system as fractional year * / | |||
double epoch; /* Epoch of position as fractional year */ | double epoch; /* Epoch of position as fractional year */ | |||
double parallax; /* Parallax in arcseconds */ | double parallax; /* Parallax in arcseconds */ | |||
double pxerror; /* Parallax error in arcseconds */ | double pxerror; /* Parallax error in arcseconds */ | |||
double radvel; /* Radial velocity in km/sec, positive away */ | double radvel; /* Radial velocity in km/sec, positive away */ | |||
double dist; /* Distance from search center in arcseconds */ | double dist; /* Distance from search center in arcseconds */ | |||
double size; /* Semi-major axis in arcseconds */ | double size; /* Semi-major axis in arcseconds */ | |||
int nimage; /* Number of images for catalog position */ | ||||
int ncat; /* Number of catalogs for catalog proper motion */ | ||||
char *entry; /* Line copied from input catalog */ | char *entry; /* Line copied from input catalog */ | |||
char objname[80]; /* Object name */ | char objname[80]; /* Object name */ | |||
int peak; /* Peak flux per pixel in star image */ | int peak; /* Peak flux per pixel in star image */ | |||
}; | }; | |||
/* Catalog proper motion units */ | /* Catalog proper motion units */ | |||
#define PM_MASYR 1 /* milliarcseconds per year */ | #define PM_MASYR 1 /* milliarcseconds per year */ | |||
#define PM_ARCSECYR 2 /* arcseconds per year */ | #define PM_ARCSECYR 2 /* arcseconds per year */ | |||
#define PM_DEGYR 3 /* degrees per year */ | #define PM_DEGYR 3 /* degrees per year */ | |||
#define PM_RADYR 4 /* radians per year */ | #define PM_RADYR 4 /* radians per year */ | |||
skipping to change at line 116 | skipping to change at line 123 | |||
int plate; /* 1 if plate or field number is present in catalog */ | int plate; /* 1 if plate or field number is present in catalog */ | |||
char *catbuff; /* Pointer to start of catalog */ | char *catbuff; /* Pointer to start of catalog */ | |||
char *catdata; /* Pointer to first entry in catalog */ | char *catdata; /* Pointer to first entry in catalog */ | |||
char *catline; /* Pointer to current entry in catalog */ | char *catline; /* Pointer to current entry in catalog */ | |||
char *catlast; /* Pointer to one past end of last entry in catalog */ | char *catlast; /* Pointer to one past end of last entry in catalog */ | |||
int istar; /* Number of current catalog entry */ | int istar; /* Number of current catalog entry */ | |||
struct TabTable *startab; /* Structure for tab table catalog */ | struct TabTable *startab; /* Structure for tab table catalog */ | |||
int entid; /* Entry number for ID */ | int entid; /* Entry number for ID */ | |||
int entra; /* Entry number for right ascension */ | int entra; /* Entry number for right ascension */ | |||
int entdec; /* Entry number for declination */ | int entdec; /* Entry number for declination */ | |||
int entmag[10]; /* Entry numbers for up to 10 magnitudes */ | int entmag[MAXNMAG+1]; /* Entry numbers for up to MAXNMAG magnitudes */ | |||
int entpeak; /* Entry number for peak counts */ | int entpeak; /* Entry number for peak counts */ | |||
int entepoch; /* Entry number for epoch of observation */ | int entepoch; /* Entry number for epoch of observation */ | |||
int entdate; /* Entry number for FITS-format date of observation */ | int entdate; /* Entry number for FITS-format date of observation */ | |||
int entname; /* Entry number for object name */ | int entname; /* Entry number for object name */ | |||
int entadd; /* Entry number for additional keyword */ | int entadd; /* Entry number for additional keyword */ | |||
int entrpm; /* Entry number for proper motion in right a scension */ | int entrpm; /* Entry number for proper motion in right a scension */ | |||
int entdpm; /* Entry number for proper motion in declina tion */ | int entdpm; /* Entry number for proper motion in declina tion */ | |||
int entpx; /* Entry number for parallax */ | int entpx; /* Entry number for parallax */ | |||
int entpxe; /* Entry number for parallax error */ | int entpxe; /* Entry number for parallax error */ | |||
int entrv; /* Entry number for radial velocity */ | int entrv; /* Entry number for radial velocity */ | |||
int enttype; /* Entry number for spectral type */ | int enttype; /* Entry number for spectral type */ | |||
int entsize; /* Entry number for size of object */ | int entsize; /* Entry number for size of object */ | |||
int rpmunit; /* Units for RA proper motion (PM_x) */ | int rpmunit; /* Units for RA proper motion (PM_x) */ | |||
int dpmunit; /* Units for DEC proper motion (PM_x) */ | int dpmunit; /* Units for DEC proper motion (PM_x) */ | |||
char *caturl; /* set if web search, else NULL */ | char *caturl; /* set if web search, else NULL */ | |||
char keyid[16]; /* Entry name for ID */ | char keyid[16]; /* Entry name for ID */ | |||
char keyra[16]; /* Entry name for right ascension */ | char keyra[16]; /* Entry name for right ascension */ | |||
char keydec[16]; /* Entry name for declination */ | char keydec[16]; /* Entry name for declination */ | |||
char keymag[10][16]; /* Entry name for up to 10 magnitudes */ | char keymag[MAXNMAG+1][16]; /* Entry name for up to MAXNMAG magnitudes */ | |||
char keyrpm[16]; /* Entry name for right ascension proper motion */ | char keyrpm[16]; /* Entry name for right ascension proper motion */ | |||
char keydpm[16]; /* Entry name for declination proper motion */ | char keydpm[16]; /* Entry name for declination proper motion */ | |||
char keypeak[16]; /* Entry name for integer code */ | char keypeak[16]; /* Entry name for integer code */ | |||
char keytype[16]; /* Entry name for spectral type */ | char keytype[16]; /* Entry name for spectral type */ | |||
char keyrv[16]; /* Entry name for radial velocity */ | char keyrv[16]; /* Entry name for radial velocity */ | |||
char keyadd[16]; /* Entry name for additional keyword */ | char keyadd[16]; /* Entry name for additional keyword */ | |||
char keyepoch[16]; /* Entry name for epoch */ | char keyepoch[16]; /* Entry name for epoch */ | |||
}; | }; | |||
/* Data structure for tab table files */ | /* Data structure for tab table files */ | |||
skipping to change at line 201 | skipping to change at line 208 | |||
#define UCAC1 22 /* USNO CCD Astrograph Catalog 1.0 */ | #define UCAC1 22 /* USNO CCD Astrograph Catalog 1.0 */ | |||
#define UCAC2 23 /* USNO CCD Astrograph Catalog 2.0 */ | #define UCAC2 23 /* USNO CCD Astrograph Catalog 2.0 */ | |||
#define TMIDR2 24 /* 2MASS IDR2 Point Source Catalog */ | #define TMIDR2 24 /* 2MASS IDR2 Point Source Catalog */ | |||
#define YB6 25 /* USNO YB6 Catalog */ | #define YB6 25 /* USNO YB6 Catalog */ | |||
#define SDSS 26 /* Sloan Digital Sky Survey Catalog */ | #define SDSS 26 /* Sloan Digital Sky Survey Catalog */ | |||
#define TMXSC 27 /* 2MASS Extended Source Catalog */ | #define TMXSC 27 /* 2MASS Extended Source Catalog */ | |||
#define TMPSCE 28 /* 2MASS Point Source Catalog with mag error s */ | #define TMPSCE 28 /* 2MASS Point Source Catalog with mag error s */ | |||
#define TYCHO2E 29 /* Tycho-2 Star Catalog with magnitu de errors */ | #define TYCHO2E 29 /* Tycho-2 Star Catalog with magnitu de errors */ | |||
#define SKY2K 30 /* SKY2000 Master Catalog */ | #define SKY2K 30 /* SKY2000 Master Catalog */ | |||
#define SKYBOT 31 /* SKYBOT Solar System Objects */ | #define SKYBOT 31 /* SKYBOT Solar System Objects */ | |||
#define UCAC3 32 /* USNO CCD Astrograph Catalog 3.0 (2009) */ | ||||
#define TABCAT -1 /* StarBase tab table catalog */ | #define TABCAT -1 /* StarBase tab table catalog */ | |||
#define BINCAT -2 /* TDC binary catalog */ | #define BINCAT -2 /* TDC binary catalog */ | |||
#define TXTCAT -3 /* TDC ASCII catalog */ | #define TXTCAT -3 /* TDC ASCII catalog */ | |||
#define WEBCAT -4 /* Tab catalog via the web */ | #define WEBCAT -4 /* Tab catalog via the web */ | |||
#define NUMCAT 31 /* Number of predefined catalogs */ | #define NUMCAT 31 /* Number of predefined catalogs */ | |||
#define EP_EP 1 /* Output epoch as fractional year */ | #define EP_EP 1 /* Output epoch as fractional year */ | |||
#define EP_JD 2 /* Output epoch as Julian Date */ | #define EP_JD 2 /* Output epoch as Julian Date */ | |||
#define EP_MJD 3 /* Ouput epoch as Modified Julian Date */ | #define EP_MJD 3 /* Ouput epoch as Modified Julian Date */ | |||
#define EP_FD 4 /* Output epoch in FITS format (yyyy-mm-dd) */ | #define EP_FD 4 /* Output epoch in FITS format (yyyy-mm-dd) */ | |||
skipping to change at line 426 | skipping to change at line 434 | |||
char **gobj, /* Array of object IDs (mixed letters and numbers) * / | char **gobj, /* Array of object IDs (mixed letters and numbers) * / | |||
double *gra, /* Array of right ascensions (returned) */ | double *gra, /* Array of right ascensions (returned) */ | |||
double *gdec, /* Array of declinations (returned) */ | double *gdec, /* Array of declinations (returned) */ | |||
double *gpra, /* Array of right ascension proper motions (returned ) */ | double *gpra, /* Array of right ascension proper motions (returned ) */ | |||
double *gpdec, /* Array of declination proper motions (returned) */ | double *gpdec, /* Array of declination proper motions (returned) */ | |||
double **gmag, /* 2-D array of magnitudes (returned) */ | double **gmag, /* 2-D array of magnitudes (returned) */ | |||
int *gtype, /* Array of object types (returned) */ | int *gtype, /* Array of object types (returned) */ | |||
int nlog); /* Verbose mode if >1, number of sources per log lin e */ | int nlog); /* Verbose mode if >1, number of sources per log lin e */ | |||
char *gsc2c2t( /* Convert GSC2 buffer from comma- to tab-separated */ | char *gsc2c2t( /* Convert GSC2 buffer from comma- to tab-separated */ | |||
char *csvbuff); /* Input comma-separated table */ | char *csvbuff); /* Input comma-separated table */ | |||
char *gsc2t2t( /* Clean up GSC2 tab-separated buffer */ | ||||
char *tsvbuff); /* Input tab-separated table */ | ||||
/* Subroutine to read SDSS catalog over the web */ | /* Subroutine to read SDSS catalog over the web */ | |||
int sdssread( /* Read sources by sky region from SDSS Catalog */ | int sdssread( /* Read sources by sky region from SDSS Catalog */ | |||
double cra, /* Search center J2000 right ascension in degrees */ | double cra, /* Search center J2000 right ascension in degrees */ | |||
double cdec, /* Search center J2000 declination in degrees */ | double cdec, /* Search center J2000 declination in degrees */ | |||
double dra, /* Search half width in right ascension in degrees * / | double dra, /* Search half width in right ascension in degrees * / | |||
double ddec, /* Search half-width in declination in degrees */ | double ddec, /* Search half-width in declination in degrees */ | |||
double drad, /* Limiting separation in degrees (ignore if 0) */ | double drad, /* Limiting separation in degrees (ignore if 0) */ | |||
double dradi, /* Inner edge of annulus in degrees (ignore if 0) */ | double dradi, /* Inner edge of annulus in degrees (ignore if 0) */ | |||
int distsort, /* 1 to sort stars by distance from center */ | int distsort, /* 1 to sort stars by distance from center */ | |||
skipping to change at line 1284 | skipping to change at line 1294 | |||
double eqr, /* Equinox of reference catalog in years */ | double eqr, /* Equinox of reference catalog in years */ | |||
double epc, /* Epoch of search coordinates in years */ | double epc, /* Epoch of search coordinates in years */ | |||
double epr, /* Epoch of reference catalog coordinates in years * / | double epr, /* Epoch of reference catalog coordinates in years * / | |||
double secmarg, /* Margin in arcsec/century to catch moving stars */ | double secmarg, /* Margin in arcsec/century to catch moving stars */ | |||
double *ramin, /* Lower right ascension limit in degrees (returned) */ | double *ramin, /* Lower right ascension limit in degrees (returned) */ | |||
double *ramax, /* Upper right ascension limit in degrees (returned) */ | double *ramax, /* Upper right ascension limit in degrees (returned) */ | |||
double *decmin, /* Lower declination limit in degrees (returned) */ | double *decmin, /* Lower declination limit in degrees (returned) */ | |||
double *decmax, /* Upper declination limit in degrees (returned) */ | double *decmax, /* Upper declination limit in degrees (returned) */ | |||
int *wrap, /* 1 if search passes through 0:00:00 RA */ | int *wrap, /* 1 if search passes through 0:00:00 RA */ | |||
int verbose); /* 1 to print limits, else 0 */ | int verbose); /* 1 to print limits, else 0 */ | |||
void movebuff ( /* Copy nbytes bytes from source+offs to dest+offd * | ||||
/ | ||||
char *source, /* Pointer to source */ | ||||
char *dest, /* Pointer to destination */ | ||||
int nbytes, /* Number of bytes to move */ | ||||
int offs, /* Offset in bytes in source from which to start cop | ||||
ying */ | ||||
int offd); /* Offset in bytes in destination to which to start | ||||
copying */ | ||||
/* Subroutines for dealing with ranges */ | /* Subroutines for dealing with ranges */ | |||
struct Range *RangeInit( /* Initialize range structure from string */ | struct Range *RangeInit( /* Initialize range structure from string */ | |||
char *string, /* String containing numbers separated by , and - */ | char *string, /* String containing numbers separated by , and - */ | |||
int ndef); /* Maximum allowable range value */ | int ndef); /* Maximum allowable range value */ | |||
int isrange( /* Return 1 if string is a range of numbers, else 0 */ | int isrange( /* Return 1 if string is a range of numbers, else 0 */ | |||
char *string); /* String which might be a range of numbers */ | char *string); /* String which might be a range of numbers */ | |||
void rstart( /* Restart range */ | void rstart( /* Restart range */ | |||
struct Range *range); /* Range structure */ | struct Range *range); /* Range structure */ | |||
int rgetn( /* Return number of values in all ranges */ | int rgetn( /* Return number of values in all ranges */ | |||
skipping to change at line 1377 | skipping to change at line 1393 | |||
/* Subroutines for extracting sources from HST Guide Star Catalog */ | /* Subroutines for extracting sources from HST Guide Star Catalog */ | |||
int gscread(); /* Read sources by sky region from HST Guide Star Ca talog */ | int gscread(); /* Read sources by sky region from HST Guide Star Ca talog */ | |||
int gscrnum(); /* Read sources by ID number from HST Guide Star Cat alog */ | int gscrnum(); /* Read sources by ID number from HST Guide Star Cat alog */ | |||
int gscbin(); /* Bin sources from HST Guide Star Catalog */ | int gscbin(); /* Bin sources from HST Guide Star Catalog */ | |||
void setgsclass(); /* Set GSC object class */ | void setgsclass(); /* Set GSC object class */ | |||
/* Subroutine to read GSC II catalog over the web (gsc2read.c) */ | /* Subroutine to read GSC II catalog over the web (gsc2read.c) */ | |||
int gsc2read(); /* Read sources by sky region from GSC II Ca talog */ | int gsc2read(); /* Read sources by sky region from GSC II Ca talog */ | |||
char *gsc2c2t(); /* Convert GSC2 buffer from comma- to tab-separated */ | char *gsc2c2t(); /* Convert GSC2 buffer from comma- to tab-separated */ | |||
char *gsc2t2t(); /* Clean up GSC2 tab-separated buffer */ | ||||
/* Subroutine to read SDSS catalog over the web (sdssread.c) */ | /* Subroutine to read SDSS catalog over the web (sdssread.c) */ | |||
int sdssread(); /* Read sources by sky region from SDSS Cata log */ | int sdssread(); /* Read sources by sky region from SDSS Cata log */ | |||
char *sdssc2t(); /* Convert SDSS buffer from comma- to tab-separated */ | char *sdssc2t(); /* Convert SDSS buffer from comma- to tab-separated */ | |||
/* Subroutines to read local copy of 2MASS Point Source Catalog (tmcread.c) */ | /* Subroutines to read local copy of 2MASS Point Source Catalog (tmcread.c) */ | |||
int tmcread(); /* Read sources by sky region from 2MASS Point Sourc e Catalog */ | int tmcread(); /* Read sources by sky region from 2MASS Point Sourc e Catalog */ | |||
int tmcrnum(); /* Read sources by ID number from 2MASS Point Source Catalog */ | int tmcrnum(); /* Read sources by ID number from 2MASS Point Source Catalog */ | |||
int tmcbin(); /* Bin sources from 2MASS Point Source Catalog */ | int tmcbin(); /* Bin sources from 2MASS Point Source Catalog */ | |||
skipping to change at line 1510 | skipping to change at line 1527 | |||
int StrNdec(); /* Return number of decimal places in numeric string */ | int StrNdec(); /* Return number of decimal places in numeric string */ | |||
void setdateform(); /* Set date format code */ | void setdateform(); /* Set date format code */ | |||
void setlimdeg(); /* Limit output in degrees (1) or hh:mm:ss dd:mm:ss (0) */ | void setlimdeg(); /* Limit output in degrees (1) or hh:mm:ss dd:mm:ss (0) */ | |||
char *DateString(); /* Convert epoch to output format */ | char *DateString(); /* Convert epoch to output format */ | |||
void SearchLim(); /* Compute limiting RA and Dec */ | void SearchLim(); /* Compute limiting RA and Dec */ | |||
void RefLim(); /* Compute limiting RA and Dec in new system */ | void RefLim(); /* Compute limiting RA and Dec in new system */ | |||
int ageti4(); /* Extract int value from keyword= value in string * / | int ageti4(); /* Extract int value from keyword= value in string * / | |||
int agetr8(); /* Extract double value from keyword= value in strin g */ | int agetr8(); /* Extract double value from keyword= value in strin g */ | |||
int agets(); /* Extract value from keyword= value in string */ | int agets(); /* Extract value from keyword= value in string */ | |||
void bv2sp(); /* Approximate main sequence spectral type from B - V */ | void bv2sp(); /* Approximate main sequence spectral type from B - V */ | |||
void moveb(); /* Copy nbytes bytes from source+offs to dest+offd * / | ||||
/* Subroutines for dealing with ranges */ | /* Subroutines for dealing with ranges */ | |||
struct Range *RangeInit(); /* Initialize range structure from string */ | struct Range *RangeInit(); /* Initialize range structure from string */ | |||
int isrange(); /* Return 1 if string is a range of numbers, else 0 */ | int isrange(); /* Return 1 if string is a range of numbers, else 0 */ | |||
int rgetn(); /* Return number of values in all ranges */ | int rgetn(); /* Return number of values in all ranges */ | |||
int rgeti4(); /* Return next number in range as integer */ | int rgeti4(); /* Return next number in range as integer */ | |||
double rgetr8(); /* Return next number in range as double */ | double rgetr8(); /* Return next number in range as double */ | |||
void rstart(); /* Restart range */ | void rstart(); /* Restart range */ | |||
/* Subroutines for VOTable output */ | /* Subroutines for VOTable output */ | |||
skipping to change at line 1665 | skipping to change at line 1683 | |||
* Apr 12 2006 Add SORT_ID for scat to sort catalog entries by ID number | * Apr 12 2006 Add SORT_ID for scat to sort catalog entries by ID number | |||
* Jun 20 2006 Add IDSortStars() | * Jun 20 2006 Add IDSortStars() | |||
* | * | |||
* Jan 10 2006 Add ANSI C function prototypes | * Jan 10 2006 Add ANSI C function prototypes | |||
* Jan 11 2007 Move token access subroutines to fileutil.c/fitsfile.h | * Jan 11 2007 Move token access subroutines to fileutil.c/fitsfile.h | |||
* Mar 13 2007 Add gsc2c2t() to convert CSV GSC2 buffer to TSV table | * Mar 13 2007 Add gsc2c2t() to convert CSV GSC2 buffer to TSV table | |||
* Mar 13 2007 Add gobj object name to gsc2read() | * Mar 13 2007 Add gobj object name to gsc2read() | |||
* Jul 5 2007 Add SKYBOT=31 to catalog list | * Jul 5 2007 Add SKYBOT=31 to catalog list | |||
* Jul 13 2007 Add skybotread() and skybot2tab() | * Jul 13 2007 Add skybotread() and skybot2tab() | |||
* Jul 18 2007 Add tabccol() and PM_ARCSECHR for SkyBot | * Jul 18 2007 Add tabccol() and PM_ARCSECHR for SkyBot | |||
* Nov 28 2007 Add moveb() which used to be local to binread() | ||||
* | ||||
* Oct 24 2008 Add gsct2t() to clean up tab-separated table from STScI | ||||
CASB | ||||
* | ||||
* Sep 25 2009 Rename moveb() to movebuff() | ||||
* Sep 25 2009 Add UCAC3 as catalog code 32 | ||||
* Oct 30 2009 Add position and proper motion error to star structure | ||||
* Nov 2 2009 Add numbers of images and catalogs to star structure | ||||
* Nov 3 2009 Parameterize as MAXNMAG the maximum number of magnitudes | ||||
*/ | */ | |||
End of changes. 15 change blocks. | ||||
6 lines changed or deleted | 37 lines changed or added | |||