Tickets/SITCOM-2130 - Add notebook to study M1M3 faults vs elevation angle#192
Open
Tickets/SITCOM-2130 - Add notebook to study M1M3 faults vs elevation angle#192
Conversation
- 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
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
The notebook is simply a implementation of the lsst.sitcom.vandv.m1m3.sitcom2130 module
10f4d10 to
f5b7c53
Compare
Contributor
There was a problem hiding this comment.
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.pywith async functions to fetch M1M3 faults and TMA elevation, map them together, and produce a diagnostic plot. - Updates
info.pyto remove an unused import and simplify theget_nodefallback. - Adjusts package imports in
__init__.pyand 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
Returnssection. 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 *tofrom . import infochanges howinfosymbols 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
dfinpd.DataFramemay be redundant ifclient.influx_client.queryalready returns a DataFrame. You can returndfdirectly or verify the return type to simplify this function.
return pd.DataFrame(df)
- Add short explanation related to undesired faults - Filter out interlock faults from the histogram
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.