|
@@ -0,0 +1,80 @@
|
|
|
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
|
+<html><head><title>Python: module mnetonix</title>
|
|
|
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
+</head><body bgcolor="#f0f0f8">
|
|
|
+
|
|
|
+<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
|
|
+<tr bgcolor="#7799ee">
|
|
|
+<td valign=bottom> <br>
|
|
|
+<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>mnetonix</strong></big></big></font></td
|
|
|
+><td align=right valign=bottom
|
|
|
+><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/Users/achilleas/code/pilsen-workshop/DataConversionToNIX/mnetonix.py">/Users/achilleas/code/pilsen-workshop/DataConversionToNIX/mnetonix.py</a></font></td></tr></table>
|
|
|
+ <p><tt>mnetonix.py<br>
|
|
|
+ <br>
|
|
|
+Usage:<br>
|
|
|
+python mnetonix.py <datafile> <montage><br>
|
|
|
+ <br>
|
|
|
+- datafile: Either an EDF file or a BrainVision header file (vhdr).<br>
|
|
|
+- montage: Any format montage file supported by MNE.<br>
|
|
|
+ <br>
|
|
|
+(Requires Python 3)<br>
|
|
|
+ <br>
|
|
|
+Command line script for reading EDF and BrainVision files using MNE<br>
|
|
|
+(mne-python) and storing the data and metadata into a NIX file. Supports<br>
|
|
|
+reading montage files for recording channel locations.<br>
|
|
|
+ <br>
|
|
|
+NIX Format layout:<br>
|
|
|
+ <br>
|
|
|
+Data:<br>
|
|
|
+Raw Data are stored in either a single 2-dimensional DataArray or a collection<br>
|
|
|
+of DataArrays (one per recording channel). The latter makes tagging easier<br>
|
|
|
+since MultiTag positions and extents don't need to specify every channel they<br>
|
|
|
+reference. However, creating multiple DataArrays makes file sizes much<br>
|
|
|
+bigger.<br>
|
|
|
+ <br>
|
|
|
+Stimuli:<br>
|
|
|
+MNE provides stimulus information through the Raw.annotations dictionary.<br>
|
|
|
+Onsets correspond to the 'positions' array and durations correspond to the<br>
|
|
|
+'extents' array of the "Stimuli" MultiTag.<br>
|
|
|
+ <br>
|
|
|
+Metadata:<br>
|
|
|
+MNE collects metadata into a (nested) dictionary (Raw.info). All non-empty<br>
|
|
|
+keys are converted into Properties in NIX. The nested structure of the<br>
|
|
|
+dictionary is replicated in NIX by creating child Sections, starting with one<br>
|
|
|
+root section with name "Info".</tt></p>
|
|
|
+<p>
|
|
|
+<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
|
+<tr bgcolor="#aa55cc">
|
|
|
+<td colspan=3 valign=bottom> <br>
|
|
|
+<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
|
|
+
|
|
|
+<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
|
|
+<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="mne.html">mne</a><br>
|
|
|
+<a href="nixio.html">nixio</a><br>
|
|
|
+</td><td width="25%" valign=top><a href="numpy.html">numpy</a><br>
|
|
|
+<a href="os.html">os</a><br>
|
|
|
+</td><td width="25%" valign=top><a href="matplotlib.pyplot.html">matplotlib.pyplot</a><br>
|
|
|
+<a href="sys.html">sys</a><br>
|
|
|
+</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
|
|
|
+<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
|
+<tr bgcolor="#eeaa77">
|
|
|
+<td colspan=3 valign=bottom> <br>
|
|
|
+<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
|
|
+
|
|
|
+<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
|
|
+<td width="100%"><dl><dt><a name="-create_md_tree"><strong>create_md_tree</strong></a>(section, values)</dt></dl>
|
|
|
+ <dl><dt><a name="-main"><strong>main</strong></a>()</dt></dl>
|
|
|
+ <dl><dt><a name="-plot_channel"><strong>plot_channel</strong></a>(data_array, index)</dt></dl>
|
|
|
+ <dl><dt><a name="-write_multi_da"><strong>write_multi_da</strong></a>(mneraw, block)</dt></dl>
|
|
|
+ <dl><dt><a name="-write_raw_mne"><strong>write_raw_mne</strong></a>(nfname, mneraw, split_data_channels=True)</dt></dl>
|
|
|
+ <dl><dt><a name="-write_single_da"><strong>write_single_da</strong></a>(mneraw, block)</dt></dl>
|
|
|
+ <dl><dt><a name="-write_stim_tags"><strong>write_stim_tags</strong></a>(mneraw, block)</dt></dl>
|
|
|
+</td></tr></table><p>
|
|
|
+<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
|
+<tr bgcolor="#55aa55">
|
|
|
+<td colspan=3 valign=bottom> <br>
|
|
|
+<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
|
|
+
|
|
|
+<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
|
|
+<td width="100%"><strong>RAW_DATA_TYPE</strong> = 'Raw Data'</td></tr></table>
|
|
|
+</body></html>
|