window

class dsmpy.window.Window(travel_time, event, station, phase_name, component, t_before=10.0, t_after=40.0, t_shift=0)

Time or frequency window.

Parameters
  • travel_time (float) – arrival time in seconds

  • event (Event) – seismic event

  • station (Station) – seismic station

  • phaseName (str) – a TauP seismic phase

  • component (Component) – seismic component

  • t_before (float) – time before arrival in seconds (default is 10.)

  • t_after (float) – time after arrival in seconds (defaultis 40.)

  • t_shift (float) – time shift in seconds to shift the time window. Used to align synthetics with data. (default is 0.)

get_epicentral_distance()

Returns the epicentral distance in degree.

get_gaussian_window_in_frequency_domain(nspc, tlen, window_width)

Compute a gaussian window in the frequency domain. :param nspc: number of points in frequency domain :type nspc: int :param tlen: duration of synthetics (in seconds) :type tlen: float :param window_width: gaussian width (in seconds) = 2*sigma :type window_width: float :param omega_shift: omega shift :type omega_shift: float

Returns

list of gaussian windows

Return type

windows (list(ndarray))

overlap(other)bool

Returns True if self overlap with other.

to_array(shift=False)

Returns an ndarray [t_start, t_end].

Parameters

shift (bool) – if True, add the time shift to the window (default is True)

Returns

[time_start, time_end]

Return type

np.ndarray