IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16580


Ignore:
Timestamp:
Feb 21, 2008, 3:20:24 PM (18 years ago)
Author:
Paul Price
Message:

The overlap needn't be applied by pmReadoutReadMore --- all it needs to know is how far the last read got. The overlapping works properly now.

Location:
trunk/psModules/src/camera
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPARead.c

    r16575 r16580  
    142142                                  pmReadout *readout, // Readout of interest
    143143                                  int numScans, // Number of scans to read at a time
    144                                   int overlap, // Number of scans to overlap with previous read
    145144                                  fpaReadType type // Type of image
    146145    )
     
    192191        *next = (readdir == 1) ? trimsec->x0 : trimsec->y0;
    193192    } else {
    194         *next = image ? *readoutScansByType(readout, type) + numScans - overlap : 0;
     193        *next = image ? *readoutScansByType(readout, type) + numScans : 0;
    195194    }
    196195    *last = (readdir == 1) ? trimsec->y1 : trimsec->x1;
     
    203202                        int z,          // Plane number
    204203                        int numScans,   // Number of scans to read at a time
    205                         int overlap,    // Number of scans to overlap with last read
    206204                        fpaReadType type // Type of image
    207205    )
     
    232230    int next;                           // Next position
    233231    int last;                           // Last position
    234     if (!readoutScanProperties(&next, &last, readout, numScans, overlap, type)) {
     232    if (!readoutScanProperties(&next, &last, readout, numScans, type)) {
    235233        psError(PS_ERR_UNKNOWN, false, "Unable to determine readout properties.");
    236234        return false;
     
    419417    int next;                           // Next position
    420418    int last;                           // Last position
    421     if (!readoutScanProperties(&next, &last, readout, numScans, overlap, type)) {
     419    if (!readoutScanProperties(&next, &last, readout, numScans, type)) {
    422420        psError(PS_ERR_UNKNOWN, false, "Unable to determine readout properties.");
    423421        return false;
     
    464462    int *scansTracker = readoutScansByType(readout, type); // Tracker for how many scans have been read
    465463    *scansTracker = next;
     464    if (next == 0) {
     465        overlap = 0;
     466    }
     467    next -= overlap;
    466468
    467469    // Calculate limits, adjust readout->row0,col0
     
    477479        readout->row0 = trimsec->y0;
    478480    }
    479     int upper = next + numScans;        // Upper limit to next section
    480     if (next != 0) {
    481         upper += overlap;
    482         *scansTracker += overlap;
    483     }
     481    int upper = next + numScans + overlap;        // Upper limit to next section
     482    printf("READ: %d --> %d\n", next, upper);
    484483
    485484    // Blow away existing data.
     
    882881
    883882
    884 bool pmReadoutMore(pmReadout *readout, psFits *fits, int z, int numScans, int overlap)
     883bool pmReadoutMore(pmReadout *readout, psFits *fits, int z, int numScans)
    885884{
    886885    PS_ASSERT_PTR_NON_NULL(readout, false);
    887886    PS_ASSERT_FITS_NON_NULL(fits, false);
    888887
    889     return readoutMore(readout, fits, z, numScans, overlap, FPA_READ_TYPE_IMAGE);
     888    return readoutMore(readout, fits, z, numScans, FPA_READ_TYPE_IMAGE);
    890889}
    891890
     
    945944//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    946945
    947 bool pmReadoutMoreMask(pmReadout *readout, psFits *fits, int z, int numScans, int overlap)
     946bool pmReadoutMoreMask(pmReadout *readout, psFits *fits, int z, int numScans)
    948947{
    949948    PS_ASSERT_PTR_NON_NULL(readout, false);
    950949    PS_ASSERT_FITS_NON_NULL(fits, false);
    951950
    952     return readoutMore(readout, fits, z, numScans, overlap, FPA_READ_TYPE_MASK);
     951    return readoutMore(readout, fits, z, numScans, FPA_READ_TYPE_MASK);
    953952}
    954953
     
    999998//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    1000999
    1001 bool pmReadoutMoreWeight(pmReadout *readout, psFits *fits, int z, int numScans, int overlap)
     1000bool pmReadoutMoreWeight(pmReadout *readout, psFits *fits, int z, int numScans)
    10021001{
    10031002    PS_ASSERT_PTR_NON_NULL(readout, false);
    10041003    PS_ASSERT_FITS_NON_NULL(fits, false);
    10051004
    1006     return readoutMore(readout, fits, z, numScans, overlap, FPA_READ_TYPE_WEIGHT);
     1005    return readoutMore(readout, fits, z, numScans, FPA_READ_TYPE_WEIGHT);
    10071006}
    10081007
  • trunk/psModules/src/camera/pmFPARead.h

    r16366 r16580  
    44 * @author Paul Price, IfA
    55 *
    6  * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
    7  * @date $Date: 2008-02-08 04:06:05 $
     6 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2008-02-22 01:20:24 $
    88 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
    99 */
     
    1919                   psFits *fits,        ///< FITS file from which to read
    2020                   int z,               ///< Readout number/plane; zero-offset indexing
    21                    int numScans,        ///< Number of scans (rows/cols) to read
    22                    int overlap          ///< Overlap between consecutive reads
     21                   int numScans         ///< Number of scans (rows/cols) to read
    2322    );
    2423
     
    9392                       psFits *fits,    ///< FITS file from which to read
    9493                       int z,           ///< Readout number/plane; zero-offset indexing
    95                        int numScans,    ///< Number of scans (rows/cols) to read
    96                        int overlap      ///< Overlap between consecutive reads
     94                       int numScans     ///< Number of scans (rows/cols) to read
    9795    );
    9896
     
    143141                         psFits *fits,  ///< FITS file from which to read
    144142                         int z,         ///< Readout number/plane; zero-offset indexing
    145                          int numScans,  ///< Number of scans (rows/cols) to read
    146                          int overlap    ///< Overlap between consecutive reads
     143                         int numScans   ///< Number of scans (rows/cols) to read
    147144    );
    148145
Note: See TracChangeset for help on using the changeset viewer.