Menu

Installation

Carsten Frank

The installation is done on an ubuntu system. If you use a different distribution the installation is still not very difficult and can be easisly adapted.

Installation

Go to the folder into which you downloaded the code and change into the folder of the respective spectrometer producer (Hamamatsu, Avantes or OceanOptics).

Then allow the user (which should be in the 'plugdev' group) to access the spectrometer.
To achieve that copy the 'z61_spectrometer.rules' file into the '/etc/udev/rules.d/' folder and reload udev. Refer to the user manual of your distribution or try:

sudo udevadm control --reload-rules ; sudo udevadm trigger

Usage

I used Ubuntu as test environment and Ubuntu seems to require virtual environments for this code to work. Before you start you need to install some stuff (without the environment):
sudo apt install python3-venv libusb-1.0-0 python3-pip
Then we need to create a virtual environment:
python3 -m venv my-venv
source my-venv/bin/activate

You just entered a virtual environment, use the command ‘deactivate’ later, when you want to leave the venv. In the venv we need to install some packages:
pip install numpy
pip install pyusb
pip install libusb

Then try:
python3 2025-01-09--HamamatsuMiniSpectrometer.py
in the virtual environment.

Thanks

I do thank the Helmholtz-Zentrum Geesthacht (HZG) for the opportunity to publish this work.

The kernel and python modules described here were used during the baseline work for the following two publications:

  1. Spectrophotometric high-precision seawater pH determination for use in underway measuring systems
  2. Entwicklung und Qualifizierung autonomer Messsysteme für den pH-Wert und die Gesamtalkalinität von Meerwasser

If you are writing a paper using the libraries and modules I would kindly ask to either cite one of the papers or give a small reference to the HZG if you deem this work worthy enough.