IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35696


Ignore:
Timestamp:
Jun 21, 2013, 3:19:31 PM (13 years ago)
Author:
eugene
Message:

allow addstar -create-id to work on absent Images.dat (creates it)

Location:
branches/eam_branches/ipp-20130509/Ohana/src/addstar/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130509/Ohana/src/addstar/src/addstar_create_ID.c

    r34405 r35696  
    1010  /*** update the image table ***/
    1111  /* setup image table format and lock */
     12  // gfits_db_init (&db);
    1213  db.mode   = dvo_catalog_catmode (CATMODE);
    1314  db.format = dvo_catalog_catformat (CATFORMAT);
     
    1920    if (VERBOSE) fprintf (stderr, "can't find %s, creating a new one\n", ImageCat);
    2021    dvo_image_create (&db, GetZeroPoint());
    21   } else {
    22     if (!dvo_image_load (&db, VERBOSE, FORCE_READ)) {
    23       Shutdown ("can't read image catalog %s", db.filename);
    24     }
    25     if (!dvo_image_createID (&db.header)) {
    26       fprintf (stderr, "failed to add database ID\n");
    27       exit (1);
    28     }
     22    // if (!gfits_table_to_vtable (&db[0].ftable, &db[0].vtable, 0, 0)) return (FALSE);
     23    dvo_image_save (&db, VERBOSE);
     24    dvo_image_unlock (&db);
     25    return TRUE;
     26  }
     27
     28  if (!dvo_image_load (&db, VERBOSE, FORCE_READ)) {
     29    Shutdown ("can't read image catalog %s", db.filename);
     30  }
     31  if (!dvo_image_createID (&db.header)) {
     32    fprintf (stderr, "failed to add database ID\n");
     33    exit (1);
    2934  }
    3035  fseeko (db.f, 0, SEEK_SET);
  • branches/eam_branches/ipp-20130509/Ohana/src/addstar/src/args.c

    r35594 r35696  
    419419  fprintf (stderr, "  addstar -pmm (filename)");
    420420  fprintf (stderr, "     insert pmm table into database\n\n");
     421  fprintf (stderr, "  addstar -create-id");
     422  fprintf (stderr, "     add a dvodb ID to the image table (and exit)\n\n");
    421423
    422424  fprintf (stderr, "  optional flags:\n");
Note: See TracChangeset for help on using the changeset viewer.