Skip to content

Commit

Permalink
Use focus-temperature relationship for focus
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Aug 14, 2023
1 parent a8d10d0 commit 6cc54ca
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
9 changes: 8 additions & 1 deletion src/gort/devices/guider.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,16 @@ async def focus(

if guess is None:
guess = self.gort.config["guiders"]["focus"]["guess"][self.name]
if isinstance(guess, (list, tuple)):
sensor_data = await self.gort.telemetry[self.name].status()
temp = sensor_data["sensor1"]["temperature"]
guess = guess[0] * temp + guess[1]

try:
self.write_to_log(f"Focusing telescope {self.name}.", "info")
self.write_to_log(
f"Focusing telescope {self.name} with initial guess {guess:.1f}.",
"info",
)
await self.actor.commands.focus(
reply_callback=self._parse_focus,
guess=guess,
Expand Down
2 changes: 1 addition & 1 deletion src/gort/devices/telescope.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ async def goto_coordinates(

# Check if we reached the position. If not retry once or fail.
separation = angular_separation(*commanded, *reported)
if separation > 0.1:
if separation > 0.5:
if retry:
self.write_to_log(
"Telescope failed to reach the desired position. Retrying",
Expand Down
16 changes: 8 additions & 8 deletions src/gort/etc/lvmgort.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ telescopes:
moveRelative: 30
moveToHome: 60
pointing_offsets:
sci: [-1618, -848]
skye: [-251, -15]
skyw: [-393, 119]
spec: [4250, 0]
sci: [0, 0]
skye: [0, 0]
skyw: [0, 0]
spec: [0, 0]
named_positions:
park:
all:
Expand Down Expand Up @@ -120,10 +120,10 @@ guiders:
actor: lvm.skyw.guider
focus:
guess:
sci: 36
skye: 36
skyw: 36
spec: 37
sci: [0.154, 34.278]
skye: [0.134, 34.405]
skyw: [0.164, 34.364]
spec: [0.186, 35.188]

nps:
devices:
Expand Down

0 comments on commit 6cc54ca

Please sign in to comment.