Skip to content

Commit

Permalink
use given iota for normalization scales
Browse files Browse the repository at this point in the history
  • Loading branch information
YigitElma committed Aug 14, 2024
1 parent db9107b commit 83ea252
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion desc/objectives/normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ def get_lowest_mode(basis, coeffs):
scales["A"] = np.pi * scales["a"] ** 2
scales["V"] = 2 * np.pi * scales["R0"] * scales["A"]
scales["B_T"] = abs(thing.Psi) / scales["A"]
iota_avg = np.mean(np.abs(thing.get_profile("iota")(np.linspace(0, 1, 20))))
if thing.iota is not None:
iota_avg = np.mean(np.abs(thing.iota(np.linspace(0, 1, 20))))
else:
iota_avg = np.mean(np.abs(thing.get_profile("iota")(np.linspace(0, 1, 20))))
if np.isclose(iota_avg, 0):
scales["B_P"] = scales["B_T"]
else:
Expand Down

0 comments on commit 83ea252

Please sign in to comment.