src.utils.cnt_reader.libeep package

Module contents

class src.utils.cnt_reader.libeep.cnt_file(fname: str)[source]

Bases: object

A cnt-file already stored on your harddrive

Parameters:fname (str) – the path to the filename
close()[source]

close and release the file

get_channel_count() → int[source]

get the number of channels stored in the file

get_channel_info(index: int) → Tuple[str, str, str][source]

get information about a specific channel

Parameters:index (int) – the index number for the channel
Returns:the information where tuples contains three strings: channel label, channel reference and unit, i,e,: (‘Cz’, ‘ref’, ‘uV’)
Return type:Tuple[str, str, str]
get_sample_count()[source]

returns the number of samples in the file as int

get_sample_frequency() → int[source]

returns the sample frequency of the data as int

get_samples(fro: int, to: int) → List[List[float]][source]

load a range of samples from the file

Parameters:
  • fro (int) – the first sample to load
  • to (int) – the last sample to load
Returns:

data – a list with length samples containing a list of values for each channel

Return type:

List[List[float]]

Example

data = cnt.get_samples(0,1) # return the first sample for all channels

get_trigger(index: int) → Tuple[str, int, int, Any, Any, Any][source]

get information for a specific trigger

Parameters:
  • index (int) – the index number of the trigger of interest
  • returns
  • info (Tuple[str, int, int, Any, Any, Any]) – information about this trigger in tehe following format (markertype, sample_index, markervalue, Any, Any, Any)
get_trigger_count() → int[source]

return the number of triggers in the file as int

open()[source]

open the file for queries

class src.utils.cnt_reader.libeep.cnt_out(fname: str, rate: int, channels: List[str], rf64=0)[source]

Bases: src.utils.cnt_reader.libeep.cnt_file

add_samples(samples)[source]
add_trigger(sample: int, marker: str)[source]
src.utils.cnt_reader.libeep.main()[source]
src.utils.cnt_reader.libeep.peek(filename)[source]