IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 20594


Ignore:
Timestamp:
Nov 8, 2008, 2:29:21 PM (18 years ago)
Author:
eugene
Message:

fix the PSF image mosaics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotVisual.c

    r20450 r20594  
    691691    int DY = 64;
    692692
    693     psImage *psfMosaic = psImageAlloc (3*DX, 3*DY, PS_TYPE_F32);
     693    psImage *psfMosaic = psImageAlloc (5*DX, 5*DY, PS_TYPE_F32);
    694694    psImageInit (psfMosaic, 0.0);
    695695   
    696     psImage *funMosaic = psImageAlloc (3*DX, 3*DY, PS_TYPE_F32);
     696    psImage *funMosaic = psImageAlloc (5*DX, 5*DY, PS_TYPE_F32);
    697697    psImageInit (funMosaic, 0.0);
    698698
    699     psImage *resMosaic = psImageAlloc (3*DX, 3*DY, PS_TYPE_F32);
     699    psImage *resMosaic = psImageAlloc (5*DX, 5*DY, PS_TYPE_F32);
    700700    psImageInit (resMosaic, 0.0);
    701701
     
    703703
    704704    // generate a fake model at each of the 3x3 image grid positions
    705     for (int x = -1; x <= +1; x ++) {
    706         for (int y = -1; y <= +1; y ++) {
     705    for (int x = -2; x <= +2; x ++) {
     706        for (int y = -2; y <= +2; y ++) {
    707707            // use the center of the center pixel of the image
    708             float xc = (int)((0.5 + 0.45*x)*readout->image->numCols) + readout->image->col0 + 0.5;
    709             float yc = (int)((0.5 + 0.45*y)*readout->image->numRows) + readout->image->row0 + 0.5;
     708            float xc = (int)((0.5 + 0.225*x)*readout->image->numCols) + readout->image->col0 + 0.5;
     709            float yc = (int)((0.5 + 0.225*y)*readout->image->numRows) + readout->image->row0 + 0.5;
    710710
    711711            // assign the x and y coords to the image center
     
    723723            // no need to mask the source here
    724724            // XXX should we measure this for the analytical model only or the full model?
    725             pmModelAddWithOffset (psfMosaic, NULL, model, PM_MODEL_OP_FULL | PM_MODEL_OP_CENTER, 0, -x*DX, -y*DY);
    726             pmModelAddWithOffset (funMosaic, NULL, model, PM_MODEL_OP_FUNC | PM_MODEL_OP_CENTER, 0, -x*DX, -y*DY);
    727             pmModelAddWithOffset (resMosaic, NULL, model, PM_MODEL_OP_RES0 | PM_MODEL_OP_RES1 | PM_MODEL_OP_CENTER, 0, -x*DX, -y*DY);
    728 
     725            pmModelAddWithOffset (psfMosaic, NULL, model, PM_MODEL_OP_FULL | PM_MODEL_OP_CENTER, 0, x*DX, y*DY);
     726            pmModelAddWithOffset (funMosaic, NULL, model, PM_MODEL_OP_FUNC | PM_MODEL_OP_CENTER, 0, x*DX, y*DY);
     727            pmModelAddWithOffset (resMosaic, NULL, model, PM_MODEL_OP_RES0 | PM_MODEL_OP_RES1 | PM_MODEL_OP_CENTER, 0, x*DX, y*DY);
    729728            psFree (model);
    730729        }
Note: See TracChangeset for help on using the changeset viewer.