IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 27, 2005, 10:38:30 AM (21 years ago)
Author:
eugene
Message:

implementing SkyRegions in all DVO programs

File:
1 edited

Legend:

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

    r5320 r5448  
    77  float *RA, *DEC;
    88  int Nstars, found, PhotCodeSelect;
    9   int i, j, k, m, N, NPTS, Nsec, RELPHOT, *N1, Nregions, TimeFormat;
     9  int i, j, k, m, N, NPTS, Nsec, RELPHOT, *N1, TimeFormat;
    1010  time_t TimeReference;
    11   RegionFile *regions;
    1211  Vector *tvec, *mvec, *dmvec;
    1312  Catalog catalog;
     
    5049  Radius = atof (argv[3]);
    5150
    52   regions = find_regions (Ra, Dec, Radius, &Nregions);
     51  sky = SkyTableLoadOptimal (CATDIR, SKY_TABLE, GSCFILE, -1, VERBOSE);
     52  SkyTableSetFilenames (sky, CATDIR, "cpt");
     53  skylist = SkyListByRadius (sky, -1, Ra, Dec, Radius);
    5354
    54   if (Nregions > 1) {
     55  if (skylist[0].Nregions > 1) {
    5556    fprintf (stderr, "warning, radius overlaps region boundary, not yet implemented\n");
    5657  }
    5758
    5859  /* set filename, read in header */
    59   sprintf (filename, "%s/%s", catdir, regions[0].name);
    60   catalog.filename = filename;
     60  catalog.filename = skylist[0].regions[0][0].filename;
    6161  switch (lock_catalog (&catalog, LCK_SOFT)) {
    6262  case 2:
     
    148148  if (catalog.secfilt != 0) free (catalog.secfilt);
    149149 
     150  SkyListFree (skylist);
    150151  return (TRUE);
    151 
    152152}
Note: See TracChangeset for help on using the changeset viewer.