Changeset 39693
- Timestamp:
- Sep 13, 2016, 12:31:29 PM (10 years ago)
- Location:
- trunk/Ohana/src/relastro
- Files:
-
- 2 added
- 6 edited
-
Makefile (modified) (2 diffs)
-
include/relastro.h (modified) (2 diffs)
-
src/RepairObjectIDs.c (added)
-
src/RepairStacks.c (added)
-
src/UpdateObjectOffsets.c (modified) (2 diffs)
-
src/args.c (modified) (4 diffs)
-
src/relastro.c (modified) (1 diff)
-
src/relastro_client.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/relastro/Makefile
r39619 r39693 26 26 RELASTRO = \ 27 27 $(SRC)/CheckMeasureToImage.$(ARCH).o \ 28 $(SRC)/RepairObjectIDs.$(ARCH).o \ 29 $(SRC)/RepairStacks.$(ARCH).o \ 28 30 $(SRC)/RepairStackMeasures.$(ARCH).o \ 29 31 $(SRC)/StackImageMaps.$(ARCH).o \ … … 114 116 RELASTRO_CLIENT = \ 115 117 $(SRC)/CheckMeasureToImage.$(ARCH).o \ 118 $(SRC)/RepairObjectIDs.$(ARCH).o \ 119 $(SRC)/RepairStacks.$(ARCH).o \ 116 120 $(SRC)/RepairStackMeasures.$(ARCH).o \ 117 121 $(SRC)/StackImageMaps.$(ARCH).o \ -
trunk/Ohana/src/relastro/include/relastro.h
r39619 r39693 31 31 typedef enum {FIT_NONE, FIT_AVERAGE, FIT_PM_ONLY, FIT_PAR_ONLY, FIT_PM_AND_PAR} FitMode; 32 32 33 typedef enum {OP_NONE, OP_IMAGES, OP_HIGH_SPEED, OP_MERGE_SOURCE, OP_UPDATE_OBJECTS, OP_UPDATE_OFFSETS, OP_LOAD_OBJECTS, OP_HPM, OP_PARALLEL_REGIONS, OP_PARALLEL_IMAGES, OP_REPAIR_ WARPS} RelastroOp;33 typedef enum {OP_NONE, OP_IMAGES, OP_HIGH_SPEED, OP_MERGE_SOURCE, OP_UPDATE_OBJECTS, OP_UPDATE_OFFSETS, OP_LOAD_OBJECTS, OP_HPM, OP_PARALLEL_REGIONS, OP_PARALLEL_IMAGES, OP_REPAIR_STACKS, OP_REPAIR_WARPS, OP_REPAIR_OBJECT_ID} RelastroOp; 34 34 35 35 typedef enum {TARGET_NONE, TARGET_SIMPLE, TARGET_CHIPS, TARGET_MOSAICS} FitTarget; … … 864 864 uint64_t CreatePSPSDetectionID(double tobs, int ccdid, int detID); 865 865 866 int RepairStacks (SkyList *skylist, int hostID, char *hostpath); 867 868 int RepairObjectIDs (SkyList *skylist, int hostID, char *hostpath); 869 866 870 void sort_by_ra (double *R, double *D, int *I, int *S, int N); 867 871 void FreeStackGroups (void); -
trunk/Ohana/src/relastro/src/UpdateObjectOffsets.c
r39669 r39693 194 194 if (USE_FIXED_PIXCOORDS) strextend (&command, "-D USE_FIXED_PIXCOORDS 1"); 195 195 196 if (REPAIR_STACKS) strextend (&command, "-repair-stacks ");196 if (REPAIR_STACKS) strextend (&command, "-repair-stacks-on-update"); 197 197 if (CHECK_MEASURE_TO_IMAGE) strextend (&command, "-check-measures"); 198 198 … … 327 327 if (USE_FIXED_PIXCOORDS) strextend (&command, "-D USE_FIXED_PIXCOORDS 1"); 328 328 329 if (REPAIR_STACKS) strextend (&command, "-repair-stacks ");329 if (REPAIR_STACKS) strextend (&command, "-repair-stacks-on-update"); 330 330 if (CHECK_MEASURE_TO_IMAGE) strextend (&command, "-check-measures"); 331 331 -
trunk/Ohana/src/relastro/src/args.c
r39619 r39693 53 53 } 54 54 55 if ((N = get_argument (argc, argv, "-repair-stacks"))) { 56 remove_argument (N, &argc, argv); 57 RELASTRO_OP = OP_REPAIR_STACKS; 58 } 59 if ((N = get_argument (argc, argv, "-repair-object-id"))) { 60 remove_argument (N, &argc, argv); 61 RELASTRO_OP = OP_REPAIR_OBJECT_ID; 62 } 63 55 64 if ((N = get_argument (argc, argv, "-repair-warps"))) { 56 65 remove_argument (N, &argc, argv); … … 59 68 60 69 REPAIR_STACKS = FALSE; 61 if ((N = get_argument (argc, argv, "-repair-stacks "))) {70 if ((N = get_argument (argc, argv, "-repair-stacks-on-update"))) { 62 71 remove_argument (N, &argc, argv); 63 72 REPAIR_STACKS = TRUE; … … 691 700 } 692 701 702 if ((N = get_argument (argc, argv, "-repair-stacks"))) { 703 remove_argument (N, &argc, argv); 704 RELASTRO_OP = OP_REPAIR_STACKS; 705 } 706 707 if ((N = get_argument (argc, argv, "-repair-object-id"))) { 708 remove_argument (N, &argc, argv); 709 RELASTRO_OP = OP_REPAIR_OBJECT_ID; 710 } 711 693 712 if ((N = get_argument (argc, argv, "-repair-warps"))) { 694 713 remove_argument (N, &argc, argv); … … 697 716 698 717 REPAIR_STACKS = FALSE; 699 if ((N = get_argument (argc, argv, "-repair-stacks "))) {718 if ((N = get_argument (argc, argv, "-repair-stacks-on-update"))) { 700 719 remove_argument (N, &argc, argv); 701 720 REPAIR_STACKS = TRUE; -
trunk/Ohana/src/relastro/src/relastro.c
r39619 r39693 104 104 } 105 105 106 case OP_REPAIR_STACKS: { 107 FITS_DB db; 108 if (!PARALLEL) { 109 110 set_db (&db); 111 gfits_db_init (&db); 112 113 /* lock and load the image db table */ 114 int status = dvo_image_lock (&db, ImageCat, 60.0, LCK_SOFT); 115 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", db.filename); 116 if (db.dbstate == LCK_EMPTY) Shutdown ("ERROR: No images in catalog %s (1)", db.filename); 117 if (!dvo_image_load (&db, VERBOSE, FALSE)) Shutdown ("can't read image catalog %s", db.filename); 118 // the raw FITS data is freed by dvo_image_load, leaving only the Image structure data 119 120 /* load regions and images based on specified sky patch (default depth) */ 121 load_images (&db, skylist, FALSE, USE_ALL_IMAGES); 122 } 123 124 // iterate over catalogs to make detection coordinates consistant 125 RepairStacks (skylist, 0, NULL); 126 127 if (!PARALLEL) { 128 freeImages (db.ftable.buffer); 129 gfits_db_free (&db); 130 freeMosaics (); 131 } 132 133 relastro_free (sky, skylist); 134 exit (0); 135 } 136 137 case OP_REPAIR_OBJECT_ID: { 138 139 // iterate over catalogs to make detection coordinates consistant 140 RepairObjectIDs (skylist, 0, NULL); 141 142 relastro_free (sky, skylist); 143 exit (0); 144 } 145 106 146 case OP_HIGH_SPEED: 107 147 /* high-speed is a 2pt cross-correlation process for linking moving objects (high PM) */ -
trunk/Ohana/src/relastro/src/relastro_client.c
r39619 r39693 104 104 } 105 105 106 case OP_REPAIR_OBJECT_ID: { 107 108 // iterate over catalogs to make detection coordinates consistant 109 RepairObjectIDs (skylist, HOST_ID, HOSTDIR); 110 111 relastro_free (sky, skylist); 112 exit (0); 113 } 114 115 // XXX loading the images is fairly costly -- see if we can do an image subset? 116 case OP_REPAIR_STACKS: { 117 FITS_DB db; 118 119 set_db (&db); 120 gfits_db_init (&db); 121 122 /* lock and load the image db table */ 123 int status = dvo_image_lock (&db, ImageCat, 60.0, LCK_SOFT); 124 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", db.filename); 125 if (db.dbstate == LCK_EMPTY) Shutdown ("ERROR: No images in catalog %s (1)", db.filename); 126 if (!dvo_image_load (&db, VERBOSE, FALSE)) Shutdown ("can't read image catalog %s", db.filename); 127 // the raw FITS data is freed by dvo_image_load, leaving only the Image structure data 128 129 /* load regions and images based on specified sky patch (default depth) */ 130 load_images (&db, skylist, FALSE, USE_ALL_IMAGES); 131 132 RepairStacks (skylist, HOST_ID, HOSTDIR); 133 134 freeImages (db.ftable.buffer); 135 gfits_db_free (&db); 136 freeMosaics (); 137 138 relastro_client_free (sky, skylist); 139 break; 140 } 141 106 142 // XXX loading the images is fairly costly -- see if we can do an image subset? 107 143 case OP_REPAIR_WARPS: {
Note:
See TracChangeset
for help on using the changeset viewer.
