IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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.

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.