Library to calibrate, trigger and capture data cubes for the open source DIY hyperspectral camera.
This work is licensed under a Creative Commons Attribution 3.0 Australia License.
Documentation can be found here: https://openhsi.github.io/openhsi/.
pip install openhsi
- Python 3.6+
- Ximea SDK (See https://www.ximea.com/support/wiki/apis/Python)
from openhsi.capture import *
try:
take_show()
except:
print('No devices found. Camera not connected.')
No devices found. Camera not connected.
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.
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