OSCR

An epifluorescence microscope design for naturalistic behavior and cellular activity in freely moving Caenorhabditis elegans.

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 of them tie a paragraph to a whole file, not to given lines: a weak match, whose lines are not tinted
  1. [1] § Methods › Calcium imaging in RIA axonal compartments ↔ RIA/7Convert_polar.py, the whole file · a weak match · score 0.72 · polar coordinates, Head angle, atan2, bins, phase, Derivatives
  2. [2] § Methods › Calcium imaging in RIA axonal compartments ↔ RIA/5Midline_Skeletonize.py, lines 158–198 · score 0.57 · Head angle, 0–1, vectors, skeletonized, midline, smoothed

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 · 129 lines · 4.1 KB · no license · 1 match

  1. import pandas as pd
  2. import numpy as np
  3. import matplotlib.pyplot as plt
  4. from pathlib import Path
  5. def convert_to_polar_binned(csv_path, output_path=None):
  6. """
  7. Convert head angle data to polar coordinates and bin into 10-degree sections
  8. Args:
  9. csv_path: Path to input CSV file with head_angle column
  10. output_path: Path to save the output CSV file (optional)
  11. Returns:
  12. DataFrame with the converted data
  13. """
  14. # Load the data
  15. df = pd.read_csv(csv_path)
  16. # Calculate derivative of head_angle (dhead/dt)
  17. head_angle = df['head_angle'].values
  18. dhead_dt = np.gradient(head_angle)
  19. # Calculate polar angle from (head_angle, dhead_dt) using atan2
  20. # atan2(y, x) - head_angle is x, dhead_dt is y
  21. theta = np.arctan2(dhead_dt, head_angle)
  22. # Ensure angles are in [0, 2*pi]
  23. theta = (theta + 2*np.pi) % (2*np.pi)
  24. # Convert to degrees for binning
  25. theta_deg = theta * 180/np.pi
  26. # Create bins from 0 to 360 degrees with 10-degree width
  27. bin_size = 10
  28. bin_edges = np.arange(0, 361, bin_size)
  29. bin_centers = bin_edges[:-1] + bin_size/2
  30. # Find which bin each angle belongs to
  31. bin_indices = np.searchsorted(bin_edges, theta_deg, side='right') - 1
  32. # Handle edge case where theta_deg is exactly 360 degrees
  33. bin_indices[bin_indices == len(bin_edges)-1] = 0
  34. # Get the binned angle (center of the bin)
  35. binned_theta_deg = bin_centers[bin_indices]
  36. binned_theta_rad = binned_theta_deg * np.pi/180
  37. # Calculate x,y coordinates on the unit circle for the binned angles
  38. polar_x = np.cos(binned_theta_rad)
  39. polar_y = np.sin(binned_theta_rad)
  40. # Create a dataframe with the results
  41. result_df = pd.DataFrame({
  42. 'frame': np.arange(len(head_angle)),
  43. 'head_angle': head_angle,
  44. 'dhead_dt': dhead_dt,
  45. 'theta_rad': theta,
  46. 'theta_deg': theta_deg,
  47. 'bin_index': bin_indices,
  48. 'binned_theta_deg': binned_theta_deg,
  49. 'binned_theta_rad': binned_theta_rad,
  50. 'polar_x': polar_x,
  51. 'polar_y': polar_y
  52. })
  53. # Plot the data
  54. plt.figure(figsize=(15, 10))
  55. # Plot the original head angle
  56. plt.subplot(2, 2, 1)
  57. plt.plot(result_df['frame'], result_df['head_angle'])
  58. plt.title('Original Head Angle')
  59. plt.xlabel('Frame')
  60. plt.ylabel('Angle')
  61. plt.grid(True)
  62. # Plot phase space (head_angle vs dhead_dt)
  63. plt.subplot(2, 2, 2)
  64. plt.scatter(result_df['head_angle'], result_df['dhead_dt'],
  65. c=result_df['frame'], cmap='viridis', alpha=0.7)
  66. plt.colorbar(label='Frame')
  67. plt.title('Phase Space: Head Angle vs. dHead/dt')
  68. plt.xlabel('Head Angle')
  69. plt.ylabel('dHead/dt')
  70. plt.grid(True)
  71. # Plot points on the unit circle
  72. plt.subplot(2, 2, 3)
  73. # Draw unit circle
  74. theta_circle = np.linspace(0, 2*np.pi, 100)
  75. plt.plot(np.cos(theta_circle), np.sin(theta_circle), 'k--', alpha=0.3)
  76. # Plot binned points
  77. sc = plt.scatter(result_df['polar_x'], result_df['polar_y'],
  78. c=result_df['frame'], cmap='viridis', alpha=0.7)
  79. plt.colorbar(sc, label='Frame')
  80. plt.title('Binned Polar Coordinates on Unit Circle')
  81. plt.xlabel('X')
  82. plt.ylabel('Y')
  83. plt.axis('equal')
  84. plt.grid(True)
  85. # Plot binned angles over time
  86. plt.subplot(2, 2, 4)
  87. plt.scatter(result_df['frame'], result_df['binned_theta_deg'],
  88. c=result_df['frame'], cmap='viridis', alpha=0.7)
  89. plt.title('Binned Polar Angles')
  90. plt.xlabel('Frame')
  91. plt.ylabel('Angle (degrees)')
  92. plt.grid(True)
  93. plt.ylim(0, 360)
  94. plt.tight_layout()
  95. plt.show()
  96. # Save to a new CSV file
  97. if output_path:
  98. result_df.to_csv(output_path, index=False)
  99. print(f"Data saved to {output_path}")
  100. return result_df
  101. if __name__ == "__main__":
  102. # Replace with actual path to your input CSV file
  103. input_path = "angles/1_angle_smooth.csv" # Update this with your file path
  104. output_path = "angles/1_polar.csv"
  105. result_df = convert_to_polar_binned(input_path, output_path)

7Convert_polar.py at commit 39a954a, no license · at the source

Overview

Authors: Sebastian N. Wittekindt1, Hannah Owens1, Aurélie Guisnet2, Lennard Wittekindt3, Michael Hendricks2
  1. Integrated Program in Neuroscience, McGill University,Montreal, QC Canada
  2. Department of Biology, McGill University,Montreal, QC Canada
  3. Independent Researcher, Immenreich, Lindau, Germany
Institutions: McGill University (Canada)
Journal: Nature communications, volume 17, issue 1, article 4411
Dates: received 2 May 2025; accepted 23 April 2026; published online 19 May 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s41467-026-72709-w · PMID 42156741 · PMCID PMC13187321 · OpenAlex W7161623035
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: histology / microscopy (modality), C. elegans (organism), cellular / molecular (subfield)
Methods: Evoked potentials, Single-unit activity, calcium imaging, Smoothing, state filtering, decompositions
Keywords: Neural circuits, Fluorescence imaging
MeSH: Behavior, Animal*, Caenorhabditis elegans*, Animals, Axons, Calcium, Interneurons, Microscopy, Fluorescence, Muscles, Sensory Receptor Cells (* major topic)
Topic: Genetics, Aging, and Longevity in Model Organisms (Aging, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Citations: cited by 3 papers (Europe PMC); 38 references in the paper

Abstract

Understanding the neural basis of behavior requires imaging cellular activity in freely moving animals, which typically demands expensive, restrictive microscopy setups. To overcome these barriers, we developed Wormspy, a cost-effective, open-source epifluorescence microscopy system for high-magnification imaging and tracking of Caenorhabditis elegans. Wormspy enables the simultaneous recording of neuronal activity and behavioral dynamics without needing the animal to be restrained. We demonstrate its utility in imaging body wall muscles, sensory neurons, and subcellular calcium events within interneuron axons. Our platform reproduces known mutant phenotypes and uncovers, to the best of our knowledge, previously inaccessible sensorimotor correlations. We show that Wormspy provides a robust, modular framework that lowers technical barriers to high-resolution neural imaging, enabling flexible experimental designs for dissecting behavior in freely moving organisms.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repositories

Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.

Zenodo 19477903

License: CC-BY-4.0
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: “Data availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (14 files), OpenCV (8 files), pandas (8 files), tifffile (7 files), Matplotlib (6 files), Pillow (5 files), imageio (3 files), PyTorch (2 files), scikit-image (2 files), SciPy (2 files), h5py (1 file), seaborn (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)
19 files
At the source:

Hendricks-Worm-Lab/WormsPy_paper_analysis

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: 39a954adc94ac157adb4aa95d4dcefbc9e20ddc2, 19 April 2026
Languages: Python (17), Jupyter (1)
Size: 138 files, 18 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, 1 notebook
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (14 files), OpenCV (8 files), pandas (8 files), tifffile (7 files), Matplotlib (6 files), Pillow (5 files), imageio (3 files), PyTorch (2 files), scikit-image (2 files), SciPy (2 files), h5py (1 file), seaborn (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
19 files

sebzdead.github.io/wormspy

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: the link answers
Software Heritage: not checked
Found in: “Code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)

Zenodo 19477899

License: CC-BY-4.0
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: the references
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (3 files), OpenCV (3 files), tifffile (3 files), imageio (2 files), scikit-image (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)
3 files
At the source:

Zenodo 19477902

License: CC-BY-4.0
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: the references
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (14 files), OpenCV (8 files), pandas (8 files), tifffile (7 files), Matplotlib (6 files), Pillow (5 files), imageio (3 files), PyTorch (2 files), scikit-image (2 files), SciPy (2 files), h5py (1 file), seaborn (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)
19 files
At the source:

hendricks-worm-lab/gcamp_analysis

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: 72361f7742283e511379ec4b830727dc83a42c6a, 1 March 2024
Languages: Python (3)
Size: 3 files, 3 scripts
Software Heritage: not archived
Found in: the Zenodo archive record
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (3 files), OpenCV (3 files), tifffile (3 files), imageio (2 files), scikit-image (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
3 files

Code availability

https://github.com/Hendricks-Worm-Lab/WormsPy_paper_analysis. The custom software package used for microscope control and tracking (Wormspy) is available on GitHub https://sebzdead.github.io/WormsPy/37. The custom segmentation and analysis code is available on GitHub38.

Reproduced under the paper's license (CC BY), from the paper cited above.

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:

  • 6 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 60 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.

Data availability

The data generated in this study are accessible at 10.5281/zenodo.19477903. Source data are provided with this paper.

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 1, 28 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 5 authors, 2 keywords, 9 MeSH terms, 2 funders, 37 references.

Cite

This paper

Wittekindt, S. N., Owens, H., Guisnet, A., Wittekindt, L., & Hendricks, M. (2026). An epifluorescence microscope design for naturalistic behavior and cellular activity in freely moving Caenorhabditis elegans. Nature communications, 17(1), 4411. https://doi.org/10.1038/s41467-026-72709-w

BibTeX

@article{wittekindt2026epifluorescence,
author = {Wittekindt, Sebastian N. and Owens, Hannah and Guisnet, Aurélie and Wittekindt, Lennard and Hendricks, Michael},
title = {{An epifluorescence microscope design for naturalistic behavior and cellular activity in freely moving Caenorhabditis elegans}},
journal = {Nature communications},
year = {2026},
month = may,
volume = {17},
number = {1},
pages = {4411},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/s41467-026-72709-w},
url = {https://doi.org/10.1038/s41467-026-72709-w},
pmid = {42156741},
pmcid = {PMC13187321}
}

RIS

TY - JOUR
AU - Wittekindt, Sebastian N.
AU - Owens, Hannah
AU - Guisnet, Aurélie
AU - Wittekindt, Lennard
AU - Hendricks, Michael
TI - An epifluorescence microscope design for naturalistic behavior and cellular activity in freely moving Caenorhabditis elegans
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/05/19
VL - 17
IS - 1
SP - 4411
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/s41467-026-72709-w
UR - https://doi.org/10.1038/s41467-026-72709-w
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-72709-w",
"type": "article-journal",
"title": "An epifluorescence microscope design for naturalistic behavior and cellular activity in freely moving Caenorhabditis elegans",
"container-title": "Nature communications",
"author": [
{
"family": "Wittekindt",
"given": "Sebastian N."
},
{
"family": "Owens",
"given": "Hannah"
},
{
"family": "Guisnet",
"given": "Aurélie"
},
{
"family": "Wittekindt",
"given": "Lennard"
},
{
"family": "Hendricks",
"given": "Michael"
}
],
"container-title-short": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "4411",
"DOI": "10.1038/s41467-026-72709-w",
"PMID": "42156741",
"PMCID": "PMC13187321",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41467-026-72709-w",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
19
]
]
}
}

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-72710-3 [code]
A modular multi-color fluorescence microscope for simultaneous tracking of cellular activity and behavior.
Journal: Nature communications
In common: tifffile, OpenCV, scikit-image, 5 other tools, C. elegans, histology / microscopy, 12 references
[2] doi:10.1371/journal.pcbi.1013441 [code]
Large vision model framework for automated C. elegans analysis: From static morphometry to dynamic neural activity.
Journal: PLoS computational biology
In common: tifffile, OpenCV, scikit-image, 7 other tools, C. elegans, 3 references, 2 authors
[3] doi:10.1038/s41593-026-02257-5 [code]
Neural sequences underlying directed turning in Caenorhabditis elegans.
Journal: Nature neuroscience
In common: tifffile, h5py, Pillow, 6 other tools, C. elegans, 3 references
[4] doi:10.1364/boe.605322 [code]
Generalized plaque digitization framework for multi-dimensional mesoscopic images.
Journal: Biomedical optics express
In common: imageio, tifffile, OpenCV, 9 other tools
[5] doi: [code]
Real-time closed-loop feedback system for mouse mesoscale cortical signal and movement control
Journal: eLife
In common: imageio, tifffile, OpenCV, 8 other tools, 1 reference
[6] doi:10.7554/elife.109717 [code]
Retrosplenial cortex enables context-dependent goal-directed sensorimotor transformation.
Journal: eLife
In common: imageio, tifffile, OpenCV, 8 other tools, 1 reference
[7] doi:10.1038/s41598-026-57519-w [code]
Automated segmentation of neurons and spinal cord structures in immunofluorescence images using SpineDL.
Journal: Scientific reports
In common: imageio, tifffile, OpenCV, 8 other tools, histology / microscopy
[8] doi:10.1016/j.xcrm.2026.102766 [code]
A longitudinal single-cell and spatial multiomic atlas of pediatric high-grade glioma.
Journal: Cell reports. Medicine
In common: imageio, tifffile, OpenCV, 8 other tools, cellular / molecular
[9] doi:10.1038/s41467-026-73373-w [code]
Mapping neuro-vascular unit communications reveals distinct angiogenic programs across developing mouse brain regions.
Journal: Nature communications
In common: imageio, tifffile, OpenCV, 8 other tools
[10] doi:10.1038/s41467-026-73045-9 [code]
Aberration-aware 3D localization microscopy via self-supervised neural-physics learning.
Journal: Nature communications
In common: imageio, tifffile, OpenCV, 7 other tools, histology / microscopy, cellular / molecular

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.