.. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_explore_kernels.py: ============================= Explore kernels ============================= In this example, we plot the kernel options provided. .. image:: /auto_examples/images/sphx_glr_plot_explore_kernels_001.png :class: sphx-glr-single-img .. code-block:: python # Code source: Lucy Owen # License: MIT # load import timecorr as tc import numpy as np from matplotlib import pyplot as plt # load helper functions from timecorr.helpers import plot_weights # define number of timepoints T = 100 # define width width = 10 # define functions laplace = {'name': 'Laplace', 'weights': tc.laplace_weights, 'params': {'scale': width}} delta = {'name': '$\delta$', 'weights': tc.eye_weights, 'params': tc.eye_params} gaussian = {'name': 'Gaussian', 'weights': tc.gaussian_weights, 'params': {'var': width}} mexican_hat = {'name': 'Mexican hat', 'weights': tc.mexican_hat_weights, 'params': {'sigma': width}} # plot delta plot_weights(delta['weights'](T), title='Delta') plt.show() plt.clf() # plot gaussian plot_weights(gaussian['weights'](T), title='Gaussian') plt.show() plt.clf() # plot laplace plot_weights(laplace['weights'](T), title='Laplace') plt.show() plt.clf() # plot mexican hat plot_weights(mexican_hat['weights'](T), title='Mexican hat') plt.show() plt.clf() **Total running time of the script:** ( 0 minutes 0.199 seconds) .. _sphx_glr_download_auto_examples_plot_explore_kernels.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: plot_explore_kernels.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: plot_explore_kernels.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_