The Python Hyperspectral Analysis Tool (PyHAT) provides an easy-to-use interface for performing machine learning and data analysis tasks on hyperspectral data. PyHAT tools can be accessed through the 'backend' by importing the package as any other Python package, or using the Guided User Interface (GUI). PyHAT features a data structure (class) that allows spectral data sets to be interoperable with a range of analysis tools. The PyHAT GUI also features a unique workflow functionality, providing users the ability to save their procedural steps in a workflow file that can be used later or by collaborators who also have a PyHAT installation.
The PyHAT package was developed at the U.S. Geological Survey Astrogeology Science Center by the development team and welcomes contributions from others.
- Install Anaconda Python.
- The Anaconda website includes install instructions.
- PyHAT does not support Python versions 2.x.
- Download PyHAT from the
PyHAT code repository on the
U.S. Geological Survey's GitLab service.
- If you need access to code.usgs.gov, contact a current team member.
- Unzip the PyHAT code and navigate to the unzipped directory.
- In Unix-based systems, you do this in the terminal.
- In Windows systems, you should use the Anaconda Prompt installed with Anaconda.
- Create a conda env for PyHAT and install
dependencies:
conda env create -n pyhat -f environment.yml
- Activate the PyHAT environment:
conda activate pyhat
- To run the GUI:
python run_pyhat_gui.py
- Again, you'll need to be in the repository directory to run the .py file.
- You can also import PyHAT as a module in your Python
interpreter
import libpyhat as lph
.
PyHAT leverages several data science, and machine learning and artificial intelligence (AI/ML) packages, most of which are listed below:
- Scitkit-learn
- Numpy
- SciPy
- Spectral
- Pandas
- Pysptools (No longer in active development and we may remove dependency)
The core functionalities and source codes of these modules are not packaged as part of PyHAT. Our installation requires that you successfully build an environment based on online repositories that host those supporting packages. We refer the reader to the respective licensing and credit documents for each imported module to understand attribution and usage requirements.
Please see our documentation, which is hosted with our repository and is expected to evolve.