--------------------------
**2022-08-31**
The simulation class takes new the parameters ``layered`` and ``layered_opts``,
where the default values are False and None, respectively. If ``layered=True``,
there will be no 3D computations. Instead, it will create a local layered (1D)
model for each source-receiver pair, and compute the response using the
semi-analytical code ``empymod`` (which needs to be installed manually, as it
is a soft dependency). In this case an eventual gradient is computed using the
finite-difference method, not the adjoint-state method, perturbing each layer
slightly. The main purpose of these layered computations is for quick checks,
QC, verifications, etc. Layered computation is also possible through the CLI,
through the new flag ``-l`` or ``--layered``, and a new section ``[layered]``
in the config file.
Other changes (many of them related to the above):
- Model instances have a new attribute ``exctract_1d``, which returns a layered
(1D) model, extracted from the 3D model according the provided parameters;
see :attr:`emg3d.models.Model.extract_1d`.
- CLI takes new the boolean ``add_noise`` in the section ``[noise_opts]``
(default is True).
- Maps: New function ``ellipse_indices`` returning a boolean indicating which
points fall within a general ellipse for the provided input parameters.
- Bug fixes, small improvements and maintenance
- Simulation.misfit returns an ndarray again instead of an DataArray (was
erroneously changed in v1.2.1).
- Write json can now handle NumPy int/bool/float.
- A clean on a Simulation now removes correctly the weights.
- Capture error in jtvec if weight is complex NaN (should be real).
- Model: ``mapping`` can now be an already instantiated map (sort of
undocumented).
- Cleaned-up the namespace by setting ``dir()`` explicitly.
- Replace ``pytest-flake8`` by plain ``flake8``.
- Moved all multiprocessing-related functions to ``_multiprocessing.py``.