Skip to content

Commit

Permalink
Improve logging in FocusSweepLatiss.configure.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoRocchietti committed Oct 18, 2024
1 parent f2765e0 commit c7b480e
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions python/lsst/ts/standardscripts/auxtel/focus_sweep_latiss.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,20 +111,24 @@ async def configure(self, config):
Script configuration, as defined by `schema`.
"""
await super().configure(config=config)
self.log.debug("Applying unit translation from um to mm for ATHexapod use.")
self.log.debug(
"Original values in um from base class configuration are:\n "
f"focus_window = {self.config.focus_window} um\n"
f"focus_step_sequence = {self.config.focus_step_sequence} um"
)
original_focus_window = self.config.focus_window
original_focus_step_sequence = self.config.focus_step_sequence
self.config.focus_window *= 0.001 # Transform from um to mm
self.config.focus_step_sequence = [
step * 0.001 for step in self.config.focus_step_sequence # Transform to mm
]
self.log.debug(
"Translated values:\n "
f"focus_window = {self.config.focus_window} mm\n"
f"focus_step_sequence = {self.config.focus_step_sequence} mm"
f"""Applying unit conversion from um to mm for ATHexapod use.
Original values in um from base class configuration are:
focus_window = {original_focus_window} um
focus_step_sequence = {original_focus_step_sequence} um
Converted values:
focus_window = {self.config.focus_window} mm
focus_step_sequence = {self.config.focus_step_sequence} mm
"""
)

def get_instrument_configuration(self) -> dict:
Expand Down

0 comments on commit c7b480e

Please sign in to comment.