Seismic Velocity Datasets (dataset
)¶
crust2x2
¶
Interface to use CRUST2.0 model by Laske, Masters and Reif.
All functions defined in this module return SI units (m, m/s, kg/m^3).
Note
Please refer to the REM web site if you use this model:
or
Bassin, C., Laske, G. and Masters, G., The Current Limits of Resolution for Surface Wave Tomography in North America, EOS Trans AGU, 81, F897, 2000. A description of CRUST 5.1 can be found in: Mooney, Laske and Masters, Crust 5.1: a global crustal model at 5x5 degrees, JGR, 103, 727-747, 1998.
Usage¶
>>> from pyrocko import crust2x2
>>> p = crust2x2.get_profile(10., 20.)
>>> print p
type, name: G2, Archean 0.5 km seds.
elevation: 529
crustal thickness: 38500
average vp, vs, rho: 6460.7 3665.1 2867.5
mantle ave. vp, vs, rho: 8200 4700 3400
0 3810 1940 920 ice
0 1500 0 1020 water
500 2500 1200 2100 soft sed.
0 4000 2100 2400 hard sed.
12500 6200 3600 2800 upper crust
13000 6400 3600 2850 middle crust
13000 6800 3800 2950 lower crust
>>> print p.get_weeded()
[[ 0. 500. 500. 13000. 13000. 26000. 26000. 39000. 39000.]
[ 2500. 2500. 6200. 6200. 6400. 6400. 6800. 6800. 8200.]
[ 1200. 1200. 3600. 3600. 3600. 3600. 3800. 3800. 4700.]
[ 2100. 2100. 2800. 2800. 2850. 2850. 2950. 2950. 3400.]]
Constants¶
Layer id |
Layer name |
---|---|
LICE |
ice |
LWATER |
water |
LSOFTSED |
soft sediments |
LHARDSED |
hard sediments |
LUPPERCRUST |
upper crust |
LMIDDLECRUST |
middle crust |
LLOWERCRUST |
lower crust |
LBELOWCRUST |
below crust |
Contents¶
- class Crust2Profile(ident, name, vp, vs, rho, thickness, elevation)[source]¶
Representation of a CRUST2.0 key profile.
- get_weeded(include_waterlayer=False)[source]¶
Get layers used in the profile.
- Parameters
include_waterlayer – include water layer if
True
. Default isFalse
- Returns
NumPy array with rows
depth
,vp
,vs
,density
- get_layer(ilayer)[source]¶
Get parameters for a layer.
- Parameters
ilayer – id of layer
- Returns
thickness, vp, vs, density
- class Crust2(directory=None)[source]¶
Access CRUST2.0 model.
- param directory
Directory with the data files which contain the CRUST2.0 model data. If this is set to
None
, builtin CRUST2.0 files are used.
- get_profile(*args, **kwargs)[source]¶
Get crustal profile at a specific location or raw profile for given key.
Get profile for location
(lat, lon)
, or raw profile for given string key.- Return type
instance of
Crust2Profile
- get_profile(*args, **kwargs)[source]¶
Get Crust2x2 profile for given location or profile key.
Get profile for (lat,lon) or raw profile for given string key.
crustdb
¶
Access to the USGS Global Crustal Database.
Simple queries and statistical analysis
- class VelocityProfile(*args, **kwargs)[source]¶
Undocumented.
- ♦ uid¶
int
, optionalUnique ID of measurement
- ♦ lat¶
float
Latitude [deg]
- ♦ lon¶
float
Longitude [deg]
- ♦ elevation¶
float
, default:nan
Elevation [m]
- ♦ vp¶
numpy.ndarray
(pyrocko.guts_array.Array
)P Wave velocities [m/s]
- ♦ vs¶
numpy.ndarray
(pyrocko.guts_array.Array
)S Wave velocities [m/s]
- ♦ d¶
numpy.ndarray
(pyrocko.guts_array.Array
)Interface depth, top [m]
- ♦ h¶
numpy.ndarray
(pyrocko.guts_array.Array
)Interface thickness [m]
- ♦ heatflow¶
float
, optionalHeatflow [W/m^2]
- ♦ geographical_location¶
str
, optionalGeographic Location
- ♦ geological_province¶
str
, optionalGeological Province
- ♦ geological_age¶
str
, optionalGeological Age
- ♦ measurement_method¶
int
, optionalMeasurement method
- ♦ publication_reference¶
str
, optionalPublication Reference
- interpolateProfile(depths, phase='p', stepped=True)[source]¶
Get a continuous velocity function at arbitrary depth.
- Parameters
depth (
numpy.ndarray
) – Depths to interpolatephase (str, optional) – P or S wave velocity, p or s
stepped (bool) – Use a stepped velocity function or gradient
- Returns
velocities at requested depths
- Return type
- plot(axes=None)[source]¶
Plot the velocity profile, see
pyrocko.cake
.- Parameters
axes (
matplotlib.Axes
) – Axes to plot into.
- getLayeredModel()[source]¶
Get a layered model, see
pyrocko.cake.LayeredModel
.
- iterLayers()[source]¶
Iterator yielding a
pyrocko.cake.Material
for each layer.
- class CrustDB(database_file=None, parent=None)[source]¶
CrustDB is a container for
VelocityProfile
and provides functions for spatial selection, querying, processing and visualising data from the Global Crustal Database.- velocityMatrix(depth_range=(0, 60000.0), ddepth=100.0, phase='p')[source]¶
Create a regular sampled velocity matrix.
- Parameters
- Returns
Sample depths, veloctiy matrix
- Return type
tuple, (sample_depth,
numpy.ndarray
)
- rmsRank(ref_profile, depth_range=(0, 3500.0), ddepth=100.0, phase='p')[source]¶
Correlates
ref_profile
to each profile in the database.- Parameters
ref_profile (
VelocityProfile
) – Reference profiledepth_range (tuple, optional) – Depth range in [m],
(dmin, dmax)
, defaults to(0, 35000.)
ddepth (float) – Stepping in [m], defaults to
100.
phase (str) – Phase to calculate
p
ors
, defaults top
- Returns
RMS factor length of N_profiles
- Return type
- histogram2d(depth_range=(0.0, 60000.0), vel_range=None, ddepth=100.0, dvbin=100.0, ddbin=2000.0, phase='p')[source]¶
Create a 2D Histogram of all the velocity profiles.
Check
numpy.histogram2d()
for more information.- Parameters
depth_range (tuple) – Depth range in [m],
(dmin, dmax)
, defaults to(0., 60000.)
vel_range (tuple) – Depth range,
(vmin, vmax)
, defaults to(5500., 8500.)
ddepth (float) – Stepping in [km], defaults to
100.
dvbin (float) – Bin size in velocity dimension [m/s], defaults to 100.
dvbin – Bin size in depth dimension [m], defaults to 2000.
phase (str) – Phase to calculate
p
ors
, defaults top
- Returns
- Return type
- meanVelocity(depth_range=(0.0, 60000.0), ddepth=100.0, phase='p')[source]¶
Get mean and standard deviation of velocity profile.
- Parameters
- Returns
depth vector, mean velocities, standard deviations
- Return type
tuple of
numpy.ndarray
- modeVelocity(depth_range=(0.0, 60000.0), ddepth=100.0, phase='p')[source]¶
Get mode velocity profile and standard deviation.
- Parameters
- Returns
depth vector, mode velocity, number of counts at each depth
- Return type
tuple of
numpy.ndarray
- medianVelocity(depth_range=(0.0, 60000.0), ddepth=100.0, phase='p')[source]¶
Median velocity profile plus std variation.
- Parameters
- Returns
depth vector, median velocities, standard deviations
- Return type
tuple of
numpy.ndarray
- plotHistogram(vel_range=None, bins=36, phase='vp', axes=None)[source]¶
Plot 1D histogram of seismic velocities in the container.
- Parameters
vel_range (tuple, optional) – Velocity range, defaults to (5.5, 8.5)
bins (int, optional) – bins, defaults to 30 (see
numpy.histogram()
)phase (str, optional) – Property to plot out of
['vp', 'vs']
, defaults to ‘vp’figure (
matplotlib.Figure
, optional) – Figure to plot in, defaults to None
- plot(depth_range=(0, 60000.0), ddepth=100.0, ddbin=2000.0, vel_range=None, dvbin=100.0, percent=False, plot_mode=True, plot_median=True, plot_mean=False, show_cbar=True, aspect=0.02, phase='p', axes=None)[source]¶
Plot a two 2D Histogram of seismic velocities.
- Parameters
depth_range (tuple) – Depth range,
(dmin, dmax)
, defaults to(0, 60)
vel_range (tuple) – Velocity range,
(vmin, vmax)
ddepth (float) – Stepping in [m], defaults to
.1
dvbin (float) – Bin size in velocity dimension [m/s], defaults to .1
dvbin – Bin size in depth dimension [m], defaults to 2000.
phase (str) – Phase to calculate
p
ors
, defaults top
plot_mode (bool) – Plot the Mode
plot_mean (bool) – Plot the Mean
plot_median (bool) – Plot the Median
axes (
matplotlib.Axes
) – Axes to plot into, defaults to None
- plotVelocitySurface(v_max, d_min=0.0, d_max=6000.0, axes=None)[source]¶
Plot a triangulated a depth surface exceeding velocity.
- exceedVelocity(v_max, d_min=0, d_max=60)[source]¶
Returns the last depth
v_max
has not been exceeded.
- selectRegion(west, east, south, north)[source]¶
Select profiles within a region by geographic corner coordinates.
- selectPolygon(poly)[source]¶
Select profiles within a polygon.
The algorithm is called the Ray Casting Method
- Parameters
poly – Latitude Longitude pairs of the polygon
- Returns
Selected profiles
- Return type
- selectLocation(lat, lon, radius=10)[source]¶
Select profiles at a geographic location within a
radius
.
- selectVp()[source]¶
Select profiles describing P wave velocity.
:returns Selected profiles :rtype:
CrustDB