Skip to content

Commit

Permalink
fix: adding loop specific exceptions and project file
Browse files Browse the repository at this point in the history
processor template
  • Loading branch information
Lachlan Grose committed Oct 5, 2021
1 parent db3562f commit a7664d2
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
34 changes: 34 additions & 0 deletions LoopStructural/modelling/input/project_file.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from LoopStructural.utils import LoopImportError, LoopTypeError, LoopValueError
try:
from LoopProjectFile import ProjectFile
except ImportError:
raise LoopImportError("LoopProjectFile cannot be imported")

from .process_data import ProcessInputData
import numpy as np
import pandas as pd
import networkx

from LoopStructural.utils import getLogger
logger = getLogger(__name__)

class Map2LoopProcessor(ProcessInputData):
def __init__(self,projectife,use_thickness=None):
if isinstance(projectife,ProjectFile) == False:
raise LoopTypeError("projectife must be of type ProjectFile")
self.projectife = projectife
# super().__init__(
# self.projectfile.contacts,
# self.projectfile.orientations,
# stratigraphic_order,
# thicknesses=thicknesses,
# fault_orientations=fault_orientations,
# fault_locations=fault_locations,
# fault_properties=fault_properties,
# fault_edges=list(fault_graph.edges),
# colours=dict(zip(groups['code'],groups['colour'])),
# fault_stratigraphy=None,
# intrusions=None,
# use_thickness=use_thickness,
# fault_edge_properties=fault_edge_properties
# )
2 changes: 1 addition & 1 deletion LoopStructural/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
from .helper import get_data_axis_aligned_bounding_box, get_data_bounding_box, get_data_bounding_box_map
from .helper import get_dip_vector,get_strike_vector, get_vectors, strike_dip_vector
from .regions import RegionEverywhere
from .exceptions import LoopException, LoopImportError, InterpolatorError
from .exceptions import LoopException, LoopImportError, InterpolatorError, LoopTypeError, LoopValueError
5 changes: 5 additions & 0 deletions LoopStructural/utils/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ class LoopImportError(LoopException):
class InterpolatorError(LoopException):
pass

class LoopTypeError(LoopException):
pass

class LoopValueError(LoopException):
pass

0 comments on commit a7664d2

Please sign in to comment.