Installation

Prequisites

Some packages are not required for primary functionality but are necessary for certain features.

Installing

Currently, the best way to install this package is to clone it from GitHub and then use pip to install it. I may add the package to the Python Package Index (PyPI) at some point in order to streamline installation, but haven’t yet.

  1. Clone from https://github.com/Lachimax/craft-optical-followup.git

  2. Open a terminal in the directory in which you have cloned it.

  3. You may wish to create a new virtual environment in which to complete the installation. This author recommends conda, which is included in any Anaconda installation.

  4. Install:
    $ pip install .
    

    Or, if you want to edit the code while installed, e.g. to contribute:

    $ pip install -e .
    
  5. A package-level configuration file should have been generated in the user’s home directory ~/.craftutils/config.yaml. See Configuration files for a full description; the most important values here are data_dir and param_dir.
    1. data_dir should be set to the directory in which all data will be reduced. It should be on a drive with plenty of space.

    2. param_dir should be set to the directory in which the input .yaml files will be written to and read from.

    3. These can also be set from within Python by invoking the functions craftutils.params.set_data_dir() and craftutils.params.set_param_dir().

Other dependencies

Astrometry.net

astrometry.net is used for solving the astrometry of images. It should be installed via conda and NOT via pip; there is a package called astrometry in the Python Package Index, and it does in fact implement part of the astrometry.net codebase, but it does not behave in the same way as the conda package and does not include the full functionality. This is why astrometry is excluded from requirements.txt but included in environment.yaml. So, if you’ve made the main installation via pip, astrometry.net should be installed separately via:

$ conda install -c conda-forge astrometry

If you are not using conda, astrometry.net can also be installed following the instructions at http://astrometry.net/doc/build.html. This should work fine but is marginally less convenient.