MCPcopy
hub / github.com/mne-tools/mne-python / __iter__

Method __iter__

mne/simulation/source.py:578–589  ·  view source on GitHub ↗

Iterate over 1 second STCs.

(self)

Source from the content-addressed store, hash-verified

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 )

Callers

nothing calls this directly

Calls 2

get_stcMethod · 0.95
get_stim_channelMethod · 0.95

Tested by

no test coverage detected