Add seismic tag/plots for ground motion exceeding threshold
This is the counterpart to the wind followup submitted recently. This followup checks the z-axis ground motion around the time of a lockloss against a site-specific threshold and creates the 'SEISMIC' tag if it exceeds said threshold. Regardless of whether or not the threshold is exceeded, a plot of the BLRMS velocity and the raw velocity sensor output ('seismic.png') is created and displayed in the 'Environment Plots' section.
Example EQ lockloss at LHO: https://ldas-jobs.ligo-wa.caltech.edu/~yannick.lecoeuche/index.cgi?event=1249101030
Example EQ lockloss at LLO (event directory): https://ldas-jobs.ligo-la.caltech.edu/~yannick.lecoeuche/events/1250/005567/
Also includes a small change to the windy followup which lets it obtain the maximum windspeed between the three channels even if those channels do not exceed the wind threshold for the site.
Merge request reports
Activity
- locklost/plugins/seismic.py 0 → 100644
78 ax2.tick_params(axis='y', colors='seagreen') 79 ax2.set_ylabel('Raw Output Velocity [nm/s]') 80 81 # setting general plot parameters 82 lns = ln1+ln2+[ln3] 83 labs = [l.get_label() for l in lns] 84 ax.legend(lns, labs, loc='best') 85 ax.set_xlabel('Time [s] since lock loss at {}'.format(event.gps), labelpad=10) 86 plt.xlim(blrms_t[0]-event.gps, blrms_t[-1]-event.gps) 87 ax.set_title('Z-axis seismic motion') 88 89 fig.tight_layout(pad=0.05) 90 outfile_plot = 'seismic.png' 91 outpath_plot = os.path.join(event.path, outfile_plot) 92 fig.savefig(outpath_plot, bbox_inches='tight') 93 fig.clf() changed this line in version 2 of the diff
31 31 windy = False 32 32 max_windspeed = 0 33 33 for buf in wind_channels: 34 max_windspeed = max([max_windspeed, max(buf.data)]) 34 35 if any(buf.data > config.WIND_THRESH): 35 max_windspeed = max([max_windspeed, max(buf.data)]) changed this line in version 3 of the diff
- locklost/plugins/seismic.py 0 → 100644
17 18 mod_window = [config.SEI_SEARCH_WINDOW[0], config.SEI_SEARCH_WINDOW[1]] 19 segment = Segment(mod_window).shift(int(event.gps)) 20 seismic_channels = data.fetch(config.SEISMIC_CHANNELS, segment) 21 22 # set plot metaparams 23 plt.rcParams['font.size'] = 30.0 24 plt.rcParams['axes.titlesize'] = 30.0 25 plt.rcParams['xtick.labelsize'] = 30.0 26 plt.rcParams['ytick.labelsize'] = 30.0 27 plt.rcParams['legend.fontsize'] = 30.0 28 plt.rcParams['agg.path.chunksize'] = 1000 29 30 seismic = False 31 if any(seismic_channels[0].data > config.SEI_THRESH): 32 seismic = True changed this line in version 2 of the diff
- locklost/plugins/seismic.py 0 → 100644
44 ln1 = ax.plot( 45 blrms_t-event.gps, 46 seismic_channels[0].data, 47 label=seismic_channels[0].channel, 48 alpha=0.8, 49 lw=2, 50 color='indigo', 51 ) 52 ax2 = ax.twinx() 53 ln2 = ax2.plot( 54 raw_t-event.gps, 55 seismic_channels[1].data, 56 label=seismic_channels[1].channel, 57 alpha=0.6, 58 lw=2, 59 color='seagreen', changed this line in version 2 of the diff
- locklost/plugins/seismic.py 0 → 100644
50 color='indigo', 51 ) 52 ax2 = ax.twinx() 53 ln2 = ax2.plot( 54 raw_t-event.gps, 55 seismic_channels[1].data, 56 label=seismic_channels[1].channel, 57 alpha=0.6, 58 lw=2, 59 color='seagreen', 60 ) 61 ln3 = ax.axhline( 62 config.SEI_THRESH, 63 linestyle='--', 64 color='indigo', 65 label = 'seismic threshold', changed this line in version 2 of the diff
- locklost/plugins/seismic.py 0 → 100644
1 import numpy as np 2 import matplotlib.pyplot as plt 3 import os 4 import logging 5 6 from gwpy.segments import Segment 7 8 from ..event import LocklossEvent 9 from .. import config 10 from .. import data 11 12 ############################################## 13 14 def check_seismic(event): 15 """ Check the height of H1:ISI-GND_STS_CS_Z_EQ_PEAK_OUTMON around the time 16 of lockloss, and create a tag/plot if above a certain threshold.""" standard way to write function doc string:
"""Single line description of function. Longer description. """
e.g.:
15 """ Check the height of H1:ISI-GND_STS_CS_Z_EQ_PEAK_OUTMON around the time 16 of lockloss, and create a tag/plot if above a certain threshold.""" 15 """Check for elevated seismic noise. 16 17 Check the height of :ISI-GND_STS_CS_Z_EQ_PEAK_OUTMON around the time 18 of lockloss, and create a tag/plot if above a certain threshold. 19 20 """ changed this line in version 5 of the diff
added 1 commit
- 604bfd32 - Changing docstring, using single quotes only, removing spaces when defining arg