BaseMap

class emg3d.maps.BaseMap(description)[source]

Bases: object

Maps variable x to computational variable σ (conductivity).

Subclass this BaseMap to create new maps. A map class must start with Map followed by a name, e.g., MapProperty.

To be able to load custom maps using emg3d.io.load define the map before you load the files, and register the map by putting the decorator emg3d.maps.register_map. This will enable the I/O to properly instantiate your custom maps.

@emg3d.maps.register_map
class MapProperty(emg3d.maps.BaseMap):
    '''Description'''
    def __init__(self):
        super().__init__('property')

    def forward(self, conductivity):
        return # Mapping from your property to conductivity.

    def backward(self, mapped):
        return # Mapping from conductivity to your property.

    def derivative_chain(self, gradient, mapped):
        gradient *= # Chain rule of your backward mapping.

Methods Summary

backward(mapped)

Mapping to conductivity.

derivative_chain(gradient, mapped)

Chain rule to map gradient from conductivity to mapping space.

forward(conductivity)

Conductivity to mapping.

Methods Documentation

backward(mapped)[source]

Mapping to conductivity.

derivative_chain(gradient, mapped)[source]

Chain rule to map gradient from conductivity to mapping space.

forward(conductivity)[source]

Conductivity to mapping.