IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31468


Ignore:
Timestamp:
May 6, 2011, 11:13:57 AM (15 years ago)
Author:
eugene
Message:

enable SKIP_MEAS for getstar; add image table dump to relphot

Location:
branches/eam_branches/ipp-20110505/Ohana/src
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110505/Ohana/src/getstar/src/getstar.c

    r31467 r31468  
    6464        catalog.Nsecfilt  = GetPhotcodeNsecfilt ();
    6565        catalog.catflags = LOAD_AVES | LOAD_SECF;
    66         if (needMeas) {
    67             catalog.catflags |= LOAD_MEAS;
    68         }
     66        catalog.catflags |= needMeas ? LOAD_MEAS : SKIP_MEAS;
    6967
    7068        // an error exit status here is a significant error
     
    9896        catalog.Nsecfilt  = GetPhotcodeNsecfilt ();
    9997        catalog.catflags = LOAD_AVES | LOAD_SECF;
    100         if (needMeas) {
    101             catalog.catflags |= LOAD_MEAS;
    102         }
     98        catalog.catflags |= needMeas ? LOAD_MEAS : SKIP_MEAS;
    10399
    104100        // an error exit status here is a significant error
  • branches/eam_branches/ipp-20110505/Ohana/src/libdvo/include/dvo.h

    r31450 r31468  
    7575# define LOAD_MISS      0x04
    7676# define LOAD_SECF      0x08
    77 # define LOAD_MEAS_META 0x10
     77# define SKIP_AVES      0x10
     78# define SKIP_MEAS      0x20
     79# define SKIP_MISS      0x40
     80# define SKIP_SECF      0x80
     81
     82// # define LOAD_MEAS_META 0x100 -- is this used??
    7883
    7984/* photometry code types */
  • branches/eam_branches/ipp-20110505/Ohana/src/libdvo/src/dvo_catalog_split.c

    r31450 r31468  
    239239
    240240  /*** Measure Table ***/
    241   status = dvo_catalog_open_subcat (catalog, &catalog[0].measure_catalog, ftable.header, "MEASURE", VERBOSE);
    242   if (status == DVO_CAT_OPEN_FAIL) {
    243     return (FALSE);
    244   }
    245   if ((status == DVO_CAT_OPEN_EMPTY) && (catalog[0].Nmeas_disk > 0)) {
    246     return (FALSE);
     241  if (!(catalog[0].catflags & SKIP_MEAS)) {
     242    // unless we specify 'skip', we still need to load the
     243    status = dvo_catalog_open_subcat (catalog, &catalog[0].measure_catalog, ftable.header, "MEASURE", VERBOSE);
     244    if (status == DVO_CAT_OPEN_FAIL) {
     245      return (FALSE);
     246    }
     247    if ((status == DVO_CAT_OPEN_EMPTY) && (catalog[0].Nmeas_disk > 0)) {
     248      return (FALSE);
     249    }
    247250  }
    248251  if ((status != DVO_CAT_OPEN_EMPTY) && (catalog[0].catflags & LOAD_MEAS)) {
     
    262265  } else {
    263266    // XXX is it necessary to generate a template header here?
     267    // XXX this is a memory leak, right?
     268    if (catalog[0].measure_catalog) {
     269      gfits_free_header (&catalog[0].measure_catalog[0].header);
     270    } else {
     271      ALLOCATE (catalog[0].measure_catalog, Catalog, 1);
     272      dvo_catalog_init (catalog[0].measure_catalog, TRUE);
     273    }
    264274    gfits_create_header (&catalog[0].measure_catalog[0].header);
    265275    ALLOCATE (catalog[0].measure, Measure, 1);
  • branches/eam_branches/ipp-20110505/Ohana/src/relphot/src/relphot.c

    r31450 r31468  
    147147  }
    148148 
     149  if (SOMETHING) {
     150    FITS_DB dbX;
     151    dbX.lockstate = LCK_XCLD;
     152    dbX.timeout   = 60.0;
     153    gfits_db_init (&dbX);
     154    char filename[1024];
     155    snprintf (filename, 1024, "%s.bck", ImageCat);
     156    if (!gfits_db_lock (dbX, filename)) {
     157      fprintf (stderr, "can't lock backup image image catalog\n");
     158      return (FALSE);
     159    }
     160   
     161    // copy header
     162    gfits_copy_header (dbX.header, db.header);
     163    gfits_copy_header (dbX.theader, db.theader);
     164    gfits_copy_matrix (dbX.matrix, db.matrix);
     165    gfits_copy_table (dbX.matrix, db.matrix);
     166
     167    // copy Images.dat to another structure
     168    dvo_image_update (&db, VERBOSE);
     169    dvo_image_unlock (&db);
     170  }
     171
    149172  if (USE_GRID) dump_grid ();
    150173  if (!UPDATE) exit (0);
Note: See TracChangeset for help on using the changeset viewer.