Skip to content
Snippets Groups Projects
Commit 8f994d90 authored by Timothy O'Hanlon's avatar Timothy O'Hanlon
Browse files

fixed lpy and reformatted various plots

parent 22dccb84
No related branches found
No related tags found
No related merge requests found
Pipeline #690463 failed
......@@ -138,7 +138,7 @@ def check_brs(event):
ax.grid()
ax.set_xlabel('Time [s] since lock loss at {}'.format(event.gps), labelpad=10)
ax.set_ylabel('RMS Velocity [nrad/s]')
ax.set_ylim(0, max_brs+1)
# ax.set_ylim(0, max_brs+1)
ax.set_xlim(t[0]-event.gps, t[-1]-event.gps)
ax.legend(loc='best')
ax.set_title('{} BRS BLRMS'.format(station), y=1.04)
......
......@@ -153,6 +153,11 @@ def channel2lpy_coeffs(channel):
LL_gain = 1
UR_gain = -1
LR_gain = 1
else:
UL_gain = -1
LL_gain = 1
UR_gain = 1
LR_gain = -1
else:
UL_gain = -1
LL_gain = 1
......
......@@ -61,8 +61,8 @@ def check_pi(event):
# ADD H1 code here
if config.IFO == 'L1':
if event.transition_index[0] >= 1300:
logger.info('PI Tag not set up')
# event.add_tag('PI_MONITOR')
#logger.info('PI Tag not set up')
event.add_tag('PI_MONITOR')
else:
logger.info('no PI')
......@@ -82,35 +82,46 @@ def check_pi(event):
alpha=0.8,
lw=2,
)
ax2.plot(
t-event.gps,
buf.data,
label=config.PI_DICT[buf.channel],
alpha=0.8,
lw=2,
if config.IFO == 'L1':
ax2.plot(
t-event.gps,
buf.data,
label=config.PI_DICT[buf.channel],
alpha=0.8,
lw=2,
)
if config.IFO == 'H1':
ax2.plot(
t-event.gps,
buf.data,
label=buf.channel,
alpha=0.8,
lw=2,
)
if config.IFO == 'L1':
ax1.axhline(
config.PI_SAT_THRESH,
linestyle='--',
color='black',
label='PI threshold',
lw=5,
)
ax2.axhline(
config.PI_SAT_THRESH,
linestyle='--',
color='black',
label='PI threshold',
lw=5,
)
ax1.axhline(
config.PI_SAT_THRESH,
linestyle='--',
color='black',
label='PI threshold',
lw=5,
)
ax2.axhline(
config.PI_SAT_THRESH,
linestyle='--',
color='black',
label='PI threshold',
lw=5,
)
ax1.set_xlabel('Time [s] since lock loss at {}'.format(event.gps), labelpad=10)
ax2.set_xlabel('Time [s] since lock loss at {}'.format(event.gps), labelpad=10)
ax1.set_ylabel('Band-Limited RMS [log]')
ax2.set_ylabel('Band-Limited RMS [log]')
ax1.set_xlim(t[0]-event.gps, t[-1]-event.gps)
ax2.set_xlim(-20, 5)
ax1.set_ylim(0, 1)
ax2.set_ylim(0, 1)
if config.IFO == 'L1':
ax1.set_ylim(0, 1)
ax2.set_ylim(0, 1)
ax1.legend(loc='best')
ax2.legend(loc='best')
ax1.set_title('PI BLRMS Monitors')
......
......@@ -14,21 +14,22 @@ from .. import plotutils
##############################################
itmx = mpatches.Patch(color='r', label='ITMX')
itmy = mpatches.Patch(color='b', label='ITMY')
etmx = mpatches.Patch(color='orange', label='ETMX')
etmy = mpatches.Patch(color='k', label='ETMY')
itmx = mpatches.Patch(color='#F05039', label='ITMX')
itmy = mpatches.Patch(color='#EEBAB4', label='ITMY')
etmx = mpatches.Patch(color='#1F449C', label='ETMX')
etmy = mpatches.Patch(color='#7CA1CC', label='ETMY')
tag = mpatches.Patch(color='k', label='Tag Threshold')
def plot_color(string):
if 'ITMX' in string:
return 'r'
return '#F05039'
elif 'ITMY' in string:
return 'b'
return '#EEBAB4'
elif 'ETMX' in string:
return 'orange'
return '#1F449C'
else:
return 'k'
return '#7CA1CC'
def check_violin(event):
......@@ -97,6 +98,28 @@ def check_violin(event):
lw=8,
color=plot_color(buf.channel),
)
if config.IFO == 'L1':
ax1.axhline(
config.VIOLIN_SAT_THRESH,
linestyle='--',
color='black',
label='Violin threshold',
lw=5,
)
ax2.axhline(
config.VIOLIN_SAT_THRESH,
linestyle='--',
color='black',
label='Violin threshold',
lw=5,
)
ax3.axhline(
config.VIOLIN_SAT_THRESH,
linestyle='--',
color='black',
label='Violin threshold',
lw=5,
)
ax1.set_xlabel('Time [s] since lock loss at {}'.format(event.gps), labelpad=10)
ax2.set_xlabel('Time [s] since lock loss at {}'.format(event.gps), labelpad=10)
ax3.set_xlabel('Time [s] since lock loss at {}'.format(event.gps), labelpad=10)
......@@ -106,14 +129,15 @@ def check_violin(event):
ax1.set_xlim(t[0]-event.gps, t[-1]-event.gps)
ax2.set_xlim(t[0]-event.gps, t[-1]-event.gps)
ax3.set_xlim(t[0]-event.gps, t[-1]-event.gps)
'''
if config.IFO == 'L1':
ax1.set_ylim(-18, -14)
ax2.set_ylim(-18, -14)
ax3.set_ylim(-18, -14)
ax1.legend(handles=[itmx, itmy, etmx, etmy], loc='best')
ax2.legend(handles=[itmx, itmy, etmx, etmy], loc='best')
ax3.legend(handles=[itmx, itmy, etmx, etmy], loc='best')
'''
ax1.legend(handles=[itmx, itmy, etmx, etmy, tag], loc='best')
ax2.legend(handles=[itmx, itmy, etmx, etmy, tag], loc='best')
ax3.legend(handles=[itmx, itmy, etmx, etmy, tag], loc='best')
# ax1.legend(loc='best')
ax1.set_title('1st Order Violins')
......
......@@ -67,7 +67,7 @@ def check_wind(event):
ax.grid()
ax.set_xlabel('Time [s] since lock loss at {}'.format(event.gps), labelpad=10)
ax.set_ylabel('Velocity [mph]')
ax.set_ylim(0, max_windspeed+1)
# ax.set_ylim(0, max_windspeed+1)
ax.set_xlim(t[0]-event.gps, t[-1]-event.gps)
ax.legend(loc='best')
ax.set_title('End/corner station wind speeds', y=1.04)
......
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