Пример #1
0
def buildStimulus(p):
    radius = np.linspace(0, p['radius_max'], p['radius_itx'] + 1)
    azimuth = np.linspace(0, p['azimuth_max'], p['azimuth_itx'] + 1)
    rad_to_degree = lambda rad: rad * 180 / np.pi
    np.random.seed(seed=p['rng_seed'])

    domain = []
    for a in range(p['radius_itx']):
        for b in range(p['azimuth_itx']):
            domain.append((radius[a], radius[a + 1], rad_to_degree(azimuth[b]),
                           rad_to_degree(azimuth[b + 1] - azimuth[b])))

    p['domain'] = domain
    p['rand_streams'] = np.random.rand(len(domain),
                                       p['duration'] * p['frameRate'])

    for itx in range(len(domain)):
        QDS.DefObj_Sector(itx,
                          domain[itx][1],
                          domain[itx][0],
                          domain[itx][2],
                          domain[itx][3],
                          _astep=10)
        print(itx, domain[itx][1], domain[itx][0], domain[itx][2],
              domain[itx][3])
Пример #2
0
def buildStimulus(p):
    radius = [
        p['radius_centre'], p['radius_centre'] + 50, p['radius_centre'] + 100
    ]
    azimuth = [0, 120, 240, 360]

    domain = []
    for a in range(p['radius_itx']):
        for b in range(p['azimuth_itx']):
            domain.append((radius[a], radius[a + 1], azimuth[b],
                           azimuth[b + 1] - azimuth[b]))

    p['domain'] = domain
    QDS.DefObj_Ellipse(0, p["radius_centre"] * 2, p["radius_centre"] * 2)
    for itx in range(len(domain)):
        QDS.DefObj_Sector(itx + 1, domain[itx][1], domain[itx][0],
                          domain[itx][2], domain[itx][3], 5)
Пример #3
0
def buildStimulus(p):
    # Define stimulus objects
    QDS.DefObj_Ellipse(1, 50, 50)
    QDS.DefObj_Sector(2,125,25,0,360,5)