Skip to content

Commit ee7842a

Browse files
committed
Camera: remove "transform" setting (#260)
We have `Camera.set_transform` and `Camera.get_transform` methods to control the client transform. There is also a readout transform (only used by PVCamera at the moment). The transform setting exposes the merge of the those two. We want settings to be device specific stuff and not general camera stuff that should be a ABC method. This commit removes the transform setting from Camera.
1 parent d5e6c39 commit ee7842a

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

NEWS.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ Version 0.7.0 (upcoming)
2323
removed from the base class and is now only kept by cameras that
2424
actually make use of it, namely, ``PVCamera`` and ``AndorAtmcd``.
2525

26+
* All cameras had ``"transform"`` setting. This has been removed.
27+
Use the ``get_transform`` and ``set_transform`` methods instead.
28+
The result may be different since the ``"transform"`` setting also
29+
exposed any internal transformation after readout.
30+
2631
* All filterwheels had a ``"position"`` setting which was redundant
2732
with the related get/set methods. The setting was been removed.
2833

microscope/abc.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -836,8 +836,6 @@ class Camera(TriggerTargetMixin, DataDevice):
836836
837837
"""
838838

839-
ALLOWED_TRANSFORMS = [p for p in itertools.product(*3 * [[False, True]])]
840-
841839
def __init__(self, **kwargs) -> None:
842840
super().__init__(**kwargs)
843841
# Transforms to apply to data (fliplr, flipud, rot90)
@@ -847,14 +845,6 @@ def __init__(self, **kwargs) -> None:
847845
self._client_transform = (False, False, False)
848846
# Result of combining client and readout transforms
849847
self._transform = (False, False, False)
850-
# A transform provided by the client.
851-
self.add_setting(
852-
"transform",
853-
"enum",
854-
lambda: Camera.ALLOWED_TRANSFORMS.index(self._transform),
855-
lambda index: self.set_transform(Camera.ALLOWED_TRANSFORMS[index]),
856-
Camera.ALLOWED_TRANSFORMS,
857-
)
858848
self.add_setting("roi", "tuple", self.get_roi, self.set_roi, None)
859849

860850
def _process_data(self, data):

0 commit comments

Comments
 (0)