當前位置: 首頁>>代碼示例>>Python>>正文


Python Environment.f_add_postprocessing方法代碼示例

本文整理匯總了Python中pypet.Environment.f_add_postprocessing方法的典型用法代碼示例。如果您正苦於以下問題:Python Environment.f_add_postprocessing方法的具體用法?Python Environment.f_add_postprocessing怎麽用?Python Environment.f_add_postprocessing使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pypet.Environment的用法示例。


在下文中一共展示了Environment.f_add_postprocessing方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: main

# 需要導入模塊: from pypet import Environment [as 別名]
# 或者: from pypet.Environment import f_add_postprocessing [as 別名]
def main():

    env = Environment(trajectory='FiringRate',
                      comment='Experiment to measure the firing rate '
                            'of a leaky integrate and fire neuron. '
                            'Exploring different input currents, '
                            'as well as refractory periods',
                      add_time=False, # We don't want to add the current time to the name,
                      log_folder='./logs/',
                      log_level=logging.INFO,
                      log_stdout=True,
                      multiproc=True,
                      ncores=2, #My laptop has 2 cores ;-)
                      wrap_mode='QUEUE',
                      filename='./hdf5/', # We only pass a folder here, so the name is chosen
                      # automatically to be the same as the Trajectory
                      )

    traj = env.v_trajectory

    # Add parameters
    add_parameters(traj)

    # Let's explore
    add_exploration(traj)

    # Ad the postprocessing function
    env.f_add_postprocessing(neuron_postproc)

    # Run the experiment
    env.f_run(run_neuron)
開發者ID:lsolanka,項目名稱:pypet,代碼行數:33,代碼來源:main.py

示例2: main

# 需要導入模塊: from pypet import Environment [as 別名]
# 或者: from pypet.Environment import f_add_postprocessing [as 別名]
def main():

    filename = os.path.join('hdf5', 'FiringRate.hdf5')
    env = Environment(trajectory='FiringRate',
                      comment='Experiment to measure the firing rate '
                            'of a leaky integrate and fire neuron. '
                            'Exploring different input currents, '
                            'as well as refractory periods',
                      add_time=False, # We don't want to add the current time to the name,
                      log_stdout=True,
                      log_config='DEFAULT',
                      multiproc=True,
                      ncores=2, #My laptop has 2 cores ;-)
                      wrap_mode='QUEUE',
                      filename=filename,
                      overwrite_file=True)

    traj = env.v_trajectory

    # Add parameters
    add_parameters(traj)

    # Let's explore
    add_exploration(traj)

    # Ad the postprocessing function
    env.f_add_postprocessing(neuron_postproc)

    # Run the experiment
    env.f_run(run_neuron)

    # Finally disable logging and close all log-files
    env.f_disable_logging()
開發者ID:henribunting,項目名稱:pypet,代碼行數:35,代碼來源:main.py


注:本文中的pypet.Environment.f_add_postprocessing方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。