diff --git a/README b/README
new file mode 100644
index 0000000000000000000000000000000000000000..b3000b3d87d825d6f6c35bc23bdcb2373a09dd6b
--- /dev/null
+++ b/README
@@ -0,0 +1,156 @@
+Adaptsmooth V.2.7.1 15.11.2010 by Stefano Zibetti (MPIA&DARK)
+Usage: adaptsmooth -p|b|l|m [-a] [-r RMS_SKY] [-G EFFECTIVE_GAIN]
+[-s SN] [-L L] [-c SLCUT] input_image output_image mask
+       -p : noise mode: poisson+background
+       -b : noise mode: background-dominated
+       -l : noise mode: local
+       -m : switch to input-mask mode
+       -a : use arithmetic mean instead of median
+       -r RMS_SKY (requested in poisson+bkg and bkg-dominated noise mode)
+       -G EFFECTIVE_GAIN : e- per ADU (requested in poisson+bkg mode)
+       -s SN : minimum S/N requested (defaults to 20.0)
+       -L L : maximum smoothing radius (defaults to max=27)
+       -c SLCUT : smoothing level cut
+          0: no exclusions; 1: exclude first level (1pix scale) from all others;
+          N<0: exclude up to the (-N)th level below current. Defaults to 0
+
+
+
+adaptsmooth adaptively smooths images by replacing each pixel in the
+input image with an average (median or mean) of the pixels in a
+surrounding region of radius R, a.k.a. "smoothing level" L. L is
+varied on a pixel-by-pixel base to allow the smoothed image to reach a
+give S/N, or, in alternative, based on a pre-computed mask.
+
+I M P O R T A N T : The input image is assumed to be
+*background-subtracted*.
+
+For general information about the algorithms and the code please refer
+to the "paper". Here you can find a quick manual.
+
+-- Getting and installing the code
+
+You can get the code package adaptsmooth.tgz from this "URL" or by
+requesting it directly to the author zibetti@mpia.de.
+
+Before installing the code check that you have the CFITSIO library
+installed (http://heasarc.nasa.gov/fitsio/). 
+
+To install the code follow these steps:
+cd to your preferred installation directory
+tar -zxf adaptsmooth.tgz
+cd adaptsmooth_current_distr
+edit the Makefile to specify:
+     BINDIR directory where the adaptsmooth executable will be
+     CFITSIO_LFLAG directory where the libcfitsio.a is located
+     CFITSIO_IFLAG directory where the fitsio*.h files are located
+run "make adaptsmooth"
+done!
+Make sure that $BINDIR is in your executable PATH
+
+-- Note on fits file i/o
+adaptsmooth assumes images are in the primary HDU of the fits files.
+adaptsmooth takes as input image any numeric format (integer or float,
+single or double precision) and internally converts it to
+single-precision floating point. The output image is always a
+single-precision float. The output mask is short-integer type. When
+the mask is input, only integer types are accepted.
+
+All header information in the input image is propagated to the output
+image (and mask if the case), with the addition of the history and all
+relevant parameters of adapthsmooth-ing.
+
+Overwriting of output file is not allowed in the current version.
+
+-- Running the code
+adaptsmooth runs from command line.
+
+Just issuing "adaptsmooth" returns a summary of the usage (reported at
+the beginning of this document).
+
+Here is a more in-depth explanation of the usage and available
+options.
+
+adaptsmooth always requires a mode option (p|b|l|m), an input fits
+image, a name for the output image and one for the smoothing mask,
+which contains the smoothing level at each position.
+
+Mode options p|b|l specify that the program determines the smoothing
+to be applied based on different noise estimates in the input image
+itself: in p mode poisson+background noise is assumed, in b
+background-dominated noise, in l mode noise is given by the local
+rms. At each pixel, the smoothing is iteratively increased until the
+requested S/N or the maximum smoothing level is reached. In this
+second case, the underflow value -1e10 is output into the image and
+100 is written in the smoothing mask.
+
+Mode option m tells adaptsmooth to smooth according the smoothing
+mask, given as input.
+
+p mode requires background rms noise (-r parameter) and the effective
+gain, i.e. the number of photoelectrons per ADU (-G parameter) to be
+specified.
+
+b mode requires background rms noise (-r parameter)
+
+l mode does not require any further option, as well as m mode
+
+Images are meant to be standard fits images. Pixels are always assumed
+to be in the primary extension. The input image can be any numeric
+type, although internal conversion to single precision float is
+applied. The output image is single precision float. As for the mask,
+in input-mask mode it must be any integer type, in output is
+short-integer.
+
+--Optional parameters
+
+-s : specifies the minimum S/N to reach at each pixel (default is 20).
+-L : specifies the maximum smoothing level that can be reached
+     (default is the maximum allowed by the code, i.e. 27)
+-a : specifies to use the arithmetic mean instead of the median
+     (default) as average
+-c : specifies the smoothing level cut (default is 0, i.e. no cuts)
+
+"Smoothing level cuts" can be useful to avoid bright localized sources
+to contaminate the surroundings. See the "paper" for more details.
+   -c 0 (default) means no exclusions 
+   -c 1 excludes all pixels that are individually above the S/N
+      threshold, that therefore do not contribute to smoothed levels
+   -c N (N<0) exclude all pixels that are up to -N levels below the
+      current.
+
+
+
+--Examples:
+
+a) smooth an image with background-dominated noise rms=2.4, to a
+minimum S/N of 10.0, up to a max smoothing level of 10 (no pixel
+exclusion):
+
+adaptsmooth -b -r 2.4 -s 10.0 -L 10 image.fits image_smooth.fits image_mask.fits
+
+b) smooth an image assuming poisson+background noise, rms=2.4 and
+effective gain=5.2 e-/ADU, to a minimum S/N of 10.0, up to a max
+smoothing level of 10 (no pixel exclusion):
+
+adaptsmooth -p -r 2.4 -G 5.2 -s 10.0 -L 10 image.fits image_smooth.fits image_mask.fits
+
+c) smooth an image with rms noise determined locally, to a minimum S/N of
+10.0, up to a max smoothing level of 10 (no pixel exclusion):
+
+adaptsmooth -l -s 10.0 -L 10 image.fits image_smooth.fits image_mask.fits
+
+d) smooth an image according to a pre-computed mask (no pixel exclusion):
+
+adaptsmooth -m image.fits image_smooth.fits image_mask.fits
+
+e) smooth an image with rms noise determined locally, to a minimum S/N
+of 10.0, up to a max smoothing level of 10, excluding pixels whose
+smoothing level is lower by 2 wrt the current level:
+
+adaptsmooth -l -s 10.0 -L 10 -c 2 image.fits image_smooth.fits
+image_mask.fits
+
+f) as a) but using average instead of median:
+
+adaptsmooth -b -a -r 2.4 -s 10.0 -L 10 image.fits image_smooth.fits image_mask.fits