IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 5, 2005, 8:44:00 PM (21 years ago)
Author:
eugene
Message:

adding pmObjects stuff

File:
1 edited

Legend:

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

    r4901 r4949  
    1010
    1111// a PSF always has 4 parameters fewer than the equivalent model
    12 pmPSF *pmPSFAlloc (psModelType type) {
     12pmPSF *pmPSFAlloc (pmModelType type) {
    1313
    1414    int Nparams;
     
    1919    psf->chisq = 0.0;
    2020
    21     Nparams = psModelParameterCount (type);
     21    Nparams = pmModelParameterCount (type);
    2222    if (!Nparams) {
    23         psError(PS_ERR_UNKNOWN, true, "Undefined psModelType");
     23        psError(PS_ERR_UNKNOWN, true, "Undefined pmModelType");
    2424        return(NULL);
    2525    }     
     
    5454
    5555    // XXX probably need to increment ref counter
    56     test->modelType   = psModelSetType (modelName);
     56    test->modelType   = pmModelSetType (modelName);
    5757    test->psf         = pmPSFAlloc (test->modelType);
    5858    test->sources     = psMemCopy(sources);
     
    9999    for (int i = 0; i < test->sources->n; i++) {
    100100
    101         psSource *source = test->sources->data[i];
    102         psModel  *model  = pmSourceModelGuess (source, test->modelType);
     101        pmSource *source = test->sources->data[i];
     102        pmModel  *model  = pmSourceModelGuess (source, test->modelType);
    103103        x = source->peak->x;
    104104        y = source->peak->y;
     
    134134        if (test->mask->data.U8[i]) continue;
    135135
    136         psSource *source = test->sources->data[i];
    137         psModel  *modelFLT = test->modelFLT->data[i];
     136        pmSource *source = test->sources->data[i];
     137        pmModel  *modelFLT = test->modelFLT->data[i];
    138138
    139139        // set shape for this model based on PSF
    140         psModel *modelPSF = psModelFromPSF (modelFLT, test->psf);
     140        pmModel *modelPSF = pmModelFromPSF (modelFLT, test->psf);
    141141        x = source->peak->x;
    142142        y = source->peak->y;
     
    185185}
    186186
    187 // input: an array of psModels, pre-allocated psf
     187// input: an array of pmModels, pre-allocated psf
    188188// some of the array entries may be NULL, ignore them
    189189bool pmPSFFromModels (pmPSF *psf, psArray *models, psVector *mask) {
     
    197197
    198198    for (int i = 0; i < models->n; i++) {
    199         psModel *model = models->data[i];
     199        pmModel *model = models->data[i];
    200200        if (model == NULL) continue;
    201201
     
    211211    for (int i = 0; i < psf->params->n; i++) {
    212212        for (int j = 0; j < models->n; j++) {
    213             psModel *model = models->data[j];
     213            pmModel *model = models->data[j];
    214214            if (model == NULL) continue;
    215215            z->data.F64[j] = model->params->data.F32[i + 4];
     
    231231}
    232232
    233 psModel *psModelFromPSF (psModel *modelFLT, pmPSF *psf) {
     233pmModel *pmModelFromPSF (pmModel *modelFLT, pmPSF *psf) {
    234234
    235235    // need to define the relationship between the modelFLT and modelPSF ?
    236236   
    237237    // find function used to set the model parameters
    238     psModelFromPSFFunc modelFromPSFFunc = psModelFromPSFFunc_GetFunction (psf->type);
     238    pmModelFromPSFFunc modelFromPSFFunc = pmModelFromPSFFunc_GetFunction (psf->type);
    239239
    240240    // do we need a different model for the PSF vs FLT version?
    241     psModel *modelPSF = psModelAlloc (psf->type);
     241    pmModel *modelPSF = pmModelAlloc (psf->type);
    242242
    243243    // set model parameters for this source based on PSF information
Note: See TracChangeset for help on using the changeset viewer.