IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 13, 2005, 6:43:44 AM (21 years ago)
Author:
eugene
Message:

substantial work on ensemble PSF fitting, better functions for evaluation, overall code cleanups

File:
1 edited

Legend:

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

    r5756 r5772  
    4343    psfClump = pmSourcePSFClump (sources, config);
    4444
    45     // group into STAR, COSMIC, GALAXY, SATURATED
     45    // group into STAR, COSMIC, GALAXY, SATURATED, etc.
    4646    pmSourceRoughClass (sources, config, psfClump);
     47
     48    // optional dump of all rough source data
     49    char *output = psMetadataLookupPtr (&status, config, "MOMENTS_OUTPUT_FILE");
     50    if (status && (output != NULL) && (output[0]))
     51    {
     52      pmMomentsWriteText (sources, output);
     53      psFree (output);
     54    }
    4755    if (!strcasecmp (breakPt, "CLASS")) exit (0);
    4856
     57    // mark blended peaks PS_SOURCE_BLEND
    4958    psphotBasicDeblend (sources, config, sky);
    5059    if (!strcasecmp (breakPt, "DEBLEND")) exit (0);
     
    5766    if (!strcasecmp (breakPt, "PSFFIT")) exit (0);
    5867
     68    // XXX add this as conditional output
     69    psphotSamplePSFs (psf, imdata->image);
     70
    5971    int FITMODE = psMetadataLookupS32 (&status, config, "FIT_MODE");
    6072    if (!status) FITMODE = 2;
    6173
    6274    switch (FITMODE) {
    63       case -2:
     75      case 0:
    6476        psphotEnsemblePSF (imdata, config, sources, psf, sky);
    65         psphotReapplyPSF (imdata, config, sources, psf, sky);
    66         break;
    67 
    68       case -1:
    69         psphotEnsemblePSF (imdata, config, sources, psf, sky);
    70         break;
    71 
    72       case 0:
    73         psphotFixedPSF (imdata, config, sources, psf, sky);
     77        sources = psArraySort (sources, psphotSortBySN);
     78        psphotFullFit (imdata, config, sources, psf, sky);
     79//      psphotReplaceUnfit (sources);
    7480        break;
    7581
    7682      case 1:
    77         // test PSF on all except SATURATE and DEFECT (artifacts)
     83        // fit extended objects with galaxy models
    7884        psphotApplyPSF (imdata, config, sources, psf, sky);
     85        psphotFitGalaxies (imdata, config, sources, sky);
    7986        break;
    8087
     
    8289        // fit extended objects with galaxy models
    8390        psphotApplyPSF (imdata, config, sources, psf, sky);
    84         psphotFitGalaxies (imdata, config, sources, sky);
    8591        break;
    8692
Note: See TracChangeset for help on using the changeset viewer.