Changeset 27296 for branches/eam_branches/largefiles.20100314/Ohana
- Timestamp:
- Mar 16, 2010, 8:10:48 AM (16 years ago)
- Location:
- branches/eam_branches/largefiles.20100314/Ohana/src
- Files:
-
- 52 edited
-
addstar/include/addstar.h (modified) (8 diffs)
-
addstar/src/ConfigInit.c (modified) (2 diffs)
-
addstar/src/GetZeroPointExposure.c (modified) (2 diffs)
-
addstar/src/ImageOptions.c (modified) (1 diff)
-
addstar/src/ListenClients_Thread.c (modified) (1 diff)
-
addstar/src/LoadData.c (modified) (1 diff)
-
addstar/src/LoadDataPMM.c (modified) (1 diff)
-
addstar/src/LoadDataSDSS.c (modified) (1 diff)
-
addstar/src/LoadStars.c (modified) (2 diffs)
-
addstar/src/MatchHeaders.c (modified) (1 diff)
-
addstar/src/ReadStarsFITS.c (modified) (6 diffs)
-
addstar/src/ReadStarsSDSS.c (modified) (2 diffs)
-
addstar/src/UpdateImageIDs.c (modified) (1 diff)
-
addstar/src/addstar.c (modified) (1 diff)
-
addstar/src/addstard.c (modified) (1 diff)
-
addstar/src/fakeimage.c (modified) (1 diff)
-
addstar/src/getgsc.c (modified) (1 diff)
-
addstar/src/greference.c (modified) (1 diff)
-
addstar/src/sky_tessalation.c (modified) (1 diff)
-
gastro/src/gfit.c (modified) (2 diffs)
-
gastro/src/gfitpoly.c (modified) (1 diff)
-
getstar/include/dvoImageExtract.h (modified) (1 diff)
-
getstar/include/dvoImageOverlaps.h (modified) (1 diff)
-
getstar/include/dvoImagesAtCoords.h (modified) (1 diff)
-
getstar/src/ConfigInit_coords.c (modified) (2 diffs)
-
getstar/src/ConfigInit_extract.c (modified) (3 diffs)
-
getstar/src/ConfigInit_overlaps.c (modified) (3 diffs)
-
getstar/src/ListImageOverlaps.c (modified) (1 diff)
-
getstar/src/MatchCoords.c (modified) (1 diff)
-
getstar/src/MatchImages.c (modified) (3 diffs)
-
getstar/src/ReadImageFiles.c (modified) (1 diff)
-
getstar/src/SelectImages.c (modified) (3 diffs)
-
getstar/src/WriteImages.c (modified) (1 diff)
-
getstar/src/dvoImageExtract.c (modified) (1 diff)
-
getstar/src/dvoImageOverlaps.c (modified) (1 diff)
-
getstar/src/dvoImagesAtCoords.c (modified) (1 diff)
-
getstar/src/select_by_region.c (modified) (1 diff)
-
imregister/imphot/rtext.c (modified) (1 diff)
-
kapa2/src/LoadPicture.c (modified) (1 diff)
-
kapa2/src/PNGit.c (modified) (1 diff)
-
kapa2/src/PPMit.c (modified) (1 diff)
-
kapa2/src/Relocate.c (modified) (1 diff)
-
libdvo/include/dvo.h (modified) (1 diff)
-
libdvo/src/mosaic_astrom.c (modified) (7 diffs)
-
mosastro/src/rfits.c (modified) (1 diff)
-
opihi/dvo/imdata.c (modified) (1 diff)
-
opihi/dvo/lcurve.c (modified) (1 diff)
-
opihi/dvo/lightcurve.c (modified) (1 diff)
-
opihi/dvo/mextract.c (modified) (1 diff)
-
opihi/dvo/mmextract.c (modified) (1 diff)
-
opihi/dvo/pmeasure.c (modified) (1 diff)
-
opihi/dvo/subpix.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/include/addstar.h
r27295 r27296 46 46 unsigned int Nstars; 47 47 Stars *stars; 48 int Nimages;48 off_t Nimages; 49 49 Image *images; 50 50 Coords *mosaic; … … 76 76 char PASSWORD[80]; 77 77 char HOSTNAME[80]; 78 int NVALID , *VALID_IP;78 int NVALID_IP, *VALID_IP; 79 79 char SKY_TABLE[256]; 80 80 int SKY_DEPTH; /** XXX EAM : depth of catalog tables, fix usage */ … … 167 167 int dump_rawstars PROTO((Stars *stars, unsigned int Nstars)); 168 168 int edge_check PROTO((double *x1, double *y1, double *x2, double *y2)); 169 Image *fakeimage PROTO((char *rootname, int *Nimage, int photcode));169 Image *fakeimage PROTO((char *rootname, off_t *Nimage, int photcode)); 170 170 171 171 int find_matches PROTO((SkyRegion *region, Stars *stars, unsigned int Nstars, Catalog *catalog, AddstarClientOptions options)); … … 188 188 Stars *grefstars PROTO((char *file, int photcode, unsigned int *Nstars)); 189 189 190 Stars *LoadStars PROTO((char *file, unsigned int *Nstars, Image **images, int *Nimages, AddstarClientOptions *options));190 Stars *LoadStars PROTO((char *file, unsigned int *Nstars, Image **images, off_t *Nimages, AddstarClientOptions *options)); 191 191 Header **LoadHeaders PROTO((FILE *f, int *mode, int *Nheader)); 192 HeaderSet *MatchHeaders PROTO((off_t **extsize, int *nimage, int mode, Header **headers, int Nheaders));193 int LoadData PROTO((FILE *f, char *file, Image **images, int *nvalid, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, int NheaderSets, AddstarClientOptions *options));194 int GetZeroPointExposure PROTO((Header **headers, HeaderSet *headerSets, int Nimages));192 HeaderSet *MatchHeaders PROTO((off_t **extsize, off_t *nimage, int mode, Header **headers, int Nheaders)); 193 int LoadData PROTO((FILE *f, char *file, Image **images, off_t *nvalid, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, int NheaderSets, AddstarClientOptions *options)); 194 int GetZeroPointExposure PROTO((Header **headers, HeaderSet *headerSets, off_t Nimages)); 195 195 196 196 int in_image PROTO((double r, double d, Image *image)); … … 206 206 Stars *ReadStarsFITS PROTO((FILE *f, Header *header, Header *in_theader, unsigned int *nstars)); 207 207 Stars *ReadStarsTEXT PROTO((FILE *f, unsigned int *nstars)); 208 Stars *ReadStarsSDSS PROTO((FILE *f, char *name, Header *header, Header *in_theader, Image *images, int *nimages, unsigned int *nstars));208 Stars *ReadStarsSDSS PROTO((FILE *f, char *name, Header *header, Header *in_theader, Image *images, off_t *nimages, unsigned int *nstars)); 209 209 int ReadImageHeader PROTO((Header *header, Image *image, int photcode)); 210 210 Stars *FilterStars PROTO((Stars *instars, Image *image, unsigned int imageID)); … … 232 232 int WaitServerSocket PROTO((int InitSocket, SockAddress *Address, int *validIP, int Nvalid)); 233 233 int GetClientSocket PROTO((char *hostname)); 234 int UpdateDatabase_Image PROTO((AddstarClientOptions *options, Image *images, int Nimages, Coords *mosaic, Stars *stars, unsigned int Nstars));234 int UpdateDatabase_Image PROTO((AddstarClientOptions *options, Image *images, off_t Nimages, Coords *mosaic, Stars *stars, unsigned int Nstars)); 235 235 int UpdateDatabase_Reflist PROTO((AddstarClientOptions *options, Stars *stars, unsigned int Nstars)); 236 236 int UpdateDatabase_Refcat PROTO((AddstarClientOptions *options, SkyRegion *UserPatch, char *refcat)); … … 259 259 int args_skycells (int argc, char **argv); 260 260 int ConfigInit_skycells (int *argc, char **argv); 261 int UpdateImageIDs (Stars *stars, unsigned int Nstars, Image *images, int Nimages);262 int LoadDataSDSS (FILE *f, char *file, Image **images, int *nvalid, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, int Nimages); 263 int altaz (double *alt, double *az, double ha, double dec, double latitude);264 265 int LoadDataPMM (FILE *f, char *file, Image **images, int *nvalid, Stars **stars, unsigned int *Nstars); 261 int UpdateImageIDs (Stars *stars, unsigned int Nstars, Image *images, off_t Nimages); 262 263 int LoadDataSDSS (FILE *f, char *file, Image **images, off_t *nvalid, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, off_t Nimages); 264 int LoadDataPMM (FILE *f, char *file, Image **images, off_t *nvalid, Stars **stars, unsigned int *Nstars); 265 266 266 PhotCode *LoadMetadataPMM (char *datafile, Image *image); 267 267 time_t pmm_date_to_sec (char *date, char *time); … … 273 273 uint64_t CreatePSPSDetectionID(double tobs, int ccdid, int detID); 274 274 uint64_t CreatePSPSObjectID(double ra, double dec); 275 276 int altaz (double *alt, double *az, double ha, double dec, double latitude); 275 277 276 278 // this is a gnu extension?? caution! -
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/ConfigInit.c
r25757 r27296 130 130 /* load valid ip list */ 131 131 { 132 int i, Nvalid , ip1, ip2, ip3, ip4, test, status;132 int i, Nvalid_IP, ip1, ip2, ip3, ip4, test, status; 133 133 char string[80]; 134 134 135 Nvalid = 0;136 NVALID = 10;137 ALLOCATE (VALID_IP, int, NVALID );135 Nvalid_IP = 0; 136 NVALID_IP = 10; 137 ALLOCATE (VALID_IP, int, NVALID_IP); 138 138 for (i = 0; ScanConfig (config, "VALID_IP", "%s", i, string) != NULL; i++) { 139 139 status = sscanf (string, "%d.%d.%d.%d", &ip1, &ip2, &ip3, &ip4); … … 148 148 exit (2); 149 149 } 150 VALID_IP[Nvalid ] = ip1 | (ip2 << 8) | (ip3 << 16) | (ip4 << 24);151 Nvalid ++;152 CHECK_REALLOCATE (VALID_IP, int, NVALID , Nvalid, 10);153 } 154 NVALID = Nvalid;155 REALLOCATE (VALID_IP, int, NVALID );156 if (NVALID == 0) {150 VALID_IP[Nvalid_IP] = ip1 | (ip2 << 8) | (ip3 << 16) | (ip4 << 24); 151 Nvalid_IP ++; 152 CHECK_REALLOCATE (VALID_IP, int, NVALID_IP, Nvalid_IP, 10); 153 } 154 NVALID_IP = Nvalid_IP; 155 REALLOCATE (VALID_IP, int, NVALID_IP); 156 if (NVALID_IP == 0) { 157 157 free (VALID_IP); 158 158 VALID_IP = NULL; -
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/GetZeroPointExposure.c
r25908 r27296 21 21 // offset in ReadImageHeader based on the per-chip zero points in the photcode database 22 22 23 int GetZeroPointExposure (Header **headers, HeaderSet *headerSets, int Nimages) {23 int GetZeroPointExposure (Header **headers, HeaderSet *headerSets, off_t Nimages) { 24 24 25 25 // the zero point correction is not applied … … 37 37 // the zero point correction is measured here and applied in ReadImageHeader 38 38 if (!strcasecmp(ZERO_POINT_OPTION, "CHIP_AVERAGE")) { 39 39 40 int i, Nzpt, Nmid, Nhead; 40 41 float *zpt, ZPT_OBS; -
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/ImageOptions.c
r16810 r27296 2 2 3 3 /* set specific options based on the image collection */ 4 int ImageOptions (AddstarClientOptions *options, Image *images, int Nimages) {4 int ImageOptions (AddstarClientOptions *options, Image *images, off_t Nimages) { 5 5 6 int i, equivPhotcode, consistent; 6 off_t i; 7 int equivPhotcode, consistent; 7 8 float maxError; 8 9 PhotCode *photcode; -
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/ListenClients_Thread.c
r6674 r27296 14 14 15 15 /* wait for clients to make connection */ 16 BindSocket = WaitServerSocket (InitSocket, &Address, VALID_IP, NVALID );16 BindSocket = WaitServerSocket (InitSocket, &Address, VALID_IP, NVALID_IP); 17 17 if (BindSocket == -1) continue; 18 18 -
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/LoadData.c
r27295 r27296 6 6 7 7 // examine the header sets and set the Image entries for the the valid images 8 int LoadData (FILE *f, char *file, Image **images, int *nvalid, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, int Nimages, AddstarClientOptions *options) {8 int LoadData (FILE *f, char *file, Image **images, off_t *nvalid, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, int Nimages, AddstarClientOptions *options) { 9 9 10 10 char *name; 11 off_t Nskip ;12 int i, j, N valid, Nhead, Ndata;11 off_t Nskip, Nvalid, NVALID; 12 int i, j, Nhead, Ndata; 13 13 uint32_t parentID = UINT32_MAX; 14 14 Stars *inStars; -
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/LoadDataPMM.c
r27295 r27296 16 16 # define MAG_INDEX_ASC 22 17 17 18 int LoadDataPMM (FILE *f, char *file, Image **images, int *nvalid, Stars **stars, unsigned int *Nstars) { 19 18 int LoadDataPMM (FILE *f, char *file, Image **images, off_t *nvalid, Stars **stars, unsigned int *Nstars) { 19 20 off_t Nvalid, NVALID; 20 21 char *name, *buffer; 21 int i, fd, Nbyte, Nline, Nvalid,code;22 int i, fd, Nbyte, Nline, code; 22 23 double ra, dec, mag, airmass, az, ZeroPoint, ZeroPt; 23 24 unsigned int Ninstars, NINSTARS; -
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/LoadDataSDSS.c
r27295 r27296 4 4 // there should only be a single data set (phu + table) in this file 5 5 // each SDSS data set corresponds to 5 images (ugriz) 6 int LoadDataSDSS (FILE *f, char *file, Image **images, int *nvalid, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, int Nimages) {6 int LoadDataSDSS (FILE *f, char *file, Image **images, off_t *nvalid, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, off_t Nimages) { 7 7 8 off_t Nskip ;8 off_t Nskip, Nvalid, NVALID; 9 9 char *name; 10 int j, N valid, Nhead, Ndata;10 int j, Nhead, Ndata; 11 11 unsigned int Ninstars; 12 12 Stars *inStars; -
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/LoadStars.c
r27295 r27296 1 1 # include "addstar.h" 2 2 3 Stars *LoadStars (char *filename, unsigned int *Nstars, Image **images, int *Nimages, AddstarClientOptions *options) {3 Stars *LoadStars (char *filename, unsigned int *Nstars, Image **images, off_t *Nimages, AddstarClientOptions *options) { 4 4 5 off_t *extsize ;6 int i, Nfile, NFILE, Nheaders, NheaderSets,mode;5 off_t *extsize, NheaderSets; 6 int i, Nfile, NFILE, Nheaders, mode; 7 7 char **file, line[1024]; 8 8 FILE *f; … … 81 81 continue; 82 82 } 83 if (VERBOSE) fprintf (stderr, "file %s has %d headers, including % d images\n", file[i], Nheaders,NheaderSets);83 if (VERBOSE) fprintf (stderr, "file %s has %d headers, including %lld images\n", file[i], Nheaders, (long long) NheaderSets); 84 84 85 85 /* supplied photcode is incompatible with multi-chip images */ -
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/MatchHeaders.c
r27295 r27296 3 3 // XXX largely psphot specific 4 4 5 HeaderSet *MatchHeaders (off_t **extsize, int *nimage, int mode, Header **headers, int Nheaders) {5 HeaderSet *MatchHeaders (off_t **extsize, off_t *nimage, int mode, Header **headers, int Nheaders) { 6 6 7 7 int i, j, Nimage, NIMAGE; -
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/ReadStarsFITS.c
r27295 r27296 60 60 Stars *Convert_SMPDATA (FTable *table, unsigned int *nstars) { 61 61 62 unsigned int i, Nstars; 62 off_t Nstars; 63 unsigned int i; 63 64 char swapped; 64 65 double ZeroPt; … … 100 101 Stars *Convert_PS1_DEV_0 (FTable *table, unsigned int *nstars) { 101 102 102 unsigned int i, Nstars; 103 off_t Nstars; 104 unsigned int i; 103 105 double ZeroPt; 104 106 Stars *stars; … … 144 146 Stars *Convert_PS1_DEV_1 (FTable *table, unsigned int *nstars) { 145 147 146 unsigned int i, Nstars; 148 off_t Nstars; 149 unsigned int i; 147 150 double ZeroPt; 148 151 Stars *stars; … … 189 192 Stars *Convert_PS1_V1 (FTable *table, unsigned int *nstars) { 190 193 191 unsigned int i, Nstars; 194 off_t Nstars; 195 unsigned int i; 192 196 double ZeroPt; 193 197 Stars *stars; … … 265 269 Stars *Convert_PS1_V1_Alt (FTable *table, unsigned int *nstars) { 266 270 267 unsigned int i, Nstars; 271 off_t Nstars; 272 unsigned int i; 268 273 double ZeroPt; 269 274 Stars *stars; … … 336 341 Stars *Convert_PS1_V2 (FTable *table, unsigned int *nstars) { 337 342 338 unsigned int i, Nstars; 343 off_t Nstars; 344 unsigned int i; 339 345 double ZeroPt; 340 346 Stars *stars; -
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/ReadStarsSDSS.c
r27295 r27296 31 31 // given a file with the pointer at the start of the table block and the 32 32 // corresponding image header, load the stars from the table 33 Stars *ReadStarsSDSS (FILE *f, char *name, Header *header, Header *in_theader, Image *images, int *nimages, unsigned int *nstars) {34 35 off_t Nskip ;33 Stars *ReadStarsSDSS (FILE *f, char *name, Header *header, Header *in_theader, Image *images, off_t *nimages, unsigned int *nstars) { 34 35 off_t Nskip, Nrow; 36 36 int i, j, N, Nstars, camcol; 37 37 char type[80]; … … 44 44 char filtname[16][5]; 45 45 int photcode[5]; 46 int N row, Ncol; // used in the GET_COLUMN_1,5 macros above46 int Ncol; // used in the GET_COLUMN_1,5 macros above 47 47 48 48 if (in_theader == NULL) { -
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/UpdateImageIDs.c
r27295 r27296 1 1 # include "addstar.h" 2 2 3 int UpdateImageIDs (Stars *stars, unsigned int Nstars, Image *images, int Nimages) {3 int UpdateImageIDs (Stars *stars, unsigned int Nstars, Image *images, off_t Nimages) { 4 4 5 5 int i, status, isEmpty; -
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/addstar.c
r27295 r27296 6 6 unsigned int Nstars, Nsubset; 7 7 int Nmatch, status, loadObjects; 8 int i, Nimages;8 off_t i, Nimages; 9 9 off_t Naverage, Nmeasure; 10 10 Stars *stars, **subset; -
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/addstard.c
r25757 r27296 23 23 24 24 /* wait for clients to make connection */ 25 BindSocket = WaitServerSocket (InitSocket, &Address, VALID_IP, NVALID );25 BindSocket = WaitServerSocket (InitSocket, &Address, VALID_IP, NVALID_ID); 26 26 if (BindSocket == -1) continue; 27 27 -
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/fakeimage.c
r21508 r27296 1 1 # include "addstar.h" 2 2 3 Image *fakeimage (char *rootname, int *Nimage, int photcode) {3 Image *fakeimage (char *rootname, off_t *Nimage, int photcode) { 4 4 5 5 int i, j, Nx, Ny, Nchips; -
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/getgsc.c
r27295 r27296 9 9 Stars *getgsc (SkyRegion *patch, unsigned int *NSTARS) { 10 10 11 int i, Ngsc, Nstars;11 unsigned int i, Ngsc, Nstars; 12 12 Stars *gsc; 13 13 Stars *stars; -
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/greference.c
r27295 r27296 5 5 Stars *greference (char *Refcat, SkyRegion *region, int photcode, unsigned int *nstars) { 6 6 7 int Nstars;7 unsigned int Nstars; 8 8 Stars *stars; 9 9 -
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/sky_tessalation.c
r23914 r27296 947 947 } 948 948 REALLOCATE (db[0].vtable.buffer, char *, 1); 949 REALLOCATE (db[0].vtable.row, int, 1);949 REALLOCATE (db[0].vtable.row, off_t, 1); 950 950 db[0].vtable.Nrow = 0; 951 951 -
branches/eam_branches/largefiles.20100314/Ohana/src/gastro/src/gfit.c
r27295 r27296 7 7 int gfit (SStars *stars1, SStars *stars2, int N1, int N2, Coords *coords, int NX, int NY, double *Radius, double *DR, int *Nmatch, int mode) { 8 8 9 int i, j, iteration, Niter, last, halt, first_j, *Nextra,extras;9 int i, j, iteration, Niter, last, halt, first_j, extras; 10 10 off_t *tmpN1, *tmpN2; 11 11 double X_O, X_X, X_Y, dX; … … 42 42 ALLOCATE (tmpX1, double, N1); 43 43 ALLOCATE (tmpY1, double, N1); 44 ALLOCATE (tmpN1, int, N1);44 ALLOCATE (tmpN1, off_t, N1); 45 45 46 46 ALLOCATE (tmpX2, double, N2); 47 47 ALLOCATE (tmpY2, double, N2); 48 ALLOCATE (tmpN2, int, N2); 49 ALLOCATE (Nextra, int, N2); 50 bzero (Nextra, sizeof(int) * N2); 48 ALLOCATE (tmpN2, off_t, N2); 51 49 52 50 dX = dY = N = 0; -
branches/eam_branches/largefiles.20100314/Ohana/src/gastro/src/gfitpoly.c
r27295 r27296 52 52 ALLOCATE (tmpX1, double, N1); 53 53 ALLOCATE (tmpY1, double, N1); 54 ALLOCATE (tmpN1, int, N1);54 ALLOCATE (tmpN1, off_t, N1); 55 55 56 56 ALLOCATE (tmpX2, double, N2); 57 57 ALLOCATE (tmpY2, double, N2); 58 ALLOCATE (tmpN2, int, N2);58 ALLOCATE (tmpN2, off_t, N2); 59 59 60 60 /* assign and sort list */ -
branches/eam_branches/largefiles.20100314/Ohana/src/getstar/include/dvoImageExtract.h
r21153 r27296 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); -
branches/eam_branches/largefiles.20100314/Ohana/src/getstar/include/dvoImageOverlaps.h
r21153 r27296 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); -
branches/eam_branches/largefiles.20100314/Ohana/src/getstar/include/dvoImagesAtCoords.h
r26288 r27296 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); -
branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/ConfigInit_coords.c
r27142 r27296 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; -
branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/ConfigInit_extract.c
r25757 r27296 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); -
branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/ConfigInit_overlaps.c
r25757 r27296 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); -
branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/ListImageOverlaps.c
r12774 r27296 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++) { -
branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/MatchCoords.c
r26142 r27296 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 -
branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/MatchImages.c
r14590 r27296 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; -
branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/ReadImageFiles.c
r27295 r27296 2 2 # define DVO_IMAGE_NAME_LEN 128 3 3 4 Image *ReadImageFiles (char *filename, int *Nimages) {4 Image *ReadImageFiles (char *filename, off_t *Nimages) { 5 5 6 6 off_t Nskip, *extsize; 7 7 int i, j, N, Nfile, Nheader, Nimage, NHEADER, NIMAGE; 8 int N skip, Nhead, Ndata, done, status, mode;8 int Nhead, Ndata, done, status, mode; 9 9 char **file, *name; 10 10 FILE *f; -
branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/SelectImages.c
r14590 r27296 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; -
branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/WriteImages.c
r14590 r27296 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; -
branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/dvoImageExtract.c
r14590 r27296 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; -
branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/dvoImageOverlaps.c
r14590 r27296 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; -
branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/dvoImagesAtCoords.c
r26288 r27296 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; -
branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/select_by_region.c
r20266 r27296 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 } -
branches/eam_branches/largefiles.20100314/Ohana/src/imregister/imphot/rtext.c
r27295 r27296 21 21 Ndata = (filestatus.st_size - db[0].header.datasize) / sizeof (Image); 22 22 if (VERBOSE) fprintf (stderr, "ERROR: image catalog has inconsistent size\n"); 23 if (VERBOSE) fprintf (stderr, "header: % d, data: %d\n",Nimage, Ndata);23 if (VERBOSE) fprintf (stderr, "header: %lld, data: %d\n", (long long) Nimage, Ndata); 24 24 if (!FORCE_READ) exit (1); 25 25 Nimage = Ndata; -
branches/eam_branches/largefiles.20100314/Ohana/src/kapa2/src/LoadPicture.c
r27295 r27296 85 85 fcntl (sock, F_SETFL, !O_NONBLOCK); 86 86 87 if (DEBUG) fprintf (stderr, "read % d bytes\n",image[0].image[0].matrix.datasize);88 /* it it not obvious this condition should kill k ii, but ... */87 if (DEBUG) fprintf (stderr, "read %lld bytes\n", (long long) image[0].image[0].matrix.datasize); 88 /* it it not obvious this condition should kill kapa, but ... */ 89 89 if (image[0].image[0].matrix.datasize != header.datasize) { 90 fprintf (stderr, "error: expected %lld bytes, but got only %lld\n", header.datasize,image[0].image[0].matrix.datasize);90 fprintf (stderr, "error: expected %lld bytes, but got only %lld\n", (long long) header.datasize, (long long) image[0].image[0].matrix.datasize); 91 91 return (FALSE); 92 92 } -
branches/eam_branches/largefiles.20100314/Ohana/src/kapa2/src/PNGit.c
r26891 r27296 9 9 int Npalette; 10 10 char filename[1024]; 11 int Nbytes, status;12 11 bDrawBuffer *buffer; 13 12 Graphic *graphic; -
branches/eam_branches/largefiles.20100314/Ohana/src/kapa2/src/PPMit.c
r26891 r27296 5 5 FILE *f; 6 6 char *line, filename[1024]; 7 int Nbytes, status,dx, dy, i, j, Npalette, color;7 int dx, dy, i, j, Npalette, color; 8 8 png_color *palette; 9 9 bDrawBuffer *buffer; -
branches/eam_branches/largefiles.20100314/Ohana/src/kapa2/src/Relocate.c
r25757 r27296 4 4 int Relocate (int sock) { 5 5 6 int i, Nsection;7 6 int x, y, dX, dY; 8 7 Graphic *graphic; 9 Section *section;10 8 11 9 graphic = GetGraphic(); -
branches/eam_branches/largefiles.20100314/Ohana/src/libdvo/include/dvo.h
r27295 r27296 282 282 283 283 int isRegisteredMosaic (void); 284 int GetRegisteredMosaic (void);284 off_t GetRegisteredMosaic (void); 285 285 int GetMosaicCoords (Coords *coords); 286 int FindMosaicForImage (Image *images, int Nimages, int entry);287 int FindMosaicForImage_TableSearch (Image *images, int Nimages, int entry);288 int FindMosaicForImage_MatchSearch (Image *images, int Nimages, int entry);289 int BuildChipMatch (Image *images, int Nimages);286 int FindMosaicForImage (Image *images, off_t Nimages, off_t entry); 287 int FindMosaicForImage_TableSearch (Image *images, off_t Nimages, off_t entry); 288 int FindMosaicForImage_MatchSearch (Image *images, off_t Nimages, off_t entry); 289 int BuildChipMatch (Image *images, off_t Nimages); 290 290 void SetImageCorners (double *X, double *Y, Image *image); 291 291 -
branches/eam_branches/largefiles.20100314/Ohana/src/libdvo/src/mosaic_astrom.c
r21047 r27296 3 3 /* chip-match table: j = ChipMatch[i], images[j] is DIS for images[i] WRP */ 4 4 5 static intiDIS = -1; // DIS entry in ChipMatch[]6 static intNdis = 0;7 static int*DISentry = NULL;5 static off_t iDIS = -1; // DIS entry in ChipMatch[] 6 static off_t Ndis = 0; 7 static off_t *DISentry = NULL; 8 8 static e_time *DIStzero = NULL; 9 static int*ChipMatch = NULL;9 static off_t *ChipMatch = NULL; 10 10 11 11 /* what is the currently registered mosaic image? */ 12 int GetRegisteredMosaic () {12 off_t GetRegisteredMosaic () { 13 13 return (iDIS); 14 14 } 15 15 16 16 /* given an image array and a current entry of type WRP, find matching DIS & Register it */ 17 int FindMosaicForImage (Image *images, int Nimages, int entry) {17 int FindMosaicForImage (Image *images, off_t Nimages, off_t entry) { 18 18 19 19 int status; … … 28 28 29 29 /* given an image array and a current entry of type WRP, find matching DIS & Register it */ 30 int FindMosaicForImage_TableSearch (Image *images, int Nimages, int entry) {30 int FindMosaicForImage_TableSearch (Image *images, off_t Nimages, off_t entry) { 31 31 32 32 e_time tzero; 33 int i;33 off_t i; 34 34 35 35 /* search backwards for image with same time and type DIS */ … … 65 65 66 66 /* given an image array and a current entry of type WRP, find matching DIS & Register it */ 67 int FindMosaicForImage_MatchSearch (Image *images, int Nimages, int entry) {67 int FindMosaicForImage_MatchSearch (Image *images, off_t Nimages, off_t entry) { 68 68 69 int N;69 off_t N; 70 70 71 71 if (strcmp(&images[entry].coords.ctype[4], "-WRP")) { … … 85 85 } 86 86 87 int BuildChipMatch (Image *images, int Nimages) {87 int BuildChipMatch (Image *images, off_t Nimages) { 88 88 89 int i, j, NDIS;89 off_t i, j, NDIS; 90 90 91 91 if (DISentry != NULL) free (DISentry); … … 96 96 Ndis = 0; 97 97 NDIS = 100; 98 ALLOCATE (DISentry, int, NDIS);98 ALLOCATE (DISentry, off_t, NDIS); 99 99 ALLOCATE (DIStzero, e_time, NDIS); 100 100 … … 106 106 if (Ndis >= NDIS) { 107 107 NDIS += 100; 108 REALLOCATE (DISentry, int, NDIS);108 REALLOCATE (DISentry, off_t, NDIS); 109 109 REALLOCATE (DIStzero, e_time, NDIS); 110 110 } … … 112 112 113 113 /* find all matched WRP images */ 114 ALLOCATE (ChipMatch, int, Nimages);114 ALLOCATE (ChipMatch, off_t, Nimages); 115 115 for (i = 0; i < Nimages; i++) { 116 116 ChipMatch[i] = -1; -
branches/eam_branches/largefiles.20100314/Ohana/src/mosastro/src/rfits.c
r27295 r27296 30 30 } 31 31 32 stars = gfits_table_get_SMPData (&table, &mychip[0].Nstars, NULL); 32 off_t Nstars; 33 stars = gfits_table_get_SMPData (&table, &Nstars, NULL); 34 mychip[0].Nstars = Nstars; 33 35 gfits_scan (table.header, "NAXIS1", "%d", 1, &Nx); 34 36 -
branches/eam_branches/largefiles.20100314/Ohana/src/opihi/dvo/imdata.c
r20936 r27296 3 3 int imdata (int argc, char **argv) { 4 4 5 int i, j, k, I;6 int N image, N, NPTS, found, mode, TimeSelect;7 int n, Nregions, NREGIONS, TimeFormat;8 int *subset, Nsubset;5 off_t i, j, k, n, I; 6 int N, NPTS, found, mode, TimeSelect, TimeFormat; 7 off_t Nregions, NREGIONS; 8 off_t *subset, Nsubset, Nimage; 9 9 double trange; 10 10 time_t tzero, start, stop, TimeReference; -
branches/eam_branches/largefiles.20100314/Ohana/src/opihi/dvo/lcurve.c
r27295 r27296 8 8 int kapa, TimeFormat; 9 9 int found, AutoLimits, ErrorBars, GalMag, AbsPhot, SaveVectors; 10 off_t i, Nstars, *N1;11 int j, m,N, NPTS;10 off_t i, j, m, Nstars, *N1; 11 int N, NPTS; 12 12 time_t TimeReference; 13 13 struct tm *timeptr; -
branches/eam_branches/largefiles.20100314/Ohana/src/opihi/dvo/lightcurve.c
r27295 r27296 5 5 double Ra, Dec, Radius, Radius2, r; 6 6 double *RA, *DEC; 7 off_t i, Nstars, *N1;7 off_t i, j, k, m, Nstars, *N1; 8 8 int found, PhotCodeSelect; 9 int j, k, m,N, NPTS, Nsecfilt, RELPHOT, TimeFormat;9 int N, NPTS, Nsecfilt, RELPHOT, TimeFormat; 10 10 time_t TimeReference; 11 11 -
branches/eam_branches/largefiles.20100314/Ohana/src/opihi/dvo/mextract.c
r26285 r27296 3 3 int mextract (int argc, char **argv) { 4 4 5 int i, j, k, m, n, N, Npts, NPTS, last, next, state, Nfields, Nreturn, Ncstack, Nstack; 5 off_t i, j, k, m; // used for counter averages and measures 6 int n, N, Npts, NPTS, last, next, state, Nfields, Nreturn, Ncstack, Nstack; 6 7 int Nsecfilt, VERBOSE, loadImages, mosaicMode; 7 8 char **cstack, name[1024]; -
branches/eam_branches/largefiles.20100314/Ohana/src/opihi/dvo/mmextract.c
r24233 r27296 3 3 int mmextract (int argc, char **argv) { 4 4 5 int i, j, k, m, n, N, Npts, NPTS, last, next, state; 5 off_t i, j, k, m; 6 int n, N, Npts, NPTS, last, next, state; 6 7 int Nfields, Nreturn, Nreturn_base, Ncstack1, Ncstack2, Nstack1, Nstack2; 7 8 int Nwhere, Iwhere, Nmatch, Imatch, NTABLE, Nt1, Nt2, n1, n2; -
branches/eam_branches/largefiles.20100314/Ohana/src/opihi/dvo/pmeasure.c
r21508 r27296 7 7 8 8 FILE *f; 9 int i, j, k, m, kapa, Narg, Npts, NPTS, status, VERBOSE, TimeSelect, Nloaded; 9 off_t i, j, k, m; 10 int kapa, Narg, Npts, NPTS, status, VERBOSE, TimeSelect, Nloaded; 10 11 double Mz, Mr, mag; 11 12 double Radius, Rmin, Rmax, R, D, trange; -
branches/eam_branches/largefiles.20100314/Ohana/src/opihi/dvo/subpix.c
r27295 r27296 3 3 int subpix (int argc, char **argv) { 4 4 5 int i, j, I,Nlo, Nhi, *entry, Nentry;6 off_t *index, Nstars, Nimage, Nmeasure;7 int Nmin, Nsub, NSUB, status;8 int TimeFormat;5 off_t Nlo, Nhi, *entry, Nentry; 6 off_t j, i, I, *index, Nstars, Nimage, Nmeasure; 7 off_t Nmin, Nsub, NSUB; 8 int status, TimeFormat; 9 9 time_t Timage, TimeReference; 10 10 double X, Y, Mabs, t; … … 65 65 Nlo = bracket (DEC, Nstars, FALSE, Dec - Radius); 66 66 Nhi = bracket (DEC, Nstars, TRUE, Dec + Radius); 67 ALLOCATE (entry, int, MAX (Nhi - Nlo, 1));67 ALLOCATE (entry, off_t, MAX (Nhi - Nlo, 1)); 68 68 Nentry = 0; 69 69 … … 111 111 Nsub = 0; 112 112 NSUB = 100; 113 ALLOCATE (index, int, NSUB);113 ALLOCATE (index, off_t, NSUB); 114 114 115 115 /* load all images, extract those touching Ra, Dec */ … … 125 125 if (Nsub == NSUB - 1) { 126 126 NSUB += 100; 127 REALLOCATE (index, int, NSUB);127 REALLOCATE (index, off_t, NSUB); 128 128 } 129 129 }
Note:
See TracChangeset
for help on using the changeset viewer.
