pylablib.core package¶
Subpackages¶
- pylablib.core.dataproc package
- Submodules
- pylablib.core.dataproc.callable module
- pylablib.core.dataproc.feature module
- pylablib.core.dataproc.filters module
- pylablib.core.dataproc.fitting module
- pylablib.core.dataproc.fourier module
- pylablib.core.dataproc.iir_transform module
- pylablib.core.dataproc.image module
- pylablib.core.dataproc.interpolate module
- pylablib.core.dataproc.specfunc module
- pylablib.core.dataproc.waveforms module
- Module contents
- pylablib.core.datatable package
- pylablib.core.devio package
- pylablib.core.fileio package
- Submodules
- pylablib.core.fileio.binio module
- pylablib.core.fileio.datafile module
- pylablib.core.fileio.dict_entry module
- pylablib.core.fileio.loadfile module
- pylablib.core.fileio.location module
- pylablib.core.fileio.logfile module
- pylablib.core.fileio.parse_csv module
- pylablib.core.fileio.savefile module
- Module contents
- pylablib.core.gui package
- pylablib.core.mthread package
- Submodules
- pylablib.core.mthread.controller module
- pylablib.core.mthread.message module
- pylablib.core.mthread.message_queue module
- pylablib.core.mthread.notifier module
- pylablib.core.mthread.sync_primitives module
- pylablib.core.mthread.tag_queue module
- pylablib.core.mthread.threadprop module
- Module contents
- pylablib.core.utils package
- Submodules
- pylablib.core.utils.ctypes_wrap module
- pylablib.core.utils.dictionary module
- pylablib.core.utils.files module
- pylablib.core.utils.funcargparse module
- pylablib.core.utils.functions module
- pylablib.core.utils.general module
- pylablib.core.utils.ipc module
- pylablib.core.utils.iterator module
- pylablib.core.utils.library_parameters module
- pylablib.core.utils.log module
- pylablib.core.utils.module module
- pylablib.core.utils.net module
- pylablib.core.utils.numclass module
- pylablib.core.utils.numerical module
- pylablib.core.utils.observer_pool module
- pylablib.core.utils.plotting module
- pylablib.core.utils.pstorage module
- pylablib.core.utils.py3 module
- pylablib.core.utils.rpyc module
- pylablib.core.utils.serializable module
- pylablib.core.utils.strdump module
- pylablib.core.utils.string module
- pylablib.core.utils.strpack module
- pylablib.core.utils.thread module
- pylablib.core.utils.versioning module
- Module contents
Submodules¶
pylablib.core.version module¶
Current version and function that defines compatibility with previous version. To be changed in future packages.
Module contents¶
-
pylablib.core.
cut_out_regions
(wf, regions, x_column=None, ordered=False, multi_pass=True)¶ Cut the regions out of the wf based on x_column.
x_column is used to determine which colmn’s values to use to check if the point is in range (see
waveforms.get_x_column()
). Ifordered_x==True
, then the function assumes that x_column in ascending order. Ifmulti_pass==False
, combine all indices before deleting the data in a single operation (works faster, but only for non-intersecting regions).
-
pylablib.core.
cut_to_range
(wf, xs_range, x_column=None, ordered=False)¶ Cut the waveform to the given range based on x_column.
The range is defined as
xs_range[0]:xs_range[1]
, or infinite ifxs_range=None
. x_column is used to determine which colmn’s values to use to check if the point is in range (seewaveforms.get_x_column()
). Ifordered_x==True
, then the function assumes that x_column in ascending order.
-
pylablib.core.
decimate
(wf, n=1, dec_mode='skip', axis=0, mode='drop')¶ Decimate the data.
Parameters: - wf – Data.
- n (int) – Decimation factor.
- dec_mode (str) – Decimation mode. Can be
-
'skip'
- just leave every n’th point while completely omitting everything else; -'bin'
or'mean'
- do a binning average; -'sum'
- sum points; -'min'
- leave min point; -'max'
- leave max point; -'median'
- leave median point (works as a median filter). - axis (int) – Axis along which to perform the decimation.
- mode (str) – Determines what to do with the last bin if it’s incomplete. Can be either
'drop'
(omit the last bin) or'leave'
(keep it).
-
pylablib.core.
get_x_column
(wf, x_column=None, idx_default=False)¶ Get x column of the waveform.
- x_column can be
- an array: return as is;
'#'
: return index array;None
: equivalent to ‘#’ for 1D data ifidx_default==False
, or to0
otherwise;- integer: return the column with this index.
-
pylablib.core.
is_ascending
(wf)¶ Check the if waveform is ascending.
If it has more than 1 dimension, check all lines along 0’th axis.
-
pylablib.core.
is_descending
(wf)¶ Check if the waveform is descending.
If it has more than 1 dimension, check all lines along 0’th axis.
-
pylablib.core.
is_linear
(wf)¶ Check if the waveform is linear (values go with a constant step).
If it has more than 1 dimension, check all lines along 0’th axis (with the same step for all).
-
pylablib.core.
setbp
()¶
-
pylablib.core.
sliding_filter
(wf, n=1, dec_mode='bin', mode='reflect', cval=0.0)¶ Perform sliding filtering on the data.
Parameters: - wf – 1D array-like object.
- n (int) – bin width.
- dec_mode (str) –
- Decimation mode. Can be
'bin'
or'mean'
- do a binning average;'sum'
- sum points;'min'
- leave min point;'max'
- leave max point;'median'
- leave median point (works as a median filter).
- mode (str) – Expansion mode. Can be
'constant'
(added values are determined by cval),'nearest'
(added values are endvalues of the waveform),'reflect'
(reflect waveform wrt its endpoint) or'wrap'
(wrap the values from the other size). - cval (float) – If
mode=='constant'
, determines the expanded values.