From e3eea15faa25458eca9d7a5326febae264c527fb Mon Sep 17 00:00:00 2001 From: Marshall Perrin Date: Mon, 16 Oct 2023 12:18:38 -0400 Subject: [PATCH] Update single_measurement_trending_plot to subtract piston before displaying proposed correction OPD --- webbpsf/trending.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webbpsf/trending.py b/webbpsf/trending.py index c85ef053..fcf84f6c 100644 --- a/webbpsf/trending.py +++ b/webbpsf/trending.py @@ -661,6 +661,10 @@ def single_measurement_trending_plot(opdtable, row_index=-1, reference=None, ver iax = axes[2, 2] if show_correction: + # Note, the WSS does not remove piston from the correction so it's not zero mean. + # Fix that here before display. This also affects the derived rms value displayed. + correction -= np.nanmean(correction[correction_mask==1]) + show_opd_image(-correction, ax=iax, vmax=vmax, mask=correction_mask, fontsize=fontsize) iax.set_title(f"Controllable modes\nfrom WSS proposed correction", fontsize=fontsize*1.1)