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

    r5320 r5448  
    88  int Ngraph, Xgraph, TimeFormat;
    99  int Nstars, found, AutoLimits, ErrorBars, GalMag, AbsPhot, SaveVectors;
    10   int i, j, m, N, NPTS, *N1, Nregions;
     10  int i, j, m, N, NPTS, *N1;
    1111  time_t TimeReference;
    1212  struct tm *timeptr;
    13   RegionFile *regions;
    1413  Vector *xvec, *yvec;
    1514  Vector Xvec, Yvec, dYvec;
    1615  Catalog catalog;
    1716  Graphdata graphmode;
     17  SkyTable *sky;
     18  SkyList *skylist;
    1819
    1920  VarConfig ("CATDIR", "%s", catdir);
     
    6970  }
    7071 
     72  /* load sky from correct table */
     73  sky = SkyTableLoadOptimal (CATDIR, SKY_TABLE, GSCFILE, -1, VERBOSE);
     74  SkyTableSetFilenames (sky, CATDIR, "cpt");
     75
    7176  Ra = atof (argv[1]);
    7277  Dec = atof (argv[2]);
    7378  Radius = atof (argv[3]);
    7479
    75   regions = find_regions (Ra, Dec, Radius, &Nregions);
    76 
    77   if (Nregions > 1) {
     80  skylist = SkyListByRadius (sky, -1, Ra, Dec, Radius);
     81
     82  if (skylist[0].Nregions > 1) {
    7883    fprintf (stderr, "warning, radius overlaps region boundary, not yet implemented\n");
    7984  }
    8085
    8186  /* set filename, read in header */
    82   sprintf (filename, "%s/%s", catdir, regions[0].name);
    83   catalog.filename = filename;
     87  catalog.filename = skylist[0].regions[0][0].filename;
    8488  switch (lock_catalog (&catalog, LCK_SOFT)) {
    8589  case 2:
     
    198202  if (catalog.measure != 0) free (catalog.measure);
    199203 
     204  SkyListFree (skylist);
    200205  return (TRUE);
    201 
    202206}
Note: See TracChangeset for help on using the changeset viewer.