sec_interp.core.services package
Services package for geological data processing.
This package contains service classes that handle specific data processing tasks: - GeologyService: Geological profile generation - StructureService: Structural data projection - DrillholeService: Drillhole projection
- class sec_interp.core.services.DrillholeService(collar_processor: CollarProcessor | None = None, survey_processor: SurveyProcessor | None = None, interval_processor: IntervalProcessor | None = None, data_fetcher: Any | None = None, trajectory_engine: TrajectoryEngine | None = None)
Bases:
IDrillholeService,TranslatableMixinService for processing and orchestrating drillhole data (QGIS-agnostic).
- __init__(collar_processor: CollarProcessor | None = None, survey_processor: SurveyProcessor | None = None, interval_processor: IntervalProcessor | None = None, data_fetcher: Any | None = None, trajectory_engine: TrajectoryEngine | None = None) None
Initialize the service with specialized processors.
- Parameters:
collar_processor – Optional collar processor.
survey_processor – Optional survey processor.
interval_processor – Optional interval processor.
data_fetcher – Kept for backward-compatible construction (unused).
trajectory_engine – Optional trajectory engine.
- process_context(context: DrillholeContext, feedback: Any | None = None) tuple[list[GeologySegment], list[DrillholeProjection]] | None
Process drillholes from a detached context (pure computation).
- Parameters:
context – Fully-detached drillhole data from
DrillholeExtractor.feedback – Optional feedback object for progress/cancellation.
- Returns:
A tuple
(geol_data, drillhole_data), or None if cancelled.
- class sec_interp.core.services.GeologyService
Bases:
IGeologyServiceService for generating geological profiles (pure computation).
- build_segments(context: GeologyContext, feedback: Any | None = None) list[GeologySegment]
Build geological segments from a detached context.
Interpolates segment elevations along the master profile and builds
GeologySegmentobjects, sorted by distance along the section.- Parameters:
context – Fully-detached geology data from
GeologyExtractor.feedback – Optional feedback object for progress/cancellation.
- Returns:
Sorted list of geological segments.
- Return type:
GeologyData
- class sec_interp.core.services.StructureService
Bases:
IStructureService,TranslatableMixinService for projecting structural measurements onto cross-sections.
This service receives pre-extracted structural data (from the GUI’s
StructureExtractor) and performs the pure-math projection and apparent dip calculations. It is QGIS-agnostic.- project_structures(line_points: list[tuple[float, float]], struct_data: list[dict[str, Any]], elevation_sampler: Callable[[float, float], float], line_az: float, dip_field: str, strike_field: str) list[StructureMeasurement]
Project detached structural measurements onto the section plane.
Calculates stations (distance along section), elevations from the injected sampler, and apparent dips based on the section orientation.
- Parameters:
line_points – Section line vertices as
(x, y)tuples.struct_data – List of detached structures (
{"point": (x, y), "attributes": {...}}).elevation_sampler – Callable returning elevation at
(x, y).line_az – Section azimuth in degrees.
dip_field – Field name for dip angle.
strike_field – Field name for strike azimuth.
- Returns:
Sorted list of projected StructureMeasurement objects.
- Return type:
StructureData
Subpackages
- sec_interp.core.services.drillhole package
- Submodules
- sec_interp.core.services.export package
- sec_interp.core.services.profile package
component_cache_key()drillholes_cache_key()geology_cache_key()structures_cache_key()topography_cache_key()- Submodules
- sec_interp.core.services.profile.cache module
- sec_interp.core.services.profile.drillholes module
- sec_interp.core.services.profile.errors module
- sec_interp.core.services.profile.geology module
- sec_interp.core.services.profile.pipeline module
- sec_interp.core.services.profile.structures module
- sec_interp.core.services.profile.topography module
Submodules
- sec_interp.core.services.access_control_service module
- sec_interp.core.services.drillhole_service module
- sec_interp.core.services.export_service module
- sec_interp.core.services.geology_service module
- sec_interp.core.services.preview_service module
- sec_interp.core.services.structure_service module
- sec_interp.core.services.vertical_exaggeration_service module
VerticalExaggerationServiceVerticalExaggerationService.ASPECT_EXPRESSIVEVerticalExaggerationService.ASPECT_FLATVerticalExaggerationService.ASPECT_MODERATEVerticalExaggerationService.BASE_EXPRESSIVEVerticalExaggerationService.BASE_FLATVerticalExaggerationService.BASE_LOWVerticalExaggerationService.BASE_MODERATEVerticalExaggerationService.DEFAULT_VERT_EXAGVerticalExaggerationService.DENSITY_DENSEVerticalExaggerationService.DENSITY_SPARSEVerticalExaggerationService.MAX_VERT_EXAGVerticalExaggerationService.MIN_VERT_EXAGVerticalExaggerationService.MULT_DENSEVerticalExaggerationService.MULT_NEUTRALVerticalExaggerationService.MULT_SPARSEVerticalExaggerationService.calculate()VerticalExaggerationService.calculate_from_result()