wonambi.ioeeg.abf module

Class to import ABF2. Adapted from axonrawio.py in python-neo. Strongly simplified.

class wonambi.ioeeg.abf.Abf(filename)[source]

Bases: object

Class to read abf file. Only for ABF2, when the data has no gaps (no episodes).

Parameters:

filename (path to file) – the name of the filename with extension .won

return_dat(chan, begsam, endsam)[source]

Return the data as 2D numpy.ndarray.

Parameters:
  • chan (int or list) – index (indices) of the channels to read

  • begsam (int) – index of the first sample

  • endsam (int) – index of the last sample

Returns:

numpy.ndarray – A 2d matrix, with dimension chan X samples. To save memory, the data are memory-mapped, and you cannot change the values on disk.

Notes

When asking for an interval outside the data boundaries, it returns NaN for those values.

return_hdr()[source]

Return the header for further use.

Returns:

  • subj_id (str) – subject identification code

  • start_time (datetime) – start time of the dataset

  • s_freq (float) – sampling frequency

  • chan_name (list of str) – list of all the channels

  • n_samples (int) – number of samples in the dataset

  • orig (dict) – the full header

return_markers()[source]

I don’t know if the ABF contains markers at all.