pymodaq_plugins_oceaninsight 5.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pymodaq_plugins_oceaninsight/__init__.py +12 -0
- pymodaq_plugins_oceaninsight/daq_move_plugins/__init__.py +13 -0
- pymodaq_plugins_oceaninsight/daq_viewer_plugins/__init__.py +3 -0
- pymodaq_plugins_oceaninsight/daq_viewer_plugins/plugins_0D/__init__.py +13 -0
- pymodaq_plugins_oceaninsight/daq_viewer_plugins/plugins_1D/__init__.py +13 -0
- pymodaq_plugins_oceaninsight/daq_viewer_plugins/plugins_1D/daq_1Dviewer_Omnidriver.py +177 -0
- pymodaq_plugins_oceaninsight/daq_viewer_plugins/plugins_1D/daq_1Dviewer_Seabreeze.py +164 -0
- pymodaq_plugins_oceaninsight/daq_viewer_plugins/plugins_2D/__init__.py +14 -0
- pymodaq_plugins_oceaninsight/daq_viewer_plugins/plugins_ND/__init__.py +13 -0
- pymodaq_plugins_oceaninsight/hardware/__init__.py +0 -0
- pymodaq_plugins_oceaninsight/resources/__init__.py +0 -0
- pymodaq_plugins_oceaninsight/resources/config_template.toml +3 -0
- pymodaq_plugins_oceaninsight/utils.py +15 -0
- pymodaq_plugins_oceaninsight-5.3.0.dist-info/METADATA +87 -0
- pymodaq_plugins_oceaninsight-5.3.0.dist-info/RECORD +18 -0
- pymodaq_plugins_oceaninsight-5.3.0.dist-info/WHEEL +4 -0
- pymodaq_plugins_oceaninsight-5.3.0.dist-info/entry_points.txt +5 -0
- pymodaq_plugins_oceaninsight-5.3.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from pymodaq_utils.utils import get_version, PackageNotFoundError
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from pymodaq.utils.logger import set_logger # to be imported by other modules.
|
|
4
|
+
|
|
5
|
+
from .utils import Config
|
|
6
|
+
config = Config()
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
try:
|
|
10
|
+
__version__ = get_version(__package__)
|
|
11
|
+
except PackageNotFoundError:
|
|
12
|
+
__version__ = '0.0.0dev'
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import importlib
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from .. import set_logger
|
|
4
|
+
logger = set_logger('move_plugins', add_to_console=False)
|
|
5
|
+
|
|
6
|
+
for path in Path(__file__).parent.iterdir():
|
|
7
|
+
try:
|
|
8
|
+
if '__init__' not in str(path):
|
|
9
|
+
importlib.import_module('.' + path.stem, __package__)
|
|
10
|
+
except Exception as e:
|
|
11
|
+
logger.warning("{:} plugin couldn't be loaded due to some missing packages or errors: {:}".format(path.stem, str(e)))
|
|
12
|
+
pass
|
|
13
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import importlib
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from ... import set_logger
|
|
4
|
+
logger = set_logger('viewer0D_plugins', add_to_console=False)
|
|
5
|
+
|
|
6
|
+
for path in Path(__file__).parent.iterdir():
|
|
7
|
+
try:
|
|
8
|
+
if '__init__' not in str(path):
|
|
9
|
+
importlib.import_module('.' + path.stem, __package__)
|
|
10
|
+
except Exception as e:
|
|
11
|
+
logger.warning("{:} plugin couldn't be loaded due to some missing packages or errors: {:}".format(path.stem, str(e)))
|
|
12
|
+
pass
|
|
13
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import importlib
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from ... import set_logger
|
|
4
|
+
logger = set_logger('viewer1D_plugins', add_to_console=False)
|
|
5
|
+
|
|
6
|
+
for path in Path(__file__).parent.iterdir():
|
|
7
|
+
try:
|
|
8
|
+
if '__init__' not in str(path):
|
|
9
|
+
importlib.import_module('.' + path.stem, __package__)
|
|
10
|
+
except Exception as e:
|
|
11
|
+
logger.warning("{:} plugin couldn't be loaded due to some missing packages or errors: {:}".format(path.stem, str(e)))
|
|
12
|
+
pass
|
|
13
|
+
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
from qtpy import QtWidgets
|
|
2
|
+
from pymodaq.control_modules.viewer_utility_classes import DAQ_Viewer_base, comon_parameters, main
|
|
3
|
+
|
|
4
|
+
import numpy as np
|
|
5
|
+
from collections import OrderedDict
|
|
6
|
+
from pymodaq.utils.daq_utils import ThreadCommand, getLineInfo
|
|
7
|
+
from pymodaq.utils.data import DataFromPlugins, Axis, DataToExport
|
|
8
|
+
import sys
|
|
9
|
+
import clr
|
|
10
|
+
from easydict import EasyDict as edict
|
|
11
|
+
|
|
12
|
+
from pymodaq_plugins_oceaninsight.utils import Config
|
|
13
|
+
|
|
14
|
+
plugin_config = Config()
|
|
15
|
+
|
|
16
|
+
omnidriver_path = plugin_config('omnidriver_path')
|
|
17
|
+
try:
|
|
18
|
+
sys.path.append(omnidriver_path)
|
|
19
|
+
clr.AddReference("NETOmniDriver-NET40")
|
|
20
|
+
import OmniDriver as omnidriver
|
|
21
|
+
|
|
22
|
+
except:
|
|
23
|
+
omnidriver = None
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class DAQ_1DViewer_Omnidriver(DAQ_Viewer_base):
|
|
27
|
+
"""PyMoDAQ plugin controlling spectrometers from OceanOptics and using their OmniDriver wrapper ('NETOmniDriver-NET40')
|
|
28
|
+
The wrapper is interfaced using the clr package and then importing Omnidriver as a standart python package
|
|
29
|
+
https://oceanoptics.com/api/omnidriver/index.html?overview-summary.html
|
|
30
|
+
|
|
31
|
+
The plugin enables the discovery of any connected usb spectrometers and can control them in parallel. It extracts the
|
|
32
|
+
calibrated wavelength and will export datas that will be plotted with respect to this wavelengths vector.
|
|
33
|
+
|
|
34
|
+
Used methods from the wrapper:
|
|
35
|
+
------------------------------
|
|
36
|
+
setIntegrationTime
|
|
37
|
+
getIntegrationTime
|
|
38
|
+
|
|
39
|
+
See Also
|
|
40
|
+
--------
|
|
41
|
+
utility_classes.DAQ_Viewer_base
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
params = comon_parameters + [
|
|
45
|
+
{'title': 'N spectrometers:', 'name': 'Nspectrometers', 'type': 'int', 'value': 0,
|
|
46
|
+
'default': 0, 'min': 0, 'readonly': True},
|
|
47
|
+
{'title': 'Spectrometers:', 'name': 'spectrometers', 'type': 'group', 'children': []},
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
hardware_averaging = True
|
|
51
|
+
|
|
52
|
+
def ini_attributes(self):
|
|
53
|
+
|
|
54
|
+
self.controller: omnidriver.NETWrapper = None
|
|
55
|
+
self.spectro_names = [] #contains the spectro name as returned from the wrapper
|
|
56
|
+
self.spectro_id = [] # contains the spectro id as set by the ini_detector method and equal to the Parameter name
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def commit_settings(self, param):
|
|
60
|
+
"""
|
|
61
|
+
"""
|
|
62
|
+
if param.name() == 'exposure_time':
|
|
63
|
+
ind_spectro = self.spectro_id.index(param.parent().name())
|
|
64
|
+
self.controller.setIntegrationTime(ind_spectro, param.value() * 1000)
|
|
65
|
+
|
|
66
|
+
param.setValue(self.controller.getIntegrationTime(ind_spectro) / 1000)
|
|
67
|
+
|
|
68
|
+
def ini_detector(self, controller=None):
|
|
69
|
+
"""
|
|
70
|
+
Initialisation procedure of the detector updating the status dictionnary.
|
|
71
|
+
|
|
72
|
+
See Also
|
|
73
|
+
--------
|
|
74
|
+
set_Mock_data, daq_utils.ThreadCommand
|
|
75
|
+
"""
|
|
76
|
+
self.ini_detector_init(controller, None)
|
|
77
|
+
|
|
78
|
+
if self.is_master:
|
|
79
|
+
self.controller = omnidriver.NETWrapper()
|
|
80
|
+
|
|
81
|
+
N = self.controller.openAllSpectrometers()
|
|
82
|
+
self.settings.child('Nspectrometers').setValue(N)
|
|
83
|
+
self.spectro_names = []
|
|
84
|
+
self.spectro_id = []
|
|
85
|
+
|
|
86
|
+
data_init = DataToExport('Spectro')
|
|
87
|
+
|
|
88
|
+
for ind_spectro in range(N):
|
|
89
|
+
name = self.controller.getName(ind_spectro)
|
|
90
|
+
self.spectro_names.append(name)
|
|
91
|
+
self.spectro_id.append('spectro{:d}'.format(ind_spectro))
|
|
92
|
+
|
|
93
|
+
exp_max = self.controller.getMaximumIntegrationTime(ind_spectro)
|
|
94
|
+
exp_min = self.controller.getMinimumIntegrationTime(ind_spectro)
|
|
95
|
+
exp = self.controller.getIntegrationTime(ind_spectro) / 1000
|
|
96
|
+
wavelengths = self.get_xaxis(ind_spectro)
|
|
97
|
+
|
|
98
|
+
data_init.append(DataFromPlugins(name=name, data=[np.zeros_like(wavelengths)],
|
|
99
|
+
dim='Data1D',
|
|
100
|
+
x_axis=Axis(data=wavelengths, label='Wavelength',
|
|
101
|
+
units='nm')))
|
|
102
|
+
|
|
103
|
+
for ind in range(2): #this is to take into account that adding it once doen't work (see pyqtgraph Parameter...)
|
|
104
|
+
try:
|
|
105
|
+
self.settings.child('spectrometers').addChild(
|
|
106
|
+
{'title': name,'name': 'spectro{:d}'.format(ind_spectro),
|
|
107
|
+
'type': 'group', 'children':[
|
|
108
|
+
{'title': 'grab spectrum:','name': 'grab', 'type': 'bool',
|
|
109
|
+
'value': True},
|
|
110
|
+
{'title': 'Exposure time (ms):','name': 'exposure_time', 'type': 'int',
|
|
111
|
+
'value': int(exp), 'min': int(exp_min/1000), 'max': int(exp_max/1000)},
|
|
112
|
+
|
|
113
|
+
]
|
|
114
|
+
})
|
|
115
|
+
except:
|
|
116
|
+
pass
|
|
117
|
+
|
|
118
|
+
QtWidgets.QApplication.processEvents()
|
|
119
|
+
|
|
120
|
+
#init viewers
|
|
121
|
+
|
|
122
|
+
if N == 0:
|
|
123
|
+
raise Exception('No detected hardware')
|
|
124
|
+
self.dte_signal_temp.emit(data_init)
|
|
125
|
+
|
|
126
|
+
initialized = True
|
|
127
|
+
info = 'Ocean Insight Spectrometers initialized'
|
|
128
|
+
return info, initialized
|
|
129
|
+
|
|
130
|
+
def get_xaxis(self, ind_spectro):
|
|
131
|
+
wavelengths_chelou = self.controller.getWavelengths(ind_spectro)
|
|
132
|
+
wavelengths = np.array([wavelengths_chelou[ind] for ind in range(len(wavelengths_chelou))])
|
|
133
|
+
|
|
134
|
+
return wavelengths
|
|
135
|
+
|
|
136
|
+
def close(self):
|
|
137
|
+
"""
|
|
138
|
+
"""
|
|
139
|
+
if self.controller is not None:
|
|
140
|
+
self.controller.closeAllSpectrometers()
|
|
141
|
+
|
|
142
|
+
def grab_data(self, Naverage=1, **kwargs):
|
|
143
|
+
"""
|
|
144
|
+
|
|
145
|
+
"""
|
|
146
|
+
try:
|
|
147
|
+
dte = DataToExport('Spectro')
|
|
148
|
+
for ind_spectro in range(len(self.spectro_names)):
|
|
149
|
+
if self.settings.child('spectrometers', 'spectro{:d}'.format(ind_spectro), 'grab').value():
|
|
150
|
+
self.controller.setScansToAverage(ind_spectro, Naverage)
|
|
151
|
+
data_chelou = self.controller.getSpectrum(ind_spectro)
|
|
152
|
+
data_array = np.array([data_chelou[ind] for ind in range(len(data_chelou))])
|
|
153
|
+
dte.append(
|
|
154
|
+
DataFromPlugins(name=self.spectro_names[ind_spectro],
|
|
155
|
+
data=[data_array], dim='Data1D',
|
|
156
|
+
axes=[Axis('wavelength',
|
|
157
|
+
units='m',
|
|
158
|
+
data=self.get_xaxis(ind_spectro)
|
|
159
|
+
* 1e-9)]))
|
|
160
|
+
QtWidgets.QApplication.processEvents()
|
|
161
|
+
|
|
162
|
+
self.dte_signal.emit(dte)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
except Exception as e:
|
|
166
|
+
self.emit_status(ThreadCommand('Update_Status', [getLineInfo() + str(e), "log"]))
|
|
167
|
+
|
|
168
|
+
def stop(self):
|
|
169
|
+
"""
|
|
170
|
+
|
|
171
|
+
"""
|
|
172
|
+
for ind_spec, name in enumerate(self.spectro_names):
|
|
173
|
+
self.controller.stopAveraging(ind_spec)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
if __name__ == '__main__':
|
|
177
|
+
main(__file__, init=False)
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
from easydict import EasyDict as edict
|
|
3
|
+
from pymodaq.utils.daq_utils import ThreadCommand, getLineInfo
|
|
4
|
+
from pymodaq.utils.data import DataFromPlugins, Axis, DataToExport
|
|
5
|
+
from pymodaq.control_modules.viewer_utility_classes import DAQ_Viewer_base, comon_parameters, main
|
|
6
|
+
from timeit import timeit
|
|
7
|
+
|
|
8
|
+
# explicitly request cseabreeze
|
|
9
|
+
import seabreeze
|
|
10
|
+
seabreeze.use('cseabreeze')
|
|
11
|
+
from seabreeze.spectrometers import Spectrometer, list_devices
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class DAQ_1DViewer_Seabreeze(DAQ_Viewer_base):
|
|
15
|
+
"""PyMoDAQ 1DViewer class for devices supported by the Seabreeze library."""
|
|
16
|
+
|
|
17
|
+
# Upon initialisation
|
|
18
|
+
devices = list_devices()
|
|
19
|
+
|
|
20
|
+
# Supports pseudo hardware-averaging
|
|
21
|
+
hardware_averaging = True
|
|
22
|
+
|
|
23
|
+
# Adjustable parameters
|
|
24
|
+
params = comon_parameters + [
|
|
25
|
+
{'title': 'Device:', 'name': 'device', 'type': 'list', 'limits': devices},
|
|
26
|
+
{'title': 'Integration (ms):', 'name': 'integration', 'type': 'float', 'value': 1.0},
|
|
27
|
+
{'title': 'Advanced:', 'name': 'advanced', 'type': 'group', 'children': [
|
|
28
|
+
{'title': 'Serial Number:', 'name': 'serial_number', 'type': 'str', 'value': "", 'readonly': True},
|
|
29
|
+
{'title': 'Non Linearity correction:', 'name': 'correct_non_linearity', 'type': 'bool', 'value': False},
|
|
30
|
+
{'title': 'Max Intensity', 'name': 'max_intensity', 'type': "float", 'value': 65535, 'readonly': True},
|
|
31
|
+
{'title': 'Pixels:', 'name': 'pixels', 'type': 'int', 'value': 2048, 'readonly': True},
|
|
32
|
+
{'title': 'Dark Channels:', 'name': 'dark_channels', 'type': 'str', 'value': '', 'readonly': True},
|
|
33
|
+
{'title': 'Readout Time (ms)', 'name': 'readout_time', 'type': 'float', 'value': 666, 'readonly': True},
|
|
34
|
+
]}
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
def ini_attributes(self):
|
|
38
|
+
self.controller: Spectrometer = None
|
|
39
|
+
|
|
40
|
+
def commit_settings(self, param):
|
|
41
|
+
"""
|
|
42
|
+
"""
|
|
43
|
+
if param.name() == "integration":
|
|
44
|
+
self.controller.integration_time_micros(param.value() * 1000)
|
|
45
|
+
# There is no way to get feedback from the spectrometer on the currently set integration time
|
|
46
|
+
# elif ...
|
|
47
|
+
##
|
|
48
|
+
|
|
49
|
+
def ini_detector(self, controller=None):
|
|
50
|
+
"""Detector communication initialization
|
|
51
|
+
|
|
52
|
+
Parameters
|
|
53
|
+
----------
|
|
54
|
+
controller: (object) custom object of a PyMoDAQ plugin (Slave case). None if only one detector by controller (Master case)
|
|
55
|
+
|
|
56
|
+
Returns
|
|
57
|
+
-------
|
|
58
|
+
self.status (edict): with initialization status: three fields:
|
|
59
|
+
* info (str)
|
|
60
|
+
* controller (object) initialized controller
|
|
61
|
+
*initialized: (bool): False if initialization failed otherwise True
|
|
62
|
+
"""
|
|
63
|
+
if self.is_master:
|
|
64
|
+
# From what I understand this will just get the spectro currently selected in the list
|
|
65
|
+
dvc = self.settings['device']
|
|
66
|
+
self.controller = Spectrometer(dvc)
|
|
67
|
+
#self.controller.open()
|
|
68
|
+
|
|
69
|
+
else:
|
|
70
|
+
self.controller = controller
|
|
71
|
+
|
|
72
|
+
# Oceanoptics spectrometers (at least the ones i Know) have fixed axis
|
|
73
|
+
# get index of inactive pixels
|
|
74
|
+
dark_indices = self.controller.f.spectrometer.get_electric_dark_pixel_indices()
|
|
75
|
+
self.settings.child('advanced').child('dark_channels').setValue(", ".join([str(x) for x in dark_indices]))
|
|
76
|
+
# get the x_axis
|
|
77
|
+
data_x_axis = self.controller.wavelengths() # Way to get the x axis
|
|
78
|
+
# keep range without dark pixels
|
|
79
|
+
x_indices = np.arange(data_x_axis.shape[0])
|
|
80
|
+
self.valid_range = np.setdiff1d(x_indices, dark_indices)
|
|
81
|
+
data_x_axis = data_x_axis[self.valid_range]
|
|
82
|
+
# generate PyMoDAQ axis
|
|
83
|
+
self.x_axis = Axis(data=data_x_axis * 1e-9, label='wavelength', units='m', index=0)
|
|
84
|
+
|
|
85
|
+
# Get the name
|
|
86
|
+
specname = f"Ocean Insight {self.controller.model}"
|
|
87
|
+
|
|
88
|
+
# initialize viewers pannel with the future type of data
|
|
89
|
+
|
|
90
|
+
self.data_grabed_signal_temp.emit([
|
|
91
|
+
DataFromPlugins(name=specname,
|
|
92
|
+
data=[np.zeros_like(data_x_axis)],
|
|
93
|
+
dim='Data1D',
|
|
94
|
+
labels=['Intensity'],
|
|
95
|
+
axes=[self.x_axis]), ])
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
# Update the parameters
|
|
99
|
+
# Here we need to do a few things. Get the integration time limits and set it in the settings
|
|
100
|
+
tlimits = np.array(self.controller.integration_time_micros_limits) / 1000
|
|
101
|
+
self.settings.child('integration').setLimits(tlimits)
|
|
102
|
+
# Here we need to update the advanced parameters
|
|
103
|
+
advanced_settings = self.settings.child('advanced')
|
|
104
|
+
sn = self.controller.serial_number
|
|
105
|
+
advanced_settings.child('serial_number').setValue(sn)
|
|
106
|
+
# non linearity coefficients
|
|
107
|
+
nlc_feat = self.controller.f.nonlinearity_coefficients
|
|
108
|
+
if nlc_feat is not None and not any(np.isnan(nlc_feat.get_nonlinearity_coefficients())):
|
|
109
|
+
advanced_settings.child('correct_non_linearity').setValue(True)
|
|
110
|
+
else:
|
|
111
|
+
advanced_settings.child('correct_non_linearity').setValue(False)
|
|
112
|
+
advanced_settings.child('correct_non_linearity').setOpts(enabled=False)
|
|
113
|
+
|
|
114
|
+
# measure the readout time
|
|
115
|
+
Nperf = 200
|
|
116
|
+
self.settings.child('integration').setValue(tlimits[0]) # Update the parameter value to the lower limit
|
|
117
|
+
self.controller.integration_time_micros(tlimits[0]*1000) # Set the readout time to lower limit
|
|
118
|
+
perf = timeit(lambda: self.controller.intensities(), number=Nperf) # time the execution of code in [s]
|
|
119
|
+
self.settings.child('advanced').child('readout_time').setValue(1000*perf/Nperf) # set the settings
|
|
120
|
+
|
|
121
|
+
##############################
|
|
122
|
+
|
|
123
|
+
info = f"Initialized {specname} spectrometer"
|
|
124
|
+
initialized = True
|
|
125
|
+
return info, initialized
|
|
126
|
+
|
|
127
|
+
def close(self):
|
|
128
|
+
"""
|
|
129
|
+
Terminate the communication protocol
|
|
130
|
+
"""
|
|
131
|
+
if self.controller is not None:
|
|
132
|
+
self.controller.close()
|
|
133
|
+
|
|
134
|
+
def grab_data(self, Naverage = 1, **kwargs):
|
|
135
|
+
"""
|
|
136
|
+
Parameters
|
|
137
|
+
----------
|
|
138
|
+
Naverage: (int) Number of hardware averaging
|
|
139
|
+
kwargs: (dict) of others optionals arguments
|
|
140
|
+
"""
|
|
141
|
+
nlc = self.settings.child('advanced').child('correct_non_linearity').value()
|
|
142
|
+
#c0 = self.settings.child('advanced').child('dark_channels').value()
|
|
143
|
+
|
|
144
|
+
# synchrone version (blocking function)
|
|
145
|
+
# Pseudo-hardware-averaging
|
|
146
|
+
if Naverage > 1:
|
|
147
|
+
data = [self.controller.intensities(correct_nonlinearity=nlc)[self.valid_range]
|
|
148
|
+
for i in range(Naverage)]
|
|
149
|
+
data = np.array(data)
|
|
150
|
+
data = data.mean(0)
|
|
151
|
+
# Otherwise normal single-acquisition
|
|
152
|
+
else:
|
|
153
|
+
data = self.controller.intensities(correct_nonlinearity=nlc)[self.valid_range]
|
|
154
|
+
|
|
155
|
+
self.dte_signal.emit(DataToExport('Spectro', data=[
|
|
156
|
+
DataFromPlugins(name='oceanseabreeze', data=[data], dim='Data1D',
|
|
157
|
+
labels=['spectrum'], axes=[self.x_axis.copy()])]))
|
|
158
|
+
|
|
159
|
+
def stop(self):
|
|
160
|
+
pass
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
if __name__ == '__main__':
|
|
164
|
+
main(__file__, init=False)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import importlib
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from ... import set_logger
|
|
4
|
+
logger = set_logger('viewer2D_plugins', add_to_console=False)
|
|
5
|
+
|
|
6
|
+
for path in Path(__file__).parent.iterdir():
|
|
7
|
+
try:
|
|
8
|
+
if '__init__' not in str(path):
|
|
9
|
+
importlib.import_module('.' + path.stem, __package__)
|
|
10
|
+
except Exception as e:
|
|
11
|
+
logger.warning("{:} plugin couldn't be loaded due to some missing packages or errors: {:}".format(path.stem, str(e)))
|
|
12
|
+
pass
|
|
13
|
+
|
|
14
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import importlib
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from pymodaq.utils.logger import set_logger
|
|
4
|
+
logger = set_logger('viewerND_plugins', add_to_console=False)
|
|
5
|
+
|
|
6
|
+
for path in Path(__file__).parent.iterdir():
|
|
7
|
+
try:
|
|
8
|
+
if '__init__' not in str(path):
|
|
9
|
+
importlib.import_module('.' + path.stem, __package__)
|
|
10
|
+
except Exception as e:
|
|
11
|
+
logger.warning("{:} plugin couldn't be loaded due to some missing packages or errors: {:}".format(path.stem, str(e)))
|
|
12
|
+
pass
|
|
13
|
+
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""
|
|
3
|
+
Created the 31/08/2023
|
|
4
|
+
|
|
5
|
+
@author: Sebastien Weber
|
|
6
|
+
"""
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
from pymodaq.utils.config import BaseConfig, USER
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Config(BaseConfig):
|
|
13
|
+
"""Main class to deal with configuration values for this plugin"""
|
|
14
|
+
config_template_path = Path(__file__).parent.joinpath('resources/config_template.toml')
|
|
15
|
+
config_name = f"config_{__package__.split('pymodaq_plugins_')[1]}"
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: pymodaq_plugins_oceaninsight
|
|
3
|
+
Version: 5.3.0
|
|
4
|
+
Summary: Set of PyMoDAQ plugins for OceanInsight (OceanOptics) spectrometers
|
|
5
|
+
Project-URL: Homepage, https://pymodaq.cnrs.fr
|
|
6
|
+
Project-URL: Documentation , https://pymodaq.cnrs.fr
|
|
7
|
+
Project-URL: Repository , https://github.com/PyMoDAQ/pymodaq_plugins_oceaninsight
|
|
8
|
+
Author-email: Sébastien Weber <sebastien.weber@cemes.fr>
|
|
9
|
+
Maintainer-email: Sébastien Weber <sebastien.weber@cemes.fr>
|
|
10
|
+
License: The MIT License (MIT)
|
|
11
|
+
|
|
12
|
+
Copyright (c) 2021 Sebastien Weber <sebastien.weber@cemes.fr>
|
|
13
|
+
|
|
14
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
in the Software without restriction, including without limitation the rights
|
|
17
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
19
|
+
furnished to do so, subject to the following conditions:
|
|
20
|
+
|
|
21
|
+
The above copyright notice and this permission notice shall be included in
|
|
22
|
+
all copies or substantial portions of the Software.
|
|
23
|
+
|
|
24
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
26
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
30
|
+
THE SOFTWARE.
|
|
31
|
+
License-File: LICENSE
|
|
32
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
33
|
+
Classifier: Intended Audience :: Science/Research
|
|
34
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
35
|
+
Classifier: Natural Language :: English
|
|
36
|
+
Classifier: Operating System :: OS Independent
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
41
|
+
Classifier: Topic :: Scientific/Engineering :: Human Machine Interfaces
|
|
42
|
+
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
43
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
44
|
+
Classifier: Topic :: Software Development :: User Interfaces
|
|
45
|
+
Requires-Python: >=3.10
|
|
46
|
+
Requires-Dist: pymodaq-data>=5.3.0
|
|
47
|
+
Requires-Dist: pymodaq-gui>=5.3.0
|
|
48
|
+
Requires-Dist: pymodaq-utils>=5.3.1
|
|
49
|
+
Requires-Dist: pymodaq>=5.3.2
|
|
50
|
+
Requires-Dist: pythonnet
|
|
51
|
+
Requires-Dist: seabreeze
|
|
52
|
+
Description-Content-Type: text/x-rst
|
|
53
|
+
|
|
54
|
+
pymodaq_plugins_oceaninsight (Ocean Insight (Optics) Spectrometers)
|
|
55
|
+
###################################################################
|
|
56
|
+
|
|
57
|
+
.. image:: https://img.shields.io/pypi/v/pymodaq_plugins_oceaninsight.svg
|
|
58
|
+
:target: https://pypi.org/project/pymodaq_plugins_oceaninsight/
|
|
59
|
+
:alt: Latest Version
|
|
60
|
+
|
|
61
|
+
.. image:: https://readthedocs.org/projects/pymodaq/badge/?version=latest
|
|
62
|
+
:target: https://pymodaq.readthedocs.io/en/stable/?badge=latest
|
|
63
|
+
:alt: Documentation Status
|
|
64
|
+
|
|
65
|
+
.. image:: https://github.com/PyMoDAQ/pymodaq_plugins_oceaninsight/workflows/Upload%20Python%20Package/badge.svg
|
|
66
|
+
:target: https://github.com/PyMoDAQ/pymodaq_plugins_oceaninsight
|
|
67
|
+
|
|
68
|
+
PyMoDAQ plugin for OceanInsight (OceanOptics) spectrometers
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
Authors
|
|
72
|
+
=======
|
|
73
|
+
|
|
74
|
+
* Sebastien J. Weber
|
|
75
|
+
* Nicolas Tappy
|
|
76
|
+
* Arnaud Meyer
|
|
77
|
+
|
|
78
|
+
Instruments
|
|
79
|
+
===========
|
|
80
|
+
Below is the list of instruments included in this plugin.
|
|
81
|
+
Url: https://www.oceaninsight.com/products/spectrometers/
|
|
82
|
+
|
|
83
|
+
Viewer1D
|
|
84
|
+
++++++++
|
|
85
|
+
|
|
86
|
+
* **Omnidriver**: Control of Spectrometer using the Omnidriver library (should be installed)
|
|
87
|
+
* **Seabreeze** : If the Omnidriver library is not available, a plugin implementation based on seabreeze is provided: https://python-seabreeze.readthedocs.io/en/latest/index.html
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
pymodaq_plugins_oceaninsight/__init__.py,sha256=eYXRGQL-ki6WZPuho77NZS1atZeiy6oC53wtVZeNiQo,324
|
|
2
|
+
pymodaq_plugins_oceaninsight/utils.py,sha256=MWgdJVYqFcG2r7MeHRixkCQv4zi-_-zCbTBn6gRsMVE,419
|
|
3
|
+
pymodaq_plugins_oceaninsight/daq_move_plugins/__init__.py,sha256=H-DnuGG6lezGyUjuhavlXRbzoQqzMbZaT3mfMNnAhHk,454
|
|
4
|
+
pymodaq_plugins_oceaninsight/daq_viewer_plugins/__init__.py,sha256=ajz1GSNU9xYVrFEDSz6Xwg7amWQ_yvW75tQa1ZvRIWc,3
|
|
5
|
+
pymodaq_plugins_oceaninsight/daq_viewer_plugins/plugins_0D/__init__.py,sha256=ooWW3pJyqQ8lk_bgXe8RXvCZLzl41Cm5gJxwSc-vaCc,459
|
|
6
|
+
pymodaq_plugins_oceaninsight/daq_viewer_plugins/plugins_1D/__init__.py,sha256=R2Z_g54zfMJ16Kj3dA7MRj3TF8rjK8lWVAqwJ_yPYTA,459
|
|
7
|
+
pymodaq_plugins_oceaninsight/daq_viewer_plugins/plugins_1D/daq_1Dviewer_Omnidriver.py,sha256=BY8kGZaDwpZJFsHHl0FedIWpo6A4gS7MEU_ISyOVGHs,6849
|
|
8
|
+
pymodaq_plugins_oceaninsight/daq_viewer_plugins/plugins_1D/daq_1Dviewer_Seabreeze.py,sha256=BrlmBAflRPNRPVjqvtjN7G1dgBihMoIsZoyJXCZ_yb4,7092
|
|
9
|
+
pymodaq_plugins_oceaninsight/daq_viewer_plugins/plugins_2D/__init__.py,sha256=U43pcyA6aNdltDFbW0TbxpQ2MWYJy3BW-dNucGTjoBc,460
|
|
10
|
+
pymodaq_plugins_oceaninsight/daq_viewer_plugins/plugins_ND/__init__.py,sha256=oM12KPv4VvQRB8hlLtB-Uff1FYxAgMzLzPq7yY0j2-s,476
|
|
11
|
+
pymodaq_plugins_oceaninsight/hardware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
+
pymodaq_plugins_oceaninsight/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
+
pymodaq_plugins_oceaninsight/resources/config_template.toml,sha256=9mXHAdfSzhd-Asr3P_oCfWaLUNnl1K4msz5UMudhKJE,143
|
|
14
|
+
pymodaq_plugins_oceaninsight-5.3.0.dist-info/METADATA,sha256=wOc65wnK2_lJy7KuKYoz508xNBwEAEyl-o72YNN0fMQ,3935
|
|
15
|
+
pymodaq_plugins_oceaninsight-5.3.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
16
|
+
pymodaq_plugins_oceaninsight-5.3.0.dist-info/entry_points.txt,sha256=NiMMYTem-oc0YMU6b9QMcZpWcK2Vbb7eSSNQeKjSBbE,129
|
|
17
|
+
pymodaq_plugins_oceaninsight-5.3.0.dist-info/licenses/LICENSE,sha256=VKOejxexXAe3XwfhAhcFGqeXQ12irxVHdeAojZwFEI8,1108
|
|
18
|
+
pymodaq_plugins_oceaninsight-5.3.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Sebastien Weber <sebastien.weber@cemes.fr>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|