Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b04f357
move spike times initialisation into superclass
Oct 6, 2025
f82503b
conditional propagators
Oct 16, 2025
16db15e
conditional propagators
Oct 16, 2025
bd883ac
conditional propagators
Oct 16, 2025
bee31ae
split testing requirements, skip test for old sympy
Oct 17, 2025
fb162fc
merge inhomogeneous and propagator singularity handling
Oct 23, 2025
6458833
merge inhomogeneous and propagator singularity handling
Oct 23, 2025
1863690
merge inhomogeneous and propagator singularity handling
Oct 23, 2025
74ebe4d
merge inhomogeneous and propagator singularity handling
Oct 23, 2025
8a85c81
merge inhomogeneous and propagator singularity handling
Oct 23, 2025
dbb1040
conditional propagators
Oct 24, 2025
32be2bd
conditional propagators
Oct 30, 2025
5755646
conditional propagators
Oct 30, 2025
54d37cb
conditional propagators
Oct 30, 2025
2bd931a
add alternative matrix exponential function
Nov 25, 2025
7bc3aed
add alternative matrix exponential function
Nov 25, 2025
7214553
add alternative matrix exponential function
Nov 25, 2025
7909ea5
add alternative matrix exponential function
Dec 28, 2025
0475e27
Merge remote-tracking branch 'clinssen/conditional-propagators' into …
Jan 11, 2026
05c513c
move use_alternative_expM from global config to analysis call
Jan 11, 2026
ee49c9d
Merge remote-tracking branch 'upstream/master'
Jan 22, 2026
40fc893
fewer debug messages
Jan 27, 2026
e52a187
clean up logger and reduce the amount of debug messages printed
Jan 27, 2026
814c4c8
Merge remote-tracking branch 'upstream/master' into conditional-propa…
Feb 25, 2026
8bff298
Revert "add alternative matrix exponential function"
Feb 25, 2026
f762576
add sympy version requirement
Feb 25, 2026
60b9969
update docstring and fix private method naming
Mar 19, 2026
4f7216d
change check for infty in parameters
Mar 19, 2026
4959aa3
Merge branch 'conditional-propagators' into tom_testing
Mar 19, 2026
46ff617
prevent global_dict clobbering
Mar 27, 2026
b817e8b
Merge remote-tracking branch 'upstream/main' into tom_testing
Jun 2, 2026
95e226a
Merge remote-tracking branch 'upstream/main' into tom_testing
Jun 3, 2026
aca29cb
Merge remote-tracking branch 'upstream/main' into tom_testing
Jun 3, 2026
9a01b6c
Merge branch 'tom_testing' into fewer_debug_messages
Jun 3, 2026
4bd9376
fewer debug messages
Jun 16, 2026
37333ac
fewer debug messages
Jun 16, 2026
f8a960f
fewer debug messages
Jun 16, 2026
eeaee2f
update sympy simplify expression
Jun 18, 2026
21e6c1e
clean up importing matplotlib; disable alternative expM for TestAnaly…
Jun 19, 2026
0b0bd7d
clean up importing matplotlib; disable alternative expM for TestAnaly…
Jun 19, 2026
29556b5
add new disable_singularity_mitigation flag
Jun 19, 2026
24da1cf
rename _open_json to load_json; put test utilities inside odetoolbox …
Jun 22, 2026
5bee27a
rename _open_json to load_json; put test utilities inside odetoolbox …
Jun 22, 2026
4d62540
spin off import_matplotlib to debug_utils inside package and load_tes…
Jun 22, 2026
05acd83
spin off import_matplotlib to debug_utils inside package and load_tes…
Jun 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,15 @@ The following flags exist:
* - ``disable_stiffness_check``
- :python:`False`
- Set to True to disable stiffness check.
* - ``disable_analytic_solver``
- :python:`False`
- Set to True to return numerical solver recommendations, and no propagators, even for ODEs that are analytically tractable.
* - ``disable_singularity_detection``
- :python:`False`
- Set to True to disable detection of conditions under which numerical singularities (division by zero) could occur.
- Set to True to disable detection of conditions under which numerical singularities (division by zero) could occur in the generated analytic solver. This can be useful for analytic solvers containing a large amount of conditions, which could take a long time to compute. If True, no warning messages or mitigations will be returned in case of potential singularities.
* - ``disable_singularity_mitigation``
- :python:`False`
- (Only useful if ``disable_singularity_detection`` is False.) Set to True to disable mitigation of conditions under which numerical singularities (division by zero) could occur in the generated analytic solver. This can be useful for analytic solvers containing a large amount of conditions, which could take a long time to compute. If True, at most one analytic solver will be returned, in which numerical singularities could occur.
* - ``use_alternative_expM``
- :python:`False`
- If :python:`False`, use the sympy function ``sympy.exp`` to compute the matrix exponential. If :python:`True`, use an alternative function (see :py:func:`odetoolbox.sympy_helpers.expMt` for details). This can be useful as calls to ``sympy.exp`` can sometimes take a very large amount of time.
Expand All @@ -154,6 +160,7 @@ The following flags exist:
- :python:`logging.WARN`
- Sets the logging threshold. Logging messages which are less severe than ``log_level`` will be ignored. Log levels can be provided as an integer or string, for example "INFO" (more messages) or "WARN" (fewer messages). For a list of valid logging levels, see https://docs.python.org/3/library/logging.html#logging-levels


Input
-----

Expand Down Expand Up @@ -372,6 +379,10 @@ The following global options are defined. Note that all are typically formatted
- :python:`["oo", "zoo", "nan", "NaN", "__h"]`
- list of strings
- For each forbidden name: emit an error if a variable or parameter by this name occurs in the input.
* - ``use_alternative_expM``
- :python:`False`
- boolean
- If :python:`False`, use the sympy function ``sympy.exp`` to compute the matrix exponential. If :python:`True`, use an alternative function (see :py:func:`odetoolbox.sympy_helpers.expMt` for details). This can be useful as calls to ``sympy.exp`` can sometimes take a very large amount of time.


Output
Expand Down
11 changes: 6 additions & 5 deletions ode_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,32 +51,33 @@
parsed_args.preserve_expressions = True

_init_logging(log_level=parsed_args.log_level)
logging.info("Reading input file...")
logging.getLogger(__name__).info("Reading input file...")

if not os.path.isfile(parsed_args.infile):
logging.error("The file '%s' does not exist." % parsed_args.infile)
logging.getLogger(__name__).error("The file '%s' does not exist." % parsed_args.infile)
sys.exit(1)

with open(parsed_args.infile) as infile:
try:
indict = json.load(infile)
except Exception as e:
logging.error("The input JSON file could not be parsed; error: " + e.msg)
logging.getLogger(__name__).error("The input JSON file could not be parsed; error: " + e.msg)
sys.exit(1)

try:
result = odetoolbox.analysis(indict,
disable_stiffness_check=parsed_args.disable_stiffness_check,
disable_analytic_solver=parsed_args.disable_analytic_solver,
disable_singularity_detection=parsed_args.disable_singularity_detection,
disable_singularity_mitigation=parsed_args.disable_singularity_mitigation,
preserve_expressions=parsed_args.preserve_expressions,
log_level=parsed_args.log_level)
except MalformedInputException as e:
logging.error("The input JSON file could not be parsed; error: " + e.message)
logging.getLogger(__name__).error("The input JSON file could not be parsed; error: " + e.message)
sys.exit(1)

basename = os.path.basename(parsed_args.infile.rsplit(".", 1)[0])
outfname = "%s_result.json" % basename
logging.info("Writing output to file %s..." % outfname)
logging.getLogger(__name__).info("Writing output to file %s..." % outfname)
with open(outfname, 'w') as outfile:
outfile.write(json.dumps(result, indent=2))
Loading
Loading