Skip to content

Releases: emsig/empymod

Version of Filter-article and CSEM-book

20 Nov 19:46
Compare
Choose a tag to compare
  • Many little improvements in the documentation.
  • Some code improvements through the use of codacy.
  • Remove testing of Python 3.4; officially supported are now Python 3.5-3.7.
  • Version of the filter article (DLF) in geophysics and of the CSEM book.

Hook for Cole-Cole IP and similar

26 Oct 19:35
Compare
Choose a tag to compare
  • model.bipole, model.dipole, and model.analytical have now a hook which users can exploit to insert their own calculation of etaH, etaV, zetaH, and zetaV. This can be used, for instance, to model a Cole-Cole IP survey. See the manual or the example-notebooks for more information.

  • model.wavenumber renamed to model.dipole_k to avoid name clash with kernel.wavenumber. For now model.wavenumber continues to exist, but raises a depreciation warning.

  • xdirect default value changed from True to False.

  • Possibility to provide interpolated points (int_pts) to transform.dlf.

The following changes are backwards incompatible if you directly used transform.fht, transform.hqwe, or transform.hquad. Nothing changes for the user-facing routines in model:

  • empymod.fem now passes factAng to empymod.transform, not angle; this saves some time if looped over offsets or frequencies, as it is not repeatedly calculated within empymod.transform.

  • Use get_spline_values in empymod.fem for Hankel DLF, instead of in empymod.fht. Gives a speed-up if looped over offsets or frequencies. Should be in utils, but that would be heavily backwards incompatible. Move there in version 2.0.

Speed improvements following benchmarks

16 Jul 13:42
Compare
Choose a tag to compare
  • Small improvements related to speed as a result of the benchmarks introduced in v1.7.2:

    • Kernels which do not exist for a given ab are now returned as None from kernel.wavenumber instead of arrays of zeroes. This permits for some time saving in the transforms. This change is backwards incompatible if you directly used kernel.wavenumber. Nothing changes for the user-facing routines in model.

    • Adjustments in transform with regard to the None returned by kernel.wavenumber. The kernels are not checked anymore if they are all zeroes (which can be slow for big arrays). If they are not None, they will be processed.

    • Various small improvements for speed to transform.dlf (i.e. factAng; log10/log; re-arranging).

Benchmarked with asv

07 Jul 21:12
95a1584
Compare
Choose a tag to compare
  • Benchmarks: empymod has now a benchmark suite, see empymod/asv.

  • Fixed a bug in bipole for time-domain responses with several receivers or sources with different depths (Simply failed, as wrong dimension was provided to tem).

  • Small improvements:

    • Various simplifications or cleaning of the code base.
    • Small change (for speed) in check if kernels are empty in transform.dlfand transform.qwe.

Load/save filters in plain text

19 Jun 17:48
Compare
Choose a tag to compare
  • New routines in empymod.filters.DigitalFilter: Filters can now be saved to or loaded from pure ascii-files.

  • Filters and inversion result from empymod.scripts.fdesign are now by default saved in plain text. The filters with their internal routine, the inversion result with np.savetxt. Compressed saving can be achieved by giving a name with a '.gz'-ending.

  • Change in empymod.utils:

    • Renamed _min_param to _min_res.
    • Anisotropy aniso is no longer directly checked for its minimum value. Instead, res*aniso**2, hence vertical resistivity, is checked with _min_res, and anisotropy is subsequently re-calculated from it.
    • The parameters epermH, epermV, mpermH, and mpermV can now be set to 0 (or any positive value) and do not depend on _min_param.
  • printinfo: Generally improved; prints now MKL-info (if available) independently of numexpr.

  • Simplification of kernel.reflections through re-arranging.

  • Bug fixes

  • Version of re-submission of the DLF article to geophysics.

Move empyscripts into empymod.scripts

24 May 01:00
Compare
Choose a tag to compare

Merge empyscripts into empymod under empymod.scripts.

  • Clear separation between mandatory and optional imports:

    • Mandatory:

      • numpy
      • scipy
    • Optional:

      • numexpr (for empymod.kernel)
      • matplotlib (for empymod.scripts.fdesign)
      • IPython (for empymod.scripts.printinfo)
  • Broaden namespace of empymod. All public functions from the various modules and the modules from empymod.scripts are now available under empymod directly.

Speed improvements for QUAD/QWE

21 May 20:49
Compare
Choose a tag to compare

These changes should make calculations using QWE and QUAD for the Hankel transform for cases which do not require all kernels faster; sometimes as much as twice as fast. However, it might make calculations which do require all kernels a tad slower, as more checks had to be included. (Related to [empymod#11]; basically including for QWE and QUAD what was included for DLF in version 1.6.0.)

  • transform:

    • dlf:

      • Improved by avoiding unnecessary multiplications/summations for empty kernels and applying the angle factor only if it is not 1.
      • Empty/unused kernels can now be input as None, e.g. signal=(PJ0, None, None).
      • factAng is new optional for the Hankel transform, as is ab.
    • hqwe: Avoids unnecessary calculations for zero kernels, improving speed for these cases.

    • hquad, quad: Avoids unnecessary calculations for zero kernels, improving speed for these cases.

  • kernel:

    • Simplify wavenumber
    • Simplify angle_factor

Primary/secondary field

05 May 14:21
Compare
Choose a tag to compare
  • Add the possibility to calculate secondary fields only (excluding the direct field) by passing the argument xdirect=None. The complete xdirect-signature is now (only affects calculation if src and rec are in the same layer):

    • If True, direct field is calculated analytically in the frequency domain.
    • If False, direct field is calculated in the wavenumber domain.
    • If None, direct field is excluded from the calculation, and only reflected
      fields are returned (secondary field).
  • Bugfix in model.analytical for ab=[36, 63] (zeroes) [#16].

More DLF improvements

01 May 13:41
Compare
Choose a tag to compare

This release is not completely backwards compatible for the main modelling routines in empymod.model, but almost. Read below to see which functions are affected.

  • Improved Hankel DLF [empymod#11].
    empymod.kernel.wavenumber always returns three kernels, PJ0, PJ1, and PJ0b. The first one is angle-independent, the latter two depend on the angle. Now, depending of what source-receiver configuration is chosen, some of these might be zero. If-statements were now included to avoid the calculation of the DLF, interpolation, and reshaping for 0-kernels, which improves speed for these cases.

  • Unified DLF arguments [empymod#10].

    These changes are backwards compatible for all main modelling routines in empymod.model. However, they are not backwards compatible for the following routines:

    • empymod.model.fem (removed use_spline),
    • empymod.transform.fht (removed use_spline),
    • empymod.transform.hqwe (removed use_spline),
    • empymod.transform.quad (removed use_spline),
    • empymod.transform.dlf (lagged, splined => pts_per_dec),
    • empymod.utils.check_opt (no longer returns use_spline),
    • empymod.utils.check_hankel (changes in pts_per_dec), and
    • empymod.utils.check_time (changes in pts_per_dec).

    The function empymod.utils.spline_backwards_hankel can be used for backwards compatibility.

    Now the Hankel and Fourier DLF have the same behaviour for pts_per_dec:

    • pts_per_dec = 0: Standard DLF,
    • pts_per_dec < 0: Lagged Convolution DLF, and
    • pts_per_dec > 0: Splined DLF.

    There is one exception which is not backwards compatible: Before, if opt=None and htarg={pts_per_dec: != 0}, the pts_per_dec was not used for the FHT and the QWE. New, this will be used according to the above definitions.

  • Bugfix in model.wavenumber for ab=36 (zeroes).

Improved DLF

26 Apr 03:28
Compare
Choose a tag to compare
  • DLF improvements:

    • Digital linear filter (DLF) method for the Fourier transform can now be carried out without spline, providing 0 for pts_per_dec (or any integer smaller than 1).

    • Combine kernel from fht and ffht into dlf, hence separate DLF from other calculations, as is done with QWE (qwe for hqwe and fqwe).

    • Bug fix regarding transform.get_spline_values; a DLF with pts_per_dec can now be shorter then the corresponding filter.