Transfer functionsΒΆ

When doing field work, it can be useful to quickly estimate the transfer function from a single continuous recording. This example shows estimation of the transfer function using all default settings. The default transfer function is the impedance tensor and this will be calculated. Later, the data will be re-processed using an alternative configuration.

The dataset in this example has been provided for use by the SAMTEX consortium. For more information, please refer to [Jones2009]. Additional details about the dataset can be found at https://www.mtnet.info/data/kap03/kap03.html.

from pathlib import Path
import seedir as sd
import plotly
import resistics.letsgo as letsgo

Define the data path. This is dependent on where the data is stored.

time_data_path = Path("..", "..", "data", "time", "quick", "kap123")
sd.seedir(str(time_data_path), style="emoji")

Out:

πŸ“ kap123/
β”œβ”€πŸ“„ data.npy
β””β”€πŸ“„ metadata.json

Now calculate the transfer function, in this case the impedance tensor

soln = letsgo.quick_tf(time_data_path)
fig = soln.tf.plot(
    soln.freqs,
    soln.components,
    to_plot=["ExHy", "EyHx"],
    x_lim=[1, 5],
    res_lim=[0, 4],
    legend="128",
    symbol="circle",
)
fig.update_layout(height=900)
plotly.io.show(fig)

Out:

  0%|          | 0/20 [00:00<?, ?it/s]
 15%|#5        | 3/20 [00:00<00:00, 25.70it/s]
100%|##########| 20/20 [00:00<00:00, 95.40it/s]

  0%|          | 0/20 [00:00<?, ?it/s]
  5%|5         | 1/20 [00:01<00:22,  1.19s/it]
 10%|#         | 2/20 [00:02<00:21,  1.19s/it]
 15%|#5        | 3/20 [00:03<00:20,  1.20s/it]
 20%|##        | 4/20 [00:04<00:19,  1.20s/it]
 25%|##5       | 5/20 [00:05<00:17,  1.20s/it]
 30%|###       | 6/20 [00:06<00:12,  1.10it/s]
 35%|###5      | 7/20 [00:06<00:09,  1.40it/s]
 40%|####      | 8/20 [00:06<00:07,  1.70it/s]
 45%|####5     | 9/20 [00:07<00:05,  1.98it/s]
 50%|#####     | 10/20 [00:07<00:04,  2.24it/s]
 55%|#####5    | 11/20 [00:07<00:03,  2.85it/s]
 60%|######    | 12/20 [00:07<00:02,  3.53it/s]
 65%|######5   | 13/20 [00:08<00:01,  4.22it/s]
 70%|#######   | 14/20 [00:08<00:01,  4.89it/s]
 75%|#######5  | 15/20 [00:08<00:00,  5.49it/s]
 80%|########  | 16/20 [00:08<00:00,  6.27it/s]
 85%|########5 | 17/20 [00:08<00:00,  6.97it/s]
 90%|######### | 18/20 [00:08<00:00,  7.52it/s]
 95%|#########5| 19/20 [00:08<00:00,  7.99it/s]
100%|##########| 20/20 [00:08<00:00,  8.35it/s]
100%|##########| 20/20 [00:08<00:00,  2.27it/s]

Total running time of the script: ( 0 minutes 9.660 seconds)

Gallery generated by Sphinx-Gallery