Skip to content

Commit

Permalink
Merge branch 'sr6_support'
Browse files Browse the repository at this point in the history
  • Loading branch information
ap-- committed Jan 24, 2024
2 parents 58051ab + 2286fb3 commit ebdb2d8
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
7 changes: 5 additions & 2 deletions os_support/10-oceanoptics.rules
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# udev rules file for Ocean Optics, Inc. spectrometers
# ====================================================
#
# version: 2.5
# updated: 2023-04-15
# version: 2.6
# updated: 2024-01-24
# maintainer: Andreas Poehlmann <[email protected]>
#
# [info] Previous versions are missing this header.
Expand All @@ -14,6 +14,7 @@
# $ seabreeze_os_setup
#
# Changes:
# - [2.6] added support for SR6 spectrometer
# - [2.5] added support for SR2 spectrometer
# - [2.4] added support for SR4 spectrometer
# - added support for HDX spectrometer
Expand Down Expand Up @@ -92,5 +93,7 @@ ATTR{idVendor}=="0999", ATTR{idProduct}=="1000", SYMLINK+="st-%n", MODE:="0666"
ATTR{idVendor}=="0999", ATTR{idProduct}=="1001", SYMLINK+="sr2-%n", MODE:="0666"
# Ocean Insight Inc. SR4 spectrometer
ATTR{idVendor}=="0999", ATTR{idProduct}=="1002", SYMLINK+="sr4-%n", MODE:="0666"
# Ocean Insight Inc. SR6 Spectrometer
ATTR{idVendor}=="0999", ATTR{idProduct}=="1005", SYMLINK+="sr6-%n", MODE:="0666"

LABEL="oceanoptics_rules_end"
28 changes: 26 additions & 2 deletions src/seabreeze/pyseabreeze/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -1239,8 +1239,8 @@ class SR4(SeaBreezeDevice):

# spectrometer config
dark_pixel_indices = DarkPixelIndices.from_ranges()
integration_time_min = 6000 # ???
integration_time_max = 10000000 # ???
integration_time_min = 3800 # 3.8ms
integration_time_max = 10000000 # 10s
integration_time_base = 1
spectrum_num_pixel = 3648
spectrum_raw_length = (3648 * 2) + 32 # XXX: Metadata
Expand All @@ -1251,6 +1251,30 @@ class SR4(SeaBreezeDevice):
feature_classes = (sbf.spectrometer.SeaBreezeSpectrometerFeatureSR4,)


class SR6(SeaBreezeDevice):
model_name = "SR6"

# communication config
transport = (USBTransport,)
usb_vendor_id = 0x0999
usb_product_id = 0x1005
usb_endpoint_map = EndPointMap(ep_out=0x01, highspeed_in=0x81)
usb_protocol = OBP2Protocol

# spectrometer config
dark_pixel_indices = DarkPixelIndices.from_ranges()
integration_time_min = 7200 # 7.2ms
integration_time_max = 5000000 # 5s
integration_time_base = 1
spectrum_num_pixel = 2048
spectrum_raw_length = (2048 * 2) + 32 # XXX: Metadata
spectrum_max_value = 65535
trigger_modes = TriggerMode.supported("OBP_NORMAL")

# features
feature_classes = (sbf.spectrometer.SeaBreezeSpectrometerFeatureSR6,)


class ST(SeaBreezeDevice):
model_name = "ST"

Expand Down
4 changes: 4 additions & 0 deletions src/seabreeze/pyseabreeze/features/spectrometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,5 +691,9 @@ class SeaBreezeSpectrometerFeatureSR4(SeaBreezeSpectrometerFeatureOBP2):
pass


class SeaBreezeSpectrometerFeatureSR6(SeaBreezeSpectrometerFeatureOBP2):
pass


class SeaBreezeSpectrometerFeatureST(SeaBreezeSpectrometerFeatureOBP2):
pass

0 comments on commit ebdb2d8

Please sign in to comment.