Changeset 7476 for trunk/ppImage/src/ppTest.c
- Timestamp:
- Jun 9, 2006, 4:54:12 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppTest.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppTest.c
r7361 r7476 87 87 // Construct camera in preparation for reading 88 88 pmFPA *fpa = pmFPAConstruct(config->camera); 89 90 //////////////////////////////////////////////////////////////////////////////////////////////////////////////91 // NEW92 //////////////////////////////////////////////////////////////////////////////////////////////////////////////93 94 // Add in a source file95 89 pmFPAview *view = pmFPAAddSourceFromHeader(fpa, phu, cameraFormat); 96 90 printf("View chip: %d\n", view->chip); 97 91 printf("View cell: %d\n", view->cell); 98 92 93 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 94 // The action happens here 95 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 96 97 98 #if 1 99 // A mosaic 100 psMetadata *mosaicCamera = psMetadataConfigParse(NULL, NULL, "/home/mithrandir/price/ipp/config/mcshort_mosaic/camera.config", true); 101 pmFPA *mosaicFPA = pmFPAConstruct(mosaicCamera); 102 psMetadata *mosaicFormat = psMetadataConfigParse(NULL, NULL, "/home/mithrandir/price/ipp/config/mcshort_mosaic/format_mosaic.config", true); 103 pmFPAview *mosaicView = pmFPAviewAlloc(0); 104 pmFPAAddSourceFromView(mosaicFPA, mosaicView, mosaicFormat); 105 #endif 106 99 107 // Read the FPA 100 #if 1101 108 pmFPARead(fpa, inFile, NULL); 102 #else 109 110 #if 0 103 111 psArray *chips = fpa->chips; 104 112 //pmFPAWrite(fpa, outFile, NULL, false); 105 113 for (int i = 0; i < chips->n; i++) { 106 114 pmChip *chip = chips->data[i]; 115 //pmChipRead(chip, inFile, NULL); 107 116 //pmChipWrite(chip, outFile, NULL, false); 108 117 psArray *cells = chip->cells; … … 110 119 pmCell *cell = cells->data[j]; 111 120 //pmCellWrite(cell, outFile, NULL, false); 112 #if 0113 121 pmReadout *readout = pmReadoutAlloc(cell); 114 122 for (int z = 0; pmReadoutReadNext(readout, inFile, z, 512); z++) { … … 120 128 } 121 129 psFree(readout); 122 #else123 pmCellRead(cell, inFile, NULL);124 printf("Read chip %d, cell %d\n", i, j);125 #endif126 130 } 127 //pmChipMosaic(chip); 128 //psFree(chip); 131 pmChipMosaic(mosaicFPA->chips->data[0], chip); 129 132 } 130 133 #endif 131 134 135 pmFPAMosaic(mosaicFPA, fpa); 132 136 133 137 #if 1 134 // Copy to new camera format 135 pmFPA *newFPA = pmFPAConstruct(config->camera); 136 psMetadata *newFormat = psMetadataConfigParse(NULL, NULL, "/home/mithrandir/price/ipp/config/mcshort/format_spliced.config", true); 137 pmFPAAddSourceFromView(newFPA, view, newFormat); 138 //pmFPACopyStructure(newFPA, fpa, 5, 5); 139 pmFPACopy(newFPA, fpa); 140 //pmConfigConformHeader(phu, newFormat); 141 //pmHDUGenerateForFPA(newFPA); 142 pmFPAWrite(newFPA, outFile, NULL, true, true); 143 pmFPAPrint(newFPA, true, true); 144 psFree(newFormat); 145 psFree(newFPA); 138 pmFPAWrite(mosaicFPA, outFile, NULL, true, true); 139 pmFPAPrint(mosaicFPA, true, true); 140 psFree(mosaicCamera); 141 psFree(mosaicFormat); 142 psFree(mosaicView); 143 psFree(mosaicFPA); 146 144 #endif 147 145 146 #if 1 148 147 psFitsClose(outFile); 148 #endif 149 149 150 psFree(view); 151 psFree(phu); 150 152 psFree(fpa); 151 153 psFree(config); 152 154 psFitsClose(inFile); 153 psFree(phu);154 155 psFree(cameraFormat); 155 156 … … 159 160 pmConceptsDone(); 160 161 pmConfigDone(); 162 163 161 164 ppMemCheck(); 162 165
Note:
See TracChangeset
for help on using the changeset viewer.
