Skip to content

Commit

Permalink
Merge pull request #267 from marcporr/HR6
Browse files Browse the repository at this point in the history
  • Loading branch information
ap-- authored Oct 28, 2024
2 parents 1b88a53 + 3fff231 commit f1b39ca
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ To use the pyseabreeze backend (requires `pyusb`) simply run this before importi
| HDX | | [Issue #133][issue133] | x |
| HR2 | | x | |
| HR4 | | x | |
| HR6 | | x | |
| SR2 | | x | |
| SR4 | | x | |
| SR6 | | x | |
Expand Down
3 changes: 3 additions & 0 deletions os_support/10-oceanoptics.rules
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,8 @@ ATTR{idVendor}=="0999", ATTR{idProduct}=="1005", SYMLINK+="sr6-%n", MODE:="0666"
ATTR{idVendor}=="0999", ATTR{idProduct}=="1003", SYMLINK+="hr2-%n", MODE:="0666"
# Ocean Insight Inc. HR4 Spectrometer
ATTR{idVendor}=="0999", ATTR{idProduct}=="1004", SYMLINK+="hr4-%n", MODE:="0666"
# Ocean Insight Inc. HR6 Spectrometer
ATTR{idVendor}=="0999", ATTR{idProduct}=="1006", SYMLINK+="hr6-%n", MODE:="0666"


LABEL="oceanoptics_rules_end"
24 changes: 24 additions & 0 deletions src/seabreeze/pyseabreeze/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,30 @@ class HR4(SeaBreezeDevice):
feature_classes = (sbf.spectrometer.SeaBreezeSpectrometerFeatureHR4,)


class HR6(SeaBreezeDevice):
model_name = "HR6"

# communication config
transport = (USBTransport,)
usb_vendor_id = 0x0999
usb_product_id = 0x1006
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.SeaBreezeSpectrometerFeatureHR6,)


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 @@ -744,6 +744,10 @@ class SeaBreezeSpectrometerFeatureHR4(SeaBreezeSpectrometerFeatureOBP2):
pass


class SeaBreezeSpectrometerFeatureHR6(SeaBreezeSpectrometerFeatureOBP2):
pass


class SeaBreezeSpectrometerFeatureFX(SeaBreezeSpectrometerFeatureOBP):
def _get_spectrum_raw(self) -> NDArray[np.uint8]:
timeout = int(
Expand Down

0 comments on commit f1b39ca

Please sign in to comment.