Skip to content

Commit

Permalink
Update plots style
Browse files Browse the repository at this point in the history
  • Loading branch information
b1quint committed Sep 29, 2023
1 parent 55ab3f9 commit 2cdefab
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def customize_hp_plot(
ax.set_xlabel("Time [UTC]")
ax.set_ylabel("HP Measured Forces [N]")
ax.grid(":", alpha=0.2)
ax.legend(ncol=4, handles=lines)
ax.legend(ncol=4, handles=lines, fontsize="x-small")


def plot_velocity_data(ax: plt.Axes, dataset: M1M3ICSAnalysis) -> None:
Expand All @@ -133,7 +133,7 @@ def plot_velocity_data(ax: plt.Axes, dataset: M1M3ICSAnalysis) -> None:
ax.plot(dataset.df["el_actual_velocity"], color="teal", label="El Velocity")
ax.grid(":", alpha=0.2)
ax.set_ylabel("Actual Velocity\n [deg/s]")
ax.legend(ncol=2, fontsize="small")
ax.legend(ncol=2, fontsize="x-small")


def plot_torque_data(ax: plt.Axes, dataset: M1M3ICSAnalysis) -> None:
Expand All @@ -151,7 +151,7 @@ def plot_torque_data(ax: plt.Axes, dataset: M1M3ICSAnalysis) -> None:
ax.plot(dataset.df["el_actual_torque"], color="salmon", label="El Torque")
ax.grid(":", alpha=0.2)
ax.set_ylabel("Actual Torque\n [kN.m]")
ax.legend(ncol=2)
ax.legend(ncol=2, fontsize="x-small")


def plot_stable_region(
Expand Down Expand Up @@ -218,8 +218,8 @@ def finalize_and_save_figure(

def plot_hp_measured_data(
dataset: M1M3ICSAnalysis,
dpi: float = 120,
figsize: tuple[float, float] = (9, 6),
dpi: float = 180,
figsize: tuple[float, float] = (15, 10),
log: None | logging.Logger = None,
) -> None:
"""
Expand Down
24 changes: 14 additions & 10 deletions python/lsst/summit/testing/analysis/type_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@


class Event(Protocol):
"""TMA Event."""

@property
def dayObs(self) -> int:
"""Day of the observation."""
Expand All @@ -16,42 +18,44 @@ def seqNum(self) -> int:

@property
def version(self) -> int:
"""Version of the TMAEventMaker"""
"""Version of the TMAEventMaker."""


class M1M3ICSAnalysis(Protocol):
"""M1M3ICSAnalysis"""

Check failure on line 25 in python/lsst/summit/testing/analysis/type_utils.py

View workflow job for this annotation

GitHub Actions / lint

Ruff (D400)

python/lsst/summit/testing/analysis/type_utils.py:25:5: D400 First line should end with a period

Check failure on line 25 in python/lsst/summit/testing/analysis/type_utils.py

View workflow job for this annotation

GitHub Actions / lint

Ruff (D400)

python/lsst/summit/testing/analysis/type_utils.py:25:5: D400 First line should end with a period

@property
def event(self) -> Event:
"""Event"""
"""Event."""

@property
def inner_pad(self) -> u.Quantity:
"""Inner pad"""
"""Inner pad."""

@property
def outer_pad(self) -> u.Quantity:
"""Outer pad"""
"""Outer pad."""

@property
def n_sigma(self) -> int:
"""Number of sigma"""
"""Number of sigma."""

@property
def client(self) -> EfdClient:
"""EFD client"""
"""EFD client."""

@property
def number_of_hardpoints(self) -> int:
"""Number of hardpoints"""
"""Number of hardpoints."""

@property
def measured_forces_topics(self) -> list:
"""Measured forces topics"""
"""Measured forces topics."""

@property
def df(self) -> pd.DataFrame:
"""Dataframe"""
"""Dataframe."""

@property
def stats(self) -> pd.DataFrame:
"""Statistics"""
"""Statistics."""

0 comments on commit 2cdefab

Please sign in to comment.