From 3b427d8a85fd677e35b5574a540bce35f7a2d9ad Mon Sep 17 00:00:00 2001 From: Lindsey Heagy Date: Sun, 10 May 2015 16:54:55 -0700 Subject: [PATCH] remove SrcType, put rx list first in inputs for src --- simpegDC/BaseDC.py | 5 +++-- simpegDC/Examples/Verification.py | 2 +- simpegDC/Examples/WennerArray.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/simpegDC/BaseDC.py b/simpegDC/BaseDC.py index c873a1a4..650f8112 100644 --- a/simpegDC/BaseDC.py +++ b/simpegDC/BaseDC.py @@ -6,8 +6,9 @@ class DipoleSrc(Survey.BaseSrc): current = 1 - def __init__(self, locA, locB, rxList, **kwargs): - super(DipoleSrc, self).__init__((locA, locB), 'dipole', rxList, **kwargs) + def __init__(self, rxList, locA, locB, **kwargs): + super(DipoleSrc, self).__init__(rxList, **kwargs) + self.loc = (locA, locB) self._rhsDict = {} def getRhs(self, mesh): diff --git a/simpegDC/Examples/Verification.py b/simpegDC/Examples/Verification.py index 00e3bd62..7296d00a 100644 --- a/simpegDC/Examples/Verification.py +++ b/simpegDC/Examples/Verification.py @@ -23,7 +23,7 @@ def run(plotIt=False): # ax.plot(xyz_rxN[:,0],xyz_rxN[:,1], 'r.', ms = 3) rx = DC.DipoleRx(xyz_rxP, xyz_rxN) - src = DC.DipoleSrc([-200, 0, -12.5],[+200, 0, -12.5], [rx]) + src = DC.DipoleSrc([rx], [-200, 0, -12.5],[+200, 0, -12.5]) survey = DC.SurveyDC([src]) problem = DC.ProblemDC(mesh) problem.pair(survey) diff --git a/simpegDC/Examples/WennerArray.py b/simpegDC/Examples/WennerArray.py index 4e0edb24..4777e0bd 100644 --- a/simpegDC/Examples/WennerArray.py +++ b/simpegDC/Examples/WennerArray.py @@ -33,7 +33,7 @@ def getSrcList(nElecs, aSpacing, in2D=False, plotIt=False): srcList = [] for i in range(WENNER.shape[0]): rx = DC.DipoleRx(getLoc(i,1),getLoc(i,2)) - src = DC.DipoleSrc(getLoc(i,0),getLoc(i,3), [rx]) + src = DC.DipoleSrc([rx],getLoc(i,0),getLoc(i,3)) srcList += [src] return srcList