.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/astrocytes/astrocyte_single.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_astrocytes_astrocyte_single.py: A model using a single astrocyte with calcium dynamics ------------------------------------------------------- .. only:: html ---- Run this example as a Jupyter notebook: .. card:: :width: 25% :margin: 2 :text-align: center :link: https://lab.ebrains.eu/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fnest%2Fnest-simulator-examples&urlpath=lab%2Ftree%2Fnest-simulator-examples%2Fnotebooks%2Fnotebooks%2Fastrocytes%2Fastrocyte_single.ipynb&branch=main :link-alt: JupyterHub service .. image:: https://nest-simulator.org/TryItOnEBRAINS.png .. grid:: 1 1 1 1 :padding: 0 0 2 0 .. grid-item:: :class: sd-text-muted :margin: 0 0 3 0 :padding: 0 0 3 0 :columns: 4 See :ref:`our guide ` for more information and troubleshooting. ---- This script simulates an astrocyte with the model ``astrocyte_lr_1994``, which implements the dynamics in the astrocyte based on [1]_, [2]_, and [3]_. Recordings are made for two variables in the astrocyte, inositol 1,4,5-trisphosphate (IP3) and cytosolic calcium. The astrocyte is driven by a Poissonian spike train which induces the generation of IP3 in the astrocyte, which in turn influences the calcium dynamics in the astrocyte. See Also ~~~~~~~~ :doc:`astrocyte_interaction` References ~~~~~~~~~~ .. [1] Li, Y. X., & Rinzel, J. (1994). Equations for InsP3 receptor-mediated [Ca2+]i oscillations derived from a detailed kinetic model: a Hodgkin-Huxley like formalism. Journal of theoretical Biology, 166(4), 461-473. DOI: https://doi.org/10.1006/jtbi.1994.1041 .. [2] De Young, G. W., & Keizer, J. (1992). A single-pool inositol 1,4,5-trisphosphate-receptor-based model for agonist-stimulated oscillations in Ca2+ concentration. Proceedings of the National Academy of Sciences, 89(20), 9895-9899. DOI: https://doi.org/10.1073/pnas.89.20.9895 .. [3] Nadkarni, S., & Jung, P. (2003). Spontaneous oscillations of dressed neurons: a new mechanism for epilepsy?. Physical review letters, 91(26), 268101. DOI: https://doi.org/10.1103/PhysRevLett.91.268101 .. GENERATED FROM PYTHON SOURCE LINES 60-61 Import all necessary modules for simulation and plotting. .. GENERATED FROM PYTHON SOURCE LINES 61-65 .. code-block:: Python import matplotlib.pyplot as plt import nest .. GENERATED FROM PYTHON SOURCE LINES 66-67 Set parameters for the simulation. .. GENERATED FROM PYTHON SOURCE LINES 67-76 .. code-block:: Python # simulation time sim_time = 60000 # astrocyte parameters params_astro = {"IP3_0": 0.16} # Poisson input for the astrocyte poisson_rate = 1.0 poisson_weight = 0.1 .. GENERATED FROM PYTHON SOURCE LINES 77-78 Create astrocyte and devices and connect them. .. GENERATED FROM PYTHON SOURCE LINES 78-85 .. code-block:: Python astrocyte = nest.Create("astrocyte_lr_1994", params=params_astro) ps_astro = nest.Create("poisson_generator", params={"rate": poisson_rate}) mm_astro = nest.Create("multimeter", params={"record_from": ["IP3", "Ca_astro"]}) nest.Connect(ps_astro, astrocyte, syn_spec={"weight": poisson_weight}) nest.Connect(mm_astro, astrocyte) .. GENERATED FROM PYTHON SOURCE LINES 86-87 Run simulation and get results. .. GENERATED FROM PYTHON SOURCE LINES 87-91 .. code-block:: Python nest.Simulate(sim_time) data = mm_astro.events .. GENERATED FROM PYTHON SOURCE LINES 92-93 Create and show plots. .. GENERATED FROM PYTHON SOURCE LINES 93-103 .. code-block:: Python fig, axes = plt.subplots(2, 1, sharex=True, figsize=(6.4, 4.8), dpi=100) axes[0].plot(data["times"], data["IP3"]) axes[1].plot(data["times"], data["Ca_astro"]) axes[0].set_ylabel(r"[IP$_{3}$] ($\mu$M)") axes[1].set_ylabel(r"[Ca$^{2+}$] ($\mu$M)") axes[1].set_xlabel("Time (ms)") plt.tight_layout() plt.show() plt.close() .. _sphx_glr_download_auto_examples_astrocytes_astrocyte_single.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: astrocyte_single.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: astrocyte_single.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_