pyrocko.dataset.crustdb¶
Access to the USGS Global Crustal Database.
The USGS Global Crustal Database provides empirical velocity measurements of the earth for statistical analysis.
Citation
Mooney, W. D., Laske, G., & Masters, T. G. (1998). CRUST 5.1: A global crustal model at 5x5. Journal of Geophysical Research: Solid Earth, 103(B1), 727-747.
Classes
|
CrustDB is a container for |
|
Undocumented. |
- class VelocityProfile(*args, **kwargs)[source]¶
Bases:
ObjectUndocumented.
- ♦ uid¶
int, optionalUnique ID of measurement
- ♦ lat¶
floatLatitude [deg]
- ♦ lon¶
floatLongitude [deg]
- ♦ elevation¶
float, default:nanElevation [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) – 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) – Axes to plot into.
- getLayeredModel()[source]¶
Get a layered model, see
pyrocko.cake.LayeredModel.
- iterLayers()[source]¶
Iterator yielding a
pyrocko.cake.Materialfor each layer.
- class CrustDB(database_file=None, parent=None)[source]¶
Bases:
objectCrustDB is a container for
VelocityProfileand 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_profileto each profile in the database.- Parameters:
ref_profile (
VelocityProfile) – Reference profiledepth_range (tuple) – Depth range in [m],
(dmin, dmax), defaults to(0, 35000.)ddepth (float) – Stepping in [m], defaults to
100.phase (str) – Phase to calculate
pors, 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
pors, 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:
- 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:
- 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:
- plotHistogram(vel_range=None, bins=36, phase='vp', axes=None)[source]¶
Plot 1D histogram of seismic velocities in the container.
- Parameters:
vel_range (tuple) – Velocity range, defaults to (5.5, 8.5)
bins (int) – bins, defaults to 30 (see
numpy.histogram())phase (str) – Property to plot out of
['vp', 'vs'], defaults to ‘vp’figure (
matplotlib.figure.Figure) – 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
.1dvbin (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
pors, defaults topplot_mode (bool) – Plot the Mode
plot_mean (bool) – Plot the Mean
plot_median (bool) – Plot the Median
axes (
matplotlib.axes.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_maxhas not been exceeded.- Parameters:
- Returns:
Lat, Lon, Depth and uid where
v_maxis exceeded- Return type:
- 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