Changeset 10330
- Timestamp:
- Nov 30, 2006, 2:52:17 PM (20 years ago)
- Location:
- trunk/psModules/src/detrend
- Files:
-
- 2 edited
-
pmFlatField.c (modified) (3 diffs)
-
pmMaskBadPixels.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/detrend/pmFlatField.c
r9612 r10330 7 7 8 8 #include "pmFPA.h" 9 #include "pmHDUUtils.h" 10 #include "pmFPAMaskWeight.h" 9 11 #include "pmFlatField.h" 10 #include "pmFPAMaskWeight.h"11 12 12 13 … … 33 34 psImage *flatImage = flat->image; // Flat-field image 34 35 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); 35 46 36 47 // Check input image is not larger than flat image; mask is the same size as the input … … 95 106 } 96 107 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 97 117 return true; 98 118 } -
trunk/psModules/src/detrend/pmMaskBadPixels.c
r10179 r10330 7 7 #include <pslib.h> 8 8 9 #include "pmFPA.h" 10 #include "pmHDUUtils.h" 9 11 #include "pmFPAMaskWeight.h" 10 12 #include "pmMaskBadPixels.h" … … 22 24 psImage *inMask = input->mask; 23 25 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); 24 36 25 37 int rowMax = input->row0 + inMask->numRows; … … 65 77 } 66 78 } 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); 67 87 68 88 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
