You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,12 @@ This task is modeled on previous work, including the following (most relevant) r
8
8
-https://pubmed.ncbi.nlm.nih.gov/34704176/
9
9
-https://pubmed.ncbi.nlm.nih.gov/33885965/
10
10
11
+
### Integration (triggering)
12
+
- The session can be triggered to start by keypress values defined in the [configuration file](#configuration-file)
13
+
- Each trial start/stop can also be synchronized with external devices through serial port triggering (or emulated serial port)
14
+
- a single trigger message is sent to the external device (e.g, arduino) for both start and stop: `byte[] TRIGGER_MESSAGE = {'1','\n'}`
15
+
- the generated [output file](#output) will contain a triggersOut field with times and values indicating start (`'0'`) and stop (`'1'`)
16
+
11
17
## Build
12
18
The application is built with Maven 3
13
19
@@ -22,7 +28,9 @@ This will generate a runnable jar in the `target` folder
22
28
## Run
23
29
This application uses Java 17. Make sure it is installed before running the application.
24
30
25
-
- if you are running this on a linux system, you will require explicit access to the incoming data from ports {`/dev/ttyACM0`; `/dev/ttyACM1`}. This can be granted by the _system administrator_ providing the user with access to the `dialout` group with `sudo usermod -a -G dialout theUserNameHere`
31
+
- if you are running this on a linux system, you will require explicit access to the incoming data from ports {`/dev/ttyACM0`; `/dev/ttyACM1`} and to send triggers out from the program via the serial port if desired {`/dev/ttyACM2`}. This can be granted by the _system administrator_ providing the user with access to the `dialout` group with `sudo usermod -a -G dialout theUserNameHere`
32
+
- to ensure that you are recording from the correct devices __always__ plug the devices in to the USB ports in the same order `(left, right)` and you **must** attach the trigger output device last
33
+
- this allows you to ensure that you are always aware of which device is which
26
34
27
35
### Installing Java17 (linux)
28
36
Java 11 may still be the default for Ubuntu-based OSs, so you must install it explicitly
@@ -39,7 +47,7 @@ Once a JDK or JRE is installed, run
This will start a window where you can load a [configuration file](#configuration-file) for a session.
45
53
There is a list of [runtime flags](#runtime-flags) that let you customize some aspects of the application
@@ -72,12 +80,13 @@ If the parameter is missing, the session will start as soon as the experimenter
72
80
`blocks.trials`: A list of references to the sequences that define each trial. The referenced sequence has to exist in
73
81
the top-level pool of sequences
74
82
`sequences`: A pool of sequences that can be referenced in blocks' trials. Each sequence has the values for the reference
75
-
bar and a frequency in Hz that defines the speed of the sequence
83
+
bar and a frequency in milliseconds that defines the speed of the sequence. Each value of the sequence is displayed for this length of time.
84
+
- a sequence must be made up of at least two timepoints (i.e., two height values) to ensure correct timing of feedback at the end of the block
76
85
77
86
### Runtime flags
78
87
Runtime flags are JVM System Properties that control some behaviour of the application
79
88
To pass a system property, use the `-Dproperty=value` syntax before the jar name that's standard in java applications. For
80
-
example, to enable debug mode: `java -jar -Ddebug=true target/spft-1.0-SNAPSHOT-jar-with-dependencies.jar`
89
+
example, to enable debug mode: `java -jar -Ddebug=true target/spft-1.3-SNAPSHOT-jar-with-dependencies.jar`
81
90
82
91
`debug`: Enables extra verbose logging and panel coloured backgrounds to see where each panel ends
83
92
`spft.forceData.smoothWindowSize`: The number of samples in the averaging window to calculate the height of the force bar. Default: 1
@@ -117,7 +126,8 @@ relative to the other times in the session
117
126
`blocks.trials`: A list of the presentation values and their actual timestamps using a CPU clock
118
127
`blocks.endTimestamp`: The end of the block using a CPU clock
119
128
`devices`: A list of hardware force devices with each element containing the full stream of data starting when one of the triggers is received
120
-
`triggers`: A lif of triggers received throughout the session
129
+
`triggers`: A list of triggers received throughout the session
130
+
`triggersOut`: If present, indicates serial out hardware device and port name for triggers sent to arduino. Contains the times and values for each trigger
Copy file name to clipboardExpand all lines: spft/2022_06_Trial_by_trial_Bx.ipynb
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
"cells": [
3
3
{
4
4
"cell_type": "code",
5
-
"execution_count": 2,
5
+
"execution_count": 3,
6
6
"metadata": {},
7
7
"outputs": [
8
8
{
@@ -11,6 +11,14 @@
11
11
"text": [
12
12
"Populating the interactive namespace from numpy and matplotlib\n"
13
13
]
14
+
},
15
+
{
16
+
"name": "stderr",
17
+
"output_type": "stream",
18
+
"text": [
19
+
"/opt/quarantine/miniforge/envs/py3p9/lib/python3.9/site-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.23.3\n",
20
+
" warnings.warn(f\"A NumPy version >={np_minversion} and <{np_maxversion}\"\n"
0 commit comments