geolib_plus.gef_cpt package¶
Submodules¶
geolib_plus.gef_cpt.gef_cpt module¶
- class geolib_plus.gef_cpt.gef_cpt.GefCpt(*, penetration_length: ~typing.Optional[~typing.Iterable] = None, depth: ~typing.Optional[~typing.Iterable] = None, coordinates: ~typing.Optional[~typing.List] = None, local_reference_level: ~typing.Optional[float] = None, depth_to_reference: ~typing.Optional[~typing.Iterable] = None, tip: ~typing.Optional[~typing.Iterable] = None, friction: ~typing.Optional[~typing.Iterable] = None, friction_nbr: ~typing.Optional[~typing.Iterable] = None, a: ~typing.Optional[float] = None, name: ~typing.Optional[str] = None, rho: ~typing.Optional[~typing.Iterable] = None, total_stress: ~typing.Optional[~typing.Iterable] = None, effective_stress: ~typing.Optional[~typing.Iterable] = None, pwp: ~typing.Optional[~typing.Iterable] = None, qt: ~typing.Optional[~typing.Iterable] = None, Qtn: ~typing.Optional[~typing.Iterable] = None, Qtncs: ~typing.Optional[~typing.Iterable] = None, Fr: ~typing.Optional[~typing.Iterable] = None, IC: ~typing.Optional[~typing.Iterable] = None, n: ~typing.Optional[~typing.Iterable] = None, vs: ~typing.Optional[~typing.Iterable] = None, G0: ~typing.Optional[~typing.Iterable] = None, E0: ~typing.Optional[~typing.Iterable] = None, permeability: ~typing.Optional[~typing.Iterable] = None, poisson: ~typing.Optional[~typing.Iterable] = None, damping: ~typing.Optional[~typing.Iterable] = None, relative_density: ~typing.Optional[~typing.Iterable] = None, psi: ~typing.Optional[~typing.Iterable] = None, pore_pressure_u1: ~typing.Optional[~typing.Iterable] = None, pore_pressure_u2: ~typing.Optional[~typing.Iterable] = None, pore_pressure_u3: ~typing.Optional[~typing.Iterable] = None, water: ~typing.Optional[~typing.Iterable] = None, lithology: ~typing.Optional[~typing.Iterable] = None, litho_points: ~typing.Optional[~typing.Iterable] = None, lithology_merged: ~typing.Optional[~typing.Iterable] = None, depth_merged: ~typing.Optional[~typing.Iterable] = None, index_merged: ~typing.Optional[~typing.Iterable] = None, vertical_datum: ~typing.Optional[str] = None, local_reference: ~typing.Optional[str] = None, inclination_x: ~typing.Optional[~typing.Iterable] = None, inclination_y: ~typing.Optional[~typing.Iterable] = None, inclination_ns: ~typing.Optional[~typing.Iterable] = None, inclination_ew: ~typing.Optional[~typing.Iterable] = None, inclination_resultant: ~typing.Optional[~typing.Iterable] = None, time: ~typing.Optional[~typing.Iterable] = None, net_tip: ~typing.Optional[~typing.Iterable] = None, pore_ratio: ~typing.Optional[~typing.Iterable] = None, tip_nbr: ~typing.Optional[~typing.Iterable] = None, unit_weight_measured: ~typing.Optional[~typing.Iterable] = None, pwp_ini: ~typing.Optional[~typing.Iterable] = None, total_pressure_measured: ~typing.Optional[~typing.Iterable] = None, effective_pressure_measured: ~typing.Optional[~typing.Iterable] = None, electric_cond: ~typing.Optional[~typing.Iterable] = None, magnetic_strength_x: ~typing.Optional[~typing.Iterable] = None, magnetic_strength_y: ~typing.Optional[~typing.Iterable] = None, magnetic_strength_z: ~typing.Optional[~typing.Iterable] = None, magnetic_strength_tot: ~typing.Optional[~typing.Iterable] = None, magnetic_inclination: ~typing.Optional[~typing.Iterable] = None, magnetic_declination: ~typing.Optional[~typing.Iterable] = None, temperature: ~typing.Optional[~typing.Iterable] = None, predrilled_z: ~typing.Optional[float] = None, undefined_depth: ~typing.Optional[float] = None, cpt_standard: ~typing.Optional[str] = None, quality_class: ~typing.Optional[str] = None, cpt_type: ~typing.Optional[str] = None, result_time: ~typing.Optional[str] = None, water_measurement_type: ~typing.Optional[str] = None, litho_NEN: ~typing.Optional[~typing.Iterable] = None, E_NEN: ~typing.Optional[~typing.Iterable] = None, cohesion_NEN: ~typing.Optional[~typing.Iterable] = None, fr_angle_NEN: ~typing.Optional[~typing.Iterable] = None, plot_settings: ~geolib_plus.plot_settings.PlotSettings = <geolib_plus.plot_settings.PlotSettings object>, g: float = 9.81, Pa: float = 100.0, error_codes: dict = {})¶
Bases:
AbstractCPT
- drop_duplicate_depth_values()¶
Updates fields by removing penetration_length that are duplicate.
- has_points_with_error() bool ¶
A routine which checks whether the data is free of points with error.
- Returns:
If the gef cpt data is free of error flags
- remove_points_with_error()¶
Updates fields by removing depths that contain values with errors. i.e. incomplete data
geolib_plus.gef_cpt.gef_file_reader module¶
Tools to read gef files.
- class geolib_plus.gef_cpt.gef_file_reader.GefColumnProperty(*, gef_key: int, error_code: Optional[Union[str, float]] = None, values_from_gef: Optional[Union[Iterable, str]] = None, multiplication_factor: float = 1, gef_column_index: Optional[int] = None)¶
Bases:
GefProperty
- gef_column_index: Optional[int]¶
- multiplication_factor: float¶
- class geolib_plus.gef_cpt.gef_file_reader.GefFileReader¶
Bases:
CptReader
- get_as_np_array(values_from_gef: Iterable)¶
Converts iterable to np array if the values are not None :param values_from_gef: :return: numpy array
- static get_line_from_data_that_ends_with(code_string: str, data: List[str]) str ¶
Given a list of strings it returns the first one ending with the given code_string.
- Parameters:
code_string (str) – Code string to find at the end of each line.
data (List[str]) – List of strings to iterate through.
- Raises:
ValueError – When no code_string argument is given.
ValueError – When no data argument is given.
- Returns:
Line ending with the requested code_string.
- Return type:
str
- static get_line_index_from_data_starts_with(code_string: str, data: List[str]) int ¶
Given a list of strings it returns the position of the first one which starts by the code string given.
- Parameters:
code_string (str) – The line that needs to be found.
data (List[str]) – Collection of strings representing lines.
- Raises:
ValueError – When the code_string argument is not given or is None.
ValueError – When the data argument is not given or is None.
ValueError – When no values where found for the given arguments.
- Returns:
Line index where the data can be found.
- Return type:
int
- static get_pre_drill_depth(gef_string: List, penetration_length: List) float ¶
Gets the pre-drill depth from the penetration length. From the CUR document GEOTECHNICAL EXCHANGE FORMAT FOR CPT-DATA Version 1.2, the pre-drill depth is defined as the #MEASUREMENTVAR = 13, [figure], m, pre-excavated depth. If this does not exist, the pre-drill depth is set to the value of the first penetration length.
- Parameters:
gef_string (List) – List of strings from the gef file
penetration_length (List) – List of penetration lengths
- Returns:
The pre-drill depth
- Return type:
float
- map_error_codes_to_external_property_names() Dict ¶
Matches error keys of GefFileReader dictionary to AbstractCPT class. That are used later in pre-processing.
- match_idx_with_error(idx_errors: List[str]) None ¶
In the gef file each of the parameters has a value that is written when an error in the cpt data accumulation ocurred. The depth and tip keys are required inputs of the gef file. If they are missing then the function will raise an error. If another key is missing then a warning should be given back.
- read_column_data(data: List[str], idx_EOH: int) None ¶
Read column data from the gef file table.
- read_column_index_for_gef_data(key_cpt: int, data: List[str])¶
In the gef file ‘#COLUMNINFO=id , name , column_number’ format is used. This function returns the id number. Which will be later used as reference for the errors.
- read_date_cpt(data: List[str]) str ¶
Reads the date from the cpt. If startdate is present, the date is defined as the startdate. Else the date is equal to the filedate, which is always present. :return:
- read_file(filepath: Path) dict ¶
- read_gef(gef_file: Path, fct_a: float = 0.8) Dict ¶
Opens and reads gef file. Returns dictionary containing all possible inputs from gef file.
- read_information_for_gef_data(key_name: str, data: List[str]) str ¶
Reads header information from the gef data.
geolib_plus.gef_cpt.validate_gef module¶
- class geolib_plus.gef_cpt.validate_gef.GefLib¶
Bases:
object
Wrapper class and functions around geflib (gef2.dll) functions required for validating of gef input files (.gef) Collection of helper functions for validating gef files.
- static get_code(code: str) str ¶
Converts Code to gef file code to procedure code.
- Parameters:
code – gef file code
- Returns:
gef procedure code
- geolib_plus.gef_cpt.validate_gef.validate_gef_cpt(filename: Path, logging: bool = True)¶
Execution of validation. This is thread safe. Thus multiple versions of geflib.dll can be loaded in spawned processes without interferring.
- Parameters:
filename (Path) – path to gef file
logging (bool) – generate warning and error log file