Changeset 5564 for trunk/archive/scripts/src/phase2/pmFPAConstruct.c
- Timestamp:
- Nov 21, 2005, 5:00:14 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/archive/scripts/src/phase2/pmFPAConstruct.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/scripts/src/phase2/pmFPAConstruct.c
r5462 r5564 88 88 psString extName = contentItem->name; // The name of the extension 89 89 pmChip *chip = pmChipAlloc(fpa, extName); // The chip 90 chip-> data = pmPixelDataAlloc(extName); // Prepare chip to receive FITS data90 chip->hdu = p_pmHDUAlloc(extName); // Prepare chip to receive FITS data 91 91 if (contentItem->type != PS_DATA_STRING) { 92 92 psLogMsg(__func__, PS_LOG_WARN, "Type of content item (%x) is not string: ignored\n", … … 146 146 pmCell *cell = pmCellAlloc(chip, cellData, extName); // The cell 147 147 // psFree(cellData); 148 cell-> data = pmPixelDataAlloc(extName); // Prepare cell to receive FITS data148 cell->hdu = p_pmHDUAlloc(extName); // Prepare cell to receive FITS data 149 149 150 150 psFree(chip); … … 157 157 } else if (strcasecmp(extType, "NONE") == 0) { 158 158 // No extensions; Content contains metadata, each entry is a chip with its component cells 159 fpa-> data = pmPixelDataAlloc("PHU"); // Prepare FPA to receive FITS data159 fpa->hdu = p_pmHDUAlloc("PHU"); // Prepare FPA to receive FITS data 160 160 while (contentItem = psMetadataGetAndIncrement(contentsIter)) { 161 161 psString chipName = contentItem->name; // The name of the chip … … 196 196 if (strcasecmp(extType, "NONE") == 0) { 197 197 // There are no extensions --- only the PHU 198 chip-> data = pmPixelDataAlloc("PHU");198 chip->hdu = p_pmHDUAlloc("PHU"); 199 199 200 200 const char *contents = psMetadataLookupString(&mdStatus, camera, "CONTENTS"); … … 247 247 pmCell *cell = pmCellAlloc(chip, cellData, extName); // The cell 248 248 // psFree(cellData); 249 cell-> data = pmPixelDataAlloc(extName); // Prepare cell to receive FITS data249 cell->hdu = p_pmHDUAlloc(extName); // Prepare cell to receive FITS data 250 250 } // Iterating through contents 251 251 psFree(contentsIter); … … 273 273 { 274 274 psTrace(__func__, 0, "FPA:\n"); 275 if (fpa-> data) {276 psTrace(__func__, 1, "---> FPA is extension %s.\n", fpa-> data->extname);277 if (! fpa-> data->images) {278 psTrace(__func__, 1, "---> NO PIXELS for extension %s\n", fpa-> data->extname);275 if (fpa->hdu) { 276 psTrace(__func__, 1, "---> FPA is extension %s.\n", fpa->hdu->extname); 277 if (! fpa->hdu->images) { 278 psTrace(__func__, 1, "---> NO PIXELS for extension %s\n", fpa->hdu->extname); 279 279 } 280 280 } … … 285 285 psTrace(__func__, 1, "Chip: %d\n", i); 286 286 pmChip *chip = chips->data[i]; // The chip 287 if (chip-> data) {288 psTrace(__func__, 2, "---> Chip is extension %s.\n", chip-> data->extname);289 if (! chip-> data->images) {290 psTrace(__func__, 2, "---> NO PIXELS for extension %s\n", chip-> data->extname);287 if (chip->hdu) { 288 psTrace(__func__, 2, "---> Chip is extension %s.\n", chip->hdu->extname); 289 if (! chip->hdu->images) { 290 psTrace(__func__, 2, "---> NO PIXELS for extension %s\n", chip->hdu->extname); 291 291 } 292 292 } … … 296 296 psTrace(__func__, 2, "Cell: %d\n", j); 297 297 pmCell *cell = cells->data[j]; // The cell 298 if (cell-> data) {299 psTrace(__func__, 3, "---> Cell is extension %s.\n", cell-> data->extname);300 if (! cell-> data->images) {301 psTrace(__func__, 3, "---> NO PIXELS for extension %s\n", cell-> data->extname);298 if (cell->hdu) { 299 psTrace(__func__, 3, "---> Cell is extension %s.\n", cell->hdu->extname); 300 if (! cell->hdu->images) { 301 psTrace(__func__, 3, "---> NO PIXELS for extension %s\n", cell->hdu->extname); 302 302 } 303 303 }
Note:
See TracChangeset
for help on using the changeset viewer.
