Skip to content

Commit

Permalink
fixed a small missing not in Ionizer
Browse files Browse the repository at this point in the history
  • Loading branch information
kpoder committed Jan 23, 2024
1 parent 2a4a24a commit 9f2bb74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fbpic/particles/elementary_process/ionization/ionizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def __init__(self, element, ionizable_species, target_species,
assert species.m == m_e
# Another sanity check: if spin tracking is enabled for
# the parent ion, make sure it is activated for electrons, too
if species.spin_tracker is None:
if ionizable_species.spin_tracker is not None:
species.activate_spin_tracking(
anom=physical_constants['electron mag. mom. anomaly'][0])

Expand Down
4 changes: 2 additions & 2 deletions tests/test_spin_ionization.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ def run_ionization_test_sim(show):


def test_spin_ionization_lab(show=False):
"""Function that is run by py.test, when doing `python setup.py test`"""
"""Function that is run by pytest"""
run_ionization_test_sim(show)


if __name__ == '__main__' :
if __name__ == '__main__':
test_spin_ionization_lab(show=False)

0 comments on commit 9f2bb74

Please sign in to comment.