Combining ultra-flexible electrodes with two-photon imaging to illuminate brain-wide neural dynamics
One block of code here has a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.
The 2 matches
- [1] § Data analysis › Reduced rank regression ↔ python/fitting.py, lines 4 to 45 · score 0.67 · ridge regularized reduced, rank regression, fitting, lambda, matrix, RRR · block
oscr:b:NJQQHVGKYBGB5-O· Report a mismatch - [2] § Data analysis › Reduced rank regression ↔ python/fitting.py, lines 4 to 45 · score 0.60 · ridge regularized reduced, rank regression, RRR, neurons · block
oscr:b:NJQQHVGKYBGB5-O· Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: 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-024-49226-9 [code]
- Months-long tracking of neuronal ensembles spanning multiple brain areas with Ultra-Flexible Tentacle Electrodes.Journal: Nature communicationsIn common: Statistics and Machine Learning Toolbox, SciPy, Matplotlib, 1 other tool, systems, 5 references, 6 authors
- [2] 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
- [3] doi:10.1038/s41467-025-58688-4 [code]
- Brain-wide microstrokes affect the stability of memory circuits in the hippocampus.Journal: Nature communicationsIn common: SciPy, Matplotlib, NumPy, systems, 5 references, 2 authors
- [4] doi:10.1038/s41593-024-01612-8 [code]
- Centripetal integration of past events in hippocampal astrocytes regulated by locus coeruleus.Journal: Nature neuroscienceIn common: Statistics and Machine Learning Toolbox, SciPy, Matplotlib, 1 other tool, optical imaging (calcium, voltage, 2-photon), 2 references, 2 authors
- [5] 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
- [6] doi:10.1038/s41467-023-42777-3 [code]
- Striatum-projecting prefrontal cortex neurons support working memory maintenance.Journal: Nature communicationsIn common: Statistics and Machine Learning Toolbox, SciPy, Matplotlib, 1 other tool, optical imaging (calcium, voltage, 2-photon), 1 reference, 2 authors
- [7] doi:10.21203/rs.3.rs-6306814/v1 [code]
- Spike inference from calcium imaging data acquired with GCaMP8 indicatorsJournal: Research Square (preprint)In common: Statistics and Machine Learning Toolbox, SciPy, Matplotlib, 1 other tool, optical imaging (calcium, voltage, 2-photon), 5 references, author Fritjof Helmchen
- [8] doi:10.1523/jneurosci.1187-24.2025 [code]
- Spike Rate Inference from Mouse Spinal Cord Calcium Imaging Data.Journal: The Journal of neuroscience : the official journal of the Society for NeuroscienceIn common: SciPy, Matplotlib, NumPy, optical imaging (calcium, voltage, 2-photon), 4 references, author Fritjof Helmchen
- [9] 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
- [10] doi:10.1117/1.nph.13.s2.s23202 [code]
- Voltage imaging as a window into neural computation.Journal: NeurophotonicsIn common: Statistics and Machine Learning Toolbox, optical imaging (calcium, voltage, 2-photon), 7 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:b381f427230a0419…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.21203/rs.3.rs-10218667/v1)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.21203/rs.3.rs-10218667/v1.svg
:target: https://openscicode.org/badge/doi/10.21203/rs.3.rs-10218667/v1
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.21203/rs.3.rs-10218667/v1"><img src="https://openscicode.org/badge/doi/10.21203/rs.3.rs-10218667/v1.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
