Element

class undaqTools.Element

Container to hold NADS DAQ cell data

Methods

static __new__(data, frames[, **kwds])

Create a new Element instance.

Parameters :

data : array_like

shape should be (numvalues X number of samples)

frames : array_like

shape should be (number of samples,)

rate : int, optional

specifies whether measure is CSSDC

name : string, optional

specifies the name of the cell

dtype : string or numpy type, optional

type of data

varrateflag : int, optional

specifies whether data is collected at a variable rate

elemid : int, optional

specifies index in _header dict. Important in the MATLAB toolkit ndaqTools. Not so important here.

units : string

should probably be a list cooresponding to the rows or a string depending on the cell

order : string

specifies the column order. Needed to write the mat files. Shouldn’t be important to most end users.

See also

fslice
FrameSlice factory for slicing Element by frames
findex
FrameIndex factory for indexing Element by a frame
__getitem__(indx)

Return the item described by indx, as an Element

elem.__getitem__(indx) <==> elem[indx]

Parameters :

indx : None, int, slice, tuple

first arg of tuple must be None, int, or slice object. second arg can also be a FrameSlice or FrameIndex instance

Returns :

view : Element or possibly float

the requested data

when Element is a CSSDC measure and a FrameIndex is supplied:

If frame is not defined it returns the last defined state. If shape of the state is (1,1) the state is returned as a scalar. If frame < elem.frames[0] then nan is returned.

toarray(ndmin=1, order=None)

cast data to plain old numpy array

Parameters :

ndmin : int

the minimum dimension of the resulting array

order : None or string

the column order of the resulting array

Returns :

x : np.ndarray

the Element data as a numpy array

isCSSDC()

evaluates whether element is a CSSDC measure

Returns :

answer : bool

True if it is a CSSDC measure, False otherwise

Previous topic

Daq

Next topic

fslice

This Page