Skip to content

Commit

Permalink
Allow a maximum lag of 1
Browse files Browse the repository at this point in the history
Allow a maximum lag of 1. This failed before because tau was required to
be at least 1 and the max. lag was required to be strictly larger than
tau.
  • Loading branch information
pwollstadt committed Apr 27, 2022
1 parent 6f3916b commit 16c6cc5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions idtxl/active_information_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ def _initialise(self, settings, data, process):
raise RuntimeError('max_lag has to be an integer >= 0.')
if type(self.settings['tau']) is not int or self.settings['tau'] <= 0:
raise RuntimeError('tau has to be an integer > 0.')
if self.settings['tau'] >= self.settings['max_lag']:
raise RuntimeError('tau ({0}) has to be smaller than max_lag ({1})'
if self.settings['tau'] > self.settings['max_lag']:
raise RuntimeError('tau ({0}) has to be equal to or smaller than max_lag ({1})'
'.'.format(self.settings['tau'],
self.settings['max_lag']))

Expand Down Expand Up @@ -332,6 +332,7 @@ def _include_process_candidates(self, data):
self.current_value[1] - self.settings['max_lag'] - 1,
-self.settings['tau'])
candidates = self._define_candidates(process, samples)
print(candidates)
self._include_candidates(candidates, data)

def _include_candidates(self, candidate_set, data):
Expand Down

0 comments on commit 16c6cc5

Please sign in to comment.