IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 7, 2008, 3:31:01 PM (18 years ago)
Author:
eugene
Message:

big update from eam_branch_20081124 with updates to Opihi math

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/mana/rawstars.c

    r7917 r20936  
    5555  Np = xp[0].Nelements;
    5656
    57   REALLOCATE (xc[0].elements, float, Np);
    58   REALLOCATE (yc[0].elements, float, Np);
    59   REALLOCATE (sx[0].elements, float, Np);
    60   REALLOCATE (sy[0].elements, float, Np);
    61   REALLOCATE (sxy[0].elements, float, Np);
    62   REALLOCATE (zs[0].elements, float, Np);
    63   REALLOCATE (zc[0].elements, float, Np);
    64   REALLOCATE (sk[0].elements, float, Np);
    65   xc[0].Nelements = yc[0].Nelements = sx[0].Nelements = Np;
    66   sy[0].Nelements = zs[0].Nelements = zc[0].Nelements = Np;
    67   sxy[0].Nelements = sk[0].Nelements = Np;
     57  ResetVector (xc, OPIHI_FLT, Np);
     58  ResetVector (yc, OPIHI_FLT, Np);
     59  ResetVector (sx, OPIHI_FLT, Np);
     60  ResetVector (sy, OPIHI_FLT, Np);
     61  ResetVector (sxy, OPIHI_FLT, Np);
     62  ResetVector (zs, OPIHI_FLT, Np);
     63  ResetVector (zc, OPIHI_FLT, Np);
     64  ResetVector (sk, OPIHI_FLT, Np);
    6865
    6966  v = (float *) buff[0].matrix.buffer;
    7067  for (i = 0; i < Np; i++) {
    71     x = xp[0].elements[i];
    72     y = yp[0].elements[i];
     68    x = (xp[0].type == OPIHI_FLT) ? xp[0].elements.Flt[i] : xp[0].elements.Int[i];
     69    y = (yp[0].type == OPIHI_FLT) ? yp[0].elements.Flt[i] : yp[0].elements.Int[i];
    7370    if (x < 0) continue;
    7471    if (x >= Nx) continue;
     
    7774
    7875    get_rough_star (v, Nx, Ny, x, y,
    79                     &xc[0].elements[i],
    80                     &yc[0].elements[i],
    81                     &sx[0].elements[i],
    82                     &sy[0].elements[i],
    83                     &sxy[0].elements[i],
    84                     &zs[0].elements[i],
    85                     &zc[0].elements[i],
    86                     &sk[0].elements[i]);
     76                    &xc[0].elements.Flt[i],
     77                    &yc[0].elements.Flt[i],
     78                    &sx[0].elements.Flt[i],
     79                    &sy[0].elements.Flt[i],
     80                    &sxy[0].elements.Flt[i],
     81                    &zs[0].elements.Flt[i],
     82                    &zc[0].elements.Flt[i],
     83                    &sk[0].elements.Flt[i]);
    8784  }
    8885
Note: See TracChangeset for help on using the changeset viewer.