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/dvo/ccd.c

    r20535 r20936  
    5151
    5252  /* init vectors to save data */
    53   Npts = 0;
    54   NPTS = 1;
    5553  if ((xvec = SelectVector ("xv", ANYVECTOR, TRUE)) == NULL) goto escape;
    5654  if ((yvec = SelectVector ("yv", ANYVECTOR, TRUE)) == NULL) goto escape;
     55
     56  gprint (GP_ERR, "warning: this function may be deprecated in the future -- use avextract for better control\n");
     57
     58  Npts = 0;
     59  NPTS = 100;
     60  ResetVector (xvec, OPIHI_FLT, NPTS);
     61  ResetVector (yvec, OPIHI_FLT, NPTS);
    5762
    5863  // grab data from all selected sky regions
     
    97102      for (i1 = 0; i1 < N1; i1++) {
    98103        for (i2 = 0; i2 < N2; i2++) {
    99           xvec[0].elements[Npts] = M1[i1];
    100           yvec[0].elements[Npts] = M2[i2];
     104          xvec[0].elements.Flt[Npts] = M1[i1];
     105          yvec[0].elements.Flt[Npts] = M2[i2];
    101106          Npts++;
    102107          if (Npts >= NPTS) {
    103108            NPTS += 2000;
    104             REALLOCATE (xvec[0].elements, float, NPTS);
    105             REALLOCATE (yvec[0].elements, float, NPTS);
     109            REALLOCATE (xvec[0].elements.Flt, opihi_flt, NPTS);
     110            REALLOCATE (yvec[0].elements.Flt, opihi_flt, NPTS);
    106111          }
    107112        }
Note: See TracChangeset for help on using the changeset viewer.