Skip to content

Instantly share code, notes, and snippets.

Michael Waskom mwaskom

Block or report user

Report or block mwaskom

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mwaskom
mwaskom / pysurfer_setup.md
Last active Sep 6, 2019
PySurfer on a headless linux server
View pysurfer_setup.md

Get pysurfer running on a headless server

There have been some issues lately getting PySurfer set up and running. Here is how I recently got things set up on our server.

1. Install PySurfer

I am pretty sure that the anaconda build of mayavi is broken, but I have had success installing everything with pip (go figure). To demonstrate, I am going to install everything into a fresh conda enviornment.

conda create -n setup_pysurfer python=3.7 pip
@mwaskom
mwaskom / lmplot_lapse.ipynb
Last active Mar 13, 2019
Use a custom psychometric function (e.g. nonzero lapse) with seaborn lmplot
View lmplot_lapse.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mwaskom
mwaskom / cshl.py
Created Jul 22, 2018
Library for CSHL course project
View cshl.py
import numpy as np
from numpy.fft import fft, ifft, fftshift
from scipy.stats import norm, multivariate_normal
from scipy.signal import convolve2d
from scipy.ndimage import gaussian_filter
from scipy.interpolate import NearestNDInterpolator
import matplotlib.pyplot as plt
import nibabel as nib
from surfer import Brain
from mayavi import mlab
@mwaskom
mwaskom / palettes.png
Last active Feb 15, 2019
Show all seaborn palettes and simulate what they look like with various color vision deficiencies. (The 10-element seaborn palettes will be part of the forthcoming 0.9 release).
@mwaskom
mwaskom / basic_tutorial.ipynb
Last active Feb 15, 2019
Copy of the new seaborn basic plots tutorial showing new functionality for forthcoming v0.9
View basic_tutorial.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mwaskom
mwaskom / dots_dataset.ipynb
Created Oct 22, 2017
Convert Roitman Shadlen LIP dataset from messy .mat to tidy .csv
View dots_dataset.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mwaskom
mwaskom / wireframe_surface.ipynb
Created Oct 20, 2017
Use mayavi actor attributes to show the wireframe representation of the surface mesh
View wireframe_surface.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mwaskom
mwaskom / imports.py
Last active Jul 25, 2019
IPython magic to automate injecting import statements into a terminal/notebook. Put in ~/.ipython/profile_default/startup and call %imports <os> <fmri>
View imports.py
from IPython.core.magic import Magics, magics_class, line_magic
@magics_class
class Imports(Magics):
@line_magic
def imports(self, opts):
lines = []
@mwaskom
mwaskom / lineplot.ipynb
Last active Oct 22, 2017
Various development examples of `seaborn.lineplot` functionality
View lineplot.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mwaskom
mwaskom / film_gls.py
Last active Nov 9, 2017
Python implementation of FILM GLS algorithm
View film_gls.py
"""Python implementation of FILM GLS algorithm.
Plans for development:
We will need the following functionality:
GLS fit for 4D timeseries (i, j, k, t), with smoothing in volume or on surface
GLS for for 2D array (time x vox) array, with single prewhitening matrix
We'll call the first "local" and the latter "regional" prewhitening
You can’t perform that action at this time.