This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(phonR) | |
# if you want to go straight to PDF, uncomment this line, and the "dev.off()" line at the end: | |
# cairo_pdf("myfile.pdf", width=6, height=6, pointsize=12) | |
# assuming that your dataframe is called "mydata": | |
# first, create columns for the normalized data: | |
z <- with(mydata, norm.vowels("lobanov", f1=f1, f2=f2, f3=f3, group=speaker)) | |
colnames(z) <- paste(colnames(z), "z", sep="") | |
mydata <- cbind(mydata, z) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(phonR) | |
data(indoVowels) | |
library(sp) # SpatialPolygons, etc | |
library(rgeos) # gIntersection | |
fem2 <- indo[indo$subj %in% "F02",] | |
vowels <- unique(as.character(fem2$vowel)) | |
## important! ellipse.conf defaults to 0.6827 (2 s.d.) for plotVowels, but | |
## defaults internally to 0.95 for phonR:::ellipse. You must specify the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## "reduction" is the response variable (ordered factor, none < devoiced < deleted) | |
table(cleandata$reduction) | |
## none devoiced deleted | |
## 20776 360 420 | |
## "speaker" is a nuisance predictor, which I intend to model as a random effect | |
with(cleandata, table(reduction, speaker)) | |
## speaker | |
## reduction F1 F2 F3 M1 M2 M3 | |
## none 3559 3482 3325 3569 3360 3481 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
=============================================================================== | |
Script 'mne logo' | |
=============================================================================== | |
This script makes the logo for MNE. | |
""" | |
# @author: drmccloy | |
# Created on Mon Jul 20 11:28:16 2015 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import expyfun | |
import numpy as np | |
import matplotlib.pyplot as plt | |
plt.ioff() | |
n_iter = 10000 | |
edges = np.arange(4, 17, dtype=int) | |
edges = [10, 100, 500] | |
times = np.zeros(n_iter) | |
with expyfun.ExperimentController('wait_test', output_dir=None, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
=============================================================================== | |
Script 'test-eyelink-interactive.py' | |
=============================================================================== | |
This script tests the connection to the EyeLink eye tracker. | |
""" | |
# @author: drmccloy | |
# Created on Thu Oct 15 09:11:04 2015 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import numpy as np | |
from expyfun import ExperimentController | |
kwargs = dict(exp_name='test', session='000', participant='foo') | |
with ExperimentController(**kwargs) as ec: | |
ec.flip() | |
ec.set_background_color('red') | |
ec.screen_text('red', color='k') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# see: | |
# http://eeweb.poly.edu/iselesni/lecture_notes/least_squares/ | |
# LeastSquares_SPdemos/deconvolution/html/deconv_demo.html | |
import numpy as np | |
from scipy import linalg, sparse | |
import matplotlib.pyplot as plt | |
from pyeparse.utils import pupil_kernel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import expyfun as ef | |
import tdt | |
circuit = 'C:\\Users\\labuser\\Builds\\expyfun\\expyfun\\data\\expCircuitF32_RM1.rcx' | |
interface = 'USB' | |
model = 'RP2' | |
# approach #1 |
OlderNewer