Changeset 7727
- Timestamp:
- Jun 28, 2006, 9:22:11 AM (20 years ago)
- Location:
- trunk/psModules/src/camera
- Files:
-
- 2 edited
-
pmFPAfile.c (modified) (3 diffs)
-
pmFPAfile.h (modified) (2 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 } -
trunk/psModules/src/camera/pmFPAfile.h
r7618 r7727 7 7 * @author EAM, IfA 8 8 * 9 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $10 * @date $Date: 2006-06-2 1 22:44:16$9 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2006-06-28 19:22:11 $ 11 11 * 12 12 * Copyright 2004-2005 Institute for Astronomy, University of Hawaii … … 108 108 bool pmFPAfileCopyView (pmFPA *out, pmFPA *in, const pmFPAview *view); 109 109 110 bool pmFPAfileCopyStructureView (pmFPA *out, pmFPA *in, psMetadata *format,int xBin, int yBin, const pmFPAview *view);110 bool pmFPAfileCopyStructureView (pmFPA *out, pmFPA *in, int xBin, int yBin, const pmFPAview *view); 111 111 112 112 # endif
Note:
See TracChangeset
for help on using the changeset viewer.
