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/imsubtract/pmSubtractBias.c

    r6078 r6080  
    1111 *  @author GLG, MHPCC
    1212 *
    13  *  @version $Revision: 1.6.8.1.2.3 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2006-01-20 06:03:29 $
     13 *  @version $Revision: 1.6.8.1.2.4 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2006-01-20 09:47:06 $
    1515 *
    1616 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    102102    assert(sub);
    103103
    104     // Get the trim sections
    105     psRegion *inTrimsec = psMetadataLookupPtr(NULL, in->parent->concepts, "CELL.TRIMSEC");
    106     psRegion *subTrimsec = psMetadataLookupPtr(NULL, sub->parent->concepts, "CELL.TRIMSEC");
    107     psImage *inImage = psImageSubset(in->image, *inTrimsec); // The input image
    108     psImage *subImage = psImageSubset(sub->image, *subTrimsec); // The image to be subtracted
    109     psImage *inMask = in->mask ? psImageSubset(in->mask, *inTrimsec) : NULL; // The input mask
    110     psImage *subMask = sub->mask ? psImageSubset(sub->mask, *subTrimsec) : NULL; // The input mask
     104    psImage *inImage  = in->image;      // The input image
     105    psImage *inMask   = in->mask;       // The input mask
     106    psImage *subImage = sub->image;     // The image to be subtracted
     107    psImage *subMask  = sub->mask;      // The mask for the subtraction image
    111108
    112109    // Offsets of the cells
     
    425422    PS_ASSERT_READOUT_TYPE(in, PS_TYPE_F32, NULL);
    426423
    427     pmCell *cell = in->parent;      // The parent cell
    428     psRegion *trimsec = psMetadataLookupPtr(NULL, cell->concepts, "CELL.TRIMSEC"); // The trim region
    429     psImage *image = psImageSubset(in->image, *trimsec); // The image corresponding to the trim region
     424    psImage *image = in->image;         // The input image
    430425
    431426    // Overscan processing
     
    438433        }
    439434
    440         // Get the list of overscans
    441         psList *overscanRegions = psMetadataLookupPtr(NULL, cell->concepts, "CELL.BIASSEC");
    442         psList *overscans = psListAlloc(NULL); // List of the overscan images
    443         psListIterator *iter = psListIteratorAlloc(overscanRegions, PS_LIST_HEAD, false); // Iterator
    444         psRegion *biassec = NULL;       // A BIASSEC region from the list
    445         while ((biassec = psListGetAndIncrement(iter))) {
    446             psImage *overscan = psImageSubset(in->image, *biassec);
    447             psListAdd(overscans, PS_LIST_TAIL, overscan);
    448             psFree(overscan);
    449         }
    450         psFree(iter);
     435        psList *overscans = in->bias; // List of the overscan images
    451436
    452437        psStats *myStats = psStatsAlloc(PS_STAT_SAMPLE_MEAN); // A new psStats, to avoid clobbering original
     
    482467
    483468            // We do the regular overscan subtraction
    484             bool readRows = psMetadataLookupBool(NULL, cell->concepts, "CELL.READDIR"); // Read direction
     469
     470            bool readRows = psMetadataLookupBool(NULL, in->parent->concepts, "CELL.READDIR");// Read direction
    485471
    486472            if (readRows) {
Note: See TracChangeset for help on using the changeset viewer.