IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17954


Ignore:
Timestamp:
Jun 5, 2008, 4:02:08 PM (18 years ago)
Author:
Paul Price
Message:

Adding recipe value PSF.FAKE.ALLOW which specifies whether fake PSFs are allowed (when fitting the PSF fails).

Location:
trunk/psphot/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphot.h

    r17870 r17954  
    1212
    1313#define PSPHOT_RECIPE "PSPHOT" // Name of the recipe to use
     14
     15#define PSPHOT_RECIPE_PSF_FAKE_ALLOW "PSF.FAKE.ALLOW" // Name for recipe component permitting fake PSFs
     16
    1417
    1518// top-level psphot functions
     
    126129
    127130bool            psphotRadialProfile (pmSource *source, psMetadata *recipe, psMaskType maskVal);
    128 bool            psphotPetrosian (pmSource *source, psMetadata *recipe, psMaskType maskVal);
    129 bool            psphotIsophotal (pmSource *source, psMetadata *recipe, psMaskType maskVal);
    130 bool            psphotAnnuli (pmSource *source, psMetadata *recipe, psMaskType maskVal);
    131 bool            psphotKron (pmSource *source, psMetadata *recipe, psMaskType maskVal);
     131bool            psphotPetrosian (pmSource *source, psMetadata *recipe, psMaskType maskVal);
     132bool            psphotIsophotal (pmSource *source, psMetadata *recipe, psMaskType maskVal);
     133bool            psphotAnnuli (pmSource *source, psMetadata *recipe, psMaskType maskVal);
     134bool            psphotKron (pmSource *source, psMetadata *recipe, psMaskType maskVal);
    132135
    133136// structures & functions to support psf-convolved model fitting
  • trunk/psphot/src/psphotChoosePSF.c

    r17555 r17954  
    106106    // generate a psf model using the first selection
    107107    if (stars->n == 0) {
    108         // XXX optionally give up here
    109108        psError(PSPHOT_ERR_PSF, false, "Failed to fit any models when choosing PSF");
    110         psErrorStackPrint (stderr, "Using guess PSF model");
    111         psErrorClear ();
     109        bool mdok;                      // Status of MD lookup
     110        if (!psMetadataLookupBool(&mdok, recipe, PSPHOT_RECIPE_PSF_FAKE_ALLOW)) {
     111            return false;
     112        }
     113        psErrorStackPrint(stderr, "Using guess PSF model");
     114        psErrorClear();
    112115
    113116        psFree(options);
     
    175178        psFree (stars);
    176179
    177         // XXX optionally give up here
    178         // test for PSPHOT.recipe & return false on failure.
    179 
     180        psError(PSPHOT_ERR_PSF, false, "Failed to fit any models when choosing PSF");
     181        bool mdok;                      // Status of MD lookup
     182        if (!psMetadataLookupBool(&mdok, recipe, PSPHOT_RECIPE_PSF_FAKE_ALLOW)) {
     183            return false;
     184        }
    180185        // generate a psf model using the first selection
    181         psError(PSPHOT_ERR_PSF, false, "Failed to fit any models when choosing PSF");
    182186        psErrorStackPrint (stderr, "Using guess PSF model");
    183         psErrorClear ();
     187        psErrorClear();
    184188
    185189        psFree(options);
Note: See TracChangeset for help on using the changeset viewer.