Skip to main content

Library to calibrate, trigger and capture data cubes for the open source hyperspectral camera.

Project description

Open Source DIY Hyperspectral Imager Library

Library to calibrate, trigger and capture data cubes for the open source DIY hyperspectral camera.

Creative Commons Licence
This work is licensed under a Creative Commons Attribution 3.0 Australia License.

Documentation can be found here: https://openhsi.github.io/openhsi/.

Install

pip install openhsi

Requirements

Development and Contributions

This whole software library, testing suite, documentation website, and PyPi uploader was developed in Jupyter Notebooks using nbdev.

How to use

Taking a single picture

from openhsi.capture import *

try:
    take_show()
except:
    print('No devices found. Camera not connected.')
No devices found. Camera not connected.

Changing the Exposure and Gain

try:
    with OpenHSI(xbinwidth=896,xbinoffset=528,exposure_ms=1000,gain=0) as cam:
        cam.exposure    = 100
        cam.gain        = 5

        img = cam.start().get_img()
        plt.imshow(img)
        plt.xlabel('Wavelength (nm)')
        plt.ylabel('Line pixels')
        plt.show()
except:
    print('No devices found. Camera not connected.')
No devices found. Camera not connected.

Calibration

from openhsi.calibrate import *
result = fit_arc_lines2(arc_file = "cal_files/arc.hdf5", wave_save_file = None, skip = 1, show = True)
Fit arc lines for each spatial pixel
<style> /* Turns off some styling */ progress { /* gets rid of default border in Firefox and Opera. */ border: none; /* Needs to be in here for Safari polyfill so background images work as expected. */ background-size: auto; } .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar { background: #F44336; } </style>

svg

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

openhsi-0.0.8.tar.gz (12.4 MB view details)

Uploaded Source

Built Distribution

openhsi-0.0.8-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file openhsi-0.0.8.tar.gz.

File metadata

  • Download URL: openhsi-0.0.8.tar.gz
  • Upload date:
  • Size: 12.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for openhsi-0.0.8.tar.gz
Algorithm Hash digest
SHA256 209c4a149ae606b1fd78f6438dcb579e11fa67cdebc58edb9ce25f252027d10c
MD5 dde8cc72ea35ed7909232f9bc77e601f
BLAKE2b-256 78584aba86c2e2f61298c4148c7124c124a3c4ca00b1449b56248772c5897633

See more details on using hashes here.

File details

Details for the file openhsi-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: openhsi-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for openhsi-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 1068cdce2655ac070cf0f739be09d3befeda73f859a889cb0c67bec589e51f18
MD5 c08c1c97571ef64824fdfa7120b639ef
BLAKE2b-256 1a69d8587916392993670ef709cdec513566cfbc11c39f80213d07db39654857

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