Changeset 39619
- Timestamp:
- Jul 1, 2016, 10:09:40 AM (10 years ago)
- Location:
- trunk/Ohana/src/relastro
- Files:
-
- 3 added
- 7 edited
-
Makefile (modified) (2 diffs)
-
include/relastro.h (modified) (4 diffs)
-
src/CheckMeasureToImage.c (added)
-
src/RepairStackMeasures.c (added)
-
src/StackImageMaps.c (added)
-
src/UpdateMeasures.c (modified) (3 diffs)
-
src/UpdateObjectOffsets.c (modified) (3 diffs)
-
src/args.c (modified) (2 diffs)
-
src/relastro.c (modified) (1 diff)
-
src/relastro_client.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/relastro/Makefile
r39612 r39619 25 25 26 26 RELASTRO = \ 27 $(SRC)/CheckMeasureToImage.$(ARCH).o \ 28 $(SRC)/RepairStackMeasures.$(ARCH).o \ 29 $(SRC)/StackImageMaps.$(ARCH).o \ 27 30 $(SRC)/RepairWarps.$(ARCH).o \ 28 31 $(SRC)/RepairWarpMeasures.$(ARCH).o \ … … 110 113 111 114 RELASTRO_CLIENT = \ 115 $(SRC)/CheckMeasureToImage.$(ARCH).o \ 116 $(SRC)/RepairStackMeasures.$(ARCH).o \ 117 $(SRC)/StackImageMaps.$(ARCH).o \ 112 118 $(SRC)/RepairWarps.$(ARCH).o \ 113 119 $(SRC)/RepairWarpMeasures.$(ARCH).o \ -
trunk/Ohana/src/relastro/include/relastro.h
r39612 r39619 257 257 258 258 typedef struct { 259 int NStackFixExtID; 260 int NStackFixImageID; 261 int NstackBadCoords; 262 int NstackFailRepair_v1; 263 int NstackFailRepair_v2; 264 int NstackFixCoords; 265 int NstackMissImage; 266 int NstackMissTime; 267 int NstackNoImageID; 268 } StackRepairResult; 269 270 typedef struct { 259 271 int NfixChipID; 260 272 int NfixStackID; … … 269 281 } WarpRepairResult; 270 282 283 typedef struct { 284 int NstackNoImageID; 285 int NstackBadCoords; 286 int NstackBadTime; 287 int NstackBadImageCoords; 288 int NwarpNoImageID; 289 int NwarpBadCoords; 290 int NwarpBadTime; 291 int NwarpBadImageCoords; 292 int NchipNoImageID; 293 int NchipBadCoords; 294 int NchipBadTime; 295 int NchipBadImageCoords; 296 } CheckMeasureResult; 297 271 298 # define ID_MEAS_OBJECT_HAS_2MASS ID_MEAS_POOR_PHOTOM 272 299 … … 333 360 int USE_ICRF_POLE; 334 361 362 int REPAIR_STACKS; 335 363 int USE_IMAGE_COORDS_FOR_REPAIR; 336 364 int USE_ALL_IMAGES; 365 int CHECK_MEASURE_TO_IMAGE; 337 366 338 367 int RESET; … … 834 863 uint64_t CreatePSPSStackDetectionID(int sourceID, int imageID, int detID); 835 864 uint64_t CreatePSPSDetectionID(double tobs, int ccdid, int detID); 865 866 void sort_by_ra (double *R, double *D, int *I, int *S, int N); 867 void FreeStackGroups (void); 868 int GetStackSeq (Image *image, double Rstk, double Dstk, unsigned short photcode, float X, float Y); 869 int MakeStackIndex (void); 870 int RepairStackID (StackRepairResult *result, Image *image, double Rave, double Dave, Measure *measureB, MeasureTiny *measureT); 871 StackRepairResult RepairStackMeasures (Catalog *catalog); 872 int CheckMeasureToImage (Catalog *catalog); -
trunk/Ohana/src/relastro/src/UpdateMeasures.c
r39615 r39619 11 11 image = getimages (&Nimage, NULL); 12 12 13 // track measurements which are far from their original position (poor at pole) 14 int NoffRAori = 0; 15 int NoffDECori = 0; 13 for (i = 0; i < Ncatalog; i++) { 16 14 17 int NoffRAchip = 0;18 int NoffRAstack= 0;19 int NoffRAwarp = 0;15 // track measurements which are far from their original position (poor at pole) 16 int NoffRAori = 0; 17 int NoffDECori = 0; 20 18 21 int NoffDECchip = 0;22 int NoffDECstack = 0;23 int NoffDECwarp = 0;19 int NoffRAchip = 0; 20 int NoffRAstack = 0; 21 int NoffRAwarp = 0; 24 22 25 for (i = 0; i < Ncatalog; i++) { 23 int NoffDECchip = 0; 24 int NoffDECstack = 0; 25 int NoffDECwarp = 0; 26 26 27 myAssert (!catalog[i].Nmeasure || catalog[i].measureT, "programming error"); 27 28 for (j = 0; j < catalog[i].Naverage; j++) { … … 35 36 MeasureTiny *measureT = &catalog[i].measureT[j]; 36 37 Measure *measureB = catalog[i].measure ? &catalog[i].measure[j] : NULL; 38 39 if (measureB->averef == 0x01a) { 40 // fprintf (stderr, "test object\n"); 41 } 42 if ((measureB->averef == 0x01a) && (measureB->detID == 0x000d469a)) { 43 // fprintf (stderr, "example object\n"); 44 } 45 if ((measureB->averef == 0x01e) && (measureB->detID == 0x000d487f)) { 46 // fprintf (stderr, "example object\n"); 47 } 37 48 38 49 off_t im = getImageByID (measureT->imageID); … … 111 122 } 112 123 } 124 if (VERBOSE) fprintf (stderr, "%s : Noff ori RA %d ( %d %d %d ), Noff ori DEC %d ( %d %d %d )\n", catalog[i].filename, NoffRAori, NoffRAchip, NoffRAstack, NoffRAwarp, NoffDECori, NoffDECchip, NoffDECstack, NoffDECwarp); 113 125 } 114 // printNcatTotal ();115 116 if (VERBOSE) fprintf (stderr, "Noff ori RA %d ( %d %d %d ), Noff ori DEC %d ( %d %d %d )\n", NoffRAori, NoffRAchip, NoffRAstack, NoffRAwarp, NoffDECori, NoffDECchip, NoffDECstack, NoffDECwarp);117 126 118 127 return (TRUE); -
trunk/Ohana/src/relastro/src/UpdateObjectOffsets.c
r39477 r39619 57 57 findImages (&catalog, 1, FALSE); 58 58 59 if (REPAIR_STACKS) RepairStackMeasures (&catalog); 60 59 61 // update the detection coordinates using the new image parameters 60 62 UpdateMeasures (&catalog, 1); … … 63 65 // if Galaxy Motion Model correction is active, do not apply at this last stage 64 66 UpdateObjects (&catalog, 1, -1); 67 68 if (CHECK_MEASURE_TO_IMAGE) CheckMeasureToImage (&catalog); 65 69 66 70 free_tiny_values(&catalog); … … 190 194 if (USE_FIXED_PIXCOORDS) strextend (&command, "-D USE_FIXED_PIXCOORDS 1"); 191 195 196 if (REPAIR_STACKS) strextend (&command, "-repair-stacks"); 197 if (CHECK_MEASURE_TO_IMAGE) strextend (&command, "-check-measures"); 198 192 199 if (PHOTCODE_KEEP_LIST) strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST); 193 200 if (PHOTCODE_SKIP_LIST) strextend (&command, "-photcode %s", PHOTCODE_SKIP_LIST); -
trunk/Ohana/src/relastro/src/args.c
r39580 r39619 56 56 remove_argument (N, &argc, argv); 57 57 RELASTRO_OP = OP_REPAIR_WARPS; 58 } 59 60 REPAIR_STACKS = FALSE; 61 if ((N = get_argument (argc, argv, "-repair-stacks"))) { 62 remove_argument (N, &argc, argv); 63 REPAIR_STACKS = TRUE; 64 } 65 CHECK_MEASURE_TO_IMAGE = FALSE; 66 if ((N = get_argument (argc, argv, "-check-measures"))) { 67 remove_argument (N, &argc, argv); 68 CHECK_MEASURE_TO_IMAGE = TRUE; 58 69 } 59 70 … … 683 694 remove_argument (N, &argc, argv); 684 695 RELASTRO_OP = OP_REPAIR_WARPS; 696 } 697 698 REPAIR_STACKS = FALSE; 699 if ((N = get_argument (argc, argv, "-repair-stacks"))) { 700 remove_argument (N, &argc, argv); 701 REPAIR_STACKS = TRUE; 702 } 703 CHECK_MEASURE_TO_IMAGE = FALSE; 704 if ((N = get_argument (argc, argv, "-check-measures"))) { 705 remove_argument (N, &argc, argv); 706 CHECK_MEASURE_TO_IMAGE = TRUE; 685 707 } 686 708 -
trunk/Ohana/src/relastro/src/relastro.c
r39580 r39619 46 46 } 47 47 48 if (REPAIR_STACKS && !PARALLEL) MakeStackIndex (); 49 48 50 // iterate over catalogs to make detection coordinates consistant 49 51 UpdateObjectOffsets (skylist, 0, NULL); 52 53 if (REPAIR_STACKS && !PARALLEL) FreeStackGroups (); 50 54 51 55 if (!PARALLEL) { -
trunk/Ohana/src/relastro/src/relastro_client.c
r39580 r39619 90 90 load_images (&db, skylist, FALSE, USE_ALL_IMAGES); 91 91 92 if (REPAIR_STACKS) MakeStackIndex (); 93 92 94 UpdateObjectOffsets (skylist, HOST_ID, HOSTDIR); 93 95 96 if (REPAIR_STACKS) FreeStackGroups (); 97 94 98 freeImages (db.ftable.buffer); 95 99 gfits_db_free (&db);
Note:
See TracChangeset
for help on using the changeset viewer.
