Cheat Sheet
Open mkpy.mkh5 .h5 file for read/write
mkh5()
establish a read/write connection to the
.h5
database file for subsequent operations
Load .crw/.log into a mkpy .h5 file
create_mkdata()
start a new data group with
.crw
,.log
and.yhdr
extended header YAML data, e.g., single subject, single session EEG recordings.append_mkdata()
append
.crw
,.log
to an existing data group, e.g., to add separate calibration pulse .crw/.log files or combine split-session recordings.
Align EEG recordings with other experimental variables
- YAML header files: .yhdr
Extend the recorded EEG header with arbitrary data (JSON key: value), e.g., individual subject, session, attributes.
- Event codemap files: .xlsx, .ytbl, .txt
Tag recorded event codes with arbitrary variables based on event code sequence patterns, e.g., single trial item attributes.
- YAML header data extractors: .yhdx
extract key:value from the HDF5 dblock headers as column:values in the event data table
get_event_table()
look up and tag single-trial event codes and event code sequences with imported experimental variables in a data table format.
set_epochs()
write the single-trial tagged EEG epoch lookup table to the
mkh5
file
Exporting EEG and event data for analysis
export_event_table()
write out tabular event data in tab-separated text (
.txt
) or feather binary data interchange format (.fthr
).export_epochs_table()
write out tabular epochs data in tab-separated text (
.txt
) or feather binary data interchange format (.fthr
).export_epochs()
write out single trial EEGdata epochs defined by the epochs data table as 1-D vectors of compound data types in HDF5 (
.h5
) or withpandas.DataFrame
writers to HDF5 (.pdh5
), feather (.fthr
) binary data interchange formats or as tab-separated text (.txt
)
Data inspection and visualization
plotcals()
butterfly plot the single trial cal pulses that will be used to scale
.crw
A/D values to microvolts given the parameters
headinfo()
report contents of datablock headers in the
.h5
database, optionally filtered by regular expression pattern matchinfo()
report contents of datablock headers and snippets of data for all of the datablocks, c.f., HDF5 utility h5ls -rds
calibrate_mkdata()
scale
.crw
A/D digtized EEG to microvolts