当前位置: 首页>>代码示例>>Python>>正文


Python control.set_develop_mode函数代码示例

本文整理汇总了Python中expyriment.control.set_develop_mode函数的典型用法代码示例。如果您正苦于以下问题:Python set_develop_mode函数的具体用法?Python set_develop_mode怎么用?Python set_develop_mode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了set_develop_mode函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: is_overlapping

        """

        if position is None:
            position = defaults.dot_position
        if colour is None:
            colour = defaults.dot_colour
        Circle.__init__(self, diameter=radius * 2, colour=colour, position=position)

    def is_overlapping(self, other, minimal_gap=0):
        """DEPRECATED METHOD: Please use 'overlapping_with_circle'"""
        return self.overlapping_with_circle(other, minimal_gap)

    def is_center_inside(self, other):
        """DEPRECATED METHOD: Please use 'center_inside_circle'"""
        return self.center_inside_circle(other)

    def is_inside(self, other):
        """DEPRECATED METHOD: Please use 'inside_circle'"""
        return self.inside_circle(other)


if __name__ == "__main__":
    from expyriment import control

    control.set_develop_mode(True)
    defaults.event_logging = 0
    exp = control.initialize()
    dot = Dot(radius=100)
    dot.present()
    exp.clock.wait(1000)
开发者ID:smathot,项目名称:expyriment,代码行数:30,代码来源:_dot.py

示例2:

#!/usr/bin/env python

"""
A parity judgment task to assess the SNARC effect.

See e.g.:
Gevers, W., Reynvoet, B., & Fias, W. (2003). The mental representation of
ordinal sequences is spatially organized. Cognition, 87(3), B87-95.

"""

from expyriment import design, control, stimuli
from expyriment.misc import constants


control.set_develop_mode(False)

########### DESIGN ####################
exp = design.Experiment(name="SNARC")

# Design: 2 response mappings x 8 stimuli x 10 repetitions
for response_mapping in ["left_odd", "right_odd"]:
    block = design.Block()
    block.set_factor("mapping", response_mapping)
    #add trials to block
    for digit in [1, 2, 3, 4, 6, 7, 8, 9]:
        trial = design.Trial()
        trial.set_factor("digit", digit)
        block.add_trial(trial, copies=10)
    block.shuffle_trials()
    exp.add_block(block)
开发者ID:fladd,项目名称:expyriment,代码行数:31,代码来源:snarc_experiment.py


注:本文中的expyriment.control.set_develop_mode函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。