Skip to main content

See Beyond the Visible: The Magic of Hyperspectral Imaging

Project description

Documentation Status


See Beyond the Visible: The Magic of Hyperspectral Imaging


HSI-Wizard

The goal is to set up a straightforward environment for hyperspectral analysis. The HIS-Wizard provides a range of useful tools for this purpose, spanning from basic spectral analysis to advanced methods utilizing artificial intelligence.

Features

  • DataCube Class
  • Spectral plotting function
  • Clustering
  • Spectral Analytics
  • Maldi Analytics
  • Merge Spectral Data
  • Hyperspectral Imaging

Requirements

Installation

pip

When utilizing pip, hsi-wizard releases are accessible in the form of source packages and binary wheels. Before proceeding with the installation of hsi-wizard and its prerequisites, ensure that your pip, setuptools, and wheel are updated to the latest versions

pip install hsi-wizard

Compile from source

An alternative method for installing HSIWizard involves cloning its GitHub repository and compiling it from source. This approach is commonly chosen when modifications to the code are desired. It is essential to have a development environment set up, which should include a Python distribution with header files, a compiler, as well as installations of pip and git.

python -m pip install -U pip setuptools wheel            # install/update build tools
git clone https://github.com/BlueSpacePotato/hsi-wizard  # clone hsi-wizard
cd hsi-wizard                                            # navigate into dir
python -m venv .env                                      # create environment in .env
source .env/bin/activate                                 # activate virtual env
pip install -e .                                         # install requirements
pip install wheel                                        # install wheel
pip install --no-build-isolation --editable .            # compile and install hsi-wizard

Documentation

Click here for Docs!

The Documentation is available as readthedocs project. Build with sphinx and the sphinx_rtd_theme.

The Git Structure

  • docs/data for the sphinx/readthedocs implementation
  • resources/ for storing images and sample data and equivalent
  • wizard/ the source code for the hsi-wizard python-lib that can be used as stand alone
  • .github/workflows/ .yaml-files for autobuild etc

Code Philosophy

  • keep things simple
  • implement only the smallest amount of code, to solve a problem
  • don't make up, no existing problems
  • try to solve problems the easiest way first
  • build reliability code
  • write usefull comands

Definitions

To build a clean code and communicate the ideas the right way, we need to define some basic understandings.

DataCube

  • A Datacube is a 3D array with shape vxy
  • x and y values describe the number of pixels in each direction
  • v values (often called λ in papers) describe the information deapth of the spectrum, commanly as measured counts.
from matplotlib import pyplot as plt
from hsi_wizard import datacube as dc

len_v = 50
len_x = 5
len_y = 6

# define empty array with given shape
data_cube = dc.DataCube()

# get the spectru for a single pixel and plot it
spectrum = data_cube[:, 3, 3]
plt.plot(spectrum)
plt.show()

# show 2d image for channel 3
img = datacube[3]
plt.imshow(img_2d)
plt.show()

Difference read and load

As loading function is used to import already processed data. For example if you want to load in an already existing numpy array. A read function on the other hand, reads dedicate files, like a *.csv or *.fsm file.

Pre-Processing Level

Based on an Idea from DOI

  • Level 0: Data is captured directly from sensor
  • Level 1: Data is processed in a easy way
  • Level 2: Data is hardly processed

To Dos

  • better hyperparameter tuning with evol source
  • R-support with patsy source
  • better template-creator
  • merge function for multiple specs
  • spec appending function
  • save file as nrrd

Changelog

The changelog will be added if the beta version is fine and runs stable


Acknolagement

Thanks to shopify providing a free logo build with the free hatchful logo-generator.

Icons made by Good Ware from www.flaticon.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hsi_wizard-0.0.6.tar.gz (124.4 kB view details)

Uploaded Source

Built Distribution

hsi_wizard-0.0.6-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file hsi_wizard-0.0.6.tar.gz.

File metadata

  • Download URL: hsi_wizard-0.0.6.tar.gz
  • Upload date:
  • Size: 124.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for hsi_wizard-0.0.6.tar.gz
Algorithm Hash digest
SHA256 10ec9a27f5008990d9a442e64e1be1b0013fa6eb7a9a78e2ecc395abab1c6eb8
MD5 f48bb9ed69ca08948163d3895172e718
BLAKE2b-256 39d164d4d0eeeaadab4673967c2262ec2695b3c2d043b5f2cbffc0e8e2bc190a

See more details on using hashes here.

File details

Details for the file hsi_wizard-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: hsi_wizard-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for hsi_wizard-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f3fe3dd2974c091f71e5ad6a53ae59e8bd7d3addf36244dd32341f58c2b254cb
MD5 60095f671dc9bb54dac3a4d0abe504e5
BLAKE2b-256 672e96a6b357a0f3df245ec83cc3ae66c4956ef8dcab499b4189d6205d14c48f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page