velocitymodel class¶
- class csi.velocitymodel(name, utmzone=None, ellps='WGS84', lon0=None, lat0=None, verbose=True)¶
- F(x, d1, d2, prof, NLayers)¶
Forward model for layer estimations.
- KeepDistanceFromFault(faults, distance)¶
Keep on the point to a certain distance to the fault. Args:
faults : Fault structure from verticalfault or list of structures.
distance : Distance maximum.
- SelectBox(box)¶
Keeps only the points inside the box: Args:
box : Coordinates of the UL and BR corners in lon,lat.
- VerticalAverage()¶
Averages Vp, Vs and Rho along depth.
- Vp2VsPoisson(poisson, data='vertical')¶
Computes the value of Vs from the values of Vp and a poisson’s ratio. Args:
poisson : Poisson’s ratio.
data : Which data to convert. Can be ‘all’ or ‘vertical’.
Vs = np.sqrt( (1-2nu)/(1-nu) * vp^2/2 )
- WriteEDKSModelFile(filename)¶
Writes an input file for computing Kernels with EDKS. Args:
filename : Name of the output file.
- fitLayers(NLayers)¶
Fit a Nlayer model on the 1D profile. Args:
NLayers : Number of Layers.
- getModelOnFault(fault)¶
Returns the velocity model on each fault patch or tent.
- plot3D(fault=None, data='vp', figure=234, norm=None, markersize=5, depthmax=50)¶
Plots the desired data set in 3D, using scatter 3D. Args:
fault : Adds a fault trace at the surface (structure from vertical fault).
data : Selects the data to plot (‘vp’, ‘vs’ or ‘density’).
figure : Number of the figure.
norm : Minimum and maximum for the color scale.
markersize: Size of the scattered dots.
depthmax : Maximum depth.
- plotVertical(figure=67, depth=50)¶
Plots the average vertical values
- readEDKSModelFile(filename)¶
Reads the EDKS model file. Args:
filename : Name of the input file.
- readVpVsRhoFromAsciiVertAve(infile, header=0, depthfact=1.0, allfact=1.0, readshear=False)¶
Reads vertical profiles of Vp, Vs and Density from an ascii file. Format: DEPTH DENSITY DENSITYSTD VS VSSTD VP VPSTD (ShearMod ShearModStd) Args:
infile : name of the input file
header : Length of the header (default=0)
depthfact : Multiply depth
- readVpfromascii(filename, clon=0, clat=1, cdepth=2, cvp=3, hdr=0)¶
Reads Lon, Lat, depth and Vp from an ascii file. Args:
filename : name of the ascii file
clon : index of the column for longitude.
clat : index of the column for latitude.
cdepth : index of the column for depth.
cvp : index of the column for Vp.
hdr : Header length.
- regrid(box=None, Nlon=100, Nlat=100, Ndepth=10, method='linear')¶
Re-samples the data into a regular grid. Args:
box : Coordinates of the UL and BR corners in the UTM reference.
Nlon : Number of Longitude points.
Nlat : Number of Latitude points.
Ndepth : Number of depths.
method : interpolation method (‘linear’, ‘nearest’ or ‘cubic’).
- setAverageVerticalModel(Vp, Vs, Rho, D, shear=None)¶
Inputs an average velocity model in 1D. Args:
Vp : Pwave velocity.
Vs : Swave velocity.
Rho : Density.
D : Depth.
- setDensityProfile(density, std=None)¶
Builds a density profile from std input. Args:
density : list of densities.
std : list of standard deviations.