Package: neurone-tools
pyneurone_toolsA simple python library to read Bittium NeurOne Tesla EEG system binary dataFunction overviewBasic Usagefrompyneurone_toolsimportneurone_toolsfrompathlibimportPathsession_path=Path('./exciting_project/exciting_data/2022-01-03T090018')recording_id=1nt=neurone_tools(session_path,recording_id,channels='all')loading datadata,channel_names=nt.load_data()The data has the shape (samples, channels), unit is nanovolt.loading eventsevents=nt.load_events()Evens are returned as a pandas DataFrame.The columns are:revision: Event marker revision numbertype: Type of event markersource_port: Source port numberchannel_number: Channel used for event marking8bit_trigger_code: The 8-bit TTL trigger code if the marker has one, otherwise Nonestart_sample_index: sample point where trigger occuredstop_sample_index: sample point where trigger endeddescription_length: length of event comment (string in recording system)description_offset: offset of event comment (string in recording system)data_length: length of additional data of event (any binary data)data_offset: offset of additional data of event (any binary data)source_port_name: name of the channel from channel_numberdescription: name of the event marker typesampling ratefsample=nt.get_sampling_rate()loading channel nameschannel_names=nt.channels_availloading alternating current (AC) mode flagsac_mode=nt.get_ac_mode()loading filter parametersfilter_settings=nt.get_filter_settings()TerminologyThe following terms are used in this packageSessionA session is the top-level term, think of it as the folder containing all the other files.It is started when you click 'Start' in the recording software and can be made up from several recordings.RecordingA recording is what you get when you press the 'Record' button and ends when you click the 'Stop Recording' button.Recording ID numbers are 1-indexed, as defined by the recording software.Binary FileA Recording can be split into several Binary files, as one can be specified in the NeurOne recording software.
Binary file IDs are 1-indexed, as this is given by the recording software.It is unikely that the user would ever need to access these files directly.InstallationSupported Python VersionsThis code is tested on python versions 3.7, 3.8, 3.9, and 3.10.Earlier versions could be usable, but need an older version of pandas.Using pippip install neurone_toolspip directly from githubpipinstallgit+https://github.com/jkschluesener/pyneurone_tools.git@masterpip without PyPicd <your_preferred_code_folder>git clone https://github.com/jkschluesener/pyneurone_tools.gitpip install ./pyneurone_tools/Development modeLink this repo's folder into your current python with the-e(external) flag.cd <your_preferred_code_folder>git clone https://github.com/jkschluesener/pyneurone_tools.gitpip install -e ./pyneurone_tools/or use ssh if you prefercd <your_preferred_code_folder>git clone git@github.com:jkschluesener/pyneurone_tools.gitpip install -e pyneurone_toolsChanges to this directory will be available without reinstall.Upon local changes of the code, you may have to re-import this package or maybe restart your python kernel.Adding functionalityIs there a funcitonality you would like to see in this package?Just open an Issue for us / me to discuss and implement it.LicenseThis code is GPLv3 licensed.Layout of the binary files was taken from the official NeurOne manual.This code is also in parts derived from the original Bittium / Mega Electronics Ltd matlab toolbox (official/mirror) to map integer ID codes to their string counterparts.