Skip to content

Commit dd02d4c

Browse files
authored
Merge pull request #443 from MiraGeoscience/release/0.9.0
GEOPY-693: merge release/0.9.0 to main
2 parents 784d9de + 51dbdcf commit dd02d4c

File tree

6 files changed

+15
-26
lines changed

6 files changed

+15
-26
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
# The short X.Y version.
9898
version = "0.9.0"
9999
# The full version, including alpha/beta/rc tags.
100-
release = "0.9.0-rc.4"
100+
release = "0.9.0"
101101

102102

103103
# List of patterns, relative to source directory, that match files and

geoapps/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# geoapps is distributed under the terms and conditions of the MIT License
66
# (see LICENSE file at the root of this source code package).
77

8-
__version__ = "0.9.0-rc.4"
8+
__version__ = "0.9.0"

geoapps/inversion/components/data.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ def _initialize(self) -> None:
145145
if any(np.isnan(self.radar)):
146146
self.mask[np.isnan(self.radar)] = False
147147

148-
self.locations = self.locations[self.mask, :]
149148
self.observed = self.filter(self.observed)
150149
self.radar = self.filter(self.radar)
151150
self.uncertainties = self.filter(self.uncertainties)

geoapps/inversion/components/factories/entity_factory.py

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,14 @@ def _build_dcip(self, inversion_data: InversionData):
115115
return entity
116116

117117
def _build(self, inversion_data: InversionData):
118+
118119
entity = inversion_data.create_entity(
119120
"Data", inversion_data.locations, geoh5_object=self.concrete_object
120121
)
122+
123+
if np.any(~inversion_data.mask):
124+
entity.remove_vertices(~inversion_data.mask)
125+
121126
if getattr(self.params.data_object, "base_stations", None) is not None:
122127
entity.base_stations = type(self.params.data_object.base_stations).create(
123128
entity.workspace,
@@ -128,27 +133,6 @@ def _build(self, inversion_data: InversionData):
128133
if getattr(self.params.data_object, "channels", None) is not None:
129134
entity.channels = [float(val) for val in self.params.data_object.channels]
130135

131-
if getattr(self.params.data_object, "cells", None) is not None:
132-
133-
indices = np.where(
134-
[c not in self.params.data_object.cells for c in entity.cells]
135-
)
136-
if indices:
137-
entity.remove_cells(
138-
indices
139-
) # Remove auto-generated cells that connect different lines
140-
141-
active_cells = inversion_data.mask[self.params.data_object.cells]
142-
active_ind = np.all(active_cells, axis=1)
143-
indices = np.where(
144-
[
145-
c not in self.params.data_object.cells[active_ind, :]
146-
for c in entity.cells
147-
]
148-
)[0]
149-
if indices:
150-
entity.remove_cells(indices)
151-
152136
return entity
153137

154138
@staticmethod

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "geoapps"
3-
version = "0.9.0-rc.4"
3+
version = "0.9.0"
44
description = "Open-sourced Applications in Geoscience"
55
authors = ["Mira Geoscience <dominiquef@mirageoscience.com>"]
66
repository = "https://github.com/MiraGeoscience/geoapps"

tests/run_tests/driver_mvi_test.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import os
99

1010
import numpy as np
11+
from geoh5py.objects import Curve
1112
from geoh5py.workspace import Workspace
1213
from SimPEG import utils
1314

@@ -34,14 +35,19 @@ def test_magnetic_vector_fwr_run(
3435
np.random.seed(0)
3536
inducing_field = (50000.0, 90.0, 0.0)
3637
# Run the forward
37-
geoh5, _, model, survey, topography = setup_inversion_workspace(
38+
geoh5, _, model, points, topography = setup_inversion_workspace(
3839
tmp_path,
3940
background=0.0,
4041
anomaly=0.05,
4142
refinement=refinement,
4243
n_electrodes=n_grid_points,
4344
n_lines=n_grid_points,
4445
)
46+
47+
# Unitest dealing with Curve
48+
survey = Curve.create(geoh5, name=points.name, vertices=points.vertices)
49+
geoh5.remove_entity(points)
50+
4551
params = MagneticVectorParams(
4652
forward_only=True,
4753
geoh5=geoh5,

0 commit comments

Comments
 (0)