Commit da55b5e1 authored by Maximilian Schanner's avatar Maximilian Schanner
Browse files

Fix typo and address #22

parent 040bb782
Changelog
=========
2021-11-19 v1.1.4
-----------------
* Fix another transpositon error in field calculation
* Address Issue #22
2021-11-11 v1.1.3
-----------------
* Fix a transpositon error in field calculation
......
......@@ -46,4 +46,4 @@ from pymagglobal.core import local_curve, dipole_series, file2splines, \
Model
from pymagglobal import utils
__version__ = '1.1.3'
__version__ = '1.1.4'
......@@ -572,12 +572,11 @@ def field(z_at, splines, cov_splines=None, field_type='nez', check=True,
spatial)
if out_gd:
field_cov = np.einsum('ji..., ...jk, kl... -> il...',
field_cov = np.einsum('ji..., ...jk, kl... -> ...il',
rot_mats,
field_cov,
rot_mats)
field_cov = field_cov.T
if field_type == 'dif':
grad_D = grad_d(*field)
cov_D = np.einsum('ij, ijk, ik -> i',
......@@ -600,4 +599,4 @@ def field(z_at, splines, cov_splines=None, field_type='nez', check=True,
return np.array(nez2dif(*field)), \
np.sqrt(np.array([cov_D, cov_I, cov_F]))
return field, np.sqrt(field_cov)
return field, np.sqrt(np.diagonal(field_cov, axis1=1, axis2=2)).T
Markdown is supported
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