IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 2, 2014, 10:50:14 AM (12 years ago)
Author:
bills
Message:

Merge with ipp-20140401 (The staticsky tag)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/psModules/src/objects/pmSourceIO_CFF.c

    r36623 r36633  
    126126        pmModel *model = pmModelAlloc (modelType);
    127127        source->modelPSF  = model;
    128         source->type = PM_SOURCE_TYPE_STAR; // XXX this should be added to the flags
     128//        RoughClass wants source type to be unknown
     129//        source->type = PM_SOURCE_TYPE_STAR; // XXX this should be added to the flags
     130        source->type = PM_SOURCE_TYPE_UNKNOWN;
    129131
    130132        // XXX we can set this in general, but for a specific image, we need to weed out SATSTARS and
     
    178180        source->moments->My = Y;
    179181        source->moments->Mrf = kronRadius * 0.4; // kronRadius is 2.5 * first radial moment
    180         source->tmpFlags |= PM_SOURCE_TMPF_MOMENTS_MEASURED;
    181         // XXX does the above cause a problem with pmSourceMoments (do we run it? yes we do)
     182
     183        // Don't mark the moments as measured because that causes many fields to be left blank.
     184        // The moments code knows not to change the position or the Mrf for external sources
     185        // source->tmpFlags |= PM_SOURCE_TMPF_MOMENTS_MEASURED;
    182186
    183187        if (isfinite(petRadius)) {
     
    246250
    247251    pmModelType sersicModelType = pmModelClassGetType("PS_MODEL_SERSIC");
     252
     253    psString modelToChoose = psMetadataLookupStr(&mdok, recipe, "EXT_MODEL_TYPE_FOR_CFF");
     254    pmModelType selectedModelType = -1;
     255    if (mdok && modelToChoose != NULL) {
     256        if (strcmp(modelToChoose, "BEST")) {
     257            selectedModelType = pmModelClassGetType(modelToChoose);
     258        }
     259    }
    248260
    249261    for (int i = 0; i < sources->n; i++) {
     
    273285            theta = 0;
    274286        } else {
    275             // Choose the extended model to use for this source.
    276             // For now we use the one set as the modelEXT for this source which had the best fit.
    277             // XXX: make this controllable by recipe
    278             //   use best (as implemented here)
    279             //   choose specific type
     287            //   Find the model with the selected type. If selected type is -1 choose the one selected ad
     288            //   modelEXT which was the best
    280289            int iModel = -1;
    281290            if (source->modelEXT) {
    282                 pmModelType ext_model_type = source->modelEXT->type;
     291                pmModelType ext_model_type =  selectedModelType != -1  ? selectedModelType : source->modelEXT->type;
    283292                for (int j=0; j<source->modelFits->n; j++) {
    284293                    pmModel *aModel = source->modelFits->data[j];
Note: See TracChangeset for help on using the changeset viewer.