Skip to content

Instantly share code, notes, and snippets.

Dano Morrison jdpigeon

Block or report user

Report or block jdpigeon

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
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@jdpigeon
jdpigeon / class_enum.ts
Created Jan 10, 2019
Typescript Class Enum Pattern
View class_enum.ts
type BothOptions = 'raw_emg';
class Both {
public static RawEMG: Both = new Both('raw_emg');
private value: BothOptions;
private constructor(value: BothOptions) {
this.value = value;
}
public rawValue(): BothOptions {
return this.value;
}
@jdpigeon
jdpigeon / seedWithLatestFrom.js
Created Aug 13, 2018
RxJS withLatestFrom Operator seed
View seedWithLatestFrom.js
// One of the main 'gotchas' of combination operators like combineLatest and withLatestFrom is that they won't emit until all source observables emit at least once.
// In order to make your combination observables start immediately when they're subscribed to, use the startWith operator on each inner observable
const Rx = require("rxjs");
// emit every 5s
const source = Rx.Observable.interval(5000).startWith('begin');
// emit every 1s
const secondSource = Rx.Observable.interval(1000);
// withLatestFrom slower than source
const example = secondSource.pipe(
@jdpigeon
jdpigeon / gist:a09c7b44bd629661d1ab6949c55b25be
Created Jun 13, 2018
How to be more productive through neuroscience
View gist:a09c7b44bd629661d1ab6949c55b25be
@jdpigeon
jdpigeon / lessonsFromNTXStudentOpenChallenge.md
Created Apr 12, 2018
lessonsFromNTXStudentOpenChallenge
View lessonsFromNTXStudentOpenChallenge.md

NeuroTechUofT

  • Encountered performance bottlenecks when running BCI paradigms in Python in real time. Overcame somewhat by using specific data structures such as trees
  • Had to use Muse 2014
  • multi-class motor classification seds estimation approach ? Ran into trouble with source localization using Muse (figures). Found paper using 8 channel EEG to classify hand gestures based on spectral data (freiburg)
  • With P300 speller, encountered significant marker variability that messed up ERP detection.
  • Signal quality issues with motor imagery task (muse?)

MINT

  • Implemented flanker test on Android w/ Muse
  • Looked for alpha and beta suppression in order to evaluate ADD
@jdpigeon
jdpigeon / museExperiments.md
Last active Mar 7, 2019
Validated EEG event-related potentials with Muse
View museExperiments.md

(Somewhat) Validated Experiments

All experiments from muse-lsl's notebooks

Visual P300 with Oddball paradigm

The visual P300 is a spike that occurs 300ms after perceiving a visual stimulus that has implications on decision making. This was validated in Muse by AB with the Oddball paradigm, in which low-probability target items (oddballs) are interspersed with high probability non-target items. With AB's paradigm, the experiment takes about 10 minutes to run (5 x 2 minute trials). The best pipeline for classifying P300s after collecting a dataset (for use in BCI) was found to be .77 AUC with ERP Covariance + MDM (Riemannian Geometry based). This accuracy is apparently good but not outstanding as far as BCIs go.

Unfortunately, I've also heard from Hubert that, in testing 10 different people, some of them weren't able to get very good ERPs. This could be due to their neuroanatomy, as EEG expresses pretty differently between peopl

@jdpigeon
jdpigeon / filiFFT.js
Last active Mar 22, 2018
FFT with Fili
View filiFFT.js
// Create FFT object
import { Fft } from "fili";
// Helpful functions
const nextPow2 = (num) => {
let pow = 1;
while(pow < num) {
pow *= 2
}
return pow
@jdpigeon
jdpigeon / conv.js
Last active Mar 13, 2018 — forked from PhotonEE/conv.js
Javascript implementation of convolution function
View conv.js
/* Returns the discrete, linear convolution of two vectors.
** Convolution in time/space is equivalent to multiplication in the frequency domain.
This function is equivalent to numpy's convolve function with the default 'full' parameter
example :
------
vec1 = [2,3,4]
vec2 = [1,2,3]
You can’t perform that action at this time.