OSCR

Combining ultra-flexible electrodes with two-photon imaging to illuminate brain-wide neural dynamics

Code ↔ Paper

2 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 2 matches
  1. [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. [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

  1. import numpy as np
  2. from scipy.linalg import sqrtm, inv
  3. def svd_RRR(X, Y, rnk, lambda_=0):
  4. """
  5. Perform Ridge Regularized Reduced Rank Regression (RRR) using SVD.
  6. Parameters:
  7. X : np.ndarray
  8. Input data matrix (n_samples, n_input_neurons).
  9. Y : np.ndarray
  10. Output data matrix (n_samples, n_output_neurons).
  11. rnk : int
  12. Dimensionaility of communication
  13. lambda_ : float
  14. Regularization parameter (default is 0 for no regularization).
  15. Returns:
  16. w0 : np.ndarray
  17. Estimate of the communication strength (n_input_neurons, n_output_neurons).
  18. urrr : np.ndarray
  19. Input axes (n_input_neurons, rnk).
  20. vrrr : np.ndarray
  21. Output axes, orthonormal (n_output_neurons, rnk).
  22. """
  23. # Check if X and Y are 2D arrays
  24. # Ridge regularization
  25. XX = X.T @ X + lambda_ * np.eye(X.shape[1])
  26. # Least squares estimate with ridge
  27. if np.linalg.cond(XX) < 1e10:
  28. wridge = np.linalg.solve(XX, X.T @ Y)
  29. else:
  30. wridge = np.linalg.pinv(XX) @ (X.T @ Y)
  31. # SVD of relevant matrix
  32. _, _, vrrr = np.linalg.svd(Y.T @ X @ wridge)
  33. # Get the top 'rnk' components
  34. vrrr = vrrr[:rnk, :].T # shape: (features, rnk)
  35. urrr = wridge @ vrrr # shape: (features, rnk)
  36. # Construct full RRR estimate
  37. w0 = urrr @ vrrr.T
  38. vrrr = vrrr.T # for compatibility with original code's return
  39. return w0, urrr, vrrr
  40. def svd_RRR_noniso(X, Y, rnk, C=None):
  41. """
  42. Perform Reduced Rank Regression (RRR) using SVD with non-isotropic noise.
  43. Parameters:
  44. X : np.ndarray
  45. Input data matrix (n_samples, n_input_neurons).
  46. Y : np.ndarray
  47. Output data matrix (n_samples, n_output_neurons).
  48. rnk : int
  49. Dimensionaility of communication
  50. C : np.ndarray, optional
  51. Covariance matrix of the noise (default is None, estimate from data).
  52. Returns:
  53. w0 : np.ndarray
  54. Estimate of the communication strength (n_input_neurons, n_output_neurons).
  55. urrr : np.ndarray
  56. Input axes (n_input_neurons, rnk).
  57. vrrr : np.ndarray
  58. Output axes (n_output_neurons, rnk).
  59. """
  60. # Least squares estimate
  61. wls = np.linalg.solve(X.T @ X, X.T @ Y)
  62. # Compute covariance of residuals if C is not provided
  63. if C is None:
  64. res_wls = Y - X @ wls
  65. C = (res_wls.T @ res_wls) / (X.shape[0] - 1)
  66. # Compute inverse sqrt and sqrt of C
  67. C_sqrt = sqrtm(C)
  68. C_inv_sqrt = inv(C_sqrt)
  69. # SVD of whitened cross-covariance
  70. _, _, vrrr = np.linalg.svd(C_inv_sqrt @ Y.T @ X @ wls @ C_inv_sqrt)
  71. vrrr = vrrr[:rnk, :].T # shape: (features, rnk)
  72. # Adjust for non-isotropic noise
  73. vrrr = C_sqrt @ vrrr
  74. urrr = np.linalg.solve(X.T @ X, X.T @ Y @ inv(C) @ vrrr)
  75. # Reconstruct estimate
  76. w0 = urrr @ vrrr.T
  77. return w0, urrr, vrrr

fitting.py at commit e696dd7, no license · at the source

Overview

Authors: Adrian Roggenbach1,2, Linus Meienberg1, Tansel Baran Yasar2,3, Peter Gombkoto3, Nicolas Junghanns1, Wolfger von der Behrens2,3, Mehmet Fatih Yanik2,3, Fritjof Helmchen1,2,4, Christopher M. Lewis1
  1. Brain Research Institute, University of Zurich, Zurich, Switzerland
  2. Neuroscience Center Zurich, University of Zurich and ETH Zurich, Zurich, Switzerland
  3. Neurotechnology Group, Institute of Neuroinformatics, University of Zurich and ETH Zurich, Zurich, Switzerland
  4. University Research Priority Program (URPP), Adaptive Brain Circuits in Development and Learning, University of Zurich, Zurich, Switzerland
Institutions: University of Zurich (Switzerland); ETH Zurich (Switzerland); Institute of Neuroinformatics (Switzerland)
Dates: published 4 August 2026
Type: Preprint
License: CC BY
Identifiers: DOI 10.21203/rs.3.rs-10218667/v1 · OpenAlex W7172378176
Open access: green, a free copy (OpenAlex)
Status: code verified
Categories: optical imaging (calcium, voltage, 2-photon) (modality), systems (subfield)
Methods: Spectral & time-frequency, Connectivity, Statistics, Machine learning, Preprocessing, Evoked potentials, fMRI & imaging, Single-unit activity, calcium imaging, Smoothing, state filtering, decompositions, Physiology & signal measures
Topic: Neuroscience and Neural Engineering (Cellular and Molecular Neuroscience, Neuroscience), according to OpenAlex
Citations: not cited yet (OpenAlex); 56 references in the paper

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

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: e696dd77a4e0a93b87d02e72b098d0732def4f38, 16 December 2025
Languages: MATLAB (10), Python (5), Jupyter (2)
Size: 19 files, 17 scripts
Software Heritage: not archived
Found in: the text, “Reduced rank regression”
Holds: README, 1 notebook
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (7 files), SciPy (3 files), Statistics and Machine Learning Toolbox (2 files), Matplotlib (2 files)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
18 files
At the source: github.com/bichanw/RRR

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://doi.org/10.21203/rs.3.rs-10218667/v1

BibTeX

@article{roggenbach2026combining,
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/rs.3.rs-10218667/v1},
url = {https://doi.org/10.21203/rs.3.rs-10218667/v1}
}

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/08/04
SN - 2693-5015
PB - Research Square
DO - 10.21203/rs.3.rs-10218667/v1
UR - https://doi.org/10.21203/rs.3.rs-10218667/v1
ER -

CSL-JSON

{
"id": "10.21203/rs.3.rs-10218667/v1",
"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": "Res Sq",
"DOI": "10.21203/rs.3.rs-10218667/v1",
"ISSN": "2693-5015",
"publisher": "Research Square",
"URL": "https://doi.org/10.21203/rs.3.rs-10218667/v1",
"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 communications
In 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 methods
In 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 neuroscience
In 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 methods
In 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 protocols
In 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 methods
In 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 communications
In 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 neuroscience
In 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 advances
In 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.

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.