Consents#
- class psynet.consent.AudiovisualConsent(time_estimate=30)[source]#
Bases:
ModuleThe audiovisual consent form.
- Parameters:
time_estimate (
Optional[float]) – Time estimated for the page.
- class AudiovisualConsentPage(time_estimate=30)[source]#
-
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:
blobs: A dictionary of any blobs that were returned from the participant’s browser.metadata: The metadata returned from the participant’s browser.experiment: An instantiation ofpsynet.experiment.Experiment, corresponding to the current experiment.participant: An instantiation ofpsynet.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
BotResponseobject which contains other parameters such asblobsandmetadata.
- class psynet.consent.CAPRecruiterAudiovisualConsent(time_estimate=30)[source]#
Bases:
ModuleThe CAP-Recruiter audiovisual recordings consent form.
- Parameters:
time_estimate (
Optional[float]) – Time estimated for the page.
- class CAPRecruiterAudiovisualConsentPage(time_estimate=30)[source]#
-
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:
blobs: A dictionary of any blobs that were returned from the participant’s browser.metadata: The metadata returned from the participant’s browser.experiment: An instantiation ofpsynet.experiment.Experiment, corresponding to the current experiment.participant: An instantiation ofpsynet.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
BotResponseobject which contains other parameters such asblobsandmetadata.
- class psynet.consent.CAPRecruiterStandardConsent(time_estimate=30)[source]#
Bases:
ModuleThe CAP-Recruiter standard consent form.
- Parameters:
time_estimate (
Optional[float]) – Time estimated for the page.
- class CAPRecruiterStandardConsentPage(time_estimate=30)[source]#
-
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:
blobs: A dictionary of any blobs that were returned from the participant’s browser.metadata: The metadata returned from the participant’s browser.experiment: An instantiation ofpsynet.experiment.Experiment, corresponding to the current experiment.participant: An instantiation ofpsynet.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
BotResponseobject which contains other parameters such asblobsandmetadata.
- class psynet.consent.Consent[source]#
Bases:
EltInherit 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
CAPRecruiterAudiovisualConsentPagefor an example. If you’re sure you want to omit the consent form, include aNoConsentelement in your timeline.
- class psynet.consent.DatabaseConsent(time_estimate=30)[source]#
Bases:
ModuleThe database consent form.
- Parameters:
time_estimate (
Optional[float]) – Time estimated for the page.
- class DatabaseConsentPage(time_estimate=30)[source]#
-
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:
blobs: A dictionary of any blobs that were returned from the participant’s browser.metadata: The metadata returned from the participant’s browser.experiment: An instantiation ofpsynet.experiment.Experiment, corresponding to the current experiment.participant: An instantiation ofpsynet.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
BotResponseobject which contains other parameters such asblobsandmetadata.
- class psynet.consent.LucidConsent(time_estimate=30)[source]#
Bases:
ModuleThe Lucid consent form.
- Parameters:
time_estimate (
Optional[float]) – Time estimated for the page.
- class LucidConsentPage(time_estimate=30)[source]#
-
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:
blobs: A dictionary of any blobs that were returned from the participant’s browser.metadata: The metadata returned from the participant’s browser.experiment: An instantiation ofpsynet.experiment.Experiment, corresponding to the current experiment.participant: An instantiation ofpsynet.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
BotResponseobject which contains other parameters such asblobsandmetadata.
- class psynet.consent.MainConsent(time_estimate=30)[source]#
Bases:
ModuleThe main consent form.
- Parameters:
time_estimate (
Optional[float]) – Time estimated for the page.
- class MainConsentPage(time_estimate=30)[source]#
-
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:
blobs: A dictionary of any blobs that were returned from the participant’s browser.metadata: The metadata returned from the participant’s browser.experiment: An instantiation ofpsynet.experiment.Experiment, corresponding to the current experiment.participant: An instantiation ofpsynet.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
BotResponseobject which contains other parameters such asblobsandmetadata.
- class psynet.consent.NoConsent[source]#
Bases:
Consent,NullEltIf 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:
ModuleThe open science consent form.
- Parameters:
time_estimate (
Optional[float]) – Time estimated for the page.
- class OpenScienceConsentPage(time_estimate=30)[source]#
-
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:
blobs: A dictionary of any blobs that were returned from the participant’s browser.metadata: The metadata returned from the participant’s browser.experiment: An instantiation ofpsynet.experiment.Experiment, corresponding to the current experiment.participant: An instantiation ofpsynet.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
BotResponseobject which contains other parameters such asblobsandmetadata.
- class psynet.consent.PrincetonCAPRecruiterConsent(time_estimate=30)[source]#
Bases:
ModuleThe 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]#
-
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:
blobs: A dictionary of any blobs that were returned from the participant’s browser.metadata: The metadata returned from the participant’s browser.experiment: An instantiation ofpsynet.experiment.Experiment, corresponding to the current experiment.participant: An instantiation ofpsynet.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
BotResponseobject which contains other parameters such asblobsandmetadata.
- class psynet.consent.PrincetonConsent(time_estimate=30)[source]#
Bases:
ModuleThe Princeton University consent form.
- Parameters:
time_estimate (
Optional[float]) – Time estimated for the page.
- class PrincetonConsentPage(time_estimate=30)[source]#
-
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:
blobs: A dictionary of any blobs that were returned from the participant’s browser.metadata: The metadata returned from the participant’s browser.experiment: An instantiation ofpsynet.experiment.Experiment, corresponding to the current experiment.participant: An instantiation ofpsynet.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
BotResponseobject which contains other parameters such asblobsandmetadata.
- class psynet.consent.VoluntaryWithNoCompensationConsent(time_estimate=30)[source]#
Bases:
ModuleThe voluntary participation with no compensation consent form.
- Parameters:
time_estimate (
Optional[float]) – Time estimated for the page.
- class VoluntaryWithNoCompensationConsentPage(time_estimate=30)[source]#
-
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:
blobs: A dictionary of any blobs that were returned from the participant’s browser.metadata: The metadata returned from the participant’s browser.experiment: An instantiation ofpsynet.experiment.Experiment, corresponding to the current experiment.participant: An instantiation ofpsynet.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
BotResponseobject which contains other parameters such asblobsandmetadata.