Skip to content

Commit a7664d2

Browse files
author
Lachlan Grose
committed
fix: adding loop specific exceptions and project file
processor template
1 parent db3562f commit a7664d2

File tree

3 files changed

+40
-1
lines changed

3 files changed

+40
-1
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
from LoopStructural.utils import LoopImportError, LoopTypeError, LoopValueError
2+
try:
3+
from LoopProjectFile import ProjectFile
4+
except ImportError:
5+
raise LoopImportError("LoopProjectFile cannot be imported")
6+
7+
from .process_data import ProcessInputData
8+
import numpy as np
9+
import pandas as pd
10+
import networkx
11+
12+
from LoopStructural.utils import getLogger
13+
logger = getLogger(__name__)
14+
15+
class Map2LoopProcessor(ProcessInputData):
16+
def __init__(self,projectife,use_thickness=None):
17+
if isinstance(projectife,ProjectFile) == False:
18+
raise LoopTypeError("projectife must be of type ProjectFile")
19+
self.projectife = projectife
20+
# super().__init__(
21+
# self.projectfile.contacts,
22+
# self.projectfile.orientations,
23+
# stratigraphic_order,
24+
# thicknesses=thicknesses,
25+
# fault_orientations=fault_orientations,
26+
# fault_locations=fault_locations,
27+
# fault_properties=fault_properties,
28+
# fault_edges=list(fault_graph.edges),
29+
# colours=dict(zip(groups['code'],groups['colour'])),
30+
# fault_stratigraphy=None,
31+
# intrusions=None,
32+
# use_thickness=use_thickness,
33+
# fault_edge_properties=fault_edge_properties
34+
# )

LoopStructural/utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
from .helper import get_data_axis_aligned_bounding_box, get_data_bounding_box, get_data_bounding_box_map
88
from .helper import get_dip_vector,get_strike_vector, get_vectors, strike_dip_vector
99
from .regions import RegionEverywhere
10-
from .exceptions import LoopException, LoopImportError, InterpolatorError
10+
from .exceptions import LoopException, LoopImportError, InterpolatorError, LoopTypeError, LoopValueError

LoopStructural/utils/exceptions.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,9 @@ class LoopImportError(LoopException):
1616
class InterpolatorError(LoopException):
1717
pass
1818

19+
class LoopTypeError(LoopException):
20+
pass
21+
22+
class LoopValueError(LoopException):
23+
pass
1924

0 commit comments

Comments
 (0)