Skip to content

Commit

Permalink
Minor tests and docs bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexShkarin committed Oct 4, 2022
1 parent 4084231 commit 1343a5f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/devices/Cryocon.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
CryoCon temperature sensors
==============================

CryoCon manufactures a range of temperature sensor controllers and resistance bridges, which are also used for temperature sensing. There is some overlap between different products, but they still use fairly distinct interfaces and interaction patterns. The code has been tested with CryoCon 14C temperature controller.
CryoCon manufactures a range of temperature sensor controllers and resistance bridges, which are also used for temperature sensing. The code has been tested with CryoCon 14C temperature controller.

The main device class is :class:`pylablib.devices.Cryocon.Cryocon1x<.Cryocon.base.Cryocon1x>`.

Expand Down
2 changes: 1 addition & 1 deletion pylablib/core/dataproc/table_wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ def __init__(self, wrapper, storage):
self._wrapper=wrapper
self._storage=storage
def __iter__(self):
for _,c in self._storage.iteritems():
for _,c in self._storage.items():
yield c
def __getitem__(self, idx):
return self._storage.iloc[:,idx]
Expand Down
31 changes: 30 additions & 1 deletion tests/devices/test_cameras.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from pylablib.devices import Thorlabs
from pylablib.devices import Photometrics
from pylablib.devices import PrincetonInstruments
from pylablib.devices import Basler


from .test_basic_camera import ROICameraTester
Expand Down Expand Up @@ -150,6 +151,24 @@ def test_large_acq(self, devopener):



class TestPhotonFocusBitFlow(ROICameraTester):
"""Testing class for PhotonFocus camera with BitFlow interface"""
devname="photon_focus_bitflow"
devcls=PhotonFocus.PhotonFocusBitFlowCamera
rois=gen_rois(128)

def check_status_line(self, frames):
slines=PhotonFocus.get_status_lines(np.asarray(frames))
assert slines is not None
assert np.all(slines[1:,0]-slines[:-1,0]==1)

@pytest.fixture(scope="class")
def library_parameters(self):
pylablib.par["devices/dlls/pfcam"]="../dlls/libs/x32"




class TestIMAQdx(ROICameraTester):
"""Testing class for IMAQdx camera interface"""
devname="imaqdx"
Expand Down Expand Up @@ -217,4 +236,14 @@ class TestPICam(ROICameraTester):
_exposure_precision=1E-4
@classmethod
def post_open(cls, device):
device.enable_metadata(True)
device.enable_metadata(True)





class TestBasler(ROICameraTester):
"""Testing class for Basler pylon camera interface"""
devname="basler_pylon"
devcls=Basler.BaslerPylonCamera
rois=gen_rois(64)

0 comments on commit 1343a5f

Please sign in to comment.