Skip to content
Snippets Groups Projects
Commit cea3c2a2 authored by Oli Patane's avatar Oli Patane
Browse files

Moved around PI_CHANNELS in config.py so they are made using PI_DICT so they...

Moved around PI_CHANNELS in config.py so they are made using PI_DICT so they dont take up so much space. in pi.py, I changed the plotting of the top two plots to have a small loop since we plot the exact same thing twice and later on just change the x-axis. I also changed the labels for the top two plots so that they display both the channel name and the frequency of the data in that channel that is being plotted
parent bc9fe7af
No related branches found
No related tags found
No related merge requests found
......@@ -790,30 +790,16 @@ for key in LSC_ASC_CHANNELS:
##################################################
if IFO == 'H1':
PI_CHANNELS = [
'OMC-PI_DOWNCONV_DC2_SIG_OUT_DQ',
'OMC-PI_DOWNCONV_DC6_SIG_OUT_DQ',
'OMC-PI_DOWNCONV_DC7_SIG_OUT_DQ',
]
PI_DICT = {
f'{IFO}:OMC-PI_DOWNCONV_DC2_SIG_OUT_DQ': '80 kHz (PI28, PI29)',
f'{IFO}:OMC-PI_DOWNCONV_DC2_SIG_OUT_DQ': '80.0 kHz (PI28, PI29)',
f'{IFO}:OMC-PI_DOWNCONV_DC6_SIG_OUT_DQ': '14.5 kHz (PI15, PI16)',
f'{IFO}:OMC-PI_DOWNCONV_DC7_SIG_OUT_DQ': '10 kHz (PI24, PI31)',
f'{IFO}:OMC-PI_DOWNCONV_DC7_SIG_OUT_DQ': '10.0 kHz (PI24, PI31)',
}
PI_SAT_THRESH = 5e-3
PI_YLABEL = 'Downconverted Signal [mA]' # BP, shift down, then LP
PI_YLIMS = [-1.5e-2, 1.5e-2]
if IFO == 'L1':
PI_CHANNELS = [
'OMC-BLRMS_32_BAND1_LOG10_OUTMON',
'OMC-BLRMS_32_BAND2_LOG10_OUTMON',
'OMC-BLRMS_32_BAND3_LOG10_OUTMON',
'OMC-BLRMS_32_BAND4_LOG10_OUTMON',
'OMC-BLRMS_32_BAND5_LOG10_OUTMON',
'OMC-BLRMS_32_BAND6_LOG10_OUTMON',
'OMC-BLRMS_32_BAND7_LOG10_OUTMON',
]
PI_DICT = {
f'{IFO}:OMC-BLRMS_32_BAND1_LOG10_OUTMON': '2.5 - 8 kHz',
f'{IFO}:OMC-BLRMS_32_BAND2_LOG10_OUTMON': '8 - 12 kHz',
......@@ -827,7 +813,9 @@ if IFO == 'L1':
PI_YLABEL = 'Band-Limited RMS [log]'
PI_YLIMS = [0, 1]
PI_CHANNELS = ifochans(PI_CHANNELS)
PI_CHANNELS = []
for chan in PI_DICT:
PI_CHANNELS.append(chan)
PI_SEARCH_WINDOW = [-(8*60), 5]
......
......@@ -78,22 +78,18 @@ def check_pi(event):
for idx, buf in enumerate(PI_channels):
srate = buf.sample_rate
t = np.arange(segment[0], segment[1], 1/srate)
ax1.plot(
t-event.gps,
buf.data,
label=buf.channel,
alpha=0.8,
lw=2,
)
ax2.plot(
t-event.gps,
buf.data,
label=config.PI_DICT[buf.channel],
alpha=0.8,
lw=2,
)
# Plot all OMC PI channels on top two plots
for ax in [ax1, ax2]:
ax.plot(
t-event.gps,
buf.data,
label=f'{buf.channel[3:]}: {config.PI_DICT[buf.channel]}',
alpha=0.8,
lw=2,
)
# Configuring top two plots
for ax in [ax1, ax2]:
# Add dotted lines at thresholds
# Add dotted thresholds to the plots
ax.axhline(
config.PI_SAT_THRESH,
linestyle='--',
......@@ -107,7 +103,6 @@ def check_pi(event):
color='black',
lw=5,
)
# Configuring top two plots
ax.set_xlabel(f'Time [s] since lock loss at {event.gps}', labelpad=10)
ax.set_ylabel(config.PI_YLABEL)
ax.set_ylim(config.PI_YLIMS[0], config.PI_YLIMS[1])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment