IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39218


Ignore:
Timestamp:
Dec 3, 2015, 4:10:50 PM (11 years ago)
Author:
eugene
Message:

changes from trunk: do not drop detections across the 0,360 boundary

Location:
branches/eam_branches/ipp-20151113/Ohana/src/addstar
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20151113/Ohana/src/addstar/include/addstar.h

    r39051 r39218  
    225225HeaderSet *MatchHeaders           PROTO((off_t **extsize, off_t *nimage, int mode, Header **headers, int Nheaders));
    226226void       HeaderSetFree          PROTO((HeaderSet *headerSets, off_t NheaderSets));
    227 Catalog   *LoadData               PROTO((FILE *f, AddstarFile *file, Image **images, off_t *nvalid, Header **headers, off_t *extsize, HeaderSet *headerSets, int NheaderSets, AddstarClientOptions *options));
     227Catalog   *LoadData               PROTO((FILE *f, AddstarFile *file, Image **images, off_t *nvalid, Header **headers, off_t *extsize, HeaderSet *headerSets, int NheaderSets, SkyRegion *region, AddstarClientOptions *options));
    228228int        GetZeroPointExposure   PROTO((Header **headers, HeaderSet *headerSets, off_t Nimages));
    229229
     
    247247
    248248Catalog   *ReadStarsFITS          PROTO((FILE *f, Header *header, Header *in_theader));
    249 Catalog   *FilterStars            PROTO((Catalog *newcat, Image *image, unsigned int imageID, const AddstarClientOptions *options));
     249Catalog   *FilterStars            PROTO((Catalog *newcat, Image *image, unsigned int imageID, SkyRegion *region, const AddstarClientOptions *options));
    250250int        ReadXradFITS           PROTO((FILE *f, Header *theader, Catalog *catalog));
    251251
  • branches/eam_branches/ipp-20151113/Ohana/src/addstar/src/FilterStars.c

    r38553 r39218  
    1010// the imageID supplied here is the sequence **within this set**
    1111// this value is updated based on the image table later (in UpdateImageIDs)
    12 Catalog *FilterStars (Catalog *newcat, Image *image, unsigned int imageID, const AddstarClientOptions *options) {
     12Catalog *FilterStars (Catalog *newcat, Image *image, unsigned int imageID, SkyRegion *region, const AddstarClientOptions *options) {
    1313
    1414  int j, N;
     
    182182  if (VERBOSE) fprintf (stderr, "stars cover region %f,%f - %f,%f\n", RMIN, DMIN, RMAX, DMAX);
    183183
     184  float dR = RMAX - RMIN;
     185  float dD = DMAX - DMIN;
     186
     187  // define containing region a bit generously
     188  region->Rmin = RMIN - 0.1*dR;
     189  region->Rmax = RMAX + 0.1*dR;
     190  region->Dmin = DMIN - 0.1*dD;
     191  region->Dmax = DMAX + 0.1*dD;
     192
    184193  return (outcat);
    185194}
  • branches/eam_branches/ipp-20151113/Ohana/src/addstar/src/LoadData.c

    r38553 r39218  
    33// load photometry data from psphot, sextractor, and a few other formats
    44// examine the header sets and set the Image entries for the the valid images
    5 Catalog *LoadData (FILE *f, AddstarFile *file, Image **images, off_t *nvalid, Header **headers, off_t *extsize, HeaderSet *headerSets, int Nimages, AddstarClientOptions *options) {
     5Catalog *LoadData (FILE *f, AddstarFile *file, Image **images, off_t *nvalid, Header **headers, off_t *extsize, HeaderSet *headerSets, int Nimages, SkyRegion *region, AddstarClientOptions *options) {
    66
    77  off_t Nskip, Nvalid, NVALID;
     
    101101
    102102    // replace full input catalog newcat with subset version
    103     newcat = FilterStars (newcat, &images[0][Nvalid], Nvalid, options);
     103    newcat = FilterStars (newcat, &images[0][Nvalid], Nvalid, region, options);
    104104
    105     double Rref, Dref;
    106     XY_to_RD (&Rref, &Dref, 0.0, 0.0, &images[0][Nvalid].coords);
    107     SkyRegion region;
    108     region.Rmin = Rref - 180.0;
    109     region.Rmax = Rref + 180.0;
    110     region.Dmin = Dref -  90.0;
    111     region.Dmax = Dref +  90.0;
    112    
    113105    AddstarClientOptions matchOptions = *options;
    114106    matchOptions.radius = 0.4; // tight radius at this stage
     
    118110    matchOptions.photcode = 0; // use an invalid photcode to avoid touching secfilt
    119111
    120     find_matches_closest (&region, newcat, catalog, matchOptions);
     112    find_matches_closest (region, newcat, catalog, matchOptions);
    121113    dvo_catalog_free (newcat);
    122114    free (newcat);
  • branches/eam_branches/ipp-20151113/Ohana/src/addstar/src/LoadStars.c

    r39051 r39218  
    7575    }
    7676
    77     newcat = LoadData (f, &file[i], images, Nimages, headers, extsize, headerSets, NheaderSets, options);
     77    SkyRegion region;
     78    newcat = LoadData (f, &file[i], images, Nimages, headers, extsize, headerSets, NheaderSets, &region, options);
    7879
    7980  next_file:
     
    8182    // if we added data from an image, then we can merge it in
    8283    if (*Nimages > NimagesStart) {
    83       double Rref, Dref;
    84       XY_to_RD (&Rref, &Dref, 0.0, 0.0, &images[0][*Nimages-1].coords);
    85       SkyRegion region;
    86       region.Rmin = Rref - 180.0;
    87       region.Rmax = Rref + 180.0;
    88       region.Dmin = Dref -  90.0;
    89       region.Dmax = Dref +  90.0;
    90      
    9184      AddstarClientOptions matchOptions = *options;
    9285      matchOptions.radius = 0.4; // tight radius at this stage
  • branches/eam_branches/ipp-20151113/Ohana/src/addstar/src/ReadStarsSDSS.c

    r38553 r39218  
    4747  int Ncol; // used in the GET_COLUMN_1,5 macros above
    4848 
     49  myAbort("need to save the RA,DEC range in a returned SkyRegion (see LoadData)");
     50
    4951  if (in_theader == NULL) {
    5052    table.header = &theader;
  • branches/eam_branches/ipp-20151113/Ohana/src/addstar/src/ReadStarsUKIRT.c

    r38553 r39218  
    1515  FTable table;
    1616 
     17  myAbort("need to save the RA,DEC range in a returned SkyRegion (see LoadData)");
     18
    1719  // the FITS binary table header is the same as the image header
    1820  table.header = header;
Note: See TracChangeset for help on using the changeset viewer.