Changeset 6080 for branches/eam_rel9_p0/psModules/src/detrend/pmFlatField.c
- Timestamp:
- Jan 19, 2006, 11:47:06 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_rel9_p0/psModules/src/detrend/pmFlatField.c
r6076 r6080 24 24 * @author Ross Harman, MHPCC 25 25 * 26 * @version $Revision: 1.4.8.1.2. 2$ $Name: not supported by cvs2svn $27 * @date $Date: 2006-01-20 0 6:01:02$26 * @version $Revision: 1.4.8.1.2.3 $ $Name: not supported by cvs2svn $ 27 * @date $Date: 2006-01-20 09:47:06 $ 28 28 * 29 29 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 53 53 psElemType flatType; 54 54 psElemType maskType; 55 psImage *inImage = NULL;56 psImage *inMask = NULL;57 psImage *flatImage = NULL;58 59 55 60 56 // Check for nulls … … 67 63 } 68 64 69 // Get the TRIMSEC of each image 70 { 71 psRegion *trimsec = psMetadataLookupPtr(NULL, in->parent->concepts, "CELL.TRIMSEC"); 72 inImage = psImageSubset(in->image, *trimsec); 73 trimsec = psMetadataLookupPtr(NULL, flat->parent->concepts, "CELL.TRIMSEC"); 74 flatImage = psImageSubset(flat->image, *trimsec); 75 } 65 psImage *inImage = in->image; // Input image 66 psImage *inMask = in->mask; // Mask for input image 67 psImage *flatImage = flat->image; // Flat-field image 68 69 // Offsets on the chip 70 int x0in = psMetadataLookupS32(NULL, in->parent->concepts, "CELL.X0"); 71 int y0in = psMetadataLookupS32(NULL, in->parent->concepts, "CELL.Y0"); 72 int x0flat = psMetadataLookupS32(NULL, flat->parent->concepts, "CELL.X0"); 73 int y0flat = psMetadataLookupS32(NULL, flat->parent->concepts, "CELL.Y0"); 76 74 77 75 if (inImage == NULL) { … … 84 82 return false; 85 83 } 86 inMask = in->mask;87 84 88 85 // Check input image and its mask are not larger than flat image … … 102 99 103 100 // Determine total offset based on image offset with chip offset 104 totOffCol = inImage->col0 + in->col0;105 totOffRow = inImage->row0 + in->row0;101 totOffCol = inImage->col0 + y0in - flatImage->col0 - y0flat; 102 totOffRow = inImage->row0 + x0in - flatImage->row0 - x0flat; 106 103 107 104 // Check that offsets are within image limits
Note:
See TracChangeset
for help on using the changeset viewer.
