IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 12, 2014, 11:52:06 PM (12 years ago)
Author:
mhuber
Message:

adding BSCALEOFFSET option hack to apply -0.5*bscale offset to each input warp, default is -0.0 offset

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackPrepare.c

    r35931 r36855  
    148148    }
    149149
     150    //MEH -- bscale offset hack for warps
     151    options->bscaleOffset = psVectorAlloc(options->num, PS_TYPE_F32);
     152    psVectorInit(options->bscaleOffset, 0.0);
     153    bool setbscaleoffset = psMetadataLookupBool(NULL,recipe, "BSCALEOFFSET");
     154
    150155    psArray *psfs = psArrayAlloc(num); // PSFs for PSF envelope
    151156    int numCols = 0, numRows = 0;   // Size of image
     
    162167        }
    163168        options->sumExposure += options->exposures->data.F32[i];
     169
     170        //MEH -- hdu get redefn again below if conv (lots of this happening..)
     171        if (setbscaleoffset) {
     172            pmHDU *hdu = pmHDUFromCell(cell);
     173            assert(hdu && hdu->header);
     174            float bscale = psMetadataLookupF32(NULL, hdu->header, "BSCALE");
     175            options->bscaleOffset->data.F32[i] = 0.5*bscale;
     176        }
     177        psLogMsg("ppStack", PS_LOG_INFO, "bscaleOffset: %d %f", i,options->bscaleOffset->data.F32[i]);
    164178
    165179        // Get list of PSFs, to determine target PSF
Note: See TracChangeset for help on using the changeset viewer.