From 0d899c9e99fa22b6b7180cf8970836ac3199d9e7 Mon Sep 17 00:00:00 2001 From: Santiago Soler Date: Thu, 7 Sep 2023 14:42:53 -0700 Subject: [PATCH] Replace deprecated SourceField for UniformBackgroundField In the magnetic simulator, replace the SourceField class that has been marked for deprecation in SimPEG, in favour of the UniformBackgroundField class. --- geoscilabs/mag/Simulator.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/geoscilabs/mag/Simulator.py b/geoscilabs/mag/Simulator.py index f120d4e..c873ff0 100644 --- a/geoscilabs/mag/Simulator.py +++ b/geoscilabs/mag/Simulator.py @@ -732,8 +732,11 @@ def profiledata(Binc, Bdec, Bigrf, depth, susc, comp, irt, Q, rinc, rdec, update xyzLoc[:, 2] += depth rxLoc = mag.receivers.Point(xyzLoc) - srcField = mag.sources.SourceField( - receiver_list=[rxLoc], parameters=(Bigrf, -Binc, Bdec) + srcField = mag.sources.UniformBackgroundField( + receiver_list=[rxLoc], + amplitude=Bigrf, + inclination=-Binc, + declination=Bdec, ) survey2D = mag.Survey(srcField) sim.survey = survey2D