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_path
str The path to the input CSV (ASCII) file containing the velocity data.
- file_path
- Returns:
- df
pandas.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:
- df
- 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())