MSNoise Admin (Web Interface)

MSNoise Admin is a web interface that helps the user define the configuration for all the processing steps. It allows configuring the stations and filters to be used in the different steps of the workflow and provides a view on the database tables.

To start the admin:

$ msnoise admin

Which, by default, starts a web server listening on all interfaces on port 5000. This can be overridden by passing parameters to the command, e.g. for port 5099:

$ msnoise admin -p 5099

The next step consists of opening a web browser and open the ip address of the machine, by default on the current machine, it’ll be http://localhost:5000/ or http://127.0.0.1:5000/.

../_images/msnoise_admin_home.png

The top level menu shows four items:

Home

The index page shows

  • The project location and its database

  • Stats of the Data Availability, the CC, STACK, MWCS and DTT jobs.

  • Quick action buttons for resetting or deleting jobs.

The name and the logo of the page can be overridden by setting an environment variable with a name and the HTML tag of the logo image:

set msnoise_brand="ROB|<img src='http://www.seismologie.be/img/oma/ROB-logo.svg' width=200 height=200>"

and then starting msnoise admin:

../_images/branding.png

Configuration

Station

Stations appear as a table and are editable.

Stations are defined as:

class msnoise.msnoise_admin.Station(*args)

Station Object

Parameters:
  • ref (int) – The Station ID in the database

  • net (str) – The network code of the Station

  • sta (str) – The station code

  • X (float) – The X coordinate of the station

  • Y (float) – The Y coordinate of the station

  • altitude (float) – The altitude of the station

  • coordinates (str) – The coordinates system. “DEG” is WGS84 latitude/ longitude in degrees. “UTM” is expressed in meters.

  • instrument (str) – The instrument code, useful with PAZ correction

  • used (bool) – Whether this station must be used in the computations.

Attributes:
X
Y
altitude
coordinates
net
ref
sta
used
used_channel_names
used_location_codes

Methods

chans

locs

Filter

Filters appear as a table and are editable. The filter parameters are validated before submission, so no errors should happen. Note: by default, the used parameter is set to False, don’t forget to change it!

Filters are defined as:

class msnoise.msnoise_admin.Filter(**kwargs)

Filter base class.

Parameters:
  • ref (int) – The id of the Filter in the database

  • low (float) – The lower frequency bound of the Whiten function (in Hz)

  • high (float) – The upper frequency bound of the Whiten function (in Hz)

  • mwcs_low (float) – The lower frequency bound of the linear regression done in MWCS (in Hz)

  • mwcs_high (float) – The upper frequency bound of the linear regression done in MWCS (in Hz)

  • mwcs_wlen (float) – Window length (in seconds) to perform MWCS

  • mwcs_step (float) – Step (in seconds) of the windowing procedure in MWCS

  • used (bool) – Is the filter activated for the processing

Attributes:
high
low
mwcs_high
mwcs_low
mwcs_step
mwcs_wlen
ref
used

Config

All configuration bits appear as a table and are editable. When editing one configuration item, the Edit tab shows extra information about the parameter, where it is used and its default value. Most of the configuration bits are case-sensitive!

Example view:

../_images/msnoise_admin_config.png

The table below lists the different fields:

Parameter Name

Description

Default Value

data_folder

Data Folder

output_folder

CROSS_CORRELATIONS

CC Output Folder in case keep_all=Y, to store the individual windows. The daily CCF will always be stored in the STACKS/001_DAYS folder.

data_structure

SDS

Either a predefined acronym [SDS]/BUD/IDDS, or /-separated path (e.g. NET/STA/YEAR/NET.STA.YEAR.DAY.MSEED).

archive_format

Force format of archive files to read? Leave empty for slightly slower auto-detection by Obspy, or specify any format supported by <a href=’https://docs.obspy.org/packages/autogen/obspy.core.stream.read.html’ target=’_blank’>obspy.core.stream.read()</a>.

network

Network to analyse

channels

Channels need to match the value (ex: [&ast;], &ast;Z, BH&ast;, HHZ,…)

startdate

1970-01-01

Start Date to process: [1970-01-01]=’since beginning of the archive’

enddate

2100-01-01

End Date to process: [2100-01-01]=’No end’

analysis_duration

86400

Duration of the Analysis in seconds (this shouldn’t be changed for now)

cc_sampling_rate

20

Sampling Rate for the CrossCorrelation (in Hz)

cc_normalisation

NO

Normalisation method for individual corr_duration) CCFs, default is not normalized (NO), but can be normalized based on the power of the two traces (POW), or by the maximum (MAX) or absolute maximum (ABSMAX) of the CCF

resampling_method

Decimate

Resampling method

preprocess_lowpass

8

Preprocessing Low-pass value (in Hz)

preprocess_highpass

0.01

Preprocessing High-pass value (in Hz)

preprocess_max_gap

10

Preprocessing maximum gap length that will be filled by interpolation (in seconds)

preprocess_taper_length

20

Duration of the taper applied at the beginning and end of trace during the preprocessing, to allow highpass filtering (in seconds)

remove_response

N

Remove instrument response

response_format

dataless

Remove instrument file format

response_path

inventory

Instrument correction file(s) location (path relative to db.ini), defaults to ‘./inventory’, i.e. a subfolder in the current project folder. All files in that folder will be parsed.

response_prefilt

(0.005, 0.006, 30.0, 35.0)

Remove instrument correction pre-filter (in Hz, see <a href=’https://docs.obspy.org/packages/autogen/obspy.core.trace.Trace.remove_response.html’ target=”_blank”>ObsPy Doc</a> for what it means.)

maxlag

120

Maximum lag (in seconds)

corr_duration

1800

Data windows to correlate (in seconds)

overlap

0

Amount of overlap between data windows [0:1[

winsorizing

3

Winsorizing at N time RMS , 0 disables winsorizing, -1 enables 1-bit normalization

whitening

A

Whiten Traces before cross-correlation: [A]ll (except for autocorr), [N]one, or only if [C]omponents are different

whitening_type

B

Type of spectral whitening function to use: [B]rutal (amplitude to 1.0), divide spectrum by its [PSD] or by band-passing the white spectrum with a hanning-window [HANN]. WARNING: only works for compute_cc, not compute_cc_rot, where it will always be B

clip_after_whiten

N

Do the clipping (winsorizing) after whitening?

stack_method

linear

Stack Method: Linear Mean or Phase Weighted Stack

pws_timegate

10

If stack_method =’pws’, width of the smoothing (in seconds)

pws_power

2

If stack_method =”pws”, Power of the Weighting

crondays

1

Number of days to monitor with scan_archive, typically used in cron (should be a float representing a number of days, or a string designating weeks, days, and/or hours using the format ‘Xw Xd Xh’)

components_to_compute

ZZ

List (comma separated) of components to compute between two different stations

cc_type

CC

Cross-Correlation type

components_to_compute_single_station

List (comma separated) of components within a single station. ZZ would be the autocorrelation of Z component, while ZE or ZN are the cross-components. Defaults to [], no single-station computations are done.

cc_type_single_station_AC

CC

Auto-Correlation type

cc_type_single_station_SC

CC

Cross-Correlation type for Cross-Components

keep_all

Y

Keep all cross-corr (length: corr_duration)

keep_days

Y

Keep all daily cross-corr

ref_begin

1970-01-01

Beginning or REF stacks. Can be absolute (2012-01-01) or relative (-100) days

ref_end

2100-01-01

End or REF stacks. Same as ref_begin

mov_stack

((‘1d’,’1d’))

A list of two parameters: the time to “roll” over (default 1 day) and the granularity (step) of the resulting stacked CCFs (default 1 day) to stack for the Moving-window stacks. This can be a list of tuples, e.g. ((‘1d’,’1d’),(‘2d’,’1d’)) corresponds to the MSNoise 1.6 “1,2” before. Time deltas can be anything pandas can interpret (“d”, “min”, “sec”, etc).

export_format

MSEED

Export stacks in which format(s) ?

sac_format

doublets

Format for SAC stacks ?

dtt_lag

static

How is the lag window defined

dtt_v

1

If dtt_lag =dynamic: what velocity to use to avoid ballistic wave (in km/s)

dtt_minlag

5

If dtt_lag =static: min lag time (in seconds)

dtt_width

30

Width of the time lag window (in seconds)

dtt_sides

both

Which sides to use

dtt_mincoh

0.65

Minimum coherence on dt measurement, MWCS points with values lower than that will not be used in the WLS, [0:1]

dtt_maxerr

0.1

Maximum error on dt measurement, MWCS points with values larger than that will not be used in the WLS [0:1]

dtt_maxdt

0.1

Maximum dt values, MWCS points with values larger than that will not be used in the WLS (in seconds)

wct_ns

5

smoothing parameter in frequency

wct_nt

5

smoothing parameter in time

wct_vpo

20

spacing param between discrete scales

wct_nptsfreq

300

number of freq points between min and max

dtt_codacycles

20

number of cycles of period (1/freq) between lag_min and lag_max

dvv_min_nonzero

0.25

percentage of data points with non-zero weighting required for regression otherwise nan (0 to 1)

wct_norm

Y

Is the REF and CCF are normalized before computing wavelet? [Y]/N

wavelet_type

(‘Morlet’,6.)

Wavelet type and optional associated parameter

plugins

Comma separated list of plugin names. Plugins names should be importable Python modules.

hpc

N

Is MSNoise going to run on an HPC?

stretching_max

0.01

Maximum stretching coefficient, e.g. 0.5 = 50%, 0.01 = 1%

stretching_nsteps

1000

Number of stretching steps between 1- stretching_max and 1+ stretching_max

qc_components

Z

Components to process for QC, defaults to [Z], but can be any comma separated list (e.g. ‘Z,E,N’)

qc_ppsd_length

3600

Length of data segments passed to psd in seconds. In the paper by McNamara et al (2004) a value of 3600 (1 hour) was chosen. Longer segments increase the upper limit of analyzed periods but decrease the number of analyzed segments.

qc_ppsd_overlap

0

Overlap of segments passed to psd. Overlap may take values between 0 and 1 and is given as fraction of the length of one segment, e.g. qc_ppsd_length=3600 and qc_ppsd_overlap=0.5 result in an overlap of 1800s of the segments.

qc_ppsd_period_smoothing_width_octaves

0.125

Determines over what period/frequency range the psd is smoothed around every central period/frequency. Given in fractions of octaves (default of 1 means the psd is averaged over a full octave at each central frequency).

qc_ppsd_period_step_octaves

0.0125

Step length on frequency axis in fraction of octaves (default of 0.125 means one smoothed psd value on the frequency axis is measured every 1/8 of an octave).

qc_ppsd_period_limits

(0.01,100)

Set custom lower and upper end of period range (e.g. (0.01, 100) seconds). The specified lower end of period range will be set as the central period of the first bin (geometric mean of left/right edges of smoothing interval). At the upper end of the specified period range, no more additional bins will be added after the bin whose center frequency exceeds the given upper end for the first time.

qc_ppsd_db_bins

(-200, -50, 1.)

Specify the lower and upper boundary and the width of the db bins. The bin width might get adjusted to fit a number of equally spaced bins in between the given boundaries.

qc_rms_frequency_ranges

[(1.0, 20.0), (4.0, 14.0), (4.0, 40.0), (4.0, 9.0)]

Specify the frequency bounds (in Hz) to compute the RMS from PSDs

qc_rms_type

DISP

What units do you want for the exported RMS

Database

Data Availability

Gives a view of the data_availability table. Allows to bulk edit/select rows. Its main goal is to check that the scan_archive procedure has successfully managed to list all files from one’s archive.

Jobs

Gives a view of the jobs table. Allows to bulk edit/select rows. Its main goal is to check the new_jobs or any other workflow step (or Plugins) successfully inserted/updated jobs.

Help

About

Shows some links and information about the package. Mostly the information present on the github readme file.

Bug Report

Web view of the msnoise bugreport -m, allows viewing if all required python modules are properly installed and available for MSNoise.