To comply with USGS software release requirements, the primary PyHAT repository on GitHub has been migrated to code.usgs.gov and is currently not publicly available. Once the code has been through the internal USGS review process, the code.usgs.gov repository will be made public as an official USGS release. In the meantime, please contact Ryan Anderson (rbanderson@usgs.gov) with any questions about PyHAT or for the latest code. The code here is not an official USGS software release.
- Install Anaconda Python. Be sure to get Python 3.x
- Create a conda env for PyHAT:
conda create -n pyhat
. - Activate the PyHAT environment:
conda activate pyhat
(for windows:conda pyhat
) - Add conda forge to your channels list:
conda config --env --add channels conda-forge
- To install:
conda install -c usgs-astrogeology pyhat
- Manually install pip packages:
pip install pysptools spectral
- Install Anaconda Python. Be sure to get Python 3.x
- Create a conda env for PyHAT:
conda create -n pyhat
. - Activate the PyHAT environment:
conda activate pyhat
(for windows:conda pyhat
) - Add conda forge to your channels list:
conda config --env --add channels conda-forge
- Install the dependencies:
conda env update -f environment.yml
. - Manually install pip packages:
pip install pysptools spectral
- Clone this repo:
git clone https://github.com/USGS-Astrogeology/PyHAT
. - Enter the cloned repo:
cd PyHAT
. - Pull the
dev
branch:git fetch && git checkout dev
. - If you plan to test locally before sending a pull request for testing remotely, you'll need to install some prerequisites
conda install --quiet pytest pytest-cov nbsphinx pytest --cov=libpyhat
- When you want to run a test:
pytest --cov=libpyhat
- For Ubuntu/Linux: Update your
$PYTHONPATH
to include the PyHAT directory.
- Activate the PyHAT environment:
conda activate PyHAT
. - Install Jupyter: `conda install jupyter'.
- Jupyter notebook likely won't have the path to libpyhat set up out of the box.
- For Ubuntu/Linux: Update your
$JUPYTER_PATH
to include the installed PyHAT dependencies.- It will look something like this:
/path-to-anaconda/anaconda3/envs/pyhat/lib/python3.9/site-packages/.
- You may also need to add the PyHAT install directory that you cloned from GitHub to your path.
- Note that as Anaconda and Python versions change, so this path might change.
- It will look something like this:
- For Mac: It seems you only need to add the PyHAT install directory.
- You can just add this to the top of your notebooks:
import sys && sys.path.append('/path-to-cloned-repo/')
- You can just add this to the top of your notebooks:
- For Ubuntu/Linux: Update your
- Execute the
jupyter notebook
that will open a new browser tab with the Jupyter homepage. - Navigate to the `notebooks' folder in the PyHAT directory.
- Launch (click) the
Horgan Example.ipynb
notebook.- Note: Not all notebooks are working at the moment.
- A QGIS plugin is available here. This plugin allows users to create and view derived products using QGIS rather than a native Python environment.