From 8801119299d684fc71b520bec8596e6086f454e9 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 13 Sep 2023 14:30:25 +0200 Subject: [PATCH] fix error in reading VNC array from file --- src/simsopt/field/normal_field.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/simsopt/field/normal_field.py b/src/simsopt/field/normal_field.py index f2910ca79..8c14d3398 100644 --- a/src/simsopt/field/normal_field.py +++ b/src/simsopt/field/normal_field.py @@ -101,18 +101,18 @@ def from_spec(cls, filename): if ph['istellsym']: vnc = None else: - vnc = np.asarray(ph['vnc'][1:]) + vnc = np.asarray(ph['vnc']) - nf = cls( - nfp=ph['nfp'], - stellsym=ph['istellsym'], - mpol=ph['Mpol'], + normal_field = cls( + nfp=ph['nfp'], + stellsym=bool(ph['istellsym']), + mpol=ph['Mpol'], ntor=ph['Ntor'], vns=vns, vnc=vnc ) - return nf + return normal_field def get_index_in_dofs(self, m, n, mpol=None, ntor=None, even=False): """