IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 15, 2010, 6:30:19 AM (16 years ago)
Author:
eugene
Message:

add pmSourceCopyData vs pmSourceCopy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20100621/psModules/src/objects/pmSourceFitModel.c

    r28656 r28676  
    8686    psVector *yErr = psVectorAllocEmpty(nPix, PS_TYPE_F32);
    8787
     88    // XXX for a test, skip the central pixel in the sersic fit
     89    bool skipCenter = false && (model->type == pmModelClassGetType("PS_MODEL_SERSIC"));
     90    float Xo = model->params->data.F32[PM_PAR_XPOS];
     91    float Yo = model->params->data.F32[PM_PAR_YPOS];
     92
    8893    // fill in the coordinate and value entries
    8994    nPix = 0;
     
    109114            }
    110115
    111             psVector *coord = psVectorAlloc(2, PS_TYPE_F32);
    112 
    113116            // Convert i/j to image space:
    114117            // 0.5 PIX: the coordinate values must be in pixel coords, not index           
    115             coord->data.F32[0] = (psF32) (j + 0.5 + source->pixels->col0);
    116             coord->data.F32[1] = (psF32) (i + 0.5 + source->pixels->row0);
     118            float Xv = (psF32) (j + 0.5 + source->pixels->col0);
     119            float Yv = (psF32) (i + 0.5 + source->pixels->row0);
     120
     121            // XXX possible skip of center pixel:
     122            if (skipCenter) {
     123                float r = hypot(Xv - Xo, Yv - Yo);
     124                if (r < 0.75) {
     125                    continue;
     126                }
     127            }
     128
     129            psVector *coord = psVectorAlloc(2, PS_TYPE_F32);
     130            coord->data.F32[0] = Xv;
     131            coord->data.F32[1] = Yv;
    117132            x->data[nPix] = (psPtr *) coord;
    118133            y->data.F32[nPix] = source->pixels->data.F32[i][j];
Note: See TracChangeset for help on using the changeset viewer.