pyacs.lib.vel_field module¶
-
class
pyacs.lib.vel_field.
Velocity_Field
(file_name=None, name=None, lgmt_points=None, verbose=False)[source]¶ Bases:
object
Velocity_Field class: reads a velocity field from a GMT psvelo file and provides methods to manipulate velocity field
-
classmethod
read
(file_name=None, lexclude=[], lonly=[], verbose=False)[source]¶ Reads a GMT psvelo file
-
remove_point
(code)[source]¶ Removes the a GMT_Point to a velocity field given its code
- Parameters
code – 4-characters code for the point to be removed
-
write
(out_file=None, lexclude=[], verbose=True, comment='', up=False)[source]¶ Writes a GMT psvelo file a list site name to be excluded can be provided
-
subset
(lonly=None, lexclude=None)[source]¶ Returns a new Velocity_Field object from a subset of sites
- Parameters
lonly,lexclude – list of site codes to be included or excluded
-
radial
(center)[source]¶ Returns a Velocity Field whose components are radial and tangential with respect to a given center
- Parameters
center – numpy array [longitude,latitude] of center
-
calc_pole
(plates, method='WLS', verbose=False)[source]¶ Performs Euler pole calculation
- Parameters
plates – dictionary with the name of plate as key and list of sites for each plate as values
method – choose among weighted least-squares ‘WLS’ or ‘L1’
- Output
for each plate, the following files will be created: - euler_stat_plate_name.dat: Euler pole values and statistics - plate_name.gmt: velocities (GMT psvelo format) with respect to the calculated Euler pole - plate_name.shp: velocities (shapefile format) with respect to the calculated Euler pole - eulers_sum.dat: summary of Euler pole values
-
pole
(lexclude=[], method='WLS', exp='pLate', log=None)[source]¶ Euler pole calculation; available optimization methods are WLS: weighted least squares, LS: least-squares, Dikin: L1 linear estimator
-
substract_pole
(W=None, type_euler='rot')[source]¶ substract the prediction of an Euler pole to the velocity field
-
common
(linGpoint, prefit=10.0, lexclude=[])[source]¶ Returns a list of sites common to the current Velocity Field object and the list of GMT_Points provided in argument Coordinates will be the ones from the Sinex and NOT from the list of Gpoints Commons point are points with same code pt and soln
-
proj_profile
(slon, slat, elon, elat, d, save=None, verbose=False)[source]¶ project velocity components along a great circle defined by initial/stop points (slon,slat,elon,elat)
- Parameters
slon,slat – coordinates of profile start point (decimal degrees)
elon,elat – coordinates of profile end point (decimal degrees)
:param d : maximum distance for a point to be considered :param save : output file name (optional)
:return : numpy 1D array with np_code, np_distance_along_profile, np_distance_to_profile , np_Ve , np_Vn , np_SVe , np_SVn , np_v_parallele , np_v_perpendicular , np_sigma_v_parallele , np_sigma_v_perpendicular , np_lazimuth
-
classmethod