IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 9, 2010, 4:41:16 PM (16 years ago)
Author:
eugene
Message:

working on psphotStack (nearly done)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/stackphot.20100406/psphot/src/psphotStackReadout.c

    r27625 r27649  
    5959
    6060    // find the detections (by peak and/or footprint) in the image.
     61    // This finds the detections on Chisq image as well as the individuals
    6162    if (!psphotFindDetections (config, view, true)) { // pass 1
    6263        // this only happens if we had an error in psphotFindDetections
     
    6667
    6768    // construct sources and measure basic stats (saved on detections->newSources)
     69    // only run this on detections from the input images, not chisq image
    6870    if (!psphotSourceStats (config, view, true)) { // pass 1
    6971        psError(PSPHOT_ERR_UNKNOWN, false, "failure to generate sources");
    7072        return psphotReadoutCleanup (config, view);
    7173    }
    72     if (!strcasecmp (breakPt, "PEAKS")) {
    73         return psphotReadoutCleanup(config, view);
     74
     75    // *** generate the objects (which unify the sources from the different images)
     76    psArray *objects = psphotMatchSources (config, view);
     77
     78    // construct sources for the newly-generated sources (from other images)
     79    if (!psphotSourceStats (config, view, false)) { // pass 1
     80        psError(PSPHOT_ERR_UNKNOWN, false, "failure to generate sources");
     81        return psphotReadoutCleanup (config, view);
    7482    }
    7583
    7684    // find blended neighbors of very saturated stars (detections->newSources)
    77     if (!psphotDeblendSatstars (config, view)) {
    78         psError (PSPHOT_ERR_UNKNOWN, false, "failed on satstar deblend analysis");
    79         return psphotReadoutCleanup (config, view);
    80     }
     85    // if (!psphotDeblendSatstars (config, view)) {
     86    //     psError (PSPHOT_ERR_UNKNOWN, false, "failed on satstar deblend analysis");
     87    //     return psphotReadoutCleanup (config, view);
     88    // }
    8189
    8290    // mark blended peaks PS_SOURCE_BLEND (detections->newSources)
    83     if (!psphotBasicDeblend (config, view)) {
    84         psError (PSPHOT_ERR_UNKNOWN, false, "failed on deblend analysis");
    85         return psphotReadoutCleanup (config, view);
    86     }
     91    // if (!psphotBasicDeblend (config, view)) {
     92    //     psError (PSPHOT_ERR_UNKNOWN, false, "failed on deblend analysis");
     93    //     return psphotReadoutCleanup (config, view);
     94    // }
    8795
    8896    // classify sources based on moments, brightness
     97    // only run this on detections from the input images, not chisq image
    8998    if (!psphotRoughClass (config, view)) {
    9099        psError (PSPHOT_ERR_UNKNOWN, false, "failed to determine rough classifications");
     
    92101    }
    93102    // if we were not supplied a PSF model, determine the IQ stats here (detections->newSources)
     103    // only run this on detections from the input images, not chisq image
    94104    if (!psphotImageQuality (config, view)) { // pass 1
    95105        psError (PSPHOT_ERR_UNKNOWN, false, "failed to measure image quality");
     
    121131    psphotMergeSources (config, view);
    122132
    123     // *** generate the objects (which unify the sources from the different images)
    124     // pmArray *objects = psphotMatchSources (config, view);
    125    
    126133    // linear PSF fit to source peaks, subtract the models from the image (in PSF mask)
    127     // psphotFitSourcesLinearStack (config, objects, FALSE);
     134    psphotFitSourcesLinearStack (config, objects, FALSE);
     135    psFree (objects);
    128136
    129137    // identify CRs and extended sources
     
    153161    psphotSourceFreePixels (config, view);
    154162
     163    // remove chisq image from config->file:PSPHOT.INPUT (why?)
     164    psphotStackRemoveChisqFromInputs(config);
     165
    155166    // create the exported-metadata and free local data
    156167    return psphotReadoutCleanup (config, view);
Note: See TracChangeset for help on using the changeset viewer.