diff --git a/nifty5/library/correlated_fields.py b/nifty5/library/correlated_fields.py index d794d22b2d83ba789c9f34f38d23aacb13d39877..747f0208cc6cf50d429b181c6b89cbfd435483e5 100644 --- a/nifty5/library/correlated_fields.py +++ b/nifty5/library/correlated_fields.py @@ -472,7 +472,7 @@ class CorrelatedFieldMaker: lst = [('Offset amplitude', self.amplitude_total_offset), ('Total fluctuation amplitude', self.total_fluctuation)] - namps = len(self.amplitudes) + namps = len(self.normalized_amplitudes) if namps > 1: for ii in range(namps): lst.append(('Slice fluctuation (space {})'.format(ii), @@ -498,9 +498,19 @@ class CorrelatedFieldMaker: return fluctuations_slice_mean/np.mean(np.sqrt(scm)) @property - def amplitudes(self): + def normalized_amplitudes(self): return self._a + @property + def amplitude(self): + if len(self._a) > 1: + s = ('If more than one spectrum is present in the model,', + ' no unique set of amplitudes exist because only the', + ' relative scale is determined.') + raise NotImplementedError(s) + expand = VdotOperator(full(self._a[0].target, 1)).adjoint + return self._a[0]*(expand @ self.amplitude_total_offset) + @property def amplitude_total_offset(self): return self._azm