neurodsp.sim.signals.Simulations¶
- class neurodsp.sim.signals.Simulations(signals=None, params=None, function=None)[source]¶
Data object for a set of simulated signals.
- Parameters:
- signals1d or 2nd array or int, optional
If array, the simulated signals, organized as [n_sims, sig_length]. If int, the number of expected simulations, used to pre-initialize array.
- paramsdict, optional
The simulation parameters that were used to create the simulations.
- functionstr or callable, optional
The simulation function that was used to create the simulations. If callable, the name of the function is taken to be added to the object.
Notes
This object stores a set of simulations generated from a shared parameter definition.
Methods
__init__
([signals, params, function])Initialize Simulations object.
add_params
(params)Add parameter definition to object.
add_signal
(signal[, index])Add a signal to the current object.
Attributes
Alias fs as a property attribute from base parameters.
Indicator for if the object has parameters.
Indicator for if the object has signals.
Alias n_seconds as a property attribute from base parameters.
Define the full set of simulation parameters (base + additional parameters).
- add_params(params)[source]¶
Add parameter definition to object.
- Parameters:
- paramsdict or None
The simulation parameter definition(s).
- add_signal(signal, index=None)[source]¶
Add a signal to the current object.
- Parameters:
- signal1d array
A simulated signal to add to the object.
- indexint
Index to insert the new signal in the signals attribute.
- property fs¶
Alias fs as a property attribute from base parameters.
- property has_params¶
Indicator for if the object has parameters.
- property has_signals¶
Indicator for if the object has signals.
- property n_seconds¶
Alias n_seconds as a property attribute from base parameters.
- property params¶
Define the full set of simulation parameters (base + additional parameters).