Prescreen
*********


AttentionTest
=============

class psynet.prescreen.AttentionTest(label='attention_test', pages=2, fail_on='attention_test_1', prompt_1_explanation="\\n            Research on personality has identified characteristic sets of behaviours and cognitive patterns that\\n            evolve from biological and enviromental factors. To show that you are paying attention to the experiment,\\n            please ignore the question below and select the 'Next' button instead.", prompt_1_main='As a person, I tend to be competitive, jealous, ambitious, and somewhat impatient.', prompt_2='What is your favourite color?', attention_test_2_word='attention', time_estimate_per_trial=5.0)

   This is an attention test aimed to identify and remove participants
   who are not paying attention or following the instructions. The
   attention test has 2 pages and researchers can choose whether to
   display the two pages or not, and which information to display in
   each page. Researchers can also choose the conditions to exclude
   particiapnts (determined by "fail_on").

   Parameters:
      * **label** (*string*) -- The label of the AttentionTest module,
        default: "attention_test".

      * **pages** (*int*) -- Whether to display only the first or both
        pages. Possible values: 1 and 2. Default: 2.

      * **fail_on** (*str*) -- The condition for the AttentionTest
        check to fail. Possible values: "attention_test_1",
        "attention_test_2", "any", "both", and *None*. Here, "any"
        means both checks have to be passed by the particpant to
        continue, "both" means one of two checks can fail and the
        participant can still continue, and *None* means both checks
        can fail and the participant can still continue. Default:
        "attention_test_1".

      * **prompt_1_explanation** (*str*) -- The text (including HTML
        code) to display in the first part of the first paragraph of
        the first page. Default: "Research on personality has
        identified characteristic sets of behaviours and cognitive
        patterns that evolve from biological and enviromental factors.
        To show that you are paying attention to the experiment,
        please ignore the question below and select the 'Next' button
        instead."

      * **prompt_1_main** (*str*) -- The text (including HTML code) to
        display in the last paragraph of the first page. Default: "As
        a person, I tend to be competitive, jealous, ambitious, and
        somewhat impatient."

      * **prompt_2** (*str*) -- The text to display on the second
        page. Default: "What is your favourite color?".

      * **attention_test_2_word** (*str*) -- The word that the user
        has to enter on the second page. Default: "attention".

      * **time_estimate_per_trial** (*float*) -- The time estimate in
        seconds per trial, default: 5.0.


AudioForcedChoiceTest
=====================

class psynet.prescreen.AudioForcedChoiceTest(csv_path, answer_options, instructions, question, performance_threshold, label='audio_forced_choice_test', time_estimate_per_trial=8.0, n_stimuli_to_use=None, specific_stimuli=None, trial_class=<class 'psynet.prescreen.AudioForcedChoiceTrial'>)

   The audio forced choice test makes sure that the participant can
   correctly classify a sound. In each trial, the participant hears
   one sound and has to pick one answer from a list. Some use-cases
   where this test can be of use:

   * You only have a few stimuli with ground truth annotation and want
     the participant to annotate the rest. You can use the test to
     make sure that the participant is capable to classify the stimuli
     correctly.

   * You implemented an experiment that assumes participants are able
     to classify sounds (e.g., which bird sings the played bird song)

   * During the main experiment, participants record themselves
     reading a sentence. There can be issues with the recording e.g.,
     the participant misreads the sentence. Familiarizing the
     participants with these kind of errors beforehand can raise
     awareness of these issues. Furthermore, participants can be under
     the impression that their own recordings are being rated by
     others, which might increase motivation to do the task properly.

   Parameters:
      * **csv_path** ("str") -- The path to a valid csv file with
        headers. The file must contain the two columns *url* and
        *answer*. The URLs are passed to the browser unchanged, so
        participants can read them; make sure the file names don't
        reveal the answer.

      * **answer_options** ("list") -- List of answer options.

      * **instructions** ("str") -- Text of initial instruction page.
        It is shown as HTML, so it may contain tags; do not build it
        from participant-provided text.

      * **question** ("str") -- Question asked at every trial of the
        test. If the table already contains a column *question* this
        value will be taken.

      * **performance_threshold** ("int") -- The performance
        threshold. The amount of mistakes the participant is allowed
        to make before failing the performance check.

      * **label** -- The label for the audio forced choice check,
        default: "audio_forced_choice_test".

      * **time_estimate_per_trial** ("float") -- The time estimate in
        seconds per trial, default: 8.

      * **n_stimuli_to_use** ("Optional"["int"]) -- If None, all
        stimuli are used (default). If integer is supplied, n random
        stimuli are taken.

      * **specific_stimuli** ("Optional"["List"]) -- If None, all
        stimuli are used (default). If list of indexes is supplied,
        only indexes are used.

      * **trial_class** -- Trial class to use, default:
        AudioForcedChoiceTrial.

   property introduction

      The type of the None singleton.

class psynet.prescreen.AudioForcedChoiceTrial(*args, **kwargs)

   Trial class for "AudioForcedChoiceTest": plays the "stimulus" asset
   and shows answer buttons.

   The node definition holds the CSV row plus "question" and
   "answer_options". A trial scores 1 if the answer equals
   "definition["answer"]" and 0 otherwise. Subclass it and override
   "show_trial()" to customize the page.

   complete

      Whether the trial has been completed (i.e. received a response
      from the participant). It is set once all of "show_trial()"'s
      pages have ended, before "show_feedback()", and also when a
      barrier's release ends the trial's page in "waiting_logic"
      before it is answered, in which case the trial is failed with
      "failed_reason="interrupted_by_release"", not finalized, and
      gets no "show_feedback()". The user should not typically change
      this directly.

   creation_time

      the time at which the Network was created.

   failed

      boolean indicating whether the Network has failed which prompts
      Dallinger to ignore it unless specified otherwise. Objects are
      usually failed to indicate something has gone wrong.

   failed_reason

      an optional reason the object was failed. If the object is
      failed as part of a cascading failure triggered from another
      object, the chain of objects will be captured in this field.

   group_round

      The "SyncGroupRound" this trial was played in, shared with the
      trials of the other members in the round, or "None" for
      ungrouped trials. Its "var" holds the group's results for the
      round, and "group_round.trials" the partners' trials.

   id

      a unique number for every entry. 1, 2, 3 and so on...

   position

      Zero-based creation position among all trials from this trial
      maker for the participant, or, for trials made by "Trial.cue()",
      among the participant's trials in the same module.

   score_answer(answer, definition)

      Scores the participant's answer. At the point that this method
      is called, any pending async jobs should already have been
      completed.

      Parameters:
         * **answer** -- The answer provided to the trial.

         * **definition** -- The trial's definition

      Returns:
         * *A numeric score quantifying the participant's success.*

         * *The experimenter is free to decide the directionality*

         * *(whether high scores are better than low scores, or vice
           versa).*

         * Alternatively, "None" indicating no score.

   show_trial(experiment, participant)

      Returns a "Page" object, or alternatively a list of such
      objects, that solicits an answer from the participant.

      Parameters:
         * **experiment** -- An instantiation of
           "psynet.experiment.Experiment", corresponding to the
           current experiment.

         * **participant** -- An instantiation of
           "psynet.participant.Participant", corresponding to the
           current participant.

   sync_group_id

      The group of the trial maker's (or, for cued trials, the trial
      class's) "sync_group_type" that the participant was in when the
      trial was created, kept after the group ends.

   sync_group_outcome

      when the trial maker prepares the group's next trials,
      ""stayed"" is written on the complete trials of the members
      still in the group. "None" while nothing has happened yet, and
      for ungrouped trials.

      Type:
         How the group's round ended for this player, for a trial in a
         group's round ("group_round"), one of "SyncGroupOutcome". It
         is written during the trial's pages, that is, before
         "complete" is set

      Type:
         ""stayed"" once a "GroupBarrier" in those pages, such as in
         "show_trial()", releases the group with the player in it,
         after which it doesn't change. Before that, why the player
         left the group, one of the reasons of "remove_participant()",
         such as ""late"", ""waited_too_long"", ""left_experiment"" or
         ""group_dissolved"" or ""removed_by_experimenter"". Leaving
         after a release, for example by being late at a later
         barrier, shows in "sync_group_removal_reason()" and in the
         "left" of the next barrier's "on_release" instead. Barriers
         and departures after the trial's pages, such as in
         "show_feedback()" or between rounds, write nothing. The
         exception is a trial maker's round that no barrier in the
         trial's pages released

   sync_group_role

      The participant's role in "sync_group_id", if a Regrouper gave
      one.

   sync_group_round

      Which round of "sync_group_id" this trial belongs to, counted
      from 0. A member who joined the group late shares the group's
      numbers. In a trial maker, a leader told to wait gives the group
      no trials, so the followers wait too and no number is used up.
      It equals the "number" of "group_round".

   sync_group_round_id

      ID of "group_round".

   time_of_death

      the time at which failing occurred

   type

   vars


BrowserCapabilityCheck
======================

class psynet.prescreen.BrowserCapabilityCheck(capabilities, label='browser_capability_check')

   Prescreener that tests the participant's browser against declared
   capability requirements and terminates with "UnsuccessfulEndPage"
   if any check fails.

   PsyNet inserts this module at the start of the timeline
   automatically when "Experiment.browser_capabilities" is non-empty;
   see "get_browser_capability_check()" for how to customize or
   disable that.

   Parameters:
      * **capabilities** (*iterable** of **str*) -- Capability tokens
        to test, typically "Experiment.browser_capabilities".

      * **label** (*str*) -- Module label, also used as the failure
        tag.


ColorBlindnessTest
==================

class psynet.prescreen.ColorBlindnessTest(label='color_blindness_test', media_url='https://s3.amazonaws.com/ishihara-eye-test/jpg', time_estimate_per_trial=5.0, performance_threshold=4, hide_after=3.0, trial_class=<class 'psynet.prescreen.ColorBlindnessTrial'>)

   The color blindness test checks the participant's ability to
   perceive colors. In each trial an image is presented which contains
   a number and the participant must enter the number that is shown
   into a text box. The image disappears after 3 seconds by default,
   which can be adjusted by providing a different value in the
   "hide_after" parameter.

   Parameters:
      * **label** (*string*) -- The label for the color blindness
        test, default: "color_blindness_test".

      * **media_url** (*string*) -- The url under which the images to
        be displayed can be referenced, default:
        "https://s3.amazonaws.com/ishihara-eye-test/jpg". Files under
        that prefix are public, for example https://s3.amazonaws.com
        /ishihara-eye-test/jpg/ishihara-1.jpg. The experiment server
        downloads http(s) files from here and serves them under opaque
        URLs; other URLs are passed to the browser unchanged,
        revealing the file names.

      * **time_estimate_per_trial** (*float*) -- The time estimate in
        seconds per trial, default: 5.0.

      * **performance_threshold** (*int*) -- The performance
        threshold, default: 4.

      * **hide_after** (*float**, **optional*) -- The time in seconds
        after which the image disappears, default: 3.0.

      * **trial_class** -- Trial class to use, default:
        ColorBlindnessTrial.

   property introduction

      The type of the None singleton.


ColorVocabularyTest
===================

class psynet.prescreen.ColorVocabularyTest(label='color_vocabulary_test', time_estimate_per_trial=5.0, performance_threshold=4, colors=None, trial_class=<class 'psynet.prescreen.ColorVocabularyTrial'>)

   The color vocabulary test checks the participant's ability to name
   colors. In each trial, a colored box is presented and the
   participant must choose from a set of colors which color is
   displayed in the box. The colors which are presented can be freely
   chosen by providing an optional "colors" parameter. See the
   documentation for further details.

   Parameters:
      * **label** (*string*) -- The label for the color vocabulary
        test, default: "color_vocabulary_test".

      * **time_estimate_per_trial** (*float*) -- The time estimate in
        seconds per trial, default: 5.0.

      * **performance_threshold** (*int*) -- The performance
        threshold, default: 4.

      * **colors** (*list**, **optional*) -- A list of tuples each
        representing one color option. The tuples are of the form
        ("color-name", [H, S, L]) corresponding to hue, saturation,
        and lightness. Hue takes integer values in [0-360]; saturation
        and lightness take integer values in [0-100]. Default: the
        list of the six colors "turquoise", "magenta", "granite",
        "ivory", "maroon", and "navy".

      * **trial_class** -- Trial class to use, default:
        ColorBlindnessTrial.

   property introduction

      The type of the None singleton.


HugginsHeadphoneTest
====================

class psynet.prescreen.HugginsHeadphoneTest(label='huggins_headphone_test', media_url=None, time_estimate_per_trial=7.5, performance_threshold=4, n_trials=6)

   Implements: Milne, A.E., Bianco, R., Poole, K.C. et al. An online
   headphone screening test based on dichotic pitch. Behav Res 53,
   1551–1562 (2021). https://doi.org/10.3758/s13428-020-01514-0

   Participants pass when at least "performance_threshold" (default 4)
   of the "n_trials" (default 6) answers are correct. Bots answer
   correctly unless "bot.var.is_good_bot" is "False", in which case
   every answer is wrong.

   get_trial_class(node=None, participant=None, experiment=None)

      Returns the class of trial to be used for this trial maker.

      This must return a trial class for every eligible selection.
      Filter unavailable values in the concrete trial maker's
      eligibility hooks instead of returning "None" here. Synchronized
      follower trials reuse the leader trial's concrete class and do
      not call this hook again.


BeepHeadphoneTest
=================

class psynet.prescreen.BeepHeadphoneTest(label='beep_headphone_test', media_url=None, time_estimate_per_trial=7.5, performance_threshold=4, n_trials=6)

   Headphone check in which the participant picks the sound that
   differs from the other two.

   Parameters:
      * **label** (*str*) -- Trial maker ID.

      * **media_url** (*str**, **optional*) -- Base URL of the test
        sounds; defaults to PsyNet's hosted copies. The experiment
        server downloads http(s) files from here and serves them under
        opaque URLs; other URLs are passed to the browser unchanged,
        revealing the file names.

      * **time_estimate_per_trial** (*float*) -- Time estimate in
        seconds per trial.

      * **performance_threshold** (*int*) -- Minimum number of correct
        trials needed to pass.

      * **n_trials** (*int*) -- Number of trials.

   get_trial_class(node=None, participant=None, experiment=None)

      Returns the class of trial to be used for this trial maker.

      This must return a trial class for every eligible selection.
      Filter unavailable values in the concrete trial maker's
      eligibility hooks instead of returning "None" here. Synchronized
      follower trials reuse the leader trial's concrete class and do
      not call this hook again.


AntiphaseHeadphoneTest
======================

Deprecated since version 10: Does not work with modern headphones
anymore. It's more a loudness test as it can be completed with
loudspeakers. Use "psynet.prescreen.HugginsHeadphoneTest" instead.

class psynet.prescreen.AntiphaseHeadphoneTest(label='antiphase_headphone_test', media_url=None, time_estimate_per_trial=7.5, performance_threshold=4, n_trials=6)

   Implements: Woods, K. J. P., Siegel, M. H., Traer, J., & McDermott,
   J. H. (2017). Headphone screening to facilitate web-based auditory
   experiments. Attention, perception & psychophysics, 79(7),
   2064–2072. https://doi.org/10.3758/s13414-017-1361-2

   Note: we currently recommend using the HugginsHeadphoneTest
   instead.

   Participants pass when at least "performance_threshold" (default 4)
   of the "n_trials" (default 6) answers are correct. Bots answer
   correctly unless "bot.var.is_good_bot" is "False", in which case
   every answer is wrong.

   get_trial_class(node=None, participant=None, experiment=None)

      Returns the class of trial to be used for this trial maker.

      This must return a trial class for every eligible selection.
      Filter unavailable values in the concrete trial maker's
      eligibility hooks instead of returning "None" here. Synchronized
      follower trials reuse the leader trial's concrete class and do
      not call this hook again.


LanguageVocabularyTest
======================

class psynet.prescreen.LanguageVocabularyTest(label='language_vocabulary_test', language_code='en-US', media_url='https://s3.amazonaws.com/langauge-test-materials', time_estimate_per_trial=5.0, performance_threshold=6, n_trials=7, trial_class=<class 'psynet.prescreen.LanguageVocabularyTrial'>)

   This is a basic language vocabulary test supported in five
   languages (determined by "language_code"): American English (en-
   US), German (de-DE), Hindi (hi-IN), Brazilian Portuguese (pt-BR),
   and Spanish (es-ES). In each trial, a spoken word is played in the
   target language and the participant must decide which of the given
   images in the choice set match the spoked word, from a total of
   four possible images. The materials are the same for all languages.
   The trials are randomly selected from a total pool of 14 trials.

   Parameters:
      * **label** (*string*) -- The label for the language vocabulary
        test, default: "language_vocabulary_test".

      * **language_code** (*string*) -- The language code of the
        target language for the test (en-US, de-DE, hi-IN, pt-BR,sp-
        SP), default: "en-US".

      * **media_url** ("str") -- Location of the test materials,
        default: "https://s3.amazonaws.com/langauge-test-materials".
        The experiment server downloads http(s) files from here and
        serves them under opaque URLs; other URLs are passed to the
        browser unchanged, revealing the file names.

      * **time_estimate_per_trial** (*float*) -- The time estimate in
        seconds per trial, default: 5.0.

      * **performance_threshold** (*int*) -- The performance
        threshold, default: 6.

      * **n_trials** (*float*) -- The total number of trials to
        display, default: 7.

      * **trial_class** -- Trial class to use, default:
        LanguageVocabularyTrial

   property introduction

      The type of the None singleton.


LexTaleTest
===========

class psynet.prescreen.LexTaleTest(label='lextale_test', time_estimate_per_trial=2.0, performance_threshold=8, media_url='https://s3.amazonaws.com/lextale-test-materials', hide_after=1, n_trials=12, trial_class=<class 'psynet.prescreen.LextaleTrial'>)

   This is an adapted version (shorter) of the  original LexTale test,
   which checks participants' English proficiency in a lexical
   decision task: "Lemhöfer, K., & Broersma, M. (2012). Introducing
   LexTALE: A quick and valid lexical test for advanced learners of
   English. Behavior research methods, 44(2), 325-343". In each trial,
   a word is presented for a short period of time (determined by
   "hide_after") and the participant must decide whether the word is
   an existing word in English or it does not exist. The words are
   chosen from the original study, which used and validated highly
   unfrequent words in English to make the task very difficult for
   non-native English speakers. See the documentation for further
   details.

   Parameters:
      * **label** (*string*) -- The label for the LexTale test,
        default: "lextale_test".

      * **time_estimate_per_trial** (*float*) -- The time estimate in
        seconds per trial, default: 2.0.

      * **performance_threshold** (*int*) -- The performance
        threshold, default: 8.

      * **media_url** (*str*) -- Location of the media resources,
        default: "https://s3.amazonaws.com/lextale-test-materials".
        The experiment server downloads http(s) files from here and
        serves them under opaque URLs; other URLs are passed to the
        browser unchanged, revealing the file names.

      * **hide_after** (*float*) -- The time in seconds after the word
        disappears, default: 1.0.

      * **n_trials** (*float*) -- The total number of trials to
        display, default: 12.

      * **trial_class** -- Trial class to use, default: LextaleTrial

   property introduction

      The type of the None singleton.


VocabTest
=========

class psynet.prescreen.vocabtest.VocabTest(locale, label, csv_path, performance_threshold_per_trial, performance_check_type='accuracy', n_trials=1, n_items=30, n_repeat_items=0, show_instructions=True, show_feedback=True, hide_after=2000, lag_between_items=200, use_keyboard=True, use_buttons=False, true_key_button='KeyA', true_key_label='A', false_key_button='KeyL', false_key_label='L', trial_class=<class 'psynet.prescreen.vocabtest.VocabTrial'>, present_as_image=True, font_url='https://psynet.s3.amazonaws.com/resources/fonts/GoNotoKurrent-Bold.ttf', **kwargs)

   A test to check the participant's vocabulary knowledge. The test
   consists of a series of trials, each showing a string of
   characters. The participant has to decide whether the string is an
   existing word in the given language or not. Each string is shown
   for a short time and then disappears. The participant can either
   respond by pressing the corresponding key on the keyboard or by
   clicking the corresponding button on the screen. The test is made
   to work with the vocabulary tests created with the VocabTest
   package by Pol van Rijn (https://github.com/polvanrijn/VocabTest).

   VocabTest does not support synchronized groups. Each participant
   must receive independently chosen items; a follower copy would run
   "finalize_definition" again and pick a different set.

   locale

      The locale of the test. The locale is a two-letter ISO 639-1
      code.

      Type:
         str

   label

      The label of the test.

      Type:
         str

   csv_path

      The path to the CSV file containing the test items.

      Type:
         str

   performance_threshold_per_trial

      Minimal percentage of correct responses. If the participant's
      performance is below this threshold, the participant will be
      disqualified. If set to None, the performance will not be
      checked.

      Type:
         float

   performance_check_type

      The type of performance check. The performance can be checked
      based on accuracy or consistency. If set to "accuracy", the
      performance is checked based on the percentage of correct
      responses. If set to "consistency", the performance is checked
      based on the percentage of consistent responses between the
      first and second presentation of the same item.

      Type:
         str

   n_trials

      The number of trials per participant. Each trial shows a
      sequence of items. By default, the participant will perform one
      trial.

      Type:
         int

   n_items

      The number of items per trial. The number of items must be even.
      The items are randomly selected from the list of real and fake
      words, such that there are an equal number of real and fake
      words. By default, the number of items is set to 30.

      Type:
         int

   n_repeat_items

      The number of repeated items per trial. The repeated items are
      randomly selected from the list of selected items. By default,
      the number of repeated items is set to 0. This parameter is only
      used when the performance check type is set to "consistency".

      Type:
         int

   show_instructions

      Whether to show the instructions at the beginning of the test.
      By default, the instructions are shown.

      Type:
         bool

   show_feedback

      Whether to show the feedback after each trial. By default, the
      feedback is shown.

      Type:
         bool

   hide_after

      The time in milliseconds after which the item disappears. By
      default, the item disappears after 2000 ms.

      Type:
         int

   lag_between_items

      The time in milliseconds between the presentation of items. By
      default, the time between the items is set to 200 ms. This is
      useful to prevent the participant from responding too quickly.

      Type:
         int

   use_keyboard

      Whether to use the keyboard to respond. By default, the keyboard
      is used.

      Type:
         bool

   use_buttons

      Whether to use the buttons to respond. By default, the buttons
      are not used. *use_keyboard* and *use_buttons* are not mutually
      exclusive. If both are set to True, the participant can respond
      using both the keyboard and the buttons. However, *use_buttons*
      is recommended to be set to False because of the response speed,
      however it might be necessary for mobile devices.

      Type:
         bool

   true_key_button

      The key code for the correct answer. By default, the key code is
      "KeyA". Must be a valid key code, see
      https://developer.mozilla.org/en-
      US/docs/Web/API/UI_Events/Keyboard_event_code_values for a list
      of key codes.

      Type:
         str

   true_key_label

      The label for the correct answer. By default, the label is "A"
      (corresponding to the key code "KeyA").

      Type:
         str

   false_key_button

      The key code for the incorrect answer. By default, the key code
      is "KeyL". Must be a valid key code, see
      https://developer.mozilla.org/en-
      US/docs/Web/API/UI_Events/Keyboard_event_code_values for a list
      of key codes.

      Type:
         str

   false_key_label

      The label for the incorrect answer. By default, the label is "L"
      (corresponding to the key code "KeyL").

      Type:
         str

   trial_class

      The class of the trial. By default, the trial class is
      VocabTrial.

      Type:
         ChainTrial

   present_as_image

      Whether to present the items as images or as text. If set to
      True, the items are presented as images. If set to False, the
      items are presented as text. By default, the items are presented
      as images.

      Type:
         bool

   font_url

      The URL to the font to use for rendering the items as images. If
      set to None, the default font is used.

      Type:
         Optional[str]


WikiVocab
=========

class psynet.prescreen.WikiVocab(locale, performance_threshold_per_trial=0.5, **kwargs)

   WikiVocab language test for 60 languages.

   The WikiVocab test is a vocabulary test that checks the
   participant's knowledge of words in a given language. Make sure you
   set the *performance_threshold_per_trial* according to your
   requirements.

   See "VocabTest" for the other arguments.


BibleVocab
==========

class psynet.prescreen.BibleVocab(locale, performance_threshold_per_trial=0.5, **kwargs)

   BibleVocab language test created from the Bible.

   The BibleVocab test is a vocabulary test that checks the
   participant's knowledge of words in a given language. Make sure you
   set the *performance_threshold_per_trial* according to your
   requirements.

   Since the quality of the vocabulary test items is less controlled
   than the WikiVocab test, one can use the "consistency"
   *performance_check_type* instead.

   See "VocabTest" for the other arguments.


FreeTappingRecordTest
=====================

class psynet.prescreen.FreeTappingRecordTest(label='free_tapping_record_test', performance_threshold=0.5, duration_rec_sec=8, min_num_detected_taps=3, n_repeat_trials=1, time_estimate_per_trial=10.0, trial_class=<class 'psynet.prescreen.FreeTappingRecordTrial'>)

   This pre-screening test is designed to quickly determine whether
   participants are able to provide valid tapping data. The task is
   also efficient in determining whether participants are following
   the instructions and use hardware and software that meets the
   technical requirements of REPP. To make the most out of it, the
   test should be used at the beginning of the experiment, after
   providing general instructions. This test is intended for
   unconstrained tapping experiments, where no markers are used. By
   default, we start with a warming up exercise where participants can
   hear their recording. We then perform a test with two trials and
   exclude participants who fail more than once. After the first
   trial, we provide feedback based on the number of detected taps.
   The only exclusion criterion to fail trials is based on the number
   of detected taps, by default set to a minimum of 3 taps. NOTE: this
   test should be given after a volume and a tapping calibration test.

   Parameters:
      * **label** (*string*) -- The label for the test, default:
        "free_tapping_record_test".

      * **performance_threshold** (*float*) -- The performance
        threshold, default: 0.5.

      * **duration_rec_sec** (*float*) -- Length of the recording,
        default: 8 sec.

      * **min_num_detected_taps** (*int*) -- Minimum number of
        detected taps to pass a trial, default: 3.

      * **n_repeat_trials** (*int*) -- Number of trials to repeat in
        the trial maker, default: 1.

      * **time_estimate_per_trial** (*float*) -- The time estimate in
        seconds per trial, default: 10.0.

      * **trial_class** -- Trial class to use.

   property introduction

      The type of the None singleton.


REPPMarkersTest
===============

class psynet.prescreen.REPPMarkersTest(label='repp_markers_test', performance_threshold=0.6, materials_url='https://s3.amazonaws.com/repp-materials', n_trials=3, time_estimate_per_trial=12.0, trial_class=<class 'psynet.prescreen.RecordMarkersTrial'>)

   This markers test is used to determine whether participants are
   using hardware and software that meets the technical requirements
   of REPP, such as malfunctioning speakers or microphones, or the use
   of strong noise-cancellation technologies. To make the most out of
   it, the markers check should be used at the beginning of the
   experiment, after providing general instructions with the technical
   requirements of the experiment. In each trial, the markers check
   plays a test stimulus with six marker sounds. The stimulus is then
   recorded with the laptop's microphone and analyzed using the REPP's
   signal processing pipeline. During the marker playback time,
   participants are supposed to remain silent (not respond).

   Parameters:
      * **label** (*string*) -- The label for the markers check,
        default: "repp_markers_test".

      * **performance_threshold** (*int*) -- The performance
        threshold, default: 1.

      * **materials_url** (*string*) -- The location of the REPP
        materials, default: https://s3.amazonaws.com/repp-materials.

      * **n_trials** (*int*) -- The total number of trials to display,
        default: 3.

      * **time_estimate_per_trial** (*float*) -- The time estimate in
        seconds per trial, default: 12.0.

      * **trial_class** -- The trial class to use, default:
        RecordMarkersTrial

   property introduction

      The type of the None singleton.


REPPTappingCalibration
======================

class psynet.prescreen.REPPTappingCalibration(label='repp_tapping_calibration', time_estimate_per_trial=10.0, min_time_before_submitting=5.0, materials_url='https://s3.amazonaws.com/repp-materials')

   This is a tapping calibration test to be used when implementing SMS
   experiments with REPP. It is also containing the main instructions
   about how to tap using this technology.

   Parameters:
      * **label** (*string*) -- The label for the
        REPPTappingCalibration test, default:
        "repp_tapping_calibration".

      * **time_estimate_per_trial** (*float*) -- The time estimate in
        seconds per trial, default: 10.0.

      * **min_time_before_submitting** (*float*) -- Minimum time to
        wait (in seconds) while the music plays and the participant
        cannot submit a response, default: 5.0.

      * **materials_url** (*string*) -- The location of the REPP
        materials, default: https://s3.amazonaws.com/repp-materials.

   class AudioMeter(calibrate=False, show_next_button=True, min_time=0.0, bot_response=NoArgumentProvided, **kwargs)


REPPVolumeCalibrationMarkers
============================

class psynet.prescreen.REPPVolumeCalibrationMarkers(label='repp_volume_calibration_markers', materials_url='https://s3.amazonaws.com/repp-materials', min_time_on_calibration_page=5.0, time_estimate_for_calibration_page=10.0)

   This is a volume calibration test to be used when implementing SMS
   experiments with metronome sounds and REPP. It contains a page with
   general technical requirements of REPP and it then plays a
   metronome sound to help participants find the right volume to use
   REPP.

   Parameters:
      * **label** (*string*) -- The label for the
        REPPVolumeCalibration test, default:
        "repp_volume_calibration_music".

      * **materials_url** (*string*) -- The location of the REPP
        materials, default: https://s3.amazonaws.com/repp-materials.

      * **min_time_on_calibration_page** (*float*) -- Minimum time (in
        seconds) that the participant must spend on the calibration
        page, default: 5.0.

      * **time_estimate_for_calibration_page** (*float*) -- The time
        estimate for the calibration page, default: 10.0.

   class AudioMeter(calibrate=False, show_next_button=True, min_time=0.0, bot_response=NoArgumentProvided, **kwargs)


REPPVolumeCalibrationMusic
==========================

class psynet.prescreen.REPPVolumeCalibrationMusic(label='repp_volume_calibration_music', materials_url='https://s3.amazonaws.com/repp-materials', min_time_on_calibration_page=5.0, time_estimate_for_calibration_page=10.0)

   This is a volume calibration test to be used when implementing SMS
   experiments with music stimuli and REPP. It contains a page with
   general technical requirements of REPP and a volume calibration
   test with a visual sound meter and stimulus customized to help
   participants find the right volume to use REPP.

   Parameters:
      * **label** (*string*) -- The label for the
        REPPVolumeCalibration test, default:
        "repp_volume_calibration_music".

      * **materials_url** (*string*) -- The location of the REPP
        materials, default: https://s3.amazonaws.com/repp-materials.

      * **min_time_on_calibration_page** (*float*) -- Minimum time (in
        seconds) that the participant must spend on the calibration
        page, default: 5.0.

      * **time_estimate_for_calibration_page** (*float*) -- The time
        estimate for the calibration page, default: 10.0.

   class AudioMeter(calibrate=False, show_next_button=True, min_time=0.0, bot_response=NoArgumentProvided, **kwargs)
