Consents#

class psynet.consent.AudiovisualConsent(time_estimate=30)[source]#

Bases: Module

The audiovisual consent form.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

class AudiovisualConsentPage(time_estimate=30)[source]#

Bases: Page, Consent

This page displays the audiovisual consent page.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

format_answer(raw_answer, **kwargs)[source]#

Formats the raw answer object returned from the participant’s browser.

Parameters:
  • raw_answer – The raw answer object returned from the participant’s browser.

  • **kwargs

    Keyword arguments, including:

    1. blobs: A dictionary of any blobs that were returned from the participant’s browser.

    2. metadata: The metadata returned from the participant’s browser.

    3. experiment: An instantiation of psynet.experiment.Experiment, corresponding to the current experiment.

    4. participant: An instantiation of psynet.participant.Participant, corresponding to the current participant.

Returns:

  • Object – The formatted answer, suitable for serialisation to JSON and storage in the database.

get_bot_response(experiment, bot)[source]#

This function is used when a bot simulates a participant responding to a given page. In the simplest form, the function just returns the value of the answer that the bot returns. For more sophisticated treatment, the function can return a BotResponse object which contains other parameters such as blobs and metadata.

class psynet.consent.CAPRecruiterAudiovisualConsent(time_estimate=30)[source]#

Bases: Module

The CAP-Recruiter audiovisual recordings consent form.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

class CAPRecruiterAudiovisualConsentPage(time_estimate=30)[source]#

Bases: Page, Consent

This page displays the CAP-Recruiter audiovisual consent page.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

format_answer(raw_answer, **kwargs)[source]#

Formats the raw answer object returned from the participant’s browser.

Parameters:
  • raw_answer – The raw answer object returned from the participant’s browser.

  • **kwargs

    Keyword arguments, including:

    1. blobs: A dictionary of any blobs that were returned from the participant’s browser.

    2. metadata: The metadata returned from the participant’s browser.

    3. experiment: An instantiation of psynet.experiment.Experiment, corresponding to the current experiment.

    4. participant: An instantiation of psynet.participant.Participant, corresponding to the current participant.

Returns:

  • Object – The formatted answer, suitable for serialisation to JSON and storage in the database.

get_bot_response(experiment, bot)[source]#

This function is used when a bot simulates a participant responding to a given page. In the simplest form, the function just returns the value of the answer that the bot returns. For more sophisticated treatment, the function can return a BotResponse object which contains other parameters such as blobs and metadata.

class psynet.consent.CAPRecruiterStandardConsent(time_estimate=30)[source]#

Bases: Module

The CAP-Recruiter standard consent form.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

class CAPRecruiterStandardConsentPage(time_estimate=30)[source]#

Bases: Page, Consent

This page displays the CAP-Recruiter standard consent page.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

format_answer(raw_answer, **kwargs)[source]#

Formats the raw answer object returned from the participant’s browser.

Parameters:
  • raw_answer – The raw answer object returned from the participant’s browser.

  • **kwargs

    Keyword arguments, including:

    1. blobs: A dictionary of any blobs that were returned from the participant’s browser.

    2. metadata: The metadata returned from the participant’s browser.

    3. experiment: An instantiation of psynet.experiment.Experiment, corresponding to the current experiment.

    4. participant: An instantiation of psynet.participant.Participant, corresponding to the current participant.

Returns:

  • Object – The formatted answer, suitable for serialisation to JSON and storage in the database.

get_bot_response(experiment, bot)[source]#

This function is used when a bot simulates a participant responding to a given page. In the simplest form, the function just returns the value of the answer that the bot returns. For more sophisticated treatment, the function can return a BotResponse object which contains other parameters such as blobs and metadata.

class psynet.consent.Consent[source]#

Bases: Elt

Inherit from this class to mark a timeline element as being part of a consent form. PsyNet requires you have at least one such element in your timeline, to make sure you don’t forget to include a consent form. See CAPRecruiterAudiovisualConsentPage for an example. If you’re sure you want to omit the consent form, include a NoConsent element in your timeline.

class psynet.consent.DatabaseConsent(time_estimate=30)[source]#

Bases: Module

The database consent form.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

class DatabaseConsentPage(time_estimate=30)[source]#

Bases: Page, Consent

This page displays the database consent page.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

format_answer(raw_answer, **kwargs)[source]#

Formats the raw answer object returned from the participant’s browser.

Parameters:
  • raw_answer – The raw answer object returned from the participant’s browser.

  • **kwargs

    Keyword arguments, including:

    1. blobs: A dictionary of any blobs that were returned from the participant’s browser.

    2. metadata: The metadata returned from the participant’s browser.

    3. experiment: An instantiation of psynet.experiment.Experiment, corresponding to the current experiment.

    4. participant: An instantiation of psynet.participant.Participant, corresponding to the current participant.

Returns:

  • Object – The formatted answer, suitable for serialisation to JSON and storage in the database.

get_bot_response(experiment, bot)[source]#

This function is used when a bot simulates a participant responding to a given page. In the simplest form, the function just returns the value of the answer that the bot returns. For more sophisticated treatment, the function can return a BotResponse object which contains other parameters such as blobs and metadata.

class psynet.consent.LucidConsent(time_estimate=30)[source]#

Bases: Module

The Lucid consent form.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

class LucidConsentPage(time_estimate=30)[source]#

Bases: Page, Consent

This page displays the Lucid consent page.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

format_answer(raw_answer, **kwargs)[source]#

Formats the raw answer object returned from the participant’s browser.

Parameters:
  • raw_answer – The raw answer object returned from the participant’s browser.

  • **kwargs

    Keyword arguments, including:

    1. blobs: A dictionary of any blobs that were returned from the participant’s browser.

    2. metadata: The metadata returned from the participant’s browser.

    3. experiment: An instantiation of psynet.experiment.Experiment, corresponding to the current experiment.

    4. participant: An instantiation of psynet.participant.Participant, corresponding to the current participant.

Returns:

  • Object – The formatted answer, suitable for serialisation to JSON and storage in the database.

get_bot_response(experiment, bot)[source]#

This function is used when a bot simulates a participant responding to a given page. In the simplest form, the function just returns the value of the answer that the bot returns. For more sophisticated treatment, the function can return a BotResponse object which contains other parameters such as blobs and metadata.

class psynet.consent.MainConsent(time_estimate=30)[source]#

Bases: Module

The main consent form.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

class MainConsentPage(time_estimate=30)[source]#

Bases: Page, Consent

This page displays the main consent page.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

format_answer(raw_answer, **kwargs)[source]#

Formats the raw answer object returned from the participant’s browser.

Parameters:
  • raw_answer – The raw answer object returned from the participant’s browser.

  • **kwargs

    Keyword arguments, including:

    1. blobs: A dictionary of any blobs that were returned from the participant’s browser.

    2. metadata: The metadata returned from the participant’s browser.

    3. experiment: An instantiation of psynet.experiment.Experiment, corresponding to the current experiment.

    4. participant: An instantiation of psynet.participant.Participant, corresponding to the current participant.

Returns:

  • Object – The formatted answer, suitable for serialisation to JSON and storage in the database.

get_bot_response(experiment, bot)[source]#

This function is used when a bot simulates a participant responding to a given page. In the simplest form, the function just returns the value of the answer that the bot returns. For more sophisticated treatment, the function can return a BotResponse object which contains other parameters such as blobs and metadata.

class psynet.consent.NoConsent[source]#

Bases: Consent, NullElt

If you want to have no consent form in your timeline, use this element as an empty placeholder.

class psynet.consent.OpenScienceConsent(time_estimate=30)[source]#

Bases: Module

The open science consent form.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

class OpenScienceConsentPage(time_estimate=30)[source]#

Bases: Page, Consent

This page displays the open science consent page.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

format_answer(raw_answer, **kwargs)[source]#

Formats the raw answer object returned from the participant’s browser.

Parameters:
  • raw_answer – The raw answer object returned from the participant’s browser.

  • **kwargs

    Keyword arguments, including:

    1. blobs: A dictionary of any blobs that were returned from the participant’s browser.

    2. metadata: The metadata returned from the participant’s browser.

    3. experiment: An instantiation of psynet.experiment.Experiment, corresponding to the current experiment.

    4. participant: An instantiation of psynet.participant.Participant, corresponding to the current participant.

Returns:

  • Object – The formatted answer, suitable for serialisation to JSON and storage in the database.

get_bot_response(experiment, bot)[source]#

This function is used when a bot simulates a participant responding to a given page. In the simplest form, the function just returns the value of the answer that the bot returns. For more sophisticated treatment, the function can return a BotResponse object which contains other parameters such as blobs and metadata.

class psynet.consent.PrincetonCAPRecruiterConsent(time_estimate=30)[source]#

Bases: Module

The Princeton University consent form to be used in conjunction with CAP-Recruiter.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

class PrincetonCAPRecruiterConsentPage(time_estimate=30)[source]#

Bases: Page, Consent

This page displays the Princeton University consent page to be used in conjunction with CAP-Recruiter.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

format_answer(raw_answer, **kwargs)[source]#

Formats the raw answer object returned from the participant’s browser.

Parameters:
  • raw_answer – The raw answer object returned from the participant’s browser.

  • **kwargs

    Keyword arguments, including:

    1. blobs: A dictionary of any blobs that were returned from the participant’s browser.

    2. metadata: The metadata returned from the participant’s browser.

    3. experiment: An instantiation of psynet.experiment.Experiment, corresponding to the current experiment.

    4. participant: An instantiation of psynet.participant.Participant, corresponding to the current participant.

Returns:

  • Object – The formatted answer, suitable for serialisation to JSON and storage in the database.

get_bot_response(experiment, bot)[source]#

This function is used when a bot simulates a participant responding to a given page. In the simplest form, the function just returns the value of the answer that the bot returns. For more sophisticated treatment, the function can return a BotResponse object which contains other parameters such as blobs and metadata.

class psynet.consent.PrincetonConsent(time_estimate=30)[source]#

Bases: Module

The Princeton University consent form.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

class PrincetonConsentPage(time_estimate=30)[source]#

Bases: Page, Consent

This page displays the Princeton University consent page.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

format_answer(raw_answer, **kwargs)[source]#

Formats the raw answer object returned from the participant’s browser.

Parameters:
  • raw_answer – The raw answer object returned from the participant’s browser.

  • **kwargs

    Keyword arguments, including:

    1. blobs: A dictionary of any blobs that were returned from the participant’s browser.

    2. metadata: The metadata returned from the participant’s browser.

    3. experiment: An instantiation of psynet.experiment.Experiment, corresponding to the current experiment.

    4. participant: An instantiation of psynet.participant.Participant, corresponding to the current participant.

Returns:

  • Object – The formatted answer, suitable for serialisation to JSON and storage in the database.

get_bot_response(experiment, bot)[source]#

This function is used when a bot simulates a participant responding to a given page. In the simplest form, the function just returns the value of the answer that the bot returns. For more sophisticated treatment, the function can return a BotResponse object which contains other parameters such as blobs and metadata.

class psynet.consent.VoluntaryWithNoCompensationConsent(time_estimate=30)[source]#

Bases: Module

The voluntary participation with no compensation consent form.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

class VoluntaryWithNoCompensationConsentPage(time_estimate=30)[source]#

Bases: Page, Consent

This page displays the voluntary participation with no compensation consent page.

Parameters:

time_estimate (Optional[float]) – Time estimated for the page.

format_answer(raw_answer, **kwargs)[source]#

Formats the raw answer object returned from the participant’s browser.

Parameters:
  • raw_answer – The raw answer object returned from the participant’s browser.

  • **kwargs

    Keyword arguments, including:

    1. blobs: A dictionary of any blobs that were returned from the participant’s browser.

    2. metadata: The metadata returned from the participant’s browser.

    3. experiment: An instantiation of psynet.experiment.Experiment, corresponding to the current experiment.

    4. participant: An instantiation of psynet.participant.Participant, corresponding to the current participant.

Returns:

  • Object – The formatted answer, suitable for serialisation to JSON and storage in the database.

get_bot_response(experiment, bot)[source]#

This function is used when a bot simulates a participant responding to a given page. In the simplest form, the function just returns the value of the answer that the bot returns. For more sophisticated treatment, the function can return a BotResponse object which contains other parameters such as blobs and metadata.