IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 8, 2014, 2:44:35 PM (12 years ago)
Author:
eugene
Message:

i am making image.coords.mosaic and image.parent pointers to the parent (PHU) coord and image strutures; BuildChipMatch sets these values and we do not need to call FindMosaicForImage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140904/Ohana/src/opihi/dvo/images.c

    r34584 r37378  
    152152  SetVector (&Yvec, OPIHI_FLT, NPTS);
    153153
     154  Image *mosaic = NULL;
     155
    154156  ALLOCATE (plist, int, NPTS);
    155157  n = N = 0;
     
    157159    if (ByName && strncmp (image[i].name, name, strlen(name))) continue;
    158160    if (TimeSelect && ((image[i].tzero < tzero) || (image[i].tzero+image[i].trate*image[i].NY > tzero + trange))) continue;
    159     if (!(Nmosaic = FindMosaicForImage (image, Nimage, i))) continue;
    160     Nmosaic --; // XXX kind of a hack: FindMosaicForImage returns 0 or the mosaic seq number + 1
     161
     162    mosaic = image[i].parent;
     163    Nmosaic = (SOLO_MOSAIC && mosaic) ? mosaic - image : -1;
     164
    161165    if (photcode) {
    162166      if ( photcodeEquiv && (photcode[0].code != GetPhotcodeEquivCodebyCode(image[i].photcode))) continue;
     
    170174    typehash = wordhash (&image[i].coords.ctype[4]);
    171175
    172     if (photcode && SOLO_MOSAIC) {
     176    if (photcode && SOLO_MOSAIC && (Nmosaic >= 0)) {
    173177      // mosaic (DIS) images are not currently given a photcode : plot these via the WRP entries
    174178      /* DIS images represent a field, not a chip */
    175179      if (typehash != ChipImage) continue;
    176180      if (foundMosaic[Nmosaic]) continue;
    177       x[0] = -0.5*image[Nmosaic].NX; y[0] = -0.5*image[Nmosaic].NY;
    178       x[1] = +0.5*image[Nmosaic].NX; y[1] = -0.5*image[Nmosaic].NY;
    179       x[2] = +0.5*image[Nmosaic].NX; y[2] = +0.5*image[Nmosaic].NY;
    180       x[3] = -0.5*image[Nmosaic].NX; y[3] = +0.5*image[Nmosaic].NY;
     181      x[0] = -0.5*mosaic->NX; y[0] = -0.5*mosaic->NY;
     182      x[1] = +0.5*mosaic->NX; y[1] = -0.5*mosaic->NY;
     183      x[2] = +0.5*mosaic->NX; y[2] = +0.5*mosaic->NY;
     184      x[3] = -0.5*mosaic->NX; y[3] = +0.5*mosaic->NY;
    181185      for (j = 0; j < Npts; j++) {
    182         status = XY_to_RD (&r[j], &d[j], x[j], y[j], &image[Nmosaic].coords);
     186        status = XY_to_RD (&r[j], &d[j], x[j], y[j], &mosaic->coords);
    183187        if (!status) break;
    184188        r[j] = ohana_normalize_angle (r[j]);
     
    198202
    199203    /* DIS images represent a field, not a chip */
    200     if ((typehash == DistortImage) && !WITH_MOSAIC) continue;
    201     if ((typehash != DistortImage) &&  SOLO_MOSAIC) continue;
     204    if ((typehash == DistortImage) && !WITH_MOSAIC) continue; // do not plot the mosaic images
     205    if ((typehash != DistortImage) &&  SOLO_MOSAIC) continue; // plot only the mosaic images
     206
    202207    if (typehash == DistortImage) {
    203208      x[0] = -0.5*image[i].NX; y[0] = -0.5*image[i].NY;
Note: See TracChangeset for help on using the changeset viewer.