.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/run_parameterspace.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_run_parameterspace.py: Run parameter space --------------------- This example script shows how to iterate over parameter ranges and generate comparison plots. .. GENERATED FROM PYTHON SOURCE LINES 9-10 Import parameters, the Python module used here to define parameter ranges. .. GENERATED FROM PYTHON SOURCE LINES 10-17 .. code-block:: Python from mesocircuit import mesocircuit_framework as mesoframe from mesocircuit.plotting.paramspace_figure import parameterspace_overviews import parametersets import parameters as ps .. GENERATED FROM PYTHON SOURCE LINES 18-22 Define a 2x3 parameter space for the downscaled Potjans-Diesmann microcircuit varying the relative inhibition and the Poisson background rate. Parameter ranges are only allowed for net_dict and sim_dict since only these two dictionaries are used to create a unique hash. .. GENERATED FROM PYTHON SOURCE LINES 22-30 .. code-block:: Python name = 'local_microcircuit_PD_g_vs_bg_rate' params_key = 'local_microcircuit_PD' custom_params = parametersets.ps_dicts[params_key] custom_params['net_dict'].update({ 'g': ps.ParameterRange([-4., -4.5]), 'bg_rate': ps.ParameterRange([7., 8., 9])}) .. GENERATED FROM PYTHON SOURCE LINES 31-33 Instantiate a `MesocircuitExperiment` and inspect the individual circuits of each parameter combination. .. GENERATED FROM PYTHON SOURCE LINES 33-38 .. code-block:: Python meso_exp = mesoframe.MesocircuitExperiment(name, custom_params) print(meso_exp.parameterview) print(meso_exp.circuits) .. GENERATED FROM PYTHON SOURCE LINES 39-41 For each parameter combination, run the default simulation, analysis, and plotting scripts. .. GENERATED FROM PYTHON SOURCE LINES 41-51 .. code-block:: Python for circuit in meso_exp.circuits: circuit.run_jobs( jobs=[ 'network', 'analysis_and_plotting', ], machine='local' ) .. GENERATED FROM PYTHON SOURCE LINES 52-54 For each default figure, create one overview figure that compares the data for different parameter combinations, using latex. .. GENERATED FROM PYTHON SOURCE LINES 54-59 .. code-block:: Python if 1: parameterspace_overviews( paramspace_key=name, data_dir=meso_exp.data_dir) .. _sphx_glr_download_auto_examples_run_parameterspace.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: run_parameterspace.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: run_parameterspace.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: run_parameterspace.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_