Skip to content
Snippets Groups Projects

Add seismic tag/plots for ground motion exceeding threshold

Closed Yannick Lecoeuche requested to merge yannick.lecoeuche/locklost:seismic into master
6 unresolved threads

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

Approval is optional

Closed by Jameson RollinsJameson Rollins 5 years ago (Aug 29, 2019 9:13am UTC)

Merge details

  • The changes were not merged into master.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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()
  • 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)])
  • 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
  • 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',
  • 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',
  • 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."""
  • added 1 commit

    • dda1dd30 - Making cosmetic changes to code

    Compare with previous version

  • added 1 commit

    • 0a3ca9fd - Changing wind.py back to previous config

    Compare with previous version

  • added 1 commit

    • c6cd1753 - Keeping line length below 79

    Compare with previous version

  • added 1 commit

    • 604bfd32 - Changing docstring, using single quotes only, removing spaces when defining arg

    Compare with previous version

  • There was a minor conflict, so I merged manually and pushed.

  • Please register or sign in to reply
    Loading