Installation

Simple Installation

tshirt can be installed with pip like so:

pip install tshirt

Setting up a TSHIRT_DATA directory

It is recommended that users choose a directory to store all of the output from tshirt. To define the directory, edit your ~/.bash_profile file so it contains the following line:

export TSHIRT_DATA="/path/to/tshirt_data"

where "path/to/tshirt_data" is the path to where you want the tshirt output to go. Without this line, tshirt creates a directory structure to store the output in the directory you run it in. Another option is to specify the TSHIRT_DATA path in your python session or Jupyter notebook like so:

import os
os.environ['TSHIRT_DATA']="/path/to/tshirt_data"

NOTE: If you run a notebook/python session without setting up a TSHIRT_DATA directory, all plots specified to be saved, will be automatically stored in a folder generated by tshirt located at $HOME/tshirt_data.

Upgrading tshirt to the latest development version

  • Activate the environment where you use tshirt

    conda activate tshirt

  • If you do not yet have the source code

    git clone https://github.com/eas342/tshirt.git

  • Navigate to the tshirt directory:

    cd tshirt

  • Pull the latest code from github

    git pull

  • Reinstall

    pip install .

  • Make sure the new code is used

    Either restart your iPython session, restart your Jupyter notebook kernel or run the commands below to update a specific module

    from tshirt.pipeline import spec_pipeline
    from importlib import reload
    reload(spec_pipeline)
    spec = spec_pipeline.spec('path_to_paramfile.yaml')
    

It is important to re-create the spec object after the reload, as in the above example.

Dependencies

If you do not wish to use the anaconda environment, another option is to manually install dependencies (beta).

  • astropy, numpy

  • photutils - needed for photometric extraction on images

  • ccdphot - only needed for flat fielding, dark subtraction etc. for

  • emcee - only needed for time series analysis and model fitting

  • miescatter - only needed for fitting Mie extinction to spectra. Note: I had trouble with pip install miescatter where it was looking for an old gcc5 it couldn’t find and had to download the source from pyPI and run python setup.py install

Upgrading from older versions of tshirt

If you are upgrading from older versions of tshirt, back up your parameters directory in case it gets removed with the git pull process. Also, installation may give you an error:

ERROR: Cannot uninstall 'tshirt'. It is a distutils installed
project and thus we cannot accurately determine which files belong
to it which would lead to only a partial uninstall.

In this case, you should remove the old files with the following procedure in your Unix shell:

rm -r ~/anaconda/envs/this-environment/lib/python3.6/site-packages/tshirt
rm ~/anaconda/envs/this-environment/lib/python3.6/site-packages/tshirt-0.1dev-py2.7.egg-info

where this-environment is the environment where you installed tshirt.