IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 6, 2005, 11:20:45 PM (21 years ago)
Author:
eugene
Message:

further basic concepts

Location:
trunk/psphot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot

    • Property svn:ignore set to
      bin
  • trunk/psphot/src/psphot.c

    r4115 r4129  
    11# include "psphot.h"
     2void dump_image (psImage *image, char *filename);
    23
    34int main (int argc, char **argv) {
     
    3334    psf = choose_psf_model (image, config, sources);
    3435
     36    psImage *zap = psImageAlloc (image->numCols, image->numRows, PS_TYPE_F32);
     37    psImageInit (zap, 0);
     38    find_defects (zap, sources, config, psf);
     39    dump_image (zap, argv[2]);
     40    exit (0);
     41
    3542    // test PSF on all except SATURATE and DEFECT (artifacts)
    3643    apply_psf_model (image, config, sources, psf, sky);
     
    4451    // subtract_galaxies (sources, config);
    4552 
    46     // write out subtracted image
    47     unlink (argv[2]);
    48     psFits *fits = psFitsAlloc (argv[2]);
    49     psFitsWriteImage (fits, NULL, image, 0, NULL);
    50     psFree (fits);
    51 
     53    dump_image (image, argv[2]);
    5254    DumpModelPSF (sources, "sources.dat");
    5355    exit (0);
     
    5961    exit (2);
    6062}
     63
     64void dump_image (psImage *image, char *filename) {
     65
     66    unlink (filename);
     67    psFits *fits = psFitsAlloc (filename);
     68    psFitsWriteImage (fits, NULL, image, 0, NULL);
     69    psFree (fits);
     70    return;
     71}
     72
Note: See TracChangeset for help on using the changeset viewer.