Changeset 7727 for trunk/psModules/src/camera/pmFPAfile.c
- Timestamp:
- Jun 28, 2006, 9:22:11 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAfile.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAfile.c
r7679 r7727 248 248 // given an already-opened fits file, write the components corresponding 249 249 // to the specified view 250 bool pmFPAfileCopyStructureView (pmFPA *out, pmFPA *in, psMetadata *format, int xBin, int yBin, const pmFPAview *view) 251 { 250 bool pmFPAfileCopyStructureView (pmFPA *out, pmFPA *in, int xBin, int yBin, const pmFPAview *view) 251 { 252 bool status; 252 253 PS_ASSERT_PTR_NON_NULL(out, false); 253 254 PS_ASSERT_PTR_NON_NULL(in, false); 254 PS_ASSERT_PTR_NON_NULL(format, false);255 255 PS_ASSERT_PTR_NON_NULL(view, false); 256 256 257 257 // pmFPAWrite takes care of all PHUs as needed 258 if ( view->chip == -1) {259 pmFPAAddSourceFromView (out, view, format);260 return pmFPACopyStructure (out, in, xBin, yBin);258 if ((view->chip == -1) || in->hdu) { 259 status = pmFPACopyStructure (out, in, xBin, yBin); 260 return status; 261 261 } 262 262 if (view->chip >= in->chips->n) { … … 267 267 pmChip *outChip = out->chips->data[view->chip]; 268 268 269 if (view->cell == -1) { 270 pmFPAAddSourceFromView (out, view, format); 271 // XXX this is a hack: can i defer this to ppImageRebinChip? 272 // bool status = pmChipCopyStructure (outChip, inChip, xBin, yBin); 273 return true; 269 if ((view->cell == -1) || inChip->hdu) { 270 status = pmChipCopyStructure (outChip, inChip, xBin, yBin); 271 return status; 274 272 } 275 273 if (view->cell >= inChip->cells->n) { … … 281 279 pmCell *outCell = outChip->cells->data[view->cell]; 282 280 283 if ( view->readout == -1) {284 pmFPAAddSourceFromView (out, view, format);285 return pmCellCopyStructure (outCell, inCell, xBin, yBin);281 if ((view->readout == -1) || inCell->hdu) { 282 status = pmCellCopyStructure (outCell, inCell, xBin, yBin); 283 return status; 286 284 } 287 285 psError(PS_ERR_UNKNOWN, true, "Returning false"); 288 286 return false; 289 290 // XXX add readout / segment equivalents 291 } 287 }
Note:
See TracChangeset
for help on using the changeset viewer.
