def get_analytic(self, sigma, eta, tau, c, src_z, time):
     from simpegEM1D import (EM1D, EM1DSurveyTD)
     mesh1D = Mesh.TensorMesh([1])
     TDsurvey = EM1DSurveyTD(rx_location=np.array([0., 0., src_z]),
                             src_location=np.array([0., 0., src_z]),
                             topo=np.r_[0., 0., 0.],
                             depth=np.r_[0.],
                             rx_type='dBzdt',
                             wave_type='stepoff',
                             src_type='CircularLoop',
                             a=13.,
                             I=1.,
                             time=time,
                             half_switch=True)
     # Convert to Pelton's model
     tau_p = tau / (1 - eta)**(1. / c)
     expmap = Maps.ExpMap(mesh1D)
     prob = EM1D(mesh1D,
                 sigma=np.r_[sigma],
                 eta=np.r_[eta],
                 tau=np.r_[tau_p],
                 c=np.r_[c])
     if prob.ispaired:
         prob.unpair()
     if TDsurvey.ispaired:
         TDsurvey.unpair()
     prob.pair(TDsurvey)
     prob.chi = np.zeros(TDsurvey.n_layer)
     dhzdt = TDsurvey.dpred([])
     return dhzdt
Example #2
0
    def setUp(self):

        nearthick = np.logspace(-1, 1, 5)
        deepthick = np.logspace(1, 2, 10)
        hx = np.r_[nearthick, deepthick]
        mesh1D = Mesh.TensorMesh([hx], [0.])
        depth = -mesh1D.gridN[:-1]
        LocSigZ = -mesh1D.gridCC

        # Triangular waveform
        time_input_currents = np.r_[0., 5.5*1e-4, 1.1*1e-3]
        input_currents = np.r_[0., 1., 0.]

        TDsurvey = EM1DSurveyTD(
            rx_location=np.array([0., 0., 100.+1e-5]),
            src_location=np.array([0., 0., 100.+1e-5]),
            topo=np.r_[0., 0., 100.],
            depth=depth,
            field_type='secondary',
            rx_type='Bz',
            wave_type='general',
            time_input_currents=time_input_currents,
            input_currents=input_currents,
            n_pulse=2,
            base_frequency=25.,
            time=np.logspace(-5, -2, 31),
            src_type='CircularLoop',
            I=1e0,
            a=2e1
        )

        sig_half = 1e-4
        chi_half = 0.

        expmap = Maps.ExpMap(mesh1D)
        m_1D = np.log(np.ones(TDsurvey.n_layer)*sig_half)
        chi = np.zeros(TDsurvey.n_layer)

        prob = EM1D(
            mesh1D, sigmaMap=expmap, chi=chi
        )
        prob.pair(TDsurvey)

        self.survey = TDsurvey
        self.prob = prob
        self.mesh1D = mesh1D
        self.showIt = False
        self.chi = chi
        self.m_1D = m_1D
        self.sig_half = sig_half
        self.expmap = expmap
    def setUp(self):

        nearthick = np.logspace(-1, 1, 5)
        deepthick = np.logspace(1, 2, 10)
        hx = np.r_[nearthick, deepthick]
        mesh1D = Mesh.TensorMesh([hx], [0.])
        depth = -mesh1D.gridN[:-1]
        LocSigZ = -mesh1D.gridCC

        TDsurvey = EM1DSurveyTD(
            rx_location=np.array([0., 0., 100.+1e-5]),
            src_location=np.array([0., 0., 100.+1e-5]),
            topo=np.r_[0., 0., 100.],
            depth=depth,
            field_type='secondary',
            rx_type='Bz',
            wave_type='stepoff',
            time=np.logspace(-5, -2, 64),
            src_type='CircularLoop',
            I=1e0,
            a=1e1
        )

        sig_half = 1e-2
        chi_half = 0.

        expmap = Maps.ExpMap(mesh1D)
        tau = 1e-3 * np.ones(TDsurvey.n_layer)
        eta = 2e-1 * np.ones(TDsurvey.n_layer)
        c = 1. * np.ones(TDsurvey.n_layer)
        m_1D = np.log(np.ones(TDsurvey.n_layer)*sig_half)
        chi = np.zeros(TDsurvey.n_layer)

        prob = EM1D(
            mesh1D, sigmaMap=expmap, chi=chi
        )
        prob.pair(TDsurvey)

        self.survey = TDsurvey
        self.prob = prob
        self.mesh1D = mesh1D
        self.showIt = False
        self.tau = tau
        self.eta = eta
        self.c = c
        self.chi = chi
        self.m_1D = m_1D
        self.sig_half = sig_half
        self.expmap = expmap
    def setUp(self):

        wave_HM = skytem_HM_2015()
        wave_LM = skytem_LM_2015()
        time_HM = wave_HM.time_gate_center[0::2]
        time_LM = wave_LM.time_gate_center[0::2]

        hz = get_vertical_discretization_time(np.unique(np.r_[time_HM,
                                                              time_LM]),
                                              facter_tmax=0.5,
                                              factor_tmin=10.)
        mesh1D = set_mesh_1d(hz)
        depth = -mesh1D.gridN[:-1]
        LocSigZ = -mesh1D.gridCC

        time_input_currents_HM = wave_HM.current_times[-7:]
        input_currents_HM = wave_HM.currents[-7:]
        time_input_currents_LM = wave_LM.current_times[-13:]
        input_currents_LM = wave_LM.currents[-13:]

        TDsurvey = EM1DSurveyTD(
            rx_location=np.array([0., 0., 100.]),
            src_location=np.array([0., 0., 100.]),
            topo=np.r_[0., 0., 100.],
            depth=depth,
            rx_type='dBzdt',
            wave_type='general',
            src_type='CircularLoop',
            a=13.,
            I=1.,
            time=time_HM,
            time_input_currents=time_input_currents_HM,
            input_currents=input_currents_HM,
            n_pulse=2,
            base_frequency=25.,
            use_lowpass_filter=False,
            high_cut_frequency=7e4,
            moment_type='dual',
            time_dual_moment=time_HM,
            time_input_currents_dual_moment=time_input_currents_LM,
            input_currents_dual_moment=input_currents_LM,
            base_frequency_dual_moment=210,
        )

        sig_half = 1e-2
        chi_half = 0.

        expmap = Maps.ExpMap(mesh1D)
        m_1D = np.log(np.ones(TDsurvey.n_layer) * sig_half)
        chi = np.zeros(TDsurvey.n_layer)

        prob = EM1D(mesh1D, sigmaMap=expmap, chi=chi)
        prob.pair(TDsurvey)

        self.survey = TDsurvey
        self.prob = prob
        self.mesh1D = mesh1D
        self.showIt = False
        self.chi = chi
        self.m_1D = m_1D
        self.sig_half = sig_half
        self.expmap = expmap
Example #5
0
rho_half=30.
tx_alt= 30.

time = np.logspace(-5, -2, 31)
hz = get_vertical_discretization_time(time, facter_tmax=0.3, factor_tmin=10., n_layer=19)
mesh1D = set_mesh_1d(hz)
depth = -mesh1D.gridN[:-1]
LocSigZ = -mesh1D.gridCC
TDsurvey = EM1DSurveyTD(
    rx_location = np.array([0., 0., 100.+tx_alt]),
    src_location = np.array([0., 0., 100.+tx_alt]),
    topo = np.r_[0., 0., 100.],
    depth = depth,
    rx_type = 'dBzdt',
    wave_type = 'stepoff',
    src_type = 'CircularLoop',
    a = 13.,
    I = 1.,
    time = time,
    base_frequency = 25.,
    use_lowpass_filter=False,
    high_cut_frequency=210*1e3        
)
sig_half = 1./20.
sig_blk = sig_half * 20.
chi_half = 0.
expmap = Maps.ExpMap(mesh1D)


# decorater used to block function printing to the console
def blockPrinting(func):
Example #6
0
    def _simPEGForward(self, mod):

        from SimPEG import Maps
        from simpegEM1D import (EM1DSurveyTD, EM1D, set_mesh_1d)

        mesh1D = set_mesh_1d(mod.depth)
        expmap = Maps.ExpMap(mesh1D)
        prob = EM1D(mesh1D, sigmaMap=expmap, chi=mod.chim)

        if (self.dualMoment()):

            print(self.sys[0].loopRadius(), self.sys[0].peakCurrent())

            simPEG_survey = EM1DSurveyTD(
                rx_location=np.array([0., 0., 0.]),
                src_location=np.array([0., 0., 0.]),
                topo=np.r_[0., 0., 0.],
                depth=-mod.depth,
                rx_type='dBzdt',
                wave_type='general',
                src_type='CircularLoop',
                a=self.sys[0].loopRadius(),
                I=self.sys[0].peakCurrent(),
                time=self.sys[0].windows.centre,
                time_input_currents=self.sys[0].waveform.transmitterTime,
                input_currents=self.sys[0].waveform.transmitterCurrent,
                n_pulse=2,
                base_frequency=self.sys[0].baseFrequency(),
                use_lowpass_filter=True,
                high_cut_frequency=450000,
                moment_type='dual',
                time_dual_moment=self.sys[1].windows.centre,
                time_input_currents_dual_moment=self.sys[1].waveform.
                transmitterTime,
                input_currents_dual_moment=self.sys[1].waveform.
                transmitterCurrent,
                base_frequency_dual_moment=self.sys[1].baseFrequency(),
            )
        else:

            simPEG_survey = EM1DSurveyTD(
                rx_location=np.array([0., 0., 0.]),
                src_location=np.array([0., 0., 0.]),
                topo=np.r_[0., 0., 0.],
                depth=-mod.depth,
                rx_type='dBzdt',
                wave_type='general',
                src_type='CircularLoop',
                a=self.sys[0].loopRadius(),
                I=self.sys[0].peakCurrent(),
                time=self.sys[0].windows.centre,
                time_input_currents=self.sys[0].waveform.transmitterTime,
                input_currents=self.sys[0].waveform.transmitterCurrent,
                n_pulse=1,
                base_frequency=self.sys[0].baseFrequency(),
                use_lowpass_filter=True,
                high_cut_frequency=7e4,
                moment_type='single',
            )

        prob.pair(simPEG_survey)

        self.p[:] = -simPEG_survey.dpred(mod.par)
Example #7
0
mesh1D = set_mesh_1d(hz)
depth = -mesh1D.gridN[:-1]
LocSigZ = -mesh1D.gridCC

# time_input_currents = np.r_[0., 5.5*1e-4, 5.5*1e-4+1e-5]
# input_currents = np.r_[0., 1., 0.]
time_input_currents = wave.current_times[-7:]
input_currents = wave.currents[-7:]

TDsurvey = EM1DSurveyTD(rx_location=np.array([0., 0., 100. + 30.]),
                        src_location=np.array([0., 0., 100. + 30.]),
                        topo=np.r_[0., 0., 100.],
                        depth=depth,
                        rx_type='dBzdt',
                        wave_type='general',
                        src_type='CircularLoop',
                        a=13.,
                        time=time,
                        time_input_currents=time_input_currents,
                        input_currents=input_currents,
                        n_pulse=2,
                        base_frequency=25.)

# TDsurvey = EM1DSurveyTD(
#     rx_location = np.array([0., 0., 100.+30.]),
#     src_location = np.array([0., 0., 100.+30.]),
#     topo = np.r_[0., 0., 100.],
#     depth = depth,
#     rx_type = 'dBzdt',
#     wave_type = 'stepoff',
#     src_type = 'CircularLoop',