reconstruction

multiprocess_stimulus_reconstruction(...)
multiprocess_stimulus_reconstruction_realtime(...)
reconstruct_stimulus(metaData, stimData, ...)
reconstruct_stimulus_realtime(voxels, ...[, ...])
reconstruct_stimulus_realtime_smoothing(...)

Process

class popeye.reconstruction.Process(group=None, target=None, name=None, args=(), kwargs={})

Bases: object

Process objects represent activity that is run in a separate process

The class is analagous to threading.Thread

__init__(group=None, target=None, name=None, args=(), kwargs={})
authkey
daemon

Return whether process is a daemon

exitcode

Return exit code of process or None if it has yet to stop

ident

Return identifier (PID) of process or None if it has yet to start

is_alive()

Return whether process is alive

join(timeout=None)

Wait until child process terminates

name
pid

Return identifier (PID) of process or None if it has yet to start

run()

Method to be run in sub-process; can be overridden in sub-class

start()

Start child process

terminate()

Terminate process; sends SIGTERM signal or uses TerminateProcess()

interp1d

class popeye.reconstruction.interp1d(x, y, kind='linear', axis=-1, copy=True, bounds_error=True, fill_value=nan)

Bases: scipy.interpolate.polyint._Interpolator1D

interp1d(x, y, kind=’linear’, axis=-1, copy=True, bounds_error=True,
fill_value=np.nan)

Interpolate a 1-D function.

x and y are arrays of values used to approximate some function f: y = f(x). This class returns a function whose call method uses interpolation to find the value of new points.

x : (N,) array_like
A 1-D array of monotonically increasing real values.
y : (...,N,...) array_like
A N-D array of real values. The length of y along the interpolation axis must be equal to the length of x.
kind : str or int, optional
Specifies the kind of interpolation as a string (‘linear’,’nearest’, ‘zero’, ‘slinear’, ‘quadratic, ‘cubic’) or as an integer specifying the order of the spline interpolator to use. Default is ‘linear’.
axis : int, optional
Specifies the axis of y along which to interpolate. Interpolation defaults to the last axis of y.
copy : bool, optional
If True, the class makes internal copies of x and y. If False, references to x and y are used. The default is to copy.
bounds_error : bool, optional
If True, a ValueError is raised any time interpolation is attempted on a value outside of the range of x (where extrapolation is necessary). If False, out of bounds values are assigned fill_value. By default, an error is raised.
fill_value : float, optional
If provided, then this value will be used to fill in for requested points outside of the data range. If not provided, then the default is NaN.

UnivariateSpline : A more recent wrapper of the FITPACK routines. splrep, splev

Spline interpolation based on FITPACK.

interp2d

>>> from scipy import interpolate
>>> x = np.arange(0, 10)
>>> y = np.exp(-x/3.0)
>>> f = interpolate.interp1d(x, y)
>>> xnew = np.arange(0,9, 0.1)
>>> ynew = f(xnew)   # use interpolation function returned by `interp1d`
>>> plt.plot(x, y, 'o', xnew, ynew, '-')
>>> plt.show()
__init__(x, y, kind='linear', axis=-1, copy=True, bounds_error=True, fill_value=nan)

Initialize a 1D linear interpolation class.

Array

popeye.reconstruction.Array(typecode_or_type, size_or_initializer, **kwds)

Returns a synchronized shared array

Queue

popeye.reconstruction.Queue(maxsize=0)

Returns a queue object

multiprocess_stimulus_reconstruction

popeye.reconstruction.multiprocess_stimulus_reconstruction(stimData, funcData, metaData)

multiprocess_stimulus_reconstruction_realtime

popeye.reconstruction.multiprocess_stimulus_reconstruction_realtime(stimData, funcData, metaData, pRF, tr)

reconstruct_stimulus

popeye.reconstruction.reconstruct_stimulus(metaData, stimData, funcData, verbose=True)

reconstruct_stimulus_realtime

popeye.reconstruction.reconstruct_stimulus_realtime(voxels, stimData, funcData, pRFs, verbose=True)

reconstruct_stimulus_realtime_smoothing

popeye.reconstruction.reconstruct_stimulus_realtime_smoothing(voxels, stimData, funcData, pRFs, verbose=True)