Commit fe178ade authored by Martin Reinecke's avatar Martin Reinecke
Browse files

Merge branch 'nifty6_this_and_that_and_changelog' into 'NIFTy_6'

Amend ChangeLog plus minor corrections along the way

See merge request !467
parents 47cbdda4 2eaf034e
......@@ -4,6 +4,20 @@ Minimum Python version increased to 3.6
=======================================
New operators
=============
In addition to the below changes, the following operators were introduced:
* UniformOperator: Transforms a Gaussian into a uniform distribution
* VariableCovarianceGaussianEnergy: Energy operator for inferring covariances
* MultiLinearEinsum: Multi-linear version of numpy's einsum with derivates
* LinearEinsum: Linear version of numpy's einsum with one free field
* PartialConjugate: Conjugates parts of a multi-field
* SliceOperator: Geometry preserving mask operator
* SplitOperator: Splits a single field into a multi-field
* SwitchSpacesOperator: Permutes the domain entries of fields
FFT convention adjusted
=======================
......
......@@ -61,7 +61,7 @@ def _lognormal_moments(mean, sig, N=0):
if not np.all(sig > 0):
raise ValueError("sig must be greater 0; got {!r}".format(sig))
logsig = np.sqrt(np.log((sig/mean)**2 + 1))
logsig = np.sqrt(np.log1p((sig/mean)**2))
logmean = np.log(mean) - logsig**2/2
return logmean, logsig
......
......@@ -37,12 +37,12 @@ class MultiDomain(object):
"""
_domainCache = {}
def __init__(self, dict, _callingfrommake=False):
def __init__(self, dct, _callingfrommake=False):
if not _callingfrommake:
raise NotImplementedError(
'To create a MultiDomain call `MultiDomain.make()`.')
self._keys = tuple(sorted(dict.keys()))
self._domains = tuple(dict[key] for key in self._keys)
self._keys = tuple(sorted(dct.keys()))
self._domains = tuple(dct[key] for key in self._keys)
self._idx = frozendict({key: i for i, key in enumerate(self._keys)})
@staticmethod
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment