IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 30, 2008, 7:45:21 AM (18 years ago)
Author:
eugene
Message:

modify functions to use both int and flt vectors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/periodogram.c

    r20839 r20857  
    2828  if ((power = SelectVector (argv[6], ANYVECTOR, TRUE)) == NULL) return (FALSE);
    2929
     30  REQUIRE_VECTOR_FLT (time, FALSE);
     31  REQUIRE_VECTOR_FLT (flux, FALSE);
     32
    3033  /* find the max baseline, mean, and variance */
    3134  minT = maxT = time[0].elements.Flt[0];
     
    5659  Np = 0;
    5760  NP = 100;
    58   REALLOCATE (power[0].elements.Flt, opihi_flt, NP);
    59   REALLOCATE (period[0].elements.Flt, opihi_flt, NP);
     61  ResetVector (power,  OPIHI_FLT, NP);
     62  ResetVector (period, OPIHI_FLT, NP);
    6063
    6164  P = minP;
     
    106109  }
    107110
    108   power[0].Nelements = Np;
    109   period[0].Nelements = Np;
    110   REALLOCATE (power[0].elements.Flt, opihi_flt, Np);
    111   REALLOCATE (period[0].elements.Flt, opihi_flt, Np);
     111  ResetVector (power,  OPIHI_FLT, Np);
     112  ResetVector (period, OPIHI_FLT, Np);
    112113 
    113114  return (TRUE);
Note: See TracChangeset for help on using the changeset viewer.