Skip to content

Commit

Permalink
Better is_fast_run()
Browse files Browse the repository at this point in the history
  • Loading branch information
vatai committed May 5, 2024
1 parent 9725508 commit f6db4a8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion radicalpy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.. todo:: Add module docstring.
"""
import argparse
import sys
from pathlib import Path
from typing import Tuple
Expand All @@ -24,7 +25,15 @@ def is_fast_run():
called (e.g., by setting fewer number of time steps etc.).
"""
return len(sys.argv) == 2 and sys.argv[1] == "--fast"
parser = argparse.ArgumentParser()
parser.add_argument(
"--fast",
default=False,
action="store_true",
help="If set, the experiment should perform a reduced number of steps.",
)
args = parser.parse_args()
return args.fast


def Bhalf_fit(
Expand Down

0 comments on commit f6db4a8

Please sign in to comment.