View Code? Open in Web Editor
NEW
This project forked from jlaura/pyhat
Python Hyperspectral Analysis Tools
License: Other
Jupyter Notebook 93.35%
Python 6.65%
Batchfile 0.01%
Shell 0.01%
pyhat's Introduction
![](https://camo.githubusercontent.com/41499c7f0dbe51ef5978159520c4e318f69e6ffe4038833bca742f7b3a16993d/687474703a2f2f6769746875622d616374696f6e732e3430616e74732e636f6d2f555347532d417374726f67656f6c6f67792f50794841542f6d61747269782e737667)
![codecov](https://camo.githubusercontent.com/0b48b84853b43f7a656eeb055f5603baaa275a39ed2d8806889fb614d2f57dff/68747470733a2f2f636f6465636f762e696f2f67682f555347532d417374726f67656f6c6f67792f50794841542f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d6368443254637a525a6e)
- 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
Installation - For Developers
- 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.
- 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/')
- 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.
pyhat's People
Watchers