Changeset 27435 for trunk/Ohana/src/getstar
- Timestamp:
- Mar 24, 2010, 11:22:25 AM (16 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 19 edited
-
. (modified) (1 prop)
-
src/getstar/include/dvoImageExtract.h (modified) (2 diffs)
-
src/getstar/include/dvoImageOverlaps.h (modified) (1 diff)
-
src/getstar/include/dvoImagesAtCoords.h (modified) (1 diff)
-
src/getstar/include/getstar.h (modified) (1 diff)
-
src/getstar/src/ConfigInit_coords.c (modified) (2 diffs)
-
src/getstar/src/ConfigInit_extract.c (modified) (3 diffs)
-
src/getstar/src/ConfigInit_overlaps.c (modified) (3 diffs)
-
src/getstar/src/GetFileMode.c (modified) (1 diff)
-
src/getstar/src/ListImageOverlaps.c (modified) (1 diff)
-
src/getstar/src/MatchCoords.c (modified) (1 diff)
-
src/getstar/src/MatchImages.c (modified) (3 diffs)
-
src/getstar/src/ReadImageFiles.c (modified) (5 diffs)
-
src/getstar/src/SelectImages.c (modified) (3 diffs)
-
src/getstar/src/WriteImages.c (modified) (1 diff)
-
src/getstar/src/dvoImageExtract.c (modified) (1 diff)
-
src/getstar/src/dvoImageOverlaps.c (modified) (1 diff)
-
src/getstar/src/dvoImagesAtCoords.c (modified) (1 diff)
-
src/getstar/src/select_by_region.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana
-
Property svn:mergeinfo
set to
/branches/eam_branches/20091201/Ohana merged eligible /branches/eam_branches/largefiles.20100314/Ohana merged eligible
-
Property svn:mergeinfo
set to
-
trunk/Ohana/src/getstar/include/dvoImageExtract.h
r21153 r27435 21 21 int args_extract PROTO((int argc, char **argv)); 22 22 int ConfigInit_extract PROTO((int *argc, char **argv)); 23 int Shutdown PROTO((char *format, ...)) ;23 int Shutdown PROTO((char *format, ...)) OHANA_FORMAT(printf, 1, 2); 24 24 void TrapSignal PROTO((int sig)); 25 25 void SetProtect PROTO((int mode)); … … 30 30 31 31 int WriteImageFITS (FILE *f, Image *image); 32 int WriteImages (char *filename, Image *images, int Nimages, int *matches, int Nmatches);33 int *SelectImages (char *filename, Image *dbImages, int NdbImages, int *Nmatch);32 int WriteImages (char *filename, Image *images, off_t Nimages, off_t *matches, off_t Nmatches); 33 off_t *SelectImages (char *filename, Image *dbImages, off_t NdbImages, off_t *Nmatch); -
trunk/Ohana/src/getstar/include/dvoImageOverlaps.h
r21153 r27435 24 24 int args_overlaps PROTO((int argc, char **argv)); 25 25 int ConfigInit_overlaps PROTO((int *argc, char **argv)); 26 int Shutdown PROTO((char *format, ...) );26 int Shutdown PROTO((char *format, ...) OHANA_FORMAT(printf, 1, 2)); 27 27 void TrapSignal PROTO((int sig)); 28 28 void SetProtect PROTO((int mode)); 29 29 int SetSignals PROTO((void)); 30 30 31 Image *ReadImageFiles (char *filename, int *Nimages);31 Image *ReadImageFiles (char *filename, off_t *Nimages); 32 32 int ReadImageHeader (Header *header, Image *image); 33 int *MatchImage (Image *dbImages, int NdbImages, Image *image, int *Nmatch);34 int ListImageOverlaps (Image *dbImages, Image *image, int *matches, int Nmatches);33 off_t *MatchImage (Image *dbImages, off_t NdbImages, Image *image, off_t *Nmatch); 34 int ListImageOverlaps (Image *dbImages, Image *image, off_t *matches, off_t Nmatches); 35 35 36 36 int GetFileMode (Header *header); -
trunk/Ohana/src/getstar/include/dvoImagesAtCoords.h
r26288 r27435 39 39 int args_coords PROTO((int argc, char **argv)); 40 40 int ConfigInit_coords PROTO((int *argc, char **argv)); 41 int Shutdown PROTO((char *format, ...) );41 int Shutdown PROTO((char *format, ...) OHANA_FORMAT(printf, 1, 2)); 42 42 void TrapSignal PROTO((int sig)); 43 43 void SetProtect PROTO((int mode)); 44 44 int SetSignals PROTO((void)); 45 45 46 Image *ReadImageFiles (char *filename, int *Nimages);46 Image *ReadImageFiles (char *filename, off_t *Nimages); 47 47 int ReadImageHeader (Header *header, Image *image); 48 int MatchCoords(Image *, int, Point *, int);48 off_t MatchCoords (Image *dbImages, off_t NdbImages, Point *points, int Npoints); 49 49 50 50 int GetFileMode (Header *header); -
trunk/Ohana/src/getstar/include/getstar.h
r21153 r27435 37 37 int args PROTO((int argc, char **argv)); 38 38 int ConfigInit PROTO((int *argc, char **argv)); 39 int Shutdown PROTO((char *format, ...)) ;39 int Shutdown PROTO((char *format, ...)) OHANA_FORMAT(printf, 1, 2); 40 40 int load_pt_catalog PROTO((Catalog *catalog, SkyRegion *region)); 41 41 int select_by_region PROTO((Catalog *output, Catalog *catalog, SkyRegion *region, int start, int end)); -
trunk/Ohana/src/getstar/src/ConfigInit_coords.c
r27142 r27435 4 4 5 5 char *config, *file; 6 char CatdirPhotcodeFile[256];7 char MasterPhotcodeFile[256];8 6 9 7 /*** load configuration info ***/ … … 21 19 ScanConfig (config, "CATMODE", "%s", 0, CATMODE); 22 20 ScanConfig (config, "CATFORMAT", "%s", 0, CATFORMAT); 23 ScanConfig (config, "PHOTCODE_FILE", "%s", 0, MasterPhotcodeFile);24 21 if (!ScanConfig (config, "SKY_DEPTH", "%d", 0, &SKY_DEPTH)) { 25 22 SKY_DEPTH = 2; -
trunk/Ohana/src/getstar/src/ConfigInit_extract.c
r25757 r27435 4 4 5 5 char *config, *file; 6 char CatdirPhotcodeFile[256];7 char MasterPhotcodeFile[256];8 6 9 7 /*** load configuration info ***/ … … 21 19 ScanConfig (config, "CATMODE", "%s", 0, CATMODE); 22 20 ScanConfig (config, "CATFORMAT", "%s", 0, CATFORMAT); 23 ScanConfig (config, "PHOTCODE_FILE", "%s", 0, MasterPhotcodeFile);24 21 if (!ScanConfig (config, "SKY_DEPTH", "%d", 0, &SKY_DEPTH)) { 25 22 SKY_DEPTH = 2; … … 33 30 if (*CATFORMAT == 0) strcpy (CATFORMAT, "ELIXIR"); 34 31 35 /* XXX this does not yet write out the master photcode table */36 sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR);37 if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, TRUE)) {38 fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);39 exit (1);40 }41 42 32 free (config); 43 33 free (file); -
trunk/Ohana/src/getstar/src/ConfigInit_overlaps.c
r25757 r27435 4 4 5 5 char *config, *file; 6 char CatdirPhotcodeFile[256];7 char MasterPhotcodeFile[256];8 6 9 7 /*** load configuration info ***/ … … 21 19 ScanConfig (config, "CATMODE", "%s", 0, CATMODE); 22 20 ScanConfig (config, "CATFORMAT", "%s", 0, CATFORMAT); 23 ScanConfig (config, "PHOTCODE_FILE", "%s", 0, MasterPhotcodeFile);24 21 if (!ScanConfig (config, "SKY_DEPTH", "%d", 0, &SKY_DEPTH)) { 25 22 SKY_DEPTH = 2; … … 33 30 if (*CATFORMAT == 0) strcpy (CATFORMAT, "ELIXIR"); 34 31 35 /* XXX this does not yet write out the master photcode table */36 sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR);37 if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, FALSE)) {38 fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);39 exit (1);40 }41 42 32 free (config); 43 33 free (file); -
trunk/Ohana/src/getstar/src/GetFileMode.c
r19065 r27435 8 8 int simple, extend, haveNaxis, haveCTYPE; 9 9 10 gfits_scan (header, "SIMPLE", "%t", 1, &simple);10 gfits_scan_alt (header, "SIMPLE", "%t", 1, &simple); 11 11 haveNaxis = gfits_scan (header, "NAXIS", "%d", 1, &Naxis); 12 12 haveCTYPE = gfits_scan (header, "CTYPE1", "%s", 1, ctype); 13 13 14 gfits_scan (header, "EXTEND", "%t", 1, &extend);14 gfits_scan_alt (header, "EXTEND", "%t", 1, &extend); 15 15 16 16 if ((Naxis == 2) || !simple) { -
trunk/Ohana/src/getstar/src/ListImageOverlaps.c
r12774 r27435 2 2 3 3 /* given image, find catalog images which overlap it */ 4 int ListImageOverlaps (Image *dbImages, Image *image, int *matches, int Nmatches) {4 int ListImageOverlaps (Image *dbImages, Image *image, off_t *matches, off_t Nmatches) { 5 5 6 int i, N;6 off_t i, N; 7 7 8 8 for (i = 0; i < Nmatches; i++) { -
trunk/Ohana/src/getstar/src/MatchCoords.c
r26142 r27435 5 5 6 6 /* given coordinate, find images in list that contain the point */ 7 int MatchCoords (Image *dbImages, int NdbImages, Point *points, int Npoints) {7 off_t MatchCoords (Image *dbImages, off_t NdbImages, Point *points, int Npoints) { 8 8 9 int i, j, N; 9 off_t i; 10 int j; 10 11 int totalMatches = 0; 11 Coords tcoords; 12 double r, d; 13 double Xi[4], Yi[4], Xo[4], Yo[4]; /* image and original corners */ 14 double Xmin, Xmax, Ymin, Ymax; 12 double Xi[4], Yi[4]; /* image and original corners */ 15 13 double xmin, xmax, ymin, ymax; 16 14 -
trunk/Ohana/src/getstar/src/MatchImages.c
r14590 r27435 5 5 6 6 /* given image, find catalog images which overlap it */ 7 int *MatchImage (Image *dbImages, int NdbImages, Image *image, int *Nmatch) {7 off_t *MatchImage (Image *dbImages, off_t NdbImages, Image *image, off_t *Nmatch) { 8 8 9 int i, j, N, addtolist, status;10 int NMATCH, nmatch, *match;9 off_t i, NMATCH, nmatch, *match; 10 int j, N, addtolist, status; 11 11 Coords tcoords; 12 12 double r, d; … … 64 64 nmatch = 0; 65 65 NMATCH = 20; 66 ALLOCATE (match, int, NMATCH);66 ALLOCATE (match, off_t, NMATCH); 67 67 68 68 /* setup links for mosaic WRP and DIS entries */ … … 128 128 if (nmatch == NMATCH) { 129 129 NMATCH += 20; 130 REALLOCATE (match, int, NMATCH);130 REALLOCATE (match, off_t, NMATCH); 131 131 } 132 132 } 133 133 134 if (VERBOSE) fprintf (stderr, "found % d overlapping images\n",nmatch);134 if (VERBOSE) fprintf (stderr, "found %lld overlapping images\n", (long long) nmatch); 135 135 136 136 *Nmatch = nmatch; -
trunk/Ohana/src/getstar/src/ReadImageFiles.c
r24418 r27435 2 2 # define DVO_IMAGE_NAME_LEN 128 3 3 4 Image *ReadImageFiles (char *filename, int *Nimages) { 5 6 int i, j, N, Nfile, Nheader, NHEADER, Nimage, NIMAGE; 7 int Nskip, Nhead, Ndata, done, status, mode; 4 Image *ReadImageFiles (char *filename, off_t *Nimages) { 5 6 off_t Nskip, *extsize; 7 int i, j, N, Nfile, Nheader, Nimage, NHEADER, NIMAGE; 8 int Nhead, Ndata, done, status, mode; 8 9 char **file, *name; 9 10 FILE *f; 10 11 glob_t globList; 11 12 char **exthead, **extdata, **exttype, tmpword[80]; 12 int *extnum_head, *extnum_data , *extsize;13 int *extnum_head, *extnum_data; 13 14 Header *header, **headers; 14 15 Image *image; … … 89 90 headers[0] = header; 90 91 Nskip = gfits_data_size (header); 91 fseek (f, Nskip, SEEK_CUR);92 fseeko (f, Nskip, SEEK_CUR); 92 93 93 94 // load all headers into memory … … 118 119 ALLOCATE (extnum_head, int, NIMAGE); 119 120 ALLOCATE (extnum_data, int, NIMAGE); 120 ALLOCATE (extsize, int, Nheader);121 ALLOCATE (extsize, off_t, Nheader); 121 122 122 123 if (mode == MOSAIC_MEF) { … … 130 131 // now examine the headers, count the table entries, find corresponding headers 131 132 for (i = 0; i < Nheader; i++) { 132 extsize[i] = headers[i][0]. size + gfits_data_size (headers[i]);133 extsize[i] = headers[i][0].datasize + gfits_data_size (headers[i]); 133 134 gfits_scan (headers[i], "EXTTYPE", "%s", 1, tmpword); 134 135 … … 166 167 // extension matched to the header in the PHU 167 168 if (Nimage == 0) { 168 extsize[0] = headers[0][0]. size + gfits_data_size (headers[0]);169 extsize[1] = headers[1][0]. size + gfits_data_size (headers[1]);169 extsize[0] = headers[0][0].datasize + gfits_data_size (headers[0]); 170 extsize[1] = headers[1][0].datasize + gfits_data_size (headers[1]); 170 171 gfits_scan (headers[1], "EXTNAME", "%s", 1, tmpword); 171 172 if (!strcmp (tmpword, "SMPFILE")) { -
trunk/Ohana/src/getstar/src/SelectImages.c
r14590 r27435 2 2 3 3 /* given image, find catalog images which overlap it */ 4 int *SelectImages (char *filename, Image *images, int Nimages, int *Nmatch) {4 off_t *SelectImages (char *filename, Image *images, off_t Nimages, off_t *Nmatch) { 5 5 6 int i,Nchar;7 intNMATCH, nmatch, *match;6 int Nchar; 7 off_t i, NMATCH, nmatch, *match; 8 8 9 9 /* matches here are only based on string comparisons */ … … 12 12 nmatch = 0; 13 13 NMATCH = 20; 14 ALLOCATE (match, int, NMATCH);14 ALLOCATE (match, off_t, NMATCH); 15 15 16 16 /* setup links for mosaic WRP and DIS entries */ … … 27 27 if (nmatch == NMATCH) { 28 28 NMATCH += 20; 29 REALLOCATE (match, int, NMATCH);29 REALLOCATE (match, off_t, NMATCH); 30 30 } 31 31 } 32 32 33 if (VERBOSE) fprintf (stderr, "found % d matching images\n",nmatch);33 if (VERBOSE) fprintf (stderr, "found %lld matching images\n", (long long) nmatch); 34 34 35 35 *Nmatch = nmatch; -
trunk/Ohana/src/getstar/src/WriteImages.c
r14590 r27435 2 2 3 3 /* given image, find catalog images which overlap it */ 4 int WriteImages (char *filename, Image *images, int Nimages, int *matches, int Nmatches) {4 int WriteImages (char *filename, Image *images, off_t Nimages, off_t *matches, off_t Nmatches) { 5 5 6 6 int i, N; -
trunk/Ohana/src/getstar/src/dvoImageExtract.c
r14590 r27435 3 3 int main (int argc, char **argv) { 4 4 5 int Nimages, status;6 int Nmatches, *matches;5 off_t Nimages, Nmatches, *matches; 6 int status; 7 7 Image *images; 8 8 FITS_DB db; -
trunk/Ohana/src/getstar/src/dvoImageOverlaps.c
r14590 r27435 3 3 int main (int argc, char **argv) { 4 4 5 int i, Nimages, NdbImages, status; 6 int Nmatches, *matches; 5 off_t NdbImages, Nimages; 6 int status; 7 off_t i, Nmatches, *matches; 7 8 Image *images, *dbImages; 8 9 FITS_DB db; -
trunk/Ohana/src/getstar/src/dvoImagesAtCoords.c
r26288 r27435 12 12 int main (int argc, char **argv) { 13 13 14 int i, Nimages, NdbImages, status;15 int Nmatches, *matches;14 off_t NdbImages; 15 int status; 16 16 Image *dbImages; 17 17 int Npoints; -
trunk/Ohana/src/getstar/src/select_by_region.c
r20266 r27435 156 156 output[0].Nsecf_mem = Nave*Nsecfilt; 157 157 158 fprintf (stderr, "output catalog has % d stars (%d measures, %d secfilt)\n",159 output[0].Naverage,output[0].Nmeasure, output[0].Nsecfilt);158 fprintf (stderr, "output catalog has %lld stars (%lld measures, %d secfilt)\n", 159 (long long) output[0].Naverage, (long long) output[0].Nmeasure, output[0].Nsecfilt); 160 160 return (TRUE); 161 161 }
Note:
See TracChangeset
for help on using the changeset viewer.
