IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15722


Ignore:
Timestamp:
Nov 29, 2007, 5:42:21 PM (18 years ago)
Author:
eugene
Message:

working on dvosplit and supporting functions

Location:
trunk/Ohana/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/dvosplit/src/dvosplit.c

    r15721 r15722  
    44int main (int argc, char **argv) {
    55
    6   // USAGE: dvosplit (outlevel) [-catalog (name)] [-region RA RA DEC DEC]
     6  // USAGE: dvosplit (outlevel) [-region RA RA DEC DEC]
    77
    88  // the output catalog needs to inherit the SKY_DEPTH of the input catalog.
    99  // if the CATDIR/SkyTable.fits is not found, assume the HST layout (old default)
     10
     11  // load the sky table for the existing database
    1012  sky = SkyTableLoadOptimal (CATDIR, NULL, NULL, SKY_DEPTH_HST, VERBOSE);
    1113  SkyTableSetFilenames (sky, CATDIR, "cpt");
    12   skylist = SkyListByPatch (sky, -1, &REGION);
     14
     15  // XXX I should just be copying the input sky and setting the output names on that
     16  // load the sky table for the existing database, generate output names
     17  outsky = SkyTableLoadOptimal (CATDIR, NULL, NULL, SKY_DEPTH_HST, VERBOSE);
     18  SkyTableSetFilenames (outsky, OUTDIR, "cpt");
     19
     20  // get the list of populated regions
     21  skylist  = SkyListByPatch (sky, -1, &REGION);
    1322 
    1423  for (i = 0; i < skylist[0].Nregions; i++) {
     
    1726    // if (current level >  out level) skip: cannot currently merge catalogs
    1827    // if (current level == out level) skip: no action is needed
     28    if (skylist[0].regions[i][0].depth >= OUT_DEPTH) continue;
     29
     30    outlist = SkyListByPatch (outsky, OUT_DEPTH, skylist[0].regions[i]);
    1931
    2032    // set the parameters which guide catalog open/load/create
     
    2335    incatalog.catflags = LOAD_NONE;
    2436
    25     // XXX how do I open and not read the entire catalog?
    26 
    2737    // an error exit status here is a significant error
    28     if (!dvo_catalog_open (&incatalog, skylist[0].regions[i], VERBOSE, "rp")) {
     38    if (!dvo_catalog_open (&incatalog, skylist[0].regions[i], VERBOSE, "r")) {
    2939      fprintf (stderr, "ERROR: failure to open catalog file %s\n", incatalog.filename);
    3040      exit (2);
  • trunk/Ohana/src/libdvo/include/dvo.h

    r15514 r15722  
    7272
    7373/* catalog values to be loaded */
     74# define LOAD_NONE      0x00
    7475# define LOAD_AVES      0x01
    7576# define LOAD_MEAS      0x02
Note: See TracChangeset for help on using the changeset viewer.