IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30511


Ignore:
Timestamp:
Feb 8, 2011, 8:41:37 AM (15 years ago)
Author:
eugene
Message:

assign all coordinates relative to the region midpoint (this will still be ambigious at 0,360 for a full-sky operation)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/Ohana/src/relastro/src/select_images.c

    r30509 r30511  
    170170    double DminImage = +90.0;
    171171    double DmaxImage = -90.0;
    172     int leftside = FALSE;
     172    // int leftside = FALSE;
    173173    for (j = 0; j < 5; j++) {
    174174      XY_to_RD (&Ri[j], &Di[j], Xi[j], Yi[j], &timage[i].coords);
    175       Ri[j] = ohana_normalize_angle (Ri[j]);
    176       while (Ri[j] < RminSkyRegion) { Ri[j] += 360.0; }
    177       while (Ri[j] > RmaxSkyRegion) { Ri[j] -= 360.0; }
    178       if (j == 0) {
    179         leftside = (Ri[j] < RmidSkyRegion);
    180       } else {
    181         if (  leftside && (Ri[j] > RmidSkyRegion + 90)) { Ri[j] -= 360.0; }
    182         if (! leftside && (Ri[j] < RmidSkyRegion - 90)) { Ri[j] += 360.0; }
    183       }
     175      Ri[j] = ohana_normalize_angle_to_midpoint (Ri[j], RmidSkyRegion);
     176//      while (Ri[j] < RminSkyRegion) { Ri[j] += 360.0; }
     177//      while (Ri[j] > RmaxSkyRegion) { Ri[j] -= 360.0; }
     178//      if (j == 0) {
     179//      leftside = (Ri[j] < RmidSkyRegion);
     180//      } else {
     181//      if (  leftside && (Ri[j] > RmidSkyRegion + 90)) { Ri[j] -= 360.0; }
     182//      if (! leftside && (Ri[j] < RmidSkyRegion - 90)) { Ri[j] += 360.0; }
     183//      }
    184184
    185185      RminImage = MIN(RminImage, Ri[j]);
Note: See TracChangeset for help on using the changeset viewer.