Station

Station Class

class shakermaker.station.Station(x, internal=False, metadata={})[source]

Bases: object

This simple receiver stores response in memory.

Internally, numpy arrays are used for storage. Optional parameters allow filtering of the response before outputting, althoiugh it is always stored raw (unfiltered), therefore the user can experiment with different filtering settings.

Parameters:
  • x (numpy array (3,)) – xyz location of the station.
  • metadata – metadata to store with the station
get_response()[source]

Return the recorded response of the station.

Parameters:
  • do_filter (bool) – Will/won’t filter if filter parameters have been set. (Most useful to disable filtering before return)
  • interpolate (bool) – If True then will interpolate to a new time vector before filtering
  • interpolate_t (numpy array (Nt,)) – New time vector (its best if this vector spans or encompasses the old vector… otherwise artifacts will ensue)
Returns:

Z (down), E (east), N (north), t (time) response of the station.

Retval:

tuple containing numpt arrays with z, e, n, t reponse (shape (Nt,))

Example:

z,e,n,t = station.get_response()

.

StationList Class

class shakermaker.stationlist.StationList(stations, metadata)[source]

Bases: shakermaker.station.StationObserver

This is a list of stations.

Parameters:
  • stations (list containing Station) – A list of Stations
  • metadata – metadata to store with the station list

Example:

sta1 = Station([20,20,0])
sta2 = Station([20,40,0])

stations = StationList([sta1, sta2])

.

DRMBox

class shakermaker.sl_extensions.DRMBox.DRMBox(pos, nelems, h, metadata={}, azimuth=0.0)[source]

Bases: shakermaker.stationlist.StationList

A class to generate receiver layout useful in DRM.

_images/drmbox.png
Parameters:
  • pos ((numpy array (3,))) – Center point of the DRM box in xyz coordinates.
  • nelems ((int)) – Number of elements (stations) in each direction. Nelem = [Nx, Ny, Nz]
  • h ((double)) – Spacings in each direction h = [hx, hy, hz]
  • azimuth ((double)) – Azimuthal orientation of the box.

Note

Side lengths of the DRM box are [Nx*hx, Ny*hy, Nz*hz] up to the interior boundary of the box. Exterior boundary has side lengths: [(Nx+2)*hx, (Ny+2)*hy, (Nz+1)*hz]

.