Ejemplo n.º 1
0
        #AttributeError: 'Unmixer' object has no attribute 'model_inv'

        #^C[accumulate_publisher-13] killing on exit
        #[strip_chart-12] killiotype_nickname = genotype_nickname)
        print 'enter closed loop stripe fixation'

        ctrl.stop()
        ctrl.set_pattern_by_name('Pattern_fixation_4_wide_4X12_Pan.mat')
        ctrl.set_position(0, 0)
        ctrl.set_function_by_name('X', 'default', freq=60)
        #ctrl.send_gain_bias(gain_x = -90,bias_x = 0.0)
        ctrl.send_gain_bias(gain_x=-70, bias_x=0.0)
        ctrl.set_mode('xrate=ch0', 'yrate=funcy')
        ctrl.start()
        ### publish the state
        exp_msg.state = 'closed_loop;gain=-50'
        exp_pub.publish(exp_msg)
        time.sleep(5.0)

        ## set the imaging light level
        ctrl.set_ao(4, EPI_LEVEL)
        #Run experiment
        for rep in range(6):
            print('puff')
            time.sleep(15)
            print('stop')
            time.sleep(15)

        #publish a refrence frame as a status message to mark the end of the experiment.
        get_ref_frame()
        meta_pub.publish(git_SHA=git_SHA,
Ejemplo n.º 2
0
                print condition
                #################################################
                # Closed Loop
                #################################################
                print 'enter closed loop stripe fixation'
                ctrl.stop()
                ctrl.set_pattern_by_name(
                    'Pattern_fixation_4_wide_4X12_Pan.mat')
                ctrl.set_position(0, 0)
                #ctrl.set_function_by_name('X','default',freq=60)
                ctrl.send_gain_bias(gain_x=-70, bias_x=0.0)
                ctrl.set_mode('xrate=ch0', 'yrate=funcy')
                ctrl.start()
                ### publish the state
                exp_msg.state = 'closed_loop;gain=-5'
                exp_pub.publish(exp_msg)
                time.sleep(FIXATION_DURATION)

                #################################################
                # Open Loop
                #################################################

                ctrl.stop()
                ctrl.set_pattern_by_name(
                    'Pattern_multi_width_optomotor_patterns_48_Pan.mat')
                ctrl.set_position(0, 0)
                exp_msg.state = 'open_loop;visual;pattern=%s;static' % (
                    condition)
                exp_pub.publish(exp_msg)
                time.sleep(PREMOTON_DURATION)
                ctrl.stop()
                #################################################
                # Closed Loop
                #################################################
                print 'enter closed loop stripe fixation'
                ctrl.set_pattern_by_name(
                    'Pattern_fixation_4_wide_4X12_Pan.mat')
                ctrl.set_position(0, 0)
                ctrl.set_function_by_name('Y', 'default', freq=50)
                ctrl.send_gain_bias(gain_x=-90, bias_x=0.0)
                ctrl.set_mode('xrate=ch0', 'yrate=funcy')
                ### set the imaging level
                ctrl.set_ao(4, vlevel)
                ctrl.start()
                ### publish the state
                exp_msg.state = 'closed_loop;gain=-5;epi_level=%s' % (vlevel)
                exp_pub.publish(exp_msg)
                time.sleep(5)

                #################################################
                # Open Loop
                #################################################
                print 'all panels off'

                ctrl.stop()
                ctrl.all_off()
                exp_msg.state = 'all_off;epi_level=%s' % (vlevel)
                exp_pub.publish(exp_msg)
                time.sleep(5.0)
                ### publish the state
                exp_msg.state = 'led_pulse;epi_level=%s' % (vlevel)
Ejemplo n.º 4
0
            for condition in np.random.permutation(conditions):
                print condition
                #################################################
                # Closed Loop
                #################################################
                print 'enter closed loop stripe fixation'
                ctrl.stop()
                ctrl.set_pattern_by_name(
                    'Pattern_fixation_4_wide_4X12_Pan.mat')
                ctrl.set_position(0, 0)
                ctrl.set_function_by_name('Y', 'default', freq=50)
                ctrl.send_gain_bias(gain_x=-90, bias_x=0.0)
                ctrl.set_mode('xrate=ch0', 'yrate=funcy')
                ctrl.start()
                ### publish the state
                exp_msg.state = 'closed_loop;gain=-5'
                exp_pub.publish(exp_msg)
                time.sleep(5)

                #################################################
                # Open Loop
                #################################################
                if condition[0] == 'opto':
                    print 'all panels on'
                    ctrl.stop()
                    ctrl.all_on()
                    exp_msg.state = 'open_loop;opto;power_level=0'
                    exp_pub.publish(exp_msg)
                    time.sleep(2.0)
                    ### publish the state
                    exp_msg.state = 'open_loop;opto;power_level=%s' % str(
Ejemplo n.º 5
0
        time.sleep(5)
        for rep in range(10):
            for fid in np.random.permutation(len(ctrl.funcstrings)):
                print 'enter closed loop'
                ctrl.stop()
                ctrl.set_pattern_by_name(
                    'Pattern_fixation_4_wide_4X12_Pan.mat')
                ctrl.set_position(0, 0)
                #ctrl.set_function_by_name('X','default',freq=50)
                ctrl.set_function_by_name('Y', 'default', freq=50)
                ctrl.send_gain_bias(gain_x=-90, bias_x=0.0)
                ctrl.set_mode('xrate=ch0', 'yrate=funcy')
                ctrl.start()
                ### publish the state
                fstring = ctrl.funcstrings[fid]
                exp_msg.state = 'closed_loop, gain = -5'
                exp_pub.publish(exp_msg)
                time.sleep(5)

                print 'enter open loop'
                ctrl.stop()
                ctrl.set_pattern_by_name('Pattern_linear_expansion_48_Pan.mat')
                ctrl.set_position(0, 20)
                ctrl.set_function_by_name('X', fstring, freq=200)
                ctrl.set_function_by_name('Y', 'default', freq=200)
                ctrl.send_gain_bias(gain_x=1, gain_y=0)
                ctrl.set_mode('x=x0+funcx', 'yrate=funcy')
                ctrl.start()
                ### publish the state
                fstring = ctrl.funcstrings[fid]
                exp_msg.state = 'open_loop, %s' % str(fstring)