IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 30, 2006, 2:52:17 PM (20 years ago)
Author:
Paul Price
Message:

Adding processing metadata.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/detrend/pmFlatField.c

    r9612 r10330  
    77
    88#include "pmFPA.h"
     9#include "pmHDUUtils.h"
     10#include "pmFPAMaskWeight.h"
    911#include "pmFlatField.h"
    10 #include "pmFPAMaskWeight.h"
    1112
    1213
     
    3334    psImage *flatImage = flat->image;   // Flat-field image
    3435    psImage *flatMask  = flat->mask;    // Mask for flat-field image
     36
     37    // Add flat-field MD5 to header
     38    pmHDU *hdu = pmHDUFromReadout(in);  // HDU of interest
     39    psVector *md5 = psImageMD5(flat->image); // md5 hash
     40    psString md5string = psMD5toString(md5); // String
     41    psFree(md5);
     42    psStringPrepend(&md5string, "FLAT image MD5: ");
     43    psMetadataAddStr(hdu->header, PS_LIST_TAIL, "HISTORY", PS_META_DUPLICATE_OK,
     44                     md5string, "");
     45    psFree(md5string);
    3546
    3647    // Check input image is not larger than flat image; mask is the same size as the input
     
    95106    }
    96107
     108    psTime *time = psTimeGetNow(PS_TIME_TAI); // The time now, used for reporting
     109    psString timeString = psTimeToISO(time); // String with time
     110    psFree(time);
     111    psStringPrepend(&timeString, "Flat-field processing completed at ");
     112    psMetadataAddStr(hdu->header, PS_LIST_TAIL, "HISTORY", PS_META_DUPLICATE_OK,
     113                     timeString, "");
     114    psFree(timeString);
     115
     116
    97117    return true;
    98118}
Note: See TracChangeset for help on using the changeset viewer.