Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@
"meshType": "{275ecee9-9c24-4378-bf94-65f3c5fbe163}",
"value": ""
},
"z_from_topo": {
"group": "Survey",
"main": true,
"label": "Surface survey",
"tooltip": "Uncheck if borehole data is present",
"value": true
},
"line_object": {
"association": "Cell",
"dataType": "Referenced",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@
"meshType": "{275ecee9-9c24-4378-bf94-65f3c5fbe163}",
"value": ""
},
"z_from_topo": {
"group": "Data",
"main": true,
"label": "Surface survey",
"tooltip": "Uncheck if borehole data is present",
"value": true
},
"line_object": {
"association": "Cell",
"dataType": "Referenced",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@
"meshType": "{275ecee9-9c24-4378-bf94-65f3c5fbe163}",
"value": ""
},
"z_from_topo": {
"group": "Survey",
"main": true,
"label": "Surface survey",
"tooltip": "Uncheck if borehole data is present",
"value": true
},
"potential_channel_bool": true,
"mesh": {
"group": "Mesh and models",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@
"meshType": "{275ecee9-9c24-4378-bf94-65f3c5fbe163}",
"value": ""
},
"z_from_topo": {
"group": "Data",
"main": true,
"label": "Surface survey",
"tooltip": "Uncheck if borehole data is present",
"value": true
},
"potential_channel": {
"association": [
"Cell",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@
"value": "",
"tooltip": "Selects the data representing the different lines in the survey."
},
"z_from_topo": {
"group": "Data pre-processing",
"label": "Take z from topography",
"tooltip": "Sets survey elevation to topography before any offsets are applied.",
"value": false,
"verbose": 3,
"visible": false
},
"potential_channel_bool": true,
"u_cell_size": {
"min": 0.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@
"value": "",
"tooltip": "Selects the data representing the different lines in the survey."
},
"z_from_topo": {
"group": "Data pre-processing",
"label": "Take z from topography",
"tooltip": "Sets survey elevation to topography before any offsets are applied.",
"value": false,
"verbose": 3,
"visible": false
},
"potential_channel": {
"association": "Cell",
"dataType": "Float",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@
"meshType": "{275ecee9-9c24-4378-bf94-65f3c5fbe163}",
"value": ""
},
"z_from_topo": {
"group": "Survey",
"main": true,
"label": "Surface survey",
"tooltip": "Uncheck if borehole data is present",
"value": true
},
"line_object": {
"association": "Cell",
"dataType": "Referenced",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@
"meshType": "{275ecee9-9c24-4378-bf94-65f3c5fbe163}",
"value": ""
},
"z_from_topo": {
"group": "Data",
"main": true,
"label": "Surface survey",
"tooltip": "Uncheck if borehole data is present",
"value": true
},
"line_object": {
"association": "Cell",
"dataType": "Referenced",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@
"meshType": "{275ecee9-9c24-4378-bf94-65f3c5fbe163}",
"value": ""
},
"z_from_topo": {
"group": "Survey",
"main": true,
"label": "Surface survey",
"tooltip": "Uncheck if borehole data is present",
"value": true
},
"receivers_radar_drape": {
"association": [
"Cell",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@
"meshType": "{275ecee9-9c24-4378-bf94-65f3c5fbe163}",
"value": ""
},
"z_from_topo": {
"group": "Data",
"main": true,
"label": "Surface survey",
"tooltip": "Uncheck if borehole data is present",
"value": true
},
"receivers_radar_drape": {
"association": [
"Cell",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@
"value": "",
"tooltip": "Selects the data representing the different lines in the survey."
},
"z_from_topo": {
"group": "Data pre-processing",
"label": "Take z from topography",
"tooltip": "Sets survey elevation to topography before any offsets are applied.",
"value": false,
"verbose": 3,
"visible": false
},
"receivers_radar_drape": {
"association": [
"Cell",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@
"value": "",
"tooltip": "Selects the data representing the different lines in the survey."
},
"z_from_topo": {
"group": "Data pre-processing",
"label": "Take z from topography",
"tooltip": "Sets survey elevation to topography before any offsets are applied.",
"value": false,
"verbose": 3,
"visible": false
},
"receivers_radar_drape": {
"association": [
"Cell",
Expand Down
8 changes: 0 additions & 8 deletions simpeg_drivers-assets/uijson/magnetotellurics_forward.ui.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@
"meshType": "{b99bd6e5-4fe1-45a5-bd2f-75fc31f91b38}",
"value": ""
},
"z_from_topo": {
"group": "Data pre-processing",
"label": "Take z from topography",
"tooltip": "Sets survey elevation to topography before any offsets are applied.",
"value": false,
"verbose": 3,
"visible": false
},
"receivers_radar_drape": {
"association": [
"Cell",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@
"meshType": "{b99bd6e5-4fe1-45a5-bd2f-75fc31f91b38}",
"value": ""
},
"z_from_topo": {
"group": "Data pre-processing",
"label": "Take z from topography",
"tooltip": "Sets survey elevation to topography before any offsets are applied.",
"value": false,
"verbose": 3,
"visible": false
},
"receivers_radar_drape": {
"association": [
"Cell",
Expand Down
8 changes: 0 additions & 8 deletions simpeg_drivers-assets/uijson/tipper_forward.ui.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@
"meshType": "{0b639533-f35b-44d8-92a8-f70ecff3fd26}",
"value": ""
},
"z_from_topo": {
"group": "Data pre-processing",
"label": "Take z from topography",
"tooltip": "Sets survey elevation to topography before any offsets are applied.",
"value": false,
"verbose": 3,
"visible": false
},
"receivers_radar_drape": {
"association": [
"Cell",
Expand Down
8 changes: 0 additions & 8 deletions simpeg_drivers-assets/uijson/tipper_inversion.ui.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@
"meshType": "{0b639533-f35b-44d8-92a8-f70ecff3fd26}",
"value": ""
},
"z_from_topo": {
"group": "Data pre-processing",
"label": "Take z from topography",
"tooltip": "Sets survey elevation to topography before any offsets are applied.",
"value": false,
"verbose": 3,
"visible": false
},
"receivers_radar_drape": {
"association": [
"Cell",
Expand Down
7 changes: 0 additions & 7 deletions simpeg_drivers/components/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,6 @@ def save_data(self):

self.update_params(data_dict, uncert_dict)

def apply_transformations(self, locations: np.ndarray):
"""Apply all coordinate transformations to locations"""
if self.params.z_from_topo:
locations = super().set_z_from_topo(locations)

return locations

def normalize(
self, data: dict[str, np.ndarray], absolute=False
) -> dict[str, np.ndarray]:
Expand Down
10 changes: 0 additions & 10 deletions simpeg_drivers/components/factories/entity_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,8 @@ def _build(self, inversion_data: InversionData):
kwargs.update({"mask": inversion_data.mask})

entity = self.params.data_object.copy(copy_complement=False, **kwargs)
entity.vertices = inversion_data.apply_transformations(entity.vertices)

if getattr(self.params.data_object, "transmitters", None) is not None:
vertices = inversion_data.apply_transformations(
self.params.data_object.transmitters.vertices
)
cells = self.params.data_object.transmitters.cells

if getattr(self.params.data_object, "tx_id_property", None) is not None:
Expand All @@ -115,7 +111,6 @@ def _build(self, inversion_data: InversionData):

transmitters = self.params.data_object.transmitters.copy(
copy_complement=False,
vertices=vertices,
cells=cells,
parent=self.params.out_group,
copy_children=False,
Expand All @@ -136,11 +131,6 @@ def _build(self, inversion_data: InversionData):
if tx_freq:
tx_freq[0].copy(parent=entity.transmitters)

if getattr(entity, "current_electrodes", None) is not None:
entity.current_electrodes.vertices = inversion_data.apply_transformations(
entity.current_electrodes.vertices
)

return entity

@staticmethod
Expand Down
26 changes: 0 additions & 26 deletions simpeg_drivers/components/locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,32 +167,6 @@ def filter(self, obj: dict[str, np.ndarray] | np.ndarray, mask=None):
else:
return obj[mask]

def set_z_from_topo(self, locs: np.ndarray):
"""interpolate locations z data from topography."""

if locs is None:
return None

topo = self.get_locations(self.params.active_cells.topography_object)
if self.params.active_cells.topography is not None:
if isinstance(self.params.active_cells.topography, Entity):
z = self.params.active_cells.topography.values
else:
z = np.ones_like(topo[:, 2]) * self.params.active_cells.topography

topo[:, 2] = z

xyz = locs.copy()
topo_interpolator = LinearNDInterpolator(topo[:, :2], topo[:, 2])
z_topo = topo_interpolator(xyz[:, :2])
if np.any(np.isnan(z_topo)):
tree = cKDTree(topo[:, :2])
_, ind = tree.query(xyz[np.isnan(z_topo), :2])
z_topo[np.isnan(z_topo)] = topo[ind, 2]
xyz[:, 2] = z_topo

return xyz

@property
def params(self):
"""Associated parameters."""
Expand Down
8 changes: 0 additions & 8 deletions simpeg_drivers/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@
"value": None,
"tooltip": "Select an object containing survey geometry and data for inversion.",
},
"z_from_topo": {
"group": "Data pre-processing",
"label": "Take z from topography",
"tooltip": "Sets survey elevation to topography before any offsets are applied.",
"value": False,
"verbose": 3,
"visible": False,
},
"receivers_offset_z": {
"group": "Data pre-processing",
"label": "Z static offset",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"forward_only": False,
"data_object": None,
"line_object": None,
"z_from_topo": False,
"potential_channel": None,
"potential_uncertainty": 1.0,
"u_cell_size": 25.0,
Expand Down Expand Up @@ -108,7 +107,6 @@
"forward_only": True,
"data_object": None,
"line_object": None,
"z_from_topo": False,
"potential_channel_bool": True,
"u_cell_size": 25.0,
"v_cell_size": 25.0,
Expand Down Expand Up @@ -152,7 +150,6 @@
"max_global_iterations": 25,
"topography_object": UUID("{ab3c2083-6ea8-4d31-9230-7aad3ec09525}"),
"topography": UUID("{a603a762-f6cb-4b21-afda-3160e725bf7d}"),
"z_from_topo": True,
"receivers_offset_z": 0.0,
"cleanup": True,
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"inversion_type": "direct current 3d",
"forward_only": False,
"data_object": None,
"z_from_topo": True,
"potential_channel": None,
"potential_uncertainty": 1.0,
"mesh": None,
Expand Down Expand Up @@ -100,7 +99,6 @@
"inversion_type": "direct current 3d",
"forward_only": True,
"data_object": None,
"z_from_topo": True,
"potential_channel_bool": True,
"mesh": None,
"model_type": "Conductivity (S/m)",
Expand Down Expand Up @@ -142,6 +140,5 @@
"sens_wts_threshold": None,
"topography_object": UUID("{ab3c2083-6ea8-4d31-9230-7aad3ec09525}"),
"topography": UUID("{a603a762-f6cb-4b21-afda-3160e725bf7d}"),
"z_from_topo": True,
"receivers_offset_z": 0.0,
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"inversion_type": "direct current 2d",
"forward_only": False,
"data_object": None,
"z_from_topo": True,
"line_object": None,
"line_id": 1,
"receivers_radar_drape": None,
Expand Down Expand Up @@ -109,7 +108,6 @@
"inversion_type": "direct current 2d",
"forward_only": True,
"data_object": None,
"z_from_topo": True,
"line_object": None,
"line_id": 1,
"receivers_radar_drape": None,
Expand Down Expand Up @@ -158,6 +156,5 @@
"max_global_iterations": 25,
"topography_object": UUID("{ab3c2083-6ea8-4d31-9230-7aad3ec09525}"),
"topography": UUID("{a603a762-f6cb-4b21-afda-3160e725bf7d}"),
"z_from_topo": True,
"receivers_offset_z": 0.0,
}
Loading
Loading