Skip to content

Releases: emsig/emg3d

Arbitrarily shaped sources

13 Jan 16:30
ece2baf
Compare
Choose a tag to compare
  • fields.get_source_field:

    • Arbitrarily shaped sources (and therefore also loops) can now be created by
      providing a src that consists of x-, y-, and z-coordinates of all
      endpoints of the individual segments.

    • Simple "magnetic dipole" sources can now be created by providing a point
      dipole ([x, y, z, azm, dip]) and set msrc=True. This will create a
      square loop of lengthxlength m perpendicular to the defined point
      dipole, hence simulating a magnetic source. Default length is 1 meter.

    • Point dipoles and finite length dipoles were before treated differently.
      Point dipoles are new converted into finite length dipoles of provided
      length (default is 1 meter), and treated as finite length dipoles. This is
      backwards incompatible and means that the source field for point dipoles
      might not be exactly the same as before. However, in any properly set-up
      simulation this should have no influence on the result.

    • Bugfix: Fix floating point issue when the smaller coordinate of a finite
      length dipole source was very close to a node, but not exactly. This is
      done by rounding the grid locations and source position, and the precision
      can be controlled via decimals; default is micrometer.

  • fields: Values outside the grid in get_receiver and
    get_receiver_response are new set to NaN's instead of zeroes.
    Additionally, the first and last values in each direction of the fields are
    ignored, to avoid effects form the boundary condition (receivers should not
    be placed that close to the boundary anyway).

  • simulations:

    • Within the automatic gridding the properties are estimated much more
      conservative now, if not provided: before the log10-average of the last
      slice in a given direction was used; now it uses the maximum resistivity.
      This is usually the air value for x/y and positive z. This is very
      conservative, but avoids that users use too small computational domains in
      the case of land and shallow marine surveys. The downside is that it
      heavily over-estimates the required domain in the deep marine case.
      However, slower but safe is better in this case.
    • New method print_grids, which prints the info of all created grids.
      This is also used for logging in the CLI interface.
  • maps: interp3d takes a new keyword cval, which is passed to
    map_coordinates.

Move to EMSiG

09 Dec 15:04
5592d3c
Compare
Choose a tag to compare

Various small things, mostly related to the automatic meshing.

  • New parameter distance for get_origin_widths, as an alternative for
    domain and vector: distance defines the survey domain as distance
    from the center. This is then also available in construct_mesh and
    Simulation, including the CLI.
  • Removed precision from skin_depth, wavelength,
    min_cell_width; all in meshes. It caused problems for high
    frequencies.
  • All data is stored in the Survey, not partly in Survey and partly
    in Simulation.
  • Deprecated collect_classes in io.
  • Expanded the what-parameter in the Simulation-class to include
    properties related to the gradient.
  • Moved from github.com/empymod to github.com/emsig.

Fix deploy; take 2

04 Dec 17:08
Compare
Choose a tag to compare
v0.15.2

Fix deploy; take 2

Bugfix deploy

04 Dec 16:01
d1b2713
Compare
Choose a tag to compare

Small bugfix release, as v0.15.0 never got deployed.

  • Fix CI deploy script.
  • Makefile for the most common dev-tasks.

discretize restructure

04 Dec 09:57
58961a6
Compare
Choose a tag to compare

The package discretize went through a major restructuring with many name
changes and consequent deprecations (see below for a list of affected
mesh-properties for emg3d). This version updates emg3d to be compatible
with discretize>=0.6.0 in the long run. It also means that emg3d will, from
emg3d>=0.15.0 onwards, only work with discretize>=0.6.0.

Other notable changes:

  • Bug fix re storing/loading synthetics
  • Moved from Travis CI to GitHub Actions.

The relevant aliases and deprecations for emg3d are (consult the release
notes of discretize for all changes):

Aliases: Aliases (left) remain valid pointers to the new names (right).

  • x0 => origin
  • nC => n_cells
  • vnC => shape_cells
  • nN => n_nodes
  • vnN => shape_nodes
  • nE => n_edges
  • nEx => n_edges_x
  • nEy => n_edges_y
  • nEz => n_edges_z
  • vnE => n_edges_per_direction
  • vnEx => shape_edges_x
  • vnEy => shape_edges_y
  • vnEz => shape_edges_z

Deprecations: Deprecated properties (left) raise a deprecation warning and
will be removed in the future. Currently, they still work and point to the new
names (right).

  • hx => h[0]
  • hy => h[1]
  • hz => h[2]
  • nCx => shape_cells[0]
  • nCy => shape_cells[1]
  • nCz => shape_cells[2]
  • nNx => shape_nodes[0]
  • nNy => shape_nodes[1]
  • nNz => shape_nodes[2]
  • vectorNx => nodes_x
  • vectorNy => nodes_y
  • vectorNz => nodes_z
  • vectorCCx => cell_centers_x
  • vectorCCy => cell_centers_y
  • vectorCCz => cell_centers_z
  • vol => cell_volumes

Bug fix discretize

20 Nov 17:09
5532a3e
Compare
Choose a tag to compare
  • Bug fix for discretize>=0.6.0.

Bug fix

18 Nov 11:08
25cca56
Compare
Choose a tag to compare
  • Bug fix for Windows affecting good_mg_cell_nr (int32 issue).

Bug fix

14 Nov 12:42
Compare
Choose a tag to compare
  • Fix for h5py>3.0.
  • Improved docs re automatic gridding.

Automatic gridding

07 Nov 19:02
a97193f
Compare
Choose a tag to compare

The simulation class comes new with an automatic gridding functionality, which should make it much easier to compute CSEM data. With that the entire optimization routine was improved too. See the API docs for more info of the relevant implementation.

  • simulation:

    • Simulation: New gridding options 'single', 'frequency', 'source', and 'both'; new default is 'single'.
    • compute() takes a new argument, min_offset. If observed=True, it will add Gaussian random noise according to the standard deviation of the data; it will set receivers responses below the minimum offset to NaN.
    • There is no longer a reference model.
    • misfit and gradient can now handle observations with NaN's.
  • survey: A Survey has new attributes standard_error, noise_floor, and relative_error.

  • optimize: Completely changed misfit and data-weighting to more sensible functions.

  • cli:

    • As a consequence of the changes the data_weight_opts got removed.
    • New sections [data] to select the wanted data and [gridding_opts] for options of the automatic gridding.
    • Section [simulation] has a new parameter min_offset (for creating observed data).
    • Output has a new parameter n_observations if misfit or gradient were called, which is the number of observations that were used to compute the misfit.
  • meshes:

    • New functions construct_mesh, get_origin_widths, good_mg_cell_nr and other, smaller helper routines.
    • Deprecated the old meshing routines get_hx_h0, get_cell_numbers, get_stretched_h, get_domain, get_hx; they will be removed in the future.
    • Default of good_mg_cell_nr changed, and the documentation (and verbosity) with regards to «good» number of cells was improved.
  • Bug fixes:

    • maps: Fixed the mapping of the gradients (Conductivity is the only mapping that was not affected by this bug).
  • Removed deprecated features:

    • models.Model: Removed parameters res_{x;y;z}.
    • io.save: Removed deprecated parameter backend.
    • io.save: Removed default, file extension has to be provided.

CLI

22 Sep 18:18
c380dec
Compare
Choose a tag to compare
CLI
  • New Module cli for command-line interaction:

    The command-line interface can currently be used to forward model an entire Simulation, and also to compute the misfit of it with respect to some data and the gradient of the misfit function. See the section "CLI interface" in the documentation for more info.

Note that, while cli (v0.13.0) and optimize (v0.12.0) are implemented, they are still in development and are likely going to change throughout the next two minor releases or so.

  • Other changes:

    • solver: Changes in verbosity for emg3d.solve:

      • New default verbosity is 1 (only warnings; before it was 2).
      • Verbosities {-1;0;1} remain unchanged.
      • Verbosities {2;3;4} => {3;4;5}.
      • New verbosity 2: Only shows a one-liner at the end (plus warnings).
    • survey and simulation: to_file and from_file have new a parameter name, to store and load with a particular name instead of the default survey/simulation (useful when storing, e.g., many surveys in one file).

    • survey: stores new also the reference-data; different data (observed, reference) is contained in a data-dict when storing.

    • simulation: takes new a verb parameter.

    • optimize:

      • Gradient now possible for arbitrarily rotated sources and receivers.
      • Falls back to synthetic instead of observed now if reference not found.
    • io: np.bool_ are converted back to bool when loading.

    • Re-arrange, improve, and update documentation.