IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10330


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

Adding processing metadata.

Location:
trunk/psModules/src/detrend
Files:
2 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}
  • trunk/psModules/src/detrend/pmMaskBadPixels.c

    r10179 r10330  
    77#include <pslib.h>
    88
     9#include "pmFPA.h"
     10#include "pmHDUUtils.h"
    911#include "pmFPAMaskWeight.h"
    1012#include "pmMaskBadPixels.h"
     
    2224    psImage *inMask = input->mask;
    2325    psImage *exMask = mask->mask;
     26
     27    // Add mask MD5 to header
     28    pmHDU *hdu = pmHDUFromReadout(input);  // HDU of interest
     29    psVector *md5 = psImageMD5(mask->mask); // md5 hash
     30    psString md5string = psMD5toString(md5); // String
     31    psFree(md5);
     32    psStringPrepend(&md5string, "MASK image MD5: ");
     33    psMetadataAddStr(hdu->header, PS_LIST_TAIL, "HISTORY", PS_META_DUPLICATE_OK,
     34                     md5string, "");
     35    psFree(md5string);
    2436
    2537    int rowMax = input->row0 + inMask->numRows;
     
    6577        }
    6678    }
     79
     80    psTime *time = psTimeGetNow(PS_TIME_TAI); // The time now, used for reporting
     81    psString timeString = psTimeToISO(time); // String with time
     82    psFree(time);
     83    psStringPrepend(&timeString, "Static mask applied at ");
     84    psMetadataAddStr(hdu->header, PS_LIST_TAIL, "HISTORY", PS_META_DUPLICATE_OK,
     85                     timeString, "");
     86    psFree(timeString);
    6787
    6888    return true;
Note: See TracChangeset for help on using the changeset viewer.