REDUCEME home pageREDUCEME home page

Installation

Requirements

Before you install REDUCEME, make sure that PGPLOT (version 5.1.0 or above) is already installed in your system. If this is not the case, you can download PGPLOT from here.

The REDUCEME program writefits is compiled only if the library FITSIO is also available in your computer (otherwise the installation procedure will skip it). If you are planning to use this program, download FITSIO from here.


Installation

To install REDUCEME in your computer, you must complete the following steps:
  1. Download the compressed distribution tar file: reduceme_v4_2_03.tar.gz

  2. Create the directory where REDUCEME will be installed, e.g.
         % cd /usr/local
         % mkdir reduceme
         
  3. Make this new directory your current directory and copy there the distribution tar file
         % cd reduceme
         % mv /scratch/xxx/reduceme_v4_?_??.tar.gz .
         
  4. Decompress the gziped file
         % gunzip reduceme_v4_?_??.tar.gz
         
  5. Extract the contents of the tar file
         % tar xvf reduceme_v4_?_??.tar
         
    In this stage, the following files and subdirectories must be created:
    files: create_c, create_flibrary, create_pgp, create_pgpdirect, create_reduceme, gnu-public-license.txt
    directories: bin, button, files, fspec, futils, help, red, specials

  6. Move to the directory labelled red, edit the file redlib.inc and set the parameters NSMAX and NCMAX to the maximum expected number of scans (pixels in the spatial direction) and channels (pixels in the wavelength direction), respectively. Unfortunately, the standard FORTRAN 77 does not allow dynamic array redimension. For this reason, we are forced to declared these two parameters, which are employed in all the programs. If these parameters need to be changed, all the programs must be recompiled. E.g.
         % cd red
         % vi redlib.inc   (...NSMAX=1024  ...NCMAX=1024 ...wq!)
         
  7. Return to the previous directory
         % cd ..
         
  8. Execute the script file create_reduceme, supplying 3 arguments (excute create_reduceme without any argument to see some examples of argument choices)
         % ./create_reduceme gfortran gcc /usr/X11R6/lib
         
    The first and second arguments are the FORTRAN and C compilers, respectively. The third argument is the directory where the library libX11.a can be found.


Environment settings

The final step to start working with REDUCEME is to define the location of REDUCEME
% setenv reduceme_dir /usr/local/reduceme
and to update the user's path
% set path=($reduceme_dir/bin $path)
It is also very useful to define a default graphic output for PGPLOT (if this default is not alredy set), e.g.
% setenv PGPLOT_DEV /XSERVE


Tuning individual programs

If you want to modify any program and recompile it (without having to recompile the whole REDUCEME package), this is something very easy to do. Move to the src directory
% cd $reduceme_dir/src
I suggest you to preserve the original REDUCEME file and use a different name for the modified version of the program, e.g.
% cp adnsc.f adnsc_modified.f
Then, you can edit and modify the program as you wish
% vi adnsc_modified.f   (...wq!)
From the same directory, you can execute the following script
% ../create_pgpdirect adnsc_modified.f gfortran /usr/X11R6/lib
The script compiles the modified fortran program, and places the executable file in the subdirectory $reduceme_dir/bin.

Finally execute

% rehash
for the new binary file to be accesible from any place.

REDUCEME home pageREDUCEME home page