Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions hypnotoad/cases/tokamak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]
Expand Down