IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 8, 2007, 12:21:18 PM (19 years ago)
Author:
eugene
Message:

complete merge from branch dvo-mods-2007-02

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/dvo/paverage.c

    r10793 r12332  
    55 
    66  FILE *f;
    7   int i, j, k, m, Narg, Npts, NPTS, status, VERBOSE;
     7  int i, j, Narg, Npts, NPTS, status, VERBOSE;
    88  int Nsecfilt, Nsec;
    99  double Mz, Mr, mag;
    1010  double Radius, Rmin, Rmax, R, D;
    1111  unsigned IDclip, IDchoice, LimExclude;
    12   unsigned FlagChoice, FlagClip, flags;
    1312  float *Xvec, *Yvec, *Zvec;
    1413
     
    3231  Rmax = graphmode.coords.crval1 + 182.0;
    3332
    34   Nsec = -1;
     33  // require a photcode?  default to 0?
     34  Nsec = 0;
    3535  if ((Narg = get_argument (argc, argv, "-p"))) {
    3636    remove_argument (Narg, &argc, argv);
     
    4242    remove_argument (Narg, &argc, argv);
    4343    Nsec = GetPhotcodeNsec (photcode[0].code);
     44    if (Nsec == -1) {
     45        fprintf (stderr, "photcode %s is not an AVERAGE photcode\n", argv[Narg]);
     46        return (FALSE);
     47    }
    4448  }
    4549
     
    109113
    110114    average = catalog.average;
     115    secfilt = catalog.secfilt;
    111116
    112117    /* project stars to screen display coords */
     
    116121      while (average[i].R > Rmax) average[i].R -= 360.0;
    117122
    118       mag = (Nsec == -1) ? average[i].M : secfilt[i*Nsecfilt+Nsec].M_PS;
     123      mag = secfilt[i*Nsecfilt+Nsec].M;
    119124      Zvec[Npts] = MIN (1.0, MAX (0.01, (mag - Mz) / Mr));
    120125      if (LimExclude && (Zvec[Npts] > 0.99)) continue;
Note: See TracChangeset for help on using the changeset viewer.