Pre-screening and questionnaires
********************************


Pre-screening tasks
===================

A pre-screening task is a module in the timeline, usually placed
before the main task. The "color_blindness" demo runs one test and
then continues:

   timeline = Timeline(
       ColorBlindnessTest(),
       InfoPage(
           "You passed the color blindness task! Congratulations.", time_estimate=3
       ),
   )


Most built-in tests are trial makers with a performance check at the
end. Each trial is scored, and the participant passes if the total
score reaches "performance_threshold". "ColorBlindnessTest", for
example, has six trials and passes at 4 correct answers by default. A
participant who fails is shown an "UnsuccessfulEndPage", is marked as
failed, and is paid for the time spent so far if the recruiter pays
for partial completion (see Payment). By default their trials in the
test are failed too; set
"fail_trials_on_participant_performance_check=False" on your own tests
to keep them.

To write your own test, see Creating pre-screening tasks.


Built-in tests
--------------

Vision:

* "ColorBlindnessTest": the participant types the number shown in an
  Ishihara image. The image disappears after "hide_after" seconds
  (default 3).

* "ColorVocabularyTest": the participant names the color of a box.
  "colors" sets the colors presented.

[image: Color blindness test][image][image: Color vocabulary
test][image]

Headphones and audio:

* "HugginsHeadphoneTest" (recommended): each trial plays three noises,
  and the participant picks the one with a hidden beep.

* "AntiphaseHeadphoneTest": the participant picks the softest of three
  sounds.

* "BeepHeadphoneTest": the participant picks the sound that differs
  from the other two.

* "AudioForcedChoiceTest": the participant classifies sounds listed in
  a CSV file.

Place "VolumeCalibration" before a headphone test, as in the
"headphone_test" demo.

[image: Headphone check][image]

Language:

* "LexTaleTest": an English lexical decision task.

* "LanguageVocabularyTest": the participant matches a spoken word to
  one of four images, in five languages.

* "WikiVocab" and "BibleVocab" (in "psynet.prescreen.vocabtest"):
  vocabulary tests for many languages.

Attention:

* "AttentionTest": two instruction-following pages.

Tapping, for experiments that use REPP:

* "REPPVolumeCalibrationMusic" and "REPPVolumeCalibrationMarkers":
  volume calibration.

* "REPPTappingCalibration": tapping instructions and calibration.

* "REPPMarkersTest" and "FreeTappingRecordTest": check that the
  participant's hardware records valid tapping data.

Parameters and defaults for each test are in Prescreen.


Questionnaires
==============

The "psynet.demography" package contains demographic questionnaires in
three modules: general demography, the Goldsmiths Musical
Sophistication Index (GMSI), and the PEI confidence scale (see
Demography). Questionnaires and individual questions are timeline
elements and can be placed in any order. The "demography" demo uses
all of them:

   timeline = Timeline(
       BasicDemography(),
       Language(),
       MotherTongues(),
       LanguagesInOrderOfProficiency(),
       BasicMusic(),
       HearingLoss(),
       Dance(),
       SpeechDisorders(),
       Income(),
       ExperimentFeedback(),
       GMSI(),
       PEI(),
   )


General demography
------------------

"general" contains these groups of questions:

* "BasicDemography"

* "Language"

* "BasicMusic"

* "Dance"

* "SpeechDisorders"

* "Income"

* "ExperimentFeedback"

It also contains single-question pages, such as "HearingLoss",
"MotherTongues" and "LanguagesInOrderOfProficiency". The questions in
each group are defined in its source code.


Goldsmiths Musical Sophistication Index (GMSI)
----------------------------------------------

Background on the GMSI is available at https://www.gold.ac.uk/music-
mind-brain/gold-msi and https://shiny.gold-msi.org/gmsi_toplevel/,
which also provides complementary tools and resources.

"GMSI" adds the full questionnaire to the timeline. At the end of the
questionnaire, PsyNet saves the scores in the participant variable
named after the module's "label" (""gmsi"" by default). The value
contains "response_scores" (the score for each question) and
"mean_scores_per_scale". Give each instance a different "label" when
the timeline contains more than one GMSI.

"GMSI(short_version=True)" uses a short version with 29 questions. It
corresponds to the short version implemented in the psyquest
psychTestR package and includes a subset of questions from every
subscale.

The GMSI has six subscales:

* Active Engagement

* Perceptual Abilities

* Musical Training

* Singing Abilities

* Emotions

* General

and three additional items: Instrument, Start Age, and Absolute Pitch.
Pass a list of these names as "subscales" to include only those
subscales; this overrides "short_version".


PEI (confidence scale)
----------------------

"PEI" measures the participant's confidence. The questions are listed
in its source code.


Introductory page
-----------------

"GMSI" and "PEI" begin with a default introductory page. To replace
it, pass an "InfoPage" as "info_page".
