simulate(fastmodel,
start_states,
add_baseline,
use_Peq,
v_signal,
sampling,
stimulus_of_seg,
Nsample_of_seg,
samples_of_seg,
on_pct=<__builtin__.function object>,
force_Q=False)
| source code
|
Returns independent segments of simulated HMM, as sampled data and as
state-idealization.
- Parameters:
fastmodel - qubx.fast.Model
start_states - numpy.array[Nchannel], type int32, of entry state indices, or -1
to pick fresh. On output, contains exit states for sequential
simulations.
add_baseline - False to skip base amp and std, for adding multi channels
v_signal - if nonzero, multiply exc_amp and exc_std by (stimulus[v] - vRev)
* 1e-3 (in volts)
sampling - interval between samples, in seconds
stimulus_of_seg - list[Nseg][Nsignal] of stimulus values or sample arrays. Nsignal
> all x in union(L, V). Since 0 indicates 'no stimulus,'
stimulus[0] is ignored. Entries should be either a constant
(float) or a list or array[nsample] containing a stimulus
waveform.
nsample - list[Nseg] of number of data points to return
samples_of_seg - list[Nseg] of array[Nsample_of_seg[i]] of float32, will be filled
with output
on_pct - callback function on_pct(frac), 0 <= frac <= 1. Return
nonzero to stop the simulation.
force_Q - uses Q matrix method (instead of A matrix) even if it would be
slower
- Returns:
- (states as numpy.array[Nevent] of int32, counts as
numpy.array[Nevent] of int32, amp, std as numpy.array[Nevent] of
float64)
|