Changeset 27435 for trunk/Ohana/src/addstar
- Timestamp:
- Mar 24, 2010, 11:22:25 AM (16 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 1 deleted
- 47 edited
- 6 copied
-
. (modified) (1 prop)
-
src/addstar/include/addstar.h (modified) (9 diffs)
-
src/addstar/include/skycells.h (modified) (1 diff)
-
src/addstar/src/ConfigInit.c (modified) (3 diffs)
-
src/addstar/src/FilterStars.c (modified) (1 diff)
-
src/addstar/src/GetFileMode.c (modified) (1 diff)
-
src/addstar/src/GetZeroPointExposure.c (modified) (2 diffs)
-
src/addstar/src/ImageOptions.c (modified) (1 diff)
-
src/addstar/src/ListenClients_Thread.c (modified) (1 diff)
-
src/addstar/src/LoadData.c (modified) (2 diffs)
-
src/addstar/src/LoadDataPMM.c (modified) (1 diff)
-
src/addstar/src/LoadDataSDSS.c (modified) (2 diffs)
-
src/addstar/src/LoadHeaders.c (modified) (2 diffs)
-
src/addstar/src/LoadStars.c (modified) (2 diffs)
-
src/addstar/src/MatchHeaders.c (modified) (5 diffs)
-
src/addstar/src/ReadImageHeader.c (modified) (1 diff)
-
src/addstar/src/ReadStarsFITS.c (modified) (8 diffs)
-
src/addstar/src/ReadStarsSDSS.c (modified) (3 diffs)
-
src/addstar/src/SkyListForStars.c (modified) (1 diff)
-
src/addstar/src/SkyTableFromTychoIndex.c (modified) (1 diff)
-
src/addstar/src/UpdateDatabase_Image.c (modified) (1 diff)
-
src/addstar/src/UpdateDatabase_Reflist.c (modified) (1 diff)
-
src/addstar/src/UpdateImageIDs.c (modified) (1 diff)
-
src/addstar/src/addstar.c (modified) (5 diffs)
-
src/addstar/src/addstard.c (modified) (1 diff)
-
src/addstar/src/build_links.c (modified) (13 diffs)
-
src/addstar/src/calibrate.c (modified) (3 diffs)
-
src/addstar/src/dump.c (modified) (1 diff)
-
src/addstar/src/fakeimage.c (modified) (1 diff)
-
src/addstar/src/find_matches.c (modified) (6 diffs)
-
src/addstar/src/find_matches_closest.c (modified) (8 diffs)
-
src/addstar/src/find_matches_closest_refstars.c (modified) (7 diffs)
-
src/addstar/src/find_matches_refstars.c (modified) (6 diffs)
-
src/addstar/src/find_subset.c (modified) (1 diff)
-
src/addstar/src/get2mass.c (modified) (1 diff)
-
src/addstar/src/getgsc.c (modified) (2 diffs)
-
src/addstar/src/gettycho.c (modified) (3 diffs)
-
src/addstar/src/getusno.c (modified) (2 diffs)
-
src/addstar/src/getusnob.c (modified) (2 diffs)
-
src/addstar/src/greference.c (modified) (1 diff)
-
src/addstar/src/grefstars.c (modified) (1 diff)
-
src/addstar/src/gztest.c (modified) (3 diffs)
-
src/addstar/src/mkcmf.c (modified) (4 diffs)
-
src/addstar/src/psps_ids.c (modified) (1 prop)
-
src/addstar/src/resort_catalog.c (modified) (2 diffs)
-
src/addstar/src/sky_tessalation.c (modified) (1 diff)
-
src/addstar/src/update_coords.c (modified) (1 diff)
-
src/addstar/test/addstar.sh (deleted)
-
src/addstar/test/addstar.tests.txt (copied) (copied from branches/eam_branches/largefiles.20100314/Ohana/src/addstar/test/addstar.tests.txt )
-
src/addstar/test/dvomerge.dvo (copied) (copied from branches/eam_branches/largefiles.20100314/Ohana/src/addstar/test/dvomerge.dvo )
-
src/addstar/test/relastro.dvo (copied) (copied from branches/eam_branches/largefiles.20100314/Ohana/src/addstar/test/relastro.dvo )
-
src/addstar/test/relphot.dvo (copied) (copied from branches/eam_branches/largefiles.20100314/Ohana/src/addstar/test/relphot.dvo )
-
src/addstar/test/simple.dvo (copied) (copied from branches/eam_branches/largefiles.20100314/Ohana/src/addstar/test/simple.dvo )
-
src/addstar/test/tap.dvo (copied) (copied from branches/eam_branches/largefiles.20100314/Ohana/src/addstar/test/tap.dvo )
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/addstar/include/addstar.h
r27392 r27435 44 44 45 45 typedef struct { 46 int Nstars;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 */ … … 152 152 AddstarClientOptions args PROTO((int argc, char **argv, AddstarClientOptions options)); 153 153 154 void AddToCalibration PROTO((Average *average, SecFilt *secfilt, Measure *measure, Measure *new, int *next, int Nstar));154 void AddToCalibration PROTO((Average *average, SecFilt *secfilt, Measure *measure, Measure *new, off_t *next, off_t Nstar)); 155 155 void FindCalibration PROTO((Image *image)); 156 156 FILE *GetDB PROTO((int *state)); 157 157 void InitCalibration PROTO((int mode)); 158 void SaveCalibration PROTO((float Mo, float dMo, float Mr, float dMr, float Mi, int N));158 void SaveCalibration PROTO((float Mo, float dMo, float Mr, float dMr, float Mi, off_t N)); 159 159 void SetProtect PROTO((int mode)); 160 160 int SetSignals PROTO((void)); 161 int Shutdown PROTO((char *message, ...)) ;161 int Shutdown PROTO((char *message, ...)) OHANA_FORMAT(printf, 1, 2); 162 162 void TrapSignal PROTO((int sig)); 163 163 float airmass PROTO((float secz_image, double ra, double dec, double st, double latitude)); … … 166 166 SkyTable *SkyTableFromTychoIndex PROTO((char *filename, int VERBOSE)); 167 167 void check_permissions PROTO((char *basefile)); 168 int dump_rawstars PROTO((Stars *stars, int Nstars));168 int dump_rawstars PROTO((Stars *stars, unsigned int Nstars)); 169 169 int edge_check PROTO((double *x1, double *y1, double *x2, double *y2)); 170 Image *fakeimage PROTO((char *rootname, int *Nimage, int photcode));171 172 int find_matches PROTO((SkyRegion *region, Stars *stars,int Nstars, Catalog *catalog, AddstarClientOptions options));173 int find_matches_closest PROTO((SkyRegion *region, Stars *stars,int Nstars, Catalog *catalog, AddstarClientOptions options));174 int find_matches_refstars PROTO((SkyRegion *region, Stars **stars,int Nstars, Catalog *catalog, AddstarClientOptions options));175 int find_matches_closest_refstars PROTO((SkyRegion *region, Stars **stars,int Nstars, Catalog *catalog, AddstarClientOptions options));176 177 Stars **find_subset PROTO((SkyRegion *region, Stars *stars, int Nstars,int *NSTARS));170 Image *fakeimage PROTO((char *rootname, off_t *Nimage, int photcode)); 171 172 int find_matches PROTO((SkyRegion *region, Stars *stars, unsigned int Nstars, Catalog *catalog, AddstarClientOptions options)); 173 int find_matches_closest PROTO((SkyRegion *region, Stars *stars, unsigned int Nstars, Catalog *catalog, AddstarClientOptions options)); 174 int find_matches_refstars PROTO((SkyRegion *region, Stars **stars, unsigned int Nstars, Catalog *catalog, AddstarClientOptions options)); 175 int find_matches_closest_refstars PROTO((SkyRegion *region, Stars **stars, unsigned int Nstars, Catalog *catalog, AddstarClientOptions options)); 176 177 Stars **find_subset PROTO((SkyRegion *region, Stars *stars, unsigned int Nstars, unsigned int *NSTARS)); 178 178 int gcatalog PROTO((Catalog *catalog)); 179 Stars *get2mass PROTO((SkyRegion *patch, int photcode, int mode, int *NSTARS));179 Stars *get2mass PROTO((SkyRegion *patch, int photcode, int mode, unsigned int *NSTARS)); 180 180 double get_subpix PROTO((double x, double y)); 181 181 182 Stars *greference PROTO((char *Refcat, SkyRegion *catstats, int photcode, int *nstars));183 Stars *getgsc PROTO((SkyRegion *patch, int *NSTARS));184 Stars *gettycho PROTO((SkyRegion *catstats, int photcode, int *Nstars));185 Stars *getusno PROTO((SkyRegion *catstats, int photcode, int *Nstars));186 Stars *getusnob PROTO((SkyRegion *catstats, int photcode, int *Nstars));182 Stars *greference PROTO((char *Refcat, SkyRegion *catstats, int photcode, unsigned int *nstars)); 183 Stars *getgsc PROTO((SkyRegion *patch, unsigned int *NSTARS)); 184 Stars *gettycho PROTO((SkyRegion *catstats, int photcode, unsigned int *Nstars)); 185 Stars *getusno PROTO((SkyRegion *catstats, int photcode, unsigned int *Nstars)); 186 Stars *getusnob PROTO((SkyRegion *catstats, int photcode, unsigned int *Nstars)); 187 187 188 188 // load text-based stars (REF only in the sense of REF photcodes) 189 Stars *grefstars PROTO((char *file, int photcode, int *Nstars));190 191 Stars *LoadStars PROTO((char *file, int *Nstars, Image **images, int *Nimages, AddstarClientOptions *options));189 Stars *grefstars PROTO((char *file, int photcode, unsigned int *Nstars)); 190 191 Stars *LoadStars PROTO((char *file, unsigned int *Nstars, Image **images, off_t *Nimages, AddstarClientOptions *options)); 192 192 Header **LoadHeaders PROTO((FILE *f, int *mode, int *Nheader)); 193 HeaderSet *MatchHeaders PROTO(( int **extsize, int *nimage, int mode, Header **headers, int Nheaders));194 int LoadData PROTO((FILE *f, char *file, Image **images, int *nvalid, Stars **stars, int *Nstars, Header **headers, int *extsize, HeaderSet *headerSets, int NheaderSets, AddstarClientOptions *options));195 int GetZeroPointExposure PROTO((Header **headers, HeaderSet *headerSets, int Nimages));193 HeaderSet *MatchHeaders PROTO((off_t **extsize, off_t *nimage, int mode, Header **headers, int Nheaders)); 194 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)); 195 int GetZeroPointExposure PROTO((Header **headers, HeaderSet *headerSets, off_t Nimages)); 196 196 197 197 int in_image PROTO((double r, double d, Image *image)); … … 200 200 void lock_image_db PROTO((FITS_DB *db, char *filename)); 201 201 int main PROTO((int argc, char **argv)); 202 void make_backup PROTO((char *filename));203 int match_refstars PROTO((Stars *stars, int Nstars));204 void mkcatalog PROTO((SkyRegion *region, Catalog *catalog));205 202 double opening_angle PROTO((double x1, double y1, double x2, double y2, double x3, double y3)); 206 203 int parse_time PROTO((Header *header)); 207 Stars *rd_gsc PROTO((char *filename, int *nstars));204 Stars *rd_gsc PROTO((char *filename, unsigned int *nstars)); 208 205 int replace_match PROTO((Average *average, Measure *measure, Stars *star)); 209 206 void resort_catalog PROTO((Catalog *catalog)); 210 Stars *rfits PROTO((FILE *f, unsigned int *nstars));211 Stars *rtext PROTO((FILE *f, unsigned int *nstars));212 207 Stars *ReadStarsFITS PROTO((FILE *f, Header *header, Header *in_theader, unsigned int *nstars)); 213 208 Stars *ReadStarsTEXT PROTO((FILE *f, unsigned int *nstars)); 214 Stars *ReadStarsSDSS PROTO((FILE *f, char *name, Header *header, Header *in_theader, Image *images, int *nimages, unsigned int *nstars));209 Stars *ReadStarsSDSS PROTO((FILE *f, char *name, Header *header, Header *in_theader, Image *images, off_t *nimages, unsigned int *nstars)); 215 210 int ReadImageHeader PROTO((Header *header, Image *image, int photcode)); 216 211 Stars *FilterStars PROTO((Stars *instars, Image *image, unsigned int imageID)); 217 Stars *MergeStars PROTO((Stars *stars, int *Nstars, Stars *instars, int Ninstars)); 218 void save_pt_catalog PROTO((Catalog *catalog)); /*** choose new name ***/ 212 Stars *MergeStars PROTO((Stars *stars, unsigned int *Nstars, Stars *instars, unsigned int Ninstars)); 219 213 double scat_subpix PROTO((double x, double y)); 220 time_t short_date_to_sec PROTO((char *date)); 221 void sort_lists PROTO((float *X, float *Y, int *S, int N)); 222 void sort_stars PROTO((Stars *stars, int N)); 223 int str_to_radec PROTO((double *ra, double *dec, char *str1, char *str2)); 224 void unlock_image_db PROTO((FITS_DB *db)); 225 void update_coords PROTO((Average *average, Measure *measure, int *next)); 226 void wcatalog PROTO((Catalog *catalog)); 227 void free_catalog PROTO((Catalog *catalog)); 228 void wimage PROTO((FITS_DB *db, Image *image)); 229 void create_image_db PROTO((FITS_DB *db)); 230 void set_db PROTO((FITS_DB *in)); 231 void uppercase PROTO((char *string)); 232 void fsort PROTO((float *X, int N)); 233 void fsort2 PROTO((float *X, float *Y, int N)); 234 int *init_measure_links PROTO((Average *average, int Naverage, Measure *measure, int Nmeasure)); 235 int *init_missing_links PROTO((Average *average, int Naverage, Missing *missing, int Nmissing)); 236 int add_meas_link PROTO((Average *average, int *next, int Nmeasure, int NMEASURE)); 237 int add_miss_link PROTO((Average *average, int *next, int Nmissing)); 238 int *build_measure_links PROTO((Average *average, int Naverage, Measure *measure, int Nmeasure)); 239 Measure *sort_measure PROTO((Average *average, int Naverage, Measure *measure, int Nmeasure, int *next)); 240 Missing *sort_missing PROTO((Average *average, int Naverage, Missing *missing, int Nmissing, int *next_miss)); 241 int ImageOptions PROTO((AddstarClientOptions *options, Image *images, int Nimages)); 214 void update_coords PROTO((Average *average, Measure *measure, off_t *next)); 215 off_t *init_measure_links PROTO((Average *average, off_t Naverage, Measure *measure, off_t Nmeasure)); 216 off_t *init_missing_links PROTO((Average *average, off_t Naverage, Missing *missing, off_t Nmissing)); 217 off_t add_meas_link PROTO((Average *average, off_t *next_meas, off_t Nmeasure, off_t NMEASURE)); 218 off_t add_miss_link PROTO((Average *average, off_t *next_miss, off_t Nmissing)); 219 off_t *build_measure_links PROTO((Average *average, off_t Naverage, Measure *measure, off_t Nmeasure)); 220 Measure *sort_measure PROTO((Average *average, off_t Naverage, Measure *measure, off_t Nmeasure, off_t *next_meas)); 221 Missing *sort_missing PROTO((Average *average, off_t Naverage, Missing *missing, off_t Nmissing, off_t *next_miss)); 222 int ImageOptions PROTO((AddstarClientOptions *options, Image *images, off_t Nimages)); 242 223 int GetFileMode PROTO((Header *header)); 243 224 AddstarClientOptions args_client PROTO((int argc, char **argv, AddstarClientOptions options)); … … 252 233 int WaitServerSocket PROTO((int InitSocket, SockAddress *Address, int *validIP, int Nvalid)); 253 234 int GetClientSocket PROTO((char *hostname)); 254 int UpdateDatabase_Image PROTO((AddstarClientOptions *options, Image *images, int Nimages, Coords *mosaic, Stars *stars,int Nstars));255 int UpdateDatabase_Reflist PROTO((AddstarClientOptions *options, Stars *stars, int Nstars));235 int UpdateDatabase_Image PROTO((AddstarClientOptions *options, Image *images, off_t Nimages, Coords *mosaic, Stars *stars, unsigned int Nstars)); 236 int UpdateDatabase_Reflist PROTO((AddstarClientOptions *options, Stars *stars, unsigned int Nstars)); 256 237 int UpdateDatabase_Refcat PROTO((AddstarClientOptions *options, SkyRegion *UserPatch, char *refcat)); 257 SkyList *SkyListForStars PROTO((SkyTable *table, int depth, Stars *stars, int Nstars));238 SkyList *SkyListForStars PROTO((SkyTable *table, int depth, Stars *stars, unsigned int Nstars)); 258 239 SkyList *SkyListExistingSubset PROTO((SkyList *input, char *path)); 259 240 int SkyListSetPath PROTO((SkyList *list, char *path)); … … 266 247 int NewReflist_Thread PROTO((int BindSocket)); 267 248 268 Stars *Convert_SMPDATA PROTO((FTable *table, int *nstars));269 Stars *Convert_PS1_DEV_0 PROTO((FTable *table, int *nstars));270 Stars *Convert_PS1_DEV_1 PROTO((FTable *table, int *nstars));271 Stars *Convert_PS1_V1 PROTO((FTable *table, int *nstars));272 Stars *Convert_PS1_V1_Alt PROTO((FTable *table, int *nstars));273 Stars *Convert_PS1_V2 PROTO((FTable *table, int *nstars));249 Stars *Convert_SMPDATA PROTO((FTable *table, unsigned int *nstars)); 250 Stars *Convert_PS1_DEV_0 PROTO((FTable *table, unsigned int *nstars)); 251 Stars *Convert_PS1_DEV_1 PROTO((FTable *table, unsigned int *nstars)); 252 Stars *Convert_PS1_V1 PROTO((FTable *table, unsigned int *nstars)); 253 Stars *Convert_PS1_V1_Alt PROTO((FTable *table, unsigned int *nstars)); 254 Stars *Convert_PS1_V2 PROTO((FTable *table, unsigned int *nstars)); 274 255 275 256 int InitStar PROTO((Stars *star)); … … 279 260 int args_skycells (int argc, char **argv); 280 261 int ConfigInit_skycells (int *argc, char **argv); 281 int UpdateImageIDs (Stars *stars, int Nstars, Image *images, int Nimages);282 int LoadDataSDSS (FILE *f, char *file, Image **images, int *nvalid, Stars **stars, int *Nstars, Header **headers, int *extsize, HeaderSet *headerSets, int Nimages); 283 int altaz (double *alt, double *az, double ha, double dec, double latitude);284 285 int LoadDataPMM (FILE *f, char *file, Image **images, int *nvalid, Stars **stars, int *Nstars); 262 int UpdateImageIDs (Stars *stars, unsigned int Nstars, Image *images, off_t Nimages); 263 264 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); 265 int LoadDataPMM (FILE *f, char *file, Image **images, off_t *nvalid, Stars **stars, unsigned int *Nstars); 266 286 267 PhotCode *LoadMetadataPMM (char *datafile, Image *image); 287 268 time_t pmm_date_to_sec (char *date, char *time); … … 293 274 uint64_t CreatePSPSDetectionID(double tobs, int ccdid, int detID); 294 275 uint64_t CreatePSPSObjectID(double ra, double dec); 276 277 int altaz (double *alt, double *az, double ha, double dec, double latitude); 295 278 296 279 // this is a gnu extension?? caution! -
trunk/Ohana/src/addstar/include/skycells.h
r23914 r27435 78 78 void SetProtect PROTO((int mode)); 79 79 int SetSignals PROTO((void)); 80 int Shutdown PROTO((char *message, ...) ; )80 int Shutdown PROTO((char *message, ...)) OHANA_FORMAT(printf, 1, 2); 81 81 void TrapSignal PROTO((int sig)); 82 82 -
trunk/Ohana/src/addstar/src/ConfigInit.c
r25757 r27435 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; … … 172 172 } else { 173 173 options.radius = atof (RadiusWord); 174 if (options.radius < 1e-6) { 175 fprintf (stderr, "non-sensical correlation radius %f\n", options.radius); 176 exit (1); 177 } 174 178 } 175 179 -
trunk/Ohana/src/addstar/src/FilterStars.c
r26384 r27435 109 109 } 110 110 111 Stars *MergeStars (Stars *stars, int *Nstars, Stars *instars,int Ninstars) {111 Stars *MergeStars (Stars *stars, unsigned int *Nstars, Stars *instars, unsigned int Ninstars) { 112 112 113 113 int i, j; -
trunk/Ohana/src/addstar/src/GetFileMode.c
r21508 r27435 4 4 int GetFileMode (Header *header) { 5 5 6 char ctype[80] ;6 char ctype[80], ctmp; 7 7 int Naxis; 8 8 int simple, extend, haveNaxis, haveCTYPE; 9 int tmp,havePHOT_VER, haveTARG_VER;9 int havePHOT_VER, haveTARG_VER; 10 10 11 gfits_scan (header, "SIMPLE", "%t", 1, &simple);11 gfits_scan_alt (header, "SIMPLE", "%t", 1, &simple); 12 12 haveNaxis = gfits_scan (header, "NAXIS", "%d", 1, &Naxis); 13 13 haveCTYPE = gfits_scan (header, "CTYPE1", "%s", 1, ctype); 14 14 15 gfits_scan (header, "EXTEND", "%t", 1, &extend);15 gfits_scan_alt (header, "EXTEND", "%t", 1, &extend); 16 16 17 17 // SDSS tsObj files have a version number for the PHOTO and 18 18 // TS (target selection) pipelines present as header keywords 19 havePHOT_VER = gfits_scan (header, "PHOT_VER", "%s", 1, & tmp);20 haveTARG_VER = gfits_scan (header, "TARG_VER", "%s", 1, & tmp);19 havePHOT_VER = gfits_scan (header, "PHOT_VER", "%s", 1, &ctmp); 20 haveTARG_VER = gfits_scan (header, "TARG_VER", "%s", 1, &ctmp); 21 21 if (havePHOT_VER && haveTARG_VER) return SDSS_OBJ; 22 22 -
trunk/Ohana/src/addstar/src/GetZeroPointExposure.c
r25908 r27435 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; -
trunk/Ohana/src/addstar/src/ImageOptions.c
r16810 r27435 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; -
trunk/Ohana/src/addstar/src/ListenClients_Thread.c
r6674 r27435 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 -
trunk/Ohana/src/addstar/src/LoadData.c
r26390 r27435 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, int *Nstars, Header **headers, int *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 int i, j, Nvalid, Nhead, Ndata, Nskip; 11 off_t Nskip, Nvalid, NVALID; 12 int i, j, Nhead, Ndata; 12 13 uint32_t parentID = UINT32_MAX; 13 14 Stars *inStars; … … 76 77 Nskip += extsize[j]; 77 78 } 78 fseek (f, Nskip, SEEK_SET);79 fseeko (f, Nskip, SEEK_SET); 79 80 80 81 inStars = ReadStarsFITS (f, headers[Nhead], headers[Ndata], &images[0][Nvalid].nstar); -
trunk/Ohana/src/addstar/src/LoadDataPMM.c
r21508 r27435 16 16 # define MAG_INDEX_ASC 22 17 17 18 int LoadDataPMM (FILE *f, char *file, Image **images, int *nvalid, Stars **stars, 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; -
trunk/Ohana/src/addstar/src/LoadDataSDSS.c
r16967 r27435 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, int *Nstars, Header **headers, int *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, Nvalid, NVALID; 8 9 char *name; 9 int j, N valid, Nhead, Ndata, Nskip;10 int j, Nhead, Ndata; 10 11 unsigned int Ninstars; 11 12 Stars *inStars; … … 36 37 Nskip += extsize[j]; 37 38 } 38 fseek (f, Nskip, SEEK_SET);39 fseeko (f, Nskip, SEEK_SET); 39 40 40 41 // XXX I think this is an error? should this be &images[0][Nvalid] ?? -
trunk/Ohana/src/addstar/src/LoadHeaders.c
r16810 r27435 4 4 Header **LoadHeaders (FILE *f, int *mode, int *Nheaders) { 5 5 6 int i, status, Nskip, NHEADERS; 6 off_t Nskip; 7 int i, status, NHEADERS; 7 8 Header **headers; 8 9 … … 31 32 // advance to the next header 32 33 Nskip = gfits_data_size (headers[i]); 33 fseek (f, Nskip, SEEK_CUR);34 fseeko (f, Nskip, SEEK_CUR); 34 35 if (i == NHEADERS - 1) { 35 36 NHEADERS += 10; -
trunk/Ohana/src/addstar/src/LoadStars.c
r26286 r27435 1 1 # include "addstar.h" 2 2 3 Stars *LoadStars (char *filename, 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 int i, Nfile, NFILE, Nheaders, NheaderSets, mode, *extsize; 5 off_t *extsize, NheaderSets; 6 int i, Nfile, NFILE, Nheaders, mode; 6 7 char **file, line[1024]; 7 8 FILE *f; … … 80 81 continue; 81 82 } 82 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); 83 84 84 85 /* supplied photcode is incompatible with multi-chip images */ -
trunk/Ohana/src/addstar/src/MatchHeaders.c
r26258 r27435 3 3 // XXX largely psphot specific 4 4 5 HeaderSet *MatchHeaders ( int **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; … … 9 9 HeaderSet *headerSets; 10 10 11 ALLOCATE (extsize[0], int, Nheaders);11 ALLOCATE (extsize[0], off_t, Nheaders); 12 12 13 13 Nimage = 0; … … 34 34 headerSets[0].extnum_head = 0; 35 35 headerSets[0].extnum_data = 1; 36 extsize[0][0] = headers[0][0]. size;36 extsize[0][0] = headers[0][0].datasize; 37 37 *nimage = 1; 38 38 return headerSets; … … 42 42 for (i = 0; i < Nheaders; i++) { 43 43 if (mode == SIMPLE_CMP) { 44 extsize[0][i] = headers[i][0]. size;44 extsize[0][i] = headers[i][0].datasize; 45 45 } else { 46 extsize[0][i] = headers[i][0]. size + gfits_data_size (headers[i]);46 extsize[0][i] = headers[i][0].datasize + gfits_data_size (headers[i]); 47 47 } 48 48 … … 92 92 // extension matched to the header in the PHU 93 93 if (Nimage == 0) { 94 extsize[0][0] = headers[0][0]. size + gfits_data_size (headers[0]);95 extsize[0][1] = headers[1][0]. size + gfits_data_size (headers[1]);94 extsize[0][0] = headers[0][0].datasize + gfits_data_size (headers[0]); 95 extsize[0][1] = headers[1][0].datasize + gfits_data_size (headers[1]); 96 96 gfits_scan (headers[1], ExtnameKeyword, "%s", 1, extname); 97 97 if (!strcmp (extname, "SMPFILE")) { -
trunk/Ohana/src/addstar/src/ReadImageHeader.c
r27369 r27435 181 181 // RULE: ccdnum is the value of the first string of digits in CCDNumKeyword 182 182 // For example: ccdnum(XY42.hdr) = 42, ccdnum(XY01.hdr) = 1 183 // if no digits occur, then we assume there is only one ccd 183 184 char *p = ccdnum; 184 185 // get rid of any leading non-digit characters 185 186 while (*p && !isdigit(*p)) p++; 186 187 if (*p) { 187 image[0].ccdnum = atoi(p);188 image[0].ccdnum = atoi(p); 188 189 } else { 189 image[0].ccdnum = 0;190 image[0].ccdnum = 0; 190 191 } 191 192 } -
trunk/Ohana/src/addstar/src/ReadStarsFITS.c
r24400 r27435 5 5 Stars *ReadStarsFITS (FILE *f, Header *header, Header *in_theader, unsigned int *nstars) { 6 6 7 int Nskip, Nstars; 7 off_t Nskip; 8 unsigned int Nstars; 8 9 char type[80]; 9 10 Header theader; … … 16 17 } else { 17 18 table.header = in_theader; 18 Nskip = in_theader[0]. size;19 fseek (f, Nskip, SEEK_CUR);19 Nskip = in_theader[0].datasize; 20 fseeko (f, Nskip, SEEK_CUR); 20 21 } 21 22 … … 57 58 } 58 59 59 Stars *Convert_SMPDATA (FTable *table, int *nstars) { 60 61 int i, Nstars, swapped; 60 Stars *Convert_SMPDATA (FTable *table, unsigned int *nstars) { 61 62 off_t Nstars; 63 unsigned int i; 64 char swapped; 62 65 double ZeroPt; 63 66 Stars *stars = NULL; … … 96 99 } 97 100 98 Stars *Convert_PS1_DEV_0 (FTable *table, int *nstars) { 99 100 int i, Nstars; 101 Stars *Convert_PS1_DEV_0 (FTable *table, unsigned int *nstars) { 102 103 off_t Nstars; 104 unsigned int i; 101 105 double ZeroPt; 102 106 Stars *stars; … … 140 144 // XXX I need to make the IPP I/O functions and these functions 141 145 // consistent wrt ZERO_POINT.... 142 Stars *Convert_PS1_DEV_1 (FTable *table, int *nstars) { 143 144 int i, Nstars; 146 Stars *Convert_PS1_DEV_1 (FTable *table, unsigned int *nstars) { 147 148 off_t Nstars; 149 unsigned int i; 145 150 double ZeroPt; 146 151 Stars *stars; … … 185 190 } 186 191 187 Stars *Convert_PS1_V1 (FTable *table, int *nstars) { 188 189 int i, Nstars; 192 Stars *Convert_PS1_V1 (FTable *table, unsigned int *nstars) { 193 194 off_t Nstars; 195 unsigned int i; 190 196 double ZeroPt; 191 197 Stars *stars; … … 261 267 } 262 268 263 Stars *Convert_PS1_V1_Alt (FTable *table, int *nstars) { 264 265 int i, Nstars; 269 Stars *Convert_PS1_V1_Alt (FTable *table, unsigned int *nstars) { 270 271 off_t Nstars; 272 unsigned int i; 266 273 double ZeroPt; 267 274 Stars *stars; … … 332 339 } 333 340 334 Stars *Convert_PS1_V2 (FTable *table, int *nstars) { 335 336 int i, Nstars; 341 Stars *Convert_PS1_V2 (FTable *table, unsigned int *nstars) { 342 343 off_t Nstars; 344 unsigned int i; 337 345 double ZeroPt; 338 346 Stars *stars; -
trunk/Ohana/src/addstar/src/ReadStarsSDSS.c
r27392 r27435 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 int i, j, N, Nskip, Nstars, camcol; 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 int i, j, N, Nstars, camcol; 36 37 char type[80]; 37 38 Header theader; … … 43 44 char filtname[16][5]; 44 45 int photcode[5]; 45 int N row, Ncol; // used in the GET_COLUMN_1,5 macros above46 int Ncol; // used in the GET_COLUMN_1,5 macros above 46 47 47 48 if (in_theader == NULL) { … … 50 51 } else { 51 52 table.header = in_theader; 52 Nskip = in_theader[0]. size;53 fseek (f, Nskip, SEEK_CUR);53 Nskip = in_theader[0].datasize; 54 fseeko (f, Nskip, SEEK_CUR); 54 55 } 55 56 -
trunk/Ohana/src/addstar/src/SkyListForStars.c
r21508 r27435 13 13 } 14 14 15 SkyList *SkyListForStars (SkyTable *table, int depth, Stars *stars, int Nstars) {15 SkyList *SkyListForStars (SkyTable *table, int depth, Stars *stars, unsigned int Nstars) { 16 16 17 17 int i, j, Nr, NR; -
trunk/Ohana/src/addstar/src/SkyTableFromTychoIndex.c
r15036 r27435 147 147 skytable[0].filename[i] = NULL; 148 148 } 149 if (VERBOSE) fprintf (stderr, "loaded % d tables from tycho index\n",skytable[0].Nregions);149 if (VERBOSE) fprintf (stderr, "loaded %lld tables from tycho index\n", (long long) skytable[0].Nregions); 150 150 151 151 return (skytable); -
trunk/Ohana/src/addstar/src/UpdateDatabase_Image.c
r15743 r27435 1 1 # include "addstar.h" 2 2 3 int UpdateDatabase_Image (AddstarClientOptions *options, Image *images, int Nimages, Coords *mosaic, Stars *stars, int Nstars) {3 int UpdateDatabase_Image (AddstarClientOptions *options, Image *images, int Nimages, Coords *mosaic, Stars *stars, unsigned int Nstars) { 4 4 5 5 int i, status; -
trunk/Ohana/src/addstar/src/UpdateDatabase_Reflist.c
r15743 r27435 1 1 # include "addstar.h" 2 2 3 int UpdateDatabase_Reflist (AddstarClientOptions *options, Stars *stars, int Nstars) {3 int UpdateDatabase_Reflist (AddstarClientOptions *options, Stars *stars, unsigned int Nstars) { 4 4 5 5 int i, Nsubset; -
trunk/Ohana/src/addstar/src/UpdateImageIDs.c
r26390 r27435 1 1 # include "addstar.h" 2 2 3 int UpdateImageIDs (Stars *stars, 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; -
trunk/Ohana/src/addstar/src/addstar.c
r26280 r27435 1 1 # include "addstar.h" 2 2 3 // LARGEFILES: this program currently limits Nstars (input file) to < 2^31 3 4 int main (int argc, char **argv) { 4 5 6 unsigned int Nstars, Nsubset; 5 7 int Nmatch, status, loadObjects; 6 int i, Nstars, Nimages, Nsubset;7 unsigned long longNaverage, Nmeasure;8 off_t i, Nimages; 9 off_t Naverage, Nmeasure; 8 10 Stars *stars, **subset; 9 11 Image *images; … … 46 48 newlist = SkyListByImage (sky, -1, &images[i]); 47 49 SkyListMerge (&skylist, newlist); 48 if (VERBOSE) fprintf (stderr, "added % d regions to yield %d total\n", newlist[0].Nregions,skylist[0].Nregions);50 if (VERBOSE) fprintf (stderr, "added %lld regions to yield %lld total\n", (long long) newlist[0].Nregions, (long long) skylist[0].Nregions); 49 51 SkyListFree (newlist); 50 52 } … … 78 80 skylist = tmp; 79 81 } 80 if (VERBOSE) fprintf (stderr, "writing to % d regions\n",skylist[0].Nregions);82 if (VERBOSE) fprintf (stderr, "writing to %lld regions\n", (long long) skylist[0].Nregions); 81 83 82 84 /* don't load the object tables for only_images, unless we are getting the calibration. */ … … 147 149 case M_RESORT: 148 150 if (options.nosort == 3) catalog.sorted = FALSE; 151 152 // no need to resort empty catalogs 153 if (catalog.Naves_disk == 0) { 154 dvo_catalog_unlock (&catalog); 155 dvo_catalog_free (&catalog); 156 continue; 157 } 158 149 159 resort_catalog (&catalog); 150 160 Nsubset = 1; … … 203 213 gettimeofday (&stop, NULL); 204 214 dtime = DTIME (stop, start); 205 fprintf (stderr, "SUCCESS: elapsed time %9.4f sec for %5d stars (%5d matches), %6lld average, %7lld measure\n", dtime, Nstars, Nmatch, Naverage,Nmeasure);215 fprintf (stderr, "SUCCESS: elapsed time %9.4f sec for %5d stars (%5d matches), %6lld average, %7lld measure\n", dtime, Nstars, Nmatch, (long long) Naverage, (long long) Nmeasure); 206 216 207 217 exit (0); -
trunk/Ohana/src/addstar/src/addstard.c
r25757 r27435 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 -
trunk/Ohana/src/addstar/src/build_links.c
r26399 r27435 26 26 /* build the initial links assuming the table is sorted, 27 27 not partial, and has a correct set of average[].measureOffset,Nmeasure values */ 28 int *init_measure_links (Average *average, int Naverage, Measure *measure, int Nmeasure) {29 30 int i, j, N;31 int *next;28 off_t *init_measure_links (Average *average, off_t Naverage, Measure *measure, off_t Nmeasure) { 29 30 off_t i, j, N; 31 off_t *next_meas; 32 32 33 33 N = 0; 34 34 35 ALLOCATE (next , int, Nmeasure);35 ALLOCATE (next_meas, off_t, Nmeasure); 36 36 for (i = 0; i < Naverage; i++, N++) { 37 37 for (j = 0; j < average[i].Nmeasure - 1; j++, N++) { 38 next [N] = N + 1;38 next_meas[N] = N + 1; 39 39 if (N >= Nmeasure) { 40 40 fprintf (stderr, "WARNING: N out of bounds (1)\n"); 41 41 } 42 42 } 43 next [N] = -1;43 next_meas[N] = -1; 44 44 if (N >= Nmeasure) { 45 45 fprintf (stderr, "WARNING: N out of bounds (2)\n"); … … 51 51 } 52 52 } 53 return (next );53 return (next_meas); 54 54 } 55 55 … … 61 61 */ 62 62 63 int *build_measure_links (Average *average, int Naverage, Measure *measure, int Nmeasure) {64 65 int i, m, k, Nm, averef;66 int *next;67 68 ALLOCATE (next , int, Nmeasure);63 off_t *build_measure_links (Average *average, off_t Naverage, Measure *measure, off_t Nmeasure) { 64 65 off_t i, m, k, Nm, averef; 66 off_t *next_meas; 67 68 ALLOCATE (next_meas, off_t, Nmeasure); 69 69 70 70 /* reset the Nm, offset values for average */ … … 77 77 averef = measure[Nm].averef; 78 78 m = average[averef].measureOffset; 79 next [Nm] = -1;79 next_meas[Nm] = -1; 80 80 81 81 if (m == -1) { /* no links yet for source */ … … 85 85 } 86 86 87 for (k = 0; next [m] != -1; k++) {88 m = next [m];87 for (k = 0; next_meas[m] != -1; k++) { 88 m = next_meas[m]; 89 89 if (m >= Nmeasure) { 90 90 fprintf (stderr, "WARNING: m out of bounds (1)\n"); … … 93 93 94 94 average[averef].Nmeasure = k + 2; 95 next [m] = Nm;95 next_meas[m] = Nm; 96 96 if (m >= Nmeasure) { 97 97 fprintf (stderr, "WARNING: m out of bounds (2)\n"); 98 98 } 99 99 } 100 return (next );100 return (next_meas); 101 101 } 102 102 103 103 /* average[].measureOffset, average[].Nmeasure are valid within an addstar run */ 104 int add_meas_link (Average *average, int *next, int Nmeasure, int NMEASURE) {105 106 int k, m;107 108 /* if we have trouble, check validity of next [m] : m < Nmeasure */104 off_t add_meas_link (Average *average, off_t *next_meas, off_t Nmeasure, off_t NMEASURE) { 105 106 off_t k, m; 107 108 /* if we have trouble, check validity of next_meas[m] : m < Nmeasure */ 109 109 m = average[0].measureOffset; 110 110 111 111 for (k = 0; k < average[0].Nmeasure - 1; k++) { 112 m = next [m];112 m = next_meas[m]; 113 113 if (m >= NMEASURE) { 114 114 fprintf (stderr, "WARNING: m out of bounds (3)\n"); … … 117 117 118 118 /* set up references */ 119 next [Nmeasure] = -1;119 next_meas[Nmeasure] = -1; 120 120 if (Nmeasure >= NMEASURE) { 121 121 fprintf (stderr, "WARNING: Nmeasure out of bounds (1)\n"); … … 125 125 average[0].measureOffset = Nmeasure; 126 126 } else { 127 next [m] = Nmeasure;127 next_meas[m] = Nmeasure; 128 128 if (m >= NMEASURE) { 129 129 fprintf (stderr, "WARNING: m out of bounds (4)\n"); … … 137 137 we must always save the missing table, if it exists */ 138 138 139 Measure *sort_measure (Average *average, int Naverage, Measure *measure, int Nmeasure, int *next) {140 141 int i, k, n, N;139 Measure *sort_measure (Average *average, off_t Naverage, Measure *measure, off_t Nmeasure, off_t *next_meas) { 140 141 off_t i, k, n, N; 142 142 Measure *tmpmeasure; 143 143 … … 153 153 if (measure[n].averef != i) abort(); 154 154 tmpmeasure[N].averef = i; 155 n = next [n];155 n = next_meas[n]; 156 156 } 157 157 } … … 161 161 162 162 /* build the initial links assuming the table is sorted */ 163 int *init_missing_links (Average *average, int Naverage, Missing *missing, int Nmissing) {164 165 int i, j, N;166 int *next;163 off_t *init_missing_links (Average *average, off_t Naverage, Missing *missing, off_t Nmissing) { 164 165 off_t i, j, N; 166 off_t *next_miss; 167 167 168 168 N = 0; 169 169 170 ALLOCATE (next , int, Nmissing);170 ALLOCATE (next_miss, off_t, Nmissing); 171 171 for (i = 0; i < Naverage; i++) { 172 172 for (j = 0; j < average[i].Nmissing - 1; j++, N++) { 173 next [N] = N + 1;173 next_miss[N] = N + 1; 174 174 } 175 175 if (average[i].Nmissing > 0) { 176 next [N] = -1;176 next_miss[N] = -1; 177 177 if (N >= Nmissing) { 178 178 fprintf (stderr, "overflow in init_missing_links"); … … 183 183 184 184 } 185 return (next );186 } 187 188 int add_miss_link (Average *average, int *next, int Nmissing) {189 190 int k, m;185 return (next_miss); 186 } 187 188 off_t add_miss_link (Average *average, off_t *next_miss, off_t Nmissing) { 189 190 off_t k, m; 191 191 192 192 /* there may be 0 Nmiss; this is not true for Nmeas */ 193 193 if (average[0].Nmissing < 1) { 194 194 average[0].missingOffset = Nmissing; 195 next [Nmissing] = -1;195 next_miss[Nmissing] = -1; 196 196 return (TRUE); 197 197 } 198 198 199 199 m = average[0].missingOffset; 200 for (k = 0; k < average[0].Nmissing - 1; k++) m = next [m];200 for (k = 0; k < average[0].Nmissing - 1; k++) m = next_miss[m]; 201 201 /* set up references */ 202 next [Nmissing] = -1;203 next [m] = Nmissing;202 next_miss[Nmissing] = -1; 203 next_miss[m] = Nmissing; 204 204 return (TRUE); 205 205 } 206 206 207 Missing *sort_missing (Average *average, int Naverage, Missing *missing, int Nmissing, int *next) {208 209 int i, k, n, N;207 Missing *sort_missing (Average *average, off_t Naverage, Missing *missing, off_t Nmissing, off_t *next_miss) { 208 209 off_t i, k, n, N; 210 210 Missing *tmpmissing; 211 211 … … 218 218 for (k = 0; k < average[i].Nmissing; k++, N++) { 219 219 tmpmissing[N] = missing[n]; 220 n = next [n];220 n = next_miss[n]; 221 221 } 222 222 } -
trunk/Ohana/src/addstar/src/calibrate.c
r16810 r27435 2 2 3 3 static int InternalCal; 4 static int Ncal, NCAL, *Nstar; 4 static int Ncal, NCAL; 5 static off_t *Nstar; 5 6 static float *Mobs, *dMobs, *Mref, *dMref, *Minst; 6 7 … … 13 14 NCAL = 1000; 14 15 ALLOCATE (Mobs, float, NCAL); 15 ALLOCATE (dMobs, float, NCAL);16 ALLOCATE (dMobs, float, NCAL); 16 17 ALLOCATE (Mref, float, NCAL); 17 18 ALLOCATE (dMref, float, NCAL); 18 19 ALLOCATE (Minst, float, NCAL); 19 ALLOCATE (Nstar, int,NCAL);20 ALLOCATE (Nstar, off_t, NCAL); 20 21 } 21 22 22 void SaveCalibration (float Mo, float dMo, float Mr, float dMr, float Mi, int N) {23 void SaveCalibration (float Mo, float dMo, float Mr, float dMr, float Mi, off_t N) { 23 24 24 25 Mobs[Ncal] = Mo; … … 37 38 REALLOCATE (dMref, float, NCAL); 38 39 REALLOCATE (Minst, float, NCAL); 39 REALLOCATE (Nstar, int,NCAL);40 REALLOCATE (Nstar, off_t, NCAL); 40 41 } 41 42 } 42 43 43 44 /* use the linked list to navigate the measures; safe for unsorted measures */ 44 void AddToCalibration (Average *average, SecFilt *secfilt, Measure *measure, Measure *new, int *next, int Nstar) {45 void AddToCalibration (Average *average, SecFilt *secfilt, Measure *measure, Measure *new, off_t *next, off_t Nstar) { 45 46 46 47 int i, j, m, Nsec, found0, found1, found2; -
trunk/Ohana/src/addstar/src/dump.c
r21508 r27435 1 1 # include "addstar.h" 2 2 3 int dump_rawstars (Stars *stars, int Nstars) {3 int dump_rawstars (Stars *stars, unsigned int Nstars) { 4 4 5 int i;5 unsigned int i; 6 6 FILE *f; 7 7 -
trunk/Ohana/src/addstar/src/fakeimage.c
r21508 r27435 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; -
trunk/Ohana/src/addstar/src/find_matches.c
r27392 r27435 1 1 # include "addstar.h" 2 2 3 int find_matches (SkyRegion *region, Stars *stars, int NstarsIn, Catalog *catalog, AddstarClientOptions options) {4 5 int i, j, n, N, J, status, Nstars;3 int find_matches (SkyRegion *region, Stars *stars, unsigned int NstarsIn, Catalog *catalog, AddstarClientOptions options) { 4 5 off_t i, j, n, N, J, status, Nstars; 6 6 double RADIUS, RADIUS2; 7 7 double *X1, *Y1, *X2, *Y2; 8 8 double dX, dY, dR; 9 int *N1, *N2, *next_meas;10 int Nave, NAVE, Nmeas, NMEAS, Nmatch;9 off_t *N1, *N2, *next_meas; 10 off_t Nave, NAVE, Nmeas, NMEAS, Nmatch; 11 11 int Nsecfilt, Nsec; 12 12 unsigned int objID, catID; … … 29 29 ALLOCATE (X1, double, NstarsIn); 30 30 ALLOCATE (Y1, double, NstarsIn); 31 ALLOCATE (N1, int,NstarsIn);31 ALLOCATE (N1, off_t, NstarsIn); 32 32 33 33 /** allocate local arrays (catalog) **/ … … 35 35 ALLOCATE (X2, double, NAVE); 36 36 ALLOCATE (Y2, double, NAVE); 37 ALLOCATE (N2, int,NAVE);38 ALLOCATE (catalog[0].found, int, NAVE);37 ALLOCATE (N2, off_t, NAVE); 38 ALLOCATE (catalog[0].found, off_t, NAVE); 39 39 /* for secfilt j and star i, secfilt[i*Nsecfilt+j] */ 40 40 … … 146 146 if (Nmeas >= NMEAS) { 147 147 NMEAS = Nmeas + 1000; 148 REALLOCATE (next_meas, int, NMEAS);148 REALLOCATE (next_meas, off_t, NMEAS); 149 149 150 150 REALLOCATE (catalog[0].measure, Measure, NMEAS); … … 238 238 if (Nmeas >= NMEAS - NSTAR_GROUP) { 239 239 NMEAS = Nmeas + 1000; 240 REALLOCATE (next_meas, int, NMEAS);240 REALLOCATE (next_meas, off_t, NMEAS); 241 241 REALLOCATE (catalog[0].measure, Measure, NMEAS); 242 242 } … … 352 352 catalog[0].Nmeasure = Nmeas; 353 353 catalog[0].Nsecf_mem = Nave*Nsecfilt; 354 if (VERBOSE) fprintf (stderr, "Nstars, Nave, Nmeas: % d %d %d, (%d matches)\n", Nstars, Nave, Nmeas,Nmatch);354 if (VERBOSE) fprintf (stderr, "Nstars, Nave, Nmeas: %lld %lld %lld, (%lld matches)\n", (long long) Nstars, (long long) Nave, (long long) Nmeas, (long long) Nmatch); 355 355 356 356 free (catalog[0].found); -
trunk/Ohana/src/addstar/src/find_matches_closest.c
r27392 r27435 1 1 # include "addstar.h" 2 2 3 int find_matches_closest (SkyRegion *region, Stars *stars, int NstarsIn, Catalog *catalog, AddstarClientOptions options) {4 5 int i, j, n, N, J, Jmin, status, Nstars;3 int find_matches_closest (SkyRegion *region, Stars *stars, unsigned int NstarsIn, Catalog *catalog, AddstarClientOptions options) { 4 5 off_t i, j, n, N, J, Jmin, status, Nstars; 6 6 double RADIUS, RADIUS2, Rmin; 7 7 double *X1, *Y1, *X2, *Y2; 8 8 double dX, dY, dR; 9 int *N1, *N2,*next_meas;10 int Nave, NAVE, Nmeas, NMEAS, Nmatch;9 off_t *N1, *N2, *next_meas; 10 off_t Nave, NAVE, Nmeas, NMEAS, Nmatch; 11 11 int Nsecfilt, Nsec; 12 12 unsigned int objID, catID; … … 29 29 ALLOCATE (X1, double, NstarsIn); 30 30 ALLOCATE (Y1, double, NstarsIn); 31 ALLOCATE (N1, int,NstarsIn);31 ALLOCATE (N1, off_t, NstarsIn); 32 32 33 33 /** allocate local arrays (catalog) **/ … … 35 35 ALLOCATE (X2, double, NAVE); 36 36 ALLOCATE (Y2, double, NAVE); 37 ALLOCATE (N2, int,NAVE);38 ALLOCATE (catalog[0].found, int, NAVE);37 ALLOCATE (N2, off_t, NAVE); 38 ALLOCATE (catalog[0].found, off_t, NAVE); 39 39 /* for secfilt j and star i, secfilt[i*Nsecfilt+j] */ 40 40 … … 161 161 if (Nmeas >= NMEAS) { 162 162 NMEAS = Nmeas + 1000; 163 REALLOCATE (next_meas, int, NMEAS);163 REALLOCATE (next_meas, off_t, NMEAS); 164 164 REALLOCATE (catalog[0].measure, Measure, NMEAS); 165 165 } … … 198 198 X1[i], X2[Jmin], 199 199 Y1[i], Y2[Jmin]); 200 // XXX abort on this? -- this is a bad failure... 200 201 } 201 202 … … 232 233 if (Nmeas >= NMEAS - NSTAR_GROUP) { 233 234 NMEAS = Nmeas + 1000; 234 REALLOCATE (next_meas, int, NMEAS);235 REALLOCATE (next_meas, off_t, NMEAS); 235 236 REALLOCATE (catalog[0].measure, Measure, NMEAS); 236 237 } … … 273 274 catalog[0].average[Nave].flags = 0; 274 275 if (PSPS_ID) { 275 catalog[0].average[Nave].extID = CreatePSPSObjectID(catalog[0].average[Nave].R, 276 catalog[0].average[Nave].D); 276 catalog[0].average[Nave].extID = CreatePSPSObjectID(catalog[0].average[Nave].R, catalog[0].average[Nave].D); 277 277 } else { 278 catalog[0].average[Nave].extID = 0; 279 } 280 278 catalog[0].average[Nave].extID = 0; 279 } 281 280 282 281 objID ++; … … 347 346 catalog[0].Nmeasure = Nmeas; 348 347 catalog[0].Nsecf_mem = Nave*Nsecfilt; 349 if (VERBOSE) fprintf (stderr, "Nstars, Nave, Nmeas: % d %d %d, (%d matches)\n", Nstars, Nave, Nmeas,Nmatch);348 if (VERBOSE) fprintf (stderr, "Nstars, Nave, Nmeas: %lld %lld %lld, (%lld matches)\n", (long long) Nstars, (long long) Nave, (long long) Nmeas, (long long) Nmatch); 350 349 351 350 free (catalog[0].found); -
trunk/Ohana/src/addstar/src/find_matches_closest_refstars.c
r26384 r27435 1 1 # include "addstar.h" 2 2 3 int find_matches_closest_refstars (SkyRegion *region, Stars **stars, int NstarsIn, Catalog *catalog, AddstarClientOptions options) {4 5 int i, j, n, N, J, Jmin, status;3 int find_matches_closest_refstars (SkyRegion *region, Stars **stars, unsigned int NstarsIn, Catalog *catalog, AddstarClientOptions options) { 4 5 off_t i, j, n, N, J, Jmin, status; 6 6 double RADIUS, RADIUS2, Rmin; 7 7 double *X1, *Y1, *X2, *Y2; 8 8 double dX, dY, dR; 9 int *N1, *N2, *next_meas;10 int Nave, NAVE, Nmeas, NMEAS, Nstars, Nmatch;9 off_t *N1, *N2, *next_meas; 10 off_t Nave, NAVE, Nmeas, NMEAS, Nstars, Nmatch; 11 11 unsigned int objID, catID; 12 12 Coords tcoords; … … 24 24 ALLOCATE (X1, double, NstarsIn); 25 25 ALLOCATE (Y1, double, NstarsIn); 26 ALLOCATE (N1, int,NstarsIn);26 ALLOCATE (N1, off_t, NstarsIn); 27 27 28 28 /** allocate local arrays (catalog) **/ … … 30 30 ALLOCATE (X2, double, NAVE); 31 31 ALLOCATE (Y2, double, NAVE); 32 ALLOCATE (N2, int,NAVE);33 ALLOCATE (catalog[0].found, int, NAVE);32 ALLOCATE (N2, off_t, NAVE); 33 ALLOCATE (catalog[0].found, off_t, NAVE); 34 34 /* for secfilt j and star i, secfilt[i*Nsecfilt+j] */ 35 35 … … 164 164 if (Nmeas >= NMEAS) { 165 165 NMEAS = Nmeas + 1000; 166 REALLOCATE (next_meas, int, NMEAS);166 REALLOCATE (next_meas, off_t, NMEAS); 167 167 REALLOCATE (catalog[0].measure, Measure, NMEAS); 168 168 } … … 239 239 if (Nmeas >= NMEAS - NREFSTAR_GROUP) { 240 240 NMEAS = Nmeas + 1000; 241 REALLOCATE (next_meas, int, NMEAS);241 REALLOCATE (next_meas, off_t, NMEAS); 242 242 REALLOCATE (catalog[0].measure, Measure, NMEAS); 243 243 } … … 329 329 Nmeas ++; 330 330 } 331 for (j = 0; j < NREFSTAR_GROUP - 1; j++) { 332 next_meas[Nmeas - NREFSTAR_GROUP + j] = Nmeas - NREFSTAR_GROUP + j + 1; 333 } 331 334 Nave ++; 332 335 } … … 351 354 catalog[0].Nmeasure = Nmeas; 352 355 catalog[0].Nsecf_mem = Nave*Nsecfilt; 353 if (VERBOSE) fprintf (stderr, "Nstars, Nave, Nmeas: % d %d %d, (%d matches)\n", Nstars, Nave, Nmeas,Nmatch);356 if (VERBOSE) fprintf (stderr, "Nstars, Nave, Nmeas: %lld %lld %lld, (%lld matches)\n", (long long) Nstars, (long long) Nave, (long long) Nmeas, (long long) Nmatch); 354 357 355 358 free (catalog[0].found); -
trunk/Ohana/src/addstar/src/find_matches_refstars.c
r26400 r27435 1 1 # include "addstar.h" 2 2 3 int find_matches_refstars (SkyRegion *region, Stars **stars, int Nstars, Catalog *catalog, AddstarClientOptions options) {4 5 int i, j, n, N, J;3 int find_matches_refstars (SkyRegion *region, Stars **stars, unsigned int Nstars, Catalog *catalog, AddstarClientOptions options) { 4 5 off_t i, j, n, N, J; 6 6 double RADIUS, RADIUS2; 7 7 double *X1, *Y1, *X2, *Y2; 8 8 double dX, dY, dR; 9 int *N1, *N2, *next_meas;10 int Nave, NAVE, Nmeas, NMEAS, Nmatch;9 off_t *N1, *N2, *next_meas; 10 off_t Nave, NAVE, Nmeas, NMEAS, Nmatch; 11 11 unsigned int objID, catID; 12 12 Coords tcoords; … … 24 24 ALLOCATE (X1, double, Nstars); 25 25 ALLOCATE (Y1, double, Nstars); 26 ALLOCATE (N1, int,Nstars);26 ALLOCATE (N1, off_t, Nstars); 27 27 28 28 /** allocate local arrays (catalog) **/ … … 31 31 ALLOCATE (X2, double, NAVE); 32 32 ALLOCATE (Y2, double, NAVE); 33 ALLOCATE (N2, int,NAVE);34 ALLOCATE (catalog[0].found, int, NAVE);33 ALLOCATE (N2, off_t, NAVE); 34 ALLOCATE (catalog[0].found, off_t, NAVE); 35 35 REALLOCATE (catalog[0].average, Average, NAVE); 36 36 REALLOCATE (catalog[0].secfilt, SecFilt, NAVE*catalog[0].Nsecfilt); … … 124 124 if (Nmeas == NMEAS) { 125 125 NMEAS = Nmeas + 1000; 126 REALLOCATE (next_meas, int, NMEAS);126 REALLOCATE (next_meas, off_t, NMEAS); 127 127 REALLOCATE (catalog[0].measure, Measure, NMEAS); 128 128 } … … 209 209 if (Nmeas >= NMEAS - NREFSTAR_GROUP) { 210 210 NMEAS = Nmeas + 1000; 211 REALLOCATE (next_meas, int, NMEAS);211 REALLOCATE (next_meas, off_t, NMEAS); 212 212 REALLOCATE (catalog[0].measure, Measure, NMEAS); 213 213 } … … 325 325 catalog[0].Nmeasure = Nmeas; 326 326 catalog[0].Nsecf_mem = Nave*Nsecfilt; 327 if (VERBOSE) fprintf (stderr, "Nstars, Nave, Nmeas: % d %d %d, (%d matches)\n", Nstars, Nave, Nmeas,Nmatch);327 if (VERBOSE) fprintf (stderr, "Nstars, Nave, Nmeas: %lld %lld %lld, (%lld matches)\n", (long long) Nstars, (long long) Nave, (long long) Nmeas, (long long) Nmatch); 328 328 329 329 free (catalog[0].found); -
trunk/Ohana/src/addstar/src/find_subset.c
r21508 r27435 2 2 3 3 /* find stars within this region */ 4 Stars **find_subset (SkyRegion *region, Stars *stars, int Nstars,int *Nsubset) {4 Stars **find_subset (SkyRegion *region, Stars *stars, unsigned int Nstars, unsigned int *Nsubset) { 5 5 6 6 int i, N, NSUBSET; -
trunk/Ohana/src/addstar/src/get2mass.c
r17439 r27435 2 2 # include "2mass.h" 3 3 4 Stars *get2mass (SkyRegion *patch, int photcode, int mode, int *NSTARS) {4 Stars *get2mass (SkyRegion *patch, int photcode, int mode, unsigned int *NSTARS) { 5 5 6 6 char *path; -
trunk/Ohana/src/addstar/src/getgsc.c
r21508 r27435 7 7 static SkyTable *sky = NULL; 8 8 9 Stars *getgsc (SkyRegion *patch, int *NSTARS) {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; … … 45 45 } 46 46 47 Stars *rd_gsc (char *filename, int *nstars) {47 Stars *rd_gsc (char *filename, unsigned int *nstars) { 48 48 49 49 int i, NSTARS, Nstars, Nbytes, nbytes, Nline, Nbyte; -
trunk/Ohana/src/addstar/src/gettycho.c
r21508 r27435 6 6 static SkyTable *tychoTable = NULL; 7 7 8 Stars *gettycho (SkyRegion *catstats, int photcode, int *nstars) {8 Stars *gettycho (SkyRegion *catstats, int photcode, unsigned int *nstars) { 9 9 10 10 int i, j, nitems; … … 13 13 FILE *f; 14 14 int NTYCHO, Ntycho; 15 int firstRow, firstByte;15 off_t firstRow, firstByte; 16 16 short int TYCHO_B, TYCHO_V; 17 17 e_time TychoEpoch; … … 60 60 region[0].Rmin, region[0].Rmax, region[0].Dmin, region[0].Dmax); 61 61 62 firstRow = atoi (region[0].name);62 firstRow = strtol (region[0].name, NULL, 0); 63 63 firstByte = firstRow * NBYTE; 64 fseek (f, firstByte, SEEK_SET);64 fseeko (f, firstByte, SEEK_SET); 65 65 66 66 while (1) { -
trunk/Ohana/src/addstar/src/getusno.c
r21508 r27435 4 4 # define NELEM 3 5 5 6 Stars *getusno (SkyRegion *catstats, int photcode, int *nstars) {6 Stars *getusno (SkyRegion *catstats, int photcode, unsigned int *nstars) { 7 7 8 long int offset;8 off_t offset; 9 9 int i, bin, first, last, nitems, Nitems, Nbins, Nstars; 10 10 float hours[100]; … … 84 84 /* advance file pointer to first slice */ 85 85 offset = NELEM*NBYTE*(start[first] - 1); 86 fseek (f, offset, SEEK_SET);86 fseeko (f, offset, SEEK_SET); 87 87 88 88 /* sum the number of stars in data segment of interest */ -
trunk/Ohana/src/addstar/src/getusnob.c
r26280 r27435 3 3 # define NELEM 20 4 4 5 Stars *getusnob (SkyRegion *catstats, int photcode, int *nstars) {5 Stars *getusnob (SkyRegion *catstats, int photcode, unsigned int *nstars) { 6 6 7 long int offset;7 off_t offset; 8 8 int i, bin, first, last, nitems, Nitems, Nbins, Nitemsum; 9 9 float hours[100]; … … 93 93 /* advance file pointer to first slice */ 94 94 offset = NELEM*NBYTE*(start[first] - 1); 95 fseek (f, offset, SEEK_SET);95 fseeko (f, offset, SEEK_SET); 96 96 97 97 /* sum the number of stars in data segment of interest */ -
trunk/Ohana/src/addstar/src/greference.c
r21508 r27435 3 3 # define LOAD_DR2 1 4 4 5 Stars *greference (char *Refcat, SkyRegion *region, int photcode, int *nstars) {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 -
trunk/Ohana/src/addstar/src/grefstars.c
r21508 r27435 2 2 3 3 /* read ASCII file with ref star data */ 4 Stars *grefstars (char *file, int photcode, int *Nstars) {4 Stars *grefstars (char *file, int photcode, unsigned int *Nstars) { 5 5 6 6 FILE *f; -
trunk/Ohana/src/addstar/src/gztest.c
r3376 r27435 5 5 main (int argc, char **argv) { 6 6 7 int N, Nread, Nseek, Nback; 7 off_t Nseek, Nback; 8 int N, Nread; 8 9 char *filename, *buffer; 9 10 gzFile gf; … … 66 67 67 68 gettimeofday (&start, NULL); 68 N = fseek (f, Nseek, SEEK_SET);69 N = fseeko (f, Nseek, SEEK_SET); 69 70 gettimeofday (&stop, NULL); 70 71 if (N) { … … 84 85 85 86 gettimeofday (&start, NULL); 86 N = fseek (f, Nback, SEEK_CUR);87 N = fseeko (f, Nback, SEEK_CUR); 87 88 gettimeofday (&stop, NULL); 88 89 if (N) { -
trunk/Ohana/src/addstar/src/mkcmf.c
r20936 r27435 19 19 // load a text table with X,Y,Mag (instrumental?) 20 20 21 int i, N, Nstars, NSTARS ;21 int i, N, Nstars, NSTARS, found; 22 22 double *X, *Y, *M; 23 23 double Xmax, Ymax; … … 56 56 } 57 57 58 // add support for all cmf types 59 static char *type = "PS1_DEV_1"; 60 if ((N = get_argument (argc, argv, "-type"))) { 61 remove_argument (N, &argc, argv); 62 type = strcreate (argv[N]); 63 remove_argument (N, &argc, argv); 64 fprintf (stderr, "support for other types is broken: see comment at line 97\n"); 65 exit (1); 66 } 67 58 68 if (argc != 3) { 59 fprintf (stderr, "USAGE mkcmf (input) (output) [-date date] [-time time] [-radec ra dec] \n");69 fprintf (stderr, "USAGE mkcmf (input) (output) [-date date] [-time time] [-radec ra dec] [-cmftype type]\n"); 60 70 exit (2); 61 71 } … … 86 96 87 97 // XXX add gaussian-distributed noise based on counts 98 // this needs to make different output 'stars' entries depending on the desired type 88 99 ALLOCATE (stars, PS1_DEV_1, Nstars); 89 100 gauss_init (2048); … … 162 173 163 174 ftable.header = &theader; 164 gfits_table_set_PS1_DEV_1 (&ftable, stars, Nstars); 175 176 // set up desired CMF type: 177 found = FALSE; 178 # if 0 179 if (!strcmp(type, "PS1_DEV_0")) { 180 gfits_table_set_PS1_DEV_0 (&ftable, stars, Nstars); 181 gfits_modify (&theader, "EXTTYPE", "%s", 1, "PS1_DEV_0"); 182 found = TRUE; 183 } 184 # endif 185 if (!strcmp(type, "PS1_DEV_1")) { 186 gfits_table_set_PS1_DEV_1 (&ftable, stars, Nstars); 187 gfits_modify (&theader, "EXTTYPE", "%s", 1, "PS1_DEV_1"); 188 found = TRUE; 189 } 190 # if 0 191 if (!strcmp(type, "PS1_V1")) { 192 gfits_table_set_CMF_PS1_V1 (&ftable, stars, Nstars); 193 gfits_modify (&theader, "EXTTYPE", "%s", 1, "PS1_V1"); 194 found = TRUE; 195 } 196 if (!strcmp(type, "PS1_V2")) { 197 gfits_table_set_CMF_PS1_V2 (&ftable, stars, Nstars); 198 gfits_modify (&theader, "EXTTYPE", "%s", 1, "PS1_V2"); 199 found = TRUE; 200 } 201 # endif 202 if (!found) { 203 fprintf (stderr, "ERROR: unknown CMF type %s\n", type); 204 exit (1); 205 } 206 207 gfits_modify (&theader, "EXTHEAD", "%s", 1, "Chip.hdr"); 165 208 gfits_modify (&theader, "EXTNAME", "%s", 1, "Chip.psf"); 166 gfits_modify (&theader, "EXTTYPE", "%s", 1, "PS1_DEV_1");167 gfits_modify (&theader, "EXTHEAD", "%s", 1, "Chip.hdr");168 209 169 210 fits = fopen (argv[2], "w"); -
trunk/Ohana/src/addstar/src/psps_ids.c
- Property svn:mergeinfo changed (with no actual effect on merging)
-
trunk/Ohana/src/addstar/src/resort_catalog.c
r7039 r27435 3 3 void resort_catalog (Catalog *catalog) { 4 4 5 int *next_meas;6 int Naves, Nmeas;5 off_t *next_meas; 6 off_t Naves, Nmeas; 7 7 double dtime; 8 8 struct timeval start, stop; … … 24 24 gettimeofday (&stop, NULL); 25 25 dtime = DTIME (stop, start); 26 fprintf (stderr, " match time %9.4f sec for %7 d measures, %6d average\n", dtime, Nmeas,Naves);26 fprintf (stderr, " match time %9.4f sec for %7lld measures, %6lld average\n", dtime, (long long) Nmeas, (long long) Naves); 27 27 28 28 return; -
trunk/Ohana/src/addstar/src/sky_tessalation.c
r23914 r27435 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 952 952 // reset db[0].theader(NAXIS1) to match Image 953 gfits_modify (&db[0].theader, "NAXIS1", "% d", 1,sizeof(Image));953 gfits_modify (&db[0].theader, "NAXIS1", "%lld", 1, (long long) sizeof(Image)); 954 954 db[0].theader.Naxis[0] = sizeof(Image); 955 955 -
trunk/Ohana/src/addstar/src/update_coords.c
r16810 r27435 2 2 3 3 /* find the average and scatter for R and D - no outlier rejection */ 4 void update_coords (Average *average, Measure *measure, int *next) {4 void update_coords (Average *average, Measure *measure, off_t *next) { 5 5 6 int i, m, Npt;6 off_t i, m, Npt; 7 7 double R, D, r, d; 8 8 double r2, d2, dR2, dD2;
Note:
See TracChangeset
for help on using the changeset viewer.
