- Timestamp:
- Jul 29, 2016, 11:46:14 AM (10 years ago)
- Location:
- trunk/Ohana/src/relphot
- Files:
-
- 6 edited
-
include/relphot.h (modified) (2 diffs)
-
src/ImageOps.c (modified) (2 diffs)
-
src/args.c (modified) (2 diffs)
-
src/load_images.c (modified) (2 diffs)
-
src/relphot_images.c (modified) (1 diff)
-
src/relphot_objects.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/relphot/include/relphot.h
r39641 r39642 355 355 char *UserCatalog; 356 356 357 int USE_ALL_IMAGES; 357 358 int USE_BASIC_CHECK; 358 359 int USE_FULL_OVERLAP; … … 437 438 Catalog *load_catalogs_parallel PROTO((SkyList *sky, int *Ncatalog, char *syncfile)); 438 439 439 int load_images PROTO((FITS_DB *db, SkyList *skylist, SkyRegion *region, int unlockImages ));440 int load_images PROTO((FITS_DB *db, SkyList *skylist, SkyRegion *region, int unlockImages, int UseAllImages)); 440 441 Image *select_images PROTO((SkyList *skylist, Image *timage, off_t Ntimage, char *inSubset, off_t **LineNumber, off_t *Nimage, SkyRegion *region)); 441 442 -
trunk/Ohana/src/relphot/src/ImageOps.c
r39641 r39642 615 615 void setMcal (Catalog *catalog, int PoorImages, FlatCorrectionTable *flatcorr) { 616 616 617 off_t i, j, m, c, n, N , Nmax;617 off_t i, j, m, c, n, Nmax; 618 618 int mark, bad, Nfew, Nbad, Nmos, Nrel, Ngrid, Nsys; 619 619 float Msys, Mrel, Mmos, Mgrid, Mflat; … … 787 787 if (PLOTSTUFF) { 788 788 fprintf (stderr, "Mcal for : %s : %7.4f %7.4f\n", image[i].name, image[i].Mcal, image[i].dMcal); 789 plot_setMcal (refStars->flxlist, N , &stats, CLOUD_TOLERANCE);789 plot_setMcal (refStars->flxlist, Nref, &stats, CLOUD_TOLERANCE); 790 790 } 791 791 -
trunk/Ohana/src/relphot/src/args.c
r39641 r39642 56 56 UserCatalog = strcreate (argv[N]); 57 57 remove_argument (N, &argc, argv); 58 } 59 60 // If we are looking at the whole sky (or whole relevant sky), use the full image table 61 // -- this save substantial memory. this could be automatic if the skyregion covers 62 // more than 2pi. 63 USE_ALL_IMAGES = FALSE; 64 if ((N = get_argument (argc, argv, "-use-all-images"))) { 65 remove_argument (N, &argc, argv); 66 USE_ALL_IMAGES = TRUE; 58 67 } 59 68 … … 603 612 } 604 613 614 USE_ALL_IMAGES = FALSE; 615 if ((N = get_argument (argc, argv, "-use-all-images"))) { 616 remove_argument (N, &argc, argv); 617 USE_ALL_IMAGES = TRUE; 618 } 619 605 620 USE_BASIC_CHECK = FALSE; 606 621 if ((N = get_argument (argc, argv, "-basic-image-search"))) { -
trunk/Ohana/src/relphot/src/load_images.c
r39481 r39642 5 5 // This function generates a subset of the images based on selections. Input db has already 6 6 // been loaded with the raw fits table data 7 int load_images (FITS_DB *db, SkyList *skylist, SkyRegion *region, int unlockImages ) {7 int load_images (FITS_DB *db, SkyList *skylist, SkyRegion *region, int unlockImages, int UseAllImages) { 8 8 9 9 Image *image, *subset; … … 31 31 32 32 // select the images which overlap the selected sky regions 33 // 'subset' points to a new copy of the data (different from 'image') 34 subset = select_images (skylist, image, Nimage, inSubset, &LineNumber, &Nsubset, region); 35 MARKTIME("selected %d overlapping images: %f sec\n", (int) Nsubset, dtime); 33 // 'subset' points to a new copy of the data (different from 'image') if a subset is selected 34 if (UseAllImages) { 35 ALLOCATE (LineNumber, off_t, Nimage); 36 for (off_t i = 0; i < Nimage; i++) { 37 LineNumber[i] = i; 38 inSubset[i] = TRUE; 39 } 40 subset = image; 41 Nsubset = Nimage; 42 } else { 43 subset = select_images (skylist, image, Nimage, inSubset, &LineNumber, &Nsubset, region); 44 MARKTIME("selected %d overlapping images: %f sec\n", (int) Nsubset, dtime); 36 45 37 if (Nimage == 0) { 38 fprintf (stderr, "no images selected for analysis : problem with region or photcode?\n"); 39 exit (4); 46 if (Nimage == 0) { 47 fprintf (stderr, "no images selected for analysis : problem with region or photcode?\n"); 48 exit (4); 49 } 50 51 if (Nsubset == Nimage) { 52 free (subset); 53 subset = image; 54 } 40 55 } 41 56 -
trunk/Ohana/src/relphot/src/relphot_images.c
r39641 r39642 39 39 40 40 /* load regions and images based on specified sky patch and/or catalog */ 41 load_images (&db, skylist, &UserPatch, FALSE );41 load_images (&db, skylist, &UserPatch, FALSE, USE_ALL_IMAGES); 42 42 MARKTIME("-- load images: %f sec\n", dtime); 43 43 -
trunk/Ohana/src/relphot/src/relphot_objects.c
r39632 r39642 38 38 39 39 /* load regions and images based on specified sky patch (default depth) */ 40 load_images (&db, skylist, &UserPatch, TRUE );40 load_images (&db, skylist, &UserPatch, TRUE, USE_ALL_IMAGES); 41 41 MARKTIME("loaded images: %f sec\n", dtime); 42 42 … … 249 249 if (SYNTH_ZERO_POINTS) { strextend (&command, "-synthphot-zpts %s", SYNTH_ZERO_POINTS); } 250 250 if (USE_BASIC_CHECK) { strextend (&command, "-basic-image-search"); } 251 if (USE_ALL_IMAGES) { strextend (&command, "-use-all-images"); } 251 252 252 253 if (!(STAGES & STAGE_CHIP)) { strextend (&command, "-skip-chip"); }
Note:
See TracChangeset
for help on using the changeset viewer.
