class_docstr: Class to generate simulated Source Estimates.
  
  Parameters
  ----------
  src : instance of SourceSpaces
      Source space.
  tstep : float
      Time step between successive samples in data. Default is 0.001 s.
  duration : float | None
      Time interval during which the simulation takes place in seconds.
      If None, it is computed using existing events and waveform lengths.
  first_samp : int
      First sample from which the simulation takes place, as an integer.
      Comparable to the :term:`first_samp` property of `~mne.io.Raw` objects.
      Default is 0.
  
  Attributes
  ----------
  duration : float
      The duration of the simulation in seconds.
  n_times : int
      The number of time samples of the simulation.
class_docstr_tok: ["Class","to","generate","simulated","Source","Estimates",".","Parameters","--","--","--","--","--","src",":","instance","of","SourceSpaces","Source","space",".","tstep",":","float","Time","step","between","successive","samples","in","data",".","Default","is","0.001","s.","duration",":","float","|","None","Time","interval","during","which","the","simulation","takes","place","in","seconds",".","If","None",",","it","is","computed","using","existing","events","and","waveform","lengths",".","first_samp",":","int","First","sample","from","which","the","simulation","takes","place",",","as","an","integer",".","Comparable","to","the",":","term",":","`","first_samp","`","property","of","`","~mne.io.Raw","`","objects",".","Default","is","0",".","Attributes","--","--","--","--","--","duration",":","float","The","duration","of","the","simulation","in","seconds",".","n_times",":","int","The","number","of","time","samples","of","the","simulation","."]
docstr: Iterate over 1 second STCs.
docstr_tok: ["Iterate","over","1","second","STCs","."]
code: def __iter__(self):
      """Iterate over 1 second STCs."""
      # Arbitrary chunk size, can be modified later to something else.
      # Loop over chunks of 1 second - or, maximum sample size.
      # Can be modified to a different value.
      last_sample = self.last_samp
      for start_sample in range(
          self.first_samp, last_sample + 1, self._chk_duration
      ):
          stop_sample = min(
              start_sample + self._chk_duration - 1, last_sample
          )
          yield (
              self.get_stc(start_sample, stop_sample),
              self.get_stim_channel(start_sample, stop_sample),
          )
  
file_path: mne-python/mne/simulation/source.py
imports: import numpy
  from ..fixes import rng_uniform
  from ..label import Label
  from ..source_estimate import SourceEstimate, VolSourceEstimate
  from ..source_space._source_space import _ensure_src
  from ..surface import _compute_nearest
  from ..utils import _check_option, _ensure_events, _ensure_int, check_random_state, fill_doc, warn
label_desc: Use image node_id 8 for calling the SourceSimulator obj's underlying member method code with example usage: obj.__iter__() without return types