Skip to content
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.

Commit

Permalink
v1.5 with new PSD and Brain Waves Slides, Credits, and updated lesson…
Browse files Browse the repository at this point in the history
… content
  • Loading branch information
jdpigeon committed Feb 2, 2017
1 parent 6274baa commit 5899806
Show file tree
Hide file tree
Showing 28 changed files with 145 additions and 198 deletions.
4 changes: 2 additions & 2 deletions EEG101/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ android {
applicationId "com.eeg_project"
minSdkVersion 16
targetSdkVersion 25
versionCode 7
versionCode 8
versionName "1.5"
ndk {
abiFilters "armeabi-v7a", "x86"
Expand Down Expand Up @@ -144,7 +144,7 @@ dependencies {
// Animated Gif support
compile 'com.facebook.fresco:animated-base-support:0.11.0'
compile 'com.facebook.fresco:animated-gif:0.11.0'
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.android.support:appcompat-v7:25.1.1"
compile "com.facebook.react:react-native:+" // From node_modules
compile files('libs/libmuse_android.jar')
compile "com.androidplot:androidplot-core:1.2.2"
Expand Down
18 changes: 10 additions & 8 deletions EEG101/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.eeg_project"
android:versionCode="4"
android:versionName="1.2">
android:versionCode="7"
android:versionName="1.5">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" tools:node="remove" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove"/>

<uses-sdk
android:minSdkVersion="16"
Expand All @@ -30,9 +37,4 @@
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>

<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>ad

</manifest>
30 changes: 15 additions & 15 deletions EEG101/android/app/src/main/assets/index.android.bundle

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
�����F��G�s�P�����b
f��:�p����p�4gE
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@ public class FilterDataSource implements Runnable {
// Choosing these step sizes arbitrarily based on how they look
public FilterDataSource(Boolean isLowEnergy) {
if (isLowEnergy) {
stepSize = 10;
stepSize = 6;
} else {
stepSize = 15;
stepSize = 5;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void initView(Context context) {
dataSeries = new DynamicSeries("EEG data");

// Set X and Y domain
eegPlot.setRangeBoundaries(500, 1100, BoundaryMode.FIXED);
eegPlot.setRangeBoundaries(600, 1000, BoundaryMode.FIXED);
eegPlot.setDomainBoundaries(0, PLOT_LENGTH, BoundaryMode.FIXED);

// This is critical for being able to set the color of the plot
Expand Down Expand Up @@ -296,9 +296,9 @@ public final class EEGDataSource implements Runnable {

// Choosing these step sizes arbitrarily based on how they look
public EEGDataSource(Boolean isLowEnergy) {
if (isLowEnergy) {stepSize = 10;}
if (isLowEnergy) {stepSize = 6;}
else {
stepSize = 15;
stepSize = 5;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void initView(Context context) {
dataSeries = new PSDSeries(dataSource, "PSD Plot");

// Set X and Y domain
psdPlot.setRangeBoundaries(0, 40000, BoundaryMode.FIXED);
psdPlot.setRangeBoundaries(0, 7, BoundaryMode.FIXED);
psdPlot.setDomainBoundaries(0, PLOT_LENGTH, BoundaryMode.FIXED);

// add dataSeries to plot and define color of plotted line
Expand Down Expand Up @@ -273,7 +273,7 @@ public void run() {
latestSamples = eegBuffer.extractSingleChannelTransposed(windowLength, channelOfInterest - 1);

// Compute log-PSD for channel of interest
double[] logpower = fft.computePSD(latestSamples);
double[] logpower = fft.computeLogPSD(latestSamples);

// Write new log-PSD in buffer
psdBuffer.update(logpower);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public class FFT {
private int nbFFTPoints;
private boolean even;
private boolean zeroPad = false;

private double[] real;
private double[] imag;
private double[] logpower;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion EEG101/index.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class EEG_Project extends Component {
<Scene component={SlideFour} key='SlideFour' previous='HARDWARE'/>
<Scene component={SlideFive} key='SlideFive' previous='FILTERING'/>
<Scene component={SlideSix} key='SlideSix' previous='EPOCHING'/>
<Scene component={SlideSeven} key='SlideSeven' previous='ARTIFACT REMOVAL'/>
<Scene component={SlideSeven} key='SlideSeven' previous='ARTEFACT REMOVAL'/>
<Scene component={SlideEight} key='SlideEight' previous='FEATURE EXTRACTION'/>
<Scene component={SlideNine} key='SlideNine' previous='PSD'/>
<Scene component={End} key='End' previous='BRAIN WAVES'/>
Expand Down
97 changes: 0 additions & 97 deletions EEG101/index.android.js.orig

This file was deleted.

Binary file modified EEG101/src/assets/awakeasleep.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified EEG101/src/assets/epoching.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified EEG101/src/assets/wavedecomposition.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion EEG101/src/scenes/connector-03.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function mapStateToProps(state) {
<View style={styles.titleBox}>
<Text style={styles.title}>Step 3</Text>
<Text style={styles.instructions}>Make sure the Muse is properly fit to your head</Text>
<Text style={styles.body}>Fit the earpieces snugly behind your ears and adjust the headband so that it rests mid forehead. Clear any hair that might prevent the device from making contact with your skin</Text>
<Text style={styles.body}>Fit the earpieces snugly behind your ears and adjust the headband so that it rests mid forehead. Clear any hair that might prevent the device from making contact with your skin.</Text>
</View>

<View style={styles.buttonContainer}>
Expand Down
6 changes: 3 additions & 3 deletions EEG101/src/scenes/slide-01.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class SlideOne extends Component {
<Text style={styles.header}>Now try closing your eyes for 10 seconds</Text>
<Text style={styles.body}>You may notice a change in your signal due to an increase in <PopUpLink onPress={() => this.setState({popUp4Visible: true})}>alpha waves.</PopUpLink>
</Text>
<Button onPress={Actions.SlideTwo}>NEXT MODULE</Button>
<Button onPress={Actions.SlideTwo}>NEXT</Button>
</View>

</ViewPagerAndroid>
Expand All @@ -112,12 +112,12 @@ class SlideOne extends Component {

<PopUp onClose={() => this.setState({popUp3Visible: false})} visible={this.state.popUp3Visible}
title='EEG cannot read minds'>
The EEG signal is generated when tens of thousands of brain cells fire in synchrony. Although thinking about a cat produces a change in brain activity, this change is too small to affect the large-scale, rhythmic firing of the brain that EEG detects.
The EEG signal is generated when tens of thousands of brain cells fire in synchrony. Although thinking about a cat produces some change in brain activity, it is too small to affect the large-scale, rhythmic firing of the brain that EEG detects.
</PopUp>

<PopUp onClose={() => this.setState({popUp4Visible: false})} visible={this.state.popUp4Visible}
title='Closed eye rhythms'>
When the eyes are closed, there is often a large increase in rhythmic brain activity in the range of 8-13 cycles per second (Hz). Alpha waves were one of the first discoveries that Hans Berger made with EEG. The ability to detect alpha waves when the eyes are closed varies greatly from person to person, however. Don't feel bad if you can't see them!
When the eyes are closed, there is often a large increase in rhythmic brain activity in the range of 8-13 cycles per second (Hz). These alpha waves were one of the first discoveries that Hans Berger made with EEG. The ability to detect alpha waves when the eyes are closed varies greatly from person to person, however. Don't feel bad if you can't see them!
</PopUp>

<PopUp onClose={Actions.ConnectorOne} visible={(this.props.isVisible && this.props.connectionStatus === config.connectionStatus.DISCONNECTED)} title='Muse Disconnected'>
Expand Down
8 changes: 4 additions & 4 deletions EEG101/src/scenes/slide-02.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ class SlideTwo extends Component {

<View style={styles.pageStyle}>
<Text style={styles.header}>Organized neural activity produces electric fields</Text>
<Text style={styles.body}>When billions of neurons <PopUpLink onPress={() => this.setState({popUp2Visible: true})}>work together</PopUpLink> to produce thoughts, feelings, and behaviours, their electricity can be detected by electrodes on the scalp
<Text style={[styles.body, {fontSize: 18}]}>When billions of neurons <PopUpLink onPress={() => this.setState({popUp2Visible: true})}>work together</PopUpLink> to produce thoughts, feelings, and behaviours, their electricity can be detected by electrodes on the scalp.
</Text>
</View>

<View style={styles.pageStyle}>
<Text style={styles.header}>EEG detects the "state" of the brain</Text>
<Text style={styles.body}>This organized electrical activity varies between different brain states, such as <PopUpLink onPress={() => this.setState({popUp3Visible: true})}>sleep and wakefulness.</PopUpLink>
</Text>
<Button onPress={Actions.SlideThree}>NEXT MODULE</Button>
<Button onPress={Actions.SlideThree}>NEXT</Button>
</View>
</ViewPagerAndroid>

Expand All @@ -104,7 +104,7 @@ class SlideTwo extends Component {

<PopUp onClose={() => this.setState({popUp3Visible: false})} visible={this.state.popUp3Visible}
title='Brain states'>
When we're asleep our brains produce very different kinds rhythmic electrical activity than when we're awake. When awake, the brain's rhythms tend to be high frequency and irregular, while low frequency, organized rhythms become more dominant as we fall asleep and pass through the multiple sleep stages. Certain emotions and cognitive processes have also been linked with characteristic patterns of rhythmic activity that can be identified with EEG.
During sleep our brains produce very different kinds of rhythmic electrical activity. When awake, brain rhythms tend to be rapidly-changing and irregular, while slowly-changing, organized rhythms become more dominant as we fall asleep and pass through the multiple sleep stages. {"\n"}Certain emotions and cognitive processes have also been linked with characteristic patterns of rhythmic activity that can be identified with EEG.
</PopUp>

<PopUp onClose={Actions.ConnectorOne} visible={(this.props.isVisible && this.props.connectionStatus === config.connectionStatus.DISCONNECTED)} title='Muse Disconnected'>
Expand Down Expand Up @@ -161,8 +161,8 @@ body: {
fontFamily: 'Roboto-Bold',
color: '#484848',
fontSize: 20,
},

},

viewPager: {
flex: 4,
Expand Down
9 changes: 4 additions & 5 deletions EEG101/src/scenes/slide-03.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ class SlideThree extends Component {

<View style={styles.pageStyle}>
<Text style={styles.header}>What do electrodes measure?</Text>
<Text style={styles.body}>Each electrode detects voltage fluctuations that are compared to a <PopUpLink onPress={() => this.setState({popUp3Visible: true})}>reference sensor</PopUpLink> and then amplified around 1,000,000 times.</Text>
<Button onPress={Actions.SlideFour}>NEXT MODULE</Button>
<Text style={[styles.body, {fontSize: 18}]}>Each electrode detects voltage fluctuations that are compared to a <PopUpLink onPress={() => this.setState({popUp3Visible: true})}>reference electrode</PopUpLink> and then amplified around 1,000,000 times.</Text>
<Button onPress={Actions.SlideFour}>NEXT</Button>
</View>
</ViewPagerAndroid>

Expand All @@ -83,13 +83,12 @@ class SlideThree extends Component {

<PopUp onClose={() => this.setState({popUp2Visible: false})} visible={this.state.popUp2Visible}
title='Electrode naming conventions' image={require('../assets/electrodelocations.png')}>

EEG electrodes are typically identified by a combination of a letter and a number. The letter indicates the part of the head where the electrode is located (F for frontal, C for central, etc.). EEG electrodes are typically identified by a combination of a letter and a number. The letter indicates the part of the head where the electrode is located (F for frontal, C for central, etc.).
EEG electrodes are typically identified by a combination of a letter and a number. The letter indicates the part of the head where the electrode is located (F for frontal, C for central, etc.). The number indicates distance from the midline of the head with odd numbers on the right and even numbers on the left.
</PopUp>

<PopUp onClose={() => this.setState({popUp3Visible: false})} visible={this.state.popUp3Visible}
title='Referencing' image={require('../assets/reference.png')}>
Each electrode's signal is actually the relative difference in electrical potential between that electrode and the reference. Thus, the placement of the reference electrode is very import. In the Muse, the reference is located on the front of the forehead (indicated in black).
Each electrode's signal reflects the difference in electrical potential between that electrode and the reference. Thus, the placement of the reference electrode is very important. With Muse, the reference is located on the front of the forehead.
</PopUp>

<PopUp onClose={Actions.ConnectorOne} visible={(this.props.isVisible && this.props.connectionStatus === config.connectionStatus.DISCONNECTED)} title='Muse Disconnected'>
Expand Down
Loading

0 comments on commit 5899806

Please sign in to comment.