IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 30, 2005, 7:04:58 AM (21 years ago)
Author:
eugene
Message:

adding break points and other features

File:
1 edited

Legend:

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

    r5617 r5628  
    1010    psStats     *sky     = NULL;
    1111    pmPSFClump   psfClump;
     12    bool         status;
    1213
    1314    config = psphotArguments (&argc, argv);
     
    1718    // we have memory leaks here -- may be from psMetadata
    1819    imdata = psphotSetup (config);
     20    char *breakPt = psMetadataLookupPtr (&status, config, "BREAK_POINT");
     21    if (!status) {
     22      breakPt = psStringCopy ("NONE");
     23    }
    1924
    2025    // measure image stats for initial guess
     
    2328    // find the peaks in the image
    2429    peaks = pmPeaksSigmaLimit (imdata, config, sky);
     30    if (!strcasecmp (breakPt, "PEAKS")) exit (0);
    2531
    2632    // construct sources and measure basic stats
    2733    sources = psphotSourceStats (imdata, config, peaks);
     34    if (!strcasecmp (breakPt, "STATS")) exit (0);
    2835
    2936    // classify sources based on moments, brightness
    3037    // XXX - this has 1 leak
    3138    psfClump = pmSourcePSFClump (sources, config);
    32     // psLogMsg ("psphot", 4, "clump  X,  Y: %f, %f\n", psfClump.X, psfClump.Y);
    33     // psLogMsg ("psphot", 4, "clump DX, DY: %f, %f\n", psfClump.dX, psfClump.dY);
    3439
    3540    // group into STAR, COSMIC, GALAXY, SATURATED
    3641    pmSourceRoughClass (sources, config, psfClump);
    37 
    38     // optional dump of all rough source data
    39     {
    40       bool status;
    41       char *output = psMetadataLookupPtr (&status, config, "MOMENTS_OUTPUT_FILE");
    42       if (status && (output != NULL) && (output[0])) {
    43         pmMomentsWriteText (sources, output);
    44         psFree (output);
    45       }
    46     }
     42    if (!strcasecmp (breakPt, "CLASS")) exit (0);
    4743
    4844    // source analysis is done in S/N order (brightest first)
     
    5147    // use bright stellar objects to measure PSF
    5248    psf = psphotChoosePSF (config, sources, sky);
     49    if (!strcasecmp (breakPt, "PSFFIT")) exit (0);
    5350
    5451    // test PSF on all except SATURATE and DEFECT (artifacts)
    5552    psphotApplyPSF (imdata, config, sources, psf, sky);
     53    if (!strcasecmp (breakPt, "PSFSUB")) exit (0);
    5654
    5755    // fit extended objects with galaxy models
    5856    psphotFitGalaxies (imdata, config, sources, sky);
     57    if (!strcasecmp (breakPt, "GALSUB")) exit (0);
    5958
    6059    // write out data in appropriate format
Note: See TracChangeset for help on using the changeset viewer.