Commit e1c2c1c5 authored by vertighel's avatar vertighel
Browse files

Add xystart/xyend properties to atik.Camera



STX had these as properties; Atik only computed them inside .all.
Values are derived from _subframe (kept in sync by all windowing
methods) and divided by current binning, matching STX semantics.

Co-Authored-By: default avatarClaude Sonnet 4.6 <noreply@anthropic.com>
parent a25f7a4d
Loading
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -232,6 +232,22 @@ class Camera(BaseDevice):
    def filter(self, n):
        pass

    @property
    def xystart(self):
        x, y, w, h = self._subframe
        bx, by = self.binning
        bx = bx or 1
        by = by or 1
        return [x // bx, y // by]

    @property
    def xyend(self):
        x, y, w, h = self._subframe
        bx, by = self.binning
        bx = bx or 1
        by = by or 1
        return [(x + w) // bx, (y + h) // by]

    @property
    def max_range(self):
        return [self._props.nPixelsX, self._props.nPixelsY]