Changeset 6715 for trunk/psphot/src/psphotImageMedian.c
- Timestamp:
- Mar 27, 2006, 4:31:17 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotImageMedian.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotImageMedian.c
r6571 r6715 11 11 // generate the median in NxN boxes, clipping heavily 12 12 // linear interpolation to generate full-scale model 13 psImage *psphotImageMedian (psMetadata*config, pmFPAview *view)13 bool psphotImageMedian (pmConfig *config, pmFPAview *view) 14 14 { 15 15 bool status; … … 21 21 // find the currently selected readout 22 22 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, "PSPHOT"); 23 pmFPA *input= psMetadataLookupPtr (&status, config->files, "PSPHOT.INPUT");24 pmReadout *readout = pmFPAviewThisReadout (view, input );23 pmFPAfile *input = psMetadataLookupPtr (&status, config->files, "PSPHOT.INPUT"); 24 pmReadout *readout = pmFPAviewThisReadout (view, input->fpa); 25 25 26 26 psImage *image = readout->image; … … 28 28 29 29 rnd = psRandomAlloc (PS_RANDOM_TAUS, 0); 30 MAX_SAMPLE_PIXELS = psMetadataLookupF32 (&status, config, "IMSTATS_NPIX");30 MAX_SAMPLE_PIXELS = psMetadataLookupF32 (&status, recipe, "IMSTATS_NPIX"); 31 31 if (!status) MAX_SAMPLE_PIXELS = 1000; 32 32 … … 36 36 37 37 // scaling factor 38 int DX = psMetadataLookupS32 (&status, config, "BACKGROUND_XBIN");38 int DX = psMetadataLookupS32 (&status, recipe, "BACKGROUND_XBIN"); 39 39 if (!status) {DX = 64;} 40 int DY = psMetadataLookupS32 (&status, config, "BACKGROUND_YBIN");40 int DY = psMetadataLookupS32 (&status, recipe, "BACKGROUND_YBIN"); 41 41 if (!status) {DY = 64;} 42 42 … … 79 79 80 80 // select background pixels, from output background file, or create 81 background = pmFPAfileReadoutImage (config->files, view, "PSPHOT.BACKGND", Nx, Ny, PS_TYPE_F32);81 psImage *background = pmFPAfileReadoutImage (config->files, view, "PSPHOT.BACKGND", Nx, Ny, PS_TYPE_F32); 82 82 83 83 // XXX this code skips the initial pixels … … 212 212 213 213 // back-sub image pixels, from output background file (don't create if not requested) 214 backSub = pmFPAfileReadoutImage (config->files, view, "PSPHOT.BACKSUB", 0, 0, PS_TYPE_F32);214 psImage *backSub = pmFPAfileReadoutImage (config->files, view, "PSPHOT.BACKSUB", 0, 0, PS_TYPE_F32); 215 215 216 216 // subtract the background model
Note:
See TracChangeset
for help on using the changeset viewer.
