IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 6858


Ignore:
Timestamp:
Apr 13, 2006, 5:21:10 PM (20 years ago)
Author:
Paul Price
Message:

Updating withy pmReadoutReadNext.

File:
1 edited

Legend:

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

    r6849 r6858  
    9696
    9797    // Read the FPA
     98    psArray *chips = fpa->chips;
     99    for (int i = 0; i < chips->n; i++) {
     100        pmChip *chip = chips->data[i];
     101        psArray *cells = chip->cells;
     102        for (int j = 0; j < cells->n; j++) {
     103            pmCell *cell = cells->data[j];
     104#if 0
     105            pmReadout *readout = pmReadoutAlloc(cell);
     106            for (int z = 0; pmReadoutReadNext(readout, inFile, z, 100); z++) {
     107                do {
     108//                    printf("Chip %d, Cell %d, Plane %d, row0 = %d\n", i, j, z, readout->row0);
     109                    //pmFPAPrint(fpa, false, false);
     110                } while (pmReadoutReadNext(readout, inFile, z, 2048));
     111            }
     112            psFree(readout);
     113#else
     114            pmCellRead(cell, inFile, NULL);
     115#endif
     116            psFree(cell);
     117        }
     118        psFree(chip);
     119    }
     120
     121#if 0
    98122    pmFPARead(fpa, inFile, NULL);
    99123    // Copy to new camera format
     
    101125    psMetadata *newFormat = psMetadataConfigParse(NULL, NULL, "mcshort_splice.config", true);
    102126    pmConfigConformHeader(phu, newFormat);
    103     pmFPAview *newView = pmFPAAddSourceFromHeader(newFPA, phu, newFormat);
    104     printf("View chip: %d\n", newView->chip);
    105     printf("View cell: %d\n", newView->cell);
    106     pmFPACopy(newFPA, fpa);
     127    pmFPAAddSourceFromView(newFPA, view, newFormat);
     128    pmFPAPrint(newFPA, true, true);
     129    pmFPACopyStructure(newFPA, fpa, 5, 5);
    107130    pmFPAWrite(newFPA, outFile, NULL);
    108     pmFPAPrint(newFPA, false, true);
     131    exit(EXIT_SUCCESS);
    109132
    110     psFree(newView);
     133    pmFPAPrint(newFPA, true, true);
    111134    psFree(newFormat);
    112135    psFree(newFPA);
     136#endif
     137
    113138    psFree(view);
    114139    psFree(fpa);
    115140    psFree(config);
     141    psFitsClose(outFile);
    116142    psFitsClose(inFile);
    117     psFitsClose(outFile);
    118143    psFree(phu);
    119144    psFree(cameraFormat);
Note: See TracChangeset for help on using the changeset viewer.