IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 18, 2010, 4:11:53 PM (16 years ago)
Author:
eugene
Message:

merge changes from branches/eam_branches/psphot,psModules.20100506 (finish basic psphotStack)

Location:
trunk/psphot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot

  • trunk/psphot/src/psphotReadoutMinimal.c

    r26894 r28013  
    1818
    1919    // set the photcode for this image
    20     if (!psphotAddPhotcode(config, view)) {
     20    if (!psphotAddPhotcode(config, view, "PSPHOT.INPUT")) {
    2121        psError(PSPHOT_ERR_CONFIG, false, "trouble defining the photcode");
    2222        return false;
     
    2424
    2525    // Generate the mask and weight images, including the user-defined analysis region of interest
    26     psphotSetMaskAndVariance (config, view);
     26    psphotSetMaskAndVariance (config, view, "PSPHOT.INPUT");
    2727
    2828    // load the psf model, if suppled.  FWHM_X,FWHM_Y,etc are saved on readout->analysis
    2929    if (!psphotLoadPSF (config, view)) {
    3030      psError (PSPHOT_ERR_CONFIG, false, "missing psf model");
    31       return psphotReadoutCleanup (config, view);
     31      return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");
    3232    }
    3333
    3434    // find the detections (by peak and/or footprint) in the image. (final pass)
    35     if (!psphotFindDetections(config, view, false)) {
     35    if (!psphotFindDetections(config, view, "PSPHOT.INPUT", false)) {
    3636        psError (PSPHOT_ERR_UNKNOWN, false, "failure in peak analysis");
    37         return psphotReadoutCleanup (config, view);
     37        return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");
    3838    }
    3939
    4040    // construct sources and measure basic stats (saved on detections->newSources)
    41     if (!psphotSourceStats (config, view, false)) { // pass 1
     41    if (!psphotSourceStats (config, view, "PSPHOT.INPUT", false)) { // pass 1
    4242        psError(PSPHOT_ERR_UNKNOWN, false, "failure to generate sources");
    43         return psphotReadoutCleanup (config, view);
     43        return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");
    4444    }
    4545
    4646    // find blended neighbors of very saturated stars
    47     psphotDeblendSatstars (config, view);
     47    psphotDeblendSatstars (config, view, "PSPHOT.INPUT");
    4848
    4949    // mark blended peaks PS_SOURCE_BLEND
    50     if (!psphotBasicDeblend (config, view)) {
     50    if (!psphotBasicDeblend (config, view, "PSPHOT.INPUT")) {
    5151        psLogMsg ("psphot", 3, "failed on deblend analysis");
    52         return psphotReadoutCleanup (config, view);
     52        return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");
    5353    }
    5454
    5555    // classify sources based on moments, brightness (use supplied psf shape parameters)
    56     if (!psphotRoughClass (config, view)) {
     56    if (!psphotRoughClass (config, view, "PSPHOT.INPUT")) {
    5757        psLogMsg ("psphot", 3, "failed to find a valid PSF clump for image");
    58         return psphotReadoutCleanup (config, view);
     58        return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");
    5959    }
    6060
    6161    // construct an initial model for each object
    62     psphotGuessModels (config, view);
     62    psphotGuessModels (config, view, "PSPHOT.INPUT");
    6363
    6464    // merge the newly selected sources into the existing list
    65     psphotMergeSources (config, view);
     65    psphotMergeSources (config, view, "PSPHOT.INPUT");
    6666
    6767    // linear PSF fit to source peaks
    68     psphotFitSourcesLinear (config, view, false);
     68    psphotFitSourcesLinear (config, view, "PSPHOT.INPUT", false);
    6969
    7070// XXX eventually, add the extended source fits here
    7171# if (0)
    7272    // measure source size for the remaining sources
    73     psphotSourceSize (config, view);
     73    psphotSourceSize (config, view, "PSPHOT.INPUT");
    7474
    75     psphotExtendedSourceAnalysis (config, view);
     75    psphotExtendedSourceAnalysis (config, view, "PSPHOT.INPUT");
    7676
    77     psphotExtendedSourceFits (config, view);
     77    psphotExtendedSourceFits (config, view, "PSPHOT.INPUT");
    7878# endif
    7979
    8080    // calculate source magnitudes
    81     psphotMagnitudes(config, view);
     81    psphotMagnitudes(config, view, "PSPHOT.INPUT");
    8282
    8383    // XXX ensure this is measured if the analysis succeeds (even if quality is low)
    84     if (!psphotEfficiency(config, view)) {
     84    if (!psphotEfficiency(config, view, "PSPHOT.INPUT")) {
    8585        psErrorStackPrint(stderr, "Unable to determine detection efficiencies from fake sources");
    8686        psErrorClear();
     
    8888
    8989    // drop the references to the image pixels held by each source
    90     psphotSourceFreePixels (config, view);
     90    psphotSourceFreePixels (config, view, "PSPHOT.INPUT");
    9191
    9292    // create the exported-metadata and free local data
    93     return psphotReadoutCleanup(config, view);
     93    return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");
    9494}
Note: See TracChangeset for help on using the changeset viewer.