IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 4, 2006, 3:53:10 PM (20 years ago)
Author:
Paul Price
Message:

Code compiles now. Not yet tested.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppMerge/src/ppMergeCombine.c

    r7061 r7067  
    44#include <psmodules.h>
    55
     6#include "ppMerge.h"
    67#include "ppMergeData.h"
    78#include "ppMergeCombine.h"
     
    2122    // Sanity checks
    2223    assert(!options->scale || scales);
    23     assert(!scales || !*scales || ((*scales)->type.type == PS_TYPE_F64 &&
    24                                    (*scales)->numCols == data->numCells &&
    25                                    (*scales)->numRows == filenames->n));
     24    assert(!scales || (scales->type.type == PS_TYPE_F64 &&
     25                       scales->numCols == data->numCells &&
     26                       scales->numRows == filenames->n));
    2627    assert(!options->zero || zeros);
    27     assert(!zeros || !*zeros || ((*zeros)->type.type == PS_TYPE_F64 &&
    28                                  (*zeros)->numCols == data->numCells &&
    29                                  (*zeros)->numRows == filenames->n));
     28    assert(!zeros || (zeros->type.type == PS_TYPE_F64 &&
     29                      zeros->numCols == data->numCells &&
     30                      zeros->numRows == filenames->n));
    3031
    3132    // Iterate over the FPA
     
    3839            continue;
    3940        }
    40         pmChipWrite(chip, outFile, config->database, false);
     41        pmChipWrite(chip, data->outFile, config->database, false);
    4142        psArray *cells = chip->cells;   // Array of output cells
    4243        for (int j = 0; j < cells->n; j++) {
     
    4647            }
    4748            cellNum++;
    48             pmCellWrite(cell, outFile, config->database, false);
     49            pmCellWrite(cell, data->outFile, config->database, false);
    4950            pmReadout *readout = pmReadoutAlloc(cell); // Output readout of interest
    5051            psArray *stack = psArrayAlloc(filenames->n); // Stack of readouts to combine
     
    5354                cellScales = psImageCol(NULL, scales, cellNum);
    5455            }
    55             psVector cellZeros = NULL;  // Zeros for this cell
     56            psVector *cellZeros = NULL;  // Zeros for this cell
    5657            if (zeros) {
    5758                cellZeros = psImageCol(NULL, zeros, cellNum);
     
    8182
    8283                    // Only reading and writing the first readout in each cell (plane 0)
    83                     stillReading |= pmReadoutReadNext(stack->data[k], fits, 0, options->rows);
     84                    stillReadingRows |= pmReadoutReadNext(stack->data[k], fits, 0, options->rows);
    8485                    psFitsClose(fits);
    8586                }
    8687
    87                 pmReadoutCombine(readout, stack, cellZeros, cellScales, combineParams);
    88                 pmReadoutWriteNext(readout, outFile, 0);
     88                pmReadoutCombine(readout, stack, cellZeros, cellScales, options->combine);
     89                pmReadoutWriteNext(readout, data->outFile, 0);
    8990
    9091            } while (stillReadingRows);
    9192
    9293            // Write the pixels
    93             pmCellWrite(cell, outFile, config->database, true);
     94            pmCellWrite(cell, data->outFile, config->database, true);
    9495
    9596            // Blow away the cell data
     
    104105
    105106        // Write the pixels
    106         pmChipWrite(chip, outFile, config->database, true);
     107        pmChipWrite(chip, data->outFile, config->database, true);
    107108
    108109        // Blow away the chip data
     
    117118
    118119    // Write the pixels
    119     pmFPAWrite(fpa, outFile, config->database, true);
     120    pmFPAWrite(data->out, data->outFile, config->database, true);
    120121
    121122    // Blow away the FPA data
     
    124125        pmFPAFreeData(fpaIn);
    125126    }
    126     pmFPAFreeData(fpa);
     127    pmFPAFreeData(data->out);
    127128
    128129    return true;
Note: See TracChangeset for help on using the changeset viewer.