Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "070195af",
"metadata": {},
"source": [
"# M1M3 Faults vs Elevation Angle\n",
"\n",
"Evaluate the number of M1M3 Faults for different elevation angles\n",
"\n",
"Author: Bruno C. Quint\n",
"Associated tickets:\n",
" - [SITCOM-2130](https://ls.st/SITCOM-2130)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3a43736e",
"metadata": {},
"outputs": [],
"source": [
"day_obs_start = 20250415\n",
"day_obs_end = 20250805"
]
},
{
"cell_type": "markdown",
"id": "a17fef72",
"metadata": {},
"source": [
"## Setup Notebook"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7c674d17",
"metadata": {},
"outputs": [],
"source": [
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "382248a6",
"metadata": {},
"outputs": [],
"source": [
"from lsst.sitcom.vandv.m1m3 import sitcom2130"
]
},
{
"cell_type": "markdown",
"id": "74833fb7-4f10-4f85-863b-3f6ccb088edd",
"metadata": {},
"source": [
"## Analysis\n",
"\n",
"The first plot shows the histogram of the number of faults versus the elevation angle for this period. \n",
"The log-y is needed to show data with fewer faults. \n",
" \n",
"The second plot shows when the faults happened and the elevation angle at that time. "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c93e40cd-03d9-4627-b372-b9a16752540e",
"metadata": {},
"outputs": [],
"source": [
"# Query all the faults inside the time range\n",
"faults_df = await sitcom2130.query_m1m3_faults(day_obs_start, day_obs_end)"
]
},
{
"cell_type": "markdown",
"id": "2aec27df-efb5-4549-81ec-c50d679c9067",
"metadata": {},
"source": [
"M1M3 has lots of different types of faults. \n",
"For the purpose of this analysis, we want to exclude the faults that are not triggered by normal operations. \n",
"These are faults like: door open, lights on, no air, etc. \n",
"The cell below selects the interlock faults \n",
" and print out unique options."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d7c0a5ca-584b-4d3d-a718-51ee484b30e0",
"metadata": {},
"outputs": [],
"source": [
"interlock_faults_df = faults_df[faults_df.errorReport.str.contains(\"Interlock\")]\n",
"print(interlock_faults_df.errorReport.unique())"
]
},
{
"cell_type": "markdown",
"id": "47e72cc8-1c61-4780-82fc-f5ce2b90fc81",
"metadata": {},
"source": [
"Based on the output above, let's exclude the following errors:\n",
" - Interlock Air Supply Off\n",
" - Interlock Aux Power Bus Off\n",
" - Interlock Cabinet Door Opened\n",
" - Interlock lost GIS Heartbeat\n",
" - Interlock Thermal Equipment Off\n",
"\n",
"Let's keep \"Interlock TMA Motion Stop\" because this might come from a fault associated with M1M3. "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e4b9f116-332d-45de-80ce-e3a496805421",
"metadata": {},
"outputs": [],
"source": [
"exclude_errors = [\n",
" \"Interlock Air Supply Off\",\n",
" \"Interlock Aux Power Bus Off\",\n",
" \"Interlock Cabinet Door Opened\",\n",
" \"Interlock lost GIS Heartbeat\",\n",
" \"Interlock Thermal Equipment Off\" \n",
"]\n",
"\n",
"# The ~ means \"not\"\n",
"filtered_faults_df = faults_df[~ faults_df.errorReport.str.contains(\"Interlock\")]"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2f5af03d-fbbc-4d89-b479-9a459432ceb1",
"metadata": {},
"outputs": [],
"source": [
"figure = sitcom2130.plot_faults_vs_elevation(filtered_faults_df)\n",
"figure.savefig(f\"m1m3_faults_vs_tma_elevation_from_{day_obs_start}_to_{day_obs_end}.png\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "cb9ca20a-61b2-42b2-a6b0-95af9d151b6c",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "LSST",
"language": "python",
"name": "lsst"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.11"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
2 changes: 1 addition & 1 deletion python/lsst/sitcom/vandv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
from . import mtaos
from . import slew_and_track
from . import tma
from .info import *
from . import info
5 changes: 3 additions & 2 deletions python/lsst/sitcom/vandv/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import pandas as pd
from astropy.time import Time

from lsst.ts import utils

try:
from lsst.rsp import get_node
Expand All @@ -15,7 +14,9 @@
"Could not find package: lsst.rsp"
" - the node information will not be available"
)
get_node = lambda: "(not available)"

def get_node():
return "(not available)"


__all__ = [
Expand Down
Loading