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

    r5320 r5448  
    99  double Mcat, Mrel;
    1010  float *RA, *DEC;
    11   int i, j, k, m, N, *N1, Nregions, Nsec, NPTS;
     11  int i, j, k, m, N, *N1, Nsec, NPTS;
    1212  int Nstars, found, GetMeasures, Nlo, Nhi;
    1313  int SaveVectors;
    1414  Vector *vec1, *vec2, *vec3, *vec4;
    15   RegionFile *regions;
     15  SkyTable *sky;
     16  SkyList *skylist;
    1617  Catalog catalog;
    1718  PhotCode *code;
     
    5253  while (Ra > 360.0) Ra -= 360.0;
    5354 
    54   regions = find_regions (Ra, Dec, Radius, &Nregions);
    55 
    56   if (Nregions > 1) {
     55  /* load sky from correct table */
     56  sky = SkyTableLoadOptimal (CATDIR, SKY_TABLE, GSCFILE, -1, VERBOSE);
     57  SkyTableSetFilenames (sky, CATDIR, "cpt");
     58  skylist = SkyListByRadius (sky, -1, Ra, Dec, Radius);
     59
     60  if (skylist[0].Nregions > 1) {
    5761    fprintf (stderr, "warning, radius overlaps region boundary, not yet implemented\n");
    5862  }
    5963
    60   /* set filename, read in header */
    61   sprintf (filename, "%s/%s", catdir, regions[0].name);
    6264  /* lock, load, unlock catalog */
    63   catalog.filename = filename;
     65  catalog.filename = skylist[0].regions[0][0].filename;
    6466  switch (lock_catalog (&catalog, LCK_SOFT)) {
    6567  case 2:
Note: See TracChangeset for help on using the changeset viewer.