Пример #1
0
    def setUp(self, sceneAttr = AttributeMap(), neuronAttr = AttributeMap(),
              make_ready=True):

        setup.setup_simple(self, 406, sceneAttr, neuronAttr)

        circuit = self.scene.circuit
        self._morphology = \
            circuit.load_morphologies([406], circuit.Coordinates.local)[0]
        self._handler = self.scene.objects[0]

        view = self.view
        # Disabling idle AA to speed up testing.
        view.attributes.idle_AA_steps = 0
        view.camera.setView(
            [272.80291748046875, 764.23828125, 393.82244873046875],
            ([-0.08497956395149231, 0.9948055148124695, 0.05603933706879616],
             38.1639518737793))
        view.attributes.background = [0, 0, 0, 1]
        view.attributes.auto_compute_home_position = False

        if make_ready:
            # Displaying the first frame to ensure that clipping operations
            # have the intended effect
            for i in range(2):
                self.engine.frame()
                self.engine.waitFrame()
Пример #2
0
 def setUp(self) :
     attributes = AttributeMap()
     attributes.primary_color = [1, 1, 1, 1]
     attributes.secondary_color = [0, 0, 1, 1]
     setup.setup_simple(self, 450, target_attributes=attributes,
                        eq_config=setup.medium_eq_config)
     view = self.view
     view.attributes.auto_compute_home_position = False
     view.attributes.background = [0, 0, 0, 1]
     view.camera.setView([-1124, 1162, -57],
                         ([-0.070, -0.997, -0.0362], 98))
Пример #3
0
    def setUp(self):
        attributes = AttributeMap()
        attributes.mode = RepresentationMode.SOMA
        attributes.color = [1, 1, 1, 1]
        setup.setup_simple(self, 'L5CSPC', target_attributes=attributes)

        self._gids = self.simulation.gids('L5CSPC')

        view = self.view
        view.attributes.idle_AA_steps = 32
        view.attributes.background = [0, 0, 0, 1]
        view.attributes.auto_compute_home_position = False
        view.camera.setView([49, 630, 509], ([0.0, 0.0, 1.0], 0.0))
Пример #4
0
    def setUp(self):
        # This scene is not created the same as the one for soma above.
        attributes = AttributeMap({'mode': RepresentationMode.SOMA})
        setup.setup_simple(self, 406, target_attributes=attributes)

        view = self.view
        view.camera.setView(
            [87.08049011230469, 676.59033203125, 148.541748046875],
            ([-0.16840891540050507, 0.9842529892921448, 0.053707364946603775
              ], 40.37215805053711))
        view.attributes.idle_AA_steps = 32
        view.attributes.background = [0, 0, 0, 1]
        view.attributes.auto_compute_home_position = False
        view.attributes.highlight_color = [0.7, 0.85, 1.0, 1.0]
Пример #5
0
    def setUp(self):
        scene_attributes = AttributeMap()
        scene_attributes.use_meshes = False
        scene_attributes.inflatable_neurons = True

        self.gid = 200
        setup.setup_simple(
            self, self.gid, scene_attributes=scene_attributes,
            blue_config=brain.test.circuit_config,
            eq_config=setup.small_rect_eq_config)

        view = self.view
        view.attributes.inflation_factor = 2
        view.attributes.auto_compute_home_position = False
Пример #6
0
    def setUp(self):
        attributes = rtneuron.AttributeMap(
            {'mode': rtneuron.RepresentationMode.WHOLE_NEURON})
        setup.setup_simple(self, 'L5CSPC', target_attributes = attributes)

        self.view = self.engine.views[0]
        self.view.auto_compute_home_position = False
        self.view.scene = self.scene
        # To make sure the scene is ready before the timestamps are modified
        self.engine.frame()
        self.engine.frame()

        position = [30, 600, 300]
        orientation = ([0, 0, 1], 0)
        self.view.camera.setView(position,orientation)
Пример #7
0
 def setUp(self):
     attributes = AttributeMap({'mode' : RepresentationMode.SOMA})
     self._cells = [310, 320, 330, 340, 350]
     scene_attributes = AttributeMap({"load_morphologies": False})
     setup.setup_simple(self, self._cells,
                        target_attributes=attributes,
                        scene_attributes=scene_attributes,
                        # Rectangular selections in orthographics
                        # projections don't work if a configuration file
                        # is used.
                        eq_config=None,
                        blue_config=brain.test.circuit_config,
                        engine_attributes=_rtneuron.global_attributes)
     _rtneuron.engine = self.engine
     _rtneuron.simulation = self.simulation
Пример #8
0
    def setUp(self) :
        target = 'L5CSPC'
        attributes = AttributeMap({'mode' : rtneuron.RepresentationMode.SOMA})
        setup.setup_simple(self, target, target_attributes=attributes)

        view = self.view
        view.attributes.idle_AA_steps = 32
        view.attributes.auto_compute_home_position = False
        view.attributes.background = [0, 0, 0, 1]

        self._spikefile = self._create_spikes_file(target)
        rtneuron.apply_spike_data(self._spikefile.name, view)
        self.engine.player.window = [0, 6]

        # To make sure the scene is ready before the timestamps are modified
        self.engine.frame()
        self.engine.frame()
Пример #9
0
    def setUp(self):

        setup.setup_simple(
            self, 200, blue_config=brain.test.circuit_config,
            eq_config=setup.small_rect_eq_config)

        view = self.view
        view.camera.setView([204, 1500, 170], ([0, 1, 0], 45))
        view.attributes.auto_compute_home_position = False

        x = -75 + 34; y = 1450; z = -75 + 32;
        X = x + 150; Y = y + 100; Z = z + 150;
        self.view.scene.addGeometry(
            [[x, y, z], [X, y, z], [X, Y, z], [x, Y, z],
             [x, y, Z], [X, y, Z], [X, Y, Z], [x, Y, Z]],
            [[0, 1], [1, 2], [2, 3], [3, 0], [4, 5], [5, 6], [6, 7], [7, 4],
             [0, 4], [1, 5], [2, 6], [3, 7]], colors=[1, 1, 1, 1])
Пример #10
0
    def setUp(self,
              target_attributes=AttributeMap(),
              scene_attributes=AttributeMap(),
              target='L5CSPC'):
        setup.setup_simple(self,
                           target,
                           target_attributes=target_attributes,
                           scene_attributes=scene_attributes)

        view = self.view
        view.attributes.idle_AA_steps = 32
        view.attributes.background = [0, 0, 0, 1]
        view.auto_compute_home_position = False
        view.scene = self.scene
        # To make sure the scene is ready before the timestamps are modified
        self.engine.frame()
        self.engine.frame()
Пример #11
0
    def create_config(self, config):
        attributes = AttributeMap()
        attributes.partitioning = DataBasePartitioning.SPATIAL
        setup.setup_simple(self, [394, 395, 396, 407, 410, 412],
                           scene_attributes=attributes,
                           eq_config=config)

        self.engine.resume()

        self.view.attributes.idle_AA_steps = 32
        # It's important to use a background different from black
        self.view.attributes.background = [0.1, 0.2, 0.3, 1]

        self.cameras = {
            'view1': ([-11, 797, 209], ([-0.92166, -0.35207, -0.163039], 60)),
            'view2': ([0, 386, 230], ([0.93759, -0.30783, 0.16175], 55))
        }
Пример #12
0
    def setUp(self):
        scene_attributes = AttributeMap()
        scene_attributes.use_meshes = False
        scene_attributes.inflatable_neurons = True

        setup.setup_simple(
            self, 'MiniColumn_0', scene_attributes=scene_attributes,
            blue_config=brain.test.circuit_config,
            eq_config=setup.small_rect_eq_config)
        self.engine.frame()
        self.engine.waitFrame()
        self.engine.frame()
        self.engine.waitFrame()

        view = self.view
        view.attributes.inflation_factor = 1
        view.attributes.auto_compute_home_position = False
        view.attributes.background = [1, 1, 1, 1]

        self.projections = SynapticProjections(view.scene)
Пример #13
0
 def setUp(self):
     setup.setup_simple(self, 'MiniColumn_0')
     self._gids = self.simulation.gids('MiniColumn_0')