IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 12, 2005, 3:49:21 PM (21 years ago)
Author:
eugene
Message:

rework with masks and noise array

File:
1 edited

Legend:

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

    r4215 r4216  
    11# include "psphot.h"
    2 void dump_image (psImage *image, char *filename);
    32
    43int main (int argc, char **argv) {
     
    3231
    3332    // use stellar objects SN > PSF_SN_LIM
    34     psf = choose_psf_model (image, config, sources);
     33    psf = choose_psf_model (imdata, config, sources);
    3534
    3635    if (0) {
    37       psImage *zap = psImageAlloc (image->numCols, image->numRows, PS_TYPE_F32);
     36      psImage *zap = psImageAlloc (imdata->image->numCols, imdata->image->numRows, PS_TYPE_F32);
    3837      psImageInit (zap, 0);
    3938      find_defects (zap, sources, config, psf);
    40       dump_image (zap, argv[2]);
     39      DumpImage (zap, argv[2]);
    4140      exit (0);
    4241    }
    4342
    4443    // test PSF on all except SATURATE and DEFECT (artifacts)
    45     apply_psf_model (image, config, sources, psf, sky);
     44    apply_psf_model (imdata, config, sources, psf, sky);
    4645
    4746    // XXX this test compares dSx,dSy distribution with model.
     
    4948    // test_psf_scatter (sources);
    5049
    51     // fit_galaxies (image, config, sources);
     50    // fit_galaxies (imdata, config, sources);
    5251
    5352    // subtract_galaxies (sources, config);
    5453 
    55     dump_image (image, argv[2]);
     54    DumpImage (imdata->image, argv[2]);
    5655    DumpModelPSF (sources, "sources.dat");
    5756    exit (0);
    5857}
    59 
    60 void dump_image (psImage *image, char *filename) {
    61 
    62     unlink (filename);
    63     psFits *fits = psFitsAlloc (filename);
    64     psFitsWriteImage (fits, NULL, image, 0, NULL);
    65     psFree (fits);
    66     return;
    67 }
    68 
Note: See TracChangeset for help on using the changeset viewer.