IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 28, 2006, 9:22:11 AM (20 years ago)
Author:
magnier
Message:

changed args for pmFPAfileCopyStructureView, fixed for PHU handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAfile.c

    r7679 r7727  
    248248// given an already-opened fits file, write the components corresponding
    249249// to the specified view
    250 bool pmFPAfileCopyStructureView (pmFPA *out, pmFPA *in, psMetadata *format, int xBin, int yBin, const pmFPAview *view)
    251 {
     250bool pmFPAfileCopyStructureView (pmFPA *out, pmFPA *in, int xBin, int yBin, const pmFPAview *view)
     251{
     252    bool status;
    252253    PS_ASSERT_PTR_NON_NULL(out, false);
    253254    PS_ASSERT_PTR_NON_NULL(in, false);
    254     PS_ASSERT_PTR_NON_NULL(format, false);
    255255    PS_ASSERT_PTR_NON_NULL(view, false);
    256256
    257257    // 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;
    261261    }
    262262    if (view->chip >= in->chips->n) {
     
    267267    pmChip *outChip = out->chips->data[view->chip];
    268268
    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;
    274272    }
    275273    if (view->cell >= inChip->cells->n) {
     
    281279    pmCell *outCell = outChip->cells->data[view->cell];
    282280
    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;
    286284    }
    287285    psError(PS_ERR_UNKNOWN, true, "Returning false");
    288286    return false;
    289 
    290     // XXX add readout / segment equivalents
    291 }
     287}
Note: See TracChangeset for help on using the changeset viewer.