diff --git a/doc/versionHistory.rst b/doc/versionHistory.rst index 45a0547..c650b72 100644 --- a/doc/versionHistory.rst +++ b/doc/versionHistory.rst @@ -3,6 +3,13 @@ ################## Version History ################## +.._lsst.ts.donut.viz-1.4.0 + +------------- +1.4.0 +------------- + +* Add S11-only mode for LsstCam Full Array Mode .._lsst.ts.donut.viz-1.3.0 diff --git a/python/lsst/donut/viz/plot_aos_task.py b/python/lsst/donut/viz/plot_aos_task.py index 22e9dcf..2ca84a0 100644 --- a/python/lsst/donut/viz/plot_aos_task.py +++ b/python/lsst/donut/viz/plot_aos_task.py @@ -242,6 +242,9 @@ class PlotDonutTaskConfig( doc="Upload to RubinTV", default=False, ) + doS11only = pexConfig.Field( + dtype=bool, doc="Use only S11 in FAM mode", default=False + ) class PlotDonutTask(pipeBase.PipelineTask): @@ -309,10 +312,19 @@ def run( q = donutStampsExtra.metadata["BORESIGHT_PAR_ANGLE_RAD"] rotAngle = donutStampsExtra.metadata["BORESIGHT_ROT_ANGLE_RAD"] rtp = q - rotAngle - np.pi / 2 + + # Default multiplication factor and offset + factor = 3 + offset = 7 + match inst: case "LSSTCam" | "LSSTCamSim": nacross = 15 fp_size = 0.55 # 55% of horizontal space + if self.config.doS11only: + factor = 1 + offset = 3 + nacross = 5 case "LSSTComCam" | "LSSTComCamSim": nacross = 3 fp_size = 0.50 # 50% of horizontal space @@ -320,6 +332,7 @@ def run( raise ValueError(f"Unknown instrument {inst}") det_size = fp_size / nacross fp_center = 0.5, 0.475 + fig_dict = dict() for donutStampSet, visit in zip( @@ -330,16 +343,15 @@ def run( aspect = fig.get_size_inches()[0] / fig.get_size_inches()[1] for donut in donutStampSet: det_name = donut.detector_name - # if 'R30' in det_name: - # continue - # if 'S00' in det_name: - # continue - # if 'S01' in det_name: - # continue - i = 3 * int(det_name[1]) + int(det_name[5]) - j = 3 * int(det_name[2]) + int(det_name[6]) - x = i - 7 - y = 7 - j + # For FAM mode, if plotting only S11 corner, do not + # plot anything else + if self.config.doS11only: + if det_name[-2:] != "11": + continue + i = factor * int(det_name[1]) + int(det_name[5]) + j = factor * int(det_name[2]) + int(det_name[6]) + x = i - offset + y = offset - j xp = np.cos(rtp) * x + np.sin(rtp) * y yp = -np.sin(rtp) * x + np.cos(rtp) * y ax, aux_ax = add_rotated_axis(