Changeset 28723
- Timestamp:
- Jul 27, 2010, 3:17:14 PM (16 years ago)
- Location:
- branches/eam_branches/ipp-20100621/Ohana/src
- Files:
-
- 40 edited
-
addstar/src/LoadData.c (modified) (1 diff)
-
addstar/src/ReadStarsFITS.c (modified) (7 diffs)
-
delstar/src/delete_imagename.c (modified) (1 diff)
-
delstar/src/delete_times.c (modified) (1 diff)
-
delstar/src/find_image_db.c (modified) (1 diff)
-
dvomerge/src/dvo_image_merge_dbs.c (modified) (1 diff)
-
dvomerge/src/dvoconvert.c (modified) (1 diff)
-
dvomerge/src/dvoverify.c (modified) (1 diff)
-
gastro2/src/rfits.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)
-
imregister/src/detsearch.c (modified) (1 diff)
-
imregister/src/imphotsearch.c (modified) (1 diff)
-
imregister/src/imregtable.c (modified) (1 diff)
-
imregister/src/imsearch.c (modified) (1 diff)
-
imregister/src/imstatreg.c (modified) (2 diffs)
-
imregister/src/photsearch.c (modified) (1 diff)
-
imregister/src/spsearch.c (modified) (1 diff)
-
markstar/src/find_images.c (modified) (1 diff)
-
mosastro/src/rfits.c (modified) (1 diff)
-
opihi/dvo/LoadImages.c (modified) (1 diff)
-
opihi/dvo/cmpReadFile.c (modified) (1 diff)
-
photdbc/src/copy_images.c (modified) (1 diff)
-
photdbc/src/find_images.c (modified) (2 diffs)
-
photdbc/src/flag_measures.c (modified) (1 diff)
-
relphot/src/ImageOps.c (modified) (4 diffs)
-
relphot/src/MosaicOps.c (modified) (5 diffs)
-
relphot/src/StarOps.c (modified) (3 diffs)
-
relphot/src/initialize.c (modified) (1 diff)
-
relphot/src/load_images.c (modified) (1 diff)
-
relphot/src/select_images.c (modified) (1 diff)
-
relphot/src/setMrelFinal.c (modified) (1 diff)
-
uniphot/src/find_image_sgroups.c (modified) (3 diffs)
-
uniphot/src/find_image_tgroups.c (modified) (2 diffs)
-
uniphot/src/initialize.c (modified) (1 diff)
-
uniphot/src/load_images.c (modified) (1 diff)
-
uniphot/src/match_zpts_to_images.c (modified) (1 diff)
-
uniphot/src/subset_images.c (modified) (3 diffs)
-
uniphot/src/update.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100621/Ohana/src/addstar/src/LoadData.c
r27435 r28723 80 80 81 81 inStars = ReadStarsFITS (f, headers[Nhead], headers[Ndata], &images[0][Nvalid].nstar); 82 if (!inStars) { 83 // XXX need to free the data here or in ReadStarsFITS on error 84 continue; 85 } 86 82 87 inStars = FilterStars (inStars, &images[0][Nvalid], Nvalid); 83 88 *stars = MergeStars (*stars, Nstars, inStars, images[0][Nvalid].nstar); -
branches/eam_branches/ipp-20100621/Ohana/src/addstar/src/ReadStarsFITS.c
r27435 r28723 49 49 if (stars == NULL) { 50 50 fprintf (stderr, "ERROR: invalid table type %s\n", type); 51 exit (1);51 return (NULL); 52 52 } 53 53 // Nstars is not necessarily == *nstars (The former is the number of detections, the … … 69 69 swapped = FALSE; 70 70 smpdata = gfits_table_get_SMPData (table, &Nstars, &swapped); 71 if (!smpdata) { 72 fprintf (stderr, "skipping inconsistent entry\n"); 73 return (NULL); 74 } 71 75 ZeroPt = GetZeroPoint(); 72 76 … … 108 112 109 113 ps1data = gfits_table_get_PS1_DEV_0 (table, &Nstars, NULL); 114 if (!ps1data) { 115 fprintf (stderr, "skipping inconsistent entry\n"); 116 return (NULL); 117 } 110 118 ZeroPt = GetZeroPoint(); 111 119 … … 153 161 154 162 ps1data = gfits_table_get_PS1_DEV_1 (table, &Nstars, NULL); 163 if (!ps1data) { 164 fprintf (stderr, "skipping inconsistent entry\n"); 165 return (NULL); 166 } 155 167 ZeroPt = GetZeroPoint(); 156 168 … … 212 224 213 225 ps1data = gfits_table_get_CMF_PS1_V1 (table, &Nstars, NULL); 226 if (!ps1data) { 227 fprintf (stderr, "skipping inconsistent entry\n"); 228 return (NULL); 229 } 214 230 ZeroPt = GetZeroPoint(); 215 231 … … 284 300 285 301 ps1data = gfits_table_get_CMF_PS1_V1_Alt (table, &Nstars, NULL); 302 if (!ps1data) { 303 fprintf (stderr, "skipping inconsistent entry\n"); 304 return (NULL); 305 } 286 306 ZeroPt = GetZeroPoint(); 287 307 … … 348 368 349 369 ps1data = gfits_table_get_CMF_PS1_V2 (table, &Nstars, NULL); 370 if (!ps1data) { 371 fprintf (stderr, "skipping inconsistent entry\n"); 372 return (NULL); 373 } 350 374 ZeroPt = GetZeroPoint(); 351 375 -
branches/eam_branches/ipp-20100621/Ohana/src/delstar/src/delete_imagename.c
r28241 r28723 19 19 20 20 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].swapped); 21 if (!image) { 22 fprintf (stderr, "ERROR: failed to read images\n"); 23 exit (2); 24 } 21 25 22 26 /* find image in db by name */ -
branches/eam_branches/ipp-20100621/Ohana/src/delstar/src/delete_times.c
r27435 r28723 26 26 27 27 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].swapped); 28 if (!image) { 29 fprintf (stderr, "ERROR: failed to read images\n"); 30 exit (2); 31 } 28 32 29 33 /* find images for time range, delete each image */ -
branches/eam_branches/ipp-20100621/Ohana/src/delstar/src/find_image_db.c
r27435 r28723 17 17 18 18 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].swapped); 19 if (!image) { 20 fprintf (stderr, "ERROR: failed to read images\n"); 21 exit (2); 22 } 19 23 20 24 Nlist = 0; -
branches/eam_branches/ipp-20100621/Ohana/src/dvomerge/src/dvo_image_merge_dbs.c
r28354 r28723 13 13 14 14 images = gfits_table_get_Image (&in[0].ftable, &Nimages, &in[0].swapped); 15 if (!images) { 16 fprintf (stderr, "ERROR: failed to read images\n"); 17 exit (2); 18 } 19 15 20 ALLOCATE (IDmap->old, off_t, Nimages); 16 21 ALLOCATE (IDmap->new, off_t, Nimages); -
branches/eam_branches/ipp-20100621/Ohana/src/dvomerge/src/dvoconvert.c
r28241 r28723 148 148 // convert the raw image table to Image type (byteswap if needed) 149 149 images = gfits_table_get_Image (&inDB.ftable, &Nimages, &inDB.swapped); 150 if (!images) { 151 fprintf (stderr, "ERROR: failed to read images\n"); 152 exit (2); 153 } 150 154 151 155 // update additional metadata -
branches/eam_branches/ipp-20100621/Ohana/src/dvomerge/src/dvoverify.c
r28268 r28723 154 154 // convert the raw image table to Image type (byteswap if needed) 155 155 images = gfits_table_get_Image (&inDB.ftable, &Nimages, &inDB.swapped); 156 if (!images) { 157 fprintf (stderr, "ERROR: failed to read images\n"); 158 exit (2); 159 } 156 160 157 161 // update additional metadata -
branches/eam_branches/ipp-20100621/Ohana/src/gastro2/src/rfits.c
r27435 r28723 15 15 16 16 stars = gfits_table_get_SMPData (&table, &Nstars, NULL); 17 if (!stars) { 18 fprintf (stderr, "ERROR: failed to read stars\n"); 19 exit (2); 20 } 17 21 18 22 ALLOCATE (stardata, StarData, Nstars); -
branches/eam_branches/ipp-20100621/Ohana/src/getstar/src/dvoImageExtract.c
r27435 r28723 32 32 // convert database table to internal structure 33 33 images = gfits_table_get_Image (&db.ftable, &Nimages, &db.swapped); 34 if (!images) { 35 fprintf (stderr, "ERROR: failed to read images\n"); 36 exit (2); 37 } 34 38 35 39 matches = SelectImages (argv[1], images, Nimages, &Nmatches); -
branches/eam_branches/ipp-20100621/Ohana/src/getstar/src/dvoImageOverlaps.c
r27435 r28723 35 35 // convert database table to internal structure 36 36 dbImages = gfits_table_get_Image (&db.ftable, &NdbImages, &db.swapped); 37 if (!dbImages) { 38 fprintf (stderr, "ERROR: failed to read images\n"); 39 exit (2); 40 } 37 41 38 42 // for (i = 1; i < 2; i++) { -
branches/eam_branches/ipp-20100621/Ohana/src/getstar/src/dvoImagesAtCoords.c
r27435 r28723 55 55 // convert database table to internal structure 56 56 dbImages = gfits_table_get_Image (&db.ftable, &NdbImages, &db.swapped); 57 if (!dbImages) { 58 fprintf (stderr, "ERROR: failed to read images\n"); 59 exit (2); 60 } 57 61 } 58 62 -
branches/eam_branches/ipp-20100621/Ohana/src/imregister/src/detsearch.c
r27435 r28723 36 36 if (!output.Modify && !output.Delete && !output.Altpath) gfits_db_close (&db); 37 37 detrend = gfits_table_get_DetReg (&db.ftable, &Ndetrend, &db.swapped); 38 if (!detrend) { 39 fprintf (stderr, "ERROR: failed to read detrend info\n"); 40 exit (2); 41 } 38 42 39 43 match = MatchCriteria (detrend, Ndetrend, &Nmatch); /* match basic criteria */ -
branches/eam_branches/ipp-20100621/Ohana/src/imregister/src/imphotsearch.c
r27435 r28723 33 33 34 34 image = gfits_table_get_Image (&db.ftable, &Nimage, &db.swapped); 35 if (!image) { 36 fprintf (stderr, "ERROR: failed to read images\n"); 37 exit (2); 38 } 35 39 36 40 match = subset (image, Nimage, &Nmatch); -
branches/eam_branches/ipp-20100621/Ohana/src/imregister/src/imregtable.c
r27435 r28723 34 34 35 35 image = gfits_table_get_RegImage (&ftable, &Nimage, NULL); 36 if (!image) { 37 fprintf (stderr, "ERROR: failed to read images\n"); 38 exit (2); 39 } 36 40 37 41 /* load database table */ -
branches/eam_branches/ipp-20100621/Ohana/src/imregister/src/imsearch.c
r27435 r28723 30 30 31 31 image = gfits_table_get_RegImage (&db.ftable, &Nimage, &db.swapped); 32 if (!image) { 33 fprintf (stderr, "ERROR: failed to read images\n"); 34 exit (2); 35 } 32 36 33 37 match = match_criteria (image, Nimage, &Nmatch); -
branches/eam_branches/ipp-20100621/Ohana/src/imregister/src/imstatreg.c
r27611 r28723 67 67 } 68 68 subset = gfits_table_get_RegImage (&temp_db.ftable, &Nsubset, &temp_db.swapped); 69 if (!subset) { 70 fprintf (stderr, "ERROR: failed to read images\n"); 71 exit (2); 72 } 69 73 fprintf (stderr, "temporary database read\n"); 70 74 … … 93 97 } 94 98 image = gfits_table_get_RegImage (&image_db.ftable, &Nimage, &image_db.swapped); 99 if (!image) { 100 fprintf (stderr, "ERROR: failed to read images\n"); 101 exit (2); 102 } 95 103 fprintf (stderr, "main database read\n"); 96 104 -
branches/eam_branches/ipp-20100621/Ohana/src/imregister/src/photsearch.c
r27435 r28723 42 42 if (output.convert) { 43 43 photpars_old = gfits_table_get_PhotParsOld (&db.ftable, &Nphotpars, &db.swapped); 44 if (!photpars_old) { 45 fprintf (stderr, "ERROR: failed to read photometry parameters\n"); 46 exit (2); 47 } 44 48 photpars = PhotParsOld_to_PhotPars (photpars_old, Nphotpars); 45 49 } else { 46 50 photpars = gfits_table_get_PhotPars (&db.ftable, &Nphotpars, &db.swapped); 51 if (!photpars) { 52 fprintf (stderr, "ERROR: failed to read photometry parameters\n"); 53 exit (2); 54 } 47 55 } 48 56 -
branches/eam_branches/ipp-20100621/Ohana/src/imregister/src/spsearch.c
r27435 r28723 30 30 31 31 spectrum = gfits_table_get_Spectrum (&db.ftable, &Nspectrum, &db.swapped); 32 if (!spectrum) { 33 fprintf (stderr, "ERROR: failed to read spectrum\n"); 34 exit (2); 35 } 32 36 33 37 match = match_criteria (spectrum, Nspectrum, &Nmatch); -
branches/eam_branches/ipp-20100621/Ohana/src/markstar/src/find_images.c
r7080 r28723 26 26 27 27 timage = gfits_table_get_Image (&db[0].ftable, &Ntimage, &db[0].swapped); 28 if (!timage) { 29 fprintf (stderr, "ERROR: failed to read images\n"); 30 exit (2); 31 } 28 32 29 33 /* set up buffers for images, temporary storage */ -
branches/eam_branches/ipp-20100621/Ohana/src/mosastro/src/rfits.c
r27435 r28723 32 32 off_t Nstars; 33 33 stars = gfits_table_get_SMPData (&table, &Nstars, NULL); 34 if (!stars) { 35 fprintf (stderr, "ERROR: failed to read stars\n"); 36 exit (2); 37 } 38 34 39 mychip[0].Nstars = Nstars; 35 40 gfits_scan (table.header, "NAXIS1", "%d", 1, &Nx); -
branches/eam_branches/ipp-20100621/Ohana/src/opihi/dvo/LoadImages.c
r27435 r28723 38 38 39 39 image = gfits_table_get_Image (&db.ftable, Nimage, &db.swapped); 40 if (!image) { 41 fprintf (stderr, "ERROR: failed to read images\n"); 42 exit (2); 43 } 40 44 return (image); 41 45 } -
branches/eam_branches/ipp-20100621/Ohana/src/opihi/dvo/cmpReadFile.c
r27435 r28723 20 20 21 21 smpdata = gfits_table_get_SMPData (&table, &Nstars, NULL); 22 if (!smpdata) { 23 fprintf (stderr, "ERROR: failed to read stars\n"); 24 exit (2); 25 } 22 26 23 27 ALLOCATE (stars, CMPstars, Nstars); -
branches/eam_branches/ipp-20100621/Ohana/src/photdbc/src/copy_images.c
r28331 r28723 46 46 47 47 image = gfits_table_get_Image (&in.ftable, &Nimage, &in.swapped); 48 if (!image) { 49 fprintf (stderr, "ERROR: failed to read images\n"); 50 exit (2); 51 } 48 52 dvo_image_addrows (&out, image, Nimage); 49 53 -
branches/eam_branches/ipp-20100621/Ohana/src/photdbc/src/find_images.c
r12332 r28723 28 28 29 29 timage = gfits_table_get_Image (&db[0].ftable, &Ntimage, &db[0].swapped); 30 if (!timage) { 31 fprintf (stderr, "ERROR: failed to read images\n"); 32 exit (2); 33 } 30 34 31 35 nimage = 0; … … 97 101 if (found) { 98 102 image[nimage] = timage[i]; 99 if (image[nimage].code == ID_IMAGE_ NOCAL) {100 image[nimage].code &= ~ID_IMAGE_ NOCAL;103 if (image[nimage].code == ID_IMAGE_PHOTOM_NOCAL) { 104 image[nimage].code &= ~ID_IMAGE_PHOTOM_NOCAL; 101 105 } 102 106 line_number[nimage] = i; -
branches/eam_branches/ipp-20100621/Ohana/src/photdbc/src/flag_measures.c
r12332 r28723 16 16 17 17 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].swapped); 18 if (!image) { 19 fprintf (stderr, "ERROR: failed to read images\n"); 20 exit (2); 21 } 18 22 19 23 PhotNsec = GetPhotcodeNsecfilt (); -
branches/eam_branches/ipp-20100621/Ohana/src/relphot/src/ImageOps.c
r28241 r28723 323 323 /* on PoorImages run, skip good images */ 324 324 if (PoorImages) { 325 bad = image[i].flags & (ID_IMAGE_ FEW | ID_IMAGE_POOR | ID_IMAGE_SKIP);325 bad = image[i].flags & (ID_IMAGE_PHOTOM_FEW | ID_IMAGE_PHOTOM_POOR | ID_IMAGE_PHOTOM_SKIP); 326 326 if (!bad) continue; 327 327 } … … 369 369 mark = (N < IMAGE_TOOFEW) || (N < IMAGE_GOOD_FRACTION*Nlist[i]); 370 370 if (mark) { 371 image[i].flags |= ID_IMAGE_ FEW;371 image[i].flags |= ID_IMAGE_PHOTOM_FEW; 372 372 Nfew ++; 373 373 } else { 374 image[i].flags &= ~ID_IMAGE_ FEW;374 image[i].flags &= ~ID_IMAGE_PHOTOM_FEW; 375 375 } 376 376 } … … 387 387 388 388 if (PoorImages) { 389 IMAGE_BAD = ID_IMAGE_P OOR | ID_IMAGE_FEW | ID_IMAGE_SKIP;389 IMAGE_BAD = ID_IMAGE_PHOTOM_POOR | ID_IMAGE_PHOTOM_FEW | ID_IMAGE_PHOTOM_SKIP; 390 390 STAR_BAD = ID_STAR_POOR | ID_STAR_FEW; 391 391 MEAS_BAD = ID_MEAS_NOCAL | ID_MEAS_POOR_PHOTOM | ID_MEAS_SKIP_PHOTOM | ID_MEAS_AREA; … … 429 429 for (i = 0; i < Nimage; i++) { 430 430 mark = FALSE; 431 image[i].flags &= ~ID_IMAGE_P OOR;431 image[i].flags &= ~ID_IMAGE_PHOTOM_POOR; 432 432 mark = (image[i].dMcal > MaxScatter) || (fabs(image[i].Mcal - MedOffset) > MaxOffset); 433 433 if (mark) { 434 434 Nmark ++; 435 image[i].flags |= ID_IMAGE_P OOR;435 image[i].flags |= ID_IMAGE_PHOTOM_POOR; 436 436 } else { 437 image[i].flags &= ~ID_IMAGE_P OOR;437 image[i].flags &= ~ID_IMAGE_PHOTOM_POOR; 438 438 } 439 439 } -
branches/eam_branches/ipp-20100621/Ohana/src/relphot/src/MosaicOps.c
r28241 r28723 189 189 image[im].dMcal = mosaic[i].dMcal; 190 190 image[im].Xm = mosaic[i].Xm; 191 image[im].flags |= (mosaic[i].flags & ID_IMAGE_ FEW);192 image[im].flags |= (mosaic[i].flags & ID_IMAGE_P OOR);191 image[im].flags |= (mosaic[i].flags & ID_IMAGE_PHOTOM_FEW); 192 image[im].flags |= (mosaic[i].flags & ID_IMAGE_PHOTOM_POOR); 193 193 } 194 194 } … … 351 351 /* on PoorImages run, skip good images */ 352 352 if (PoorImages) { 353 bad = mosaic[i].flags & (ID_IMAGE_ FEW | ID_IMAGE_POOR | ID_IMAGE_SKIP);353 bad = mosaic[i].flags & (ID_IMAGE_PHOTOM_FEW | ID_IMAGE_PHOTOM_POOR | ID_IMAGE_PHOTOM_SKIP); 354 354 if (!bad) continue; 355 355 } … … 401 401 if (mark) { 402 402 fprintf (stderr, "marked mosaic %s ("OFF_T_FMT"), ("OFF_T_FMT" < %d) || ("OFF_T_FMT" < %f*"OFF_T_FMT")\n", image[imlist[i][0]].name, i, N, IMAGE_TOOFEW, N, IMAGE_GOOD_FRACTION, Nlist[i]); 403 mosaic[i].flags |= ID_IMAGE_ FEW;403 mosaic[i].flags |= ID_IMAGE_PHOTOM_FEW; 404 404 Nfew ++; 405 405 } else { 406 mosaic[i].flags &= ~ID_IMAGE_ FEW;406 mosaic[i].flags &= ~ID_IMAGE_PHOTOM_FEW; 407 407 } 408 408 } … … 421 421 422 422 if (PoorImages) { 423 IMAGE_BAD = ID_IMAGE_P OOR | ID_IMAGE_FEW | ID_IMAGE_SKIP;423 IMAGE_BAD = ID_IMAGE_PHOTOM_POOR | ID_IMAGE_PHOTOM_FEW | ID_IMAGE_PHOTOM_SKIP; 424 424 STAR_BAD = ID_STAR_POOR | ID_STAR_FEW; 425 425 MEAS_BAD = ID_MEAS_NOCAL | ID_MEAS_POOR_PHOTOM | ID_MEAS_SKIP_PHOTOM | ID_MEAS_AREA; … … 593 593 if (mark) { 594 594 Nmark ++; 595 mosaic[i].flags |= ID_IMAGE_P OOR;595 mosaic[i].flags |= ID_IMAGE_PHOTOM_POOR; 596 596 } else { 597 mosaic[i].flags &= ~ID_IMAGE_P OOR;597 mosaic[i].flags &= ~ID_IMAGE_PHOTOM_POOR; 598 598 } 599 599 } -
branches/eam_branches/ipp-20100621/Ohana/src/relphot/src/StarOps.c
r28241 r28723 302 302 } 303 303 304 /* set measure.Mcal for all measures except ID_MEAS_NOCAL and ID_IMAGE_ NOCAL */304 /* set measure.Mcal for all measures except ID_MEAS_NOCAL and ID_IMAGE_PHOTOM_NOCAL */ 305 305 int setMcalOutput (Catalog *catalog, int Ncatalog) { 306 306 … … 310 310 311 311 MEAS_BAD = ID_MEAS_NOCAL; 312 IMAGE_BAD = ID_IMAGE_ NOCAL;312 IMAGE_BAD = ID_IMAGE_PHOTOM_NOCAL; 313 313 314 314 for (i = 0; i < Ncatalog; i++) { … … 470 470 /* apply to list of all relevant measurements, including IMAGE_POOR & IMAGE_FEW */ 471 471 image_bad = IMAGE_BAD; 472 IMAGE_BAD = ID_IMAGE_ NOCAL;472 IMAGE_BAD = ID_IMAGE_PHOTOM_NOCAL; 473 473 m = catalog[i].average[j].measureOffset; 474 474 N = 0; -
branches/eam_branches/ipp-20100621/Ohana/src/relphot/src/initialize.c
r17242 r28723 27 27 initstats (STATMODE); 28 28 29 IMAGE_BAD = ID_IMAGE_P OOR | ID_IMAGE_FEW | ID_IMAGE_SKIP;29 IMAGE_BAD = ID_IMAGE_PHOTOM_POOR | ID_IMAGE_PHOTOM_FEW | ID_IMAGE_PHOTOM_SKIP; 30 30 STAR_BAD = ID_STAR_POOR | ID_STAR_FEW; 31 31 MEAS_BAD = ID_MEAS_NOCAL | ID_MEAS_POOR_PHOTOM | ID_MEAS_SKIP_PHOTOM | ID_MEAS_AREA; -
branches/eam_branches/ipp-20100621/Ohana/src/relphot/src/load_images.c
r28241 r28723 25 25 // convert database table to internal structure 26 26 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].swapped); 27 if (!image) { 28 fprintf (stderr, "ERROR: failed to read images\n"); 29 exit (2); 30 } 27 31 28 32 // select the images which overlap the selected sky regions -
branches/eam_branches/ipp-20100621/Ohana/src/relphot/src/select_images.c
r28241 r28723 157 157 image[nimage] = timage[i]; 158 158 /* always allow 'few' images to succeed, if possible */ 159 if (image[nimage].flags & ID_IMAGE_ FEW) {160 image[nimage].flags &= ~(ID_IMAGE_ FEW | ID_IMAGE_POOR);159 if (image[nimage].flags & ID_IMAGE_PHOTOM_FEW) { 160 image[nimage].flags &= ~(ID_IMAGE_PHOTOM_FEW | ID_IMAGE_PHOTOM_POOR); 161 161 } 162 162 if (RESET) { 163 163 assignMcal (&image[nimage], (double *) NULL, -1); 164 164 image[nimage].dMcal = NAN; 165 image[nimage].flags &= ~ID_IMAGE_P OOR;165 image[nimage].flags &= ~ID_IMAGE_PHOTOM_POOR; 166 166 } 167 167 line_number[nimage] = i; -
branches/eam_branches/ipp-20100621/Ohana/src/relphot/src/setMrelFinal.c
r28241 r28723 75 75 76 76 /* allow measures from images marked POOR and FEW */ 77 if (pass >= 3) IMAGE_BAD = ID_IMAGE_ NOCAL;77 if (pass >= 3) IMAGE_BAD = ID_IMAGE_PHOTOM_NOCAL; 78 78 79 79 /* allow measures marked as outliers (POOR) and off image region (AREA) */ -
branches/eam_branches/ipp-20100621/Ohana/src/uniphot/src/find_image_sgroups.c
r27435 r28723 13 13 imlink = *Imlink; 14 14 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].swapped); 15 if (!image) { 16 fprintf (stderr, "ERROR: failed to read images\n"); 17 exit (2); 18 } 15 19 16 20 coords.crpix1 = coords.crpix2 = 0.0; … … 28 32 for (i = 0; i < Nimage; i++) { 29 33 if (imlink[i].sgroup != NULL) continue; 30 if (image[i].flags & ID_IMAGE_ NOCAL) continue;34 if (image[i].flags & ID_IMAGE_PHOTOM_NOCAL) continue; 31 35 32 36 /* new sgroup, set ref coords */ … … 53 57 54 58 for (j = 0; j < Nimage; j++) { 55 if (image[j].flags & ID_IMAGE_ NOCAL) continue;59 if (image[j].flags & ID_IMAGE_PHOTOM_NOCAL) continue; 56 60 if (imlink[j].sgroup != NULL) continue; 57 61 -
branches/eam_branches/ipp-20100621/Ohana/src/uniphot/src/find_image_tgroups.c
r27435 r28723 12 12 13 13 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].swapped); 14 if (!image) { 15 fprintf (stderr, "ERROR: failed to read images\n"); 16 exit (2); 17 } 18 14 19 ALLOCATE (imlink, ImageLink, Nimage); 15 20 … … 64 69 if (image[j].tzero < tmin[i]) continue; 65 70 if (image[j].tzero > tmax[i]) continue; 66 if (image[j].flags & ID_IMAGE_ NOCAL) continue;71 if (image[j].flags & ID_IMAGE_PHOTOM_NOCAL) continue; 67 72 68 73 group[i].image[Nentry] = &image[j]; -
branches/eam_branches/ipp-20100621/Ohana/src/uniphot/src/initialize.c
r27790 r28723 16 16 } 17 17 18 IMAGE_BAD = ID_IMAGE_ NOCAL | ID_IMAGE_POOR | ID_IMAGE_SKIP | ID_IMAGE_FEW;18 IMAGE_BAD = ID_IMAGE_PHOTOM_NOCAL | ID_IMAGE_PHOTOM_POOR | ID_IMAGE_PHOTOM_SKIP | ID_IMAGE_PHOTOM_FEW; 19 19 20 20 initstats (STATMODE); -
branches/eam_branches/ipp-20100621/Ohana/src/uniphot/src/load_images.c
r28241 r28723 22 22 /* use a vtable to keep the images to be calibrated */ 23 23 image = gfits_table_get_Image (&db[0].ftable, Nimage, &db[0].swapped); 24 if (!image) { 25 fprintf (stderr, "ERROR: failed to read images\n"); 26 exit (2); 27 } 24 28 25 29 fprintf (stderr, "loaded "OFF_T_FMT" images\n", *Nimage); -
branches/eam_branches/ipp-20100621/Ohana/src/uniphot/src/match_zpts_to_images.c
r27790 r28723 70 70 // we have a match: set zpt and record the match 71 71 image[Ni].Mcal = SCALE*code[0].C - zpts[Nz].zpt; 72 image[Ni].flags &= ~ID_IMAGE_ NOCAL; // clear the NOCAL flag72 image[Ni].flags &= ~ID_IMAGE_PHOTOM_NOCAL; // clear the NOCAL flag 73 73 zpts[Nz].found = TRUE; 74 74 NImatch ++; -
branches/eam_branches/ipp-20100621/Ohana/src/uniphot/src/subset_images.c
r27435 r28723 9 9 /* use a vtable to keep the images to be calibrated */ 10 10 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].swapped); 11 if (!image) { 12 fprintf (stderr, "ERROR: failed to read images\n"); 13 exit (2); 14 } 11 15 12 16 Nkeep = 0; … … 16 20 for (i = 0; i < Nimage; i++) { 17 21 18 image[i].flags |= ID_IMAGE_ NOCAL;22 image[i].flags |= ID_IMAGE_PHOTOM_NOCAL; 19 23 20 24 /* select images by photcode */ … … 27 31 if (image[i].tzero > TSTOP) continue; 28 32 } 29 image[i].flags &= ~ID_IMAGE_ NOCAL;33 image[i].flags &= ~ID_IMAGE_PHOTOM_NOCAL; 30 34 keep[Nkeep] = i; 31 35 Nkeep ++; -
branches/eam_branches/ipp-20100621/Ohana/src/uniphot/src/update.c
r27435 r28723 14 14 15 15 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].swapped); 16 if (!image) { 17 fprintf (stderr, "ERROR: failed to read images\n"); 18 exit (2); 19 } 16 20 17 21 /* clear the NOCAL flags */ 18 22 for (i = 0; i < Nimage; i++) { 19 image[i].flags &= ~ID_IMAGE_ NOCAL;23 image[i].flags &= ~ID_IMAGE_PHOTOM_NOCAL; 20 24 } 21 25
Note:
See TracChangeset
for help on using the changeset viewer.
