Changeset 35670
- Timestamp:
- Jun 18, 2013, 12:37:13 PM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130509/Ohana/src/uniphot
- Files:
-
- 5 edited
-
Makefile (modified) (1 diff)
-
include/fixstkids.h (modified) (1 diff)
-
src/load_images_fixstkids.c (modified) (2 diffs)
-
src/update_catalog_fixstkids.c (modified) (3 diffs)
-
src/update_dvo_fixstkids.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130509/Ohana/src/uniphot/Makefile
r35664 r35670 172 172 $(SRC)/initialize_fixstkids.$(ARCH).o \ 173 173 $(SRC)/load_images_fixstkids.$(ARCH).o \ 174 $(SRC)/ImageSubsetFix ImageIDs.$(ARCH).o \174 $(SRC)/ImageSubsetFixStackIDs.$(ARCH).o \ 175 175 $(SRC)/update_dvo_fixstkids.$(ARCH).o \ 176 176 $(SRC)/update_catalog_fixstkids.$(ARCH).o \ -
branches/eam_branches/ipp-20130509/Ohana/src/uniphot/include/fixstkids.h
r35664 r35670 54 54 Image *load_images_fixstkids PROTO((FITS_DB *db, off_t *Nimage)); 55 55 int update_dvo_fixstkids PROTO((ImageSubset *image, off_t Nimage)); 56 int update_dvo_fixstkids_parallel PROTO((Sky Table*sky, ImageSubset *image, off_t Nimage));56 int update_dvo_fixstkids_parallel PROTO((SkyList *sky, ImageSubset *image, off_t Nimage)); 57 57 58 58 void update_catalog_fixstkids PROTO((Catalog *catalog)); -
branches/eam_branches/ipp-20130509/Ohana/src/uniphot/src/load_images_fixstkids.c
r35664 r35670 58 58 59 59 // sort the index, start, and stop by the start times: 60 sort_image_externID ( externID, imageID, photcodeImage, imageSeq, Nimage);60 sort_image_externID (imageID, externID, photcodeImage, imageSeq, Nimage); 61 61 62 62 return; … … 96 96 if (extID < externID[Ni]) break; 97 97 if (externID[Ni] == extID) { 98 fprintf (stderr, "found second image ID matching extern ID?\n"); 99 fprintf (stderr, "first ext ID: %d, image ID: %d, photcode: %d\n", externID[N], imageID[N], photcodeImage[N]); 100 fprintf (stderr, "second ext ID: %d, image ID: %d, photcode: %d\n", externID[Ni], imageID[Ni], photcodeImage[Ni]); 101 exit (2); 98 fprintf (stderr, "WARNING: found duplicate extern IDs : ext ID %d, image ID 1: %d (%d), image ID 2: %d (%d)\n", externID[N], imageID[N], photcodeImage[N], imageID[Ni], photcodeImage[Ni]); 102 99 } 103 100 } -
branches/eam_branches/ipp-20130509/Ohana/src/uniphot/src/update_catalog_fixstkids.c
r35664 r35670 10 10 11 11 int sourceID, externID, detID; 12 int Nmissed = 0; 12 13 13 14 for (i = 0; i < catalog[0].Nmeasure; i++) { … … 19 20 // reverse engineer the detID, imageID, sourceID from the psps det ID (extID) 20 21 UnpackPSPSStackDetectionID (&sourceID, &externID, &detID, catalog[0].measure[i].extID); 21 myAssert (sourceID = 35, "problem with source ID %d (%0x08 %0x08)", sourceID, catalog[0].measure[i].objID, catalog[0].measure[i].catID);22 myAssert (detID = catalog[0].measure[i].detID, "problem with det ID %d (%0x08 %0x08)", detID, catalog[0].measure[i].objID, catalog[0].measure[i].catID);22 myAssert (sourceID == 35, "problem with source ID %d (%0x08 %0x08)", sourceID, catalog[0].measure[i].objID, catalog[0].measure[i].catID); 23 myAssert (detID == catalog[0].measure[i].detID, "problem with det ID %d (%0x08 %0x08)", detID, catalog[0].measure[i].objID, catalog[0].measure[i].catID); 23 24 24 25 // we now have the externID of the given detection -- find the real image in the image table 25 26 off_t imageID, Seq; 26 27 short Photcode; 27 if (!FindImageID (&imageID, &Seq, &Photcode, externID)) continue; 28 if (!FindImageID (&imageID, &Seq, &Photcode, externID)) { 29 Nmissed ++; 30 continue; 31 } 28 32 29 33 // if only one matched (or none), the we got the right ID the first time around … … 52 56 fprintf (stderr, "found "OFF_T_FMT" matches: "OFF_T_FMT" valid, "OFF_T_FMT" invalid\n", found, Nvalid, Ninvalid); 53 57 } 58 if (Nmissed) { 59 fprintf (stderr, "missed %d stack entries\n", Nmissed); 60 } 54 61 } 55 62 -
branches/eam_branches/ipp-20130509/Ohana/src/uniphot/src/update_dvo_fixstkids.c
r35663 r35670 15 15 initImageIndex (image, Nimage); 16 16 17 if (PARALLEL && !HOST_ID) {18 update_dvo_fixstkids_parallel (sky, image, Nimage);19 return TRUE;20 }21 22 17 // determine the populated SkyRegions overlapping the requested area (default depth) 23 18 if (SINGLE_CPT) { … … 27 22 } 28 23 myAssert (skylist, "ooops!"); 24 25 if (PARALLEL && !HOST_ID) { 26 update_dvo_fixstkids_parallel (skylist, image, Nimage); 27 return TRUE; 28 } 29 29 30 30 // update measurements for each populated catalog … … 80 80 # define DEBUG 1 81 81 82 int update_dvo_fixstkids_parallel (Sky Table*sky, ImageSubset *image, off_t Nimage) {82 int update_dvo_fixstkids_parallel (SkyList *sky, ImageSubset *image, off_t Nimage) { 83 83 84 84 char uniquer[12]; … … 101 101 HostTable *table = HostTableLoad (CATDIR, sky->hosts); 102 102 103 int i ;103 int i, j; 104 104 for (i = 0; i < table->Nhosts; i++) { 105 106 if (sky->Nregions < table->Nhosts) { 107 // do any of the regions want this host? 108 int wantThisHost = FALSE; 109 for (j = 0; j < sky->Nregions; j++) { 110 if (HostTableTestHost (sky->regions[j], table->hosts[i].hostID)) { 111 wantThisHost = TRUE; 112 break; 113 } 114 } 115 if (!wantThisHost) { 116 // fprintf (stderr, "skip host %s\n", table->hosts[i].hostname); 117 continue; 118 } 119 } 105 120 106 121 // ensure that the paths are absolute path names … … 159 174 if (VERBOSE_IMSTATS || SUMMARY_IMSTATS) { 160 175 for (i = 0; i < table->Nhosts; i++) { 176 if (!table->hosts[i].results) continue; 161 177 while (!ImageValidLoad (table->hosts[i].results)) { 162 178 // failed to get the data from this host. This can happen for various reasons. Give the user a chance to try again...
Note:
See TracChangeset
for help on using the changeset viewer.
