from klibs.KLIndependentVariable import IndependentVariableSet
from klibs import P

ObjectBasedCueingEffects_2020_ind_vars = IndependentVariableSet()

ObjectBasedCueingEffects_2020_ind_vars.add_variable('box_alignment', str)
ObjectBasedCueingEffects_2020_ind_vars.add_variable('cue_location', str)
ObjectBasedCueingEffects_2020_ind_vars.add_variable('target_location', str)

ObjectBasedCueingEffects_2020_ind_vars['box_alignment'].add_values(
    'horizontal', 'vertical')
ObjectBasedCueingEffects_2020_ind_vars['cue_location'].add_values(
    'top_left', 'top_right', 'bottom_left', 'bottom_right')
ObjectBasedCueingEffects_2020_ind_vars['target_location'].add_values(
    'cued_location', 'cued_object', 'uncued_adjacent', 'uncued_opposite')

if P.condition == 'keypress':
    ObjectBasedCueingEffects_2020_ind_vars['target_location'].add_value(
        'catch')
Beispiel #2
0
from klibs.KLIndependentVariable import IndependentVariableSet

NP_IOR_ind_vars = IndependentVariableSet()

# Prime items are always presented at the far points of the array,
# Probe items can either appear at the far points, or near points (but not both), respective to fixation
NP_IOR_ind_vars.add_variable('far_or_near', str, ['far', 'near'])
NP_IOR_ind_vars.add_variable('prime_target', int, [1, 2, 3, 4])
NP_IOR_ind_vars.add_variable('prime_distractor', int, [1, 2, 3, 4])
NP_IOR_ind_vars.add_variable('probe_target', int, [1, 2, 3, 4, 5, 6, 7, 8])
NP_IOR_ind_vars.add_variable('probe_distractor', int, [1, 2, 3, 4, 5, 6, 7, 8])


"""
*** SAMPLE CONFIGURATION - REMOVE AFTER FINISHING REAL CONFIG ***

First we create an IndependentVariableSet object that will group together all the independent variables the experiment
will use, like so:

>> NP_IOR_ind_vars = IndependentVariableSet()

Then we create empty variables within this set. At this point we're not providing any values, just a name and a data
type that will tell klibs that this variable exists and what pythonic data type it should expect that variable's values
to hold. In this example we create four variables, one for each type.

>> NP_IOR_ind_vars.add_variable("color", str)
>> NP_IOR_ind_vars.add_variable("size", float)
>> NP_IOR_ind_vars.add_variable("active", bool)
>> NP_IOR_ind_vars.add_variable("count", int)

Finally, we add values to each variable. This can be done one at a time, as in the colors example below:
Beispiel #3
0
from klibs.KLIndependentVariable import IndependentVariableSet

Olivia_2020_ind_vars = IndependentVariableSet()

Olivia_2020_ind_vars.add_variable('cue_type', str)
Olivia_2020_ind_vars.add_variable('tone_trial', bool)

Olivia_2020_ind_vars['cue_type'].add_values('vis_left', 'vis_right',
                                            'temporal', 'temporal', 'no_cue',
                                            'no_cue')
Olivia_2020_ind_vars['tone_trial'].add_values(True, False)
"""
*** SAMPLE CONFIGURATION - REMOVE AFTER FINISHING REAL CONFIG ***

First we create an IndependentVariableSet object that will group together all the independent variables the experiment
will use, like so:

>> Olivia_2020_ind_vars = IndependentVariableSet()

Then we create empty variables within this set. At this point we're not providing any values, just a name and a data
type that will tell klibs that this variable exists and what pythonic data type it should expect that variable's values
to hold. In this example we create four variables, one for each type.

>> Olivia_2020_ind_vars.add_variable("color", str)
>> Olivia_2020_ind_vars.add_variable("size", float)
>> Olivia_2020_ind_vars.add_variable("active", bool)
>> Olivia_2020_ind_vars.add_variable("count", int)

Finally, we add values to each variable. This can be done one at a time, as in the colors example below:

>> Olivia_2020_ind_vars['color'].add_value("blue")
from klibs.KLIndependentVariable import IndependentVariableSet

DISP_2020_ind_vars = IndependentVariableSet()

DISP_2020_ind_vars.add_variable("set_size", int)
DISP_2020_ind_vars['set_size'].add_values(8, 12, 16)

DISP_2020_ind_vars.add_variable("present_absent", str)
DISP_2020_ind_vars['present_absent'].add_values('present', 'absent')
"""
*** SAMPLE CONFIGURATION - REMOVE AFTER FINISHING REAL CONFIG ***

First we create an IndependentVariableSet object that will group together all the independent variables the experiment
will use, like so:

>> DISP_2020_ind_vars = IndependentVariableSet()

Then we create empty variables within this set. At this point we're not providing any values, just a name and a data
type that will tell klibs that this variable exists and what pythonic data type it should expect that variable's values
to hold. In this example we create four variables, one for each type.

>> DISP_2020_ind_vars.add_variable("color", str)
>> DISP_2020_ind_vars.add_variable("size", float)
>> DISP_2020_ind_vars.add_variable("active", bool)
>> DISP_2020_ind_vars.add_variable("count", int)

Finally, we add values to each variable. This can be done one at a time, as in the colors example below:

>> DISP_2020_ind_vars['color'].add_value("blue")
>> DISP_2020_ind_vars['color'].add_value("blue")
>> DISP_2020_ind_vars['color'].add_value("blue")
Beispiel #5
0
from klibs.KLIndependentVariable import IndependentVariableSet

from klibs import P

MixedMotionCueingEffects_2020_ind_vars = IndependentVariableSet()

MixedMotionCueingEffects_2020_ind_vars.add_variable("target_location", str)
MixedMotionCueingEffects_2020_ind_vars.add_variable("cue_location", str)
MixedMotionCueingEffects_2020_ind_vars.add_variable("start_axis", str)
MixedMotionCueingEffects_2020_ind_vars.add_variable("rotation_dir", str)
MixedMotionCueingEffects_2020_ind_vars.add_variable("animation_trial", bool)

MixedMotionCueingEffects_2020_ind_vars["target_location"].add_values(
    "top", "bottom", "left", "right")
MixedMotionCueingEffects_2020_ind_vars["cue_location"].add_values(
    "top_or_left", "bottom_or_right")
MixedMotionCueingEffects_2020_ind_vars["start_axis"].add_values(
    "horizontal", "vertical")
MixedMotionCueingEffects_2020_ind_vars["rotation_dir"].add_values(
    "clockwise", "counterclockwise")
MixedMotionCueingEffects_2020_ind_vars["animation_trial"].add_values(
    True, False)

if P.keypress_response_cond:
    # If keypress response session, have catch trials with no targets
    MixedMotionCueingEffects_2020_ind_vars["target_location"].add_value("none")
from klibs.KLIndependentVariable import IndependentVariableSet

IOR_Reward_V2_ind_vars = IndependentVariableSet()

IOR_Reward_V2_ind_vars.add_variable("high_value_location", str, ["left", "right"])
IOR_Reward_V2_ind_vars.add_variable("cue_location", str, ["left", "right"])
IOR_Reward_V2_ind_vars.add_variable("winning_trial", str, ["yes","yes","yes","no"])
IOR_Reward_V2_ind_vars.add_variable("probe_location", str, ["left", "right"])
IOR_Reward_V2_ind_vars.add_variable("probe_colour", str, ["high", "low", "neutral"])
IOR_Reward_V2_ind_vars.add_variable("go_no_go", str, ["go","nogo"])
Beispiel #7
0
__author__ = "Austin Hurst"
from klibs.KLIndependentVariable import IndependentVariableSet

TOJ_Motion_ind_vars = IndependentVariableSet()

# Define project variables and variable types

# NOTE: an SOA of 0 indicates that the trial will be a color probe trial (which are 1/3 of trials)
flip = 1000/60.0 # Time required per refresh of the screen
soa_list = [(flip, 3), (flip*3, 2), (flip*6, 2), (flip*9, 2), (flip*16, 1), (0, 5)]

TOJ_Motion_ind_vars.add_variable("t1_location", str, ["left", "right"])
TOJ_Motion_ind_vars.add_variable("t1_shape", str, ["a", "b"])
TOJ_Motion_ind_vars.add_variable("toj_type", str, ["motion", "stationary"])
TOJ_Motion_ind_vars.add_variable("upper_target", str, ["t1", "t2"])
TOJ_Motion_ind_vars.add_variable("t1_t2_soa", float, soa_list)
from klibs.KLIndependentVariable import IndependentVariableSet

# Initialize object containing project's independent variables

ANT_ind_vars = IndependentVariableSet()

# Define project variables and variable types

## Factors ##
# 'cue_type': the type of cue ("spatial" == same location as 'target_location')
# 'target_location': the location of the target and flanker arrows
# 'target_direction': the direction of the target arrow
# 'flanker_type': the type of flanker arrow (same direction, opposite direction, or plain line)

ANT_ind_vars.add_variable("cue_type", str, ["central", "double", "spatial"])
ANT_ind_vars.add_variable("target_location", str, ["above", "below"])
ANT_ind_vars.add_variable("target_direction", str, ["left", "right"])
ANT_ind_vars.add_variable("flanker_type", str,
                          ["congruent", "neutral", "incongruent"])
from klibs.KLIndependentVariable import IndependentVariableSet

newcode_ind_vars = IndependentVariableSet()
"""
*** SAMPLE CONFIGURATION - REMOVE AFTER FINISHING REAL CONFIG ***

First we create an IndependentVariableSet object that will group together all the independent variables the experiment
will use, like so:

>> newcode_ind_vars = IndependentVariableSet()

Then we create empty variables within this set. At this point we're not providing any values, just a name and a data
type that will tell klibs that this variable exists and what pythonic data type it should expect that variable's values
to hold. In this example we create four variables, one for each type.

>> newcode_ind_vars.add_variable("color", str)
>> newcode_ind_vars.add_variable("size", float)
>> newcode_ind_vars.add_variable("active", bool)
>> newcode_ind_vars.add_variable("count", int)

Finally, we add values to each variable. This can be done one at a time, as in the colors example below:

>> newcode_ind_vars['color'].add_value("blue")
>> newcode_ind_vars['color'].add_value("blue")
>> newcode_ind_vars['color'].add_value("blue")

Or altogether in a comma-separated set, as in the 'count' example:

>> newcode_ind_vars['count'].add_values(1,2,3,4,5)

Finally, values can have a distribution attached to them in case some values should feature more or less frequently, with
Beispiel #10
0
from klibs.KLIndependentVariable import IndependentVariableSet

SearchSpaceAndTime_ind_vars = IndependentVariableSet()

#SearchSpaceAndTime_ind_vars.add_variable("search_type", str, ['space', 'time'])
#SearchSpaceAndTime_ind_vars.add_variable("cell_count", int, [25,36,49,64])
#SearchSpaceAndTime_ind_vars.add_variable("distractor_distractor", str, ["h**o", "hetero"])
#SearchSpaceAndTime_ind_vars.add_variable("target_distractor", str, ["h**o", "hetero"])
Beispiel #11
0
from klibs.KLIndependentVariable import IndependentVariableSet

# Create an independent variable set object for the experiment
PVT_ind_vars = IndependentVariableSet()

# Add a dummy variable so that the experiment runs
PVT_ind_vars.add_variable("dummy", str, ['null'])
from klibs.KLIndependentVariable import IndependentVariableSet

IOReward_E2_ind_vars = IndependentVariableSet()

IOReward_E2_ind_vars.add_variable("potential_payoff", str, ["high", "low"])
IOReward_E2_ind_vars.add_variable("winning_trial", str,
                                  ["yes", "yes", "yes", "no"])
IOReward_E2_ind_vars.add_variable("tilt_line_location", str, ["left", "right"])
IOReward_E2_ind_vars.add_variable("cue_location", str, ["left", "right"])
IOReward_E2_ind_vars.add_variable("probe_location", str, ["left", "right"])
IOReward_E2_ind_vars.add_variable("probe_colour", str,
                                  ["high", "low", "neutral"])
IOReward_E2_ind_vars.add_variable("go_no_go", str, ["go", "nogo"])
from klibs.KLIndependentVariable import IndependentVariableSet, IndependentVariable

# Initialize object containing project's independant variables

PictureDrawingSearch_ind_vars = IndependentVariableSet()

# Define project variables and variable types (variables not set dynamically in this project)

PictureDrawingSearch_ind_vars.add_variable("nullvar", str, ["null"])
Beispiel #14
0
from klibs.KLIndependentVariable import IndependentVariableSet

# Initialize object containing project's factor set

TraceLab_ind_vars = IndependentVariableSet()

# Define project variables and variable types

TraceLab_ind_vars.add_variable("animate_time", int,
                               [500, 1000, 1500, 2000, 2500])
TraceLab_ind_vars.add_variable("figure_name", str,
                               ["random", "template_1477090164.31"])
from klibs.KLIndependentVariable import IndependentVariableSet

# Initialize object containing project's factor set

ProbeComparison_ind_vars = IndependentVariableSet()

# Define project variables and variable types

## Factors ##
# 'is_target': whether the trial is a n-back target trial or not

ProbeComparison_ind_vars.add_variable('is_target', bool, [True, (False, 5)])
from klibs.KLIndependentVariable import IndependentVariableSet

SSAT_line_ind_vars = IndependentVariableSet()

SSAT_line_ind_vars.add_variable("set_size", int, [8,12,16])
SSAT_line_ind_vars.add_variable("present_absent", str, ['present', 'absent'])
from klibs.KLIndependentVariable import IndependentVariableSet

ABColour_NoSwitch_ind_vars = IndependentVariableSet()

ABColour_NoSwitch_ind_vars.add_variable("lag", int, [1, 2, 3, 4, 5, 6, 7, 8])
from klibs.KLIndependentVariable import IndependentVariableSet


# Initialize object containing project's independant variables

ArticulationCircle_ind_vars = IndependentVariableSet()


# Define project variables and variable types

ms_per_frame = 1000.0 / 60.0
durations = [2*ms_per_frame, 3*ms_per_frame, 4*ms_per_frame]

ArticulationCircle_ind_vars.add_variable("trial_articulations", bool, [True, False])
ArticulationCircle_ind_vars.add_variable("response_articulations", bool, [True, False])
ArticulationCircle_ind_vars.add_variable("duration", float, durations)
#ArticulationCircle_ind_vars.add_variable("opacity",     str, ["high", "med", "low"])
Beispiel #19
0
from klibs.KLIndependentVariable import IndependentVariableSet

# Initialize object containing project's independent variables

ANTI_VEA_ind_vars = IndependentVariableSet()

# Define project variables and variable types

## Factors ##
# 'trial_type': the type of trial (ANTI, EV, or AV)
#   - 'ANTI': ANTI trials that can be validly cued, invalidly cued, or uncued
#   - 'EV': Executive vigilance trials where the central arrow displacement can be
#           either above or below the surrounding flankers
#   - 'AV': Arousal vigilance (PVT) trials
# 'cue_type': the type of cue ("valid" == same location as 'target_location')
# 'target_location': the location of the target and flanker arrows
# 'congruent': whether the direction of the flanker arrows matches the target arrows

trial_types = [('ANTI-valid', 2), ('ANTI-invalid', 2), ('ANTI-none', 2),
               'EV-above', 'EV-below', ('AV', 2)]

ANTI_VEA_ind_vars.add_variable('trial_type', str, trial_types)
ANTI_VEA_ind_vars.add_variable('tone_trial', bool, [True, False])
ANTI_VEA_ind_vars.add_variable('target_location', str, ['above', 'below'])
ANTI_VEA_ind_vars.add_variable('congruent', bool, [True, False])
from klibs.KLIndependentVariable import IndependentVariableSet

ANTi_ind_vars = IndependentVariableSet()
ANTi_ind_vars.add_variable('cue_type', str, ['invalid', 'valid', 'none'])
ANTi_ind_vars.add_variable('congruent', bool, [True, False])
ANTi_ind_vars.add_variable('tone_trial', bool, [True, False])
ANTi_ind_vars.add_variable('target_location', str, ['above', 'below'])
from klibs.KLIndependentVariable import IndependentVariableSet

MSK_Mixed_ind_vars = IndependentVariableSet()

MSK_Mixed_ind_vars.add_variable('isoa', int, [100, 200, 300])
MSK_Mixed_ind_vars.add_variable('ttoa', int, [120, 240, 360, 480, 600])
MSK_Mixed_ind_vars.add_variable('t1_difficulty', str,
                                ['easy', 'medium', 'hard'])
Beispiel #22
0
__author__ = 'jono'
from klibs.KLIndependentVariable import IndependentVariableSet, IndependentVariable

WaldoMkIII_ind_vars = IndependentVariableSet()
WaldoMkIII_ind_vars.add_variable(
    "bg_image", str,
    ("wally_01", "wally_02", "wally_03", "wally_04", "wally_05", "wally_06",
     "wally_07", "wally_08", "wally_09"))
WaldoMkIII_ind_vars.add_variable("angle", int, (0, 60, 120, 180, 240, 300))
WaldoMkIII_ind_vars.add_variable("target_count", int, (1, 2))
WaldoMkIII_ind_vars.add_variable("bg_state", str,
                                 ("present", "absent", "intermittent"))
WaldoMkIII_ind_vars.add_variable("n_back", int, (1, 2))

# WaldoMkIII_ind_vars["bg_image"].add_values("wally_01", "wally_02", "wally_03", "wally_04", "wally_05", "wally_06",
# 										   "wally_07", "wally_08", "wally_09")
# WaldoMkIII_ind_vars["angle"].add_values(0,60,120,180,240,300)
# WaldoMkIII_ind_vars["target_count"].add_values(1,2)
# WaldoMkIII_ind_vars["bg_state"].add_values("present", "absent", "intermittent")
# WaldoMkIII_ind_vars["n_back"].add_values(1,2)
from klibs.KLIndependentVariable import IndependentVariableSet

# Initialize object containing project's independent variables

ANTI_ind_vars = IndependentVariableSet()

# Define project variables and variable types

## Factors ##
# 'alerting_trial': the presence or absence of an auditory alerting signal
# 'cue_type': the type of cue ("valid" == same location as 'target_location')
# 'target_location': the location of the target and flanker arrows
# 'target_direction': the direction of the target arrow
# 'flanker_type': the type of flanker arrow (same direction, opposite direction, or plain line)
# 'soa': interval between cue on and target on. 500 in Callejas et al. (2005) E1, 100/500 in E2

ANTI_ind_vars.add_variable("alerting_trial", bool, [True, False])
ANTI_ind_vars.add_variable("cue_type", str, ["valid", "invalid", "none"])
ANTI_ind_vars.add_variable("target_location", str, ["above", "below"])
ANTI_ind_vars.add_variable("target_direction", str, ["left", "right"])
ANTI_ind_vars.add_variable("flanker_type", str,
                           ["congruent", "neutral", "incongruent"])
ANTI_ind_vars.add_variable("soa", int, [500])
Beispiel #24
0
from klibs.KLIndependentVariable import IndependentVariableSet

MSK_Blocked_ind_vars = IndependentVariableSet()

MSK_Blocked_ind_vars.add_variable('isoa', int, [100, 200, 300])
MSK_Blocked_ind_vars.add_variable('ttoa', int, [120, 240, 360, 480, 600])
from klibs.KLIndependentVariable import IndependentVariableSet, IndependentVariable

# Initialize object containing project's independant variables

FigureGroundSearch_ind_vars = IndependentVariableSet()

# Define project variables and variable types

FigureGroundSearch_ind_vars.add_variable("mask_type", str,
                                         ["central", "peripheral", "none"])
FigureGroundSearch_ind_vars.add_variable("mask_size", int, [8, 12, 16])
FigureGroundSearch_ind_vars.add_variable("target_level", str,
                                         ["local", "global"])
FigureGroundSearch_ind_vars.add_variable("target_shape", str,
                                         ["square", "circle"])
from klibs.KLIndependentVariable import IndependentVariableSet
from klibs import P

IOR_Reward_ind_vars = IndependentVariableSet()

IOR_Reward_ind_vars.add_variable("trial_type", str,
                                 [("bandit", 2), "probe", "both"])
IOR_Reward_ind_vars.add_variable("cue_location", str, ["left", "right"])
IOR_Reward_ind_vars.add_variable("probe_location", str, ["left", "right"])
IOR_Reward_ind_vars.add_variable("high_value_location", str, ["left", "right"])
IOR_Reward_ind_vars.add_variable("winning_bandit", str, ["high", "low"])
from klibs.KLIndependentVariable import IndependentVariableSet

# Initialize object containing project's factor set

AttentionEffort_ind_vars = IndependentVariableSet()

# Define project variables and variable types

AttentionEffort_ind_vars.add_variable('number', int,
                                      [1, 2, 3, 4, 5, 6, 7, 8, 9])
Beispiel #28
0
from klibs.KLIndependentVariable import IndependentVariableSet

ABColour_TMTM_ind_vars = IndependentVariableSet()

ABColour_TMTM_ind_vars.add_variable("ttoa", int, [120, 240, 360, 480, 600])
ABColour_TMTM_ind_vars.add_variable("itoa", int, [100, 200, 300])