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/cmd.c

    r20535 r20936  
    4949
    5050  /* init vectors to save data */
    51   Npts = 0;
    52   NPTS = 1;
    5351  if ((xvec = SelectVector ("xv", ANYVECTOR, TRUE)) == NULL) goto escape;
    5452  if ((yvec = SelectVector ("yv", ANYVECTOR, TRUE)) == NULL) goto escape;
     53
     54  gprint (GP_ERR, "warning: this function may be deprecated in the future -- use avextract for better control\n");
     55
     56  Npts = 0;
     57  NPTS = 100;
     58  ResetVector (xvec, OPIHI_FLT, NPTS);
     59  ResetVector (yvec, OPIHI_FLT, NPTS);
    5560
    5661  // grab data from all selected sky regions
     
    95100      for (i1 = 0; i1 < N1; i1++) {
    96101        for (i3 = 0; i3 < N3; i3++) {
    97           xvec[0].elements[Npts] = M1[i1];
    98           yvec[0].elements[Npts] = M3[i3];
     102          xvec[0].elements.Flt[Npts] = M1[i1];
     103          yvec[0].elements.Flt[Npts] = M3[i3];
    99104          Npts++;
    100105          if (Npts >= NPTS) {
    101106            NPTS += 2000;
    102             REALLOCATE (xvec[0].elements, float, NPTS);
    103             REALLOCATE (yvec[0].elements, float, NPTS);
     107            REALLOCATE (xvec[0].elements.Flt, opihi_flt, NPTS);
     108            REALLOCATE (yvec[0].elements.Flt, opihi_flt, NPTS);
    104109          }
    105110        }
Note: See TracChangeset for help on using the changeset viewer.