IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 19, 2006, 11:47:06 PM (21 years ago)
Author:
Paul Price
Message:

Readouts now contain a subimage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_rel9_p0/psModules/src/detrend/pmFlatField.c

    r6076 r6080  
    2424 *  @author Ross Harman, MHPCC
    2525 *
    26  *  @version $Revision: 1.4.8.1.2.2 $ $Name: not supported by cvs2svn $
    27  *  @date $Date: 2006-01-20 06: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 $
    2828 *
    2929 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5353    psElemType flatType;
    5454    psElemType maskType;
    55     psImage *inImage = NULL;
    56     psImage *inMask = NULL;
    57     psImage *flatImage = NULL;
    58 
    5955
    6056    // Check for nulls
     
    6763    }
    6864
    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");
    7674
    7775    if (inImage == NULL) {
     
    8482        return false;
    8583    }
    86     inMask = in->mask;
    8784
    8885    // Check input image and its mask are not larger than flat image
     
    10299
    103100    // 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;
    106103
    107104    // Check that offsets are within image limits
Note: See TracChangeset for help on using the changeset viewer.