Modules¶
Subpackages¶
- curve_apps.contours package
- Submodules
- curve_apps.contours.driver module
- curve_apps.contours.params module
ContourDetectionParameters
ContourDetectionParameters.contours
ContourDetectionParameters.fixed_contour_input_to_list_of_floats()
ContourDetectionParameters.fixed_contours
ContourDetectionParameters.has_intervals
ContourDetectionParameters.interval_max
ContourDetectionParameters.interval_min
ContourDetectionParameters.interval_spacing
ContourDetectionParameters.intervals
ContourDetectionParameters.max_distance
ContourDetectionParameters.resolution
ContourOutputParameters
ContourParameters
ContourSourceParameters
- curve_apps.edges package
- curve_apps.trend_lines package
Submodules¶
curve_apps.driver module¶
- class curve_apps.driver.BaseCurveDriver(*args: Any, **kwargs: Any)¶
Bases:
BaseDriver
Driver for the edge detection application.
- Parameters:
parameters – Application parameters.
- add_ui_json(entity: ObjectBase | UIJsonGroup) None ¶
Add ui.json file to entity.
- Parameters:
entity – Object to add ui.json file to.
- abstract make_curve()¶
- property out_group: UIJsonGroup | None¶
Output container group.
- property params: geoapps_utils.driver.data.BaseData¶
Application parameters.
- run()¶
Run method of the driver.
- store(curve: geoh5py.objects.Curve)¶
Update container group and monitoring directory.
- Parameters:
curve – Curve object to store.
curve_apps.utils module¶
- curve_apps.utils.filter_segments_orientation(vertices: numpy.ndarray, edges: numpy.ndarray, azimuth: float, azimuth_tol: float)¶
Filter segments orientation.
- Parameters:
vertices – Vertices for points.
edges – Edges for points.
azimuth – Filter angle (degree) on segments orientation, clockwise from North.
azimuth_tol – Tolerance (degree) on the azimuth.
- Returns:
Array of boolean.
- curve_apps.utils.find_curves(vertices: numpy.ndarray, parts: numpy.ndarray, params: TrendLineDetectionParameters | None = None) list[list[list[float]]] ¶
Find curves in a set of points.
- Parameters:
vertices – Vertices for points.
parts – Identifier for points belong to common parts.
params – Trend line detection parameters.
- Returns:
List of curves.
- curve_apps.utils.get_contour_list(params: ContourDetectionParameters) list[float] ¶
Compute contours requested by input parameters.
- Returns:
Corresponding list of values in float format.
- curve_apps.utils.image_to_grid_coordinate_transfer(image: numpy.ndarray, grid: list[numpy.ndarray]) Callable ¶
Returns a function to interpolate from image to grid coordinates.
- Parameters:
grid – list of x and y grids.
- curve_apps.utils.interp_to_grid(entity: geoh5py.objects.ObjectBase, values: numpy.ndarray, resolution: float, max_distance: float) tuple[list[numpy.ndarray], numpy.ndarray] ¶
Interpolate values into a regular grid based on entity locations.
- Parameters:
entity – Geoh5py object with locations data.
values – Data to be interpolated to grid.
resolution – Grid resolution
max_distance – Maximum distance used in weighted average.
- curve_apps.utils.set_vertices_height(vertices: numpy.ndarray, entity: geoh5py.objects.ObjectBase)¶
Uses entity z values to add height column to an Nx2 vertices array.
- Parameters:
vertices – Nx2 array of vertices.
entity – geoh5py entity with vertices property.
returns: Nx3 array of vertices.
- curve_apps.utils.walk_edges(path: list, incoming: list, edges: np.ndarray, vertices: np.ndarray, damping: float = 0.0, *, mask: np.ndarray | None = None) tuple[list, np.ndarray] ¶
Find all edges connected to a point.
- Parameters:
path – Current list of edges forming a path.
incoming – Incoming edge.
edges – All edges.
vertices – Direction of the edges.
damping – Damping factor between [0, 1] for the path roughness.
mask – Mask for nodes that have already been visited.
- Returns:
Edges connected to point.