diff --git a/xmca/array.py b/xmca/array.py index 4ce66ef..acb19ba 100755 --- a/xmca/array.py +++ b/xmca/array.py @@ -587,8 +587,6 @@ def _get_eofs( scaling='None', phase_shift=0, original=False): V = self._get_V(n, original=original) - n_max_mode = V['left'].shape[1] - sqrt_svals = np.sqrt(self._get_svals(n_max_mode)) n_var = self._n_variables no_nan_idx = self._no_nan_index field_shape = self._fields_spatial_shape @@ -610,7 +608,11 @@ def _get_eofs( pass # by eigenvalues (field units) elif scaling == 'eigen': - eofs[k] *= sqrt_svals[:n_max_mode] + # sqrt_svals = np.sqrt(self._get_svals(n_max_mode)) + # sqrt_svals[:n_max_mode] + n_max_mode = V['left'].shape[1] + norm = self._get_norm(n_max_mode, sorted=True) + eofs[k] *= norm[k] # by maximum value elif scaling == 'max': eofs[k] /= np.nanmax(abs(eofs[k].real), axis=(0, 1))