                                  SOFTWARE PATCH 
                                      v. 0.9
                           written by Andrea La Camera
                      (DIBRIS, University of Genova, Italy)
                                  October 2014



Software PATCH is an IDL software developed for the deconvolution of 
mono-pupil images with space-variant point-spread functions (PSFs). The input 
image is decomposed in partially overlapping sub-domains, the size of which will
 depend on the properties of the PSF. 

The reconstruction is obtained by applying a deconvolution method with boundary 
effects compensation to each sub-domain. The final object is formed by a mosaic 
of the partial reconstructed images, after the removal of the common parts of 
adjacent sub-domains.

Two algorithms are available: the well-known Richardson-Lucy and
the Scaled Gradient Projection (SGP) developed by S. Bonettini et al. 

More information and a tutorial can be found on 
http://www.airyproject.eu/Tutorials/Patch/




-----------------------------
REQUIREMENTS OF THE SOFTWARE:
-----------------------------
-  IDL version 7.0 (tested on 7.0, not guaranteed for IDL 8.0) 
-  IDL Astronomy User's Library (downloadable from 
   http://idlastro.gsfc.nasa.gov/homepage.html)
    
--------------------------
INSTALLATION INSTRUCTIONS:
--------------------------

1 - Extract the archive "patch.zip" somewhere in your machine; for 
    instance, you can extract on your desktop. Depending on your OS, you will have: 
    - C:\Documents and Settings\andrea\Desktop\
    - /Users/andrea/Desktop/
    - /home/andrea/Desktop/
    
    The main directory "PATCH" contains the main program 
    ("patch.pro"), a sub-folder for your data and two sub-folders 
    containing the library and the setup files. The main folder is organized as 
    follows:
    [path_on_your_OS]/Patch
      | - Patch_data
      | - Patch_lib
      | - Patch_setup
      patch.pro
      README.txt (this file)
   
2a - UNIX/LINUX/MACOsX case: 
  i) Open the subfolder "Patch_setup" and edit 
     the "patch_env.sh", fixing the path of the idl_startup file.
     Then edit the "patch_startup.pro" file and fix the path of your 
     working directories (PATCH, astrolib and, if you like, other folders 
     such as your Desktop, a tmp folder, etc.).
 ii) Open your terminal and type:
       $ source your_path_where_patch_is/Patch_setup/patch_env.sh
iii) launch IDL. Note that every time you want to launch the "PATCH" 
     program from a new terminal session, you have to perform both step ii) and 
     iii). 
    
[Suggested] Edit your .bashrc (or your shell's configuration file) and add an 
     alias for PATCH. For example, you can create an alias called "patch":
     alias patch='source /home/andrea/patch/patch_setup/patch_env.sh ; idl'   
     In such a way, you can skip both ii) and iii) steps and launch directly
     Software PATCH by typing the "patch" command at your terminal prompt.  
      
      
2b - WINDOWS case (IDL Workbench case): 
  i) You can delete the "patch_env.sh" file. 
 ii) Then set the paths and the startup file in the IDL preferences 
     (Window->Preferences->IDL):
      - add the "Patch" main folder to path and include subfolders;
      - add the "astrolib" main folder to path and include subfolders;
      - add the "Patch" main folder to help-path and include subfolders;
      - set the "patch_startup.pro" file as IDL startup file.
iii) Click on "Apply" and reset your IDL session (or exit and re-launch IDL).

3 - Type "patch" at the IDL prompt to launch the Graphical User Interface 
    (GUI) of the program.


---
Last update: 2014-10-16
Andrea La Camera (DIBRIS) [andrea.lacamera@unige.it]
