| 1 | # include <ohana.h>
|
|---|
| 2 | # include <gfitsio.h>
|
|---|
| 3 | # include <autocode.h>
|
|---|
| 4 |
|
|---|
| 5 | # ifndef DVO_H
|
|---|
| 6 | # define DVO_H
|
|---|
| 7 |
|
|---|
| 8 | /*
|
|---|
| 9 | # define ELIXIR 1
|
|---|
| 10 | # define PANSTARRS 0
|
|---|
| 11 | # define LONEOS 0
|
|---|
| 12 | */
|
|---|
| 13 |
|
|---|
| 14 | /*** named data values (convert all to enums?) ***/
|
|---|
| 15 |
|
|---|
| 16 | /* DVO table modes */
|
|---|
| 17 | typedef enum {DVO_MODE_UNDEF, DVO_MODE_RAW, DVO_MODE_MEF, DVO_MODE_SPLIT, DVO_MODE_MYSQL} DVOTableMode;
|
|---|
| 18 |
|
|---|
| 19 | /* DVO table formats */
|
|---|
| 20 | typedef enum {DVO_FORMAT_UNDEF,
|
|---|
| 21 | DVO_FORMAT_INTERNAL,
|
|---|
| 22 | DVO_FORMAT_ELIXIR,
|
|---|
| 23 | DVO_FORMAT_LONEOS,
|
|---|
| 24 | DVO_FORMAT_PANSTARRS,
|
|---|
| 25 | DVO_FORMAT_PMTEST,
|
|---|
| 26 | DVO_FORMAT_PANSTARRS_DEV_0,
|
|---|
| 27 | DVO_FORMAT_PANSTARRS_DEV_1
|
|---|
| 28 | } DVOTableFormat;
|
|---|
| 29 |
|
|---|
| 30 | /* image data modes in RegImage */
|
|---|
| 31 | typedef enum {T_UNDEF = -1, T_NONE, T_OBJECT, T_DARK, T_BIAS, T_FLAT, T_MASK, T_FRINGE, T_SCATTER, T_MODES, T_FRINGEPTS, T_ANY, N_TYPE} ElixirDetrendTypes;
|
|---|
| 32 | typedef enum {M_UNDEF = -1, M_NONE, M_MEF, M_SPLIT, M_SINGLE, M_CUBE, M_SLICE, M_MODES, N_MODE} ElixirDetrendModes;
|
|---|
| 33 |
|
|---|
| 34 | typedef enum {
|
|---|
| 35 | PROJ_NONE, // undefined
|
|---|
| 36 | PROJ_ZEA, // zenithal
|
|---|
| 37 | PROJ_ZPL, // zenithal
|
|---|
| 38 | PROJ_ARC, // zenithal
|
|---|
| 39 | PROJ_STG, // zenithal
|
|---|
| 40 | PROJ_SIN, // zenithal
|
|---|
| 41 | PROJ_TAN, // zenithal
|
|---|
| 42 | PROJ_DIS, // zenithal (TAN + polyterms)
|
|---|
| 43 | PROJ_LIN, // cartesian
|
|---|
| 44 | PROJ_PLY, // cartesian
|
|---|
| 45 | PROJ_WRP, // cartesian
|
|---|
| 46 | PROJ_AIT, // pseudocyl
|
|---|
| 47 | PROJ_GLS, // pseudocyl
|
|---|
| 48 | PROJ_PAR, // pseudocyl
|
|---|
| 49 | } OhanaProjection;
|
|---|
| 50 |
|
|---|
| 51 | typedef enum {
|
|---|
| 52 | PROJ_MODE_NONE,
|
|---|
| 53 | PROJ_MODE_CARTESIAN,
|
|---|
| 54 | PROJ_MODE_ZENITHAL,
|
|---|
| 55 | PROJ_MODE_PSEUDOCYL,
|
|---|
| 56 | } OhanaProjectionMode;
|
|---|
| 57 |
|
|---|
| 58 | /* RegImage.flag values */
|
|---|
| 59 | # define IMREG_DIST 0x01 /* image distributed, only imregister-3.0 */
|
|---|
| 60 |
|
|---|
| 61 | /* catalog values to be loaded */
|
|---|
| 62 | # define LOAD_AVES 0x01
|
|---|
| 63 | # define LOAD_MEAS 0x02
|
|---|
| 64 | # define LOAD_MISS 0x04
|
|---|
| 65 | # define LOAD_SECF 0x08
|
|---|
| 66 | # define LOAD_MEAS_META 0x10
|
|---|
| 67 |
|
|---|
| 68 | /* invalid mag value */
|
|---|
| 69 | # define NO_MAG 0x7fff
|
|---|
| 70 | # define NO_ERR 0xff
|
|---|
| 71 |
|
|---|
| 72 | /* photometry code types */
|
|---|
| 73 | // # define PHOT_PRI 0x01
|
|---|
| 74 | # define PHOT_SEC 0x02
|
|---|
| 75 | # define PHOT_DEP 0x03
|
|---|
| 76 | # define PHOT_REF 0x04
|
|---|
| 77 | # define PHOT_ALT 0x05 /* never stored, only for look-ups */
|
|---|
| 78 | # define PHOT_MAG 0x06 /* generic magnitude; never stored */
|
|---|
| 79 |
|
|---|
| 80 | /* Image.code values. these are codes to note bad images */
|
|---|
| 81 | # define ID_IMAGE_NEW 0x0000 /* no nrphot attempted */
|
|---|
| 82 | # define ID_IMAGE_NOCAL 0x0001 /* used within nrphot to mean "don't apply fit" */
|
|---|
| 83 | # define ID_IMAGE_POOR 0x0002 /* relphot says image is bad */
|
|---|
| 84 | # define ID_IMAGE_SKIP 0x0004 /* external information image is bad */
|
|---|
| 85 | # define ID_IMAGE_FEW 0x0008 /* currently too few measurements for good value */
|
|---|
| 86 |
|
|---|
| 87 | /* Measure.flags values */
|
|---|
| 88 | # define ID_MEAS_NOCAL 0x0001
|
|---|
| 89 | # define ID_MEAS_POOR 0x0002
|
|---|
| 90 | # define ID_MEAS_SKIP 0x0004
|
|---|
| 91 | # define ID_MEAS_AREA 0x0008
|
|---|
| 92 | # define BLEND_IMAGE 0x0100
|
|---|
| 93 | # define BLEND_CATALOG 0x0200
|
|---|
| 94 | # define BLEND_IMAGE_NEIGHBOR 0x1000
|
|---|
| 95 | # define ID_MEAS_TRAIL 0x2000
|
|---|
| 96 | # define ID_MEAS_GHOST 0x4000
|
|---|
| 97 |
|
|---|
| 98 | /* some subtle distinctions between the blend flags:
|
|---|
| 99 | BLEND_IMAGE: the star on an image is matched with more
|
|---|
| 100 | than one star in the catalog (image has worse seeing than catalog)
|
|---|
| 101 | BLEND_CATALOG: the star in the catalog is matched with more
|
|---|
| 102 | than one star on the image (image has better seeing than catalog)
|
|---|
| 103 | CALIBRATED: relative photometry has been performed on this measurement
|
|---|
| 104 | BLEND_IMAGE_NEIGHBOR: the star on an image is matched with more
|
|---|
| 105 | than one star in the catalog, but not in the same catalog file.
|
|---|
| 106 | */
|
|---|
| 107 |
|
|---|
| 108 | /* Average.code values */
|
|---|
| 109 | # define ID_STAR_FEW 0x0001 /* used within relphot: skip star */
|
|---|
| 110 | # define ID_STAR_POOR 0x0002 /* used within relphot: skip star */
|
|---|
| 111 | # define ID_PROPER 0x0400 /* star with large proper motion */
|
|---|
| 112 | # define ID_TRANSIENT 0x1000 /* is this mutually exclusive with USNO? */
|
|---|
| 113 | # define ID_VARIABLE 0x2000 /* not currently set? */
|
|---|
| 114 | # define ID_ASTEROID 0x2000 /* identified with an asteroid */
|
|---|
| 115 | # define ID_BAD_OBJECT 0x4000 /* if all measurements are bad, set this bit */
|
|---|
| 116 | # define ID_MOVING 0x8000
|
|---|
| 117 | # define ID_ROCK 0xa000 /* 0x8000 + 0x2000 */
|
|---|
| 118 | # define ID_GHOST 0xc001 /* 0x8000 + 0x4000 + 0x0001 */
|
|---|
| 119 | # define ID_TRAIL 0xc002 /* 0x8000 + 0x4000 + 0x0002 */
|
|---|
| 120 | # define ID_BLEED 0xc003 /* 0x8000 + 0x4000 + 0x0003 */
|
|---|
| 121 | # define ID_COSMIC 0xc004 /* 0x8000 + 0x4000 + 0x0004 */
|
|---|
| 122 |
|
|---|
| 123 | /*** general dvo structures (internal use only / not IO) ***/
|
|---|
| 124 |
|
|---|
| 125 | /* FITS DB structure */
|
|---|
| 126 | typedef struct {
|
|---|
| 127 | FILE *f;
|
|---|
| 128 | char *filename;
|
|---|
| 129 | int dbstate;
|
|---|
| 130 | int lockstate;
|
|---|
| 131 | double timeout;
|
|---|
| 132 | Header header;
|
|---|
| 133 | Matrix matrix;
|
|---|
| 134 | Header theader;
|
|---|
| 135 | FTable ftable;
|
|---|
| 136 | VTable vtable;
|
|---|
| 137 | int mode; /* what data storage mode is used for disk file? */
|
|---|
| 138 | int format; /* what data format is used for disk file? */
|
|---|
| 139 | int virtual; /* is table in ftable or vtable? */
|
|---|
| 140 | int swapped; /* is table in internal byte-order? */
|
|---|
| 141 | } FITS_DB;
|
|---|
| 142 |
|
|---|
| 143 | /* the basic HST GSC layout corresponds to a depth of 3 */
|
|---|
| 144 | # define SKY_DEPTH_HST 3
|
|---|
| 145 |
|
|---|
| 146 | /* SkyRegion : better implementation than GSCRegion */
|
|---|
| 147 | typedef struct {
|
|---|
| 148 | int Nregions;
|
|---|
| 149 | char **filename;
|
|---|
| 150 | SkyRegion *regions;
|
|---|
| 151 | } SkyTable;
|
|---|
| 152 |
|
|---|
| 153 | typedef struct {
|
|---|
| 154 | int Nregions;
|
|---|
| 155 | int ownElements; /* does this list own filename, regions? */
|
|---|
| 156 | char **filename;
|
|---|
| 157 | SkyRegion **regions;
|
|---|
| 158 | } SkyList;
|
|---|
| 159 |
|
|---|
| 160 | # if (0)
|
|---|
| 161 | /* structure for data on a catalog region */
|
|---|
| 162 | typedef struct {
|
|---|
| 163 | char filename[256];
|
|---|
| 164 | double DEC[2], RA[2];
|
|---|
| 165 | } GSCRegion;
|
|---|
| 166 | # endif
|
|---|
| 167 |
|
|---|
| 168 | typedef struct {
|
|---|
| 169 | int Ncode; // number of photcodes
|
|---|
| 170 | int Nsecfilt; // number of average magnitudes
|
|---|
| 171 | int hashcode[0x10000]; // index from photcode value to sequence
|
|---|
| 172 | int hashNsec[0x10000]; // index from photcode value to Nsec seq
|
|---|
| 173 | int codeNsec[0x10000]; // index from Nsec seq to photcode value
|
|---|
| 174 | PhotCode *code;
|
|---|
| 175 | } PhotCodeData;
|
|---|
| 176 |
|
|---|
| 177 | /* a catalog contains this data */
|
|---|
| 178 | typedef struct Catalog {
|
|---|
| 179 | char *filename; /* catalog file */
|
|---|
| 180 | FILE *f; /* file descriptor */
|
|---|
| 181 | Header header;
|
|---|
| 182 |
|
|---|
| 183 | /* data in the catalog file */
|
|---|
| 184 | Average *average;
|
|---|
| 185 | Measure *measure;
|
|---|
| 186 | Missing *missing;
|
|---|
| 187 | SecFilt *secfilt;
|
|---|
| 188 | int Naverage, Nmeasure, Nmissing, Nsecfilt; /* current number of each component */
|
|---|
| 189 | int Nave_disk, Nmeas_disk, Nmiss_disk; /* number of component on disk */
|
|---|
| 190 | int Nmeas_off; /* dist seq of first loaded data value */
|
|---|
| 191 | /* note the different counting for Nsecfilt */
|
|---|
| 192 |
|
|---|
| 193 | /* pointers to split data files */
|
|---|
| 194 | struct Catalog *measure_catalog; /* measure catalog data (split) */
|
|---|
| 195 | struct Catalog *missing_catalog; /* missing catalog data (split) */
|
|---|
| 196 | struct Catalog *secfilt_catalog; /* secfilt catalog data (split) */
|
|---|
| 197 |
|
|---|
| 198 | /* extra catalog information */
|
|---|
| 199 | int lockmode;
|
|---|
| 200 | int catmode; /* storage mode (raw, mef, split, mysql) */
|
|---|
| 201 | int catformat; /* storage format (elixir, panstarrs, etc) */
|
|---|
| 202 | int catflags; /* choices to be loaded */
|
|---|
| 203 | int sorted; /* is measure table average-sorted? */
|
|---|
| 204 |
|
|---|
| 205 | /* pointers for data manipulation */
|
|---|
| 206 | int *found;
|
|---|
| 207 | int *image;
|
|---|
| 208 | int *mosaic;
|
|---|
| 209 | float *X;
|
|---|
| 210 | float *Y;
|
|---|
| 211 |
|
|---|
| 212 | } Catalog;
|
|---|
| 213 |
|
|---|
| 214 | /*** prototypes ***/
|
|---|
| 215 |
|
|---|
| 216 | /* in gfits_db.c */
|
|---|
| 217 | int gfits_db_init PROTO((FITS_DB *db));
|
|---|
| 218 | int gfits_db_create PROTO((FITS_DB *db));
|
|---|
| 219 | int gfits_db_lock PROTO((FITS_DB *db, char *filename));
|
|---|
| 220 | int gfits_db_load PROTO((FITS_DB *db));
|
|---|
| 221 | int gfits_db_load_segment PROTO((FITS_DB *db, int start, int Nrows));
|
|---|
| 222 | int gfits_db_save PROTO((FITS_DB *db));
|
|---|
| 223 | int gfits_db_update PROTO((FITS_DB *db));
|
|---|
| 224 | int gfits_db_close PROTO((FITS_DB *db));
|
|---|
| 225 | int gfits_db_free PROTO((FITS_DB *db));
|
|---|
| 226 |
|
|---|
| 227 | /* in coords.c, using libautocode/def/coords.d */
|
|---|
| 228 | int XY_to_LM (double *L, double *M, double x, double y, Coords *coords);
|
|---|
| 229 | int LM_to_XY (double *x, double *y, double L, double M, Coords *coords);
|
|---|
| 230 | int RD_to_LM (double *L, double *M, double ra, double dec, Coords *coords);
|
|---|
| 231 | int LM_to_RD (double *ra, double *dec, double L, double M, Coords *coords);
|
|---|
| 232 | int XY_to_RD (double *ra, double *dec, double x, double y, Coords *coords);
|
|---|
| 233 | int RD_to_XY (double *x, double *y, double ra, double dec, Coords *coords);
|
|---|
| 234 | int fXY_to_RD (float *ra, float *dec, double x, double y, Coords *coords);
|
|---|
| 235 | int fRD_to_XY (float *x, float *y, double ra, double dec, Coords *coords);
|
|---|
| 236 | int GetCoords (Coords *coords, Header *header);
|
|---|
| 237 | int PutCoords (Coords *coords, Header *header);
|
|---|
| 238 | void RegisterMosaic (Coords *coords);
|
|---|
| 239 | void coords_precess (double *ra, double *dec, double in_epoch, double out_epoch);
|
|---|
| 240 | OhanaProjection GetProjection (char *ctype);
|
|---|
| 241 | int SetProjection (char *ctype, OhanaProjection proj);
|
|---|
| 242 | OhanaProjectionMode GetProjectionMode (OhanaProjection proj);
|
|---|
| 243 |
|
|---|
| 244 | char *libdvo_version ();
|
|---|
| 245 |
|
|---|
| 246 | int GetRegisteredMosaic ();
|
|---|
| 247 | int FindMosaicForImage (Image *images, int Nimages, int entry);
|
|---|
| 248 | int FindMosaicForImage_TableSearch (Image *images, int Nimages, int entry);
|
|---|
| 249 | int FindMosaicForImage_MatchSearch (Image *images, int Nimages, int entry);
|
|---|
| 250 | int BuildChipMatch (Image *images, int Nimages);
|
|---|
| 251 | void SetImageCorners (double *X, double *Y, Image *image);
|
|---|
| 252 |
|
|---|
| 253 | short int putMi (double value);
|
|---|
| 254 | double getMi (short int value);
|
|---|
| 255 | void returnMcal (Image *image, double *c);
|
|---|
| 256 | void assignMcal (Image *image, double *c, int order);
|
|---|
| 257 | double applyMcal (Image *image, double x, double y);
|
|---|
| 258 | double findscatter (double *X, double *Y, double *M, double *dM, int N, double *c, int order);
|
|---|
| 259 |
|
|---|
| 260 | PhotCode *GetPhotcodebyName (char *name);
|
|---|
| 261 | PhotCode *GetPhotcodeEquivbyName (char *name);
|
|---|
| 262 | PhotCode *GetPhotcodebyCode (int code);
|
|---|
| 263 | PhotCode *GetPhotcodebyNsec (int Nsec);
|
|---|
| 264 | PhotCode *GetPhotcodeEquivbyCode (int code);
|
|---|
| 265 | char *GetPhotcodeNamebyCode (int code);
|
|---|
| 266 |
|
|---|
| 267 | float PhotInst (Measure *measure);
|
|---|
| 268 | float PhotCat (Measure *measure);
|
|---|
| 269 | float PhotSys (Measure *measure, Average *average, SecFilt *secfilt);
|
|---|
| 270 | float PhotRel (Measure *measure, Average *average, SecFilt *secfilt);
|
|---|
| 271 | float PhotCal (Measure *thisone, Average *average, SecFilt *secfilt, Measure *measure, PhotCode *code);
|
|---|
| 272 | float PhotAve (PhotCode *code, Average *average, SecFilt *secfilt);
|
|---|
| 273 | float PhotRef (PhotCode *code, Average *average, SecFilt *secfilt, Measure *measure);
|
|---|
| 274 | float PhotXm (PhotCode *code, Average *average, SecFilt *secfilt);
|
|---|
| 275 | float PhotdM (PhotCode *code, Average *average, SecFilt *secfilt);
|
|---|
| 276 |
|
|---|
| 277 | float PhotColorForCode (Average *average, SecFilt *secfilt, Measure *measure, PhotCode *code);
|
|---|
| 278 | int PhotColor (Average *average, SecFilt *secfilt, Measure *measure, int c1, int c2, double *color);
|
|---|
| 279 |
|
|---|
| 280 | PhotCodeData *GetPhotcodeTable ();
|
|---|
| 281 |
|
|---|
| 282 | int LoadPhotcodes (char *catdir_file, char *master_file);
|
|---|
| 283 | int LoadPhotcodesText (char *filename);
|
|---|
| 284 | int LoadPhotcodesFITS (char *filename);
|
|---|
| 285 | int SavePhotcodesText (char *filename);
|
|---|
| 286 | int SavePhotcodesFITS (char *filename);
|
|---|
| 287 |
|
|---|
| 288 | void PrintPhotcodeNamebyCode (FILE *f, char *format, int code);
|
|---|
| 289 |
|
|---|
| 290 | int GetPhotcodeCodebyName (char *name);
|
|---|
| 291 | int GetPhotcodeEquivCodebyName (char *name);
|
|---|
| 292 | int GetPhotcodeEquivCodebyCode (int code);
|
|---|
| 293 | int GetPhotcodeNsec (int code);
|
|---|
| 294 | int GetPhotcodeNsecfilt ();
|
|---|
| 295 | void SetZeroPoint (double ZP);
|
|---|
| 296 | int *GetPhotcodeEquivList (int code, int *nlist);
|
|---|
| 297 | void ParseColorTerms (char *terms, float *X, int *N);
|
|---|
| 298 |
|
|---|
| 299 | int get_image_type (char *name);
|
|---|
| 300 | char *get_type_name (int type);
|
|---|
| 301 | int get_image_mode (char *name);
|
|---|
| 302 | char *get_mode_name (int mode);
|
|---|
| 303 |
|
|---|
| 304 | /* these functions refer to the DVO structures defined in the includes above
|
|---|
| 305 | * they are being replaced with autocode entries (drop when totally autocoded)
|
|---|
| 306 | */
|
|---|
| 307 |
|
|---|
| 308 | int Fread (void *ptr, int size, int nitems, FILE *f, char *type);
|
|---|
| 309 | int Fwrite (void *ptr, int size, int nitems, FILE *f, char *type);
|
|---|
| 310 | int ByteSwap (char *ptr, int size, int nitems, char *type);
|
|---|
| 311 | int ConvertStruct (char *buffer, int size, int Nbytes, char *type);
|
|---|
| 312 |
|
|---|
| 313 | /** dvo_catalog APIs */
|
|---|
| 314 | void dvo_catalog_init (Catalog *catalog, int complete);
|
|---|
| 315 | void dvo_catalog_create (SkyRegion *region, Catalog *catalog);
|
|---|
| 316 | void dvo_catalog_free (Catalog *catalog);
|
|---|
| 317 | int dvo_catalog_check (Catalog *catalog, int Nsecfilt, int extend);
|
|---|
| 318 | int dvo_catalog_lock (Catalog *catalog, int lockmode);
|
|---|
| 319 | int dvo_catalog_unlock (Catalog *catalog);
|
|---|
| 320 | int dvo_catalog_load (Catalog *catalog, int VERBOSE);
|
|---|
| 321 | int dvo_catalog_open (Catalog *catalog, SkyRegion *region, int VERBOSE, char *iomode);
|
|---|
| 322 | int dvo_catalog_save (Catalog *catalog, char VERBOSE);
|
|---|
| 323 | int dvo_catalog_update (Catalog *catalog, char VERBOSE);
|
|---|
| 324 | int dvo_catalog_catformat (char *catformat);
|
|---|
| 325 | int dvo_catalog_catmode (char *catmode);
|
|---|
| 326 | void dvo_catalog_test (Catalog *catalog, int halt);
|
|---|
| 327 |
|
|---|
| 328 | /* catmode-specific APIs */
|
|---|
| 329 | int dvo_catalog_load_raw (Catalog *catalog, int VERBOSE);
|
|---|
| 330 | int dvo_catalog_save_raw (Catalog *catalog, char VERBOSE);
|
|---|
| 331 | int dvo_catalog_load_mef (Catalog *catalog, int VERBOSE);
|
|---|
| 332 | int dvo_catalog_save_mef (Catalog *catalog, char VERBOSE);
|
|---|
| 333 | int dvo_catalog_load_split (Catalog *catalog, int VERBOSE);
|
|---|
| 334 | int dvo_catalog_save_split (Catalog *catalog, char VERBOSE);
|
|---|
| 335 | int dvo_catalog_update_split (Catalog *catalog, char VERBOSE);
|
|---|
| 336 |
|
|---|
| 337 | /*** conversion functions / I/O conversions ***/
|
|---|
| 338 | Average *ReadRawAverage (FILE *f, int Naverage, int format, SecFilt **primary);
|
|---|
| 339 | Measure *ReadRawMeasure (FILE *f, int Nmeasure, int format);
|
|---|
| 340 | SecFilt *ReadRawSecFilt (FILE *f, int Nsecfilt, int format);
|
|---|
| 341 | int WriteRawAverage (FILE *f, Average *average, int Naverage, int format, SecFilt *primary);
|
|---|
| 342 | int WriteRawMeasure (FILE *f, Measure *measure, int Nmeasure, int format);
|
|---|
| 343 | int WriteRawSecFilt (FILE *f, SecFilt *secfilt, int Nsecfilt, int format);
|
|---|
| 344 |
|
|---|
| 345 | Average *FtableToAverage (FTable *ftable, int *Naverage, int *format, SecFilt **primary);
|
|---|
| 346 | Measure *FtableToMeasure (FTable *ftable, int *Nmeasure, int *format);
|
|---|
| 347 | SecFilt *FtableToSecFilt (FTable *ftable, int *Nsecfilt, int *format);
|
|---|
| 348 | int FtableToImage (FTable *ftable, Header *theader, int *format);
|
|---|
| 349 |
|
|---|
| 350 | int AverageToFtable (FTable *ftable, Average *average, int Naverage, int format, SecFilt *primary);
|
|---|
| 351 | int MeasureToFtable (FTable *ftable, Measure *measure, int Nmeasure, int format);
|
|---|
| 352 | int SecFiltToFtable (FTable *ftable, SecFilt *secfilt, int Nsecfilt, int format);
|
|---|
| 353 | int ImageToFtable (FTable *ftable, Header *theader, int format);
|
|---|
| 354 | int ImageToVtable (VTable *vtable, Header *theader, int format);
|
|---|
| 355 |
|
|---|
| 356 | Image *ImageElixirToInternal (ImageElixir *in, int Nvalues);
|
|---|
| 357 | Image *ImageLoneosToInternal (ImageLoneos *in, int Nvalues);
|
|---|
| 358 | Image *ImagePanstarrsToInternal (ImagePanstarrs *in, int Nvalues);
|
|---|
| 359 | Image *ImagePanstarrs_DEV_0_ToInternal (ImagePanstarrs_DEV_0 *in, int Nvalues);
|
|---|
| 360 | Image *ImagePanstarrs_DEV_1_ToInternal (ImagePanstarrs_DEV_1 *in, int Nvalues);
|
|---|
| 361 |
|
|---|
| 362 | ImageElixir *ImageInternalToElixir (Image *in, int Nvalues);
|
|---|
| 363 | ImageLoneos *ImageInternalToLoneos (Image *in, int Nvalues);
|
|---|
| 364 | ImagePanstarrs *ImageInternalToPanstarrs (Image *in, int Nvalues);
|
|---|
| 365 | ImagePanstarrs_DEV_0 *ImageInternalToPanstarrs_DEV_0 (Image *in, int Nvalues);
|
|---|
| 366 | ImagePanstarrs_DEV_1 *ImageInternalToPanstarrs_DEV_1 (Image *in, int Nvalues);
|
|---|
| 367 |
|
|---|
| 368 | Average *AverageLoneosToInternal (AverageLoneos *in, int Nvalues, SecFilt **primary);
|
|---|
| 369 | Average *AverageElixirToInternal (AverageElixir *in, int Nvalues, SecFilt **primary);
|
|---|
| 370 | Average *AveragePanstarrsToInternal (AveragePanstarrs *in, int Nvalues);
|
|---|
| 371 | Average *AveragePanstarrs_DEV_0_ToInternal (AveragePanstarrs_DEV_0 *in, int Nvalues);
|
|---|
| 372 | Average *AveragePanstarrs_DEV_1_ToInternal (AveragePanstarrs_DEV_1 *in, int Nvalues);
|
|---|
| 373 |
|
|---|
| 374 | AverageLoneos *AverageInternalToLoneos (Average *in, int Nvalues, SecFilt *primary);
|
|---|
| 375 | AverageElixir *AverageInternalToElixir (Average *in, int Nvalues, SecFilt *primary);
|
|---|
| 376 | AveragePanstarrs *AverageInternalToPanstarrs (Average *in, int Nvalues);
|
|---|
| 377 | AveragePanstarrs_DEV_0 *AverageInternalToPanstarrs_DEV_0 (Average *in, int Nvalues);
|
|---|
| 378 | AveragePanstarrs_DEV_1 *AverageInternalToPanstarrs_DEV_1 (Average *in, int Nvalues);
|
|---|
| 379 |
|
|---|
| 380 | Measure *MeasureLoneosToInternal (MeasureLoneos *in, int Nvalues);
|
|---|
| 381 | Measure *MeasureElixirToInternal (MeasureElixir *in, int Nvalues);
|
|---|
| 382 | Measure *MeasurePanstarrsToInternal (MeasurePanstarrs *in, int Nvalues);
|
|---|
| 383 | Measure *MeasurePanstarrs_DEV_0_ToInternal (MeasurePanstarrs_DEV_0 *in, int Nvalues);
|
|---|
| 384 | Measure *MeasurePanstarrs_DEV_1_ToInternal (MeasurePanstarrs_DEV_1 *in, int Nvalues);
|
|---|
| 385 |
|
|---|
| 386 | MeasureLoneos *MeasureInternalToLoneos (Measure *in, int Nvalues);
|
|---|
| 387 | MeasureElixir *MeasureInternalToElixir (Measure *in, int Nvalues);
|
|---|
| 388 | MeasurePanstarrs *MeasureInternalToPanstarrs (Measure *in, int Nvalues);
|
|---|
| 389 | MeasurePanstarrs_DEV_0 *MeasureInternalToPanstarrs_DEV_0 (Measure *in, int Nvalues);
|
|---|
| 390 | MeasurePanstarrs_DEV_1 *MeasureInternalToPanstarrs_DEV_1 (Measure *in, int Nvalues);
|
|---|
| 391 |
|
|---|
| 392 | SecFilt *SecFiltLoneosToInternal (SecFiltLoneos *in, int Nvalues);
|
|---|
| 393 | SecFilt *SecFiltElixirToInternal (SecFiltElixir *in, int Nvalues);
|
|---|
| 394 | SecFilt *SecFiltPanstarrsToInternal (SecFiltPanstarrs *in, int Nvalues);
|
|---|
| 395 | SecFilt *SecFiltPanstarrs_DEV_0_ToInternal (SecFiltPanstarrs_DEV_0 *in, int Nvalues);
|
|---|
| 396 | SecFilt *SecFiltPanstarrs_DEV_1_ToInternal (SecFiltPanstarrs_DEV_1 *in, int Nvalues);
|
|---|
| 397 |
|
|---|
| 398 | SecFiltLoneos *SecFiltInternalToLoneos (SecFilt *in, int Nvalues);
|
|---|
| 399 | SecFiltElixir *SecFiltInternalToElixir (SecFilt *in, int Nvalues);
|
|---|
| 400 | SecFiltPanstarrs *SecFiltInternalToPanstarrs (SecFilt *in, int Nvalues);
|
|---|
| 401 | SecFiltPanstarrs_DEV_0 *SecFiltInternalToPanstarrs_DEV_0 (SecFilt *in, int Nvalues);
|
|---|
| 402 | SecFiltPanstarrs_DEV_1 *SecFiltInternalToPanstarrs_DEV_1 (SecFilt *in, int Nvalues);
|
|---|
| 403 |
|
|---|
| 404 | /*** DVO image db I/O Functions ***/
|
|---|
| 405 | int dvo_image_lock (FITS_DB *db, char *filename, double timeout, int lockstate);
|
|---|
| 406 | int dvo_image_unlock (FITS_DB *db);
|
|---|
| 407 | int dvo_image_load (FITS_DB *db, int VERBOSE, int FORCE_READ);
|
|---|
| 408 | int dvo_image_save (FITS_DB *db, int VERBOSE);
|
|---|
| 409 | int dvo_image_update (FITS_DB *db, int VERBOSE);
|
|---|
| 410 | int dvo_image_load_raw (FITS_DB *db, int VERBOSE, int FORCE_READ);
|
|---|
| 411 | int dvo_image_update_raw (FITS_DB *db, int VERBOSE);
|
|---|
| 412 | int dvo_image_save_raw (FITS_DB *db, int VERBOSE);
|
|---|
| 413 | int dvo_image_addrows (FITS_DB *db, Image *new, int Nnew);
|
|---|
| 414 | void dvo_image_create (FITS_DB *db, double ZeroPoint);
|
|---|
| 415 |
|
|---|
| 416 | /* skyregion APIs */
|
|---|
| 417 | int SkyTableSave PROTO((SkyTable *table, char *filename));
|
|---|
| 418 | SkyTable *SkyTableLoad PROTO((char *filename, int VERBOSE));
|
|---|
| 419 | SkyTable *SkyTableFromGSC PROTO((char *filename, int depth, int VERBOSE));
|
|---|
| 420 | SkyTable *SkyTableLoadOptimal PROTO((char *catdir, char *SKYFILE, char *GSCFILE, int depth, int VERBOSE));
|
|---|
| 421 | int SkyTableSetDepth PROTO((SkyTable *sky, int depth));
|
|---|
| 422 | SkyList *SkyRegionByPoint PROTO((SkyTable *table, int depth, double ra, double dec));
|
|---|
| 423 | SkyList *SkyListByPoint PROTO((SkyTable *table, double ra, double dec));
|
|---|
| 424 | SkyList *SkyListByRadius PROTO((SkyTable *table, int depth, double RA, double DEC, double radius));
|
|---|
| 425 | SkyList *SkyListByPatch PROTO((SkyTable *table, int depth, SkyRegion *patch));
|
|---|
| 426 | SkyList *SkyListByName PROTO((SkyTable *table, char *name));
|
|---|
| 427 | SkyList *SkyListByImage PROTO((SkyTable *table, int depth, Image *image));
|
|---|
| 428 | SkyList *SkyListByBounds PROTO((SkyTable *table, int depth, double Rmin, double Rmax, double Dmin, double Dmax));
|
|---|
| 429 | SkyList *SkyListChildrenByBounds PROTO((SkyTable *table, int No, int depth, double Rmin, double Rmax, double Dmin, double Dmax));
|
|---|
| 430 | int SkyListMerge PROTO((SkyList **outlist, SkyList *newlist));
|
|---|
| 431 | int SkyListFree PROTO((SkyList *list));
|
|---|
| 432 | int SkyTableFree PROTO((SkyTable *table));
|
|---|
| 433 | int SkyListSetFilenames PROTO((SkyList *list, char *path, char *ext));
|
|---|
| 434 | int SkyTableSetFilenames PROTO((SkyTable *sky, char *path, char *ext));
|
|---|
| 435 |
|
|---|
| 436 | # endif
|
|---|