diff --git a/hypnotoad/cases/torpex.py b/hypnotoad/cases/torpex.py index 9efaea2c..0a5dee96 100644 --- a/hypnotoad/cases/torpex.py +++ b/hypnotoad/cases/torpex.py @@ -162,6 +162,9 @@ def __init__(self, equilibOptions, meshOptions): self.Rmax = float("inf") self.Zmin = -float("inf") self.Zmax = float("inf") + + self.f_psi_sign = 1.0 # H.seto (dummy) + elif "gfile" in equilibOptions: # load a g-file with open(equilibOptions["gfile"], "rt") as fh: @@ -207,7 +210,7 @@ def __init__(self, equilibOptions, meshOptions): "consistent with sign of grad(psi)" ) - self.f_psi_sign = numpy.sign(psi_bndry - psi_axis) + self.f_psi_sign = numpy.sign(psi_bndry - psi_axis) # H.seto (dummy) # index of a point close to the magnetic axis i_axis = numpy.searchsorted(R, R_axis) @@ -298,7 +301,7 @@ def __init__(self, equilibOptions, meshOptions): ) self.Bt_axis = Bt[ZindMid, RindMid] - self.f_psi_sign = numpy.sign(0.0 - psi[ZindMid, RindMid]) # H.seto + self.f_psi_sign = numpy.sign(0.0 - psi[ZindMid, RindMid]) # H.seto (dummy) else: raise ValueError("Failed to initialise psi function from inputs")