Changeset 38986 for trunk/Ohana/src/relphot
- Timestamp:
- Oct 27, 2015, 4:49:06 PM (11 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 13 edited
-
. (modified) (1 prop)
-
src/relphot/include/relphot.h (modified) (2 diffs)
-
src/relphot/src/Shutdown.c (modified) (1 diff)
-
src/relphot/src/args.c (modified) (2 diffs)
-
src/relphot/src/load_catalogs.c (modified) (2 diffs)
-
src/relphot/src/load_images.c (modified) (1 diff)
-
src/relphot/src/reload_catalogs.c (modified) (2 diffs)
-
src/relphot/src/relphot.c (modified) (1 diff)
-
src/relphot/src/relphot_client.c (modified) (1 diff)
-
src/relphot/src/relphot_objects.c (modified) (2 diffs)
-
src/relphot/src/relphot_parallel_images.c (modified) (2 diffs)
-
src/relphot/src/relphot_synthphot.c (modified) (1 diff)
-
src/relphot/src/setMrelCatalog.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana
-
Property svn:mergeinfo
set to
/branches/eam_branches/ipp-20150625/Ohana merged eligible
-
Property svn:mergeinfo
set to
-
trunk/Ohana/src/relphot/include/relphot.h
r38466 r38986 14 14 // # define IDX_T off_t 15 15 # define IDX_T int 16 17 typedef enum { 18 STAGE_CHIP = 0x01, 19 STAGE_WARP = 0x02, 20 STAGE_STACK = 0x04, 21 } RelphotStages; 16 22 17 23 typedef enum { … … 327 333 int USE_BASIC_CHECK; 328 334 int USE_FULL_OVERLAP; 335 336 RelphotStages STAGES; 329 337 330 338 # ifdef GRID_V1 -
trunk/Ohana/src/relphot/src/Shutdown.c
r37037 r38986 21 21 va_end (argp); 22 22 23 SetProtect (TRUE);24 if (db) gfits_db_close (db);25 23 fprintf (stderr, "ERROR: relphot halted\n"); 26 24 exit (1); -
trunk/Ohana/src/relphot/src/args.c
r38466 r38986 344 344 } 345 345 346 STAGES = STAGE_CHIP | STAGE_WARP | STAGE_STACK; 347 if ((N = get_argument (argc, argv, "-skip-chip"))) { 348 remove_argument (N, &argc, argv); 349 STAGES &= ~STAGE_CHIP; 350 } 351 if ((N = get_argument (argc, argv, "-skip-warp"))) { 352 remove_argument (N, &argc, argv); 353 STAGES &= ~STAGE_WARP; 354 } 355 if ((N = get_argument (argc, argv, "-skip-stack"))) { 356 remove_argument (N, &argc, argv); 357 STAGES &= ~STAGE_STACK; 358 } 359 if (!STAGES) { 360 fprintf (stderr, "ERROR: no valid stages selected\n"); 361 exit (3); 362 } 363 346 364 REGION_FILE = NULL; 347 365 if ((N = get_argument (argc, argv, "-region-hosts"))) { … … 664 682 } 665 683 684 STAGES = STAGE_CHIP | STAGE_WARP | STAGE_STACK; 685 if ((N = get_argument (argc, argv, "-skip-chip"))) { 686 remove_argument (N, &argc, argv); 687 STAGES &= ~STAGE_CHIP; 688 } 689 if ((N = get_argument (argc, argv, "-skip-warp"))) { 690 remove_argument (N, &argc, argv); 691 STAGES &= ~STAGE_WARP; 692 } 693 if ((N = get_argument (argc, argv, "-skip-stack"))) { 694 remove_argument (N, &argc, argv); 695 STAGES &= ~STAGE_STACK; 696 } 697 if (!STAGES) { 698 fprintf (stderr, "ERROR: no valid stages selected\n"); 699 exit (3); 700 } 701 666 702 if ((MODE == MODE_SYNTH_PHOT) && (argc == 1)) return TRUE; 667 703 if ((MODE == MODE_UPDATE_OBJECTS) && (argc == 1)) return TRUE; -
trunk/Ohana/src/relphot/src/load_catalogs.c
r38471 r38986 253 253 Catalog *catalog = catalogs->catalog; 254 254 *Ncatalog = catalogs->Ncatalog; 255 BrightCatalogSplitFree (catalogs);256 255 257 256 int Nmeasure = 0; … … 263 262 264 263 fprintf (stderr, "loaded %d catalogs, using a total of %d stars (%d measures)\n", catalogs->Ncatalog, Naverage, Nmeasure); 264 client_logger_message ("loaded %d catalogs, using a total of %d stars (%d measures)\n", catalogs->Ncatalog, Naverage, Nmeasure); 265 266 BrightCatalogSplitFree (catalogs); 265 267 266 268 return (catalog); -
trunk/Ohana/src/relphot/src/load_images.c
r38441 r38986 31 31 MARKTIME("build chip match for %d images: %f sec\n", (int) Nimage, dtime); 32 32 33 // XXX consider allowing relphot to skip the AstroMap load (do we need precise astrometry here?) 34 33 35 char mapfile[DVO_MAX_PATH]; 34 36 snprintf (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", CATDIR); 35 AstromOffsetTable *table = AstromOffsetMapLoad (mapfile, VERBOSE);37 AstromOffsetTable *table = AstromOffsetMapLoad (mapfile, 100000, VERBOSE); 36 38 37 39 // assign images.coords.offsetMap -> table->map[i] -
trunk/Ohana/src/relphot/src/reload_catalogs.c
r38471 r38986 105 105 free (moddate); 106 106 107 dvo_catalog_save (&catalog, VERBOSE); 108 dvo_catalog_unlock (&catalog); 107 SetProtect (TRUE); 108 if (!dvo_catalog_save (&catalog, VERBOSE)) { fprintf (stderr, "ERROR: failed to save %s\n", catalog.filename); exit (1); } 109 if (!dvo_catalog_unlock (&catalog)) { fprintf (stderr, "ERROR: failed to unlock %s\n", catalog.filename); exit (1); } 110 SetProtect (FALSE); 109 111 110 112 free_tiny_values(&catalog); … … 244 246 if (SYNTH_ZERO_POINTS) { strextend (&command, "-synthphot-zpts %s", SYNTH_ZERO_POINTS); } 245 247 248 if (!(STAGES & STAGE_CHIP)) { strextend (&command, "-skip-chip"); } 249 if (!(STAGES & STAGE_WARP)) { strextend (&command, "-skip-warp"); } 250 if (!(STAGES & STAGE_STACK)) { strextend (&command, "-skip-stack"); } 251 246 252 // deprecate 247 253 // if (SET_MREL_VERSION != 1) { snprintf (tmpline, 1024, "%s -set-mrel-version %d", SET_MREL_VERSION); } // XXXX deprecate this... -
trunk/Ohana/src/relphot/src/relphot.c
r38062 r38986 4 4 5 5 // get configuration info, args 6 SetSignals (); 6 7 RelphotMode mode = initialize (argc, argv); 7 8 if (!mode) exit (2); -
trunk/Ohana/src/relphot/src/relphot_client.c
r38062 r38986 18 18 19 19 // get configuration info, args, lockfile (set CATDIR, HOST_ID, HOSTDIR, etc) 20 SetSignals (); 20 21 initialize_client (argc, argv); 21 22 client_logger_init (HOSTDIR); -
trunk/Ohana/src/relphot/src/relphot_objects.c
r38471 r38986 101 101 // but it would be better to define a dvo crawler program to do this 102 102 // catalog.catformat = DVO_FORMAT_PS1_V1; 103 dvo_catalog_save (&catalog, VERBOSE); 104 dvo_catalog_unlock (&catalog); 103 SetProtect (TRUE); 104 if (!dvo_catalog_save (&catalog, VERBOSE)) { fprintf (stderr, "ERROR: failed to save %s\n", catalog.filename); exit (1); } 105 if (!dvo_catalog_unlock (&catalog)) { fprintf (stderr, "ERROR: failed to unlock %s\n", catalog.filename); exit (1); } 106 SetProtect (FALSE); 105 107 free_tiny_values(&catalog); 106 108 dvo_catalog_free (&catalog); … … 155 157 if (SYNTH_ZERO_POINTS) { strextend (&command, "-synthphot-zpts %s", SYNTH_ZERO_POINTS); } 156 158 159 if (!(STAGES & STAGE_CHIP)) { strextend (&command, "-skip-chip"); } 160 if (!(STAGES & STAGE_WARP)) { strextend (&command, "-skip-warp"); } 161 if (!(STAGES & STAGE_STACK)) { strextend (&command, "-skip-stack"); } 162 157 163 // if (SET_MREL_VERSION != 1) { strextend (&command, "-set-mrel-version %d", SET_MREL_VERSION); } 158 164 -
trunk/Ohana/src/relphot/src/relphot_parallel_images.c
r37037 r38986 34 34 exit (2); 35 35 } 36 client_logger_message ("loaded images\n"); 36 37 37 38 // once we have read this table, we should remove it for repeat runs … … 53 54 // the following function correctly chooses the sky regions on the 0,360 boundary 54 55 SkyList *skylist = SkyListByBounds (sky, -1, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); 56 client_logger_message ("prepare to load catalogs\n"); 55 57 56 58 /* load catalog data from region files (hostID is 0 since we are not a client */ -
trunk/Ohana/src/relphot/src/relphot_synthphot.c
r38471 r38986 71 71 // but it would be better to define a dvo crawler program to do this 72 72 // catalog.catformat = DVO_FORMAT_PS1_V1; 73 dvo_catalog_save (&catalog, VERBOSE); 74 dvo_catalog_unlock (&catalog); 73 SetProtect (TRUE); 74 if (!dvo_catalog_save (&catalog, VERBOSE)) { fprintf (stderr, "ERROR: failed to save %s\n", catalog.filename); exit (1); } 75 if (!dvo_catalog_unlock (&catalog)) { fprintf (stderr, "ERROR: failed to unlock %s\n", catalog.filename); exit (1); } 76 SetProtect (FALSE); 75 77 dvo_catalog_free (&catalog); 76 78 } -
trunk/Ohana/src/relphot/src/setMrelCatalog.c
r38923 r38986 52 52 for (j = 0; j < catalog[Nc].Naverage; j++) { 53 53 54 setMrelAverageExposure (&catalog[Nc], Nc, j, Nsecfilt, isSetMrelFinal, flatcorr, results); 54 if (STAGES & STAGE_CHIP) { 55 setMrelAverageExposure (&catalog[Nc], Nc, j, Nsecfilt, isSetMrelFinal, flatcorr, results); 56 } 55 57 56 58 // only apply Stack operation on setMrelFinal in first pass 57 if (isSetMrelFinal && !IS_DIFF_DB) {59 if (isSetMrelFinal && (STAGES & STAGE_STACK) && !IS_DIFF_DB) { 58 60 setMrelAverageStack (&catalog[Nc], Nc, j, Nsecfilt, flatcorr); 59 61 } 60 62 61 63 // only measure force-warp mean values if issetMrelFinal (make it optional?) 62 if (isSetMrelFinal ) {64 if (isSetMrelFinal && (STAGES & STAGE_WARP)) { 63 65 setMrelAverageForcedWarp (&catalog[Nc], Nc, j, Nsecfilt, flatcorr, results); 64 66 }
Note:
See TracChangeset
for help on using the changeset viewer.
