>  Docs Center  >  Libraries  >  Buie  >  MEDARR_MWB
Libraries

MEDARR_MWB

MEDARR_MWB

Name


medarr_mwb

Purpose (one Line)


Combine arrays with a median average.

Description


      This will combine a series of arrays into a single array by filling each
      pixel in the output array with the median of the corresponding pixels
      in the input arrays.

Category


CCD data processing

Calling Sequence


      medarr_mwb, inarr, outarr

Inputs


      inarr -- A three dimensional array containing the input arrays to
                combine together. Each of the input arrays must be two
                dimensional and must have the same dimensions. These arrays
                should then be stacked together into a single 3-D array,
                creating INARR.

Optional Input Parameters


None.

Keyword Input Parameters


  NTOPCLIP - If supplied, indicates how many of the brightest points in
                each pixel to remove before calculating the median.
                (default=0). Warning: this may not play nice with
                an input badmask.

Keyword Parameters


    BAD- a badmask, an byte or integer array with the dimensions of inarr.
      Non-zero values will correspond to pixels NOT to be included in the
      median stack. If all pixels for a stack are deleted, the corresponding
      position of the output array is zero.
 

Outputs


      outarr -- The output array. It will have dimensions equal to the
                first two dimensions of the input array. The type of the
                output is always floating point.

Common Blocks


None.

Side Effects


None.

Restrictions


This will run VERY slow if inarr and outarr won't fit into real memory
on your computer. Don't try this using virtual memory.

Procedure


      The output array is created and then each pixel is extracted from the
cube. Once extracted, the pixel stack is sorted and the middle value
is put into the output array.

Modification History


Written by Marc W. Buie, Lowell Observatory, 1992 Jan 17
  2000/11/19, MWB, renamed to avoid name conflict with Astron library
  2007/09/07, MWB & PLC, added BAD keyword support
  2011/12/12, MWB, modified to add NTOPCLIP keyword



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us