tiskitpy.SeafloorSynthetic

class tiskitpy.SeafloorSynthetic(water_depth=2400, Z_offset_angles=(2, 15), IG_m_seasurface=([[0.001, 0.02], [1, 0.02]], False), noise_pressure=([[0.001, 60], [0.003, 30], [0.006, 0], [0.01, -10], [0.02, -10], [0.05, -10], [0.1, -10], [1, -10]], True), noise_seismo=([[0.001, -130], [0.003, -160], [0.006, -170], [0.01, -175], [0.02, -175], [0.05, -180], [0.1, -180], [1, -170]], True), noise_tilt_max=([[np.float64(0.001), np.float64(-55.0)], [np.float64(0.0017782794100389228), np.float64(-62.5)], [np.float64(0.0031622776601683794), np.float64(-70.0)], [np.float64(0.005623413251903491), np.float64(-77.5)], [np.float64(0.01), np.float64(-85.0)], [np.float64(0.01778279410038923), np.float64(-92.5)], [np.float64(0.03162277660168379), np.float64(-100.0)], [np.float64(0.056234132519034905), np.float64(-107.5)], [np.float64(0.1), np.float64(-115.0)], [np.float64(0.1778279410038923), np.float64(-122.5)], [np.float64(0.31622776601683794), np.float64(-130.0)], [np.float64(0.5623413251903491), np.float64(-137.5)], [np.float64(1.0), np.float64(-145.0)]], True), noise_tilt_variance=50, noise_tilt_direction_limits=(100, 130), earth_model=[[1000, 3000, 3000, 1600], [1000, 3000, 4000, 2300], [1000, 3000, 5000, 2800], [3000, 3000, 7500, 4300], [3000, 3000, 8200, 4700]], IG_freqstep=0.001)

Bases: object

Generate synthetic seismological data based on environmental and noise factors

water_depth

water depth in meters

Type:

float

Z_offset_angles

Seismometer’s Z offset [angle, azimuth] from vertical, in degrees

Type:

list

IG_m_seasurface

Infragravity wave PSD levels (ref m)

Type:

tiskitpy.PSDVals

noise_pressure

Pressure sensor noise levels (ref Pa)

Type:

tiskitpy.PSDVals

noise_seismo

Seismometer noise levels (ref m/s^2)

Type:

tiskitpy.PSDVals

noise_tilt_max

Maximum tilt noise (ref m/s^2))

Type:

tiskitpy.PSDVals

noise_tilt_direction_limits

minimum and maximum tilt directions (degrees).

Type:

tuple

noise_tilt_variance

variance in dB of tilt noise levels

Type:

float

earth_model

1D Earth model

Type:

tiskitpy.EarthModel1D

IG_freqstep

maximum frequency step for IG wave and compliance PSDs

Type:

float

Return seismo and DPG time series corresponding to compliance plus noise

Parameters:
  • water_depth (numeric) – water depth in meters

  • Z_offset_angles (list) – Seismometer’s Z offset [angle, azimuth] from vertical, in degrees: (angle is the most important)

  • IG_m_seasurface (tuple) –

    Infragravity wave PSD levels in format: ([[freq1, value1],

    [freq2, value2], … [freqN, valueN]], is_dB)

    Where is_dB is bool. Values are wave heights in m (if is_dB is False) or in dB ref 1 (m^2)/Hz.

  • noise_pressure (tuple) – representation of DPG noise levels. Same format as for IG_m_seasurface, values are in Pa or dB equivalent

  • noise_seismo (tuple) – representation of seismometer noise levels. Same format as for IG_m_seasurface, values are in m/s^2 or dB equivalent

  • noise_tilt_max (tuple) – maximum tilt noise levels Same format as for IG_m_seasurface, values are in m/s^2 or dB equivalent.

  • noise_tilt_direction_limits (tuple) – minimum and maximum tilt directions (degrees).

  • noise_tilt_variance (float) – variance in dB of tilt noise levels

  • earth_model (list, None) –

    1D Earth model in the format: [[thick1, rho1, vp1, vs1]

    [thick2, rho2, vp2, vs2] … [thickN, rhoN, vpN, vsN]]

    where units are meters, kg/m^2, m/s and m/s, and the last row is treated as a half-space)

  • IG_freqstep (float) – maximum frequency step for IG waves and compliance PSDs (must be small enough to capture shallow/deep water cutoff)

property IG_Pa_seafloor

Infragravity wave seafloor pressure PSD

Based on self.IG_m_seasurface and self.water_depth)

property PSDs

Dictionary of all seafloor PSDs

property Z_angle_factor_DBs

Rotation of horizontal tilt noise onto Z channel

property compliance_accel

PSD of compliance * IG pressure, in (m/s^2)^2/Hz

make_tilt_ts(noise_max, coefficients=<tiskitpy.synthetic.tide_coefficients.TideCoefficients object>, plotit=False)

make a simple tilt time series summing signals of given periods, amplitudes and starting phases

Parameters:
  • noise_max (obspy.core.Trace) – maximum tilt noise time series

  • coefficients (TideCoefficients) – the tidal coefficients

norm_compliance(f=None)

Return normalized compliance of the object’s EarthModel

Parameters:

f (list, np.array, None) – frequencies at which to calculate. If None, then calculate at the frequencies of self.IG_Pa_seafloor

plot(fmin=0.001, fmax=0.1, fstep=0.001, outfile=None, show=True)

Plot the spectral representation of the noise sources in dB

save_compliance(max_freq=True, base_name='model', out_dir=None)

GRANDFATHERED: use Compliance.write() instead Saves self.earth_model’s compliance to a file

Parameters:
  • max_freq (float or bool) – if float, only save up to given freq (Hz). If true, cut off at water depth based predicted compliance cutoff If false, use all of IG_Pa_seafloor.freqs

  • out_dir (str or Path) – output directory

  • filename (str) – output filename

source_by_code(ch_code)

Return PSD by code

Parameters:

code (str) – a 3-letter code that points to the given source. If it’s got more than three letters, its a combination source

Returns:

the source PSD

Return type:

PSDVals

property source_codes

return list of source codes

source_trace(code, trace_base, accel_to_vel=False, phases=None)

Return the obspy.stream.Trace matching the given source code

code (str): Valid source code trace_base (obspy.stream.Trace): Trace to use as reference

for dates, length, sampling rate, station, network and response

accel_to_vel (bool): source PSDVals is an acceleration and should

be converted to velocity.

phases (np.array): list of phases to force fft to have (to correlate

with another channel)

property stream_source_codes

return dict of streams and each trace’s source codes

streams(ref_trace, s_response=1.0, p_response=1.0, network='XX', station='SSSSS', plotit=False, forceInt32=False)

Return streams generated from to the noise and signal levels Simply multiplies physical values by a sensitivity value, would be better to convolve with instrument response.

Parameters:
  • ( (ref_trace) – class: obspy.Trace): trace with time base to use. band_code must be “L” and sampling rate near 1 sps.

  • s_response (obspy.core.response.Response or float) – Seismometer response (counts/m/s). If float, assumes flat response with this gain.

  • (class (p_response) – obspy.core.response.Response or float): Pressure gauge response (counts/Pa). If float, assumes flat response with this gain.

  • network (str) – Network code (1-2 characters)

  • station (str) – Station code (1-5 characters)

  • forceInt32 (bool) – force output data to have dtype=np.int32

Returns:

(data, sources, inv), where:

  • data (obspy.Stream): synthetic seafloor BB 4C data

  • sources (obspy.Stream): individual noises and signals

  • inv (obspy.core.Inventory): channel metadata

Return type:

tuple

property trace_source_codes

return list of trace source codes