minor fixes.

This commit is contained in:
seogi_macbook
2016-04-27 15:25:40 -07:00
parent 6a064c5f96
commit 92e2fd67de
3 changed files with 12 additions and 5 deletions
+9 -3
View File
@@ -1,5 +1,6 @@
import numpy as np
from scipy.constants import mu_0, pi
from scipy import special
def DCAnalyticHalf(txloc, rxlocs, sigma, flag="wholespace"):
"""
@@ -36,7 +37,7 @@ deg2rad = lambda deg: deg/180.*np.pi
rad2deg = lambda rad: rad*180./np.pi
def DCAnalyticSphere(txloc, rxloc, xc, radius, sigma, sigma1, \
flag = "sec", order=12):
flag = "sec", order=12, halfspace=False):
# def DCSpherePointCurrent(txloc, rxloc, xc, radius, rho, rho1, \
# flag = "sec", order=12):
"""
@@ -99,10 +100,15 @@ def DCAnalyticSphere(txloc, rxloc, xc, radius, sigma, sigma1, \
out[~sphind] += prim[~sphind]
if halfspace:
scale = 2
else:
scale = 1
if flag == "sec":
return out-prim
return scale*(out-prim)
elif flag == "total":
return out
return scale*out
def AnBnfun(n, radius, x0, rho, rho1, I=1.):
const = I*rho/(4*np.pi)
+2 -2
View File
@@ -5,7 +5,7 @@ import numpy as np
class BaseSrc(SimPEG.Survey.BaseSrc):
current = 1
current = 1.0
loc = None
def __init__(self, rxList, **kwargs):
@@ -33,7 +33,7 @@ class Dipole(BaseSrc):
elif prob._formulation == 'EB':
qa = prob.mesh.getInterpolationMat(self.loc[0], locType='N').todense()
qb = -prob.mesh.getInterpolationMat(self.loc[1], locType='N').todense()
q = mkvc(qa+qb)
q = self.current * mkvc(qa+qb)
return q
# def bc_contribution
+1
View File
@@ -3,4 +3,5 @@ from SurveyDC import Survey
import SrcDC as Src #Pole
import RxDC as Rx
from FieldsDC import Fields_CC
from BoundaryUtils import getxBCyBC_CC
import Utils