IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35872


Ignore:
Timestamp:
Aug 2, 2013, 10:44:32 AM (13 years ago)
Author:
eugene
Message:

handle small regions under nloop = 0

Location:
branches/eam_branches/ipp-20130711/Ohana/src/relphot
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130711/Ohana/src/relphot/include/relphot.h

    r35759 r35872  
    244244
    245245int USE_BASIC_CHECK;
     246int USE_FULL_OVERLAP;
    246247
    247248# ifdef GRID_V1
  • branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/MosaicOps.c

    r35759 r35872  
    302302    mosaic[j].Mcal  = 0.0;
    303303    mosaic[j].dMcal = 0.0;
    304     mosaic[j].dMsys = 0.0;
    305304    mosaic[j].Xm    = 0.0;
    306     mosaic[j].flags  = subset[i].flags;
     305    mosaic[j].dMsys = subset[i].flags;
     306    mosaic[j].flags = subset[i].flags;
    307307    mosaic[j].secz  = subset[i].secz;
    308308    mosaic[j].photcode = GetPhotcodeEquivCodebyCode (subset[i].photcode);
  • branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/args.c

    r35759 r35872  
    6464  }
    6565
     66  USE_FULL_OVERLAP = TRUE;
     67  if ((N = get_argument (argc, argv, "-sloppy-image-overlap"))) {
     68    remove_argument (N, &argc, argv);
     69    USE_FULL_OVERLAP = FALSE;
     70  }
     71
    6672  SET_MREL_VERSION = 1;
    6773  if ((N = get_argument (argc, argv, "-set-mrel-version"))) {
  • branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/reload_catalogs.c

    r35759 r35872  
    164164  }
    165165
    166   int i;
     166  int i, j;
    167167  for (i = 0; i < table->Nhosts; i++) {
     168
     169    if (sky->Nregions < table->Nhosts) {
     170      // do any of the regions want this host?
     171      int wantThisHost = FALSE;
     172      for (j = 0; j < sky->Nregions; j++) {
     173        if (HostTableTestHost (sky->regions[j], table->hosts[i].hostID)) {
     174          wantThisHost = TRUE;
     175          break;
     176        }
     177      }
     178      if (!wantThisHost) {
     179        // fprintf (stderr, "skip host %s\n", table->hosts[i].hostname);
     180        continue;
     181      }
     182    }
    168183
    169184    // ensure that the paths are absolute path names
  • branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/relphot_images.c

    r35494 r35872  
    232232    freeGridBins (Ncatalog);
    233233
    234   } // (NLOOP > 0) : this loop determines the offsets per chip
     234    // end of if (NLOOP > 0) block : this loop determines the offsets per chip
     235  } else {
     236    // If nloop == 0, the above pass is not performed, in which case
     237    // the Mcal values passed to the mosaics are not returned to the images...
     238    setMcalFinal (); // copy per-mosaic calibrations to the images
     239  }
    235240
    236241  reload_images (&db);
     
    247252    db.format = dvo_catalog_catformat (UPDATE_CATFORMAT);
    248253  }
    249   dvo_image_update (&db, VERBOSE);
     254  if (NLOOP > 0) {
     255    // do not save changes if we did not make changes.
     256    dvo_image_update (&db, VERBOSE);
     257  }
    250258  dvo_image_unlock (&db);
    251259
  • branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/select_images.c

    r35759 r35872  
    176176    // declination, the range of RA is limited by the actual catalog boundaries
    177177    // check if this image is in range for the Dmax and Dmin locations
    178 
    179     int iDecBandMin = (DminImage + 90.0) / dDecBand;
    180     int iDecBandMax = (DmaxImage + 90.0) / dDecBand;
    181 
    182     // the sky region RA is defined to be 0 - 360.0
    183     if (RminImage < RminBand[iDecBandMin]) {
    184       if (VERBOSE2) fprintf (stderr, "skip image %s (%f,%f) on boundary\n", timage[i].name, 0.5*(RminImage + RmaxImage), 0.5*(DminImage + DmaxImage));
    185       continue;
    186     }
    187     if (RminImage < RminBand[iDecBandMax]) {
    188       if (VERBOSE2) fprintf (stderr, "skip image %s (%f,%f) on boundary\n", timage[i].name, 0.5*(RminImage + RmaxImage), 0.5*(DminImage + DmaxImage));
    189       continue;
    190     }
    191     if (RmaxImage > RmaxBand[iDecBandMin]) {
    192       if (VERBOSE2) fprintf (stderr, "skip image %s (%f,%f) on boundary\n", timage[i].name, 0.5*(RminImage + RmaxImage), 0.5*(DminImage + DmaxImage));
    193       continue;
    194     }
    195     if (RmaxImage > RmaxBand[iDecBandMax]) {
    196       if (VERBOSE2) fprintf (stderr, "skip image %s (%f,%f) on boundary\n", timage[i].name, 0.5*(RminImage + RmaxImage), 0.5*(DminImage + DmaxImage));
    197       continue;
     178    if (USE_FULL_OVERLAP && strcmp(&timage[i].coords.ctype[4], "-DIS")) {
     179
     180      int iDecBandMin = (DminImage + 90.0) / dDecBand;
     181      int iDecBandMax = (DmaxImage + 90.0) / dDecBand;
     182
     183      // the sky region RA is defined to be 0 - 360.0
     184      if (RminImage < RminBand[iDecBandMin]) {
     185        if (VERBOSE2) fprintf (stderr, "skip image %s (%f,%f) on boundary\n", timage[i].name, 0.5*(RminImage + RmaxImage), 0.5*(DminImage + DmaxImage));
     186        continue;
     187      }
     188      if (RminImage < RminBand[iDecBandMax]) {
     189        if (VERBOSE2) fprintf (stderr, "skip image %s (%f,%f) on boundary\n", timage[i].name, 0.5*(RminImage + RmaxImage), 0.5*(DminImage + DmaxImage));
     190        continue;
     191      }
     192      if (RmaxImage > RmaxBand[iDecBandMin]) {
     193        if (VERBOSE2) fprintf (stderr, "skip image %s (%f,%f) on boundary\n", timage[i].name, 0.5*(RminImage + RmaxImage), 0.5*(DminImage + DmaxImage));
     194        continue;
     195      }
     196      if (RmaxImage > RmaxBand[iDecBandMax]) {
     197        if (VERBOSE2) fprintf (stderr, "skip image %s (%f,%f) on boundary\n", timage[i].name, 0.5*(RminImage + RmaxImage), 0.5*(DminImage + DmaxImage));
     198        continue;
     199      }
    198200    }
    199201
Note: See TracChangeset for help on using the changeset viewer.