Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,37 +39,37 @@ jobs:
- python-version: "3.11"
name: minimal
os: ubuntu
conda: "numba 'scipy=1.10' scooby libdlf"
conda: "numba 'numpy==2.0.0' scipy scooby libdlf"
test: ""
- python-version: "3.12"
name: plain
os: ubuntu
conda: "numba 'scipy>=1.10' scooby libdlf"
conda: "numba 'numpy>=2.0.0' scipy scooby libdlf"
test: ""
- python-version: "3.12"
name: full
os: ubuntu
conda: "numba 'scipy>=1.10' scooby libdlf matplotlib pytest-mpl"
conda: "numba 'numpy>=2.0.0' scipy scooby libdlf matplotlib pytest-mpl"
test: "--mpl"
- python-version: "3.13"
name: plain
os: ubuntu
conda: "numba 'scipy>=1.10' scooby libdlf"
conda: "numba 'numpy>=2.0.0' scipy scooby libdlf"
test: ""
- python-version: "3.13"
name: full
os: ubuntu
conda: "numba 'scipy>=1.10' scooby libdlf matplotlib pytest-mpl"
conda: "numba 'numpy>=2.0.0' scipy scooby libdlf matplotlib pytest-mpl"
test: "--mpl"
- python-version: "3.14"
name: plain
os: ubuntu
conda: "numba 'scipy>=1.10' scooby libdlf"
conda: "numba 'numpy>=2.0.0' scipy scooby libdlf"
test: ""
- python-version: "3.14"
name: full
os: ubuntu
conda: "numba 'scipy>=1.10' scooby libdlf matplotlib pytest-mpl"
conda: "numba 'numpy>=2.0.0' scipy scooby libdlf matplotlib pytest-mpl"
test: "--mpl"

env:
Expand Down
54 changes: 45 additions & 9 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,59 @@ Version 2
~~~~~~~~~


v2.5.x
v2.6.x
""""""


*latest*
--------
v2.6.0: Arbitrary waveforms
---------------------------

**2026-01-31**

This version finally introduces the possibility for arbitrary waveforms.

- Modelling routines:

- ``bipole`` and ``dipole``:

- Arbitrary waveforms: Time-domain modelling can new be done for any
arbitrary piecewise linear waveform, in addition to impulse
(``signal=0``), step-on (``signal=1``), and step-off (``signal=-1``)
responses.
- User-defined bandpass filters can now be applied to the frequency domain
result through user-provided functions.

- Merged ``loop`` into ``bipole``; there is no need for a special routine.
Simply use ``bipole`` with ``msrc='b'`` and ``mrec=True`` for the same
effect. As a result, ``empymod.utils.check_bipole`` changed its signature.
For ``bipole``, it new prints the source and receiver type (electric field,
magnetic field, magnetic flux, or electric current). Both,
``empymod.model.loop`` and ``empymod.utils.check_bipole``'s old signature
are deprecated and will be removed in v3.
effect.

- New prints (if verbose):

- The source/receiver types are new printed.
- The signal/waveform is new printed.

- New function ``empymod.utils.check_waveform``, to check the waveform.

- New deprecations (will be removed in v3):

- ``empymod.model.loop`` will be removed in v3.
- ``empymod.utils.check_bipole``: New signature, it now returns also the
src/rec field and
type; old signature will be removed in v3.
- ``empymod.utils.check_time``: New signature, it now also returns the
signal; old signature will be removed in v3.
- ``empymod.utils.check_time_only``: New signature, it now also returns the
signal; old signature will be removed in v3.

- Bumped the minimum requirements to:

- Python 3.11
- NumPy 2.0
- SciPy, Numba, libdlf, scooby (without minimum version)


v2.5.x
""""""


v2.5.4: Bugfix ext. fcts with z+ up
Expand Down Expand Up @@ -143,7 +179,7 @@ The code is now compatible with NumPy v2.

- Gallery Update Part I:

- Update for Jupyterlab (ipympl/widget)
- Update for Jupyterlab (ipympl/widget)
- Replaced implicit by explicit pyplots
- Use by default a positiv z-upwards coordinate system
- Part I: frequency domain; reproducing; published
Expand Down
4 changes: 2 additions & 2 deletions CREDITS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ namely:
Aleksander Mousatov.
- 2018-2021: `Delft University of Technology <https://www.tudelft.nl>`_;
through the *Gitaro.JIM* project (till 05/2021, emg3d v1.0.0), funded by
`MarTERA <https://www.martera.eu>`_ as part of Horizon 2020, a funding scheme
of the European Research Area.
MarTERA as part of Horizon 2020, a funding scheme of the European Research
Area.
- 2021-2022: `TERRASYS Geophysics GmbH & Co. KG
<https://www.terrasysgeo.com>`_.
- 2021-2024: `Delft University of Technology <https://www.tudelft.nl>`_ through
Expand Down
65 changes: 59 additions & 6 deletions docs/manual/info.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ the example
:ref:`sphx_glr_gallery_educational_dlf_standard_lagged_splined.py`.


Looping
-------
Looping to reduce memory
------------------------

By default, you can compute many offsets and many frequencies all in one go,
vectorized (for the *DLF*), which is the default. The ``loop`` parameter gives
Expand Down Expand Up @@ -218,6 +218,24 @@ A common alternative to this trick is to apply a lowpass filter to filter out
the unstable high frequencies.


Loops (FEM/TEM)
---------------

The kernel of ``empymod`` computes the electric and magnetic Green's functions
for infinitesimal small dipoles. Combining various of these small dipoles
allows to model any kind of source and receiver configurations, including
loops. To make the correct assembly of dipoles is not always trivial, and the
easiest way is probably to look for a similar example and modify it. Here a
list of loop examples in the gallery:

- :ref:`sphx_glr_gallery_fdomain_ipandq.py` (GEM-2 & DUALEM-842);
- :ref:`sphx_glr_gallery_tdomain_ip_vrm.py`;
- :ref:`sphx_glr_gallery_tdomain_tem_temfast.py` (TEM-FAST);
- :ref:`sphx_glr_gallery_tdomain_tem_walktem.py` (Walk-TEM);
- :ref:`sphx_glr_gallery_educational_dipoles_and_loops.py`;
- :ref:`sphx_glr_gallery_reproducing_ward1988.py`.


Hook for user-defined computation of :math:`\eta` and :math:`\zeta`
-------------------------------------------------------------------

Expand Down Expand Up @@ -266,10 +284,45 @@ characteristics:
And then you call ``empymod`` with ``res={'res': res-array, 'tau': tau,
'func_eta': my_new_eta}``.

Have a look at the corresponding example in the Gallery, where this hook is
exploited in the low-frequency range to use the Cole-Cole model for IP
computation. It could also be used in the high-frequency range to model
dielectricity.
Have a look at, e.g., the :ref:`sphx_glr_gallery_tdomain_cole_cole_ip.py`
example in the Gallery, where this hook is exploited in the low-frequency range
to use the Cole-Cole model for IP computation. It could also be used in the
high-frequency range to model dielectricity.


Hook for user-defined bandpass filter
-------------------------------------

Similar to the hooks described above, there is since ``empymod v2.6.0`` a hook
to apply a bandpass filter (or any function) to the frequency domain result, by
proving a specific dictionary as ``bandpass`` argument. The signature of the
function must be ``func(inp, p_dict)``, where ``inp`` is the dictionary you
provide, and ``p_dict`` is a dictionary that contains all parameters so far
computed in empymod ``[locals()]``. Any change to the frequency domain result
must be done in-place, and the function does not return anything. Refer to the
time-domain loop examples in the gallery. The dictionary must contain at least
the keyword ``'func'``, containing the actual function, but can contain any
other parameters too.

**Dummy example**

.. code-block:: python

def my_bandpass(inp, p_dict):
# Your computations, using the parameters you provided
# in `inp` and the parameters from empymod in `p_dict`.
# In the example line below, we provide, e.g., inp["cutoff"]
# Modification must happen in-place to "EM", nothing is returned.

# Here just a simple cutoff to show the principle.
p_dict["EM"][p_inp["freq"] > inp["cutoff"] *= 0

And then you call ``empymod`` with ``bandpass={"cutoff": 1e6, "func":
my_bandpass}``.

Have a look at, e.g., the :ref:`sphx_glr_gallery_tdomain_tem_walktem.py`
example in the Gallery, where this hook is applied.



Zero horizontal offset
Expand Down
4 changes: 2 additions & 2 deletions docs/manual/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ or via ``pip``:

pip install empymod

Requirements are the modules ``numpy``, ``scipy``, ``numba``, ``libdlf``, and
``scooby``.
Requirements are the modules ``numpy>=2.0.0``, ``scipy``, ``numba``,
``libdlf``, and ``scooby``.

The modeller empymod comes with add-ons (``empymod.scripts``). These add-ons
provide some very specific, additional functionalities. Some of these add-ons
Expand Down
6 changes: 2 additions & 4 deletions docs/manual/references.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ References
.. [Ghos70] Ghosh, D. P., 1970, The application of linear filter theory to the
direct interpretation of geoelectrical resistivity measurements: Ph.D.
Thesis, TU Delft; UUID: `88a568bb-ebee-4d7b-92df-6639b42da2b2
<http://resolver.tudelft.nl/uuid:88a568bb-ebee-4d7b-92df-6639b42da2b2>`_.
<https://resolver.tudelft.nl/uuid:88a568bb-ebee-4d7b-92df-6639b42da2b2>`_.
.. [GuSi97] Guptasarma, D., and B. Singh, 1997, New digital linear filters for
Hankel J0 and J1 transforms: Geophysical Prospecting, 45, 745--762; DOI:
`10.1046/j.1365-2478.1997.500292.x
Expand All @@ -42,9 +42,7 @@ References
.. [Key09] Key, K., 2009, 1D inversion of multicomponent, multifrequency marine
CSEM data: Methodology and synthetic studies for resolving thin resistive
layers: Geophysics, 74(2), F9--F20; DOI: `10.1190/1.3058434
<https://doi.org/10.1190/1.3058434>`_. Software:
`marineemlab.ucsd.edu/Projects/Occam/1DCSEM
<https://marineemlab.ucsd.edu/Projects/Occam/1DCSEM>`_.
<https://doi.org/10.1190/1.3058434>`_.
.. [Key12] Key, K., 2012, Is the fast Hankel transform faster than quadrature?:
Geophysics, 77(3), F21--F30; DOI: `10.1190/geo2011-0237.1
<https://doi.org/10.1190/geo2011-0237.1>`_; Software:
Expand Down
Loading
Loading