diff --git a/SimPEG/Utils/Geophysics/__init__.py b/SimPEG/Utils/Geophysics/__init__.py deleted file mode 100644 index bcf01943..00000000 --- a/SimPEG/Utils/Geophysics/__init__.py +++ /dev/null @@ -1 +0,0 @@ -import emSources \ No newline at end of file diff --git a/SimPEG/Utils/Geophysics/emSources/__init__.py b/SimPEG/Utils/Geophysics/emSources/__init__.py deleted file mode 100644 index c05fda69..00000000 --- a/SimPEG/Utils/Geophysics/emSources/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from emSources import MagneticDipoleVectorPotential \ No newline at end of file diff --git a/SimPEG/Utils/Geophysics/emSources/emSources.py b/SimPEG/Utils/Geophysics/emSources/emSources.py deleted file mode 100644 index db492a94..00000000 --- a/SimPEG/Utils/Geophysics/emSources/emSources.py +++ /dev/null @@ -1,40 +0,0 @@ -import numpy as np -from scipy.constants import mu_0, pi - -def MagneticDipoleVectorPotential(txLoc, obsLoc, component, dipoleMoment=(0., 0., 1.)): - """ - Calculate the vector potential of a set of magnetic dipoles - at given locations 'ref. ' - - :param numpy.ndarray txLoc: Location of the transmitter(s) (x, y, z) - :param numpy.ndarray obsLoc: Where the potentials will be calculated (x, y, z) - :param str component: The component to calculate - 'x', 'y', or 'z' - :param numpy.ndarray dipoleMoment: The vector dipole moment - :rtype: numpy.ndarray - :return: The vector potential each dipole at each observation location - """ - - if component=='x': - dimInd = 0 - elif component=='y': - dimInd = 1 - elif component=='z': - dimInd = 2 - else: - raise ValueError('Invalid component') - - txLoc = np.atleast_2d(txLoc) - obsLoc = np.atleast_2d(obsLoc) - dipoleMoment = np.atleast_2d(dipoleMoment) - - nEdges = obsLoc.shape[0] - nTx = txLoc.shape[0] - - m = np.array(dipoleMoment).repeat(nEdges, axis=0) - A = np.empty((nEdges, nTx)) - for i in range(nTx): - dR = obsLoc - txLoc[i, np.newaxis].repeat(nEdges, axis=0) - mCr = np.cross(m, dR) - r = np.sqrt((dR**2).sum(axis=1)) - A[:, i] = -(mu_0/(4*pi)) * mCr[:,dimInd]/(r**3) - return A \ No newline at end of file diff --git a/SimPEG/Utils/__init__.py b/SimPEG/Utils/__init__.py index 1daa2e29..269cfdc5 100644 --- a/SimPEG/Utils/__init__.py +++ b/SimPEG/Utils/__init__.py @@ -5,7 +5,6 @@ from lomutils import volTetra, faceInfo, inv2X2BlockDiagonal, inv3X3BlockDiagona from interputils import interpmat from ipythonutils import easyAnimate as animate import Save -import Geophysics import ModelBuilder import types