Skip to content

Commit

Permalink
remove more fortran
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis committed May 21, 2024
1 parent c11a806 commit 96f8031
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/performance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Streamline tracing
==================

`sunkit_magex.pfss` has two streamline tracers: a pure python `sunkit_magex.pfss.tracing.PythonTracer` and a complied tracer `sunkit_magex.pfss.tracing.FortranTracer`.
The FORTRAN version is significantly faster, using the `streamtracer`_ package.
The compiled version is significantly faster, using the `streamtracer`_ package.

.. _numba: https://numba.pydata.org
.. _install numba: http://numba.pydata.org/numba-doc/latest/user/installing.html
Expand Down
2 changes: 1 addition & 1 deletion examples/internals/tracer_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def dipole_Br(r, theta):

fig, ax = plt.subplots()
ax.scatter(nseeds[1:len(times[0])], times[0][1:], label='python')
ax.scatter(nseeds[1:], times[1][1:], label='fortran')
ax.scatter(nseeds[1:], times[1][1:], label='compiled')

pydt = (times[0][4] - times[0][3]) / (nseeds[4] - nseeds[3])
ax.plot([1, 1e5], [pydt, 1e5 * pydt])
Expand Down
2 changes: 0 additions & 2 deletions sunkit_magex/pfss/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Import this to register map sources
import sunkit_magex.pfss.map as _
from sunkit_magex.pfss import coords, fieldline, sample_data, tracing, utils
from sunkit_magex.pfss.input import Input
from sunkit_magex.pfss.output import Output
Expand Down
2 changes: 1 addition & 1 deletion sunkit_magex/pfss/tests/test_tracers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

@pytest.fixture(params=[tracing.PythonTracer(),
tracing.FortranTracer()],
ids=['python', 'fortran'])
ids=['python', 'compiled'])
def flines(dipole_result, request):
tracer = request.param
_, out = dipole_result
Expand Down
2 changes: 1 addition & 1 deletion sunkit_magex/pfss/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def __init__(self, max_steps='auto', step_size=1):
from streamtracer import StreamTracer
except ModuleNotFoundError as e:
raise RuntimeError(
'Using FortranTracer requires the streamtracer module, '
'Using this tracer requires the streamtracer module, '
'but streamtracer could not be loaded') from e
self.max_steps = max_steps
self.step_size = step_size
Expand Down

0 comments on commit 96f8031

Please sign in to comment.