LUMIN: an automated graphical analysis toolbox for high-throughput calcium imaging of in vitro neuronal cultures
Erno Hänninen, Anika K Mueller, Jonas Viswalingam Bagge, Lucía Sena Trujillo, Lorenzo Fedrizzi, Agnete Kirkeby, Janko Kajtez

TL;DR
LUMIN is a new software tool for analyzing calcium imaging data from lab-grown neurons, enabling efficient and accurate study of neuronal activity for drug screening and disease modeling.
Contribution
LUMIN introduces a scalable, automated graphical analysis tool specifically optimized for high-throughput calcium imaging of in vitro neuronal cultures.
Findings
LUMIN processes thousands of cells within hours on a standard laptop due to its efficient data processing and linear time complexity.
The software successfully demonstrated performance in analyzing human stem cell-derived ventral midbrain neurons using pharmacological compounds.
LUMIN includes two modules for analyzing transiently active and quiescent neurons, making it broadly applicable to diverse neuronal cultures.
Abstract
Human pluripotent stem cell-derived in vitro models, combined with advances in high-content live-cell calcium imaging, provide a powerful platform for disease modeling and drug screening. However, most calcium imaging analysis tools have been developed for in vivo applications with suboptimal features for processing data from cultured neurons. Here, we present LUMIN (Live-cell User Module for Imaging and analysis of Neuronal activity), a scalable and broadly applicable software that integrates a graphical user interface with automated data analysis encompassing single-cell segmentation, signal extraction, and activity quantification. Two analysis modules for transiently active or quiescent stimuli-evoked neurons make it broadly applicable for cultures with distinct functional properties. Its efficient data processing and linear time complexity enable processing thousands of cells within…
Genes, proteins, chemicals, diseases, species, mutations and cell lines named across the full text — each resolved to its canonical identifier and authoritative record.
Click any figure to enlarge with its caption.
Figure 1
Figure 2
Figure 3
Figure 4- —https://doi.org/10.13039/100012774Innovationsfonden
- —https://doi.org/10.13039/501100003554Lundbeck Foundation
- —Innovation office at University of Copenhagen
- —https://doi.org/10.13039/501100009708Novo Nordisk Fonden
- —https://doi.org/10.13039/501100004836Danmarks Frie Forskningsfond
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNeuroscience and Neural Engineering · Pluripotent Stem Cells Research · Cell Image Analysis Techniques
Introduction
The study of neuronal activity and signaling is a fundamental part of neurobiology and integral to understanding brain function, neurological disorders, and effects of pharmaceutical drugs. Changes in intracellular calcium ion levels serve as a proxy for neuronal activity, reflecting processes that span a wide range of timescales, from microsecond-scale neurotransmitter release to gene transcription events lasting minutes to hours^1^. To this end, calcium imaging has been established as a powerful tool to study neuronal dynamics from single-cell and network-level processes^2,3^. Over the past decades, two types of optical indicators have been developed for calcium visualization with increasing efficacy, stability, and signal-to-noise ratio: bulk-loaded chemical dyes and protein-based genetically encoded indicators^4^. Simultaneously, the development of microscopy techniques for high-speed and high-resolution imaging complemented the toolkit for the optical investigation of neuronal activity in vivo and* in vitro*^5^. Notably, calcium imaging becomes a particularly powerful functional assay when coupled with human pluripotent stem cell (hPSC)-derived neuronal cultures and high-throughput imaging approaches. This combination enables functional interrogation of disease-relevant models (e.g., Parkinson’s disease, epilepsy, and schizophrenia) and drug screening platforms based on neuronal functionality. By capturing the dynamics of calcium transients, this approach provides a spatiotemporal map of neuronal network responses under diverse experimental conditions and myriads of stimuli. Importantly, calcium imaging is accessible and readily scalable, in contrast to patch-clamp recording which suffers from low-throughput and requires extensive technical expertise, and multi-electrode arrays (MEAs) which require specialized equipment. However, its adoption in many biology laboratories is still limited due to the extensive computational pipelines required for downstream analysis.
In recent years, numerous calcium imaging analysis tools have been developed. Most are tailored to in vivo applications and incorporate computationally demanding features that are often unnecessary for in vitro data^6–10^. These features include motion correction, suboptimal segmentation methods with limited sensitivity to detect low activity neurons, and non-cell region of interest (ROI) identification, a step that can be mitigated by providing a nuclear counterstain to improve segmentation. On the other hand, existing tools for in vitro calcium imaging either lack a graphical user interface (GUI)^11,12^ or employ semi-automated segmentation methods^13,14^, limiting their accessibility to experimental biologists and making them inadequate for high-throughput applications. Moreover, current tools are designed to detect transient events deviating from baseline, as a proxy of action potentials. In contrast, tools for quantifying gradual baseline shifts in calcium levels in the absence of rapid transients, as may be induced by neuromodulatory stimulation, are generally lacking. Collectively, this underscores the need for a scalable, user-friendly analytical calcium imaging tool for in vitro data, that is capable to meet the demands driven by the advances in high-content imaging approaches combined with hPSC–based modeling.
To address these limitations, we present an intuitive application that integrates all essential analysis steps. LUMIN (Live-cell User Module for Imaging and analysis of Neuronal activity) is an open-source, fully GUI-based platform designed to analyze transient activity or stimulus-evoked baseline shifts in in vitro neuronal cultures. LUMIN runs efficiently on standard desktop computers due to its linear time complexity, scaling to high-throughput experiments and enabling the functional profiling of thousands of cells autonomously. The platform integrates state-of-the-art image and signal processing software packages with custom-developed scripts to perform analysis in two main pipelines: (1) Segmentation and signal extraction including steps for deep learning-based ROI detection and single-cell signal extraction and (2) Single-cell data analysis including baseline normalization, spike or baseline shift detection, response classification, clustering, and visualization steps. To account for the heterogeneity of stem cell cultures, segmentation can also be performed manually, allowing the correlation of cellular identity determined via immunocytochemistry (ICC) with functional profiles. LUMIN prioritizes ease of use and reliability regardless of computational expertise, enabling researchers to conduct accurate and efficient calcium imaging analyses across a wide range of experimental conditions. As a proof of concept, we demonstrate its analytical capabilities through two case studies to characterize spontaneous calcium transients and stimulus-evoked baseline shifts in hPSC-derived ventral midbrain (VM) neuronal cultures.
Results
Experimental workflow
In order to establish a pipeline for automated analysis of in vitro calcium imaging data (Fig. 1A), hPSC-derived VM dopamine neurons were cultured on Laminin-521-coated 96-well plates. Cultures were imaged between days 50 and 60 of differentiation. On the day of recording, cells were bulk-loaded with the chemical calcium indicator Calbryte 520 AM, washed, and subsequently transferred to a confocal spinning-disk microscope for live imaging. Alternatively, other experimental designs, including genetically encoded calcium indicators of different colors, may also be used. Time-lapse imaging acquisition was combined with optional automated compound pipetting, reducing user intervention to simply exchanging plates. Videos were recorded to capture either spontaneous activity or responses to test compounds, and a final potassium chloride (KCl) stimulation was included as a positive control. This step facilitated neuronal identification and segmentation, particularly in heterogeneous cultures containing multiple cell types with variable basal calcium levels. Depending on the timelapse duration, our setup enabled the acquisition of hundreds of image stacks (~ 20,000 cells) in a single day. After imaging, cells were fixed and were optionally immunostained to link calcium responses to specific cell types.
Fig. 1. Overview of calcium imaging workflow and LUMIN software. A Schematic of the experimental workflow. Cells are incubated with a chemical calcium indicator Calbryte 520 AM for 45 min at 37 °C and 5% CO₂, followed by live-cell imaging using spinning disk confocal microscopy. Optional fixation and ICC can be performed post-imaging to link functional data with cellular identity. B LUMIN GUI with Segmentation and signal extraction widget (right), built-in Napari widgets (left), and a segmented cytoplasmic image (center), with mask outlines for detected cells and labels for detected nuclei.
LUMIN software overview
After acquisition, the image stacks were processed and analyzed in LUMIN through segmentation, signal extraction, signal quantification, and result visualization (Fig. 1B). The pipeline is implemented in Python and built around Napari^17^, a well-established high-dimensional bioimage viewer featuring a low-latency GUI. Overall, this setup allows streamlined analysis of large-scale imaging experiments through smooth image rendering, interactive parameter fine-tuning, and efficient automated data processing within a user-friendly environment. The GUI is built using Napari widgets which are graphical elements for exploring and analyzing imaging data. The two built-in widgets used in LUMIN include data layer list and layer controls. These allow the user to display images and segmentation results in the image canvas and to manipulate settings such as image contrast and colors (Fig. 1B left and center). In addition, the interface includes two custom-developed widgets for Segmentation and signal extraction and Single-cell data analysis pipelines, enabling interactive parameter fine-tuning and automated execution of both analysis steps. In the widget for Segmentation and signal extraction pipeline, the user configures parameters such as diameter and probability thresholds for the ROI segmentation algorithms. The pipeline then samples a random recording from the input data, performs segmentation and displays the resulting mask. The user can adjust post-filtering parameters to remove low-confidence labels (Fig. 1B right and center). In the widget for Single-cell data analysis pipeline, the user first configures parameters for baseline normalization and spike or baseline shift detection. The pipeline draws a random sample and applies various visualization methods for baseline estimation and response classification enabling interactive parameter tuning (Supplementary Fig. 1A-C and Supplementary Video 1). For both pipelines, the user can repeat the optimization procedure until satisfied with the parameters. Subsequently, the analysis is launched from the corresponding widget, and the pipelines apply the defined configuration to process all input files automatically.
Segmentation and signal extraction
The first pipeline, Segmentation and signal extraction (Fig. 2A left), extracts fluorescence intensity levels over time from defined ROIs corresponding to single cells. To prepare the data for segmentation, a maximum intensity projection is performed with the max function from NumPy^18^ on each image stack. We recommend administering a depolarizing stimulus of KCl at the end of the recording to confirm neuronal viability and to facilitate the segmentation task through increased signal-to-noise ratio. The next step, cell segmentation, can be performed either manually or automatically by deep learning-based methods. The manual approach is recommended for more complex segmentation tasks such as identifying immunolabeled cell types for the correlation analysis of ICC and calcium imaging. In contrast, automated segmentation makes the pipeline suitable for large-scale experiments involving hundreds of recordings. For automated segmentation, Cellpose^19^ segments the cytoplasmic calcium signal by applying pre-trained models such as cyto, cyto2, and cyto3. Including a co-localizing nuclear stain improves segmentation accuracy by ensuring that the identified object corresponds to a cell soma rather than a dendrite or axon. The nuclear stain is segmented using the 2D_versatile_fluo nuclear model from StarDist^20^, and the resulting mask is merged with the cytoplasmic mask. Each cell is assigned at most one nucleus using the linear_sum_assignment function from SciPy^21^ to identify optimal nucleus-to-cell pairings based on the overlap area between nuclear and cytoplasmic masks. The final mask is generated through a post-filtering step, where objects from the cytoplasmic mask can be excluded based on calcium intensity and cell size using user-defined thresholds. If a nuclear stain is provided, additional filtering measures for nuclear-cytoplasmic mask overlap and nuclear size are included. The resulting mask is used to extract the mean fluorescence intensity of each cell across frames in the image stack using the regionprops_table function from scikit-image^22^, yielding a raw calcium activity trace for each cell.
Fig. 2. Overview of the analysis workflow. A In the Segmentation and signal extraction pipeline, the image stacks are projected to their maximum intensity. Cells are segmented manually or using deep learning-based approaches. In automated segmentation, the final mask is generated in post-filtering steps, including thresholds for fluorescence intensity and cell size. If an optional nuclear stain is provided, it is segmented, and additional post-filtering parameters for nuclear-cytoplasmic overlap and nuclear size are provided. The extracted raw signal is quantified using the Transient activity or Baseline shift module. B In Transient activity analysis, raw traces are normalized using a sliding window. Peaks are detected and cells classified by peak amplitude, frequency, width, rise time, and decay time. The module outputs various qualitative and quantitative graphs to visualize the results. C In Baseline shift analysis, traces are normalized using a pre-stimulus baseline recording. For response quantification, an analysis window is defined from where AUC is computed. Cells are classified as responding if their AUC exceeds a threshold defined as a user-specified number of standard deviations above the control mean. The results are visualized using qualitative and quantitative graphs.
The second pipeline, Single-cell data analysis (Fig. 2A right), can be performed according to two modules depending on the experimental type: Transient activity or Baseline shift. The Transient activity module is designed to detect short-lived events in calcium signal (spikes) as a proxy of action potentials. On the other hand, if the goal is to measure changes in baseline calcium levels (usually at longer time scales, with slower kinetics) as a result of a compound stimulation, the Baseline shift module should be used. For experiments where a stimulation was added during imaging, LUMIN contains a mode for stimulus-evoked activity experiments that provides an alternative normalization approach and additional parameters for response quantification window.
Transient activity module
In calcium imaging analysis, the differences in baseline fluorescence (F₀) of cells are accounted through trace normalization. In the Transient activity module, the baseline is defined using a sliding window that adjusts F₀ over time to capture gradual fluctuations of the signal (Fig. 2B top) that can be caused by e.g. photobleaching. Within each window, F₀ is estimated as the mean of previous fluorescence values, that fall below a user-defined percentile threshold. To accommodate varying neuronal activity profiles and noise levels across experiments, users can fine-tune the window size and percentile threshold. For accurate F₀ estimation, we generally recommend setting the window size larger than the estimated spike duration and using a lower percentile for low-noise or high-activity recordings. On the other hand, higher percentiles are more suitable for recordings dominated by noise or low activity. After defining F₀ for each time point, the baseline normalized trace (ΔF/F₀) is calculated as (F(t) − F₀)/F₀, where F(t) is the fluorescence intensity at a given time point.
After normalization, action potentials are estimated through spike detection (Fig. 2B bottom). Spikes are identified based on how much the local maximum stands out from the surrounding signal, as measured using a user-defined prominence threshold implemented in the find_peaks function in SciPy^21^. The optional filtering step includes removing low-confidence peaks characterized by low amplitude and high width (amplitude-width ratio). The function returns quantitative shape characteristics of each spike, capturing subtle functional changes in calcium dynamics. These include spike location, amplitude, width, and the positions of the width edges which are used to compute rise and decay times. The remaining downstream analysis is restricted to cells exhibiting at least one calcium spike during recording. To summarize these multi-dimensional activity patterns, LUMIN applies principal component analysis (PCA) from the pca Python package and clustering using k-means clustering from scikit-learn^23^, enabling identification of distinct activity states across conditions.
The Transient activity module provides comprehensive output for assessing data quality and neuronal activity, which are stored in a specified project folder on the computer’s file system. The quality-control output includes plots summarizing the number of detected cells and KCl response amplitude per image. The analysis output contains qualitative heatmaps, representative traces, quantitative bar and swarm plots as well as PCA and clustering visualizations. The PCA results are visualized using a biplot combining a PCA scatter plot and PCA loadings in the same graph. The loading arrows indicate the contribution of each spike property to the principal components and enable investigation of correlations between variables. Axes of the biplot are supplemented with Kernel density estimates describing the data distribution. Moreover, the tabular output includes a data frame containing traces and activity profiles associated with user-defined metadata for each analyzed cell. A separate tabular file is generated for each plot enabling further statistical analysis and full customization of figures using external visualization software.
Baseline shift module
While the sliding window normalization for the transient activity module is a widely used strategy for calcium imaging analysis, it is not suitable for neurons that exhibit long-lasting, gradual changes in baseline fluorescence as it might diminish such sustained activity or create signal artifacts. Therefore, we implemented a pre-stimulus window normalization method for the Baseline shift module. Here, F₀ is defined as the mean intensity recorded during the pre-stimulus baseline period (Fig. 2C top). This constant F_0_ is used to compute the normalized trace (ΔF/F₀) using the same equation as in the sliding window normalization. Although pre-stimulus window normalization is designed for neurons exhibiting baseline shift upon stimulation, it can also be used to normalize data from quiescent cultures with stable baseline recording that display transient calcium activity upon stimuli.
To quantify the response to stimuli in the Baseline shift analysis (Fig. 2C bottom), the area under the curve (AUC) is calculated for each cell within a user-defined analysis window by summing up the ΔF/F₀ values. A cell is classified as responding if its AUC exceeds the mean AUC of the control condition by a user-defined number of standard deviations. To summarize the activity profile of each cell, LUMIN performs k-means clustering (scikit-learn^23^) of the traces. The KCl response is excluded from the clustering analysis due to its uniform nature across conditions. Cluster characteristics are described through cluster centroids, computed by taking the mean of all traces within the same cluster. Similarly to the Transient activity module, LUMIN generates comprehensive graphical and tabular output of all results.
To evaluate the performance and versatility of the toolbox, we applied LUMIN to two case studies of calcium imaging experiments with different signal characteristics. These examples highlight its analytical capabilities. Detailed parameter choices are described in the corresponding Materials and Methods sections.
Case study 1: characterizing modulation of transient neuronal activity
To demonstrate LUMIN’s ability to quantify transient neuronal activity, we recorded the spontaneous activity of hPSC-derived VM neurons (2 min total recording time at 5 Hz). We modulated neuronal activity by incubating the cultures with pharmacological compounds (Fig. 3A) that are known to either suppress or increase neuronal activity. To inhibit neuronal activity, we used γ-aminobutyric acid (GABA) to mimic GABAergic signaling^24^ and tetrodotoxin (TTX) to block action potential propagation^25^. To increase activity, we used 4-aminopyridine (4AP) to promote calcium influx^26^ and picrotoxin (PTX) to block inhibitory GABAergic signaling^27^. The well-characterized functional consequences of these compounds make them ideal for workflow validation.
The impact of pharmacological stimulations on neuronal activity was analyzed using LUMIN’s Transient activity module. First, we used interactive parameter fine-tuning from the Segmentation and signal extraction pipeline to define segmentation and post-filtering settings for automated segmentation. Even though nuclear counterstain is recommended as a secondary signal to increase the detection accuracy, here we used LUMIN’s ‘Cytoplasmic (Cellpose)’ segmentation mode to showcase the segmentation performance in the absence of a nuclear channel. Automated segmentation identified 101.9 ± 49.2 cells per video corresponding to a total of 7031 cells across 69 recordings (3 biological replicates, each corresponding to an independent differentiation batch, with 4–5 technical replicates) (Supplementary Fig. 2 A).
Fig. 3. Pharmacological modulation of spontaneous calcium activity in VM cultures. A Schematic of the experimental setup (n = 3). B Heatmap of ΔF/F₀ summarizing all recorded cells from three biological replicates, showing neuronal activity over time across all stimulations (n = 3). C, D Representative ΔF/F₀ traces from cells treated with PTX and GABA, illustrating differences in detected spikes (indicated by arrows). E Quantification of the percentage of active cells, defined as those exhibiting at least one detected spike, across conditions. Percentages are presented as fold changes relative to the control condition. Each data point represents a biological replicate (n = 3). One-way ANOVA with Tukey’s multiple comparison test. F Swarm plots overlaid with box plots comparing spike amplitude (ΔF/F₀), frequency (spikes per minute), width, and rise time (duration in seconds) across conditions. Each data point represents a single cell. Generalized linear mixed-effects model using all active cells from three biological replicates (n = 3). G Principal component analysis (PCA) of spike features, visualized as a biplot combining PCA scores and loading arrows. Kernel density estimates along the axes show condition-specific distributions. Each point positioned according to its principal component scores represents a single cell (n = 3). H Heatmap of clustering analysis based on spike properties. Color represents how much a spike property contributes to each cluster. I Distribution of cells across clusters for each condition and biological replicate.
We visualized the extracted traces using the output graphs and tables provided by LUMIN’s Transient activity module (Fig. 3B-I). Using a heatmap, we first summarized all recorded cells in the experiment which revealed spontaneous signal fluctuations in the control condition, a known feature of VM neurons^28^ (Fig. 3B). To quantitatively assess the impact of stimulations, spike detection identified active cells by measuring the percentage of cells exhibiting at least one calcium spike (Fig. 3C-D and Supplementary Video 2–3). The analysis revealed that both compounds promoting activity, 4AP (48.9 ± 23.3% of cells) and PTX (50.5 ± 19.4% of cells), increased the proportion of spontaneously active cells relative to the control condition (29.3 ± 8.0% of cells), corresponding to a fold change of 1.6 ± 0.4 and 1.7 ± 0.5, respectively (Fig. 3E). The increased activity by blocking GABAergic receptors with PTX suggests that the cultures contain endogenous GABA-releasing neurons. In contrast, the inhibitory compounds GABA (3.5 ± 2.4% of cells) and TTX (2.4 ± 1.8% of cells) effectively silenced neuronal activity (Fig. 3E), corresponding to a fold change of 0.13 ± 0.12 and 0.09 ± 0.09, respectively. This analysis confirmed the presence of functional inhibitory signaling and indicated that observed calcium fluctuations are primarily driven by action potentials. Because of an insufficient number of active cells per biological replicate, we excluded GABA and TTX stimulations from the downstream analysis. The distributional visualization and PCA analysis of spike properties in active cells revealed that 4AP stimulation led to decreased spike width and rise time (Fig. 3F, G, and Supplementary Fig. 2B). Further analysis of the PCA scatter plot coupled with PCA loadings showed that cells with a frequent spiking pattern are largely separated in the PCA space from the ones with prolonged calcium spikes. This separation is mainly driven by three highly correlated properties: spike width, rise time, and decay time (reflected by the orientation of loading arrows in Fig. 3G). Indeed, grouping cells into 4 clusters based on shared activity features confirmed that cells exhibiting frequent spikes belong to cluster 0 while the ones with slow spike dynamics belong to cluster 1 and 2. Cluster composition analysis did not reveal notable differences between stimulations, as visualized using a stacked bar plot (Fig. 3G-I, and Supplementary Fig. 2C-D).
Case study 2: quantifying baseline shifts in quiescent cultures
To demonstrate the Baseline shift module, we designed an experiment where quiescent neurons were stimulated twice during the live cell recording (70 s recording at 2 Hz): first with the neuromodulatory compound N-Methyl-D-Aspartate (NMDA), which mimics the excitatory neurotransmitter glutamate by binding to NMDA receptor^29^, and then with KCl to induce maximal depolarization response as a positive reference (Fig. 4A).
As with the transient activity experiment described above, the segmentation and post-filtering settings were configured with the Segmentation and signal extraction pipeline using randomly sampled images from the input data. Here, the presence of a live nuclear counterstain (Hoechst) allowed us to use higher probability thresholds while avoiding false positives. The segmentation identified an average of 242.37 ± 73.2 cells per video across 54 recordings (3 biological replicates, each corresponding to an independent differentiation batch, with 6–12 technical replicates) amounting to a total of 13,088 cells (Supplementary Fig. 3 A). The increased number of detected cells compared to the pharmacological modulation experiment (101.9 ± 49.2 cells per video) is likely reflective of more permissive segmentation settings.
Next, we used LUMIN’s baseline shift module to quantify and visualize the evoked response in extracted traces (Fig. 4B-G). The KCl stimulation triggered a robust calcium influx in most cells confirming the activation of functional voltage-dependent calcium channels as a response to depolarization (Fig. 4B-C and Supplementary Video 4–5). Stimulation of VM cells with NMDA induced a gradual increase in baseline calcium over 20 s. An NMDA response was detected in the majority of cells (83.22 ± 6.4% in NMDA vs. 1.05 ± 0.15% in control) (Fig. 4D-E) which is consistent with moderate influx of calcium through the NMDA receptor^30^ in the absence of membrane depolarization. Grouping cells into three clusters based on their calcium signal (KCl response excluded) revealed that only NMDA-stimulated cells contributed to the clusters with increased baseline fluorescence as measured using the cluster centroids describing the properties of the cluster (Fig. 4F-G). These results are in line with the known excitatory modulation of VM neurons by glutamatergic signaling in vivo^31^ and suggest the presence of NMDA-type glutamate receptors in the stem cell-derived neuronal cultures. It is worth noting that even small differences between the buffer composition of the stimulation solution and the imaging buffer can induce baseline shifts, underscoring the need for careful buffer matching in stimulation experiments.
Fig. 4NMDA stimulation evokes calcium influx leading to a baseline calcium shift in quiescent VM DA cultures. A Schematic of experimental setup (n = 3). B Representative ΔF/F₀ traces over time for Control and NMDA stimulations from one biological replicate. Outlined regions indicate the baseline recording and analysis window used for quantification. Each line represents a single cell with the thick line corresponding to the mean fluorescence for each condition. C Heatmap of min-max scaled ΔF/F₀ traces summarizing all recorded cells from three biological replicates upon compound administration (n = 3). D Representative swarm plot comparing calcium responses between Control and NMDA stimulations from one biological replicate. Each data point represents the AUC value of a single cell. The gray line indicates the mean AUC of the control group, and the dashed line marks the response threshold, defined as three standard deviations above the control mean. E Percentage of cells classified as responsive (see Fig. 4D) in Control and NMDA stimulations. Data points represent biological replicates (n = 3). Paired t-test. F Line plot of cluster centroids, corresponding to the mean of all traces within the same cluster. G Cluster contribution of each stimulation (n = 3). Paired t-test between corresponding clusters. H Maximum projection of image from live cell calcium recording for nuclear (Hoechst) and Calbryte stainings (top). ICC images of fixed cells stained with Hoechst and TH (bottom). Overlap of the same cells from calcium recording and ICC showing identification process of TH^+^ cells in calcium videos. I Intracellular calcium AUC values for NMDA-stimulated MAP2^+^ and TH^+^ neurons identified using ICC. Each data point represents the AUC value of a single cell. Linear mixed-effects model using all cells from three biological replicates (n = 3). J Representative ICC image for MAP2 (left) and merge of MAP2, TH, and Calbryte staining (right). K Representative ICC image for AQP4 (left) and merge of Hoechst, AQP4, and Calbryte staining (right).
To correlate calcium responses with specific cell types, we performed ICC and labelled astrocytes with aquaporin-4 (AQP4), neurons with microtubule-associated protein 2 (MAP2), and dopaminergic neurons with tyrosine hydroxylase (TH). ICC quantification revealed the following ratios: MAP2^+^/DAPI^+^ (56.1 ± 12.7%), TH^+^/MAP2^+^ (26.5 ± 13.8%), and AQP4^+^/DAPI^+^ (21.4 ± 7.2%). Cells that were positive for a marker in ICC and overlapped with the Calbryte signal from the live cells during calcium recording were manually identified and segmented using LUMIN’s manual segmentation approach (Fig. 4H). Across 27 recordings (3 biological replicates with 3–6 technical replicates), we identified an average of 33 ± 13.8 MAP2^+^ and 7.6 ± 3.6 TH^+^ cells per recording with a total of 890 and 204 cells, respectively. The extracted signal was quantified using LUMIN’s Baseline shift module as described above. The results showed that the fluorescence calcium levels were elevated in the general MAP2^+^ neuronal population and TH^+^ dopaminergic neurons upon NMDA treatment while no difference was observed between these two populations (Fig. 4I-J). Using 9 recordings (3 biological replicates with 1–2 technical replicates) as a representative subset of the data, we detected minimal overlap between AQP4 and Calbryte signals. We identified 1.7 ± 0.9 cells per video corresponding to a total of 15 AQP4^+^/Calbryte^+^ cells. This represents 0.9% of all 1659 identified cells across the quantified recordings. A low number of AQP4^+^/Calbryte^+^ cells suggest minimal calcium levels in VM astrocytes. For this reason, no functional quantification was performed for these cells (Fig. 4K). These results suggest that the signal quantified in this study primarily originates from neuronal populations.
Segmentation accuracy and computational scalability
To maximize segmentation accuracy in calcium imaging experiments, we recommend ending the recording with a depolarizing KCl stimulus and a co-localizing nuclear stain. Using these experimental features, we benchmarked LUMIN’s automated dual segmentation approach against manually annotated ROIs (1243 cells from 4 images) (Supplementary Fig. 3 A). This analysis showed sufficient cell detection accuracy for reliable downstream analysis of the extracted signal. Notably, segmentation performance improved through KCl-evoked maximum response, with the model achieving a precision of 0.83 ± 0.04, recall of 0.69 ± 0.04, and F1 score of 0.75 ± 0.03 at an intersection‑over‑union (IoU) threshold of 0.5. (Supplementary Fig. 3B-C).
We next evaluated how the runtime of the LUMIN pipelines scales with dataset size. To assess the pipeline’s time complexity, we subsetted the data to 10%, 20%, 40%, and 80% of the original size and recorded the pipeline runtime for each subset and for the full datasets. The runtime of both Segmentation and signal extraction and Single-cell data analysis pipelines increased linearly to the sample size, facilitating the runtime estimation of desired dataset sizes. LUMIN processed the full dataset consisting of 69 videos (each containing 600 frames, corresponding in total of 41,400 images) autonomously with the Segmentation and signal extraction pipeline running for 24.6 min and the Transient activity module from the Single-cell data analysis pipeline for 5.7 min using a standard laptop (MacBook Pro with an M2 chip) (Supplementary Fig. 3D-E).
Discussion
Advances in hPSC–based disease modeling and high-content imaging have increased the demand for user-friendly tools that can quantify neuronal function efficiently. However, existing calcium-imaging tools lack the capabilities to meet these requirements, as they are largely optimized for in vivo datasets and therefore burdened with computational steps that are unnecessary for in vitro use. They also rely on limited, poorly scalable segmentation and peak detection workflows that restrict accessibility and impede high-throughput analysis. Consequently, there remains a clear need for an in vitro analysis tool that integrates all essential features for scalable detection of both transient events and gradual baseline calcium shifts, aligned with emerging high-content and hPSC-based imaging applications.
Here, we introduced LUMIN, an automated calcium imaging toolbox for large-scale calcium imaging experiments of in vitro neuronal cultures, covering the full workflow from single cell data extraction to quantification and visualization. LUMIN provides two quantification tools: (1) Transient activity module for spontaneous or stimulus-evoked action potentials and (2) Baseline shift module for stimulus-evoked gradual shifts in calcium levels in quiescent cultures. LUMIN further enables correlation of neuronal function with cellular identity through ICC co-staining. Compared to other relevant tools, LUMIN is designed to be both scalable and user-friendly. Unlike other tools, LUMIN is developed around an established image viewer, Napari. Napari’s active developer community, combined with its customizable nature, facilitates the inclusion of additional features. LUMIN offers a GUI for performing efficient data processing on standard computers. Importantly, it is designed to be broadly applicable, capable of performing data analysis regardless of culturing format (e.g., microscope slides, multi-well plates), calcium indicator type, or imaging system, as long as the data is exported in 16-bit TIFF files. These features make it highly applicable for established calcium imaging protocols and biomedical scientists without computational expertise. Using two case studies, we demonstrated its capability to detect anticipated functional responses following pharmacological stimulation with well-characterized compounds.
While LUMIN provides a framework that prioritizes scalability and usability, there are some practical constraints that users should be aware of. LUMIN is designed around a GUI and is therefore not compatible with high-performance computing clusters. All analyses presented here were performed on a standard laptop, although its dependency on deep learning segmentation libraries requires the computer to be equipped with a graphical processing unit (GPU). Finally, while LUMIN provides graphical summaries of analysis results, it does not generate publication-ready figures. Figure generation for publications should therefore be performed elsewhere using LUMIN’s tabular output.
Calcium imaging pipelines measure neuronal activity by detecting rapid signal transients, spikes, as proxies for action potentials. Interpreting whether a transient reflects a single spike or multiple spikes depends on the noise level, optical resolution, imaging interval, calcium indicator, and recorded cell type^32^. In this study, we classified the transients using a simple thresholding approach. More sophisticated methods make estimates of absolute spike rates^32,33^. Such spike inference algorithms are often calibrated or trained using data containing calcium and electrophysiological recordings from the same cell. However, these methods are optimized for in vivo data and their performance for data from stem cell-derived neurons remains suboptimal. Generating a ground-truth spike database for in vitro derived neurons would allow quantitative estimates of true spike rates. Improved spike detection would better separate true events from noise and allow incorporation of additional spike properties, including burst detection. Downstream analysis of detected calcium spikes enables inference of synchronous activity and network connectivity through temporal spike arrangement and pair-wise correlations^14,34^. Indeed, different approaches relying on graph theory have been proposed to model neural communication from functional brain imaging data^35^. In the future, we are planning to implement a network communication module in LUMIN to understand how local calcium dynamics connect to network-level activity. Integrating such analysis with spike properties inferred by LUMIN will provide a multi-dimensional view of neuronal function across stem cell-derived neural populations upon pharmacological stimulation.
The main advantage of the LUMIN platform is its throughput and automation, enabling large-scale quantitative analysis of disease-relevant phenotypes and pharmacological responses. As such, we anticipate that LUMIN will help neuroscientists both in academic and industrial setting to advance their discoveries in hPSC-based disease modeling and drug screening by making advanced calcium imaging analysis more accessible.
Materials and methods
Human embryonic stem cell culture and VM differentiation
The human embryonic stem cell work was conducted under ethical approval from The Danish National Committee on Health Research Ethics (project no. H-21043866). The human embryonic stem cell line RC17 (Roslin Cells Ltd, hPSCreg: RCe021-A) was used for all experiments in this study. It had been derived under local ethical approval at the original derivation sites and with informed consent from donors. No new hPSC lines were derived in this study. Cells were maintained and differentiated towards ventral midbrain (VM) dopaminergic neurons according to a previously established protocol^36^. A total of three VM differentiation batches were produced. VM fate at day 16 was validated via immunocytochemistry and RT-qPCR according to established quality control parameters^36^. Day 16 progenitors were then seeded on laminin-521 coated (LN521, Biolamina) 96-well Phenoplates (REVVITY, #6055300) and matured for 50–60 days at which point calcium imaging was performed. Adaptation to the current protocol was the addition of 10µM DAPT in the maturation phase.
Live-cell calcium imaging of neuronal cultures
Neuronal activity was quantified using fluorescence imaging on a Yokogawa CellVoyager CV8000 high-content screening microscope equipped with a microlens-enhanced dual spinning-disk, four large-field sCMOS cameras (2000 × 2000 pixels), four laser lines (405, 488, 561, and 647 nm), and an inbuilt single-channel dispenser (maximum volume: 20 µL). Images were acquired using a 20x water immersion objective (NA = 1.0).
Prior to imaging, cells were counterstained with Hoechst-33,342 (ThermoFisher Scientific, #62249) and 0.01 mM Calbryte 520 AM (ATT Bioquest, # ABD-20651) for 45 min in a standard incubator. After that, the cells were washed twice with HBSS with Ca^2+^ and Mg^2+^ (HBSS+/+, Gibco #12519069) before leaving them in HBSS+/+, if relevant with the addition of pharmacological compounds (1 µM TTX, Tocris; 50 µM PTX, Tocris; 10 µM GABA, Tocris; 250 µM 4AP, Sigma-Aldrich). Plates were then equilibrated in the on-stage environmental chamber of the CV8000 (37 °C, 5% CO₂) for 45 min before imaging. Compound plates (Corning, #3596) were simultaneously pre-incubated for 45 min in the source plate holder of the CV8000 under the same environment to maintain consistent conditions during dispensing. Following the preincubation step, a series of “high-speed timelapse” experiments with or without live-cell compound-dispensing (HBSS as control; 50 µM NMDA in HBSS, Selleckchem; 150 mM KCl, Sigma-Aldrich) were initiated in a two-step protocol:
Calcium imaging of spontaneous neuronal activity
A reference image was first acquired using the 405 nm channel to visualize the nuclear counterstain. This was followed by high-speed time-lapse imaging of the calcium indicator Calbryte 520 AM using the 488 nm channel. Images were captured every 200 ms (10% laser power, 50 ms exposure) in a single focal plane to preserve focus stability throughout the time series.
Calcium imaging with compound-mediated stimuli using double-dispensing
As with spontaneous activity experiments, a 405 nm image was acquired prior to time-lapse recording. Imaging of Calbryte 520 AM was then initiated using the 488 nm channel with 500 ms intervals (10% laser power, 50 ms exposure) in a single plane. The on-board dispenser was programmed to add compound #1 after 20 frames (t=10s), followed by a second addition of KCl after 100 frames (t=50s). Dispensing was performed as follows presented in Table 1.
Table 1. Dispensing steps.StepActionVolume (µL)Speed (µL/s)PositionTiming1Aspirate compound #1 from source plate1072 mm above well bottomBefore time-lapse start2Dispense compound #1 into cell plate1022 mm above well bottomt=10s3Aspirate KCl solution from source plate1072 mm above well bottomDuring time-lapse4Dispense KCl into cell plate1022 mm above well bottomt=50s
Immunocytochemistry (ICC)
ICC was used to characterize the identity of the cells recorded in the calcium imaging experiments and to perform co-expression analysis. Immediately after the calcium imaging recordings, cultures were fixed by adding 100 µL of the fixative reagent paraformaldehyde (PFA, Thermo Fisher Scientific #28908) at 4% (w/v) per well and incubated for 20 min at room temperature. The PFA solution was removed from the wells, and cells were washed three times with PBS-/- before starting a two-day ICC analysis protocol. On the first day, cells were incubated for 1–3 h at room temperature with a blocking buffer (PBS-/- + 0.1% (vol/vol) Triton X-100 Sigma Aldrich #T8787 + 5% (vol/vol) donkey serum Sigma Aldrich #D9663). The primary antibodies [Table 2] were diluted in blocking buffer and added to the wells to incubate on a shaker at 4 °C overnight. On the next day, the primary antibody solution was removed, and cells were washed three times with PBS-/- before adding the secondary antibody solution [Table 2] for two hours at room temperature. Cultures were washed three times with PBS-/- before imaging. Imaging was performed in the Yokogawa CellVoyager CV8000 high-content screening microscope.
Table 2. List of primary antibodies used in this study.MarkerSpecificitySource (cat. no.)DilutionMAP2MouseSigma-Aldrich (M1406)1:1000THRabbitSigma-Aldrich (AB152)1:1000AQP4RbSigma-Aldrich (HPA014784)1:2000
Transient activity analysis
Calcium imaging data from spontaneously active cultures were analyzed using LUMIN’s (v. 0.0.1) Segmentation and signal extraction pipeline to identify cells and extract raw fluorescence traces. Automated segmentation was performed using the ‘Cytoplasmic (Cellpose)’ mode with the cyto2 model, a diameter of 30 pixels, a cell probability threshold of 0.0, and a flow threshold of 0.4. In post-segmentation filtering, masks were excluded if the cell area fell outside the range of 350–5600 pixels or the fluorescence intensity outside 350–8000 (16-bit images). The post-segmentation filtering settings are experiment-specific and should be fine-tuned for each analysis using LUMIN’s interactive parameter optimization procedure. Transient activity module from LUMIN’s Single-cell data analysis pipeline was used to quantify the extracted traces. Traces were normalized using the sliding window method with a window size of 75 frames and a percentile threshold of 25. The percentile threshold was adjusted from its default value of 15 due to relatively high baseline noise. Spike detection was performed using a prominence threshold of 0.2, and low-confidence spikes were excluded based on an amplitude-width ratio of 0.003. These values were determined interactively by sampling random calcium recordings, iteratively updating the parameters, and examining trace plots and neuronal events overlaid on top of calcium videos. For the clustering analysis, the number of clusters was specified as 4.
Baseline shift analysis
For stimulus-evoked recordings, the Segmentation and signal extraction pipeline was applied to identify cells and extract raw fluorescence traces. Automated segmentation was performed using the combined “Nuclear (StarDist) and Cytoplasmic (Cellpose)” mode. StarDist was applied with a probability/score threshold of 0.1 (default 0.48 was too conservative with many false negatives) and an overlap threshold of 0.3 for nuclear segmentation. Cytoplasmic Cellpose segmentation was conducted using the cyto3 model with a diameter of 40 pixels, a cell probability threshold of −1.0, and a flow threshold of 0.4. Here, the probability cell threshold was lowered from its default value of 0 to allow more permissive segmentation in the presence of co-localizing nuclear signal. Post-segmentation filtering excluded ROIs if the fraction of the nuclear mask overlapping with the cell mask was less than 0.5, if the nuclear area fell outside the range of 50–2900 pixels, the cell area outside 200–10,000 pixels, or the fluorescence intensity outside 200–7000 (16-bit images). Extracted traces were quantified using the Baseline shift module from LUMIN’s Single-cell data analysis pipeline. Baseline normalization was performed using the pre-stimulus window method, with the stimulation frame set to 20. The area under the curve (AUC) was calculated from a 10-second analysis window starting 15 s after stimulation (frames 50–70). Cells were classified as responsive if their AUC exceeded the mean AUC of the control condition by more than 3 standard deviations, allowing robust response detection upon stimulation. For the clustering analysis the number of clusters was specified to as 3. All listed parameters for the Segmentation and signal extraction pipeline and Baseline shift module were optimized using LUMIN’s interactive parameter fine-tuning by examining the results of different parameter combinations using interactive image viewer, as well as line and swarm plots.
In the ICC correlation analysis, fluorescence images of Hoechst, Calbryte, and the two marker channels (either MAP2 and TH or MAP2 and AQP4) were merged into a multi-channel image for each field of view. Using built-in napari functionality, we manually identified overlapping cells positive for Calbryte and the marker of interest. Overlap between AQP4 and Calbryte signal was minimal, and thus not further quantified. Next, LUMIN’s Segmentation and signal extraction pipeline was used to manually segment these cells from the calcium recordings, followed by signal extraction. The process was repeated for both MAP2^+^ and TH^+^ neurons. Baseline shift module was used for normalization and AUC computation, as described above.
Segmentation model quantification
We benchmarked our automated dual segmentation approach by manually annotating 1243 ROIs across 4 images, then filtering out those ROIs that didn’t overlap with the nucleus from StarDist (v. 0.9.1) segmentation. The predicted masks were generated using LUMIN’s Segmentation and signal extraction pipeline with the configuration described in the methods section for baseline shift analysis. The prediction was performed on maximum projected image stacks, both including and excluding the frames acquired after KCl stimulation. Precision, recall, and F1 scores were computed with different IoU thresholds using the matching function from StarDist.
Performance tests
Time complexity tests were performed by subsetting the dataset of spontaneously active neurons to 10%, 20%, 40%, 80%, and 100% of the original size, corresponding to 7, 14, 28, 56, and 70 calcium recordings. Both Segmentation and signal extraction, as well as Single-cell data analysis pipelines, were repeatedly executed using these datasets. The runtime was recorded using the perf_counter function from the time package and plotted against the dataset size along with the regression line, which was computed using the linregress function from SciPy (v. 1.15.3).
Statistical analysis
Statistical tests were performed using a 0.05 significance threshold, and quantitative values are reported as mean±standard deviation. To confirm data normality and equal variances, we used the Shapiro-Wilk and Levene test, respectively (SciPy v. 1.15.3). For replicate-level analyses, we used an unpaired Student’s t-test (SciPy) for pairwise comparison and one-way ANOVA with Tukey’s post hoc test (statsmodels, v. 0.14.5) for multiple comparisons. Mixed-effect models were used when testing statistical significance at the single-cell level. Generalized linear mixed effect models (glmer function from lme4 v. 1.1–38) with a Gamma distribution were used for each spike property, with stimulation as a fixed effect and random intercepts and slopes for each stimulation per biological replicate to account for biological variation. A linear mixed-effect model (mixedlm function from statmodels) was used to test for significance in calcium response between ICC-correlated neuronal populations, with log-transformed AUC as the dependent variable, stimulation, marker, and their interaction as fixed effects, and biological replicate as a random effect. To analyze significant changes in cluster composition, percentage values were first transformed using the centered log-ratio (CLR) transformation from scikit-bio (v. 0.7.1.post1). Multiple testing was corrected using the Benjamini-Hochberg approach (statmodels).
Figure generation
All graphical data figures presented in this manuscript are generated in Jupyter Notebook using data from the tabular output files from LUMIN by calling LUMIN’s plotting function with adjusted image settings such as figure size. Graphical illustrations for figure panels were made using Adobe Illustrator with certain elements generated using Biorender.com. Figures were assembled and formatted in Adobe Illustrator.
Supplementary Information
Below is the link to the electronic supplementary material.
Supplementary Material 1
Supplementary Material 2
Supplementary Material 3
Supplementary Material 4
Supplementary Material 5
Supplementary Material 6
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1Lin, H. C. et al. Human neuron subtype programming via single-cell transcriptome-coupled patterning screens. Science (1979)389, 142 (2025).10.1126/science.adn 612140638726 · doi ↗ · pubmed ↗
- 2Sofroniew, N. et al. napari: a multi-dimensional image viewer for Python. (2025). https://zenodo.org/records/16627702
