Skip to content

Commit

Permalink
Only use guide frames in PA plots
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Sep 5, 2023
1 parent ef73c4e commit 8ce948b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lvmguider/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ def plot_position_angle(
continue

camera = camera_solution.camera

frame_data = camera_solution.frame_data()
frame_data = frame_data.loc[frame_data.wcs_mode == "gaia"]

if len(frame_data.pa.dropna()) < 2:
continue
Expand Down Expand Up @@ -270,19 +272,20 @@ def plot_position_angle(
# Now use the PAs from the guider data (i.e., full frame).
guider_data = solution.guider_data()
guider_data = guider_data.loc[guider_data.guide_mode == "guide"]

if len(guider_data.pa.dropna()) >= 2:
ax = axd["global"] # type: ignore
ax.axis("on")

_plot_pa_axes(ax, guider_data, pa_error_mode="first", legend=True)
_plot_pa_axes(ax, guider_data, pa_error_mode="mean", legend=True)

if save_subplots:
create_subplot(
_plot_pa_axes,
get_subplot_path(outpath),
guider_data,
title="Full frame",
pa_error_mode="first",
pa_error_mode="mean",
legend=True,
)

Expand Down

0 comments on commit 8ce948b

Please sign in to comment.