IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 18, 2012, 10:04:35 AM (14 years ago)
Author:
eugene
Message:

merging changes from eam_branches/ipp-20121130

Location:
trunk/Ohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana

  • trunk/Ohana/src/uniphot/src/update_catalog_setposangle.c

    r34749 r34844  
    2525      Mosaic *mosaic = getMosaicForImage(seq);
    2626      Coords *coords = &image[seq].coords;
     27      Coords *mosaicCoords = mosaic ? &mosaic->coords : NULL;
    2728
    2829      double Xccd = catalog[0].measure[m].Xccd;
    2930      double Yccd = catalog[0].measure[m].Yccd;
    3031     
    31       setposangle_local_astrometry (&posAngle, &pltScale, Xccd, Yccd, &mosaic->coords, coords);
     32      setposangle_local_astrometry (&posAngle, &pltScale, Xccd, Yccd, mosaicCoords, coords);
    3233
    3334      catalog[0].measure[m].posangle = ToShortDegrees(posAngle);
     
    5253  // calculate the astrometry for the coordinate of interest
    5354  XY_to_LM (&Lx, &Mx, x,       y,       coords);
    54   XY_to_LM (&Po, &Qo, Lx,      Mx,      mosaic);
     55  if (mosaic) {
     56    XY_to_LM (&Po, &Qo, Lx,      Mx,      mosaic);
     57  } else {
     58    Po = Lx;
     59    Qo = Mx;
     60  }
    5561
    5662  XY_to_LM (&Lx, &Mx, x + 1.0, y,       coords);
    57   XY_to_LM (&Px, &Qx, Lx,      Mx,      mosaic);
     63  if (mosaic) {
     64    XY_to_LM (&Px, &Qx, Lx,      Mx,      mosaic);
     65  } else {
     66    Px = Lx;
     67    Qx = Mx;
     68  }
    5869
    5970  XY_to_LM (&Lx, &Mx, x,       y + 1.0, coords);
    60   XY_to_LM (&Py, &Qy, Lx,      Mx,      mosaic);
     71  if (mosaic) {
     72    XY_to_LM (&Py, &Qy, Lx,      Mx,      mosaic);
     73  } else {
     74    Py = Lx;
     75    Qy = Mx;
     76  }
    6177
    6278  // XXX units for the resulting Tangent Plane coordinates??
Note: See TracChangeset for help on using the changeset viewer.