def test_gpr(capsys): # empymod is not really designed for GPR, you would rather do that straight # in the time domain. However, it works. We just run a test here, to check # that it remains the status quo. res = DATAEMPYMOD['gprout'][()] gprout = gpr(**res['inp']) out, _ = capsys.readouterr() assert 'GPR' in out assert '> centre freq : 250000000' in out assert_allclose(gprout, res['GPR']) # Ensure multi-source/receiver is correct (reshaping after dipole-call) gprout2a = gpr(**res['inp2a']) gprout2b = gpr(**res['inp2b']) assert_allclose(gprout[:, :, 1], gprout2a) assert_allclose(gprout[:, 0, :], gprout2b)
'epermH': [1, 9, 15], 'epermV': [1, 9, 15], 'mpermH': None, 'mpermV': None, 'xdirect': True, 'ht': 'fht', 'htarg': ['key_201_2009', ''], 'opt': None, 'loop': None, 'verb': 3 } igpr2a = dc(igpr) igpr2a['src'] = [0, 1, 0.0000001] igpr2b = dc(igpr) igpr2b['rec'] = [2, 0, 0.5] ogpr = gpr(**igpr) # # F -- Store data # # np.savez_compressed('../data/empymod.npz', out1={ 'inp': inp1, 'EM': EM1 }, out2={ 'inp': inp2, 'EM': EM2 }, out3={ 'inp': inp3, 'EM': EM3 },