(1) Contents
------------

This tarball contains the codes MaskMap and PSFHomTest described in the
publication Gruen, Seitz and Bernstein (2014), PASP. 

(2) Installation
----------------

- make sure you have installed the fftw3, tmv, cfitsio, CCfits, blas, lapack
  libraries
- edit the Makefile to make sure the compiler, header and library paths are 
  correctly set
- run 'make' to build

(3) Use
-------

You can run both MaskMap and PSFHomTest by entering configuration parameters on
the command line (ending with Ctrl+D) or piping a configuration file 
	./MaskMap < your.config 

Default configurations are given below.

(3a) MaskMap configuration
--------------------------

#parameter    default value       description
outliers    = clipped.tab         ;outlier list as producted by SWarp
stackhead   = stack.head          ;WCS header of stack, ASCII format
headlist    = headlist.tab        ;list of single frame headers (in same order as input to SWarp)
mask        = mask.conf           ;file with mask definitions in format THRESHOLD_COUNT THRESHOLD_LEVEL[sigma] BOX_WIDTH
masksuffix  = .mask.fits          ;suffix for mask files
xsize       = 2048                ;x size of single frames
ysize       = 4096                ;y size of single frames

(3b) PSFHomTest configuration
-----------------------------

#parameter    default value       description
flux        = 1000                ;total flux of star in units of background noise rms
gain        = 0                   ;typical product of gain and background noise rms for single frames; 
				  ;0 to assume infinite gain (no object-dependent shot noise), which is conservative for this test
stackhead   = stack.head          ;WCS header of stack, ASCII format
headlist    = headlist.tab        ;list of single frame headers (in same order as input to SWarp)
psflist     = psflist.tab         ;list of single frame PSFEx models (in same order as input to SWarp)
x           = 1000                ;x position in stack at which PSF homogeneity is tested
y           = 1000                ;y position in stack at which PSF homogeneity is tested


(4) Contact information
-----------------------

If you have difficulties installing, configuring and running the code, feel
free to contact <dgruen@usm.uni-muenchen.de>.
