IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37941


Ignore:
Timestamp:
Mar 3, 2015, 1:54:23 PM (11 years ago)
Author:
bills
Message:

add code to allow psphotFullForce to set a quality value when background modeling fails

Location:
trunk/psphot/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/Makefile.am

    r37466 r37941  
    230230        psphotLoadSRCTEXT.c            \
    231231        psphotReadoutCleanup.c         \
     232        psphotStatsFile.c              \
    232233        psphotSourcePlots.c            \
    233234        psphotRadialPlot.c             \
  • trunk/psphot/src/psphotCleanup.c

    r37609 r37941  
    1010        (void)pmConfigRecipesCull(config,NULL);
    1111        pmConfigDump(config, dump_file);
     12    }
     13
     14    // if the program has stats write it out
     15    psphotStatsFile *statsFile = psphotStatsFileGet();
     16    if (statsFile) {
     17        psphotStatsFileSave(config, statsFile);
    1218    }
    1319
  • trunk/psphot/src/psphotFullForce.c

    r36375 r37941  
    1010    pmConfig *config = psphotFullForceArguments (argc, argv);
    1111    assert(config);
     12
     13    if (!psphotStatsFileOpen(config)) {
     14        psErrorStackPrint(stderr, "Error creating statsFile\n");
     15        exit (psphotGetExitStatus());
     16    }
    1217
    1318    psphotVersionPrint();
     
    2530    }
    2631
    27     psLogMsg ("psphot", 3, "complete psphot run: %f sec\n", psTimerMark ("complete"));
     32    psLogMsg ("psphot", 3, "complete psphotFullForce run: %f sec\n", psTimerMark ("complete"));
    2833
    2934    psErrorCode exit_status = psphotGetExitStatus();
  • trunk/psphot/src/psphotFullForceArguments.c

    r36375 r37941  
    6565        psMetadataAddStr (config->arguments, PS_LIST_TAIL, "CHIP_SELECTIONS", PS_DATA_STRING, "", argv[N]);
    6666        psArgumentRemove (N, &argc, argv);
     67    }
     68
     69    if ((N = psArgumentGet(argc, argv, "-stats"))) {
     70        psArgumentRemove(N, &argc, argv);
     71        psMetadataAddStr(config->arguments, PS_LIST_TAIL, "STATS", PS_DATA_STRING,
     72                         "Filename for statistics of output file", argv[N]);
     73        psArgumentRemove(N, &argc, argv);
    6774    }
    6875
  • trunk/psphot/src/psphotInternal.h

    r12805 r37941  
    1414#include <psmodules.h>
    1515#include "psphot.h"
     16#include "psphotStatsFile.h"
    1617
    1718#endif
  • trunk/psphot/src/psphotReadoutCleanup.c

    r37932 r37941  
    5454    psArray      *sources    = detections ? detections->allSources : NULL;
    5555    // XXX where do we free these, in here (psMetadataRemove?)
     56
     57    int quality = psMetadataLookupS32 (&status, readout->analysis, "PSPHOT_QUALITY");
     58    if (quality) {
     59        // if there is no stats file this will be a no-op
     60        psphotStatsFileSetQuality(quality);
     61    }
    5662
    5763    // use the psf-model to measure FWHM stats
  • trunk/psphot/src/psphotStandAlone.h

    r31154 r37941  
    1010#include <psmodules.h>
    1111#include "psphot.h"
     12#include "psphotStatsFile.h"
    1213
    1314// Top level functions
Note: See TracChangeset for help on using the changeset viewer.