Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Loop3D/map2loop-3
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyThomsonMonash committed Jan 25, 2024
2 parents 25dcb54 + 997ac54 commit d0f3b37
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest"] # , "macos-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: ${{ fromJSON(vars.BUILD_OS)}}
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS)}}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
Expand Down Expand Up @@ -59,8 +59,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest"] # , "macos-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: ${{ fromJSON(vars.BUILD_OS)}}
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS)}}
steps:
- uses: conda-incubator/setup-miniconda@v2
with:
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## [3.0.5](https://github.com/Loop3D/map2loop/compare/3.0.4...3.0.5) (2024-01-25)


### Bug Fixes

* Typo in intrusion flag, ignoring intrusions for contact calculations, remove errant sorter from take_best option ([527de6c](https://github.com/Loop3D/map2loop/commit/527de6c339e56ead036ab5ed5d94d06d77673ae6))

## [3.0.4](https://github.com/Loop3D/map2loop-3/compare/3.0.3...3.0.4) (2024-01-11)


### Bug Fixes

* Issue with conda build test env not working, skipping ([2fffb69](https://github.com/Loop3D/map2loop-3/commit/2fffb696556f48f0620dfbac356971301fb15e89))

## [3.0.3](https://github.com/Loop3D/map2loop-3/compare/3.0.2...3.0.3) (2024-01-11)


Expand Down
5 changes: 4 additions & 1 deletion map2loop/mapdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ def parse_geology_map(self) -> tuple:
geology["INTRUSIVE"] = self.raw_data[Datatype.GEOLOGY][config["rocktype_column"]].astype(str).str.contains(config["intrusive_text"])
geology["ROCKTYPE1"] = self.raw_data[Datatype.GEOLOGY][config["rocktype_column"]].astype(str)
else:
geology["INSTRUSIVE"] = False
geology["INTRUSIVE"] = False
geology["ROCKTYPE1"] = ""

if config["alt_rocktype_column"] in self.raw_data[Datatype.GEOLOGY]:
Expand Down Expand Up @@ -1213,6 +1213,9 @@ def extract_all_contacts(self, save_contacts=True):
"""
geology = self.get_map_data(Datatype.GEOLOGY).copy()
geology = geology.dissolve(by="UNITNAME", as_index=False)
# Remove intrusions
geology = geology[geology["INTRUSIVE"]==False]
geology = geology[geology["SILL"]==False]
# Remove faults from contact geomety
if self.get_map_data(Datatype.FAULT) is not None:
faults = self.get_map_data(Datatype.FAULT).copy()
Expand Down
2 changes: 1 addition & 1 deletion map2loop/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def calculate_stratigraphic_order(self, take_best=False):
Use unit relationships, unit ages and the sorter to create a stratigraphic column
"""
if take_best:
sorters = [SorterUseHint(), SorterAgeBased(), SorterAlpha(), SorterUseNetworkX(), SorterMaximiseContacts(), SorterObservationProjections()]
sorters = [SorterUseHint(), SorterAgeBased(), SorterAlpha(), SorterUseNetworkX()]
columns = [sorter.sort(self.stratigraphic_column.stratigraphicUnits,
self.map2model.get_unit_unit_relationships(),
self.map2model.get_sorted_units(),
Expand Down
4 changes: 3 additions & 1 deletion map2loop/sorter.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def sort(self, units: pandas.DataFrame, unit_relationships: pandas.DataFrame, st
while graph.number_of_nodes() > 0:
if cnode is None:
df = pandas.DataFrame(columns=["unit", "num_neighbours"])
df["unit"] = units
df["unit"] = list(graph.nodes)
df["num_neighbours"] = df.apply(lambda row: len(list(graph.neighbors(row["unit"]))), axis=1)
df.sort_values(by=["num_neighbours"], inplace=True)
df.reset_index(inplace=True, drop=True)
Expand Down Expand Up @@ -320,6 +320,8 @@ def sort(self, units: pandas.DataFrame, unit_relationships: pandas.DataFrame, st
return stratigraphic_order_hint

geol = map_data.get_map_data(Datatype.GEOLOGY).copy()
geol = geol[geol["INTRUSIVE"]==False]
geol = geol[geol["SILL"]==False]
orientations = map_data.get_map_data(Datatype.STRUCTURE).copy()

verbose = False
Expand Down

0 comments on commit d0f3b37

Please sign in to comment.