IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36758 for trunk/psModules


Ignore:
Timestamp:
May 21, 2014, 12:46:16 PM (12 years ago)
Author:
bills
Message:

handle case where a model exists but the galaxy shapes measurement was not performed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmSourceIO_CMF.c.in

    r36756 r36758  
    14751475        for (int iModel = 0; iModel < source->modelFits->n; iModel++) {
    14761476            pmModel *model = source->modelFits->data[iModel];
    1477             pmSourceGalaxyFits *galaxyFits = source->galaxyFits->data[iModel];
    1478 
    1479             if (!model || !galaxyFits) return false;
    1480 
    1481             // XXX: TODO: we should search for the model that has the same type as the fits
    1482             psAssert(model->type == galaxyFits->modelType, "galaxyFits model type does not match model type");
     1477            if (!model) continue;
     1478
     1479            pmSourceGalaxyFits *galaxyFits = NULL;
     1480            for (int iFit = 0; iFit < source->galaxyFits->n; iFit++) {
     1481                galaxyFits = source->galaxyFits->data[iFit];
     1482                if (model->type == galaxyFits->modelType) break;
     1483                galaxyFits = NULL;
     1484            }
     1485
     1486            if (!galaxyFits) continue;
    14831487
    14841488            // X,Y coordinates are stored with the model parameters
Note: See TracChangeset for help on using the changeset viewer.