MFILTERS -- Package of MEDIAN/MODAL Filtering Tasks The mfilters package contains a set of routines for median/modal filtering images using a variety of techniques. The box median/modal filters all have two new parameters zloreject and zhireject that can be used to eliminate data outside a given data range from the median/mode computations. The ring median/modal filters are new. A list of the eight tasks in the package is shown below. fmedian - Quantize and box median filter a list of 1D or 2D images fmode - Quantize and box modal filter a list of 1D or 2D images frmedian - Quantize and ring median filter a list of 1D or 2D images frmode - Quantize and ring modal filter a list of 1D or 2D images median - Median box filter a list of 1D or 2D images mode - Modal box filter a list of 1D or 2D images rmedian - Ring median filter a list of 1D or 2D images rmode - Ring modal filter a list of 1D or 2D images All eight task will become part of the IMAGES package when IRAF 2.11 is released. RELEASE INFORMATION =============================================================================== First archive release: Nov 28, 1995 =============================================================================== Archive release: Feb 1, 1996 Updated the reference to J. Secker's paper on ring median filters from (PASP, in press) to (PASP 107, 496-501). =============================================================================== Archive release: July 18, 1996 The routine mde_yefilter in the file median.x was being called with the wrong number (too many) arguments. =============================================================================== INSTALLATION INSTRUCTIONS FOR THE MFILTERS PACKAGE The installation instructions that follow assume that you have copied the tar format MFILTERS archive onto your host machine. The method you use to copy the file (or remotely access the tar file) is OS dependent and is not discussed in this document. If you have any questions, please contact the author at davis@noao.edu or the IRAF group at iraf@noao.edu, NOAO::IRAF (5355::IRAF) or call the IRAF HOTLINE at 520-318-8160. [1] The package is distributed as a tar archive; IRAF is distributed with a tar reader. The tar archive may be obtained by magnetic tape or anonymous ftp. For magnetic tape go to step [2] and when reading the tar archive simply mount the tape and use the tape device name for the archive name in step [4]. To obtain the package via ftp (assuming a UNIX computer): % ftp iraf.noao.edu (140.252.1.1) login: anonymous password: [your email address] ftp> cd iraf/extern ftp> get mfilters.readme ftp> binary ftp> get mfilters.tar.Z ftp> quit % uncompress mfilters.tar The mfilters.readme file contains these instructions. Special arrangements can be made for sites that don't have access to internet but could copy the uncompressed archive over SPAN. [2] Create a directory to contain the MFILTERS external package files. This directory should be outside the IRAF directory tree and must be owned by the IRAF account. In the following examples, this root directory is named usr1:[mfilters] (VMS) or /local/mfilters/ (UNIX). Make the appropriate file name substitutions for your site. [3] Log in as IRAF and edit the extern.pkg file in the hlib$ directory to define the package to the CL. From the IRAF account, outside the CL, you can move to this directory with the commands: $ set def irafhlib # VMS example % cd $hlib # UNIX example Define the environment variable mfilters to be the pathname to the mfilters root directory. The '$' character must be escaped in the VMS pathname; UNIX pathnames must be terminated with a '/'. Edit extern.pkg to include: reset mfilters = usr\$1:[mfilters] # VMS example reset mfilters = /local/mfilters/ # UNIX example task $mfilters.pkg = mfilters$mfilters.cl Near the end of the hlib$extern.pkg file, update the definition of helpdb so it includes the mfilters help database, copying the syntax already used in the string. Add this line before the line containing a closing quote: ,mfilters$lib/helpdb.mip\ NOTE: In IRAF V2.8 the length of the helpdb string cannot exceede 160 characters. A helpdb string longer than 160 characters will cause the CL startup process to fail. [4] Log into the CL from the IRAF account and unpack the archive file. Change directories to the mfilters root directory created above and use 'rtar': cl> cd mfilters cl> softools cl> rtar -xrf where is the host name of the archive file or the IRAF tape device for tape distributions. On VMS systems, an error message will appear ("Copy 'bin.generic' to './bin fails") which can be ignored. Also on VMS systems, the four bin.'mach' directories created by rtar under [mfilters.bin] can be deleted. UNIX sites should leave the symbolic link 'bin' in the MFILTERS root directory pointing to 'bin.generic' but can delete any of the bin.`mach' directories that won't be used. The archive file can be deleted once the package has been successfully installed. [5] When the archive has been unpacked, build the MFILTERS package executable. The compilation and linking of the MFILTERS package is done using the following command: cl> mkpkg -p mfilters update >& mfilters.spool & NOTE: On systems that concurrently support different architectures (e.g., Suns, Convex), you must configure the system for the desired architecture before issuing the above command. SUN/IRAF sites must execute a pair of 'mkpkg' commands for each supported architecture type. The Unix environment variable IRAFARCH must be set as well before compiling. For example: # Assuming IRAFARCH is set to ffpa cl> mkpkg -p mfilters ffpa cl> mkpkg -p mfilters update >& mfilters.ffpa & cl> mkpkg -p mfilters f68881 # Now reset IRAFARCH to f68881 before continuing cl> mkpkg -p mfilters update >& mfilters.f68881 & The spool file(s) should be reviewed upon completion to make sure there were no errors.