Iterate over 1 second STCs.
(self)
| 576 | return stc |
| 577 | |
| 578 | def __iter__(self): |
| 579 | """Iterate over 1 second STCs.""" |
| 580 | # Arbitrary chunk size, can be modified later to something else. |
| 581 | # Loop over chunks of 1 second - or, maximum sample size. |
| 582 | # Can be modified to a different value. |
| 583 | last_sample = self.last_samp |
| 584 | for start_sample in range(self.first_samp, last_sample + 1, self._chk_duration): |
| 585 | stop_sample = min(start_sample + self._chk_duration - 1, last_sample) |
| 586 | yield ( |
| 587 | self.get_stc(start_sample, stop_sample), |
| 588 | self.get_stim_channel(start_sample, stop_sample), |
| 589 | ) |
nothing calls this directly
no test coverage detected