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 path must be a static synthesis NetCDF file, not a dynamic synthesis directory, and must contain the six stress components produced by static_stress. For grid and ordinary points layouts, pass strike, dip and rake together. For the finite receiver faults layout, pass only rake when rake values are undefined; set force_rake=True to replace every rake. rcv_points corresponds to the C module’s -Q option and must contain six columns per row.

Results are written back to path as sigma_n and tau_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 -Q option.

  • force_rake – If true, append +f and 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_rake overrides their existing rake values. With rcv_points, the point count and coordinates must match in receiver-directory index order. All points are checked before any result is written. Writes sigma_n.sac and tau_s.sac in 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.sac in 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_n and tau_s, normally produced by static_sproj(). The result coulomb is written back to the same file using tau_s + friction * sigma_n.

参数:
  • path – Static synthesis NetCDF file containing sigma_n and tau_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() and static_strain(); calling it raises an error.

pygrt.tensor.compute_rotation(*args, **kwargs)[源代码]

Legacy interface split into rotation() and static_rotation(); calling it raises an error.

pygrt.tensor.compute_stress(*args, **kwargs)[源代码]

Legacy interface split into stress() and static_stress(); calling it raises an error.