pypet/brian2/network.py
def pre_run_network(self, traj):
        """Starts a network run before the individual run.

        Useful if a network needs an initial run that can be shared by all individual
        experimental runs during parameter exploration.

        Needs to be called by the user. If `pre_run_network` is started by the user,
        :func:`~pypet.brian2.network.NetworkManager.pre_build` will be automatically called
        from this function.

        This function will create a new BRIAN2 network which is run by
        the :class:`~pypet.brian2.network.NetworkRunner` and it's
        :func:`~pypet.brian2.network.NetworkRunner.execute_network_pre_run`.

        To see how a network run is structured also take a look at
        :func:`~pypet.brian2.network.NetworkRunner.run_network`.

        :param traj: Trajectory container

        """
        self.pre_build(traj)

        self._logger.info('\n------------------------\n'
                          'Pre-Running the Network\n'
                          '------------------------')


        self._network = self._network_constructor(*self._brian_list)
        self.network_runner.execute_network_pre_run(traj, self._network, self._network_dict,
                                                    self.components, self.analysers)

        self._logger.info('\n-----------------------------\n'
                          'Network Simulation successful\n'
                          '-----------------------------')

        self._pre_run = True
        if hasattr(self._network, 'store'):
            self._network.store('pre_run')
def pre_run_network(self, traj):
        """Starts a network run before the individual run.

        Useful if a network needs an initial run that can be shared by all individual
        experimental runs during parameter exploration.

        Needs to be called by the user. If `pre_run_network` is started by the user,
        :func:`~pypet.brian2.network.NetworkManager.pre_build` will be automatically called
        from this function.

        This function will create a new BRIAN2 network which is run by
        the :class:`~pypet.brian2.network.NetworkRunner` and it's
        :func:`~pypet.brian2.network.NetworkRunner.execute_network_pre_run`.

        To see how a network run is structured also take a look at
        :func:`~pypet.brian2.network.NetworkRunner.run_network`.

        :param traj: Trajectory container

        """
        self.pre_build(traj)

        self._logger.info('\n------------------------\n'
                          'Pre-Running the Network\n'
                          '------------------------')


        self._network = self._network_constructor(*self._brian_list)
        self.network_runner.execute_network_pre_run(traj, self._network, self._network_dict,
                                                    self.components, self.analysers)

        self._logger.info('\n-----------------------------\n'
                          'Network Simulation successful\n'
                          '-----------------------------')

        self._pre_run = True
        if hasattr(self._network, 'store'):
            self._network.store('pre_run')
Starts a network run before the individual run.

        Useful if a network needs an initial run that can be shared by all individual
        experimental runs during parameter exploration.

        Needs to be called by the user. If `pre_run_network` is started by the user,
        :func:`~pypet.brian2.network.NetworkManager.pre_build` will be automatically called
        from this function.

        This function will create a new BRIAN2 network which is run by
        the :class:`~pypet.brian2.network.NetworkRunner` and it's
        :func:`~pypet.brian2.network.NetworkRunner.execute_network_pre_run`.

        To see how a network run is structured also take a look at
        :func:`~pypet.brian2.network.NetworkRunner.run_network`.

        :param traj: Trajectory container