{ "nbformat_minor": 0, "nbformat": 4, "cells": [ { "execution_count": null, "cell_type": "code", "source": [ "%matplotlib inline" ], "outputs": [], "metadata": { "collapsed": false } }, { "source": [ "\n# Visualize subject head movement\n\n\nShow how subjects move as a function of time.\n\n" ], "cell_type": "markdown", "metadata": {} }, { "execution_count": null, "cell_type": "code", "source": [ "# Authors: Eric Larson \n#\n# License: BSD (3-clause)\n\nfrom os import path as op\n\nimport mne\n\nprint(__doc__)\n\ndata_path = op.join(mne.datasets.testing.data_path(verbose=True), 'SSS')\n\npos = mne.chpi.read_head_pos(op.join(data_path, 'test_move_anon_raw.pos'))" ], "outputs": [], "metadata": { "collapsed": false } }, { "source": [ "Visualize the subject head movements as traces:\n\n" ], "cell_type": "markdown", "metadata": {} }, { "execution_count": null, "cell_type": "code", "source": [ "mne.viz.plot_head_positions(pos, mode='traces')" ], "outputs": [], "metadata": { "collapsed": false } }, { "source": [ "Or we can visualize them as a continuous field (with the vectors pointing\nin the head-upward direction):\n\n" ], "cell_type": "markdown", "metadata": {} }, { "execution_count": null, "cell_type": "code", "source": [ "mne.viz.plot_head_positions(pos, mode='field')" ], "outputs": [], "metadata": { "collapsed": false } } ], "metadata": { "kernelspec": { "display_name": "Python 2", "name": "python2", "language": "python" }, "language_info": { "mimetype": "text/x-python", "nbconvert_exporter": "python", "name": "python", "file_extension": ".py", "version": "2.7.13", "pygments_lexer": "ipython2", "codemirror_mode": { "version": 2, "name": "ipython" } } } }