pynetdesign.modelling.io.read_velocity#

pynetdesign.modelling.io.read_velocity(file_path)[source]#

Read velocity model data from a whitespace-delimited CSV (ASCII) file and return a DataFrame. This function reads a CSV (ASCII) file containing velocity information, checks if the columns match the expected format, and renames the columns according to a predefined mapping for easier analysis.

Parameters:
file_pathstr

The path to the input CSV (ASCII) file containing the velocity data.

Returns:
dfpandas.DataFrame

A DataFrame containing the renamed columns:

  • ‘Depth’ for Depth;

  • ‘Vp’ for P-wave velocity;

  • ‘VpVsRatio’ for Vp/Vs ratio;

  • ‘Qp’ for P-wave quality factor;

  • ‘Qs’ for S-wave quality factor;

  • ‘Rho’ for density (kg/m³);

  • ‘Ep’ for anisotropy parameter Ep (Thomsen epsilon parameter for VTI medium, P-SV waves)

  • ‘Dt’ for anisotropy parameter Dt (Thomsen delta parameter for VTI medium, P-SV waves)

  • ‘Gm’ for anisotropy parameter Gm (Thomsen gamma parameter for VTI medium, SH waves)

The DataFrame will also have the following attributes:

  • ‘model_type’str

    The type of model, either “homo” (homogeneous, single layer) or “layered” (multiple layers).

  • ‘model_anisotropy’str

    The anisotropy type, either “isotropic” (if all anisotropy parameters are zero) or “vti” (if any are non-zero).

Raises:
ValueError

If the input file columns do not match the expected format.

Notes

The function handles whitespace and tabs as delimiters.

Examples

>>> df = read_velocity("data/velocity.csv")
>>> print(df.head())