-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: process data doesn't allow bad formatted
stratigraphic order
- Loading branch information
Lachlan Grose
committed
Sep 27, 2021
1 parent
01005b3
commit b9f8364
Showing
3 changed files
with
46 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,12 @@ | ||
# from LoopStructural.modelling import ProcessInputData | ||
# import pandas as pd | ||
# import numpy as np | ||
from LoopStructural.modelling import ProcessInputData | ||
import pandas as pd | ||
import numpy as np | ||
|
||
# contacts - | ||
# contacts=None | ||
# contact_orientations = None | ||
# stratigraphic_order = None | ||
# fault_orientations = None | ||
# fault_locations = None | ||
# fault_properties = None | ||
# fault_edges = None | ||
# intrusions = None | ||
# fault_stratigraphy = None | ||
# thicknesses = None | ||
# colours = None | ||
|
||
# def test_create_processor(): | ||
# contacts = np.zeros( | ||
# ProcessInputData( | ||
def test_create_processor(): | ||
df = pd.DataFrame(np.random.rand(10,3),columns=['X','Y','Z']) | ||
df['name'] = ['unit_{}'.format(name%2) for name in range(10)] | ||
stratigraphic_order = [('sg',['unit_0','unit_1'])] | ||
thicknesses = {'unit_0':1.,'unit_1':0.5} | ||
processor = ProcessInputData(contacts=df,stratigraphic_order=stratigraphic_order,thicknesses=thicknesses) | ||
assert((processor.data['val'].unique() == np.array([0.5,0])).all()) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters