IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38634


Ignore:
Timestamp:
Jul 23, 2015, 2:48:46 PM (11 years ago)
Author:
eugene
Message:

write history to the cpt header

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150625/Ohana/src/uniphot/src/update_dvo_setphot.c

    r38631 r38634  
    8383    if (VERBOSE) fprintf (stderr, "saving catalog %s\n", catalog.filename);
    8484   
     85    struct timeval now;
     86    gettimeofday (&now, (void *) NULL);
     87    char *moddate = ohana_sec_to_date (now.tv_sec);
     88    gfits_modify (&catalog.header, "SETPHOT", "%s", 1, moddate); // replaces the single entry
     89
     90    char history[128];
     91    snprintf (history, 128, "setphot applied: %s", moddate);
     92    gfits_modify_alt (&catalog.header, "HISTORY", "%S", 0, history); // adds a new entry
     93
     94    snprintf (history, 128, "setphot options: reset: %1d, ubercal: %1d", RESET, UBERCAL);
     95    gfits_modify_alt (&catalog.header, "HISTORY", "%S", 0, history); // adds a new entry
     96
     97    free (moddate);
     98
    8599    SetProtect (TRUE);
    86100    if (!dvo_catalog_save (&catalog, VERBOSE)) { fprintf (stderr, "ERROR: failed to save %s\n", catalog.filename); exit (1); }
Note: See TracChangeset for help on using the changeset viewer.