Skip to content

Instantly share code, notes, and snippets.

View wronk's full-sized avatar

Mark Wronkiewicz wronk

  • Southern California
View GitHub Profile
@wronk
wronk / epochsToNpy.py
Created October 28, 2015 22:09
Convert epochs to stc and save as array for use in Blender.
"""
epochsToStc
@author:wronk
Convert epochs to stc and save as array for use in Blender.
"""
import mne
import numpy as np
@wronk
wronk / plyfun.py
Created October 28, 2015 22:00
Sample python code to convert a surface into .ply file for use in Blender or other 3D CAD programs.
"""
plyfun
@author:wronk
Write surface to a .ply (Stanford 3D mesh file) in a way that preserves
vertex order in the MNE sense. Extendable for colors or other vertex/face properties.
.ply format: https://en.wikipedia.org/wiki/PLY_(file_format)
"""
@wronk
wronk / postUpdate_TODO_missingEEGReference.html
Created September 10, 2013 22:46
Difference in fif read/write output before and after PR #753
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0021)file:///tmp/tmpnc7vEt -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title></title>
<style type="text/css">
table.diff {font-family:Courier; border:medium;}
.diff_header {background-color:#e0e0e0}
td.diff_header {text-align:right}
.diff_next {background-color:#c0c0c0}
#Generate an inverse solution via python
import mne
import os
fwdName = "fwd.fif"
rawName = "raw.fif"
covName = "noiseCov.fif"
fSaveInv = os.path.join(os.getcwd(), "invPython.fif")