コード例 #1
0
    def __init__(self, prime, target, condition):
        global trial_index
        trial_index += 1

        events = [
            Event(blank, start=0, duration=1),
            Event(fixation, start=1, duration=.5),
            #                Event(prime, start = 1.5, duration = 1.028),
            #                Event(mask, start = 2.528, duration = 1.3),
            #                Event(target, start = 3.828, duration = 5,
            Event(prime, start=1.5, duration=.028),
            Event(mask, start=1.528, duration=.3),
            Event(
                target,
                start=1.828,
                duration=5,
                log={
                    'Prime': prime.
                    _text,  # Text class has a _text attribute for original string supplied.
                    'Target': target._text,
                    'Subject': SUBJECT,
                    'Trial': trial_index,
                    'Time': 'T' + str(time_point),
                    'Condition': condition
                },
                response=Response(label='press', limit=('z', "/")),
                on_keypress=True)
        ]

        Trial.__init__(self, events)
コード例 #2
0
    def __init__(self, USCS, target, gender):
        events = [
            Event(blank, start=0, duration=1),
            Event(fixation, start=1, duration=.5),
            #                Event(USCS, start = 1.5, duration = 1.028),
            #                Event(mask, start = 2.528, duration = .3),
            #                Event(target, start = 2.828, duration = 5,
            Event(USCS, start=1.5, duration=.028),
            Event(mask, start=1.528, duration=.3),
            Event(target,
                  start=1.828,
                  duration=5,
                  log={
                      'US': USCS._text.partition(' ')[0],
                      'CS': USCS._text.partition(' ')[2],
                      'Prime': None,
                      'Target': target._text,
                      'Subject': SUBJECT,
                      'Time': 'T' + str(time_point),
                      'Presentation': 'Simultaneous'
                  },
                  response=Response(label='press', limit=('z', "/")),
                  on_keypress=True)
        ]

        Trial.__init__(self, events)
コード例 #3
0
    def __init__(self, FS):
        events=[Event(fixation, start=0, duration=2.0),
                Event(FS, start=2, duration=.5,
                    log={'face':FS.parameters.text,
                        'subject':subject}),
                Event(blank, start=2, duration=2.5,
                    response = Response(label='press',limit=('z','/')))]

        Trial.__init__(self,events)
コード例 #4
0
    def __init__(self, sentence):
        self.stim = WrappedText(text=sentence, font_size=50, position=(xlim / 2, ylim / 2), on=False)

        events = [
            Event(blank, start=0, duration=0.3),
            Event(
                self.stim,
                start=0.3,
                duration=1000,
                on_keypress=True,  # end the event with a keypress
                response=Response(label="instruct", limit="space"),
            ),
        ]
        # response = Response(label = None, limit = 'space'))]
        Trial.__init__(self, events)
コード例 #5
0
    def __init__(self, sentence):
        self.stim = WrappedText(text=sentence,
                                font_size=50,
                                position=(xlim / 2, ylim / 2),
                                on=False)

        events = [
            Event(blank, start=0, duration=.3),
            Event(
                self.stim,
                start=.3,
                duration=1000,
                on_keypress=True,  # end the event with a keypress
                response=Response(label='instruct', limit='space'))
        ]
        Trial.__init__(self, events)
コード例 #6
0
    def __init__(self, picstim, approach_hand):
        events = [
            Event(fixation, start=0, duration=2.0),
            Event(
                picstim,
                start=2,
                duration=0.5,
                log={
                    "pic_name": picstim.picname,
                    "motivation": picstim.motiv,
                    "valence": picstim.valen,
                    "subject": SUBJECT,
                    "handed": HANDEDNESS,
                    "app_side_first": APPROACH_SIDE_FIRST,
                    "approach_hand": approach_hand,
                },
            ),
            Event(blank, start=2, duration=2.5, response=Response(label="press", limit=("a", "'"))),
        ]

        Trial.__init__(self, events)