IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 6897


Ignore:
Timestamp:
Apr 18, 2006, 5:38:18 PM (20 years ago)
Author:
Paul Price
Message:

Reading and writing readouts is working.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppTest.c

    r6858 r6897  
    7474    }
    7575
     76#if 1
    7677    const char *outName = psMetadataLookupStr(NULL, config->arguments, "-output");
    7778    psLogMsg("ppImage", PS_LOG_INFO, "Opening output image: %s\n", outName);
     
    8283        exit(EXIT_FAILURE);
    8384    }
     85#endif
    8486
    8587    // Construct camera in preparation for reading
     
    9799    // Read the FPA
    98100    psArray *chips = fpa->chips;
     101    pmFPAWrite(fpa, outFile, NULL, false);
    99102    for (int i = 0; i < chips->n; i++) {
    100103        pmChip *chip = chips->data[i];
     104        pmChipWrite(chip, outFile, NULL, false);
    101105        psArray *cells = chip->cells;
    102106        for (int j = 0; j < cells->n; j++) {
    103107            pmCell *cell = cells->data[j];
    104 #if 0
     108            pmCellWrite(cell, outFile, NULL, false);
     109#if 1
    105110            pmReadout *readout = pmReadoutAlloc(cell);
    106111            for (int z = 0; pmReadoutReadNext(readout, inFile, z, 100); z++) {
    107112                do {
    108 //                    printf("Chip %d, Cell %d, Plane %d, row0 = %d\n", i, j, z, readout->row0);
    109                     //pmFPAPrint(fpa, false, false);
     113                    printf("Chip %d, Cell %d, Plane %d, row0 = %d\n", i, j, z, readout->row0);
     114                    pmReadoutWriteNext(readout, outFile, z);
     115                    //pmFPAPrint(fpa, false, true);
    110116                } while (pmReadoutReadNext(readout, inFile, z, 2048));
    111117            }
     
    136142#endif
    137143
     144    psFitsClose(outFile);
    138145    psFree(view);
    139146    psFree(fpa);
    140147    psFree(config);
    141     psFitsClose(outFile);
    142148    psFitsClose(inFile);
    143149    psFree(phu);
Note: See TracChangeset for help on using the changeset viewer.