IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 19, 2006, 2:55:33 PM (21 years ago)
Author:
eugene
Message:

adapted everything to work with pmReadout *readout instead of eamReadout *imdata

File:
1 edited

Legend:

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

    r5993 r6056  
    55
    66    psMetadata  *config  = NULL;
    7     eamReadout  *imdata  = NULL;
     7    psMetadata  *header  = NULL;
     8    pmReadout   *readout  = NULL;
    89    psArray     *sources = NULL;
    910    psArray     *peaks   = NULL;
     
    1819
    1920    // load input data (config and images (signal, noise, mask)
    20     imdata = psphotSetup (config);
     21    readout = psphotSetup (config, &header);
    2122
    2223    // run a single-model test if desired
    23     psphotModelTest (imdata, config);
     24    psphotModelTest (readout, config);
    2425
    2526    // measure image stats for initial guess
    26     sky = psphotImageStats (imdata, config);
     27    sky = psphotImageStats (readout, config);
    2728
    2829    // generate a background model (currently, 2D polynomial)
    2930    // XXX this should be available to be re-added to the original image
    30     psphotImageBackground (imdata, config, sky);
     31    psphotImageBackground (readout, config, sky);
    3132
    3233    // find the peaks in the image
    33     peaks = psphotFindPeaks (imdata, config, sky);
     34    peaks = psphotFindPeaks (readout, config, sky);
    3435
    3536    // construct sources and measure basic stats
    36     sources = psphotSourceStats (imdata, config, peaks);
     37    sources = psphotSourceStats (readout, config, peaks);
    3738
    3839    // classify sources based on moments, brightness
     
    4950    switch (FITMODE) {
    5051      case 0:
    51         psphotEnsemblePSF (imdata, config, sources, psf, sky);
     52        psphotEnsemblePSF (readout, config, sources, psf, sky);
    5253        break;
    5354
    5455      case 1:
    55         psphotEnsemblePSF (imdata, config, sources, psf, sky);
    56         psphotFullFit (imdata, config, sources, psf, sky);
     56        psphotEnsemblePSF (readout, config, sources, psf, sky);
     57        psphotFullFit (readout, config, sources, psf, sky);
    5758        psphotReplaceUnfit (sources);
    58         psphotApResid (imdata, sources, config, psf);
     59        psphotApResid (readout, sources, config, psf);
    5960        break;
    6061
    6162      case 2:
    62         psphotEnsemblePSF (imdata, config, sources, psf, sky);
    63         psphotBlendFit (imdata, config, sources, psf, sky);
     63        psphotEnsemblePSF (readout, config, sources, psf, sky);
     64        psphotBlendFit (readout, config, sources, psf, sky);
    6465        psphotReplaceUnfit (sources);
    65         psphotApResid (imdata, sources, config, psf);
     66        psphotApResid (readout, sources, config, psf);
    6667        break;
    6768
    6869      case 3:
    69         psphotApplyPSF (imdata, config, sources, psf, sky);
     70        psphotApplyPSF (readout, config, sources, psf, sky);
    7071        break;
    7172
    7273      case 4:
    73         psphotApplyPSF (imdata, config, sources, psf, sky);
    74         psphotFitExtended (imdata, config, sources, sky);
     74        psphotApplyPSF (readout, config, sources, psf, sky);
     75        psphotFitExtended (readout, config, sources, sky);
    7576        break;
    7677    }
    7778
    7879    // write out data in appropriate format
    79     psphotOutput (imdata, config, sources, psf, sky);
     80    psphotOutput (readout, header, config, sources, psf, sky);
    8081    psLogMsg ("psphot", 3, "wrote output: %f sec\n", psTimerMark ("psphot"));
    8182    psLogMsg ("psphot", 3, "complete psphot run: %f sec\n", psTimerMark ("complete"));
Note: See TracChangeset for help on using the changeset viewer.