Skip to content

Commit

Permalink
black fixs in _geqdsk.py
Browse files Browse the repository at this point in the history
  • Loading branch information
HarukiST committed Aug 13, 2024
1 parent e806fb4 commit 8f5b7c6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions hypnotoad/geqdsk/_geqdsk.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,10 @@ def write(data, fh, label=None, shot=None, time=None):
sign_dpsi = np.sign(psi_bdry - psi_axis)
xcrd = np.linspace(psi_axis, psi_bdry, nx) * sign_dpsi
fprime_spl = sp.interpolate.InterpolatedUnivariateSpline(
xcrd, fpol * sign_dpsi).derivative()
xcrd, fpol * sign_dpsi
).derivative()
ffprime = fpol * fprime_spl(xcrd)
write_1d(ffprime,co)
write_1d(ffprime, co)

if "pprime" in data:
write_1d(data["pprime"], co)
Expand All @@ -158,7 +159,8 @@ def write(data, fh, label=None, shot=None, time=None):
xcrd = np.linspace(psi_axis, psi_bdry, nx) * sign_dpsi

pprime_spl = sp.interpolate.InterpolatedUnivariateSpline(
xcrd, data["pres"] * sign_dpsi).derivative()
xcrd, data["pres"] * sign_dpsi
).derivative()
write_1d(pprime_spl(xcrd), co)

write_2d(data["psi"], co)
Expand Down

0 comments on commit 8f5b7c6

Please sign in to comment.