IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36326


Ignore:
Timestamp:
Nov 30, 2013, 1:34:15 PM (13 years ago)
Author:
eugene
Message:

add flags, new model status bits, new source mode2 bits

Location:
branches/eam_branches/ipp-20130904/psModules/src/objects
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130904/psModules/src/objects/pmModelFuncs.h

    r35560 r36326  
    3636
    3737typedef enum {
    38     PM_MODEL_STATUS_NONE         = 0x00, ///< model fit not yet attempted, no other info
    39     PM_MODEL_STATUS_FITTED       = 0x01, ///< model fit completed
    40     PM_MODEL_STATUS_NONCONVERGE  = 0x02, ///< model fit did not converge
    41     PM_MODEL_STATUS_OFFIMAGE     = 0x04, ///< model fit drove out of range
    42     PM_MODEL_STATUS_BADARGS      = 0x08, ///< model fit called with invalid args
    43     PM_MODEL_STATUS_LIMITS       = 0x10, ///< model parameters hit limits
    44     PM_MODEL_STATUS_WEAK_FIT     = 0x20, ///< model fit met loose tolerance, but not tight tolerance
     38    PM_MODEL_STATUS_NONE           = 0x000, ///< model fit not yet attempted, no other info
     39    PM_MODEL_STATUS_FITTED         = 0x001, ///< model fit completed
     40    PM_MODEL_STATUS_NONCONVERGE    = 0x002, ///< model fit did not converge
     41    PM_MODEL_STATUS_OFFIMAGE       = 0x004, ///< model fit drove out of range
     42    PM_MODEL_STATUS_BADARGS        = 0x008, ///< model fit called with invalid args
     43    PM_MODEL_STATUS_LIMITS         = 0x010, ///< model parameters hit limits
     44    PM_MODEL_STATUS_WEAK_FIT       = 0x020, ///< model fit met loose tolerance, but not tight tolerance
     45    PM_MODEL_STATUS_NAN_CHISQ      = 0x040, ///< model fit failed with a NAN chisq
     46    PM_MODEL_SERSIC_PCM_FAIL_GUESS = 0x080, ///< sersic model fit failed on the initial moments-based guess
     47    PM_MODEL_SERSIC_PCM_FAIL_GRID  = 0x100, ///< sersic model fit failed on the grid search
     48    PM_MODEL_PCM_FAIL_GUESS        = 0x200, ///< non-sersic model fit failed on the initial moments-based guess
    4549} pmModelStatus;
    4650
  • branches/eam_branches/ipp-20130904/psModules/src/objects/pmSourceFitModel.c

    r36320 r36326  
    282282    // set the model success or failure status
    283283    model->flags |= PM_MODEL_STATUS_FITTED;
    284     if (!fitStatus) model->flags |= PM_MODEL_STATUS_NONCONVERGE;
     284    if (!fitStatus) {
     285        if (isnan(myMin->value)) {
     286          model->flags |= PM_MODEL_STATUS_NAN_CHISQ;
     287        } else {
     288          model->flags |= PM_MODEL_STATUS_NONCONVERGE;
     289        }
     290    }
    285291
    286292    if (myMin->chisqConvergence) {
  • branches/eam_branches/ipp-20130904/psModules/src/objects/pmSourceFitPCM.c

    r36320 r36326  
    122122    // set the model success or failure status
    123123    pcm->modelConv->flags |= PM_MODEL_STATUS_FITTED;
    124     if (!fitStatus) pcm->modelConv->flags |= PM_MODEL_STATUS_NONCONVERGE;
     124
     125    if (!fitStatus) {
     126        if (isnan(myMin->value)) {
     127            pcm->modelConv->flags |= PM_MODEL_STATUS_NAN_CHISQ;
     128        } else {
     129            pcm->modelConv->flags |= PM_MODEL_STATUS_NONCONVERGE;
     130        }
     131    }
    125132
    126133    if (myMin->chisqConvergence) {
  • branches/eam_branches/ipp-20130904/psModules/src/objects/pmSourceFitSet.c

    r36085 r36326  
    352352        // set the model success or failure status
    353353        model->flags |= PM_MODEL_STATUS_FITTED;
    354         if (!fitStatus) model->flags |= PM_MODEL_STATUS_NONCONVERGE;
     354        if (!fitStatus) {
     355          if (isnan(myMin->value)) {
     356            model->flags |= PM_MODEL_STATUS_NAN_CHISQ;
     357          } else {
     358            model->flags |= PM_MODEL_STATUS_NONCONVERGE;
     359          }
     360        }
    355361
    356362        // models can go insane: reject these
  • branches/eam_branches/ipp-20130904/psModules/src/objects/pmSourceIO_CMF.c.in

    r36294 r36326  
    893893
    894894            // EAM : adding for PV2 outputs:
    895             @>PS1_SV2@ psMetadataAdd (row, PS_LIST_TAIL, "EXT_FLAGS", PS_DATA_S32, "type for chosen EXT_MODEL",   source->modelEXT ? source->modelEXT->type : -1);
     895            @>PS1_SV2@ psMetadataAdd (row, PS_LIST_TAIL, "EXT_FLAGS", PS_DATA_S16, "model fit flags (pmModelStatus)", source->modelEXT ? source->modelEXT->flags : 0);
    896896
    897897            @>PS1_DV2@ psMetadataAddF32 (row, PS_LIST_TAIL, "POSANGLE",   0, "position angle at source (degrees)",         posAngle);
  • branches/eam_branches/ipp-20130904/psModules/src/objects/pmSourceMasks.h

    r34403 r36326  
    5656    PM_SOURCE_MODE2_DIFF_SELF_MATCH       = 0x00000800, ///< positive detection match is probably this source
    5757    PM_SOURCE_MODE2_SATSTAR_PROFILE       = 0x00001000, ///< saturated source is modeled with a radial profile
     58
     59    PM_SOURCE_MODE2_ECONTOUR_FEW_PTS      = 0x00002000, ///< too few points to measure the elliptical contour
     60    PM_SOURCE_MODE2_RADBIN_NAN_CENTER     = 0x00004000, ///< radial bins failed with too many NaN center bin
     61    PM_SOURCE_MODE2_PETRO_NAN_CENTER      = 0x00008000, ///< petrosian radial bins failed with too many NaN center bin
     62    PM_SOURCE_MODE2_PETRO_NO_PROFILE      = 0x00010000, ///< petrosian not build because radial bins missing
     63
     64    PM_SOURCE_MODE2_PETRO_INSIG_RATIO     = 0x00020000, ///< insignificant measurement of petrosian ratio
     65    PM_SOURCE_MODE2_PETRO_RATIO_ZEROBIN   = 0x00040000, ///< petrosian ratio in the 0th bin (likely bad)
     66   
     67    PM_SOURCE_MODE2_EXT_FITS_RUN          = 0x00080000, ///< we attempted to run extended fits on this source
     68    PM_SOURCE_MODE2_EXT_FITS_FAIL         = 0x00100000, ///< at least one of the model fits failed
     69    PM_SOURCE_MODE2_EXT_FITS_RETRY        = 0x00200000, ///< one of the model fits was re-tried with new window
     70    PM_SOURCE_MODE2_EXT_FITS_NONE         = 0x00400000, ///< ALL of the model fits failed
     71   
     72   
    5873} pmSourceMode2;
    5974
Note: See TracChangeset for help on using the changeset viewer.