mkpy.mkio module
Module mkio.py minor tweak of NJS dig format reader and (avg) writer
Code has four main sections/functions
Setup
Helper functions
Readers
Writers
- mkpy.mkio.load(f_raw, f_log, dtype=<class 'numpy.float64'>, delete_channels=[], calibrate=True, **kwargs)[source]
- mkpy.mkio.read_log(fo)[source]
generator reads kutaslab binary log, returns (code, tick, condition, flag)
- Parameters
fo (file object)
flags values – # avg -x sets 0 = OK, 20 = artifact, 40 = polinv, 60 = polinv + artifact # cdbl -op also sets flags according to the bdf # 100 = data error (rare)
- mkpy.mkio.read_raw(stream, dtype)[source]
parses bytestream of from kutaslab eeg file into usable data
- Returns
np.array(record_counts, dtype=np.int16), final_data, info)
- Return type
(channel_names, np.array(all_codes, dtype=np.int16),
all_codes – a vector of event codes and record indices from the mark track final_data – a np.array: samples (rows) x eeg channels (columns)