class to represent a NADS DAQ file
Attributes
info | Info namedtuple | contains information from info block of DAQ |
frame | Frame recordtype | contains information relevent to each frame |
elemlist | None or list | None –> load all elements, list of wildcards |
f0 | int | first frame contained in Daq instance |
fend | int | last frame contained in Daq instance |
cursor | int | starting byte of data in DAQ |
dynobjs | dict | dictionary of dynamic objects |
etc | dict | dictionary for end-user to store analysis relevent info |
Methods
load_elemlist_fromfile(filename) | load elemlist wildcards from plaintext file |
read_daq(filename[, elemlist=None][, loaddata=True][, process_dynobjs=True]) | Reads a .daq file into object |
read_hd5(filename[, f0=None][, fend=None]) | writes Daq object to HDF5 container |
write_mat([filename=None][, outpath=None]) | writes Daq object to .mat file using scipy.io.savmat |
plot_ts(elem_pars[, xindx=None) | time series specified by elem_pars |
plot_dynobjs(dynobj_wc=’*’) | make top-down plot of dynamic object paths |
match_keys(wc) | list of keys (element names) that match wc |
keys_summary(wclist=None) | prints table summary of Elements matching wclist |
Reads a .daq file into object
read <==> read_daq
Parameters : | filename : string
elemlist : None or list_like
loaddata : bool
process_dynobjs : bool
write_hd5(filename=None) :
|
---|
writes Daq object to HDF5 container
f0 and fend specify frame range to read. Will export daq.dynobjs to HDF5 container
Parameters : | filename : string
f0 : None or int
fend : None or int
|
---|
writes Daq object to HDF5 container
Parameters : | filename : None or string (optional)
|
---|
writes Daq object to .mat file using scipy.io.savmat
daq.dynobjs is not exported
This is intended to make convert_daq backwards compatible. pydaqTools users should use write_hdf5. The .mat files cannot be used to instantiate Daq objects.
Parameters : | filename : None or string (optional)
outpath : None or string (optional)
|
---|
load elemlist wildcards from plaintext file.
assumes one wildcard per line
Parameters : | filename : string
|
---|
Returns a list of keys (element names) that match the Unix-style wildcard.
Parameters : | wc : string
|
---|---|
Returns : | matches : list
|
Notes
keys and wc both case normalized
Patterns are Unix shell style:
* matches everything
? matches any single character
[seq] matches any character in seq
[!seq] matches any char not in seq
Returns a time series figure containing elements specified by elem_pars
CSSDC measures yield step plots.
Parameters : | elem_pars : list of tuples
xindx : None, slice object, FrameSlice object
|
---|---|
Returns : | fig : matplotlib.figure.Figure
|
make top-down plot of dynamic object paths
Parameters : | dynobj_wc : string
|
---|---|
Returns : | fig : matplotlib.figure.Figure
|