IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 24, 2005, 10:36:17 AM (21 years ago)
Author:
eugene
Message:

adding SkyRegion support to addstar (removing GSCRegion)

File:
1 edited

Legend:

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

    r5347 r5443  
    1111/* used in find_matches, find_matches_refstars */
    1212# define IN_CATALOG(R,D) ( \
    13 ((D) >= region[0].DEC[0]) && ((D) < region[0].DEC[1]) && \
    14 ((R) >= region[0].RA[0])  && ((R) < region[0].RA[1]))
     13((D) >= region[0].Dmin) && ((D) < region[0].Dmax) && \
     14((R) >= region[0].Rmin)  && ((R) < region[0].Rmax))
    1515
    1616/* grab named photcode */
     
    3939char   HOSTNAME[80];
    4040int    NVALID, *VALID_IP;
     41int    SKY_DEPTH;  /** XXX EAM : depth of catalog tables, fix usage */
    4142
    4243/* used to select entries from header (gstars or parse_time) (KEEP) */
     
    7980/* these depend on HOW we implement the client/server interaction for CAT/REF modes */
    8081time_t    TIMEREF;    // used by MODE REF
    81 GSCRegion UserPatch;  // used by MODE CAT
     82SkyRegion UserPatch;  // used by MODE CAT
    8283char     *SELECT_2MASS_QUALITY;  // used only by get2mass_as
    8384
     
    8687AddstarClientOptions ConfigInit   PROTO((int *argc, char **argv));
    8788void       FindCalibration        PROTO((Image *image));
    88 int        FindDecBand            PROTO((double dec, double *DEC0, double *DEC1));
    89 int        FindRegionByPoint      PROTO((GSCRegion *regions, double ra, double dec, GSCRegion *gsc, int Ngsc));
    90 int        FindRegionDecBandStart PROTO((GSCRegion *region, int Nregion, double dec));
    91 int        FindRegionDecBandStop  PROTO((GSCRegion *region, int Nregion, double dec));
    9289FILE      *GetDB                  PROTO((int *state));
    9390void       InitCalibration        PROTO(());
    94 GSCRegion *LoadRegions            PROTO((int *nregions));
    9591void       SaveCalibration        PROTO((float M, float dM, float Mr, float dMr, float Mc, float A, int N));
    9692void       SetProtect             PROTO((int mode));
     
    10096float      airmass                PROTO((float secz_image, double ra, double dec, double st, double latitude));
    10197void       SetAirmassQuality      PROTO((int quality));
    102 void       aregion                PROTO((GSCRegion *region, FILE *f, double ra, double dec));
    10398AddstarClientOptions args         PROTO((int argc, char **argv, AddstarClientOptions options));
    10499void       check_permissions      PROTO((char *basefile));
    105100int        dump_rawstars          PROTO((Stars *stars, int Nstars));
    106101int        edge_check             PROTO((double *x1, double *y1, double *x2, double *y2));
    107 void       find_matches           PROTO((GSCRegion *region, Stars *stars, int Nstars, Catalog *catalog, Image *image, Image *overlap, int Noverlap, Coords *mosaic, AddstarClientOptions options));
    108 void       find_matches_closest   PROTO((GSCRegion *region, Stars *stars, int Nstars, Catalog *catalog, Image *image, Image *overlap, int Noverlap, Coords *mosaic, AddstarClientOptions options));
    109 void       find_matches_refstars  PROTO((GSCRegion *region, Stars **stars, int Nstars, Catalog *catalog, AddstarClientOptions options));
    110 Stars    **find_subset            PROTO((GSCRegion *region, Stars *stars, int Nstars, int *NSTARS));
     102void       find_matches           PROTO((SkyRegion *region, Stars *stars, int Nstars, Catalog *catalog, Image *image, Image *overlap, int Noverlap, Coords *mosaic, AddstarClientOptions options));
     103void       find_matches_closest   PROTO((SkyRegion *region, Stars *stars, int Nstars, Catalog *catalog, Image *image, Image *overlap, int Noverlap, Coords *mosaic, AddstarClientOptions options));
     104void       find_matches_refstars  PROTO((SkyRegion *region, Stars **stars, int Nstars, Catalog *catalog, AddstarClientOptions options));
     105Stars    **find_subset            PROTO((SkyRegion *region, Stars *stars, int Nstars, int *NSTARS));
    111106int        gcatalog               PROTO((Catalog *catalog));
    112 Stars     *get2mass               PROTO((GSCRegion *patch, int photcode, int mode, int *NSTARS));
     107Stars     *get2mass               PROTO((SkyRegion *patch, int photcode, int mode, int *NSTARS));
    113108double     get_subpix             PROTO((double x, double y));
    114 Stars     *getgsc                 PROTO((GSCRegion *patch, int *NSTARS));
    115 Stars     *getusno                PROTO((GSCRegion *catstats, int photcode, int *Nstars));
     109Stars     *getgsc                 PROTO((SkyRegion *patch, int *NSTARS));
     110Stars     *getusno                PROTO((SkyRegion *catstats, int photcode, int *Nstars));
    116111Image     *gimages                PROTO((FITS_DB *db, Image *image, Coords *mosaic, int *Npimage));
    117 Stars     *grefcat                PROTO((char *Refcat, GSCRegion *catstats, int photcode, int *nstars));
     112Stars     *grefcat                PROTO((char *Refcat, SkyRegion *catstats, int photcode, int *nstars));
    118113Stars     *grefstars              PROTO((char *file, int photcode, int *Nstars));
    119 GSCRegion *gregion_image          PROTO((Image *image, Coords *mosaic, int *Nregions));
    120 GSCRegion *gregion_match          PROTO((GSCRegion *regions, int *nregions));
    121 GSCRegion *gregion_patch          PROTO((GSCRegion *patch, int *nregions));
    122 void       gregion_star           PROTO((Stars *star, GSCRegion *region));
    123 GSCRegion *gregion_stars          PROTO((Stars *stars, int Nstars, int *Nregion));
    124 GSCRegion *gregions               PROTO((Image *image, int *Nregions));
    125114Stars     *gstars                 PROTO((char *file, int *NSTARS, int photcode, Image *image));
    126115void       help                   PROTO(());
    127116int        in_image               PROTO((double r, double d, Image *image));
    128 int        load_pt_catalog        PROTO((Catalog *catalog, GSCRegion *region));  /*** choose new name ***/
     117int        load_pt_catalog        PROTO((Catalog *catalog, SkyRegion *region));  /*** choose new name ***/
    129118void       load_subpix            PROTO(());
    130119void       lock_image_db          PROTO((FITS_DB *db, char *filename));
     
    132121void       make_backup            PROTO((char *filename));
    133122int        match_refstars         PROTO((Stars *stars, int Nstars));
    134 void       mkcatalog              PROTO((GSCRegion *region, Catalog *catalog));
     123void       mkcatalog              PROTO((SkyRegion *region, Catalog *catalog));
    135124double     opening_angle          PROTO((double x1, double y1, double x2, double y2, double x3, double y3));
    136125int        parse_time             PROTO((Header *header));
     
    165154Missing *sort_missing (Average *average, int Naverage, Missing *missing, int Nmissing, int *next_miss);
    166155
     156GSCRegion *LoadRegions            PROTO((int *nregions));
     157int        FindDecBand            PROTO((double dec, double *DEC0, double *DEC1));
     158int        FindRegionByPoint      PROTO((GSCRegion *regions, double ra, double dec, GSCRegion *gsc, int Ngsc));
     159int        FindRegionDecBandStart PROTO((GSCRegion *region, int Nregion, double dec));
     160int        FindRegionDecBandStop  PROTO((GSCRegion *region, int Nregion, double dec));
     161void       aregion                PROTO((GSCRegion *region, FILE *f, double ra, double dec));
     162GSCRegion *gregion_image          PROTO((Image *image, Coords *mosaic, int *Nregions));
     163GSCRegion *gregion_match          PROTO((GSCRegion *regions, int *nregions));
     164GSCRegion *gregion_patch          PROTO((GSCRegion *patch, int *nregions));
     165void       gregion_star           PROTO((Stars *star, GSCRegion *region));
     166GSCRegion *gregion_stars          PROTO((Stars *stars, int Nstars, int *Nregion));
     167GSCRegion *gregions               PROTO((Image *image, int *Nregions));
     168
    167169/**
    168170  there is an inconsistency to be resolved: fixed structures (like Image)
     
    192194int UpdateDatabase_Reflist (AddstarClientOptions *options, Stars *stars, int Nstars);
    193195int UpdateDatabase_Refcat (AddstarClientOptions *options, GSCRegion *UserPatch, char *refcat);
     196
     197SkyList *SkyListForStars (SkyTable *table, int depth, Stars *stars, int Nstars);
     198SkyList *SkyListExistingSubset (SkyList *input);
     199int SkyListSetPath (SkyList *list, char *path);
Note: See TracChangeset for help on using the changeset viewer.