Combining ultra-flexible electrodes with two-photon imaging to illuminate brain-wide neural dynamics
The 2 matches
- [1] § Data analysis › Reduced rank regression ↔ python/fitting.py, lines 4–45 · score 0.67 · ridge regularized reduced, rank regression, fitting, lambda, matrix, RRR
- [2] § Data analysis › Reduced rank regression ↔ python/fitting.py, lines 4–45 · score 0.60 · ridge regularized reduced, rank regression, RRR, neurons
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 92 lines · 3 KB · no license · 2 matches
- import numpy as np
- from scipy.linalg import sqrtm, inv
- def svd_RRR(X, Y, rnk, lambda_=0):
- """
- Perform Ridge Regularized Reduced Rank Regression (RRR) using SVD.
- Parameters:
- X : np.ndarray
- Input data matrix (n_samples, n_input_neurons).
- Y : np.ndarray
- Output data matrix (n_samples, n_output_neurons).
- rnk : int
- Dimensionaility of communication
- lambda_ : float
- Regularization parameter (default is 0 for no regularization).
- Returns:
- w0 : np.ndarray
- Estimate of the communication strength (n_input_neurons, n_output_neurons).
- urrr : np.ndarray
- Input axes (n_input_neurons, rnk).
- vrrr : np.ndarray
- Output axes, orthonormal (n_output_neurons, rnk).
- """
- # Check if X and Y are 2D arrays
- # Ridge regularization
- XX = X.T @ X + lambda_ * np.eye(X.shape[1])
- # Least squares estimate with ridge
- if np.linalg.cond(XX) < 1e10:
- wridge = np.linalg.solve(XX, X.T @ Y)
- else:
- wridge = np.linalg.pinv(XX) @ (X.T @ Y)
- # SVD of relevant matrix
- _, _, vrrr = np.linalg.svd(Y.T @ X @ wridge)
- # Get the top 'rnk' components
- vrrr = vrrr[:rnk, :].T # shape: (features, rnk)
- urrr = wridge @ vrrr # shape: (features, rnk)
- # Construct full RRR estimate
- w0 = urrr @ vrrr.T
- vrrr = vrrr.T # for compatibility with original code's return
- return w0, urrr, vrrr
- def svd_RRR_noniso(X, Y, rnk, C=None):
- """
- Perform Reduced Rank Regression (RRR) using SVD with non-isotropic noise.
- Parameters:
- X : np.ndarray
- Input data matrix (n_samples, n_input_neurons).
- Y : np.ndarray
- Output data matrix (n_samples, n_output_neurons).
- rnk : int
- Dimensionaility of communication
- C : np.ndarray, optional
- Covariance matrix of the noise (default is None, estimate from data).
- Returns:
- w0 : np.ndarray
- Estimate of the communication strength (n_input_neurons, n_output_neurons).
- urrr : np.ndarray
- Input axes (n_input_neurons, rnk).
- vrrr : np.ndarray
- Output axes (n_output_neurons, rnk).
- """
- # Least squares estimate
- wls = np.linalg.solve(X.T @ X, X.T @ Y)
- # Compute covariance of residuals if C is not provided
- if C is None:
- res_wls = Y - X @ wls
- C = (res_wls.T @ res_wls) / (X.shape[0] - 1)
- # Compute inverse sqrt and sqrt of C
- C_sqrt = sqrtm(C)
- C_inv_sqrt = inv(C_sqrt)
- # SVD of whitened cross-covariance
- _, _, vrrr = np.linalg.svd(C_inv_sqrt @ Y.T @ X @ wls @ C_inv_sqrt)
- vrrr = vrrr[:rnk, :].T # shape: (features, rnk)
- # Adjust for non-isotropic noise
- vrrr = C_sqrt @ vrrr
- urrr = np.linalg.solve(X.T @ X, X.T @ Y @ inv(C) @ vrrr)
- # Reconstruct estimate
- w0 = urrr @ vrrr.T
- return w0, urrr, vrrr
fitting.py at commit e696dd7, no license · at the source
Overview
- Brain Research Institute, University of Zurich, Zurich, Switzerland
- Neuroscience Center Zurich, University of Zurich and ETH Zurich, Zurich, Switzerland
- Neurotechnology Group, Institute of Neuroinformatics, University of Zurich and ETH Zurich, Zurich, Switzerland
- University Research Priority Program (URPP), Adaptive Brain Circuits in Development and Learning, University of Zurich, Zurich, Switzerland
Abstract
Brain activity consists of neural signals dynamically coordinated across spatial and temporal scales. To sample distributed brain-wide activity, we combine chronically implanted ultra-flexible electrodes for subcortical recordings with simultaneous two-photon calcium imaging in mouse neocortex. Flexible electrodes preserve optical access even at steep insertion angles and enable weeks-long single-neuron tracking. With these combined recordings, we demonstrate how subcortical-cortical coupling is modulated across slow brain states and around fast ripple events.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.
bichanw/RRR
e696dd77a4e0a93b87d02e72b098d0732def4f38, 16 December 2025Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
18 files
- matlab/
alignment_input.m , MATLAB, 60 lines - matlab/
alignment_output.m , MATLAB, 60 lines - matlab/
main_figures.m , MATLAB, 298 lines - matlab/
other_funcs/ , MATLAB, 31 linesgetOr.m - matlab/
other_funcs/ , MATLAB, 73 linesplot_multiple_lines.m - matlab/
other_funcs/ , MATLAB, 47 linessimu_RRR.m - matlab/
other_funcs/ , MATLAB, 34 linestext_legend.m - matlab/
startup.m , MATLAB, 4 lines - matlab/
svd_RRR.m , MATLAB, 20 lines - matlab/
svd_RRR_noniso.m , MATLAB, 18 lines - python/
.ipynb_checkpoints/ , Jupyter, 170 linesfigures-checkpoint.ipynb - python/
.ipynb_checkpoints/ , Python, 52 linesfitting-checkpoint.py - python/
.ipynb_checkpoints/ , Python, 49 linessimu-checkpoint.py - python/
alignment.py , Python, 119 lines - python/
figures.ipynb , Jupyter, 391 lines - python/
fitting.py , Python, 92 lines, 2 matches - python/
simu.py , Python, 49 lines - README.md, Text, 37 lines
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 17 scripts, each with its path and the digest of its content;
- 2 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Code and data availability
The code and data that support the findings of this study will be made publicly available upon publication of this manuscript.
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 3, 28 September 2026
- Authors: added Adrian Roggenbach (0000-0002-3072-0733); removed Adrian Roggenbach
- Funding: added National Science Foundation; Schweizerischer Nationalfonds zur Förderung der Wissenschaftlichen Forschung: 41220, CRSII5_198739/1, 170269, 180316, 192617; Universität Zürich: K-41220-04
Version 1, 27 September 2026: the first record
Recorded: type, journal, 9 authors, 55 references.
Cite
This paper
Roggenbach, A., Meienberg, L., Yasar, T. B., Gombkoto, P., Junghanns, N., von der Behrens, W., Yanik, M. F., Helmchen, F., & Lewis, C. M. (2026). Combining ultra-flexible electrodes with two-photon imaging to illuminate brain-wide neural dynamics. Research Square (preprint). https://
BibTeX
@article{roggenbach2026c
author = {Roggenbach, Adrian and Meienberg, Linus and Yasar, Tansel Baran and Gombkoto, Peter and Junghanns, Nicolas and von der Behrens, Wolfger and Yanik, Mehmet Fatih and Helmchen, Fritjof and Lewis, Christopher M.},
title = {{Combining ultra-flexible electrodes with two-photon imaging to illuminate brain-wide neural dynamics}},
journal = {Research Square (preprint)},
year = {2026},
month = aug,
publisher = {Research Square},
issn = {2693-5015},
doi = {10.21203/
url = {https://
}
RIS
TY - JOUR
AU - Roggenbach, Adrian
AU - Meienberg, Linus
AU - Yasar, Tansel Baran
AU - Gombkoto, Peter
AU - Junghanns, Nicolas
AU - von der Behrens, Wolfger
AU - Yanik, Mehmet Fatih
AU - Helmchen, Fritjof
AU - Lewis, Christopher M.
TI - Combining ultra-flexible electrodes with two-photon imaging to illuminate brain-wide neural dynamics
T2 - Research Square (preprint)
J2 - Res Sq
PY - 2026
DA - 2026/
SN - 2693-5015
PB - Research Square
DO - 10.21203/
UR - https://
ER -
CSL-JSON
{
"id": "10.21203/
"type": "article",
"title": "Combining ultra-flexible electrodes with two-photon imaging to illuminate brain-wide neural dynamics",
"container-title": "Research Square (preprint)",
"author": [
{
"family": "Roggenbach",
"given": "Adrian"
},
{
"family": "Meienberg",
"given": "Linus"
},
{
"family": "Yasar",
"given": "Tansel Baran"
},
{
"family": "Gombkoto",
"given": "Peter"
},
{
"family": "Junghanns",
"given": "Nicolas"
},
{
"family": "von der Behrens",
"given": "Wolfger"
},
{
"family": "Yanik",
"given": "Mehmet Fatih"
},
{
"family": "Helmchen",
"given": "Fritjof"
},
{
"family": "Lewis",
"given": "Christopher M."
}
],
"container-title-short":
"DOI": "10.21203/
"ISSN": "2693-5015",
"publisher": "Research Square",
"URL": "https://
"issued": {
"date-parts": [
[
2026,
8,
4
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1038/s41467-026-71887-x [code]
- Magnetic resonance identification tags for ultra-flexible electrodes.Journal: Nature communicationsIn common: SciPy, Matplotlib, NumPy, 3 references, 3 authors
- [2] doi:10.1016/j.crmeth.2026.101481 [code]
- A hybrid micro-ECoG for functionally targeted multi-site and multi-scale investigation.Journal: Cell reports methodsIn common: Statistics and Machine Learning Toolbox, systems, 6 references, author Christopher M. Lewis
- [3] doi:10.1111/ejn.70582 [code]
- Multifiber Array-Based Photometry System for Multiregional Functional Mapping in the Mouse Brain.Journal: The European journal of neuroscienceIn common: SciPy, Matplotlib, NumPy, optical imaging (calcium, voltage, 2-photon), systems, 6 references
- [4] doi:10.1038/s41592-026-03154-2 [code]
- Simultaneous single-cell calcium imaging of neuronal population activity and brain-wide BOLD fMRI.Journal: Nature methodsIn common: Statistics and Machine Learning Toolbox, SciPy, Matplotlib, 1 other tool, optical imaging (calcium, voltage, 2-photon), author Mehmet Fatih Yanik
- [5] doi:10.1016/j.xpro.2026.104678 [code]
- Protocol for longitudinal two-photon calcium imaging and holographic optogenetic manipulation to investigate memory in mice.Journal: STAR protocolsIn common: Statistics and Machine Learning Toolbox, SciPy, Matplotlib, 1 other tool, optical imaging (calcium, voltage, 2-photon), 3 references
- [6] doi:10.1016/j.crmeth.2026.101421 [code]
- EthoPy provides an accessible platform for reproducible behavioral neuroscience.Journal: Cell reports methodsIn common: SciPy, Matplotlib, NumPy, 5 references
- [7] doi:10.1038/s41467-026-72454-0 [code]
- Dynamic neuronal ensembles encode burst-suppression revealed by cortex-wide optical-electrical interfaces.Journal: Nature communicationsIn common: SciPy, Matplotlib, NumPy, systems, 3 references
- [8] doi:10.1038/s41593-026-02232-0 [code]
- Entorhinal cortex represents task-relevant remote locations independently of CA1.Journal: Nature neuroscienceIn common: Statistics and Machine Learning Toolbox, SciPy, Matplotlib, 1 other tool, systems, 3 references
- [9] doi:10.1126/sciadv.aef9926 [code]
- aDISCO: A clearing method to enable 3D microscopy of large archival paraffin-embedded human tissue blocks.Journal: Science advancesIn common: SciPy, Matplotlib, NumPy, author Fritjof Helmchen
- [10] doi:10.1016/j.patter.2026.101590 [code]
- Density-based longitudinal neuron tracking in high-density electrophysiological recordings.Journal: Patterns (New York, N.Y.)In common: Statistics and Machine Learning Toolbox, SciPy, Matplotlib, 1 other tool, 3 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 17 scripts, and 2 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:6f4214b70fd4d6cd…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
