fooof.sim.params.param_iter

fooof.sim.params.param_iter(params)[source]

Create a generator to iterate across parameter ranges.

Parameters
paramslist of floats and Stepper

Parameters over which to iterate, including a Stepper object. The Stepper defines the iterated parameter and its range. Floats define the other parameters, that will be held constant.

Yields
list of floats

Next generated list of parameters.

Raises
ValueError

If the number of Stepper objects given is greater than one.

Examples

Iterate across exponent values from 1 to 2, in steps of 0.1:

>>> aps = param_iter([Stepper(1, 2, 0.1), 1])

Iterate over center frequency values from 8 to 12 in increments of 0.25:

>>> peaks = param_iter([Stepper(8, 12, .25), 0.5, 1])

Examples using fooof.sim.params.param_iter