# spectral_connectivity
[](https://github.com/Eden-Kramer-Lab/spectral_connectivity/actions/workflows/release.yml)
[](https://zenodo.org/badge/latestdoi/104382538)
[](https://mybinder.org/v2/gh/Eden-Kramer-Lab/spectral_connectivity/master)
[](https://joss.theoj.org/papers/27eb33e699c9ea723783c44576d081bb)
[](https://badge.fury.io/py/spectral_connectivity)
[](https://anaconda.org/edeno/spectral_connectivity)
[](https://spectral-connectivity.readthedocs.io/en/latest/?badge=latest)
[](https://coveralls.io/github/Eden-Kramer-Lab/spectral_connectivity?branch=master)
[**Tutorials**](#tutorials)
| [**Documentation**](#documentation)
| [**Usage Example**](#usage-example)
| [**Installation**](#installation)
| [**Developer Installation**](#developer-installation)
| [**Contributing**](#contributing)
| [**License**](#license)
| [**Citation**](#citation)
## What is spectral_connectivity?
`spectral_connectivity` is a Python software package that computes multitaper spectral estimates and frequency-domain brain connectivity measures such as coherence, spectral granger causality, and the phase lag index using the multitaper Fourier transform. Although there are other Python packages that do this (see [nitime](https://github.com/nipy/nitime) and [MNE-Python](https://github.com/mne-tools/mne-python)), `spectral_connectivity` has several differences:
+ it is designed to handle multiple time series at once
+ it caches frequently computed quantities such as the cross-spectral matrix and minimum-phase-decomposition, so that connectivity measures that use the same processing steps can be more quickly computed.
+ it decouples the time-frequency transform and the connectivity measures so that if you already have a preferred way of computing Fourier coefficients (i.e. from a wavelet transform), you can use that instead.
+ it implements the non-parametric version of the spectral granger causality in Python.
+ it implements the canonical coherence, which can
efficiently summarize brain-area level coherences from multielectrode recordings.
+ easier user interface for the multitaper fourier transform
+ all function are GPU-enabled if `cupy` is installed and the environmental variable `SPECTRAL_CONNECTIVITY_ENABLE_GPU` is set to 'true'.
### Tutorials
See the following notebooks for more information on how to use the package:
+ [Tutorial](examples/Intro_tutorial.ipynb)
+ [Usage Examples](examples/Tutorial_On_Simulated_Examples.ipynb)
+ [More Usage Examples](examples/Tutorial_Using_Paper_Examples.ipynb)
### Usage Example
```python
from spectral_connectivity import Multitaper, Connectivity
# Compute multitaper spectral estimate
m = Multitaper(time_series=signals,
sampling_frequency=sampling_frequency,
time_halfbandwidth_product=time_halfbandwidth_product,
time_window_duration=0.060,
time_window_step=0.060,
start_time=time[0])
# Sets up computing connectivity measures/power from multitaper spectral estimate
c = Connectivity.from_multitaper(m)
# Here are a couple of examples
power = c.power() # spectral power
coherence = c.coherence_magnitude()
weighted_phase_lag_index = c.weighted_phase_lag_index()
canonical_coherence = c.canonical_coherence(brain_area_labels)
```
### Documentation
See the documentation on [ReadTheDocs](https://spectral-connectivity.readthedocs.io/en/latest/).
For a canonical reference of connectivity metric value ranges, see [Connectivity Metric Ranges](docs/CONNECTIVITY_METRIC_RANGES.md).
### Implemented Measures
Functional
1. coherency
2. canonical_coherence
3. imaginary_coherence
4. phase_locking_value
5. phase_lag_index
6. weighted_phase_lag_index
7. debiased_squared_phase_lag_index
8. debiased_squared_weighted_phase_lag_index
9. pairwise_phase_consistency
10. global coherence
Directed
1. directed_transfer_function
2. directed_coherence
3. partial_directed_coherence
4. generalized_partial_directed_coherence
5. direct_directed_transfer_function
6. group_delay
7. phase_lag_index
8. pairwise_spectral_granger_prediction
### Package Dependencies
`spectral_connectivity` requires:
+ python
+ numpy
+ matplotlib
+ scipy
+ xarray
See [environment.yml](environment.yml) for the most current list of dependencies.
### GPU Acceleration
`spectral_connectivity` supports GPU acceleration using [CuPy](https://cupy.dev/), which can provide significant speedups for large datasets (10-100x faster depending on data size and GPU hardware).
#### GPU Setup Options
There are three ways to enable GPU acceleration:
**Option 1: Environment Variable (Shell)**
```bash
export SPECTRAL_CONNECTIVITY_ENABLE_GPU=true
python your_script.py
```
**Option 2: Environment Variable (Python Script)**
```python
import os
# IMPORTANT: Must set BEFORE importing spectral_connectivity
# (Python loads modules once; changing the variable after import has no effect)
os.environ['SPECTRAL_CONNECTIVITY_ENABLE_GPU'] = 'true'
from spectral_connectivity import Multitaper, Connectivity
# Verify GPU is active
import spectral_connectivity as sc
backend = sc.get_compute_backend()
print(backend['message'])
# Should print: "Using GPU backend with CuPy on <your GPU name>"
```
**Option 3: Environment Variable (Jupyter Notebook)**
```python
# In first cell (before any imports):
%env SPECTRAL_CONNECTIVITY_ENABLE_GPU=true
# In second cell:
from spectral_connectivity import Multitaper, Connectivity
import spectral_connectivity as sc
# Verify GPU is active
backend = sc.get_compute_backend()
print(f"Backend: {backend['backend']}")
print(f"Device: {backend['device_name']}")
# Should show: Backend: gpu, Device: <your GPU name>
# Note: If you already imported spectral_connectivity before setting the
# environment variable, you must restart your kernel for changes to take effect:
# Kernel → Restart & Clear Output, then run cells again
```
#### Installing CuPy
**Recommended (conda - auto-detects CUDA version):**
```bash
conda install -c conda-forge cupy
```
**Alternative (pip - auto-detect, may be slower on first run):**
```bash
pip install cupy
```
**Advanced (pip - specify CUDA version for faster install):**
```bash
# Check your CUDA version first: nvidia-smi
pip install cupy-cuda11x # For CUDA 11.x
pip install cupy-cuda12x # For CUDA 12.x
```
See [CuPy Installation Guide](https://docs.cupy.dev/en/stable/install.html) for detailed instructions and GPU-specific requirements.
#### Checking GPU Status
Use `get_compute_backend()` to check if GPU acceleration is enabled:
```python
import spectral_connectivity as sc
backend = sc.get_compute_backend()
print(backend['message'])
# Example output (GPU enabled):
# "Using GPU backend with CuPy on NVIDIA Tesla V100-SXM2-16GB."
# Or if GPU not available:
# "Using CPU backend with NumPy. To enable GPU acceleration:
# 1. Install CuPy: 'conda install -c conda-forge cupy' or 'pip install cupy'
# 2. Set environment variable SPECTRAL_CONNECTIVITY_ENABLE_GPU='true' before importing
# See documentation for detailed setup instructions."
# Check all details
for key, value in backend.items():
print(f"{key}: {value}")
```
Output fields:
- `backend`: Either "cpu" or "gpu"
- `gpu_enabled`: Whether GPU was requested via environment variable
- `gpu_available`: Whether CuPy is installed and importable
- `device_name`: Name of compute device (e.g., "CPU" or "GPU (Compute Capability 7.5)")
- `message`: Human-readable explanation of current configuration
#### Troubleshooting GPU Issues
**Issue: "GPU support was requested but CuPy is not installed"**
Solution: Install CuPy as shown above, ensuring the CUDA version matches your system.
**Issue: GPU not being used even after setting environment variable**
Possible causes:
1. Environment variable set *after* importing spectral_connectivity
- Solution: Set `SPECTRAL_CONNECTIVITY_ENABLE_GPU=true` before any imports
- In scripts: Move the `os.environ[...]` line to the very top, before all spectral_connectivity imports
- In notebooks: Restart kernel (Kernel → Restart & Clear Output) and set variable in first cell
2. CuPy not installed or CUDA version mismatch
- Solution: Run `python -c "import cupy; print(cupy.__version__)"` to verify installation
3. CUDA not available on system
- Solution: Check CUDA installation with `nvidia-smi`
4. Environment variable set in script but after import statement
- Solution: Ensure `os.environ['SPECTRAL_CONNECTIVITY_ENABLE_GPU'] = 'true'` appears before `from spectral_connectivity import ...`
**Issue: Out of memory errors on GPU**
Solution: Use smaller batch sizes or switch back to CPU for very large datasets:
```python
# Remove or unset the environment variable
os.environ.pop('SPECTRAL_CONNECTIVITY_ENABLE_GPU', None)
```
**Issue: Need to check GPU vs CPU performance**
Use `get_compute_backend()` to verify which backend is active, then compare timing:
```python
import time
import spectral_connectivity as sc
backend = sc.get_compute_backend()
print(f"Running on: {backend['backend']}")
start = time.time()
# Your spectral connectivity code here
elapsed = time.time() - start
print(f"Elapsed time: {elapsed:.2f}s")
```
#### When to Use GPU Acceleration
GPU acceleration is most beneficial for:
- Large datasets (many signals, long recordings, or many trials)
- High frequency resolution (small time windows, many tapers)
- Computing multiple connectivity measures from the same data
For small datasets (< 10 signals, < 1000 time points), CPU may be faster due to GPU transfer overhead.
### Installation
```bash
pip install spectral_connectivity
```
or
```bash
conda install -c edeno spectral_connectivity
```
### Developer Installation
If you want to make contributions to this library, please use this installation.
1. Install miniconda (or anaconda) if it isn't already installed. Type into bash (or install from the anaconda website):
```bash
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
hash -r
```
1. Clone the repository to your local machine (`.../spectral_connectivity`) and install the anaconda environment for the repository. Type into bash:
```bash
conda env create -f environment.yml
conda activate spectral_connectivity
pip install -e .
```
## Releases
This package uses dynamic versioning with [Hatch](https://hatch.pypa.io/) based on git tags. The version is automatically determined from the repository state:
- **Tagged releases**: `1.2.0`
- **Development versions**: `1.2.0.dev5+g1a2b3c4` (5 commits since tag + git hash)
### Making a Release
To create a new release:
```bash
# 1. Update version tag
git tag v1.2.0
git push origin v1.2.0
# 2. Build and publish to PyPI
hatch build
twine upload dist/*
# 3. Build and publish to conda
conda build conda-recipe/ --output-folder ./conda-builds
anaconda upload ./conda-builds/noarch/spectral_connectivity-*.tar.bz2
```
The version number is automatically extracted from the git tag (without the 'v' prefix).
### Conda Package
This package is also available on conda via the `edeno` channel:
```bash
conda install -c edeno spectral_connectivity
```
**Not yet on conda-forge?** Help us get there! If you'd like this package on conda-forge for easier installation, please:
- 👍 React to [this issue](https://github.com/Eden-Kramer-Lab/spectral_connectivity/issues) requesting conda-forge support
- Or volunteer to help maintain the conda-forge feedstock
## Contributing
We welcome contributions to `spectral_connectivity`! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details on:
+ How to report bugs and request features
+ Development workflow and coding standards
+ Testing requirements
+ Code review process
For questions or discussions, please open an issue on GitHub.
## License
This project is licensed under the **GPL-3.0** License - see the [LICENSE](LICENSE) file for details.
## Citation
For citation, please use the following:
> Denovellis, E.L., Myroshnychenko, M., Sarmashghi, M., and Stephen, E.P. (2022). Spectral Connectivity: a python package for computing multitaper spectral estimates and frequency-domain brain connectivity measures on the CPU and GPU. JOSS 7, 4840. [10.21105/joss.04840](https://doi.org/10.21105/joss.04840).
### Recent publications and pre-prints that used this software
+ Detection of Directed Connectivities in Dynamic Systems for Different Excitation Signals using Spectral Granger Causality <https://doi.org/10.1007/978-3-662-58485-9_11>
+ Network Path Convergence Shapes Low-Level Processing in the Visual Cortex <https://doi.org/10.3389/fnsys.2021.645709>
+ Subthalamic–Cortical Network Reorganization during Parkinson's Tremor
<https://doi.org/10.1523/JNEUROSCI.0854-21.2021>
+ Unifying Pairwise Interactions in Complex Dynamics <https://doi.org/10.48550/arXiv.2201.11941>
+ Phencyclidine-induced psychosis causes hypersynchronization and
disruption of connectivity within prefrontal-hippocampal circuits
that is rescued by antipsychotic drugs <https://doi.org/10.1101/2021.02.03.429582>
+ The cerebellum regulates fear extinction through thalamo-prefrontal cortex interactions in male mice <https://doi.org/10.1038/s41467-023-36943-w>
Raw data
{
"_id": null,
"home_page": null,
"name": "spectral-connectivity",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "coherence, connectivity, electrophysiology, frequency-domain, granger-causality, multitaper, neuroscience, python, spectrogram",
"author": null,
"author_email": "Eric Denovellis <eric.denovellis@ucsf.edu>",
"download_url": "https://files.pythonhosted.org/packages/24/89/1005e90800b4e278e8ff659ddd5c3611a35e1e27c5131ec593aa1e383351/spectral_connectivity-2.0.0.tar.gz",
"platform": null,
"description": "# spectral_connectivity\n\n[](https://github.com/Eden-Kramer-Lab/spectral_connectivity/actions/workflows/release.yml)\n[](https://zenodo.org/badge/latestdoi/104382538)\n[](https://mybinder.org/v2/gh/Eden-Kramer-Lab/spectral_connectivity/master)\n[](https://joss.theoj.org/papers/27eb33e699c9ea723783c44576d081bb)\n[](https://badge.fury.io/py/spectral_connectivity)\n[](https://anaconda.org/edeno/spectral_connectivity)\n[](https://spectral-connectivity.readthedocs.io/en/latest/?badge=latest)\n[](https://coveralls.io/github/Eden-Kramer-Lab/spectral_connectivity?branch=master)\n\n[**Tutorials**](#tutorials)\n| [**Documentation**](#documentation)\n| [**Usage Example**](#usage-example)\n| [**Installation**](#installation)\n| [**Developer Installation**](#developer-installation)\n| [**Contributing**](#contributing)\n| [**License**](#license)\n| [**Citation**](#citation)\n\n## What is spectral_connectivity?\n\n`spectral_connectivity` is a Python software package that computes multitaper spectral estimates and frequency-domain brain connectivity measures such as coherence, spectral granger causality, and the phase lag index using the multitaper Fourier transform. Although there are other Python packages that do this (see [nitime](https://github.com/nipy/nitime) and [MNE-Python](https://github.com/mne-tools/mne-python)), `spectral_connectivity` has several differences:\n\n+ it is designed to handle multiple time series at once\n+ it caches frequently computed quantities such as the cross-spectral matrix and minimum-phase-decomposition, so that connectivity measures that use the same processing steps can be more quickly computed.\n+ it decouples the time-frequency transform and the connectivity measures so that if you already have a preferred way of computing Fourier coefficients (i.e. from a wavelet transform), you can use that instead.\n+ it implements the non-parametric version of the spectral granger causality in Python.\n+ it implements the canonical coherence, which can\nefficiently summarize brain-area level coherences from multielectrode recordings.\n+ easier user interface for the multitaper fourier transform\n+ all function are GPU-enabled if `cupy` is installed and the environmental variable `SPECTRAL_CONNECTIVITY_ENABLE_GPU` is set to 'true'.\n\n### Tutorials\n\nSee the following notebooks for more information on how to use the package:\n\n+ [Tutorial](examples/Intro_tutorial.ipynb)\n+ [Usage Examples](examples/Tutorial_On_Simulated_Examples.ipynb)\n+ [More Usage Examples](examples/Tutorial_Using_Paper_Examples.ipynb)\n\n### Usage Example\n\n```python\nfrom spectral_connectivity import Multitaper, Connectivity\n\n# Compute multitaper spectral estimate\nm = Multitaper(time_series=signals,\n sampling_frequency=sampling_frequency,\n time_halfbandwidth_product=time_halfbandwidth_product,\n time_window_duration=0.060,\n time_window_step=0.060,\n start_time=time[0])\n\n# Sets up computing connectivity measures/power from multitaper spectral estimate\nc = Connectivity.from_multitaper(m)\n\n# Here are a couple of examples\npower = c.power() # spectral power\ncoherence = c.coherence_magnitude()\nweighted_phase_lag_index = c.weighted_phase_lag_index()\ncanonical_coherence = c.canonical_coherence(brain_area_labels)\n```\n\n### Documentation\n\nSee the documentation on [ReadTheDocs](https://spectral-connectivity.readthedocs.io/en/latest/).\n\nFor a canonical reference of connectivity metric value ranges, see [Connectivity Metric Ranges](docs/CONNECTIVITY_METRIC_RANGES.md).\n\n### Implemented Measures\n\nFunctional\n\n1. coherency\n2. canonical_coherence\n3. imaginary_coherence\n4. phase_locking_value\n5. phase_lag_index\n6. weighted_phase_lag_index\n7. debiased_squared_phase_lag_index\n8. debiased_squared_weighted_phase_lag_index\n9. pairwise_phase_consistency\n10. global coherence\n\nDirected\n\n1. directed_transfer_function\n2. directed_coherence\n3. partial_directed_coherence\n4. generalized_partial_directed_coherence\n5. direct_directed_transfer_function\n6. group_delay\n7. phase_lag_index\n8. pairwise_spectral_granger_prediction\n\n### Package Dependencies\n\n`spectral_connectivity` requires:\n\n+ python\n+ numpy\n+ matplotlib\n+ scipy\n+ xarray\n\nSee [environment.yml](environment.yml) for the most current list of dependencies.\n\n### GPU Acceleration\n\n`spectral_connectivity` supports GPU acceleration using [CuPy](https://cupy.dev/), which can provide significant speedups for large datasets (10-100x faster depending on data size and GPU hardware).\n\n#### GPU Setup Options\n\nThere are three ways to enable GPU acceleration:\n\n**Option 1: Environment Variable (Shell)**\n\n```bash\nexport SPECTRAL_CONNECTIVITY_ENABLE_GPU=true\npython your_script.py\n```\n\n**Option 2: Environment Variable (Python Script)**\n\n```python\nimport os\n# IMPORTANT: Must set BEFORE importing spectral_connectivity\n# (Python loads modules once; changing the variable after import has no effect)\nos.environ['SPECTRAL_CONNECTIVITY_ENABLE_GPU'] = 'true'\n\nfrom spectral_connectivity import Multitaper, Connectivity\n\n# Verify GPU is active\nimport spectral_connectivity as sc\nbackend = sc.get_compute_backend()\nprint(backend['message'])\n# Should print: \"Using GPU backend with CuPy on <your GPU name>\"\n```\n\n**Option 3: Environment Variable (Jupyter Notebook)**\n\n```python\n# In first cell (before any imports):\n%env SPECTRAL_CONNECTIVITY_ENABLE_GPU=true\n\n# In second cell:\nfrom spectral_connectivity import Multitaper, Connectivity\nimport spectral_connectivity as sc\n\n# Verify GPU is active\nbackend = sc.get_compute_backend()\nprint(f\"Backend: {backend['backend']}\")\nprint(f\"Device: {backend['device_name']}\")\n# Should show: Backend: gpu, Device: <your GPU name>\n\n# Note: If you already imported spectral_connectivity before setting the\n# environment variable, you must restart your kernel for changes to take effect:\n# Kernel \u2192 Restart & Clear Output, then run cells again\n```\n\n#### Installing CuPy\n\n**Recommended (conda - auto-detects CUDA version):**\n\n```bash\nconda install -c conda-forge cupy\n```\n\n**Alternative (pip - auto-detect, may be slower on first run):**\n\n```bash\npip install cupy\n```\n\n**Advanced (pip - specify CUDA version for faster install):**\n\n```bash\n# Check your CUDA version first: nvidia-smi\npip install cupy-cuda11x # For CUDA 11.x\npip install cupy-cuda12x # For CUDA 12.x\n```\n\nSee [CuPy Installation Guide](https://docs.cupy.dev/en/stable/install.html) for detailed instructions and GPU-specific requirements.\n\n#### Checking GPU Status\n\nUse `get_compute_backend()` to check if GPU acceleration is enabled:\n\n```python\nimport spectral_connectivity as sc\n\nbackend = sc.get_compute_backend()\nprint(backend['message'])\n# Example output (GPU enabled):\n# \"Using GPU backend with CuPy on NVIDIA Tesla V100-SXM2-16GB.\"\n\n# Or if GPU not available:\n# \"Using CPU backend with NumPy. To enable GPU acceleration:\n# 1. Install CuPy: 'conda install -c conda-forge cupy' or 'pip install cupy'\n# 2. Set environment variable SPECTRAL_CONNECTIVITY_ENABLE_GPU='true' before importing\n# See documentation for detailed setup instructions.\"\n\n# Check all details\nfor key, value in backend.items():\n print(f\"{key}: {value}\")\n```\n\nOutput fields:\n- `backend`: Either \"cpu\" or \"gpu\"\n- `gpu_enabled`: Whether GPU was requested via environment variable\n- `gpu_available`: Whether CuPy is installed and importable\n- `device_name`: Name of compute device (e.g., \"CPU\" or \"GPU (Compute Capability 7.5)\")\n- `message`: Human-readable explanation of current configuration\n\n#### Troubleshooting GPU Issues\n\n**Issue: \"GPU support was requested but CuPy is not installed\"**\n\nSolution: Install CuPy as shown above, ensuring the CUDA version matches your system.\n\n**Issue: GPU not being used even after setting environment variable**\n\nPossible causes:\n1. Environment variable set *after* importing spectral_connectivity\n - Solution: Set `SPECTRAL_CONNECTIVITY_ENABLE_GPU=true` before any imports\n - In scripts: Move the `os.environ[...]` line to the very top, before all spectral_connectivity imports\n - In notebooks: Restart kernel (Kernel \u2192 Restart & Clear Output) and set variable in first cell\n2. CuPy not installed or CUDA version mismatch\n - Solution: Run `python -c \"import cupy; print(cupy.__version__)\"` to verify installation\n3. CUDA not available on system\n - Solution: Check CUDA installation with `nvidia-smi`\n4. Environment variable set in script but after import statement\n - Solution: Ensure `os.environ['SPECTRAL_CONNECTIVITY_ENABLE_GPU'] = 'true'` appears before `from spectral_connectivity import ...`\n\n**Issue: Out of memory errors on GPU**\n\nSolution: Use smaller batch sizes or switch back to CPU for very large datasets:\n```python\n# Remove or unset the environment variable\nos.environ.pop('SPECTRAL_CONNECTIVITY_ENABLE_GPU', None)\n```\n\n**Issue: Need to check GPU vs CPU performance**\n\nUse `get_compute_backend()` to verify which backend is active, then compare timing:\n\n```python\nimport time\nimport spectral_connectivity as sc\n\nbackend = sc.get_compute_backend()\nprint(f\"Running on: {backend['backend']}\")\n\nstart = time.time()\n# Your spectral connectivity code here\nelapsed = time.time() - start\nprint(f\"Elapsed time: {elapsed:.2f}s\")\n```\n\n#### When to Use GPU Acceleration\n\nGPU acceleration is most beneficial for:\n- Large datasets (many signals, long recordings, or many trials)\n- High frequency resolution (small time windows, many tapers)\n- Computing multiple connectivity measures from the same data\n\nFor small datasets (< 10 signals, < 1000 time points), CPU may be faster due to GPU transfer overhead.\n\n### Installation\n\n```bash\npip install spectral_connectivity\n```\n\nor\n\n```bash\nconda install -c edeno spectral_connectivity\n```\n\n### Developer Installation\n\nIf you want to make contributions to this library, please use this installation.\n\n1. Install miniconda (or anaconda) if it isn't already installed. Type into bash (or install from the anaconda website):\n\n```bash\nwget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;\nbash miniconda.sh -b -p $HOME/miniconda\nexport PATH=\"$HOME/miniconda/bin:$PATH\"\nhash -r\n```\n\n1. Clone the repository to your local machine (`.../spectral_connectivity`) and install the anaconda environment for the repository. Type into bash:\n\n```bash\nconda env create -f environment.yml\nconda activate spectral_connectivity\npip install -e .\n```\n\n## Releases\n\nThis package uses dynamic versioning with [Hatch](https://hatch.pypa.io/) based on git tags. The version is automatically determined from the repository state:\n\n- **Tagged releases**: `1.2.0`\n- **Development versions**: `1.2.0.dev5+g1a2b3c4` (5 commits since tag + git hash)\n\n### Making a Release\n\nTo create a new release:\n\n```bash\n# 1. Update version tag\ngit tag v1.2.0\ngit push origin v1.2.0\n\n# 2. Build and publish to PyPI\nhatch build\ntwine upload dist/*\n\n# 3. Build and publish to conda\nconda build conda-recipe/ --output-folder ./conda-builds\nanaconda upload ./conda-builds/noarch/spectral_connectivity-*.tar.bz2\n```\n\nThe version number is automatically extracted from the git tag (without the 'v' prefix).\n\n### Conda Package\n\nThis package is also available on conda via the `edeno` channel:\n\n```bash\nconda install -c edeno spectral_connectivity\n```\n\n**Not yet on conda-forge?** Help us get there! If you'd like this package on conda-forge for easier installation, please:\n- \ud83d\udc4d React to [this issue](https://github.com/Eden-Kramer-Lab/spectral_connectivity/issues) requesting conda-forge support\n- Or volunteer to help maintain the conda-forge feedstock\n\n## Contributing\n\nWe welcome contributions to `spectral_connectivity`! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details on:\n\n+ How to report bugs and request features\n+ Development workflow and coding standards\n+ Testing requirements\n+ Code review process\n\nFor questions or discussions, please open an issue on GitHub.\n\n## License\n\nThis project is licensed under the **GPL-3.0** License - see the [LICENSE](LICENSE) file for details.\n\n## Citation\n\nFor citation, please use the following:\n\n> Denovellis, E.L., Myroshnychenko, M., Sarmashghi, M., and Stephen, E.P. (2022). Spectral Connectivity: a python package for computing multitaper spectral estimates and frequency-domain brain connectivity measures on the CPU and GPU. JOSS 7, 4840. [10.21105/joss.04840](https://doi.org/10.21105/joss.04840).\n\n### Recent publications and pre-prints that used this software\n\n+ Detection of Directed Connectivities in Dynamic Systems for Different Excitation Signals using Spectral Granger Causality <https://doi.org/10.1007/978-3-662-58485-9_11>\n+ Network Path Convergence Shapes Low-Level Processing in the Visual Cortex <https://doi.org/10.3389/fnsys.2021.645709>\n+ Subthalamic\u2013Cortical Network Reorganization during Parkinson's Tremor\n<https://doi.org/10.1523/JNEUROSCI.0854-21.2021>\n+ Unifying Pairwise Interactions in Complex Dynamics <https://doi.org/10.48550/arXiv.2201.11941>\n+ Phencyclidine-induced psychosis causes hypersynchronization and\ndisruption of connectivity within prefrontal-hippocampal circuits\nthat is rescued by antipsychotic drugs <https://doi.org/10.1101/2021.02.03.429582>\n+ The cerebellum regulates fear extinction through thalamo-prefrontal cortex interactions in male mice <https://doi.org/10.1038/s41467-023-36943-w>\n",
"bugtrack_url": null,
"license": "GPL-3.0-only",
"summary": "Frequency domain functional and directed connectivity analysis tools for electrophysiological data",
"version": "2.0.0",
"project_urls": {
"Bug Reports": "https://github.com/Eden-Kramer-Lab/spectral_connectivity/issues",
"Changelog": "https://github.com/Eden-Kramer-Lab/spectral_connectivity/blob/master/CHANGELOG.md",
"Documentation": "https://spectral-connectivity.readthedocs.io/en/latest/",
"Homepage": "https://github.com/Eden-Kramer-Lab/spectral_connectivity",
"Issue Tracker": "https://github.com/Eden-Kramer-Lab/spectral_connectivity/issues",
"Repository": "https://github.com/Eden-Kramer-Lab/spectral_connectivity",
"Source Code": "https://github.com/Eden-Kramer-Lab/spectral_connectivity"
},
"split_keywords": [
"coherence",
" connectivity",
" electrophysiology",
" frequency-domain",
" granger-causality",
" multitaper",
" neuroscience",
" python",
" spectrogram"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "d3fe9ba615a3035b470c1167cbf478a17e2c98789fb6537770397fe858a1d005",
"md5": "5784666e5f8e94be74f687281aee2a34",
"sha256": "d78c77818bbf715dbdaa09e425ba40071085b080ee6c51a0b4f3075ffc2626f7"
},
"downloads": -1,
"filename": "spectral_connectivity-2.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5784666e5f8e94be74f687281aee2a34",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 71622,
"upload_time": "2025-10-27T14:36:32",
"upload_time_iso_8601": "2025-10-27T14:36:32.801934Z",
"url": "https://files.pythonhosted.org/packages/d3/fe/9ba615a3035b470c1167cbf478a17e2c98789fb6537770397fe858a1d005/spectral_connectivity-2.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "24891005e90800b4e278e8ff659ddd5c3611a35e1e27c5131ec593aa1e383351",
"md5": "c79221585bfd852ce7eaac5d3e99e551",
"sha256": "521cd70ab01195c13e7ec1adeff96fee56e07dcd63974951420af9e7519bd45a"
},
"downloads": -1,
"filename": "spectral_connectivity-2.0.0.tar.gz",
"has_sig": false,
"md5_digest": "c79221585bfd852ce7eaac5d3e99e551",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 5464032,
"upload_time": "2025-10-27T14:36:34",
"upload_time_iso_8601": "2025-10-27T14:36:34.472080Z",
"url": "https://files.pythonhosted.org/packages/24/89/1005e90800b4e278e8ff659ddd5c3611a35e1e27c5131ec593aa1e383351/spectral_connectivity-2.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-27 14:36:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Eden-Kramer-Lab",
"github_project": "spectral_connectivity",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "spectral-connectivity"
}