Changeset 39218
- Timestamp:
- Dec 3, 2015, 4:10:50 PM (11 years ago)
- Location:
- branches/eam_branches/ipp-20151113/Ohana/src/addstar
- Files:
-
- 6 edited
-
include/addstar.h (modified) (2 diffs)
-
src/FilterStars.c (modified) (2 diffs)
-
src/LoadData.c (modified) (3 diffs)
-
src/LoadStars.c (modified) (2 diffs)
-
src/ReadStarsSDSS.c (modified) (1 diff)
-
src/ReadStarsUKIRT.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20151113/Ohana/src/addstar/include/addstar.h
r39051 r39218 225 225 HeaderSet *MatchHeaders PROTO((off_t **extsize, off_t *nimage, int mode, Header **headers, int Nheaders)); 226 226 void 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));227 Catalog *LoadData PROTO((FILE *f, AddstarFile *file, Image **images, off_t *nvalid, Header **headers, off_t *extsize, HeaderSet *headerSets, int NheaderSets, SkyRegion *region, AddstarClientOptions *options)); 228 228 int GetZeroPointExposure PROTO((Header **headers, HeaderSet *headerSets, off_t Nimages)); 229 229 … … 247 247 248 248 Catalog *ReadStarsFITS PROTO((FILE *f, Header *header, Header *in_theader)); 249 Catalog *FilterStars PROTO((Catalog *newcat, Image *image, unsigned int imageID, const AddstarClientOptions *options));249 Catalog *FilterStars PROTO((Catalog *newcat, Image *image, unsigned int imageID, SkyRegion *region, const AddstarClientOptions *options)); 250 250 int ReadXradFITS PROTO((FILE *f, Header *theader, Catalog *catalog)); 251 251 -
branches/eam_branches/ipp-20151113/Ohana/src/addstar/src/FilterStars.c
r38553 r39218 10 10 // the imageID supplied here is the sequence **within this set** 11 11 // 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) {12 Catalog *FilterStars (Catalog *newcat, Image *image, unsigned int imageID, SkyRegion *region, const AddstarClientOptions *options) { 13 13 14 14 int j, N; … … 182 182 if (VERBOSE) fprintf (stderr, "stars cover region %f,%f - %f,%f\n", RMIN, DMIN, RMAX, DMAX); 183 183 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 184 193 return (outcat); 185 194 } -
branches/eam_branches/ipp-20151113/Ohana/src/addstar/src/LoadData.c
r38553 r39218 3 3 // load photometry data from psphot, sextractor, and a few other formats 4 4 // 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) {5 Catalog *LoadData (FILE *f, AddstarFile *file, Image **images, off_t *nvalid, Header **headers, off_t *extsize, HeaderSet *headerSets, int Nimages, SkyRegion *region, AddstarClientOptions *options) { 6 6 7 7 off_t Nskip, Nvalid, NVALID; … … 101 101 102 102 // 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); 104 104 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 113 105 AddstarClientOptions matchOptions = *options; 114 106 matchOptions.radius = 0.4; // tight radius at this stage … … 118 110 matchOptions.photcode = 0; // use an invalid photcode to avoid touching secfilt 119 111 120 find_matches_closest ( ®ion, newcat, catalog, matchOptions);112 find_matches_closest (region, newcat, catalog, matchOptions); 121 113 dvo_catalog_free (newcat); 122 114 free (newcat); -
branches/eam_branches/ipp-20151113/Ohana/src/addstar/src/LoadStars.c
r39051 r39218 75 75 } 76 76 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, ®ion, options); 78 79 79 80 next_file: … … 81 82 // if we added data from an image, then we can merge it in 82 83 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 91 84 AddstarClientOptions matchOptions = *options; 92 85 matchOptions.radius = 0.4; // tight radius at this stage -
branches/eam_branches/ipp-20151113/Ohana/src/addstar/src/ReadStarsSDSS.c
r38553 r39218 47 47 int Ncol; // used in the GET_COLUMN_1,5 macros above 48 48 49 myAbort("need to save the RA,DEC range in a returned SkyRegion (see LoadData)"); 50 49 51 if (in_theader == NULL) { 50 52 table.header = &theader; -
branches/eam_branches/ipp-20151113/Ohana/src/addstar/src/ReadStarsUKIRT.c
r38553 r39218 15 15 FTable table; 16 16 17 myAbort("need to save the RA,DEC range in a returned SkyRegion (see LoadData)"); 18 17 19 // the FITS binary table header is the same as the image header 18 20 table.header = header;
Note:
See TracChangeset
for help on using the changeset viewer.
