1.1.5 • Published 4 years ago

behavioral-task-trials v1.1.5

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

Behavioral Task Trials

All-in-one starter app with behavioral task trials

Modules

countdown

Builds a countdown transition with the given text and number of seconds.

ParamTypeDescription
textstringOptional text for the countdown.
timenumberThe number of seconds for the countdown.
durationnumberThe trial duration .
responseEndsTrialbooleanTrue if the trial ends on response,false if the trial waits for the duration.

fixation

Builds a trial with a fixation dot and optional photodiode box.

ParamTypeDescription
durationnumberThe trial duration in milliseconds.
configobjectThe configuration object for USE_PHOTODIODE, USE_EEG, IS_ELECTRON and USE_MTURK flags.
responseEndsTrialbooleanTrue if the trial ends on response,false if the trial waits for the duration, by default false value.
taskCodenumberTask code to be saved into data log and for pdSpotEncode, which by default is null and is passed when config has USE_PHOTODIODE set true.
numBlinksnumberNumber of times the pulse needs to be repeated for photodiode box, when USE_PHOTODIODE is set true. If not set, by default is 1.
buttonsArrayThis array contains the keys that the subject is allowed to press in order to respond to the stimulus. Keys can be specified as their numeric key code or as characters (e.g., 'a', 'q'). The default value of jsPsych.ALL_KEYS means that all keys will be accepted as valid responses. Specifying jsPsych.NO_KEYS will mean that no responses are allowed. If not set, by default is empty array.

showEarnings

Builds a trial which shows formatted dollar earnings(number) with optional photodiode box.

ParamTypeDescription
durationnumberThe trial duration in milliseconds.
configobjectThe configuration object for USE_PHOTODIODE, USE_EEG, IS_ELECTRON and USE_MTURK flags.
earningsnumberFloat earnings to display on screen. If not set, default is random float.
responseEndsTrialbooleanTrue if the trial ends on response,false if the trial waits for the duration, by default false value.
taskCodenumberTask code to be saved into data log and for pdSpotEncode, which by default is null and is passed when config has USE_PHOTODIODE set true.
numBlinksnumberNumber of times the pulse needs to be repeated for photodiode box, when USE_PHOTODIODE is set true. If not set, by default is 1.

showMessage

Builds a trial with a onscreen message, optional buttons and optional phtodiode box

ParamTypeDescription
durationnumberThe trial duration in milliseconds.
configobjectThe configuration object for USE_PHOTODIODE, USE_EEG, IS_ELECTRON and USE_MTURK flags.
messagestringOnscreen message to be shown in the trial, if not set default text is empty.
responseEndsTrialbooleanTrue if the trial ends on response,false if the trial waits for the duration, by default false value.
taskCodenumberTask code to be saved into data log and for pdSpotEncode, which by default is null and is passed when config has USE_PHOTODIODE set true.
numBlinksnumberNumber of times the pulse needs to be repeated for photodiode box, when USE_PHOTODIODE is set true. If not set, by default is 1.
buttonsArrayThis array contains the keys that the subject is allowed to press in order to respond to the stimulus. Keys can be specified as their numeric key code or as characters (e.g., 'a', 'q'). The default value of jsPsych.ALL_KEYS means that all keys will be accepted as valid responses. Specifying jsPsych.NO_KEYS will mean that no responses are allowed. If not set, by default is empty array.

userId

Builds a trial with set Id message and user Id input.

ParamTypeDescription
durationnumberThe trial duration in milliseconds.
configobjectThe configuration object for USE_PHOTODIODE, USE_EEG, IS_ELECTRON and USE_MTURK flags, by default only IS_ELECTRON is set to be true.
setIdMessagestringOnscreen text for setting user id or for the input box to enter patient id.
responseEndsTrialbooleanTrue if the trial ends on response,false if the trial waits for the duration, by default false value.
REACT_APP_PATIENT_IDbooleanThe patient id to show when requesting a patient ID, if not set default is empty.
1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.1

4 years ago

1.0.5

4 years ago

1.1.2

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago