pygrt.tensor
- file:
tensor.py
- author:
Zhu Dengda (zhudengda@mail.iggcas.ac.cn)
- date:
2024-07-24
动态和静态结果的张量计算、断层面投影及库仑应力
- pygrt.tensor.static_sproj(path: str | PathLike, *, strike: float | None = None, dip: float | None = None, rake: float | None = None, rcv_points: str | PathLike | None = None, force_rake: bool = False, **kwargs) None[源代码]
Project static stress tensors onto receiver-fault geometry in place.
The input
pathmust be a static synthesis NetCDF file, not a dynamic synthesis directory, and must contain the six stress components produced bystatic_stress. For grid and ordinary points layouts, passstrike,dipandraketogether. For the finite receiverfaultslayout, pass onlyrakewhen rake values are undefined; setforce_rake=Trueto replace every rake.rcv_pointscorresponds to the C module’s-Qoption and must contain six columns per row.Results are written back to
pathassigma_nandtau_s.- 参数:
path – Static synthesis NetCDF file containing stress components.
strike – Manual receiver strike in degrees.
dip – Manual receiver dip in degrees.
rake – Manual receiver rake in degrees.
rcv_points – Six-column receiver geometry file for the
-Qoption.force_rake – If true, append
+fand force the manual rake for all finite points.
- pygrt.tensor.sproj(path: str | PathLike, *, strike: float | None = None, dip: float | None = None, rake: float | None = None, rcv_points: str | PathLike | None = None, force_rake: bool = False) None[源代码]
Project dynamic stress tensors onto receiver-fault geometry.
Accepts a single receiver directory or a multi-receiver root. Geometry is read from SAC receiver headers unless supplied explicitly. Finite receivers accept only
rake;force_rakeoverrides their existing rake values. Withrcv_points, the point count and coordinates must match in receiver-directory index order. All points are checked before any result is written. Writessigma_n.sacandtau_s.sacin dyne/cm².- 参数:
path – Dynamic stress result directory.
strike – Manual receiver strike in degrees.
dip – Manual receiver dip in degrees.
rake – Manual receiver rake in degrees.
rcv_points – Six-column receiver geometry file in receiver-directory index order; supply one point for a single receiver directory.
force_rake – Force a manual rake for finite receivers.
- pygrt.tensor.coulomb(path: str | PathLike, friction: float) None[源代码]
Compute dynamic Coulomb stress change,
tau_s + friction * sigma_n.Writes
coulomb.sacin each receiver directory, in dyne/cm².- 参数:
path – Single receiver directory or multi-receiver root.
friction – Nonnegative effective friction coefficient.
- pygrt.tensor.compute_sproj(*args, **kwargs)[源代码]
Legacy interface renamed to
static_sproj(); calling it raises an error.
- pygrt.tensor.static_coulomb(path: str | PathLike, friction: float) None[源代码]
Compute Coulomb stress change in a static synthesis NetCDF file.
The input file must already contain
sigma_nandtau_s, normally produced bystatic_sproj(). The resultcoulombis written back to the same file usingtau_s + friction * sigma_n.- 参数:
path – Static synthesis NetCDF file containing
sigma_nandtau_s.friction – Nonnegative dimensionless effective friction coefficient.
- pygrt.tensor.compute_coulomb(*args, **kwargs)[源代码]
Legacy interface renamed to
static_coulomb(); calling it raises an error.
- pygrt.tensor.strain(path: str | PathLike) None[源代码]
Compute a dynamic strain tensor in place from synthetic spatial derivatives.
The synthesis must have been computed with
calc_upar=True. Results are written back to the same SAC directory.- 参数:
path – Dynamic SAC synthesis directory.
- pygrt.tensor.static_strain(path: str | PathLike) None[源代码]
Compute a static strain tensor in place from synthetic spatial derivatives.
The synthesis must have been computed with
calc_upar=True. Results are written back to the same NetCDF file.- 参数:
path – Static synthesis NetCDF file.
- pygrt.tensor.rotation(path: str | PathLike) None[源代码]
Compute a dynamic rotation tensor in place from synthetic spatial derivatives.
The synthesis must have been computed with
calc_upar=True. Results are written back to the same SAC directory.- 参数:
path – Dynamic SAC synthesis directory.
- pygrt.tensor.static_rotation(path: str | PathLike) None[源代码]
Compute a static rotation tensor in place from synthetic spatial derivatives.
The synthesis must have been computed with
calc_upar=True. Results are written back to the same NetCDF file.- 参数:
path – Static synthesis NetCDF file.
- pygrt.tensor.stress(path: str | PathLike) None[源代码]
Compute a dynamic stress tensor in place from synthetic spatial derivatives.
The synthesis must have been computed with
calc_upar=True. Results are written back to the same SAC directory. Stress unit is dyne/cm² (= 0.1 Pa).- 参数:
path – Dynamic SAC synthesis directory.
- pygrt.tensor.static_stress(path: str | PathLike) None[源代码]
Compute a static stress tensor in place from synthetic spatial derivatives.
The synthesis must have been computed with
calc_upar=True. Results are written back to the same NetCDF file. Stress unit is dyne/cm² (= 0.1 Pa).- 参数:
path – Static synthesis NetCDF file.
- pygrt.tensor.compute_strain(*args, **kwargs)[源代码]
Legacy interface split into
strain()andstatic_strain(); calling it raises an error.
- pygrt.tensor.compute_rotation(*args, **kwargs)[源代码]
Legacy interface split into
rotation()andstatic_rotation(); calling it raises an error.
- pygrt.tensor.compute_stress(*args, **kwargs)[源代码]
Legacy interface split into
stress()andstatic_stress(); calling it raises an error.