1. Installation & Configuration

1.1. Requirements and Supported Platforms

1.1.1. System Requirements

  • 64-bit Intel/AMD processor (x86_64)

  • 64-bit Linux (glibc ≥ 2.12) or Mac OS X (≥ 10.7)

  • BASH or ZSH as your default shell environment (T/CSH is NOT supported)

1.1.2. Software Requirements

Because PAPI is written mostly in Python and ANSI C, it can run on any platform that has the required Python modules and GCC compilier. However, it has been developed and deeply tested under openSuSE 15.4 and Ubuntu 19.1 x86_64 Linux OS. Python 3.7.x or higher and the following packages are required:

The above packages are automatically included in the Anaconda3 package, and then you do not need to install them manually. However, next tools need to be installed by the user following the instructions included in each package:

Additional packages are optionally required:
  • sphinx to build the documentation

Note

If you are using a SCAMP version <= 2.0.4 (lastest stable version), then you need to install the CDSClient. Otherwise, if you are using SCAMP version > 2.0.4, then you need libcurl.

Anycase, if you are behind a proxy, you need to set the proxy server in your system:

http_proxy=http//your_proxy:your_port; export http_proxy

1.2. Download

The latest stable version of PAPI can be downloaded from GitHub repository .

1.3. Environment Installation

The PAPI package can be installed into a virtualenv or Conda (prefered) environment manager via pip. We recommend a fresh environment with only python installed. Via Conda:

  1. Install Anaconda3 (for Python 3.7), which include Conda manager:

    $ sh Anaconda3-2022.05-Linux-x86_64.sh
    
  2. Create environment (papienv) and install PyRAF:

    $ conda create -n papienv python=3.7
    $ conda config --add channels http://ssb.stsci.edu/astroconda
    $ conda activate papienv
    $ conda install python=3.7 iraf-all pyraf-all
    

Warning

Due to Python 3.x incompatibilities present in several tasks, STScI recommends to install IRAF alongside Python 2.7. However, PAPI is implemented for Python3, and no problems was found by the moment.

After the installation is complete go ahead and activate the “papienv” environment. This command only needs to be executed one time per terminal session:

$ conda activate  papienv
  1. Install other Python staff:

    $ conda install -c astropy ccdproc==2
    $ pip install montage_wrapper
    $ pip install sphinx_rtd_theme
    
  2. Install Third Party tools:

First we need to install next modules required for those third party tools:

   $ sudo zypper install libXmu6-32bit libncurses5-32bit
   (for IRAF 32-bit compatibility)
   $ sudo zypper install libXt-devel libnsl-devel cfitsio-devel
   $ sudo zypper install python2-devel
   (required for astrometry.net)


Montage
'''''''

   $ mkdir /home/panic/Software/PAPI/; cd /home/panic/Software/PAPI/
   $ wget https://irsa.ipac.caltech.edu/Montage/download/Montage_v3.3.tar.gz
   $ tar -xvzf Montage_v3.3.tar.gz
   $ cd Montage_v3.3
   $ make
   $ export PATH=$PATH:/home/panic/Software/PAPI/Montage_v3.3/bin

DS9
'''

   $ wget http://ds9.si.edu/download/opensuse15/ds9.opensuse15.8.1.tar.gz
   $ tar -xvzf ds9.opensuse15.8.1.tar.gz
   $ cp ds9 /usr/local/bin/

 XPA
 '''

   $ git clone https://github.com/ericmandel/xpa.git
   $ ./configure
   $ make install

 Astrometry.net
 ''''''''''''''

   $ wget http://astrometry.net/downloads/astrometry.net-latest.tar.gz
   $ tar -xvzf
   $ cd astrometry.net
   $ make install
   $ export PATH=$PATH:/usr/local/astrometry/bin/

And then download and copy the 42xx index files from:

wget http://broiler.astrometry.net/~dstn/4200/

to:

/usr/local/astrometry/data

And then update and config file:

 /usr/local/astrometry/etc/astrometry.cfg


Astromatic.net
''''''''''''''

  $ sudo zypper install fftw3-devel
  $ sudo zypper install libplplot16
  $ sudo zypper install cblas-devel

  $ rpm -i swarp-2.38.0-1.x86_64.rpm
  $ rpm -i sextractor-2.19.5-1.x86_64.rpm
  $ rpm -i --nodpes scamp-2.0.4-1.x86_64.rpm

  $ sudo ln -s /usr/lib64/libqhull.so.7 /usr/lib64/libqhull.so.5
  $ sudo ln -s /usr/lib64/libplplot.so.16 /usr/lib64/libplplotd.so.11

1.4. PAPI Installation

To install a released (tagged) version, you can install directly from Github. To install tagged release papi 2.1.0:

$ pip install git+https://github.com/ppmim/PAPI.git@2.1.0

The latest development version (from master) can also be installed from Github:

$ pip install git+https://github.com/ppmim/PAPI.git

As can a particular commit hash:

$ pip install git+https://github.com/ppmim/PAPI.git@3f03323c

1.5. Installing for developers

Fork and clone the repo:

$ git clone https://github.com/ppmim/PAPI.git
$ cd PAPI

Install from your local checked out copy as an “editable” install:

$ pip install -e .

If you want to run the tests and/or build the docs, you can make sure those dependencies are installed too:

$ pip install -e .[test]
$ pip install -e .[docs]
$ pip install -e .[test,docs]

Note: If you wish to install directly from github, but also include the extra dependencies, the syntax is as follows:

$ pip install "papi[test] @ git+https://github.com/ppmim/PAPI.git"

Need other useful packages in your development environment:

$ pip install ipython flake8 pytest-xdist

Edit the papi_setup.sh and set the right values to PAPI_CONFIG, and then run the script as an user:

$ ./papi_setup.sh

Warning

The script papi_setup.sh is currently implemented only for the Bash shell, and will modify your .bashrc file adding a new line at the end.

1.6. Building the documentation

The PAPI documentation is base on sphinx. With the package installed, the html documentation can be built from the doc directory:

$ cd papi/doc
$ make html

The documentation will be copied to a directory under build/sphinx.

The documentation can be built in different formats. The complete list will appear if you type make.

1.7. Bug reports

Please submit issues with the issue tracker on github.

1.8. Release Notes

  • 3.0.0
    • Fix many bugs and update to work H4RG detector on openSuSE15.4

  • 2.0.x
    • Support for new PANIC detector H4RG

    • Support for Python 3.7.x and Conda environment on openSuSE15.1

  • 1.2.x
    • Support for new MEF structure (Qi); old format (SGi_1) also supported

    • Bug Fixes

  • 1.0.x
    • First version