Skip to content

Commit

Permalink
Fix gui default start and stop wavelengths
Browse files Browse the repository at this point in the history
default scan tyep and rate still not working

Save data is not working
  • Loading branch information
lange50 committed Apr 28, 2025
1 parent bc216ce commit 80d5c68
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
9 changes: 9 additions & 0 deletions src/qudi/gui/terascan/terascan_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,13 @@ def on_activate(self):
self._mw = TerascanMainWindow()
# ← populate start/stop λ in nm from the logic’s µm values
# TODO: Should I do this with a signal from the logic instead?
# TODO: Why isn't this working?
logic = self._terascan_logic()
self._mw.start_wavelength.setValue(logic.get_start_wavelength())
self._mw.stop_wavelength.setValue(logic.get_stop_wavelength())
# same for rate and teyp
self._mw.scan_rate.setCurrentIndex(logic.get_scan_rate())
self._mw.scan_type.setCurrentIndex(logic.get_scan_type())

# populate combo-boxes with entries from the logic
for txt, scan_type in self._terascan_logic().scan_types.items():
Expand Down Expand Up @@ -172,6 +176,11 @@ def _start_stop_pressed(self):
if self._mw.start_stop_button.text() == 'Start Measurement':
self.sigStartMeasurement.emit()
self._terascan_logic().clear_data()
# TODO: This should be a signal
self._terascan_logic().clear_data()
start_wl = self._terascan_logic().start_wavelength
stop_wl = self._terascan_logic().stop_wavelength
self._mw.plot_widget.setXRange(start_wl, stop_wl)
else:
self.sigStopMeasurement.emit()

Expand Down
10 changes: 5 additions & 5 deletions src/qudi/hardware/laser/solstis_laser.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def __status_update(self):
class TeraScanType(Enum):
SCAN_TYPE_MEDIUM = 1
SCAN_TYPE_FINE = 2
SCAN_TYPE_LINE = 3
# SCAN_TYPE_LINE = 3 # We don't have this capability yet

class TeraScanRate(Enum):
SCAN_RATE_MEDIUM_100_GHZ = 4
Expand All @@ -431,7 +431,7 @@ class TeraScanRate(Enum):
SCAN_RATE_FINE_LINE_5_MHZ = 23
SCAN_RATE_FINE_LINE_2_MHZ = 24
SCAN_RATE_FINE_LINE_1_MHZ = 25
SCAN_RATE_LINE_500_KHZ = 26
SCAN_RATE_LINE_200_KHZ = 27
SCAN_RATE_LINE_100_KHZ = 28
SCAN_RATE_LINE_50_KHZ = 29
# SCAN_RATE_LINE_500_KHZ = 26
# SCAN_RATE_LINE_200_KHZ = 27
# SCAN_RATE_LINE_100_KHZ = 28
# SCAN_RATE_LINE_50_KHZ = 29

0 comments on commit 80d5c68

Please sign in to comment.