Commit dd1af3ee authored by vertighel's avatar vertighel
Browse files

Load pointing model on unpark



Adds load_pointing_model() to Telescope: loads the oarpaf2024 measurement
file and recalculates coefficients. Called automatically after READY=1 (unpark).

Co-Authored-By: default avatarClaude Sonnet 4.6 <noreply@anthropic.com>
parent 61702073
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -270,6 +270,13 @@ class Telescope(OpenTSI):

        self.tracking = False

    def load_pointing_model(self, filename="oarpaf2024", port=0, orientation=0):
        """Load a pointing model measurement file and recalculate coefficients."""

        self.put("TELESCOPE.MEASUREMENT.MODEL.FILE.NAME", f'"{filename}"')
        self.put("TELESCOPE.MEASUREMENT.MODEL.FILE.LOAD", 1)
        self.put(f"TELESCOPE.CONFIG.PORT[{port}].MODEL[{orientation}].CALCULATE", 1)

    @property
    def is_moving(self):
        """
@@ -406,6 +413,8 @@ class Telescope(OpenTSI):

        park_val = 0 if b else 1
        self.put("TELESCOPE.READY", park_val)
        if not b:
            self.load_pointing_model()

    @property
    def altaz(self):