Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion simpeg_drivers-assets/uijson/tdem1d_forward.ui.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"z_channel_bool": {
"group": "Survey",
"main": true,
"label": "Z component",
"label": "Vertical",
"tooltip": "Vertical (w) component of the magnetic data",
"value": true
},
"u_cell_size": {
Expand Down
3 changes: 2 additions & 1 deletion simpeg_drivers-assets/uijson/tdem1d_inversion.ui.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"group": "Data",
"dataGroupType": "Multi-element",
"main": true,
"label": "z-component",
"label": "Vertical",
"tooltip": "Vertical (w) component of the magnetic data",
"parent": "data_object",
"optional": true,
"enabled": true,
Expand Down
15 changes: 9 additions & 6 deletions simpeg_drivers-assets/uijson/tdem_forward.ui.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,25 @@
],
"value": "dB/dt (T/s)"
},
"z_channel_bool": {
"vertical_channel_bool": {
"group": "Survey",
"main": true,
"label": "Z component",
"label": "Vertical",
"tooltip": "Vertical (w) component of the magnetic data.\nPositive up along the z-axis if no receiver orientation provided",
"value": true
},
"x_channel_bool": {
"inline_channel_bool": {
"group": "Survey",
"main": true,
"label": "X component",
"label": "In-line",
"tooltip": "In-line (u) component of the magnetic data.\nPositive towards North if no receiver orientation provided",
"value": true
},
"y_channel_bool": {
"crossline_channel_bool": {
"group": "Survey",
"main": true,
"label": "Y component",
"label": "Cross-line",
"tooltip": "Cross-line (v) component of the magnetic data.\nPositive towards East if no receiver orientation provided",
"value": true
},
"mesh": {
Expand Down
27 changes: 15 additions & 12 deletions simpeg_drivers-assets/uijson/tdem_inversion.ui.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
],
"value": "dB/dt (T/s)"
},
"z_channel": {
"vertical_channel": {
"association": [
"Cell",
"Vertex"
Expand All @@ -67,13 +67,14 @@
"group": "Data",
"dataGroupType": "Multi-element",
"main": true,
"label": "z-component",
"label": "Vertical",
"parent": "data_object",
"tooltip": "Vertical (w) component of the magnetic data.\nPositive up along the z-axis if no receiver orientation provided",
"optional": true,
"enabled": true,
"value": ""
},
"z_uncertainty": {
"vertical_uncertainty": {
"association": [
"Cell",
"Vertex"
Expand All @@ -84,11 +85,11 @@
"main": true,
"label": "Uncertainty",
"parent": "data_object",
"dependency": "z_channel",
"dependency": "vertical_channel",
"dependencyType": "enabled",
"value": ""
},
"x_channel": {
"inline_channel": {
"association": [
"Cell",
"Vertex"
Expand All @@ -97,13 +98,14 @@
"group": "Data",
"dataGroupType": "Multi-element",
"main": true,
"label": "x-component",
"label": "In-line",
"parent": "data_object",
"tooltip": "In-line (u) component of the magnetic data.\nPositive towards North if no receiver orientation provided",
"optional": true,
"enabled": false,
"value": ""
},
"x_uncertainty": {
"inline_uncertainty": {
"association": [
"Cell",
"Vertex"
Expand All @@ -114,11 +116,11 @@
"main": true,
"label": "Uncertainty",
"parent": "data_object",
"dependency": "x_channel",
"dependency": "inline_channel",
"dependencyType": "enabled",
"value": ""
},
"y_channel": {
"crossline_channel": {
"association": [
"Cell",
"Vertex"
Expand All @@ -127,13 +129,14 @@
"group": "Data",
"dataGroupType": "Multi-element",
"main": true,
"label": "y-component",
"label": "Cross-line",
"tooltip": "Cross-line (v) component of the magnetic data.\nPositive towards East if no receiver orientation provided",
"parent": "data_object",
"optional": true,
"enabled": false,
"value": ""
},
"y_uncertainty": {
"crossline_uncertainty": {
"association": [
"Cell",
"Vertex"
Expand All @@ -144,7 +147,7 @@
"main": true,
"label": "Uncertainty",
"parent": "data_object",
"dependency": "y_channel",
"dependency": "crossline_channel",
"dependencyType": "enabled",
"value": ""
},
Expand Down
4 changes: 1 addition & 3 deletions simpeg_drivers/components/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,7 @@ def get_normalizations(self):
"tdem" in self.params.inversion_type
and "dB/dt" in self.params.data_units
):
if comp in ["x", "y", "z"]:
normalizations[chan][comp] = -1
normalizations[chan][comp] *= np.ones(self.mask.sum())
normalizations[chan][comp] = np.full(self.mask.sum(), -1)

return normalizations

Expand Down
13 changes: 11 additions & 2 deletions simpeg_drivers/components/factories/receiver_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
from simpeg_drivers.utils.regularization import direction_and_dip, get_cell_normals


ORIENTATION_MAP = {
"vertical": "z",
"inline": "y",
"crossline": "x",
}


class ReceiversFactory(SimPEGFactory):
"""Build SimPEG receivers objects based on factory type."""

Expand Down Expand Up @@ -150,14 +157,16 @@ def assemble_keyword_arguments(

if self.factory_type in ["fdem", "fdem 1d", "magnetotellurics", "tipper"]:
comp = component.split("_")[0]
kwargs["orientation"] = comp[0] if "fdem" in self.factory_type else comp[1:]
kwargs["orientation"] = (
ORIENTATION_MAP[comp] if "fdem" in self.factory_type else comp[1:]
)
kwargs["component"] = component.split("_")[1]

if self.factory_type in ["tipper"]:
kwargs["orientation"] = kwargs["orientation"][::-1]

if "tdem" in self.factory_type:
kwargs["orientation"] = component
kwargs["orientation"] = ORIENTATION_MAP[component]

if self.factory_type == "fdem 1d":
kwargs["data_type"] = "ppm"
Expand Down
142 changes: 105 additions & 37 deletions simpeg_drivers/electromagnetics/frequency_domain/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
LargeLoopGroundFEMReceivers,
MovingLoopGroundFEMReceivers,
)
from pydantic import field_validator
from pydantic import AliasChoices, Field, field_validator

from simpeg_drivers import assets_path
from simpeg_drivers.options import (
Expand Down Expand Up @@ -86,12 +86,12 @@ class FDEMForwardOptions(BaseForwardOptions, BaseFDEMOptions):
Frequency Domain Electromagnetic Forward options.

:param receivers_orientation: Orientation of the receivers provided as a group.
:param z_real_channel_bool: Vertical (real) component of impedance channel boolean.
:param z_imag_channel_bool: Vertical (imaginary) component of impedance channel boolean.
:param y_real_channel_bool: In-line (real) component of impedance channel boolean.
:param y_imag_channel_bool: In-line (imaginary) component of impedance channel boolean.
:param x_real_channel_bool: Cross-line (real) component of impedance channel boolean.
:param x_imag_channel_bool: Cross-line (imaginary) component of impedance channel
:param vertical_real_channel_bool: Vertical (real) component of impedance channel boolean.
:param vertical_imag_channel_bool: Vertical (imaginary) component of impedance channel boolean.
:param inline_real_channel_bool: In-line (real) component of impedance channel boolean.
:param inline_imag_channel_bool: In-line (imaginary) component of impedance channel boolean.
:param crossline_real_channel_bool: Cross-line (real) component of impedance channel boolean.
:param crossline_imag_channel_bool: Cross-line (imaginary) component of impedance channel
:param models: ConductivityModelOptions parameter.
"""

Expand All @@ -108,31 +108,61 @@ class FDEMForwardOptions(BaseForwardOptions, BaseFDEMOptions):
| AirborneFEMReceivers
)
receivers_orientation: PropertyGroup | None = None
z_real_channel_bool: bool = False
z_imag_channel_bool: bool = False
y_real_channel_bool: bool = False
y_imag_channel_bool: bool = False
x_real_channel_bool: bool = False
x_imag_channel_bool: bool = False
vertical_real_channel_bool: bool = Field(
False,
validation_alias=AliasChoices(
"z_real_channel_bool", "vertical_real_channel_bool"
),
)
vertical_imag_channel_bool: bool = Field(
False,
validation_alias=AliasChoices(
"z_imag_channel_bool", "vertical_imag_channel_bool"
),
)
inline_real_channel_bool: bool = Field(
False,
validation_alias=AliasChoices(
"y_real_channel_bool", "inline_real_channel_bool"
),
)
inline_imag_channel_bool: bool = Field(
False,
validation_alias=AliasChoices(
"y_imag_channel_bool", "inline_imag_channel_bool"
),
)
crossline_real_channel_bool: bool = Field(
False,
validation_alias=AliasChoices(
"x_real_channel_bool", "crossline_real_channel_bool"
),
)
crossline_imag_channel_bool: bool = Field(
False,
validation_alias=AliasChoices(
"x_imag_channel_bool", "crossline_imag_channel_bool"
),
)
models: ConductivityModelOptions


class FDEMInversionOptions(BaseFDEMOptions, BaseInversionOptions):
"""
Frequency Domain Electromagnetic Inversion options.

:param z_real_channel: Vertical (real) impedance channel.
:param z_real_uncertainty: Vertical (real) impedance uncertainty channel.
:param z_imag_channel: Vertical (imaginary) impedance channel.
:param z_imag_uncertainty: Vertical (imaginary) impedance uncertainty channel.
:param y_real_channel: In-line (real) impedance channel.
:param y_real_uncertainty: In-line (real) impedance uncertainty channel.
:param y_imag_channel: In-line (imaginary) impedance channel.
:param y_imag_uncertainty: In-line (imaginary) impedance uncertainty channel
:param x_real_channel: Cross-line (real) impedance channel.
:param x_real_uncertainty: Cross-line (real) impedance uncertainty channel.
:param x_imag_channel: Cross-line (imaginary) impedance channel.
:param x_imag_uncertainty: Cross-line (imaginary) impedance uncertainty channel
:param vertical_real_channel: Vertical (real) impedance channel.
:param vertical_real_uncertainty: Vertical (real) impedance uncertainty channel.
:param vertical_imag_channel: Vertical (imaginary) impedance channel.
:param vertical_imag_uncertainty: Vertical (imaginary) impedance uncertainty channel.
:param inline_real_channel: In-line (real) impedance channel.
:param inline_real_uncertainty: In-line (real) impedance uncertainty channel.
:param inline_imag_channel: In-line (imaginary) impedance channel.
:param inline_imag_uncertainty: In-line (imaginary) impedance uncertainty channel
:param crossline_real_channel: Cross-line (real) impedance channel.
:param crossline_real_uncertainty: Cross-line (real) impedance uncertainty channel.
:param crossline_imag_channel: Cross-line (imaginary) impedance channel.
:param crossline_imag_uncertainty: Cross-line (imaginary) impedance uncertainty channel
:param models: ConductivityModelOptions parameter.
"""

Expand All @@ -149,18 +179,56 @@ class FDEMInversionOptions(BaseFDEMOptions, BaseInversionOptions):
| AirborneFEMReceivers
)
receivers_orientation: PropertyGroup | None = None
z_real_channel: PropertyGroup | None = None
z_real_uncertainty: PropertyGroup | None = None
z_imag_channel: PropertyGroup | None = None
z_imag_uncertainty: PropertyGroup | None = None
y_real_channel: PropertyGroup | None = None
y_real_uncertainty: PropertyGroup | None = None
y_imag_channel: PropertyGroup | None = None
y_imag_uncertainty: PropertyGroup | None = None
x_real_channel: PropertyGroup | None = None
x_real_uncertainty: PropertyGroup | None = None
x_imag_channel: PropertyGroup | None = None
x_imag_uncertainty: PropertyGroup | None = None
vertical_real_channel: PropertyGroup | None = Field(
None, validation_alias=AliasChoices("z_real_channel", "vertical_real_channel")
)
vertical_real_uncertainty: PropertyGroup | None = Field(
None,
validation_alias=AliasChoices(
"z_real_uncertainty", "vertical_real_uncertainty"
),
)
vertical_imag_channel: PropertyGroup | None = Field(
None, validation_alias=AliasChoices("z_imag_channel", "vertical_imag_channel")
)
vertical_imag_uncertainty: PropertyGroup | None = Field(
None,
validation_alias=AliasChoices(
"z_imag_uncertainty", "vertical_imag_uncertainty"
),
)
inline_real_channel: PropertyGroup | None = Field(
None, validation_alias=AliasChoices("y_real_channel", "inline_real_channel")
)
inline_real_uncertainty: PropertyGroup | None = Field(
None,
validation_alias=AliasChoices("y_real_uncertainty", "inline_real_uncertainty"),
)
inline_imag_channel: PropertyGroup | None = Field(
None, validation_alias=AliasChoices("y_imag_channel", "inline_imag_channel")
)
inline_imag_uncertainty: PropertyGroup | None = Field(
None,
validation_alias=AliasChoices("y_imag_uncertainty", "inline_imag_uncertainty"),
)
crossline_real_channel: PropertyGroup | None = Field(
None, validation_alias=AliasChoices("x_real_channel", "crossline_real_channel")
)
crossline_real_uncertainty: PropertyGroup | None = Field(
None,
validation_alias=AliasChoices(
"x_real_uncertainty", "crossline_real_uncertainty"
),
)
crossline_imag_channel: PropertyGroup | None = Field(
None, validation_alias=AliasChoices("x_imag_channel", "crossline_imag_channel")
)
crossline_imag_uncertainty: PropertyGroup | None = Field(
None,
validation_alias=AliasChoices(
"x_imag_uncertainty", "crossline_imag_uncertainty"
),
)

models: ConductivityModelOptions

Expand Down
Loading
Loading