Skip to content

Commit

Permalink
Moved signals into interface, from hardware spec. I assume this is al…
Browse files Browse the repository at this point in the history
…lowed (?) and it better represents how the interface functions.
  • Loading branch information
lange50 committed Mar 26, 2025
1 parent 3c1093e commit 20eb17e
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 24 deletions.
4 changes: 0 additions & 4 deletions src/qudi/hardware/camera/andor_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ class AndorCamera(CameraInterface):
default=1.0
)

# signals
sigFrameChanged = QtCore.Signal(np.ndarray)
sigAcquisitionFinished = QtCore.Signal()

# Specify that camera should run in its own thread:
_threaded = True

Expand Down
3 changes: 0 additions & 3 deletions src/qudi/hardware/daq/nidaq.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ class NIDAQ(DAQReaderInterface):
missing='warn'
)


# signals
sigNewData = QtCore.Signal(object) # is a List[ReaderVal]

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
Expand Down
4 changes: 1 addition & 3 deletions src/qudi/hardware/laser/solstis_laser.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ class SolstisLaser(ScanningLaserInterface):
_scan_rate = StatusVar(name='scan_rate', default=TeraScanRate.SCAN_RATE_FINE_LINE_10_GHZ)
_scan_type= StatusVar(name='scan_type', default=TeraScanType.SCAN_TYPE_FINE)

# signals
sigScanStarted = QtCore.Signal()
sigScanFinished = QtCore.Signal()



# status variables:
Expand Down
4 changes: 1 addition & 3 deletions src/qudi/hardware/powermeter/thorlabs_power_meter.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ class ThorlabsPowerMeter(SimplePowermeterInterface):
_update_interval = ConfigOption(name='update_period',
default=0,
missing='info')

# signals
sigNewData = QtCore.Signal(float)


# Run this in its own thread:
_threaded = True
Expand Down
4 changes: 0 additions & 4 deletions src/qudi/hardware/servo/thorlabs_servo.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ class ThorlabsServo(MotorInterface):
missing='error'
)

# signals
sigMoveStarted = QtCore.Signal()
sigMoveFinished = QtCore.Signal()

# Run in separate thread:
_threaded = True

Expand Down
5 changes: 0 additions & 5 deletions src/qudi/hardware/timetagger/swabian_tagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ class SwabianTimeTagger(FastCounterInterface):
default={'counts': 0},
missing='warn'
)


# Signals:
sigScanStarted = QtCore.Signal()
sigScanFinished = QtCore.Signal(np.ndarray)

# set to threaded:
_threaded = True
Expand Down
2 changes: 0 additions & 2 deletions src/qudi/hardware/wavemeter/high_finesse_wavemeter.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ class HighFinesseWavemeter(SimpleWavemeterInterface):
module.Class: 'wavemeter.high_finesse_wavemeter.HighFinesseWavemeter'
"""

sigWavelengthUpdated = QtCore.Signal(np.ndarray) # 1-d array of wavelengths in nm

_threaded = True

def on_activate(self):
Expand Down
6 changes: 6 additions & 0 deletions src/qudi/interface/camera_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,18 @@
"""

from abc import abstractmethod
from PySide2 import QtCore
import numpy as np
from qudi.core.module import Base


class CameraInterface(Base):
""" This interface is used to manage and visualize a simple camera
"""

# signals
sigFrameChanged = QtCore.Signal(np.ndarray)
sigAcquisitionFinished = QtCore.Signal()

@abstractmethod
def get_name(self):
Expand Down
4 changes: 4 additions & 0 deletions src/qudi/interface/daq_reader_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

from enum import Enum
from abc import abstractmethod
from PySide2 import QtCore
from typing import List, Sequence
from qudi.core.module import Base

Expand Down Expand Up @@ -51,6 +52,9 @@ def __init__(self,


class DAQReaderInterface(Base):

# signals
sigNewData = QtCore.Signal(object) # is a List[ReaderVal]
@property
@abstractmethod
def active_channels(self) -> List[str]:
Expand Down
6 changes: 6 additions & 0 deletions src/qudi/interface/fast_counter_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"""

from abc import abstractmethod
from PySide2 import QtCore
import numpy as np
from qudi.core.module import Base


Expand All @@ -39,6 +41,10 @@ class FastCounterInterface(Base):
generally enough for a lot of experiment, where a memory consuming 2d array is not necessary.
"""

# Signals:
sigScanStarted = QtCore.Signal()
sigScanFinished = QtCore.Signal(np.ndarray)

@abstractmethod
def get_constraints(self):
Expand Down
5 changes: 5 additions & 0 deletions src/qudi/interface/motor_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

from typing import List
from abc import abstractmethod
from PySide2 import QtCore
from qudi.core.module import Base

class MotorInterface(Base):
Expand All @@ -33,6 +34,10 @@ class MotorInterface(Base):
and a temperature regulation control.
"""

# signals
sigMoveStarted = QtCore.Signal()
sigMoveFinished = QtCore.Signal()

@abstractmethod
def get_motion_limits(self) -> List[float]:
Expand Down
6 changes: 6 additions & 0 deletions src/qudi/interface/scanning_laser_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
from enum import IntEnum
from abc import abstractmethod
from typing import List
from PySide2 import QtCore

from qudi.core.module import Base

class ShutterState(IntEnum):
Expand All @@ -47,6 +49,10 @@ class ScanningLaserInterface(Base):
and a temperature regulation control.
"""

# signals
sigScanStarted = QtCore.Signal()
sigScanFinished = QtCore.Signal()

@abstractmethod
def get_power_range(self) -> List[float]:
Expand Down
4 changes: 4 additions & 0 deletions src/qudi/interface/simple_powermeter_interface.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from abc import abstractmethod
from PySide2 import QtCore
from qudi.core.module import Base


Expand All @@ -8,6 +9,9 @@ class SimplePowermeterInterface(Base):
"""

# signals
sigNewData = QtCore.Signal(float)

@abstractmethod
def get_power(self) -> float:
""" Retrieve the current wavelength(s) from the wavemeter
Expand Down
3 changes: 3 additions & 0 deletions src/qudi/interface/simple_wavemeter_interface.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import numpy as np
from PySide2 import QtCore
from abc import abstractmethod
from qudi.core.module import Base

Expand All @@ -8,6 +9,8 @@ class SimpleWavemeterInterface(Base):
"""

sigWavelengthUpdated = QtCore.Signal(np.ndarray) # 1-d array of wavelengths in nm

@abstractmethod
def get_wavelengths(self) -> np.ndarray:
""" Retrieve the current wavelength(s) from the wavemeter
Expand Down

0 comments on commit 20eb17e

Please sign in to comment.