IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10310


Ignore:
Timestamp:
Nov 30, 2006, 3:34:32 AM (20 years ago)
Author:
rhl
Message:

Added recipe NSTAR_APERTURE_CORRECTION_MIN as minimum number of aperture correction stars

File:
1 edited

Legend:

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

    r10278 r10310  
    66
    77// measure the aperture residual statistics
    8 bool psphotApResid (pmReadout *readout, psArray *sources, psMetadata *recipe, pmPSF *psf) {
    9 
     8bool psphotApResid (pmReadout *readout, psArray *sources, psMetadata *recipe, pmPSF *psf)
     9{
    1010    int Nfail = 0;
    1111    int Nskip = 0;
     
    3030    bool IGNORE_GROWTH = psMetadataLookupBool (&status, recipe, "IGNORE_GROWTH");
    3131    bool INTERPOLATE_AP = psMetadataLookupBool (&status, recipe, "INTERPOLATE_AP");
     32    int NSTAR_APERTURE_CORRECTION_MIN =
     33        psMetadataLookupS32(&status, recipe, "NSTAR_APERTURE_CORRECTION_MIN");
     34    if (!status) {
     35        NSTAR_APERTURE_CORRECTION_MIN = 5;
     36    }
    3237
    3338    pmSourcePhotometryMode photMode = 0;
     
    116121
    117122    // XXX choose a better value here?
    118     if (Npsf < 5) {
    119         psError(PSPHOT_ERR_APERTURE, true, "no valid aperture residual sources, giving up");
     123    if (Npsf < NSTAR_APERTURE_CORRECTION_MIN) {
     124        psError(PSPHOT_ERR_APERTURE, true, "Only %d valid aperture residual sources (need %d), giving up",
     125                Npsf, NSTAR_APERTURE_CORRECTION_MIN);
    120126        return false;
    121127    }
Note: See TracChangeset for help on using the changeset viewer.