Skip to content

ih64/XRB-phot

Repository files navigation

XRB-phot

pipeline for SMARTS xrb optical data

This repository contains code for the prototype X-Ray Binary Photometry Pipeline. Currently the pipeline can reduce optical data, but you might follow along and write a similar program to do the IR data.

An exhaustive discussion on how to use the code that is written, along with examples on how to use it, is avaliable in this repositories wiki. Check it out by clicking the little tab on the right with the book icon on it!

Dependencies

For this code to work, you will need to install some other supporting python packages. It is important to ensure the following packages are installed for your /opt/anaconda/bin/python distribution of python. I will show you explicitly how to download these to your system, below.

The required programs are alipy-which itself requires asciidata and pyfits3-and pyraf.

Other required packages are astropy, numpy, and pandas, although these ship standard with the anaconda distribution of python, and you ought to have them already.

Before you actually start downloading anything, I would recommend you make sure you do not have these already installed. To check if you have a package installed or not, you can simply start up python and attempt to import it. For example if you can do import alipy and you get no error messages, there is no need for you to download alipy, asciidata, or pyfits.

Alternatively, if you execute the above command and get an error message saying 'ImportError: no module named pyfits' or 'ImportError: no module named asciidata', you likely already have alipy on your system but not asciidata or pyfits, respectively.

Lastly, if you execute the above command and get an error message saying 'ImportError: no module named alipy', you will need to install alipy. repeat the steps above to determine if you need to install asciidata and pyfits as well.

To determine if you need to install PyRAF, try importing it. At the command line type import pyraf or from pyraf import iraf. If you get an error message, you will need to install PyRAF. If you are able to import it then you are good to go.

Installing alipy and asciidata

The source code for alipy, and asciidata are in this repository, so I saved you the trouble of googling them and downloading them to your disk. To install them, follow these instructions.

cd alipy/
/opt/anaconda/bin/python setup.py install --user #this installs alipy. wait for the output to finish
cd ../asciidata-1.1.1/
/opt/anaconda/bin/python setup.py install --user #this installs asciidata. wait for the output to finish
cd ../

It is important that you type out /opt/anaconda/bin/python in this step, instead of python. By doing this, it will ensure the packages are in your python path for the anaconda distribution.

installing pyfits and pyraf

You can use pip to install these packags. Installing packages from pip is much easier than installing them from a setup.py file. Do the following in your terminal (you can actually be in whaterver directory you want for this part)

/opt/anaconda/bin/pip install pyfits --user #this installs pyfits. wait for the output to finish
/opt/anaconda/bin/pip install pyraf --user #this installs pyraf and its dependencies therein. wait for the output to finish.

The source code for pyfits and pyraf are also included in this repository for completeness. In principle, it is possible to install them from source following the procedure for alipy and asciidata. However, I highly recommend you use pip instead.

About

pipeline for SMARTS xrb optical data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published