Skip to content

Tickets/SITCOM-2130 - Add notebook to study M1M3 faults vs elevation angle#192

Open
b1quint wants to merge 5 commits intodevelopfrom
tickets/SITCOM-2130
Open

Tickets/SITCOM-2130 - Add notebook to study M1M3 faults vs elevation angle#192
b1quint wants to merge 5 commits intodevelopfrom
tickets/SITCOM-2130

Conversation

@b1quint
Copy link
Member

@b1quint b1quint commented Jul 14, 2025

No description provided.

b1quint added 2 commits July 14, 2025 19:29
- Fix import inside __init__
- Change code in info.py to comply with flake8
- Query m1m3 faults using m1m3.logevent_logMessages
- Keep only ERROR or CRITICAL fault messages
- Query telescope position for every fault
- Plot the data
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@b1quint b1quint requested a review from Copilot July 14, 2025 21:02

This comment was marked as outdated.

The notebook is simply a implementation of the
lsst.sitcom.vandv.m1m3.sitcom2130 module
@b1quint b1quint force-pushed the tickets/SITCOM-2130 branch from 10f4d10 to f5b7c53 Compare July 15, 2025 02:39
@b1quint b1quint requested a review from Copilot July 15, 2025 02:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new analysis module and notebook to study M1M3 fault occurrences as a function of telescope elevation angle.

  • Adds sitcom2130.py with async functions to fetch M1M3 faults and TMA elevation, map them together, and produce a diagnostic plot.
  • Updates info.py to remove an unused import and simplify the get_node fallback.
  • Adjusts package imports in __init__.py and adds a Jupyter notebook demonstrating the end-to-end workflow.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
python/lsst/sitcom/vandv/m1m3/sitcom2130.py New module for querying faults, mapping elevations, and plotting
python/lsst/sitcom/vandv/info.py Dropped unused lsst.ts.utils import and switched lambda to def
python/lsst/sitcom/vandv/init.py Changed wildcard import of info to explicit module import
notebooks/tel_and_site/subsys_req_ver/m1m3/SITCOM-2130_faults_vs_elevation.ipynb Added notebook showcasing the analysis and plotting workflow
Comments suppressed due to low confidence (4)

python/lsst/sitcom/vandv/m1m3/sitcom2130.py:148

  • The docstring lacks a Returns section. Add one to indicate that this function returns a matplotlib Figure object.
def plot_faults_vs_elevation(df: pd.DataFrame):

python/lsst/sitcom/vandv/m1m3/sitcom2130.py:19

  • These new async query and mapping functions don’t have accompanying unit tests. Adding tests will help ensure correct behavior and guard against regressions.
async def query_m1m3_faults(day_obs_start: int, day_obs_end: int) -> pd.DataFrame:

python/lsst/sitcom/vandv/init.py:11

  • Switching from from .info import * to from . import info changes how info symbols are accessed and may break existing consumers. Consider updating downstream code or keeping a non-breaking import alias.
from . import info

python/lsst/sitcom/vandv/m1m3/sitcom2130.py:95

  • Wrapping df in pd.DataFrame may be redundant if client.influx_client.query already returns a DataFrame. You can return df directly or verify the return type to simplify this function.
    return pd.DataFrame(df)

b1quint added 2 commits July 15, 2025 08:18
- Add short explanation related to undesired faults
- Filter out interlock faults from the histogram
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant