Skip to content

Commit 9f608eb

Browse files
committed
permanent spacetop documentation
1 parent 048ff74 commit 9f608eb

File tree

5 files changed

+386
-0
lines changed

5 files changed

+386
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
layout: default
3+
title: Running experiments
4+
permalink: /runningexp
5+
nav_order: 4
6+
has_children: true
7+
---
8+
9+
# Running experiments
10+
{: .no_toc }
11+
{: .fs-9 }
12+
13+
Running experiments involves 3 components: 1) sticking to the protocols, 2) knowing how to set up equipment (fMRI PC, fMRI scan room, TSA-II, Biopac), and 3) running the spacetop task scripts (7 individual tasks)
14+
{: .fs-6 .fw-300 }
15+
16+
17+
{: toc }
18+
19+
Fast links
20+
{: .fs-6 .fw-300 }
21+
22+
links required per session
23+
{: .text-delta}
24+
[ST participants](https://docs.google.com/spreadsheets/d/18zKGZAWgs56yYbpeZ4GRV_EnNmQElBvT8M3sfeNBUmI/edit?usp=sharing){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 }
25+
[Daily setup checklist](https://docs.google.com/document/d/1Xj3KeMtZRq-R_-78stY_sAlMGLKBEqkvL2FKDcMgtzc/edit?usp=sharing){: .btn .fs-5 .mb-4 .mb-md-0 }
26+
27+
28+
links dependent on session
29+
{: .text-delta}
30+
[scan 1 protocol](https://docs.google.com/document/d/1cwrJDC7tmMO6fwplcRVyyn8tpM04JTQAVwdiWWCiHy4/edit?usp=sharing){: .btn .btn-blue .fs-3 .mb-4 .mb-md-0 .mr-2 }
31+
[scan 2 protocol](https://docs.google.com/document/d/1UUFopzMc_TJ1ou1UpR2AEMAMvkMaTE9fvH5HAcNx2Yw/edit?usp=sharing){: .btn .fs-3 .mb-4 .mb-md-0 .text-blue-000}
32+
[scan 3 protocol](https://docs.google.com/document/d/1Uq9PeuWD-UYfOlbo8buPV0LIJ9oI_Z7SVBPRbZjEobs/edit?usp=sharing){: .btn .btn-blue .fs-3 .mb-4 .mb-md-0 .mr-2 }
33+
[scan 4 protocol](https://docs.google.com/document/d/17upqAFQgOwlCh2EOxgbhVJjdnb6hi01mG9UOgyeIRHU/edit?usp=sharing){: .btn .fs-3 .mb-4 .mb-md-0 .text-blue-000}
34+
35+
<!-- <span class="fs-3">
36+
[Tiny button](http://example.com/){: .btn }
37+
</span> -->

docs/m05_documentation/g01_stimuli.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
layout: default
3+
title: Protocols (DBIC + Testing 453)
4+
parent: Documentation
5+
permalink: /doc/stimuli
6+
nav_order: 1
7+
---
8+
9+
10+
11+
# Protocols: fMRI + behavioral
12+
{: .no_toc }
13+
{: .fs-11 }
14+
15+
<details open markdown="block">
16+
<summary>
17+
Table of contents
18+
</summary>
19+
{: .text-delta }
20+
1. TOC
21+
{:toc}
22+
</details>
23+
24+
# fMRI protocols
25+
{: .d-inline-block}
26+
maintained by Luke
27+
{: .label .label-green }
28+
29+
* [scan 1 master protocol](https://docs.google.com/document/d/1cwrJDC7tmMO6fwplcRVyyn8tpM04JTQAVwdiWWCiHy4/edit?usp=sharing){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 }
30+
* [scan 2 master protocol](https://docs.google.com/document/d/1UUFopzMc_TJ1ou1UpR2AEMAMvkMaTE9fvH5HAcNx2Yw/edit?usp=sharing){: .btn .fs-5 .mb-4 .mb-md-0 }
31+
* [scan 3 master protocol](https://docs.google.com/document/d/1Uq9PeuWD-UYfOlbo8buPV0LIJ9oI_Z7SVBPRbZjEobs/edit?usp=sharing){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 }
32+
* [scan 4 master protocol](https://docs.google.com/document/d/17upqAFQgOwlCh2EOxgbhVJjdnb6hi01mG9UOgyeIRHU/edit?usp=sharing){: .btn .fs-5 .mb-4 .mb-md-0 }
33+
34+
35+
---
36+
links dependent on session
37+
{: .text-delta}
38+
## session 1
39+
[scan 1 protocol](https://docs.google.com/document/d/1cwrJDC7tmMO6fwplcRVyyn8tpM04JTQAVwdiWWCiHy4/edit?usp=sharing)
40+
### behavioral
41+
* [spacetop overview (PPT)](https://drive.google.com/file/d/1Gqtk3tscjNDzrcNw-tYlWnoVyS6OGuBC/view?usp=sharing)
42+
* [social influence instructions (PPT)](https://drive.google.com/file/d/1NjwO1qHNQAufzUjs6xjFf_gb4p8qFHFt/view?usp=sharing)
43+
* bartoshuck scale practice (MATLAB): `C:\Users\Dartmouth College\Desktop\Spacetop\SpaceTop_Attribution_Learning-master`
44+
* Practice Align-Videos Task (MATLAB) https://github.com/spatialtopology/func_align_video_task/blob/master/code/practice_func_align_video_task.m
45+
46+
### scanner
47+
* `Linux PC > repos > social_influence > scripts > `
48+
* `Linux PC > repos > video task`
49+
50+
---
51+
52+
## session 2
53+
[scan 2 protocol](https://docs.google.com/document/d/1UUFopzMc_TJ1ou1UpR2AEMAMvkMaTE9fvH5HAcNx2Yw/edit?usp=sharing){: .btn .fs-5 .mb-4 .mb-md-0 .text-blue-000}
54+
55+
### prescan
56+
* [spacetop overview ppt](https://drive.google.com/file/d/1Gqtk3tscjNDzrcNw-tYlWnoVyS6OGuBC/view)
57+
* [narratives powerpoint]()
58+
* [face powerpoint]()
59+
60+
### scanner
61+
* Linux PC > repos > faces
62+
* Linux PC > repos > narratives
63+
64+
---
65+
66+
## session 3
67+
[scan 3 protocol](https://docs.google.com/document/d/1Uq9PeuWD-UYfOlbo8buPV0LIJ9oI_Z7SVBPRbZjEobs/edit?usp=sharing){: .btn .btn-blue .fs-5 .mb-4 .mb-md-0 .mr-2 }
68+
69+
### prescan
70+
* [spacetop overview ppt](https://drive.google.com/file/d/1Gqtk3tscjNDzrcNw-tYlWnoVyS6OGuBC/view)
71+
* [self-ref ppt](https://docs.google.com/presentation/d/1LaVPOmwckZEx68DAeqrkSNhKCkAQsJ0BL5puQePh5FI/edit)
72+
* Linux PC > repos > practice self-ref/self-other mat file
73+
* Linux PC > repos > video_viewing_only script
74+
* [learning instruction ppt](https://drive.google.com/file/d/1f_MwibCkFJ0U9OrQhAaGQsD5kBPN5f6z/view)
75+
* Linux PC > repos > learning > A01_learning_phase
76+
* ST participants for leg sites in learning task
77+
78+
### scanner
79+
* Linux PC > repos > self other task
80+
* Linux PC > repos > learning A02
81+
82+
### postscan
83+
* Linux PC > repos > learning A03
84+
85+
---
86+
87+
## session 4
88+
[scan 4 protocol](https://docs.google.com/document/d/17upqAFQgOwlCh2EOxgbhVJjdnb6hi01mG9UOgyeIRHU/edit?usp=sharing){: .btn .fs-5 .mb-4 .mb-md-0 .text-blue-000}
89+
90+
### prescan
91+
* social influence reminder
92+
* Linux PC > repos > fractionals practice
93+
94+
### scanner
95+
* Linux PC > repos > fractional
96+
* Linux PC > repos > social influence
97+
98+
---
99+
100+
# Task info + session checklists
101+
{: .d-inline-block }
102+
Coming soon
103+
{: .label .label-yellow }
104+
105+
| | face | fractional| learning |narratives|self-other|social-influence| videos|
106+
|:-------|:------|:----------|:---------|:---------|:---------|:---------------|:---------|
107+
|device | button| button | trackball|button |trackball |trackball | trackball|
108+
|thermode| X | X | O | X | X | O | X |
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
layout: default
3+
title: Protocols
4+
parent: Documentation
5+
permalink: /doc/stimuli
6+
nav_order: 1
7+
---
8+
9+
# Protocols
10+
{: .no_toc }
11+
{: .fs-11 }
12+
13+
## Table of contents
14+
{: .no_toc .text-delta }
15+
16+
1. TOC
17+
{: .no_toc}
18+
19+
# Thermode rules
20+
21+
# Plugging in programs
22+
23+
# naming convention
24+
for standardization
25+
let's stick with
26+
`PROJECT_temp-XX_dur-XX_8bit-XX`
27+
* the 8 bit code is necessary - mind you, 8 bit codes cannot overlap.
28+
If you've plugged in numbers from 45-50, the next experimenter cannot use those numbers.
29+
In order to help the next experimenter, please indicate which 8bit codes you've used.
30+
We're not good with reading binary numbers - please indicate the decimal version
31+
# Manual trigger
32+
33+
# participant login
34+
35+
# checking thermode OUTPUT
36+
---
37+
38+
# Social Influence parameters
39+
* ![social_47]({{ site.url }}/images/spacetop_social_47.png)
40+
* ![social_48]({{ site.url }}/images/spacetop_social_48.png)
41+
* ![social_49]({{ site.url }}/images/spacetop_social_49.png)
42+
43+
---
44+
45+
# Learning task parameters
46+
* ![learning_45]({{ site.url }}/images/spacetop_learning_45.png)
47+
* ![learning_46]({{ site.url }}/images/spacetop_learning_46.png)
48+
* ![learning_47]({{ site.url }}/images/spacetop_learning_47.png)
49+
* ![learning_48]({{ site.url }}/images/spacetop_learning_48.png)
50+
* ![learning_49]({{ site.url }}/images/spacetop_learning_49.png)
51+
* ![learning_50]({{ site.url }}/images/spacetop_learning_50.png)
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
layout: default
3+
title: Linux Laptop setup
4+
parent: Documentation
5+
permalink: /doc/lsetup
6+
nav_order: 5
7+
---
8+
9+
# Linux Laptop Setup
10+
{: .no_toc }
11+
{: .fs-11 }
12+
13+
14+
<!-- ## Table of contents
15+
{: .no_toc .text-delta } -->
16+
17+
<details open markdown="block">
18+
<summary>
19+
Table of contents
20+
</summary>
21+
{: .text-delta }
22+
23+
1. TOC
24+
{:toc}
25+
</details>
26+
27+
# Linux laptop setup
28+
29+
30+
31+
step 1
32+
{: .label .label-blue}
33+
## Reason why we had to go with Linux
34+
{: .d-inline-block .fs-6}
35+
36+
* developers of psychtoolbox recommend linux
37+
* timing issue with windows (lag icon)
38+
* added more than two minutes of a lag for a task
39+
* ease of containerization
40+
41+
step 2
42+
{: .label .label-blue}
43+
44+
# Installing PTB on linux
45+
{: .d-inline-block }
46+
move elsewhere
47+
{: .label .label-green}
48+
check installation
49+
* neurodebian
50+
* neurodocker
51+
* anaconda
52+
* singularity
53+
54+
55+
worked for Luke
56+
http://neuro.debian.net/install_pkg.html?p=psychtoolbox-3-common
57+
58+
Yarik suggestion
59+
You need to add contrib (probably no need for non-free) portion in addition to main in your NeuroDebian apt file.
60+
* https://wiki.debian.org/SourcesList
61+
* `cat /etc/apt/sources.list.d/neurodebian.sources.list`
62+
63+
64+
Getting error message:
65+
> libGL error: MESA_LOADER: failed to open readeonsi (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
66+
libGL error: failed to load driver: readeonsi
67+
failed to create dri screen
68+
69+
-> https://psychtoolbox.discourse.group/t/matlab-crashes-after-insatlling-ptb-com-jogamp-opengl-glexception/74
70+
71+
# adding EOL to matlab path without having to add it everytime
72+
* check `sudo vim /etc/ptb3/matlab.sh`
73+
* added a matlab path:
74+
EOL MASTER = /home/spacetop/repos/EOL-master
75+
in the shell script
76+
add the line ```export MATLABPATH=$(find "$EOL_MASTER" -type d | grep -v private | tr '\n' ':')$MATLABPATH```
77+
78+
## firewall
79+
* allow incoming input from medoc PC
80+
* use iptable
81+
* ```iptables -A OUTPUT -p tcp -d 192.168.0.114 --dport 20121 -j ACCEPT```
82+
* https://serverfault.com/questions/183461/how-do-i-allow-outgoing-connections-via-iptables
83+
84+
85+
86+
## manually changing IP on linux
87+
* follow this page to change the ip. [link](https://www.linuxtechi.com/assign-static-ip-address-ubuntu-20-04-lts/#:~:text=Configuring%20a%20static%20ip%20address,and%20then%20choose%20wired%20settings.&text=In%20the%20next%20window%2C%20Choose,gateway%20and%20DNS%20Server%20IP.)
88+
* make sure to change the name of this ethernet setting:
89+
Wired > identity > name : spacetop.dartmouth.edu
90+
91+
## Setting firewalls and allowing private network
92+
* ping the medoc PC from the spacetop stim PC
93+
* if it doesn't work, there are two things that need to happen
94+
>> Create a new rule:
95+
[creating rules](https://www.howtogeek.com/112564/how-to-create-advanced-firewall-rules-in-the-windows-firewall/)
96+
>> Frewall > Inbound rules > look for "file and printer sharing (echo Request - ICMPv4-In) Private" > Enable rule
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
layout: default
3+
title: Building Containers
4+
parent: Documentation
5+
permalink: /doc/containers
6+
nav_order: 4
7+
---
8+
9+
# Building Containers
10+
{: .no_toc }
11+
{: .fs-11 }
12+
13+
14+
## Table of contents
15+
{: .no_toc .text-delta }
16+
17+
1. TOC
18+
{:toc}
19+
20+
---
21+
Containers aid reproducible research, while alleviating the pain of installing programs/packages every time you're working in a new environment.
22+
23+
Docker and Singularity are platforms that allow you to build and execute containers.
24+
25+
Reasons I had to build a container:
26+
I needed pymvpa and nilearn, which had to run on CU's cluster. This was around 2018, prior to the conda environment feature that is now enabled on Summit and Blanca. Hence, I needed a singularity container, instead of a docker container. However, converting a docker container to singularity is easy, once you have singularity on your local machine.
27+
28+
---
29+
30+
31+
# 0. install singularity on your local machine
32+
Please check here.
33+
* https://singularity.lbl.gov/install-mac
34+
* https://singularity.lbl.gov/install-linux
35+
* https://singularity.lbl.gov/install-windows
36+
37+
# 1. First start off with installing vagrant
38+
* where I've installed it: Documents/singularity-vm
39+
* change directory into it and run the following lines
40+
```
41+
cd ~/Documents/singularity-vm
42+
vagrant init singularityware/singularity-2.4
43+
vagrant up
44+
vagrant ssh
45+
```
46+
47+
# 2. once you've logged into vagrant, we're going to build the container
48+
using singularity...
49+
50+
`IMG` : name of the container
51+
You need to set the initial size of the image (container) 8000, i.e., 8 GB
52+
53+
`DEF` : has the code that builds the containers
54+
55+
```
56+
IMG="snaglab_pymvpa2_nilearn.img"
57+
DEF="debian.def"
58+
sudo rm -f $IMG
59+
sudo singularity create -s 8000 $IMG
60+
sudo singularity image.create -s 8000 $IMG
61+
sudo singularity bootstrap $IMG $DEF
62+
```
63+
64+
# 3. create the singularity container
65+
66+
copyout the container ( in local directory not virtual machine)
67+
```
68+
vagrant port `( in the folder where you've installed vagrant)`
69+
```
70+
71+
from local dir
72+
```
73+
scp -P 2222 vagrant@127.0.0.1:/home/vagrant/snaglab_pymvpa2.img .
74+
scp -P 2222 vagrant@127.0.0.1:/home/vagrant/debian.def .
75+
scp -P 2222 vagrant@127.0.0.1:/home/vagrant/definition.def .
76+
```
77+
78+
# 4. Build a docker container and convert it to singularity
79+
Example: I built FSL based on https://github.com/BIDS-Apps/dockerfile-templates/blob/master/FSL/Dockerfile
80+
go to the local directory where dockerfile exists
81+
```
82+
docker build -t fslnine .
83+
docker tag f6b20d2fbb99 jungheejung/fslnine:latest
84+
docker push jungheejung/fslnine:latest
85+
```
86+
If your HPC doesn't allow for docker, but has singularity,
87+
here's how to convert dockers into singularity containers.
88+
```
89+
docker run --privileged -t --rm \
90+
-v /var/run/docker.sock:/var/run/docker.sock \
91+
-v /Users/h/Documents/singularity-vm:/output \
92+
singularityware/docker2singularity \
93+
jungheejung/fslnine:latest
94+
```

0 commit comments

Comments
 (0)