dataclass.geoProfiles
Classes
- class dataclass.geoProfiles.Profile1D
Define a 1D profile of geological layer.
Methods:
- __init__(top: float | None = None, x_coord: float | None = None, y_coord: float | None = None, layers_depth: list[float] | None = None, materials_id: list[int] | None = None, gwt_depth: float | None = None, pnum: str | int | None = None, samples_depth: list[float] | None = None, samples_id: list[int] | None = None, isamples_top_depth: list[float] | None = None, isamples_length: list[float] | None = None, isamples_id: list[int] | None = None) None
Initialize a Profile1D object.
- cut_profile(cut_elev: float, keep_below: bool = True, add_fill: bool = False, fill_id: int | Literal[top_layer] = <ast.UnaryOp object at 0x0000017357D75660>, inplace: bool = False) Profile1D | None
Cut a 1D profile to 2 profiles and get one of them.
Parameters
- cut_elevfloat, default: 0.0
The elevation at where to cut the profile.
- keep_belowbool, default: True
If it’s True, the profile below the cut_elev will be returned.
- add_fillbool, default: True
If it’s True, when the cut_elev is above the top of profile and keep below is True, fill will be added.
- fill_idint | “top_layer”, default: -1
The material id for the fill. When set to
"top_layer"withadd_fill=Trueandkeep_below=True, extend the top layer tocut_elevwithout adding a new layer (only valid whencut_elevis above the profile top).- inplacebool, default: False
If it’s true, the instance will be modified inplace, or a new instance will be returned.
- slice_profile(slice_top: float, slice_bottom: float, inplace: bool = False) Profile1D | None
Get(slice) a section of a 1d profile between 2 elevations.
Parameters
- slice_topfloat
The top elevation of the slice.
- slice_bottomfloat
The bottom elevation of the slice.
- inplacebool, default: False
If it’s true, the instance will be modified inplace, or a new instance will be returned.
Notes
If slice top is above profile top or slice bottom is below profile bottom, no fill will be added.
- cal_samples_thickness() dict[int, list[float]] | None
Calculate the characteristic thickness of each sample.
Returns
- dict[int, list[float]]
key is the id of the sample, value1 is the characteristic thickness of the sample, value2 is the top elevation of current represent layer, value3 is the bottom elevation of current represent layer.
Properties:
- layers_thickness
- layers_elevation
- layers_top_elevation
- gwt_elevation
- samples_elevation
- isamples_bottom_depth
- isamples_center_depth
- isamples_top_elevation
- isamples_bottom_elevation
- isamples_center_elevation
- class dataclass.geoProfiles.MultiProfile1D
Object for a list of Profile1D.
Methods:
- __init__(profile_1ds: list[Profile1D] | None = None, profiles_table: pd.DataFrame | None = None, layers_table: pd.DataFrame | None = None, samples_table: pd.DataFrame | None = None, isamples_table: pd.DataFrame | None = None) None
Initialize a MultiProfile1D object.
Parameters
- profile_1dslist[Profile1D], default: None
List of Profile1D objects. If it’s not None, the profile1d_table will be ignored.
- profiles_tablepd.DataFrame, default: None
Data of profile_1d information with columns ‘[“pnum”, “top”, “x_coord”, “y_coord”, “gwt_depth”]’
- layers_tablepd.DataFrame, default: None
Data of layers information with columns ‘[“pnum”, “layers_depth”, “materials_id”]’
- samples_tablepd.DataFrame, default: None
Data of samples information with columns ‘[“pnum”, “samples_depth”, “samples_id”]’
- isamples_tablepd.DataFrame, default: None
Data of isamples information with columns ‘[“pnum”, “isamples_top_depth”, “isamples_length”, “isamples_id]’
- class dataclass.geoProfiles.MaterialTable
Using TableData to define a material table containing all kinds of materials information.
- Inherits from:
TableData
Methods:
- __init__(data: pd.DataFrame | dict | None = None)
Initialize MaterialTable with material_id as index.
Notes
The material_id will be set as the index of the MaterialTable.
- get_material(material_id: int) TableSeries | TableData
- add_material(material: dict[str, str | float | int | None]) None
Add a row to the material table by a dictionary.
- delete_material(material_id: int) None
Delete a row from the material table by specified material ID.
- sort_by_layer_number(inplace: bool = True, reset_material_id: bool = True) MaterialTable | None
Sort the material table by layer number in ascending order.
The layer number should follow the format: ‘1’, ‘1-1’, ‘2-1-0’, etc. Three numbers at most,
1is equal to1-0-0,1-1is equal to1-1-0.Parameters
- inplacebool, default: True
If True, the material table will be sorted in place. If False, a new sorted material table will be returned.
- reset_material_idbool, default: True
If True, the material_id will be reset to the ascending order of layer number which means the material_id will start from 0 at the first row after sorting.
- get_material_id(layer_number: str | None = None, material_name: str | None = None) int
Get the material_id by layer_number or material_name.
Parameters
- layer_numberstr | None, default: None
The layer number to get the material_id.
- material_namestr | None, default: None
The material name to get the material_id.
Notes
If layer_number is provided, the material_name will be ignored.
- convert_to_table_data() TableData
Convert the material table to a table data.
The material_id index will be removed and a new column named ‘material_id’ will be added.
- copy(deep=True)
Override copy to preserve MaterialTable type instead of returning TableData
- reset_index(level=None, drop=False, inplace=False, col_level=0, col_fill='')
Override reset_index to preserve MaterialTable type
- class dataclass.geoProfiles.MaterialTableCollection
A collection of material tables.
Methods:
- __init__(data: list[MaterialTable] | None = None, name: str | None = None, title: str | None = None, description: str | None = None)
- add_table(table: MaterialTable) None
Add a material table to the collection.
- get_table(key: str) MaterialTable
Get a material table by name.
- class dataclass.geoProfiles.ProjectInfo
项目信息
- Inherits from:
BaseModel
Attributes:
- company_name: str | None = <ast.Call object at 0x0000017357C728F0>
- project_name: str | None = <ast.Call object at 0x0000017357C72B00>
- project_number: str | None = <ast.Call object at 0x0000017357C72D10>
- class dataclass.geoProfiles.SectionBore
钻孔
- Inherits from:
BaseModel
Attributes:
- bore_num: str | None = <ast.Call object at 0x0000017357C72FE0>
- bore_type: BoreTypes | None = <ast.Call object at 0x0000017357C731F0>
- x_coord: float | None = <ast.Call object at 0x0000017357C73400>
- x: float | None = <ast.Call object at 0x0000017357C73610>
- y: float | None = <ast.Call object at 0x0000017357C73820>
- top: float | None = <ast.Call object at 0x0000017357C73A30>
- bore_diameter: float | None = <ast.Call object at 0x0000017357C73C40>
- bore_starting_date: str | None = <ast.Call object at 0x0000017357C73E50>
- bore_completion_date: str | None = <ast.Call object at 0x0000017357C940A0>
- steady_water_depth: float | None = <ast.Call object at 0x0000017357C942B0>
- water_level_measure_date: str | None = <ast.Call object at 0x0000017357C944C0>
- drawing_scale: int | None = <ast.Call object at 0x0000017357C946D0>
- elevations: Sequence[float] | None = <ast.Call object at 0x0000017357C94940>
- depths: Sequence[float] | None = <ast.Call object at 0x0000017357C94BB0>
- materials: Sequence[int] | None = <ast.Call object at 0x0000017357C94E20>
- layers_num: Sequence[str] | None = <ast.Call object at 0x0000017357C95090>
- distance_to: float | None = <ast.Call object at 0x0000017357C952A0>
- sample_num: list[str] | None = <ast.Call object at 0x0000017357C95510>
- sample_depths: Sequence[float] | None = <ast.Call object at 0x0000017357C95780>
- sample_lengths: Sequence[float] | None = <ast.Call object at 0x0000017357C959F0>
- sample_types: Sequence[int] | None = <ast.Call object at 0x0000017357C95C60>
- spt_depths: Sequence[float] | None = <ast.Call object at 0x0000017357C95ED0>
- spt_lengths: Sequence[float] | None = <ast.Call object at 0x0000017357C96140>
- spt_numbers: Sequence[int] | None = <ast.Call object at 0x0000017357C963B0>
- dpt_top_depths: Sequence[float] | None = <ast.Call object at 0x0000017357C96620>
- dpt_bot_depths: Sequence[float] | None = <ast.Call object at 0x0000017357C96890>
- dpt_numbers: Sequence[float] | None = <ast.Call object at 0x0000017357C96B00>
- cpt_bot_depths: Sequence[float] | None = <ast.Call object at 0x0000017357C96D70>
- cpt_tip_forces: Sequence[float] | None = <ast.Call object at 0x0000017357C96FE0>
- cpt_side_forces: Sequence[float] | None = <ast.Call object at 0x0000017357C97250>
- f_bot_elev_bore: float | None = <ast.Call object at 0x0000017357C97460>
- wave_velocity_depths: Sequence[float] | None = <ast.Call object at 0x0000017357C976D0>
- transverse_wave_velocitys: Sequence[float] | None = <ast.Call object at 0x0000017357C97940>
- longitudinal_wave_velocitys: Sequence[float] | None = <ast.Call object at 0x0000017357C97BB0>
- collapsibility_top_depths: Sequence[float] | None = <ast.Call object at 0x0000017357C97E20>
- collapsibility_lengths: Sequence[float] | None = <ast.Call object at 0x0000017357C900D0>
- collapsibility_coes: Sequence[float] | None = <ast.Call object at 0x0000017357C90340>
- gravity_collapsibility_coes: Sequence[float] | None = <ast.Call object at 0x0000017357C905B0>
- class dataclass.geoProfiles.SectionInterface
地质剖面图上地层线信息
- Inherits from:
BaseModel
Attributes:
- coords: list[tuple[(float, float)]] = <ast.Call object at 0x0000017357C90970>
- material: int = <ast.Call object at 0x0000017357C90AF0>
- layer: int = <ast.Call object at 0x0000017357C90C70>
- virtual_interface: bool = <ast.Call object at 0x0000017357C90DF0>
- class dataclass.geoProfiles.SectionLine
- Inherits from:
BaseModel
Attributes:
- name: str | None = <ast.Call object at 0x0000017357C91060>
- bores: list[str] | None = <ast.Call object at 0x0000017357C912D0>
- class dataclass.geoProfiles.SectionHatch
地质剖面图填充信息
- Inherits from:
BaseModel
Attributes:
- coords: list[tuple[(float, float)]] = <ast.Call object at 0x0000017357C91660>
- material: int = <ast.Call object at 0x0000017357C917E0>
- layer: int = <ast.Call object at 0x0000017357C91960>
- class dataclass.geoProfiles.SectionMaterial
- Inherits from:
BaseModel
Methods:
- normalize_texture(cls, value)
- normalize_fill_color(cls, value)
Attributes:
- material_name: str | None = <ast.Call object at 0x0000017357C91BA0>
- layer_number: str | None = <ast.Call object at 0x0000017357C91DB0>
- texture: str | None = <ast.Call object at 0x0000017357C91FC0>
- fill_color: tuple[(int, int, int)] | None = <ast.Call object at 0x0000017357C922C0>
- geological_age_symbol: str | None = <ast.Call object at 0x0000017357C924D0>
- geological_origin_symbol: str | None = <ast.Call object at 0x0000017357C926E0>
- weathering_degree: str | None = <ast.Call object at 0x0000017357C928F0>
- layer_description: str | None = <ast.Call object at 0x0000017357C92B00>
- bearing_capacity: float | None = <ast.Call object at 0x0000017357C92D10>
- pile_side_friction: float | None = <ast.Call object at 0x0000017357C92F20>
- class dataclass.geoProfiles.BoreForPlanDraw
钻孔平面布置图需要的信息
- Inherits from:
BaseModel
Attributes:
- project_infos: ProjectInfo | None = <ast.Call object at 0x0000017357C5D660>
- bores: list[SectionBore] | None = <ast.Call object at 0x0000017357C5D8D0>
- scection_lines: list[SectionLine] | None = <ast.Call object at 0x0000017357C5DB40>
- y_direction: Literal[(N, E)] | None = <ast.Call object at 0x0000017357C5DE10>
- class dataclass.geoProfiles.BoreForCadDraw
钻孔柱状图需要的信息
- Inherits from:
BaseModel
Attributes:
- project_infos: ProjectInfo | None = <ast.Call object at 0x0000017357C5E0E0>
- bores: list[SectionBore] | None = <ast.Call object at 0x0000017357C5E350>
- materials: dict[(int, SectionMaterial)] | None = <ast.Call object at 0x0000017357C5E620>
- class dataclass.geoProfiles.SectionForCadDraw
地质剖面图需要的信息
- Inherits from:
BaseModel
Attributes:
- bounds: tuple[(float, float, float, float)] | None = <ast.Call object at 0x0000017357C5EA10>
- bores: list[SectionBore] | None = <ast.Call object at 0x0000017357C5EC80>
- interfaces: list[SectionInterface] | None = <ast.Call object at 0x0000017357C5EEF0>
- hatches: list[SectionHatch] | None = <ast.Call object at 0x0000017357C5F160>
- materials: dict[(int, SectionMaterial)] | None = <ast.Call object at 0x0000017357C5F430>
- section_line: list[tuple[(float, float)]] | None = <ast.Call object at 0x0000017357C5F760>
- section_num: str | None = <ast.Call object at 0x0000017357C5F970>
- class dataclass.geoProfiles.SectionInterface3D
- Inherits from:
BaseModel
Attributes:
- coords: list[tuple[(float, float, float)]] = <ast.Call object at 0x0000017357C5FCD0>
- material: int = <ast.Call object at 0x0000017357C5FE50>
- layer: int = <ast.Call object at 0x0000017357C5FFD0>
- class dataclass.geoProfiles.SectionHatch3D
- Inherits from:
BaseModel
Attributes:
- coords: list[tuple[(float, float, float)]] = <ast.Call object at 0x0000017357F1C340>
- material: int = <ast.Call object at 0x0000017357F1C4C0>
- layer: int = <ast.Call object at 0x0000017357F1C640>
- class dataclass.geoProfiles.Section3D
- Inherits from:
BaseModel
Attributes:
- bounds: tuple[(float, float, float, float, float, float)] | None = <ast.Call object at 0x0000017357F1CA60>
- interfaces: list[SectionInterface3D] | None = <ast.Call object at 0x0000017357F1CCD0>
- materials: dict[(int, SectionMaterial)] | None = <ast.Call object at 0x0000017357F1CFA0>
- hatches: list[SectionHatch3D] | None = <ast.Call object at 0x0000017357F1D210>
- section_num: str | None = <ast.Call object at 0x0000017357F1D420>
Functions
- dataclass.geoProfiles.sort_layer_numbers(layer_numbers: list, raise_on_invalid: bool = False) list[str]
Sort layer numbers considering the format like “2”, “2-1”, “3”, “4”.
The layer number should follow the format: ‘1’, ‘1-1’, ‘2-1-0’, etc. Three numbers at most,
1is equal to1-0-0,1-1is equal to1-1-0.Parameters
- layer_numberslist
List of layer numbers (can be strings or numbers)
Returns
- Any
list[str] Sorted list of layer numbers as strings