From 6d4ccbc7ba076616355e0bc8af32f6d4ae4a9bce Mon Sep 17 00:00:00 2001 From: Mike Kryjak Date: Tue, 8 Nov 2022 16:06:53 +0000 Subject: [PATCH] Expose cocos setting in read_geqdsk --- hypnotoad/cases/tokamak.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hypnotoad/cases/tokamak.py b/hypnotoad/cases/tokamak.py index 6df2cfc0..bd11f801 100644 --- a/hypnotoad/cases/tokamak.py +++ b/hypnotoad/cases/tokamak.py @@ -1653,12 +1653,16 @@ def Bt_axis(self): def read_geqdsk( - filehandle, settings=None, nonorthogonal_settings=None, make_regions=True + filehandle, settings=None, nonorthogonal_settings=None, make_regions=True, cocos = 1 ): """ Read geqdsk formatted data from a file object, returning a TokamakEquilibrium object + cocos - COordinate COnventions. Not fully handled yet, + only whether psi is divided by 2pi or not. + if < 10 then psi is divided by 2pi, otherwise not. + Inputs ------ filehandle A file handle to read @@ -1676,7 +1680,7 @@ def read_geqdsk( from ..geqdsk._geqdsk import read as geq_read - data = geq_read(filehandle) + data = geq_read(filehandle, cocos) # Range of psi normalises psi derivatives psi_bdry_gfile = data["sibdry"]