Skip to content

Commit 9a5080e

Browse files
committed
[core] fixes #24
1 parent 2d0f6b8 commit 9a5080e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

smcpp/analysis.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,11 @@ def __init__(self, files, args):
290290

291291
# Set t1, tK
292292
n = min(200, max(self._ns.max(), 2))
293-
args.t1 = args.t1 or np.exp(np.log(1000) * (200 - n) / 200 + np.log(100) * (n / 200))
293+
if args.t1 is None:
294+
args.t1 = np.exp(np.log(1000) * (200 - n) / 200 + np.log(100) * (n / 200))
295+
if args.t1 <= 0:
296+
logger.error("--t1 should be >0")
297+
sys.exit(1)
294298
logger.debug("setting t1=%f", args.t1)
295299
self._init_knots(args.knots, args.t1, args.tK, args.offset)
296300
for x in smcpp.defaults.additional_knots:

0 commit comments

Comments
 (0)