IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35670


Ignore:
Timestamp:
Jun 18, 2013, 12:37:13 PM (13 years ago)
Author:
eugene
Message:

finished fixstkids

Location:
branches/eam_branches/ipp-20130509/Ohana/src/uniphot
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130509/Ohana/src/uniphot/Makefile

    r35664 r35670  
    172172$(SRC)/initialize_fixstkids.$(ARCH).o     \
    173173$(SRC)/load_images_fixstkids.$(ARCH).o    \
    174 $(SRC)/ImageSubsetFixImageIDs.$(ARCH).o  \
     174$(SRC)/ImageSubsetFixStackIDs.$(ARCH).o  \
    175175$(SRC)/update_dvo_fixstkids.$(ARCH).o     \
    176176$(SRC)/update_catalog_fixstkids.$(ARCH).o \
  • branches/eam_branches/ipp-20130509/Ohana/src/uniphot/include/fixstkids.h

    r35664 r35670  
    5454Image        *load_images_fixstkids             PROTO((FITS_DB *db, off_t *Nimage));
    5555int           update_dvo_fixstkids              PROTO((ImageSubset *image, off_t Nimage));
    56 int           update_dvo_fixstkids_parallel     PROTO((SkyTable *sky, ImageSubset *image, off_t Nimage));
     56int           update_dvo_fixstkids_parallel     PROTO((SkyList *sky, ImageSubset *image, off_t Nimage));
    5757                                               
    5858void          update_catalog_fixstkids          PROTO((Catalog *catalog));
  • branches/eam_branches/ipp-20130509/Ohana/src/uniphot/src/load_images_fixstkids.c

    r35664 r35670  
    5858
    5959  // 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);
    6161 
    6262  return;
     
    9696      if (extID < externID[Ni]) break;
    9797      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]);
    10299      }
    103100    }
  • branches/eam_branches/ipp-20130509/Ohana/src/uniphot/src/update_catalog_fixstkids.c

    r35664 r35670  
    1010
    1111  int sourceID, externID, detID;
     12  int Nmissed = 0;
    1213
    1314  for (i = 0; i < catalog[0].Nmeasure; i++) {
     
    1920    // reverse engineer the detID, imageID, sourceID from the psps det ID (extID)
    2021    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);
    2324
    2425    // we now have the externID of the given detection -- find the real image in the image table
    2526    off_t imageID, Seq;
    2627    short Photcode;
    27     if (!FindImageID (&imageID, &Seq, &Photcode, externID)) continue;
     28    if (!FindImageID (&imageID, &Seq, &Photcode, externID)) {
     29      Nmissed ++;
     30      continue;
     31    }
    2832
    2933    // if only one matched (or none), the we got the right ID the first time around
     
    5256    fprintf (stderr, "found "OFF_T_FMT" matches: "OFF_T_FMT" valid, "OFF_T_FMT" invalid\n", found, Nvalid, Ninvalid);
    5357  }
     58  if (Nmissed) {
     59    fprintf (stderr, "missed %d stack entries\n", Nmissed);
     60  }
    5461}
    5562
  • branches/eam_branches/ipp-20130509/Ohana/src/uniphot/src/update_dvo_fixstkids.c

    r35663 r35670  
    1515  initImageIndex (image, Nimage);
    1616
    17   if (PARALLEL && !HOST_ID) {
    18     update_dvo_fixstkids_parallel (sky, image, Nimage);
    19     return TRUE;
    20   }
    21 
    2217  // determine the populated SkyRegions overlapping the requested area (default depth)
    2318  if (SINGLE_CPT) {
     
    2722  }
    2823  myAssert (skylist, "ooops!");
     24
     25  if (PARALLEL && !HOST_ID) {
     26    update_dvo_fixstkids_parallel (skylist, image, Nimage);
     27    return TRUE;
     28  }
    2929
    3030  // update measurements for each populated catalog
     
    8080# define DEBUG 1
    8181
    82 int update_dvo_fixstkids_parallel (SkyTable *sky, ImageSubset *image, off_t Nimage) {
     82int update_dvo_fixstkids_parallel (SkyList *sky, ImageSubset *image, off_t Nimage) {
    8383
    8484  char uniquer[12];
     
    101101  HostTable *table = HostTableLoad (CATDIR, sky->hosts);
    102102
    103   int i;
     103  int i, j;
    104104  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    }
    105120
    106121    // ensure that the paths are absolute path names
     
    159174  if (VERBOSE_IMSTATS || SUMMARY_IMSTATS) {
    160175    for (i = 0; i < table->Nhosts; i++) {
     176      if (!table->hosts[i].results) continue;
    161177      while (!ImageValidLoad (table->hosts[i].results)) {
    162178        // 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.