Skip to content

Commit

Permalink
Merge pull request #93 from peijin94/traceBline
Browse files Browse the repository at this point in the history
Minor fix for B-field tracing
  • Loading branch information
dstansby authored Nov 6, 2022
2 parents 8018242 + 20d0e0b commit 0f2c3f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion psipy/tracing/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _vector_grid_from_bs(self, bs: xr.DataArray):
from streamtracer import VectorGrid

# Account for tracing in spherical coordinates
bs.loc[..., "bp"] /= np.cos(bs.coords["theta"])
bs.loc[..., "bp"] /= np.abs(np.cos(bs.coords["theta"]))
bs.loc[..., "bp"] /= bs.coords["r"]
bs.loc[..., "bt"] /= bs.coords["r"]

Expand Down

0 comments on commit 0f2c3f3

Please sign in to comment.