Skip to content

Commit

Permalink
Updates removing ts_ofc
Browse files Browse the repository at this point in the history
  • Loading branch information
gmegh committed Sep 13, 2023
1 parent 543aaa6 commit 1b14d85
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions python/lsst/ts/standardscripts/maintel/closed_loop_cwfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@
import yaml
from lsst.ts import salobj
from lsst.ts.observatory.control import RemoteGroup
from lsst.ts.observatory.control.maintel.lsstcam import LSSTCam, LSSTCamUsages
from lsst.ts.observatory.control.maintel.comcam import ComCam, ComCamUsages
from lsst.ts.observatory.control.maintel.mtcs import MTCS, MTCSUsages
from lsst.ts.observatory.control.remote_group import Usages
from lsst.ts.ofc import OFCController, OFCData

STD_TIMEOUT = 10

Expand Down Expand Up @@ -148,8 +147,8 @@ def __init__(self, index=1, add_remotes=True, descr=""):
mtcs_usage = None if add_remotes else MTCSUsages.DryTest
self.mtcs = MTCS(self.domain, intended_usage=mtcs_usage, log=self.log)

lsstcam_usage = None if add_remotes else LSSTCamUsages.StateTransition
self.lsstcam = LSSTCam(
lsstcam_usage = None if add_remotes else ComCamUsages.StateTransition
self.lsstcam = ComCam(
self.domain,
intended_usage=lsstcam_usage,
log=self.log,
Expand All @@ -167,22 +166,8 @@ def __init__(self, index=1, add_remotes=True, descr=""):
# exposure time for the intra/extra images (in seconds)
self.exposure_time = None

ofc_controller = OFCController(OFCData("lsst"))
self.authority = ofc_controller.authority()

# end of configurable attributes

@abc.abstractmethod
async def run_align(self) -> None:
"""Runs curvature wavefront sensing code.
Returns
-------
results : `LSSTCamAlignResults`
A dataclass containing the results of the calculation.
"""
raise NotImplementedError()

@classmethod
def get_schema(cls) -> typing.Dict[str, typing.Any]:
schema_yaml = """
Expand Down Expand Up @@ -381,11 +366,10 @@ async def arun(self, checkpoint: bool = False) -> None:
flush=False, timeout=self.timeout_std
)

tolerance_vector = self.threshold * self.authority
if abs(dof_offset) < tolerance_vector:
if abs(dof_offset) < self.threshold:
self.log.info(
f"OFC offsets are inside tolerance level \
({tolerance_vector:0.3f}). "
({self.threshold:0.3f}). "
)
if checkpoint:
await self.checkpoint(f"[{i + 1}/{self.max_iter}]: CWFS converged.")
Expand Down

0 comments on commit 1b14d85

Please sign in to comment.