IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 11, 2006, 5:27:13 PM (20 years ago)
Author:
eugene
Message:

major revisions to use the new pmFPAfile,view I/O handling

File:
1 edited

Legend:

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

    r6481 r6571  
    11# include "psphot.h"
    22
    3 // generate the median in NxN boxes, clipping heavily
    4 // linear interpolation to generate full-scale model
    5 bool psphotSkyReplace (pmReadout *readout, psImage *background) {
     3// in order to  successfully replace the sky, we must define a corresponding file...
     4bool psphotSkyReplace (psMetadata *config, pmFPAview *view) {
    65
     6    // find the currently selected readout
     7    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, "PSPHOT");
     8    pmFPA *input = psMetadataLookupPtr (&status, config->files, "PSPHOT.INPUT");
     9    pmReadout  *readout = pmFPAviewThisReadout (view, input);
     10
     11    // select the corresponding images
    712    psImage *image = readout->image;
    813    psImage *mask  = readout->mask;
     14
     15    // select background pixels, from output background file, or create
     16    background = pmFPAfileReadoutImage (config->files, view, "PSPHOT.BACKGND", 0, 0, PS_TYPE_F32);
     17    if (background == NULL) {
     18        return false;
     19    }
    920
    1021    // replace the background model
     
    1728    }
    1829   
     30    psFree (background);
    1931    return true;
    2032}
Note: See TracChangeset for help on using the changeset viewer.