IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 2, 2005, 7:54:17 AM (21 years ago)
Author:
eugene
Message:

more work towards addstar-2-0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/include/addstar.h

    r3347 r3361  
    22# include <loneos.h>
    33# include <signal.h>
     4# include <sys/time.h>
     5# include <time.h>
     6
     7/* used in find_matches, find_matches_refstars */
     8# define IN_CATALOG(R,D) ( \
     9((D) >= region[0].DEC[0]) && ((D) < region[0].DEC[1]) && \
     10((R) >= region[0].RA[0])  && ((R) < region[0].RA[1]))
     11
     12/* grab named photcode */
     13# define NAMED_PHOTCODE(CODE,NAME) \
     14  CODE = GetPhotcodebyName (NAME); \
     15  if (!CODE) { \
     16    fprintf (stderr, "ERROR:  photcode %s not found in photcode table\n", NAME); \
     17    exit (0); }
    418
    519typedef struct {
     
    1428  double Mgal, Map;
    1529  int found;
     30  short int code;
     31  e_time t;
    1632} Stars;
     33
     34/* structure for data on a catalog region */
     35typedef struct {
     36  char filename[256];
     37  double RA[2];
     38  int Nrec;
     39} TM_Region;
    1740
    1841enum {M_IMAGE, M_REFLIST, M_REFCAT};
     
    3457
    3558PhotCode *thiscode;
     59GSCRegion patch;
    3660
    3761char DateKeyword[64];
     
    5781int ONLY_MATCH;
    5882
     83int MODE;
     84
    5985time_t TIMEREF;
    6086
     
    7096void gregion_star (Stars *star, GSCRegion *region);
    7197GSCRegion *gregion_image (Image *image, int *Nregions);
    72 Image *gimages (FILE *f, Image *image, int *Npimage);
    7398int edge_check (double *x1, double *y1, double *x2, double *y2);
    7499double opening_angle (double x1, double y1, double x2, double y2, double x3, double y3);
    75 void wimage (FILE *f, int dbstate, Image *image, int Nstars);
    76100Stars *gstars (char *file, int *NSTARS, Image *image);
    77 void find_matches_refstars (GSCRegion *region, Stars *stars, int Nstars, Catalog *catalog);
    78 void find_matches (GSCRegion *region, Stars *stars, int Nstars, Catalog *catalog, Image *image, Image *pimage, int Nimage);
    79101int in_image (double r, double d, Image *image);
    80102void wcatalog (Catalog *catalog);
    81103void ConfigInit (int *argc, char **argv);
    82104void aregion (GSCRegion *region, FILE *f, double ra, double dec);
    83 void wimage (FILE *f, int dbstate, Image *image, int Nstars);
    84 double airmass (double ra, double dec, double st, double latitude);
     105short airmass (short secz_image, double ra, double dec, double st, double latitude);
    85106void InitCalibration ();
    86 void SaveCalibration (float M, float dM, float Mr, float dMr, float Mc, float A, int N, float ra, float dec, float x, float y);
    87107void FindCalibration (Image *image);
    88108double get_subpix (double x, double y);
     
    91111void mkcatalog (GSCRegion *region, Catalog *catalog);
    92112Stars *grefstars (char *file, int *Nstars);
    93 Stars *find_subset (GSCRegion *region, Stars *stars, int Nstars, int *NSTARS);
     113Stars **find_subset (GSCRegion *region, Stars *stars, int Nstars, int *NSTARS);
    94114int match_refstars (Stars *stars, int Nstars);
    95115int parse_time (Header *header);
     
    113133time_t jd_to_sec (double jd);
    114134time_t date_to_sec (char *date);
     135time_t short_date_to_sec (char *date);
     136
    115137
    116138/**
     
    122144  e_time pointer from one of these functions)
    123145**/
     146
     147Stars *get2mass (GSCRegion *patch, int *NSTARS);
     148TM_Region *get2mass_acc (GSCRegion *patch, int *nfiles);
     149Stars *get2mass_data (char *filename, GSCRegion *patch, int *nstars);
     150GSCRegion *gregion_stars (Stars *stars, int Nstars, int *Nregion);
     151Stars *grefstars (char *file, int *Nstars);
     152GSCRegion *LoadRegions (int *nregions);
     153int FindRegionByPoint (GSCRegion *regions, double ra, double dec, GSCRegion *gsc, int Ngsc);
     154int FindRegionDecBandStart (GSCRegion *region, int Nregion, double dec);
     155int FindRegionDecBandStop (GSCRegion *region, int Nregion, double dec);
     156int hms_to_deg (double *h0, double *h1, double *d0, double *d1, char *string);
     157void find_matches_refstars (GSCRegion *region, Stars **stars, int Nstars, Catalog *catalog);
     158Stars *gstars (char *file, int *NSTARS, Image *image);
     159void find_matches (GSCRegion *region, Stars *stars, int Nstars, Catalog *catalog, Image *image, Image *overlap, int Noverlap);
     160Stars *getusno (GSCRegion *catstats, int *Nstars);
     161Stars *rd_gsc (char *filename, int *nstars);
     162Stars *getgsc (GSCRegion *patch, int *NSTARS);
     163Stars *grefcat (char *Refcat, GSCRegion *catstats, int *nstars);
     164void load_subpix ();
     165double get_subpix (double x, double y);
     166double scat_subpix (double x, double y);
     167void help ();
     168int args (int argc, char **argv);
     169void InitCalibration ();
     170void SaveCalibration (float M, float dM, float Mr, float dMr, float Mc, float A, int N);
     171void AddToCalibration (Average *average, Measure *measure, Measure *new, int Nstar);
     172void FindCalibration (Image *image);
     173int load_pt_catalog (Catalog *catalog, GSCRegion *region);  /*** choose new name ***/
     174void save_pt_catalog (Catalog *catalog);  /*** choose new name ***/
     175void wcatalog (Catalog *catalog);
     176GSCRegion *gregions (Image *image, int *Nregions);
     177int gcatalog (Catalog *catalog);
     178GSCRegion *gregion_image (Image *image, int *Nregions);
     179void update_coords (Average *average, Measure *measure, int *next);
     180int replace_match (Average *average, Measure *measure, Stars *star);
     181FILE *GetDB (int *state);
     182int Shutdown ();
     183void lock_image_db ();
     184void unlock_image_db (Image *image);
     185void wimage (Image *image);
     186Image *gimages (Image *image, int *Npimage);
     187double opening_angle (double x1, double y1, double x2, double y2, double x3, double y3);
     188int edge_check (double *x1, double *y1, double *x2, double *y2);
     189GSCRegion *gregion_match (GSCRegion *regions, int *nregions);
     190GSCRegion *gregion_patch (GSCRegion *patch, int *nregions);
Note: See TracChangeset for help on using the changeset viewer.