Skip to content

Commit

Permalink
Merge pull request #84 from jzuhone/model_spec_bug
Browse files Browse the repository at this point in the history
Fix bug in looking for bad times
  • Loading branch information
taldcroft authored Apr 15, 2020
2 parents bd5d6f1 + e0845f5 commit 8466d9b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xija/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ def __init__(self, name=None, start=None, stop=None, dt=None,
self.rk4 = rk4
self.limits = limits

if 'bad_times' in model_spec:
self.bad_times = model_spec['bad_times']
else:
if model_spec is None or 'bad_times' not in model_spec:
self.bad_times = []
else:
self.bad_times = model_spec['bad_times']
self.bad_times_indices = []
for t0, t1 in self.bad_times:
t0, t1 = DateTime([t0, t1]).secs
Expand Down

0 comments on commit 8466d9b

Please sign in to comment.