Skip to content

Commit 0f9eeaa

Browse files
committed
Redesign landing page and task explorer
1 parent dbcb898 commit 0f9eeaa

46 files changed

Lines changed: 4339 additions & 422 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

public/readmes/ANT.md

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
# Attention Network Test (ANT)
2+
![Maturity: smoke_tested](https://img.shields.io/badge/Maturity-smoke_tested-d97706?style=for-the-badge&labelColor=c2410c)
3+
4+
5+
| Field | Value |
6+
| -------------------- | ------------------------------------------ |
7+
| Name | Attention Network Test (ANT) |
8+
| Version | main (1.0) |
9+
| URL / Repository | https://github.com/TaskBeacon/ANT |
10+
| Short Description | A task measuring alerting, orienting, and executive control networks. |
11+
| Created By | Zhipeng Cao (zhipeng30@foxmail.com) |
12+
| Date Updated | 2025/07/29 |
13+
| PsyFlow Version | 0.1.0 |
14+
| PsychoPy Version | 2025.1.1 |
15+
| Modality | Behavior/EEG |
16+
| Language | Chinese |
17+
| Voice Name | zh-CN-YunyangNeural |
18+
19+
## 1. Task Overview
20+
21+
The Attention Network Test (ANT) is a classic experimental paradigm used to assess the efficiency of three distinct attentional networks: alerting, orienting, and executive control. Participants are presented with a central target stimulus (an arrow) flanked by other stimuli (arrows). They are instructed to respond to the direction of the central target while ignoring the flanking stimuli. The task measures how efficiently a participant can focus on a target and filter out distracting information, and how warning and spatial cues affect their performance.
22+
23+
## 2. Task Flow
24+
25+
### Block-Level Flow
26+
27+
| Step | Description |
28+
| -------------------------- | --------------------------------------------------------------------------- |
29+
| Load Config | Load task configuration from `config.yaml`. |
30+
| Collect Subject Info | Display a form to collect participant demographics. |
31+
| Setup Triggers | Initialize the trigger sender for EEG/fMRI synchronization. |
32+
| Initialize Window/Input | Create the PsychoPy window and keyboard handler. |
33+
| Load Stimuli | Load all visual stimuli defined in the config using `StimBank`. |
34+
| Show Instructions | Present task instructions to the participant. |
35+
| Loop Over Blocks | For each block: run trials, then compute and show block-level feedback. |
36+
| Show Goodbye | Display a final thank you message. |
37+
| Save Data | Save all recorded trial data to a CSV file. |
38+
| Close | Close the trigger port and quit PsychoPy. |
39+
40+
### Trial-Level Flow
41+
42+
| Step | Description |
43+
| ------------------- | --------------------------------------------------------------------------- |
44+
| Fixation | Show a central fixation cross `(+)`. |
45+
| Cue (Optional) | A cue may appear to alert the participant (center cue), direct their attention (spatial cue), or both (double cue). |
46+
| Stimulus | Present the Flanker stimulus (e.g., `>>><>>`) at either the top or bottom of the screen. |
47+
| Response | Record the participant's key press (`left` or `right`). |
48+
| Feedback | Display feedback (`Correct`, `Incorrect`, or `Too Slow`). |
49+
| ITI | A blank screen shown for a random duration before the next trial. |
50+
51+
## 3. Configuration Summary
52+
53+
### a. Subject Info
54+
55+
| Field | Meaning |
56+
| ---------- | -------------------------- |
57+
| subject_id | Unique participant ID (3 digits). |
58+
| subname | Participant's name (Pinyin). |
59+
| age | Participant's age. |
60+
| gender | Participant's gender. |
61+
62+
### b. Window Settings
63+
64+
Standard PsychoPy window settings for fullscreen display.
65+
66+
### c. Stimuli
67+
68+
| Name | Type | Description |
69+
| ------------------------ | ------- | --------------------------------------------- |
70+
| fixation | text | Central cross `+`. |
71+
| cue_up | text | Cue `*` at the top of the screen. |
72+
| cue_down | text | Cue `*` at the bottom of the screen. |
73+
| cue_center | text | Cue `*` at the center of the screen. |
74+
| congruent_up_left | text | `<<<<<` at the top of the screen. |
75+
| congruent_up_right | text | `>>>>>` at the top of the screen. |
76+
| incongruent_up_left | text | `>><>>` at the top of the screen. |
77+
| incongruent_up_right | text | `<<><<` at the top of the screen. |
78+
| congruent_down_left | text | `<<<<<` at the bottom of the screen. |
79+
| congruent_down_right | text | `>>>>>` at the bottom of the screen. |
80+
| incongruent_down_left | text | `>><>>` at the bottom of the screen. |
81+
| incongruent_down_right | text | `<<><<` at the bottom of the screen. |
82+
| correct_feedback | textbox | "正确" (Correct) in green. |
83+
| incorrect_feedback | textbox | "错误" (Incorrect) in red. |
84+
| no_response_feedback | textbox | "太慢" (Too Slow) in orange. |
85+
| instruction_text | textbox | Instructions explaining the task. |
86+
| block_break | text | Inter-block message showing accuracy and RT. |
87+
| good_bye | text | Final thank you message. |
88+
89+
### d. Timing
90+
91+
| Phase | Duration (s) | Config Variable |
92+
| ---------------------- | ----------------- | ----------------- |
93+
| cue | 0.1 | cue_duration |
94+
| fixation | 0.5 | fixation_duration |
95+
| stimulus | 1.0 (max response time) | stim_duration |
96+
| feedback | 0.5 | feedback_duration |
97+
| iti | random 0.8–1.2 | iti_duration |
98+
99+
### e. Triggers
100+
101+
| Event | Code |
102+
| ------------------------------- | ----- |
103+
| exp_onset | 254 |
104+
| exp_end | 255 |
105+
| block_onset | 252 |
106+
| block_end | 253 |
107+
| fixation_onset | 1 |
108+
| center_cue_onset | 11 |
109+
| double_cue_onset | 12 |
110+
| spatial_cue_up_onset | 13 |
111+
| spatial_cue_down_onset | 14 |
112+
| stim_1111 | 21 |
113+
| stim_1112 | 22 |
114+
| stim_1121 | 23 |
115+
| stim_1122 | 24 |
116+
| stim_1211 | 25 |
117+
| stim_1212 | 26 |
118+
| stim_1221 | 27 |
119+
| stim_1222 | 28 |
120+
| stim_2111 | 31 |
121+
| stim_2112 | 32 |
122+
| stim_2121 | 33 |
123+
| stim_2122 | 34 |
124+
| stim_2211 | 35 |
125+
| stim_2212 | 36 |
126+
| stim_2221 | 37 |
127+
| stim_2222 | 38 |
128+
| stim_3111 | 41 |
129+
| stim_3112 | 42 |
130+
| stim_3121 | 43 |
131+
| stim_3122 | 44 |
132+
| stim_3211 | 45 |
133+
| stim_3212 | 46 |
134+
| stim_3221 | 47 |
135+
| stim_3222 | 48 |
136+
| stim_4111 | 51 |
137+
| stim_4112 | 52 |
138+
| stim_4121 | 53 |
139+
| stim_4122 | 54 |
140+
| stim_4211 | 55 |
141+
| stim_4212 | 56 |
142+
| stim_4221 | 57 |
143+
| stim_4222 | 58 |
144+
| left_key_press | 201 |
145+
| right_key_press | 202 |
146+
| feedback_correct_response | 221 |
147+
| feedback_incorrect_response | 222 |
148+
| feedback_no_response | 223 |
149+
| feedback_onset | 230 |
150+
151+
## 4. Methods (for academic publication)
152+
153+
In this experiment, participants performed an Attention Network Test (ANT) to assess the efficiency of three attentional networks: alerting, orienting, and executive control. Each trial began with a central fixation cross, displayed for 500 ms. On some trials, a cue was presented for 100ms prior to the target. This cue could be a central cue (an asterisk at fixation), a double cue (asterisks at both possible target locations), a spatial cue (an asterisk at the location of the upcoming target), or no cue. Subsequently, a row of five arrows was presented at either the top or bottom of the screen for up to 1000 ms or until a response was made. Participants were instructed to respond to the direction of the central arrow while ignoring the flanking arrows by pressing the 'f' key for a left-pointing central arrow or the 'j' key for a right-pointing central arrow. Following their response, feedback was provided for 500 ms, indicating whether the response was correct, incorrect, or too slow.
154+
155+
The task included two types of stimuli: congruent trials, where all arrows pointed in the same direction (e.g., '>>>>>' or '<<<<<'), and incongruent trials, where the flanking arrows pointed in the opposite direction from the central target arrow (e.g., '>><>>' or '<<><<'). These conditions were presented in a randomized order within each block. The task was structured into 4 blocks of 96 trials each (total 384 trials), with equal numbers of each condition. After each block, participants received feedback on their accuracy and were given the opportunity to rest before continuing to the next block. The inter-trial interval varied randomly between 800 and 1200 ms to prevent anticipatory responses.
156+
157+
This design allows for the examination of the three attentional networks by calculating the following subtractions in reaction time:
158+
159+
* **Alerting Effect:** No Cue RT - Double Cue RT
160+
* **Orienting Effect:** Center Cue RT - Spatial Cue RT
161+
* **Executive Control Effect (Flanker Effect):** Incongruent RT - Congruent RT
162+
163+
## 5. References
164+
165+
1. Fan, J., McCandliss, B. D., Sommer, T., Raz, a., & Posner, M. I. (2002). Testing the efficiency and independence of attentional networks. *Journal of Cognitive Neuroscience*, 14(3), 340-347.
166+
2. Eriksen, B. A., & Eriksen, C. W. (1974). Effects of noise letters upon the identification of a target letter in a nonsearch task. *Perception & Psychophysics*, 16(1), 143-149.

public/readmes/H000001-ax-cpt.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# H000001 AX-CPT
2+
3+
HTML/browser preview of the AX-CPT task built with `psyflow-web`.
4+
The within-trial procedure, task rules, timing, weighted condition generation, and instruction text are aligned to the local `T000001-ax-cpt` task; only the block and trial count are shortened for preview use.
5+
6+
## Layout
7+
8+
This task follows the same TAPS-style separation used by `psyflow` tasks:
9+
10+
- `main.ts`: task-level orchestration
11+
- `config/config.yaml`: declarative task config
12+
- `src/run_trial.ts`: trial-level logic
13+
14+
## Run
15+
16+
From [psyflow-web](/e:/xhmhc/TaskBeacon/psyflow-web):
17+
18+
```powershell
19+
npm install
20+
npm run dev
21+
```
22+
23+
Then open:
24+
25+
```text
26+
http://127.0.0.1:4173/?task=H000001-ax-cpt
27+
```

public/readmes/H000006-mid.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# H000006 MID
2+
3+
HTML/browser preview of the Monetary Incentive Delay task built with `psyflow-web`.
4+
The within-trial procedure, timing, controller, and instruction text are aligned to the local `T000006-mid` task; only the block/trial count is shortened for preview use.
5+
6+
## Layout
7+
8+
This task follows the same TAPS-style separation used by `psyflow` tasks:
9+
10+
- `main.ts`: task-level orchestration
11+
- `config/config.yaml`: declarative task config
12+
- `src/run_trial.ts`: trial-level logic
13+
- `src/controller.ts`: adaptive response-window controller
14+
- `src/utils.ts`: task-specific helpers
15+
16+
## Run
17+
18+
From [psyflow-web](/e:/xhmhc/TaskBeacon/psyflow-web):
19+
20+
```powershell
21+
npm install
22+
npm run dev:mid
23+
```
24+
25+
Or open the shared runner directly:
26+
27+
```text
28+
http://127.0.0.1:4173/?task=H000006-mid
29+
```

public/readmes/T000001-ax-cpt.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# AX-CPT Task
2+
3+
![Maturity: smoke_tested](https://img.shields.io/badge/Maturity-smoke_tested-d97706?style=for-the-badge&labelColor=c2410c)
4+
5+
| Field | Value |
6+
|---|---|
7+
| Name | AX-CPT Task |
8+
| Version | main (1.0) |
9+
| URL / Repository | https://github.com/TaskBeacon/T000001-ax-cpt |
10+
| Short Description | A task measuring cognitive control, context processing, and goal maintenance. |
11+
| Created By | Zhipeng Cao (zhipeng30@foxmail.com) |
12+
| Date Updated | 2025/07/25 |
13+
| PsyFlow Version |0.1.0|
14+
| PsychoPy Version |2025.1.1 |
15+
| Modality |Behavior/EEG |
16+
| Language | Chinese |
17+
| Voice Name | zh-CN-YunyangNeural |
18+
19+
## 1. Task Overview
20+
This task is an AX-Continuous Performance Test (AX-CPT) designed to assess cognitive control and context processing. Participants are presented with a series of letter pairs (cue followed by probe). They must make a specific target response only when the cue is an 'A' and the probe is an 'X' (AX trials). For all other combinations (AY, BX, BY), a different response (or no response) is required.
21+
22+
## 2. Task Flow
23+
### Block-Level Flow
24+
| Step | Description |
25+
|---|---|
26+
| 1. Instruction | Instructions are displayed at the beginning of the experiment. |
27+
| 2. Trial Execution | Each block runs for a set number of trials, as defined in `config.yaml`. |
28+
| 3. Block Break | After each block, a break screen is shown with the accuracy for the current block. |
29+
| 4. Goodbye | After all blocks are complete, a "goodbye" message is displayed. |
30+
31+
### Trial-Level Flow
32+
| Step | Description |
33+
|---|---|
34+
| 1. Fixation | A central fixation cross `(+)` is displayed. |
35+
| 2. Cue Presentation | The cue letter (A or B) is presented. |
36+
| 3. Inter-Stimulus Interval (ISI) Fixation | A central fixation cross `(+)` is displayed for a short duration. |
37+
| 4. Probe Presentation & Response | The probe letter (X or Y) is presented, and the participant responds. |
38+
| 4. Feedback | Feedback (`Correct`, `Incorrect`, or `Too Slow`) is displayed. |
39+
| 5. Inter-Trial Interval (ITI) | A blank screen is shown before the next trial. |
40+
41+
## 3. Configuration Summary
42+
### a. Subject Info
43+
| Field | Meaning |
44+
|---|---|
45+
| subject_id | Subject Identifier |
46+
| subname | Subject Name |
47+
| age | Age |
48+
| gender | Gender |
49+
50+
### b. Window Settings
51+
| Parameter | Value |
52+
|---|---|
53+
| size | [1920, 1080] |
54+
| units | deg |
55+
| screen | 1 |
56+
| bg_color | gray |
57+
| fullscreen | True |
58+
| monitor_width_cm | 60 |
59+
| monitor_distance_cm | 72 |
60+
61+
### c. Stimuli
62+
| Name | Type | Description |
63+
|---|---|---|
64+
| fixation | text | Central cross `+`. |
65+
| cue_A | text | The cue letter 'A'. |
66+
| cue_B | text | The cue letter 'B'. |
67+
| probe_X | text | The probe letter 'X'. |
68+
| probe_Y | text | The probe letter 'Y'. |
69+
| correct_feedback | text | "正确" (Correct) in white. |
70+
| incorrect_feedback | text | "错误" (Incorrect) in white. |
71+
| no_response_feedback | text | "未反� (No response) in white. |
72+
| instruction_text | textbox | Instructions explaining the task. |
73+
| instruction_text_voice | voice | Voice instructions for the task. |
74+
| block_break | text | Feedback shown between blocks. |
75+
| good_bye | text | Final message at the end of the task. |
76+
77+
### d. Timing
78+
| Phase | Duration (s) | Config Variable |
79+
|---|---|---|
80+
| fixation | 0.5 | fixation_duration |
81+
| cue | 0.5 | cue_duration |
82+
| isi | 0.5 | isi_duration |
83+
| probe | 1.0 (max response time) | probe_duration |
84+
| feedback | 0.5 | feedback_duration |
85+
| iti | random 0.8�.2 | iti_duration |
86+
87+
### e. Triggers
88+
| Event | Code |
89+
|---|---|
90+
| exp_onset | 98 |
91+
| exp_end | 99 |
92+
| block_onset | 100 |
93+
| block_end | 101 |
94+
| cue_onset | 10 |
95+
| probe_onset | 20 |
96+
| AX_trial_onset | 30 |
97+
| AY_trial_onset | 31 |
98+
| BX_trial_onset | 32 |
99+
| BY_trial_onset | 33 |
100+
| key_press | 40 |
101+
| no_response | 41 |
102+
| feedback_correct_response | 51 |
103+
| feedback_incorrect_response | 52 |
104+
| feedback_no_response | 53 |
105+
| feedback_onset | 60 |
106+
107+
## 4. Methods
108+
Participants perform an AX-CPT task, a continuous performance paradigm used to measure cognitive control and context processing. Each trial consists of a cue letter (A or B) followed by a probe letter (X or Y). Participants are instructed to press the 'f' key if the cue is 'A' and the probe is 'X' (AX trials). For all other cue-probe combinations (AY, BX, BY), they are instructed to press the 'j' key.
109+
110+
The task begins with a fixation cross, displayed for 500ms. The cue letter is then presented for 500ms, followed by a brief inter-stimulus interval (ISI) fixation of 500ms, and then the probe letter for up to 1000ms or until a response is made. Feedback (correct, incorrect, or no response) is provided for 500ms, followed by a randomized inter-trial interval between 800ms and 1200ms.
111+
112+
The task is structured into 4 blocks of 40 trials each (total 160 trials). Trial types (AX, AY, BX, BY) are presented in a randomized order within each block, with a higher proportion of AX trials to establish a strong context. This design allows for the examination of proactive and reactive cognitive control strategies.

0 commit comments

Comments
 (0)