IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 5, 2010, 9:42:25 PM (16 years ago)
Author:
eugene
Message:

psphotReadout* API modification to accept a filerule name; wrap lookup of filerule.NUM values in a function (missing = 1); drop deprecated psphotDetect and related; add function to cleanup input pmFPAfile; use psMetadataAddF32 instead of psMetadataAdd (... PS_DATA_F32); add psphotReadoutForcedKnownSources.c; add psphotAddKnownSources

Location:
trunk/psphot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot

  • trunk/psphot/src/psphotForcedReadout.c

    r28013 r29936  
    11# include "psphotInternal.h"
    22
    3 bool psphotForcedReadout(pmConfig *config, const pmFPAview *view) {
     3bool psphotForcedReadout(pmConfig *config, const pmFPAview *view, const char *filerule) {
    44
    55    // measure the total elapsed time in psphotReadout.  XXX the current threading plan
     
    2020
    2121    // set the photcode for this image
    22     if (!psphotAddPhotcode (config, view, "PSPHOT.INPUT")) {
     22    if (!psphotAddPhotcode (config, view, filerule)) {
    2323        psError (PSPHOT_ERR_CONFIG, false, "trouble defining the photcode");
    2424        return false;
     
    3030
    3131    // Generate the mask and weight images, including the user-defined analysis region of interest
    32     psphotSetMaskAndVariance (config, view, "PSPHOT.INPUT");
     32    psphotSetMaskAndVariance (config, view, filerule);
    3333    if (!strcasecmp (breakPt, "NOTHING")) {
    34         return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");
     34        return psphotReadoutCleanup (config, view, filerule);
    3535    }
    3636
    3737    // generate a background model (median, smoothed image)
    38     if (!psphotModelBackground (config, view, "PSPHOT.INPUT")) {
    39         return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");
     38    if (!psphotModelBackground (config, view, filerule)) {
     39        return psphotReadoutCleanup (config, view, filerule);
    4040    }
    41     if (!psphotSubtractBackground (config, view, "PSPHOT.INPUT")) {
    42         return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");
     41    if (!psphotSubtractBackground (config, view, filerule)) {
     42        return psphotReadoutCleanup (config, view, filerule);
    4343    }
    4444    if (!strcasecmp (breakPt, "BACKMDL")) {
    45         return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");
     45        return psphotReadoutCleanup (config, view, filerule);
    4646    }
    4747
    48     if (!psphotLoadPSF (config, view)) {
     48    if (!psphotLoadPSF (config, view, filerule)) {
    4949        // this only happens if we had a programming error in psphotLoadPSF
    5050        psError (PSPHOT_ERR_UNKNOWN, false, "error loading psf model");
    51         return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");
     51        return psphotReadoutCleanup (config, view, filerule);
    5252    }
    5353
    5454    // include externally-supplied sources
    55     psphotLoadExtSources (config, view, "PSPHOT.INPUT");
     55    psphotLoadExtSources (config, view, filerule);
    5656
    5757    // construct an initial model for each object, set the radius to fitRadius, set circular fit mask
    58     psphotGuessModels (config, view, "PSPHOT.INPUT");
     58    psphotGuessModels (config, view, filerule);
    5959
    6060    // merge the newly selected sources into the existing list
    6161    // NOTE: merge OLD and NEW
    62     psphotMergeSources (config, view, "PSPHOT.INPUT");
     62    psphotMergeSources (config, view, filerule);
    6363
    6464    // linear PSF fit to source peaks, subtract the models from the image (in PSF mask)
    65     psphotFitSourcesLinear (config, view, "PSPHOT.INPUT", false);
     65    psphotFitSourcesLinear (config, view, filerule, false);
    6666
    6767    // identify CRs and extended sources
     
    7171
    7272    // calculate source magnitudes
    73     psphotMagnitudes(config, view, "PSPHOT.INPUT");
     73    psphotMagnitudes(config, view, filerule);
    7474
    7575    // XXX do I want to do this?
     
    8080
    8181    // replace background in residual image
    82     psphotSkyReplace (config, view, "PSPHOT.INPUT");
     82    psphotSkyReplace (config, view, filerule);
    8383
    8484    // drop the references to the image pixels held by each source
    85     psphotSourceFreePixels (config, view, "PSPHOT.INPUT");
     85    psphotSourceFreePixels (config, view, filerule);
    8686
    8787    // create the exported-metadata and free local data
    88     return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");
     88    return psphotReadoutCleanup (config, view, filerule);
    8989}
Note: See TracChangeset for help on using the changeset viewer.