Skip to content

Commit c3addac

Browse files
committed
Merge remote-tracking branch 'cpp-lln-lab/master'
2 parents d1c6967 + 5c499cd commit c3addac

29 files changed

+628
-316
lines changed

.all-contributorsrc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,23 @@
5959
"bug",
6060
"userTesting"
6161
]
62+
},
63+
{
64+
"login": "iqrashahzad14",
65+
"name": "iqrashahzad14",
66+
"avatar_url": "https://avatars.githubusercontent.com/u/75671348?v=4",
67+
"profile": "https://github.com/iqrashahzad14",
68+
"contributions": [
69+
"code",
70+
"ideas"
71+
]
6272
}
6373
],
6474
"contributorsPerLine": 7,
6575
"projectName": "localizer_visual_motion",
6676
"projectOwner": "cpp-lln-lab",
6777
"repoType": "github",
6878
"repoHost": "https://github.com",
69-
"skipCi": false
70-
"contributorsSortAlphabetically": true
79+
"skipCi": false,
80+
"contributorsSortAlphabetically": false
7181
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: miss_hit_quality
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches: '*'
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
17+
- uses: actions/checkout@v2
18+
with:
19+
submodules: true
20+
fetch-depth: 1
21+
22+
- name: Set up Python 3.6
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: 3.6
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip setuptools
30+
pip3 install -r requirements.txt
31+
32+
- name: MISS_HIT Metrics
33+
run: |
34+
mh_metric --ci
35+
36+
- name: MISS_HIT Bug finder
37+
run: |
38+
mh_lint
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: miss_hit_style
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches: '*'
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
17+
- uses: actions/checkout@v2
18+
with:
19+
submodules: true
20+
fetch-depth: 1
21+
22+
- name: Set up Python 3.6
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: 3.6
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip setuptools
30+
pip3 install -r requirements.txt
31+
32+
- name: MISS_HIT Code style
33+
run: |
34+
mh_style

.pre-commit-config.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
repos:
2+
3+
- repo: local
4+
5+
hooks:
6+
7+
- id: mh_style
8+
name: mh_style
9+
entry: mh_style
10+
args: [--process-slx, --fix]
11+
files: ^(.*\.(m|slx))$
12+
language: python
13+
additional_dependencies: [miss_hit_core]
14+
15+
- id: mh_metric
16+
name: mh_metric
17+
entry: mh_metric
18+
args: [--ci]
19+
files: ^(.*\.(m|slx))$
20+
language: python
21+
additional_dependencies: [miss_hit_core]
22+
23+
- id: mh_lint
24+
name: mh_lint
25+
entry: mh_lint
26+
files: ^(.*\.(m|slx))$
27+
language: python
28+
additional_dependencies: [miss_hit]
29+
30+
- repo: https://github.com/pre-commit/pre-commit-hooks
31+
rev: v2.0.0
32+
hooks:
33+
- id: trailing-whitespace
34+
- id: end-of-file-fixer
35+
- id: check-yaml
36+
- id: check-added-large-files

.travis.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

README.md

Lines changed: 41 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,37 @@
11
[![](https://img.shields.io/badge/Octave-CI-blue?logo=Octave&logoColor=white)](https://github.com/cpp-lln-lab/localizer_visual_motion/actions)
22
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
3-
[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors-)
3+
[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-)
44
<!-- ALL-CONTRIBUTORS-BADGE:END -->
55
![](https://github.com/cpp-lln-lab/localizer_visual_motion/workflows/CI/badge.svg)
66

77
[![codecov](https://codecov.io/gh/cpp-lln-lab/localizer_visual_motion/branch/master/graph/badge.svg)](https://codecov.io/gh/cpp-lln-lab/localizer_visual_motion)
88

99
[![Build Status](https://travis-ci.com/cpp-lln-lab/localizer_visual_motion.svg?branch=master)](https://travis-ci.com/cpp-lln-lab/localizer_visual_motion)
1010

11-
<!-- vscode-markdown-toc -->
12-
13-
- 1. [Requirements](#Requirements)
14-
- 2. [Installation](#Installation)
15-
- 3. [Structure and function details](#Structureandfunctiondetails)
16-
_ 3.1. [visualLocTranslational](#visualLocTranslational)
17-
_ 3.2. [setParameters](#setParameters)
18-
_ 3.3. [subfun/doDotMo](#subfundoDotMo)
19-
_ 3.3.1. [Input:](#Input:)
20-
_ 3.3.2. [Output:](#Output:)
21-
_ 3.4. [subfun/expDesign](#subfunexpDesign)
22-
_ 3.4.1. [EVENTS](#EVENTS)
23-
_ 3.4.2. [TARGETS:](#TARGETS:)
24-
_ 3.4.3. [Input:](#Input:-1)
25-
_ 3.4.4. [Output:](#Output:-1)
26-
27-
<!-- vscode-markdown-toc-config
28-
numbering=true
29-
autoSave=true
30-
/vscode-markdown-toc-config -->
31-
<!-- /vscode-markdown-toc -->
11+
<!-- TOC -->
12+
- [fMRI localizers for visual motion](#fmri-localizers-for-visual-motion)
13+
- [Translational Motion](#translational-motion)
14+
- [Requirements](#requirements)
15+
- [Installation](#installation)
16+
- [Structure and function details](#structure-and-function-details)
17+
- [visualLocTranslational](#visualloctranslational)
18+
- [setParameters](#setparameters)
19+
- [Let the scanner pace the experiment](#let-the-scanner-pace-the-experiment)
20+
- [subfun/doDotMo](#subfundodotmo)
21+
- [Input](#input)
22+
- [Output](#output)
23+
- [subfun/expDesign](#subfunexpdesign)
24+
- [EVENTS](#events)
25+
- [TARGETS](#targets)
26+
- [Input](#input-1)
27+
- [Output](#output-1)
28+
<!-- TOC -->
3229

3330
# fMRI localizers for visual motion
3431

35-
# Translational Motion
32+
## Translational Motion
3633

37-
## 1. <a name='Requirements'></a>Requirements
34+
## Requirements
3835

3936
Make sure that the following toolboxes are installed and added to the matlab / octave path.
4037

@@ -48,7 +45,7 @@ For instructions see the following links:
4845
| [Matlab](https://www.mathworks.com/products/matlab.html) | >=2017 |
4946
| or [octave](https://www.gnu.org/software/octave/) | >=4.? |
5047

51-
## 2. <a name='Installation'></a>Installation
48+
## Installation
5249

5350
The CPP_BIDS and CPP_PTB dependencies are already set up as submodule to this repository.
5451
You can install it all with git by doing.
@@ -57,17 +54,17 @@ You can install it all with git by doing.
5754
git clone --recurse-submodules https://github.com/cpp-lln-lab/localizer_visual_motion.git
5855
```
5956

60-
## 3. <a name='Structureandfunctiondetails'></a>Structure and function details
57+
## Structure and function details
6158

62-
### 3.1. <a name='visualLocTranslational'></a>visualLocTranslational
59+
### visualLocTranslational
6360

6461
Running this script will show blocks of motion dots (soon also moving gratings) and static dots. Motion blocks will show dots(/gratings) moving in one of four directions (up-, down-, left-, and right-ward)
6562

6663
By default it is run in `Debug mode` meaning that it does not run care about subjID, run n., fMRI triggers, Eye Tracker, etc..
6764

6865
Any details of the experiment can be changed in `setParameters.m` (e.g., experiment mode, motion stimuli details, exp. design, etc.)
6966

70-
### 3.2. <a name='setParameters'></a>setParameters
67+
### setParameters
7168

7269
`setParameters.m` is the core engine of the experiment. It contains the following tweakable sections:
7370

@@ -108,40 +105,40 @@ if cfg.pacedByTriggers.do
108105
end
109106
```
110107

111-
### 3.3. <a name='subfundoDotMo'></a>subfun/doDotMo
108+
### subfun/doDotMo
112109

113-
#### 3.3.1. <a name='Input:'></a>Input:
110+
#### Input
114111

115112
- `cfg`: PTB/machine configurations returned by `setParameters` and `initPTB`
116113
- `expParameters`: parameters returned by `setParameters`
117114
- `logFile`: structure that stores the experiment logfile to be saved
118115

119-
#### 3.3.2. <a name='Output:'></a>Output:
116+
#### Output
120117

121118
- Event `onset`
122119
- Event `duration`
123120

124121
The dots are drawn on a square that contains the round aperture, then any dots outside of the aperture is turned into a NaN so effectively the actual number of dots on the screen at any given time is not the one that you input but a smaller number (nDots / Area of aperture) on average.
125122

126-
### 3.4. <a name='subfunexpDesign'></a>subfun/expDesign
123+
### subfun/expDesign
127124

128125
Creates the sequence of blocks and the events in them. The conditions are consecutive static and motion blocks (Gives better results than randomised). It can be run as a stand alone without inputs to display a visual example of possible design.
129126

130-
#### 3.4.1. <a name='EVENTS'></a>EVENTS
127+
#### EVENTS
131128

132129
The `numEventsPerBlock` should be a multiple of the number of "base" listed in the `motionDirections` and `staticDirections` (4 at the moment).
133130

134-
#### 3.4.2. <a name='TARGETS:'></a>TARGETS:
131+
#### TARGETS
135132

136133
- If there are 2 targets per block we make sure that they are at least 2 events apart.
137134
- Targets cannot be on the first or last event of a block
138135

139-
#### 3.4.3. <a name='Input:-1'></a>Input:
136+
#### Input
140137

141138
- `expParameters`: parameters returned by `setParameters`
142139
- `displayFigs`: a boolean to decide whether to show the basic design matrix of the design
143140

144-
#### 3.4.4. <a name='Output:-1'></a>Output:
141+
#### Output
145142

146143
- `expParameters.designBlockNames` is a cell array `(nr_blocks, 1)` with the name for each block
147144
- `expParameters.designDirections` is an array `(nr_blocks, numEventsPerBlock)` with the direction to present in a given block
@@ -159,15 +156,17 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
159156
<!-- markdownlint-disable -->
160157
<table>
161158
<tr>
162-
<td align="center"><a href="https://github.com/mohmdrezk"><img src="https://avatars2.githubusercontent.com/u/9597815?v=4" width="100px;" alt=""/><br /><sub><b>Mohamed Rezk</b></sub></a><br /><a href="https://github.com/cpp-lln-lab/localizer_visual_motion/commits?author=mohmdrezk" title="Code">💻</a> <a href="#design-mohmdrezk" title="Design">🎨</a> <a href="#ideas-mohmdrezk" title="Ideas, Planning, & Feedback">🤔</a></td>
163-
<td align="center"><a href="https://github.com/marcobarilari"><img src="https://avatars3.githubusercontent.com/u/38101692?v=4" width="100px;" alt=""/><br /><sub><b>marcobarilari</b></sub></a><br /><a href="https://github.com/cpp-lln-lab/localizer_visual_motion/commits?author=marcobarilari" title="Code">💻</a> <a href="#design-marcobarilari" title="Design">🎨</a> <a href="#ideas-marcobarilari" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/cpp-lln-lab/localizer_visual_motion/issues?q=author%3Amarcobarilari" title="Bug reports">🐛</a> <a href="#userTesting-marcobarilari" title="User Testing">📓</a> <a href="https://github.com/cpp-lln-lab/localizer_visual_motion/pulls?q=is%3Apr+reviewed-by%3Amarcobarilari" title="Reviewed Pull Requests">👀</a> <a href="#question-marcobarilari" title="Answering Questions">💬</a> <a href="#infra-marcobarilari" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-marcobarilari" title="Maintenance">🚧</a></td>
164-
<td align="center"><a href="https://remi-gau.github.io/"><img src="https://avatars3.githubusercontent.com/u/6961185?v=4" width="100px;" alt=""/><br /><sub><b>Remi Gau</b></sub></a><br /><a href="https://github.com/cpp-lln-lab/localizer_visual_motion/commits?author=Remi-Gau" title="Code">💻</a> <a href="#design-Remi-Gau" title="Design">🎨</a> <a href="#ideas-Remi-Gau" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/cpp-lln-lab/localizer_visual_motion/issues?q=author%3ARemi-Gau" title="Bug reports">🐛</a> <a href="#userTesting-Remi-Gau" title="User Testing">📓</a> <a href="https://github.com/cpp-lln-lab/localizer_visual_motion/pulls?q=is%3Apr+reviewed-by%3ARemi-Gau" title="Reviewed Pull Requests">👀</a> <a href="#question-Remi-Gau" title="Answering Questions">💬</a> <a href="#infra-Remi-Gau" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-Remi-Gau" title="Maintenance">🚧</a></td>
165-
<td align="center"><a href="https://github.com/CerenB"><img src="https://avatars1.githubusercontent.com/u/10451654?v=4" width="100px;" alt=""/><br /><sub><b>CerenB</b></sub></a><br /><a href="https://github.com/cpp-lln-lab/localizer_visual_motion/issues?q=author%3ACerenB" title="Bug reports">🐛</a> <a href="#userTesting-CerenB" title="User Testing">📓</a></td>
159+
<td align="center"><a href="https://github.com/mohmdrezk"><img src="https://avatars2.githubusercontent.com/u/9597815?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mohamed Rezk</b></sub></a><br /><a href="https://github.com/cpp-lln-lab/localizer_visual_motion/commits?author=mohmdrezk" title="Code">💻</a> <a href="#design-mohmdrezk" title="Design">🎨</a> <a href="#ideas-mohmdrezk" title="Ideas, Planning, & Feedback">🤔</a></td>
160+
<td align="center"><a href="https://github.com/marcobarilari"><img src="https://avatars3.githubusercontent.com/u/38101692?v=4?s=100" width="100px;" alt=""/><br /><sub><b>marcobarilari</b></sub></a><br /><a href="https://github.com/cpp-lln-lab/localizer_visual_motion/commits?author=marcobarilari" title="Code">💻</a> <a href="#design-marcobarilari" title="Design">🎨</a> <a href="#ideas-marcobarilari" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/cpp-lln-lab/localizer_visual_motion/issues?q=author%3Amarcobarilari" title="Bug reports">🐛</a> <a href="#userTesting-marcobarilari" title="User Testing">📓</a> <a href="https://github.com/cpp-lln-lab/localizer_visual_motion/pulls?q=is%3Apr+reviewed-by%3Amarcobarilari" title="Reviewed Pull Requests">👀</a> <a href="#question-marcobarilari" title="Answering Questions">💬</a> <a href="#infra-marcobarilari" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-marcobarilari" title="Maintenance">🚧</a></td>
161+
<td align="center"><a href="https://remi-gau.github.io/"><img src="https://avatars3.githubusercontent.com/u/6961185?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Remi Gau</b></sub></a><br /><a href="https://github.com/cpp-lln-lab/localizer_visual_motion/commits?author=Remi-Gau" title="Code">💻</a> <a href="#design-Remi-Gau" title="Design">🎨</a> <a href="#ideas-Remi-Gau" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/cpp-lln-lab/localizer_visual_motion/issues?q=author%3ARemi-Gau" title="Bug reports">🐛</a> <a href="#userTesting-Remi-Gau" title="User Testing">📓</a> <a href="https://github.com/cpp-lln-lab/localizer_visual_motion/pulls?q=is%3Apr+reviewed-by%3ARemi-Gau" title="Reviewed Pull Requests">👀</a> <a href="#question-Remi-Gau" title="Answering Questions">💬</a> <a href="#infra-Remi-Gau" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-Remi-Gau" title="Maintenance">🚧</a></td>
162+
<td align="center"><a href="https://github.com/CerenB"><img src="https://avatars1.githubusercontent.com/u/10451654?v=4?s=100" width="100px;" alt=""/><br /><sub><b>CerenB</b></sub></a><br /><a href="https://github.com/cpp-lln-lab/localizer_visual_motion/issues?q=author%3ACerenB" title="Bug reports">🐛</a> <a href="#userTesting-CerenB" title="User Testing">📓</a></td>
163+
<td align="center"><a href="https://github.com/iqrashahzad14"><img src="https://avatars.githubusercontent.com/u/75671348?v=4?s=100" width="100px;" alt=""/><br /><sub><b>iqrashahzad14</b></sub></a><br /><a href="https://github.com/cpp-lln-lab/localizer_visual_motion/commits?author=iqrashahzad14" title="Code">💻</a> <a href="#ideas-iqrashahzad14" title="Ideas, Planning, & Feedback">🤔</a></td>
166164
</tr>
167165
</table>
168166

169-
<!-- markdownlint-enable -->
167+
<!-- markdownlint-restore -->
170168
<!-- prettier-ignore-end -->
169+
171170
<!-- ALL-CONTRIBUTORS-LIST:END -->
172171

173-
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
172+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Documentation

initEnv.m

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
%
2-
% 1 - Check if version requirements
3-
% are satisfied and the packages are
4-
% are installed/loaded:
5-
% Octave > 4
6-
% - image
7-
% - optim
8-
% - struct
9-
% - statistics
10-
%
11-
% MATLAB >= R2015b
12-
%
13-
% 2 - Add project to the O/M path
1+
% (C) Copyright 2020 Agah Karakuzu
2+
% (C) Copyright 2019 CPP visual motion localizer developpers
143

154
function initEnv
5+
% 1 - Check if version requirements
6+
% are satisfied and the packages are
7+
% are installed/loaded:
8+
% Octave > 4
9+
% - image
10+
% - optim
11+
% - struct
12+
% - statistics
13+
%
14+
% MATLAB >= R2015b
15+
%
16+
% 2 - Add project to the O/M path
1617

1718
octaveVersion = '4.0.3';
1819
matlabVersion = '8.6.0';
@@ -56,8 +57,8 @@
5657

5758
if numel(dir(libDirectory)) <= 2 % Means that the external is empty
5859
error(['Git submodules are not cloned!', ...
59-
'Try this in your terminal:', ...
60-
' git submodule update --recursive ']);
60+
'Try this in your terminal:', ...
61+
' git submodule update --recursive ']);
6162
else
6263
addDependencies();
6364
end

lib/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# External libraries and dependencies

lib/miss_hit.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# This is here to keep pre-commit-ci from going ape and running on the content
2+
# of this folder.
3+
enable: false

0 commit comments

Comments
 (0)