Skip to main content
Wiley Open Access Collection logoLink to Wiley Open Access Collection
. 2025 May 14;299(2):155–165. doi: 10.1111/jmi.13425

PerfectlyAverage: A classical open‐source software method to determine the optimal averaging parameters in laser scanning fluorescence microscopy

S Foylan 1, L M Rooney 1, W B Amos 1,2, G W Gould 1, G McConnell 1,
PMCID: PMC12265855  PMID: 40364693

Abstract

Laser scanning fluorescence microscopy (LSFM) is a widely used imaging method, but image quality is often degraded by noise. Averaging techniques can enhance the signal‐to‐noise ratio (SNR), but while this can improve image quality, excessive frame accumulation can introduce photobleaching and may lead to unnecessarily long acquisition times. A classical software method called PerfectlyAverage is presented to determine the optimal number of frames for averaging in LSFM using SNR, photobleaching, and power spectral density (PSD) measurements. By assessing temporal intensity variations across frames in a time series, PerfectlyAverage identifies the point where additional averaging ceases to provide significant noise reduction. Experiments with fluorescently stained tissue paper and fibroblast cells validated the approach, demonstrating that up to a fourfold reduction in averaging time may be possible. PerfectlyAverage is open source, compatible with any LSFM data, and it is aimed at improving imaging workflows while reducing the reliance on subjective criteria for choosing the number of averages.

Keywords: averaging, fluorescence, laser scanning, microscopy, power spectrum, signal‐to‐noise

1. INTRODUCTION

Laser scanning fluorescence microscopy (LSFM) is a widely used technique in biological and materials sciences, offering high‐resolution, multi‐dimensional imaging capabilities. 1 However, LSFM images are inherently affected by noise sources such as photon shot noise and detector noise, which can degrade image quality. To address these challenges, averaging techniques are commonly employed to enhance the signal‐to‐noise ratio (SNR) and improve image clarity. 2

Averaging in LSFM can be implemented through different approaches, with frame and line averaging being the most common methods. 3 Frame averaging involves capturing multiple frames of the same field of view and averaging the signal to reduce noise, while line averaging averages multiple signal readings along a scanned line. Both techniques are widely applied in confocal and multiphoton laser scanning microscopy to improve image SNR without increasing excitation power. 4

The primary advantage of averaging is its ability to significantly enhance SNR by reducing random noise while preserving the underlying signal. In signal processing, the improvement in SNR is given by

SNRn, (1)

where n is the number of lines or frames averaged, and in LSFM the SNR is given by

SNR=μσ, (2)

where μ is the mean intensity and σ is the standard deviation of the pixel values within the image. 1

Averaging in LSFM is particularly beneficial for imaging weakly fluorescent specimens or specimens with low contrast, where noise can obscure fine structural details. 5 , 6 Despite its benefits and widespread use, averaging in laser scanning microscopy also has limitations. Increased acquisition time is a major drawback, as it can lead to specimen drift, image blurring, and motion artefacts, which are especially problematic in live cell imaging or time‐sensitive experiments. Additionally, prolonged laser exposure can cause photobleaching in fluorescence microscopy and phototoxicity in living specimens, 7 potentially compromising their viability, and Equation (1) does not take account of any photobleaching. These factors suggest that a careful balance between improving image quality and preserving specimen integrity is needed, yet in practice the number of frames used for averaging is mostly determined by subjective visual inspection of image quality.

Here, a classical software method termed PerfectlyAverage is presented to determine the optimal number of frames in laser scanning microscopy. By analysing temporal variations in pixel intensity across multiple frames, the method employs power spectral density (PSD) measurement to estimate the point at which additional frames no longer contribute significant new information and provides a recommended frame count for improved signal preservation and noise reduction. Power spectral density (PSD) analysis is particularly well suited for evaluating image sequences in laser scanning microscopy because it provides a frequency‐domain representation of noise and structural information. 8 Unlike time‐domain analyses, which can be sensitive to local fluctuations, PSD enables a systematic assessment of noise characteristics by decomposing image information into spatial frequency components. 8 This allows for the identification of trends in noise reduction as more frames are averaged, helping to pinpoint the point at which additional frames cease to provide meaningful improvements. Furthermore, by incorporating spectral entropy derived from PSD, as has been previously applied in electroencephalography, 9 the method can objectively quantify structural consistency across frames, reducing reliance on subjective visual inspection. This makes PSD a powerful tool for determining the optimal number of frames for averaging, balancing noise reduction, and preserving image integrity while accounting for photobleaching effects. PerfectlyAverage also considers the measured SNR and is also resilient against the deleterious effects of photobleaching within user‐defined limits, and it is open source.

2. METHOD

2.1. Specimen preparation

Two specimens were prepared for LSFM imaging to assess the method. The first was a section of lens tissue paper stained with 10 µM Safranin O (S2255, Sigma‐Aldrich) in ethanol mounted in a gelvatol medium, and the second was a fibroblast cell preparation. Fibroblast cells (3T3‐Ll, CL‐173) were grown in vented capped tissue culture flasks containing DMEM (10567‐014, Thermo Fisher) supplemented with 10% NBCS (26010066, Thermo Fisher) and 1% penicillin streptomycin (15140‐122, Thermo Fisher) and 1% L‐glutamine (21051040, Thermo Fisher) and were incubated at a temperature of 37°C in a 10% CO2 humidified cell incubator (Heracell VIOS CO2, Thermo Fisher). Cells were seeded at the desired density and incubated for 24 h at 37°C/10% CO2 to promote adherence and then rinsed twice with PBS (10010023, Thermo Fisher) prior to fixation in 4% paraformaldehyde (158127, Sigma‐Aldrich) for 10 min, and rinsing three times in PBS (10010023, Thermo Fisher). Cells were permeabilised using 500 µL of 0.1% Triton X‐100 (T8787, Merck) in PBS at room temperature for 15 min, then washed 3 times with PBS before adding two drops of ActinGreen 488 ReadyProbes to each coverslip (R37110, Thermo Fisher), and were incubated for 30 min at 37°C/10% CO2. The staining solution was removed, and the cells were washed three times in PBS (10010023, Thermo Fisher) before mounting in Prolong Glass AntiFade Mountant (P36980, Thermo Fisher). Both the stained lens tissue paper and the 3T3‐L1 cell specimens were mounted between a microscope slide and a Type 1.5 coverslip and were allowed to set overnight at room temperature without ambient light before subsequent imaging.

2.2. Data acquisition and generation for software testing

An image dataset was generated to simulate real data. A 720 pixel × 576 pixel 8‐bit image available as a sample image in FIJI 10 (boats.gif) served as the optimised output to mimic an image with high SNR and low noise after averaging. This image was converted to a .tif format in FIJI and saved. A custom Python script read in this .tif image and added Gaussian noise (σ = 10) to produce 29 noisy instances, and these data were saved as a standalone multi‐tiff stack. These data were averaged in the same geometric series, that is, 20, 21…29, to simulate progressive averaging. The resultant images were compiled into a single .tif stack comprising of 9 images.

Image data to evaluate the method were acquired using an upright microscope (DM6000CFS, Leica) coupled to a laser scanning system (SP5, Leica) controlled by software (LAS‐AF v2.7.7.12402, Leica). Image stacks of each specimen were recorded in xyt format. All data were acquired at a scan speed of 400 Hz and were saved in the proprietary format (.lif): these were converted to individual .tif files and compiled into .tif stacks using FIJI. These LSFM data served as the input to the software code. For all measurements the laser power was set to 20% from the oscillator as per the manufacturer's recommendations for this system to avoid unwanted amplitude instabilities. All raw data were captured within the dynamic range of the detector and without saturation.

For imaging of the tissue paper stained with Safranin O, a 488 nm laser was used for excitation of fluorescence, which was detected between 500–550 nm with a spectral detector. A 10×/0.4 numerical aperture dry objective lens (10×/0.4 HC PL APO, Leica) was used for imaging. The laser power at the specimen plane was measured with a power meter (Nova II, Ophir Photonics) to be 0.7 mW, and the detector gain was set to 900. Images of 4096 pixels × 4096 pixels were captured with a pixel size of 360 nm to satisfy the Nyquist–Shannon sampling criterion, 11 with a total of 28 frames captured in xyt mode.

For imaging of the 3T3‐L1 cells prepared with ActinGreen dye, the same 488 nm laser was used for excitation of fluorescence, which was also detected between 500 and 550 nm with a spectral detector. A 20×/0.7 numerical aperture dry objective lens (20×/0.7 HCX PL APO CS, Leica) was used with a digital zoom of 2 for imaging. The laser power at the specimen plane was measured to be 0.2 mW, and the detector gain was set to 1050. Images of 1024 pixels × 1024 pixels were captured at a rate of 400 Hz with 28 frames in xyt mode and with a pixel size of 360 nm, and the Nyquist–Shannon sampling criterion was not satisfied. 11 The laser power at the specimen plane was set to a deliberately low value and the detector gain set to a high value to provide a poor SNR to best challenge the PerfectlyAverage software.

2.3. Signal‐to‐noise ratio (SNR) calculation

The signal‐to‐noise ratio (SNR) was computed for each image in the chosen .tif stack using the Equation (2). A zero‐noise safeguard was implemented to prevent division errors, ensuring numerical stability when processing images with minimal intensity variation.

2.4. Photobleaching correction

To correct for photobleaching, the mean intensity of each frame was calculated. Photobleaching was considered as an exponential decay process, 12 , 13 , 14 with an exponential decay function fitted to the mean intensity values across the image sequence:

It=aebt+c, (3)

where I(t) represents the mean intensity at frame t, and a,b, and c are fitting parameters. The curve‐fitting procedure was performed using the Levenberg–Marquardt algorithm 15 as implemented in SciPy's curve_fit function. Each frame was subsequently corrected by applying a normalisation factor derived from the fitted decay function, ensuring the corrected intensities remained proportional to their original values.

2.5. Power spectrum domain analysis

A PSD analysis was conducted to examine frequency components within the image frames. In Python, the two‐dimensional fast Fourier transform (FFT) was applied to each image, followed by a shift of the zero‐frequency component to the centre. 16 The power spectrum was computed as:

Pu,v=Fu,v2, (4)

where F(u,v) represents the Fourier‐transformed image. The spectral entropy was then calculated as a measure of frequency distribution randomness. The PSD values were normalised to create a probability distribution, and the Shannon entropy was calculated 17 :

H=pilogpi, (5)

where pi denotes the normalised power spectral density values.

Spectral entropy quantifies the complexity and randomness of frequency distributions within an image, providing insight into texture and structural variations. 17 A peak stability detection algorithm was employed to determine the optimal frame based on spectral entropy variation over time.

2.6. Optimal frame selection

To identify the optimal frame in the chosen dataset, both SNR and frequency‐domain stability measurements were performed. The optimal frame based on SNR was selected by identifying the maximum SNR within the frames that met the user‐defined photobleaching threshold. The optimal averaging conditions were identified by determining the point at which the normalised spectral entropy stabilised, using a moving average smoothing function with a window size of five frames and a user‐defined stability threshold (chosen to be 0.1 in this work). The choice of threshold in measuring PSD significantly influences the selection of the optimal frame for averaging based on PSD analysis. A lower threshold (e.g., 0.01) results in a readout of the earliest point where the rate of change in spectral entropy is minimal. While this approach is sensitive, it may prematurely identify an optimal frame before true stabilisation has occurred. Increasing the threshold allows for greater tolerance to minor fluctuations in spectral entropy, thereby ensuring that the selection of the optimal frame aligns with a more sustained plateau in PSD values. This adjustment reduces the risk of prematurely selecting a frame where noise reduction is still improving, leading to a more balanced trade‐off between averaging and noise suppression. Frames exhibiting the highest SNR were prioritised to ensure maximal signal clarity, while frequency stability was used to confirm minimal structural fluctuations. The integration of these two criteria allowed for a comprehensive selection of the ideal frame in the imaging sequence.

2.7. Software and data presentation

All code was developed using Python (v3.12) within the Spyder (v5.5.1) integrated development environment, managed via Anaconda Navigator (v2.6.3). The software was run on a Dell XPS 13 9370 laptop computer with an i7‐8550U 1.8 GHz processor and 16 GB RAM, with a Microsoft Windows 10 Pro operating system. A Python version and a standalone Windows executable of PerfectlyAverage were produced.

A schematic diagram of the workflow is presented in Figure 1. Upon running the software, a dialog box asks the user to choose the dataset to be analysed. This is advised to be a dataset from the same or a similar specimen to be studied, using the preferred LSFM in an adjacent region of the preparation. Images are acquired in xyt format and are saved. Upon execution of the software code, the user is prompted to specify an acceptable level of photobleaching, expressed as a percentage decrease in normalised fluorescence signal intensity. This input ensured that the analysis focused on frames retaining sufficient fluorescence intensity for accurate interpretation. The photobleaching threshold is set by the user to exclude frames where the intensity drops below a user‐defined percentage of the initial value, thereby preventing overcorrection or inclusion of frames with excessive signal degradation. The user is also prompted to specify an acceptable PSD value: as discussed above a value of 0.1 is recommended as default.

FIGURE 1.

FIGURE 1

Schematic workflow of PerfectlyAverage. Microscope image data are acquired in xyt format and are saved as a multi‐tiff stack. Upon execution of the PerfectlyAverage software code, the user is prompted to specify the file to be loaded. After this, the user enters an acceptable level of photobleaching, expressed as a percentage decrease in normalised fluorescence signal intensity, and an acceptable power spectral density (PSD) value: a value of 0.1 is recommended as default. The data analysis output of PerfectlyAverage is a recommendation of the optimal number of averaged frames based on the user input. Confocal microscope schematic from scidraw.io.

Upon execution, results are visualised using Matplotlib, 18 displaying normalised mean intensity, SNR, and spectral entropy using PSD across frames. The optimal frames determined from SNR and frequency‐domain analyses are highlighted, with a summary of the optimal frame selection criteria and photobleaching correction parameters presented to the user. This interface was designed to provide a user‐friendly mechanism for interpreting the results. Data outputs are the analysis plot, as well as a new multi‐tiff stack of the 2 n averaged images, where the first image is not averaged, that is, 20 = 1 averages, the second image is 21 averages = 2, etc., until 2 n .

To produce the cropped region of datasets for analysis of the dependence of the image size on the number of averages recommended by PerfectlyAverage, a custom Python script was produced to automate this process.

3. RESULTS

An example image dataset using a sample image from FIJI and the output of the PerfectlyAverage software code is shown in Figure 2. The data comprising a 720 pixel × 576 pixel 8‐bit image is shown in Figure 2A–I, with 20 = 1 averaging (i.e. no averaging) in Figure 2A, 21 = 2 frame averaging in Figure 2B, etc., up to the original input image shown in Figure 2J. These images were compiled as an image stack and used with the Python version of PerfectlyAverage. An acceptable limit of 0% photobleaching was chosen with a PSD cut‐off frequency of 0.1, and the plot of the mean intensity, SNR and PSD are shown in Figure 2K. The mean total processing time to run the code with these data was 1.02 s on a standard laptop computer.

FIGURE 2.

FIGURE 2

A sample image from FIJI, 10 boats.gif, was saved as a .tif file. This is presented in J. Gaussian noise (σ=10) was applied to this image, and this was repeated 29 times to produce 29 noisy instances of the input image. The first noisy instance is shown in A, and successive averages of 2 n images. Images A–J, compiled as a .tif stack, served as the input stack to the PerfectlyAverage software code. (K) Output plot from the PerfectlyAverage software code based on input images A–J, for a chosen photobleaching limit of 0%. Based on the signal‐to‐noise (SNR) ratio with respect to this photobleaching limit set by the user, the optimal parameter is defined as the input image with 29 averages, shown in J, but power spectral density (PSD) analysis revealed that the optimal output image is that obtained with only 24 averaged frames, shown in E.

As expected for this dataset chosen to demonstrate the method, the SNR of the noisy data improves with the amount of computationally applied averaging. However, consideration of the PSD suggests that fewer denoising steps could be used to achieve a good imaging result and minimising exposure to light in practical imaging: in this example, with a PSD cut‐off frequency of 0.1 defined by the user, the PSD reaches a plateau after 24 = 16 averaged frames, whereas consideration of the SNR suggests that averaging over 29 = 512 frames should be performed.

Figure 3 shows the input LSFM images of lens tissue paper stained with Safranin O, and the output of the PerfectlyAverage code used with no limit to the photobleaching and PSD = 0.1. Figure 3A shows the full field of view, with a white box and a red box highlighting two regions of interest (ROI) with different relative intensities, with the higher intensities contained in the ROI highlighted with the white box and dimmer regions of the specimen highlighted with the red box. All images are shown with the ‘physics’ look up table. The ROI highlighted with the white box is digitally zoomed and is shown in Figure 3B–J. Figure 3B shows the first ROI in the time series, that is, with no averaging, and Figure 3C–J shows computationally averaged image data from 21 = 2 averaged frames, up to 28 = 256 averaged frames. The scale bar in Figure 3A is 200 µm, and the scale bar for Figure 3B–J is 20 µm. Through subjective visual inspection, as expected Figure 3B has the most noise, and improvements in SNR may still be occurring at higher image numbers. The output of the PerfectlyAverage code, shown in Figure 3K, confirms this observation, but the mean intensity responds nonlinearly, with some photobleaching. Based on the user‐defined photobleaching limit of 0% and considering the SNR the ideal number of averaged images is 28 = 256, corresponding to Figure 3J. However, by analysis of the PSD, the ideal number of frame averages is 24 = 16. Figure S1 shows data from the ROI highlighted with the red box. The mean intensity of the image differs slightly from the data shown in Figure 3K; however, the recommended optimal number of averages based on both the SNR within the prescribed acceptable photobleaching limit and on the PSD are unchanged at 28 = 256 and 24 = 16 respectively.

FIGURE 3.

FIGURE 3

Laser scanning fluorescence microscope images of lens tissue paper stained with Safranin O. (A) The full field of view, with a white box and a red box highlighting two regions of interest (ROIs) with different relative intensities, with the higher intensities contained in the ROI highlighted with the white box and dimmer regions of the specimen highlighted with the red box. All images are shown with the ‘physics’ look up table. The ROI highlighted with the white box is digitally zoomed and shown in B–J. (B) The first ROI in the time series, that is, with no averaging, and (C)–(J) computationally averaged image data in increments of 2 n where n is image number, up to increasing numbers of averaged frames up to 28 = 256 images. The scale bar in A is 200 µm, and the scale bar for images B–J is 20 µm. The output of the PerfectlyAverage code is shown in K. Based on the user‐defined photobleaching limit of 0% and considering the SNR the ideal number of averaged images is 28 = 256, corresponding to image J. However, by analysis of the PSD, the ideal number of frame averages is 24 = 16. Figure S1 shows data from the ROI highlighted with the red box.

Figure S2 shows a plot of the optimal number of averages per image based on SNR and photobleaching, shown in magenta, and the optimal number of averages per image based on the PSD for the dataset presented in Figure 3, but with a central cropped region ranging from 8 pixels in diameter to no cropping, taking into account the full 4096 pixel × 4096 pixel image size during the measurement. The optimal averaging parameters based on SNR and photobleaching and on the PSD are unchanged irrespective of image diameter until the image is of 8 pixels × 8 pixels diameter, when the number of averages recommended based on the PSD cut‐off frequency = 0.1 decreases from 16 to 8. These data suggest that it may be possible to acquire data from subregions of the field of view, for example, using ROI scanning, for use with PerfectlyAverage and PSD measurement for robust and rapid assessment of the optimal number of averages in practical imaging studies, if the ROI is not too small.

Figure 4 shows results of line averaging of the fixed 3T3‐L1 cell specimen stained with ActinGreen, with no limit to the acceptable photobleaching. Figure 4A shows the full field of view, with a yellow box highlighting an ROI. This ROI is digitally zoomed and shown in Figure 4B–J. Figure 4B shows the ROI of the first image in the time series, that is, with no averaging, and Figure 4C–J shows computationally averaged image data from 21 = 2 averaged frames, up to 28 = 256 averaged frames. All images are shown with the ‘Fire’ look up table. 10 Based on the user‐defined photobleaching limit and considering the SNR the ideal number of averaged images is 26 = 64, corresponding to Figure 4H. However, analysis of the PSD suggests that the ideal number of line averaging is 24 = 16, shown in Figure 4F. Reducing the number of line averages from 26 to 24 reduces the overall imaging time by a factor of 22: given the scan speed of 400 Hz and the image size of 1024 pixels × 1024 pixels for these data a total image capture time of 162 s for 26 images based on the SNR and user‐defined photobleaching limit would reduce to 41 s for 24 images by consideration of the PSD.

FIGURE 4.

FIGURE 4

(A) Laser scanning fluorescence microscope image of fixed 3T3‐L1 cells stained with ActinGreen, shown using the ‘Fire’ false colour look up table. A yellow box highlights a region of interest (ROI), scale bar = 50 µm. This ROI is digitally zoomed and shown in B–J. (B) The ROI of the first image in the time series, that is, with no averaging and (C)–(J) computationally averaged image data in increments of 2 n , up to 28 = 256 images. Based on the user‐defined photobleaching limit and considering the SNR the ideal number of averaged images is 26 = 64, corresponding to H. However, analysis of the PSD suggests that the ideal number of line averaging is 24 = 16, shown here in F. (K) Output plot from the PerfectlyAverage software code based on input images B–J. Based on the signal‐to‐noise (SNR) ratio, the optimal image is defined as the input image with an average of 26 = 64, but power spectral density (PSD) analysis revealed that the optimal output image was obtained with frame averaging of 24 = 16 frames per image.

4. DISCUSSION

PerfectlyAverage presents a systematic software approach for determining the optimal number of frames for averaging in LSFM. Using SNR measurements and PSD analysis of time lapse imaging data recorded without averaging, this method identifies the point at which additional frame averaging ceases to provide significant noise reduction, while also considering the effects of photobleaching. This is likely to have the greatest impact for LSFM images comprised of a large number of pixels, such as Mesolens data where LSFM images of up to 24,000 pixels × 24,000 pixels are produced, 19 and in other gigapixel‐scale LSFM methods for imaging at the mesoscale. 20 , 21

The application of the PerfectlyAverage algorithm suggests that relying solely on SNR for optimising averaging may lead to excessive image acquisition, resulting in unnecessary photobleaching and increased imaging times. Instead, PSD analysis potentially provides a more robust criterion for determining the optimal frame count, often requiring significantly fewer averages than SNR‐based selection.

The primary implication of these findings is that traditional approaches to determining averaging parameters in LSFM, which typically rely on subjective visual inspection or SNR maximisation, may be suboptimal. The use of PSD analysis offers an alternative, mathematically grounded method for balancing noise reduction and photobleaching. PSD analysis provides insight into the frequency‐domain characteristics of image noise and structural consistency, revealing when further averaging ceases to add valuable image information. The ability to establish an objective, reproducible criterion for optimal frame averaging represents a step forward in designing experiments, standardising LSFM imaging workflows, and communicating methods and results. 22 , 23 , 24 , 25

The findings of this study align with prior research on noise reduction in LSFM imaging, which has largely focused on the trade‐off between SNR improvements and photobleaching effects. 1 , 6 These previous studies have shown that averaging improves SNR proportionally to the square root of the number of frames averaged, but PerfectlyAverage adds value by considering user‐defined photobleaching limits and frequency‐domain analysis to optimise frame selection.

The use of PSD‐based noise assessment has been applied in other fields, such as magnetic resonance imaging 26 and atom probe tomography, 27 but its application to LSFM has been limited. Some prior works have suggested alternative methods for reducing noise, such as deep learning‐based denoising techniques, 28 but these approaches often require extensive training datasets from many different specimens and specific computational resources may be needed. In contrast, PerfectlyAverage provides an easily implementable, open‐source solution that can be readily adopted by LSFM users without requiring machine learning expertise.

Limitations of PerfectlyAverage must be acknowledged. Firstly, the implementation of PerfectlyAverage assumes a stationary noise process, which may not be universally applicable across all LSFM imaging conditions. 29 Some biological samples may exhibit dynamic fluorescence variations due to photophysical effects such as reversible photoswitching 30 that are not fully captured by PerfectlyAverage. Additionally, the study focuses primarily on fluorescence‐based LSFM imaging; the applicability of PerfectlyAverage to other image contrast modalities, such as scanned transmission or reflectance, 31 where photobleaching is unlikely to feature, remains to be tested.

Another limitation is that the selection of the photobleaching threshold and PSD cut‐off frequency in PerfectlyAverage are user‐defined. While this allows for flexibility, it introduces a degree of subjectivity into the process. Future refinements to the PerfectlyAverage algorithm could incorporate automated photobleaching estimation or automated determination of the PSD cut‐off frequency, potentially improving the reproducibility of results across different experimental conditions.

PerfectlyAverage also requires an input dataset to estimate the optimal averaging conditions. This will be both microscope and specimen dependent. As such, it is recommended that in practice the user obtains image data in xyt format for the purpose of applying PerfectlyAverage from a region of the specimen different to those which will form the area for routine study. We also advise that PerfectlyAverage may not be useful for imaging of live specimens where rapid changes, for example, in intensity, morphology etc., are visible between image frames. However, the method may be suitable for slowly varying living specimens. As the data here have shown, different specimen types will yield different recommendations for averaging, and PerfectlyAverage should be applied at the outset of any study where averaging is needed, but Figure S2 suggests that it may be possible to reduce acquisition time of these data by considerably reducing the pixel number of the image dataset. Future research could explore whether machine learning approaches could complement PerfectlyAverage by dynamically adjusting PSD thresholds based on specimen properties or microscope configuration.

5. CONCLUSIONS

The development of PerfectlyAverage addresses a long‐standing challenge in LSFM imaging by providing an objective, reproducible method for optimising averaging conditions for routine study. By integrating PSD analysis, SNR calculations, and photobleaching corrections, this method helps to determine the point at which averaging ceases to provide benefit and it enhances experimental efficiency by reducing unnecessary frame acquisition.

By offering an open‐source software solution that is compatible with any LSFM, the aim is to make this tool widely accessible to the microscopy community to encourage adoption, integration into existing tools, further development to extend capability, and to overcome the current reliance on subjective or biased methods.

CONFLICT OF INTEREST STATEMENT

The authors declare no conflicts of interest.

Supporting information

Supporting Information.

JMI-299-155-s002.png (999.3KB, png)

Supporting Information.

JMI-299-155-s001.png (39.2KB, png)

ACKNOWLEDGEMENTS

This work was supported by the Medical Research Council (MR/K015583/1), the Biotechnology and Biological Sciences Research Council (BB/X005178/1), the Engineering and Physical Sciences Research Council (EP/I006826/1), and the Leverhulme Trust.

Foylan, S. , Rooney, L. M. , Amos, W. B. , Gould, G. W. , & McConnell, G. (2025). PerfectlyAverage: A classical open‐source software method to determine the optimal averaging parameters in laser scanning fluorescence microscopy. Journal of Microscopy, 299, 155–165. 10.1111/jmi.13425

S. Foylan and L. M. Rooney contributed equally to this work.

DATA AVAILABILITY STATEMENT

All software and the data that supports the findings of this study are openly available at the University of Strathclyde KnowledgeBase: https://doi.org/10.15129/919393bf‐7735‐4f47‐90cd‐ab09ddb0e8a9.

REFERENCES

  • 1. Pawley, J. B. (2006). Handbook of biological confocal microscopy (3rd ed.). Springer. [Google Scholar]
  • 2. Sandison, D. R. , & Webb, W. W. (1994). Background rejection and signal‐to‐noise optimization in confocal and alternative fluorescence microscopes. Applied Optics, 33(4), 603–615. 10.1364/AO.33.000603 [DOI] [PubMed] [Google Scholar]
  • 3. Zucker, R. M. , & Price, O. T. (2001). Statistical evaluation of confocal microscopy images. Cytometry, 44(4), 295–308. 10.1002/1097-0320(20010801)44:4<295::AID-CYTO1121>3.0.CO;2-C [DOI] [PubMed] [Google Scholar]
  • 4. Pinkard, H. , Corbin, K. , & Krummel, M. F. (2016). Spatiotemporal rank filtering improves image quality compared to frame averaging in 2‐photon laser scanning microscopy. PLoS ONE, 11(3), e0150430. 10.1371/journal.pone.0150430 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5. Cardullo, R. A. , & Hinchcliffe, E. H. (2007). Digital manipulation of brightfield and fluorescence images: Noise reduction, contrast enhancement, and feature extraction. Methods in Cell Biology, 81, 285–314. 10.1016/S0091-679X(06)81014-9 [DOI] [PubMed] [Google Scholar]
  • 6. Waters, J. C. (2009). Accuracy and precision in quantitative fluorescence microscopy. Journal of Cell Biology, 185(7), 1135–1148. 10.1083/jcb.200903097 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7. Boudreau, C. , Wee, T.‐L. , Duh, Y.‐R. , Couto, M. P. , Ardakani, K. H. , & Brown, C. M. (2016). Excitation light dose engineering to reduce photo‐bleaching and photo‐toxicity. Scientific Reports, 6(1), 30892. 10.1038/srep30892 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8. Davenport, W. B. , & Root, W. L. (1987). An introduction to the theory of random signals and noise. Wiley‐IEEE Press. [Google Scholar]
  • 9. Zhang, A. , Yang, B. , & Huang, L. (2008). Feature extraction of EEG signals using power spectral entropy. In International Conference on BioMedical Engineering and Informatics . IEEE. [Google Scholar]
  • 10. Schindelin, J. , Arganda‐Carreras, I. , Frise, E. , Kaynig, V. , Longair, M. , Pietzsch, T. , Preibisch, S. , Rueden, C. , Saalfeld, S. , Schmid, B. , Tinevez, J.‐Y. , White, D. J. , Hartenstein, V. , Eliceiri, K. , Tomancak, P. , & Cardona, A. (2012). Fiji: An open‐source platform for biological‐image analysis. Nature Methods, 9(7), 676–682. 10.1038/nmeth.2019 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11. Shannon, C. E. (1949). Communication in the presence of noise. Proceedings of the IRE, 37(1), 10–21. 10.1109/JRPROC.1949.232969 [DOI] [Google Scholar]
  • 12. Patterson, G. H. , Knobel, S. M. , Sharif, W. D. , Kain, S. R. , & Piston, D. W. (1997). Use of the green fluorescent protein and its mutants in quantitative fluorescence microscopy. Biophysical Journal, 73(5), 2782–2790. 10.1016/S0006-3495(97)78307-3 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13. Song, L. , Hennink, E. J. , Young, I. T. , & Tanke, H. J. (1995). Photobleaching kinetics of fluorescein in quantitative fluorescence microscopy. Biophysical Journal, 68(6), 2588–2600. 10.1016/S0006-3495(95)80442-X [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14. Wüstner, D. , Christensen, T. , Solanko, L. M. , & Sage, D. (2014). Photobleaching kinetics and time‐integrated emission of fluorescent probes in cellular membranes. Molecules (Basel, Switzerland), 19(8), 11096–11130. 10.3390/molecules190811096 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15. Nocedal, J. , & Wright, S. J. (2006). Numerical optimization. Springer. [Google Scholar]
  • 16. Harris, C. R. , Millman, K. J. , van der Walt, S. J. , Gommers, R. , Virtanen, P. , Cournapeau, D. , Wieser, E. , Taylor, J. , Berg, S. , Smith, N. J. , Kern, R. , Picus, M. , Hoyer, S. , van Kerkwijk, M. H. , Brett, M. , Haldane, A. , del Río, J. F. , Wiebe, M. , Peterson, P. , … Oliphant, T. E. (2020). Array programming with NumPy. Nature, 585(7825), 357–362. 10.1038/s41586-020-2649-2 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17. Proakis, J. , & Manolakis, D. (2006). Digital signal processing (4th ed.). Pearson. [Google Scholar]
  • 18. Hunter, J. D. (2007). Matplotlib: A 2D graphics environment. Computing in Science & Engineering, 9(3), 90–95. 10.1109/MCSE.2007.55 [DOI] [Google Scholar]
  • 19. McConnell, G. , Trägårdh, J. , Amor, R. , Dempster, J. , Reid, E. , & Amos, W. B. (2016). A novel optical microscope for imaging large embryos and tissue volumes with sub‐cellular resolution throughout. Elife, 5, e18659. 10.7554/eLife.18659 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20. Orth, A. , Tomaszewski, M. J. , Ghosh, R. N. , & Schonbrun, E. (2015). Gigapixel multispectral microscopy. Optica, 2(7), 654–662. 10.1364/OPTICA.2.000654 [DOI] [Google Scholar]
  • 21. Shin, R. , Choi, W. , Kim, T. , Kim, D. , Han, R. , Lee, K. , Won, N. , & Kang, S. (2020). Gigapixel confocal imaging using a massively parallel optical probe array with single directional infinite scanning. Scientific Reports, 10(1), 7658. 10.1038/s41598-020-64602-3 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22. Schmied, C. (2024). Image and image analysis publication checklists. Imaging & Microscopy, 26–27. [Google Scholar]
  • 23. Montero Llopis, P. , Senft, R. A. , Ross‐Elliott, T. J. , Stephansky, R. , Keeley, D. P. , Koshar, P. , Marqués, G. , Gao, Y.‐S. , Carlson, B. R. , Pengo, T. , Sanders, M. A. , Cameron, L. A. , & Itano, M. S. (2021). Best practices and tools for reporting reproducible fluorescence microscopy methods. Nature Methods, 18(12), 1463–1476. 10.1038/s41592-021-01156-w [DOI] [PubMed] [Google Scholar]
  • 24. Boehm, U. , Nelson, G. , Brown, C. M. , Bagley, S. , Bajcsy, P. , Bischof, J. , Dauphin, A. , Dobbie, I. M. , Eriksson, J. E. , Faklaris, O. , Fernandez‐Rodriguez, J. , Ferrand, A. , Gelman, L. , Gheisari, A. , Hartmann, H. , Kukat, C. , Laude, A. , Mitkovski, M. , Munck, S. , … Nitschke, R. (2021). QUAREP‐LiMi: A community endeavor to advance quality assessment and reproducibility in light microscopy. Nature Methods, 18(12), 1423–1426. 10.1038/s41592-021-01162-y [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25. Nitschke, R. , & Hartmann, H. (2024). A global reproducibility initiative in light microscopy. Imaging & Microscopy. 18–20.
  • 26. Counter, S. A. , Olofsson, A. , Grahn, H. F. , & Borg, E. (1997). MRI acoustic noise: Sound pressure and frequency analysis. Journal of Magnetic Resonance Imaging, 7(3), 606–611. 10.1002/jmri.1880070327 [DOI] [PubMed] [Google Scholar]
  • 27. Day, A. C. , Breen, A. J. , Reinhard, D. A. , Kelly, T. F. , & Ringer, S. P. (2022). Exploration of atom probe tomography at sub‐10K. Ultramicroscopy, 241, 113595. 10.1016/j.ultramic.2022.113595 [DOI] [PubMed] [Google Scholar]
  • 28. Lehtinen, J. , Munkberg, J. , Hasselgren, J. , Laine, S. , Karras, T. , Aittala, M. , & Aila, T. (2018). Noise2Noise: Learning image restoration without clean data. In Proceedings of the 35th International Conference on Machine Learning.
  • 29. Herberich, G. , Windoffer, R. , Leube, R. E. , & Aach, T. (2012). Signal and noise modeling in confocal laser scanning fluorescence microscopy. In International Conference on Medical Image Computing and Computer‐Assisted Intervention, 15(Pt 1), 381–388. [DOI] [PubMed] [Google Scholar]
  • 30. Bourgeois, D. , & Adam, V. (2012). Reversible photoswitching in fluorescent proteins: A mechanistic view. Iubmb Life, 64(6), 482–491. 10.1002/iub.1023 [DOI] [PubMed] [Google Scholar]
  • 31. Sheppard, C. J. R. , & Choudhury, A. (1977). Image formation in the scanning microscope. Optica Acta: International Journal of Optics, 24(10), 1051–1073. 10.1080/713819421 [DOI] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supporting Information.

JMI-299-155-s002.png (999.3KB, png)

Supporting Information.

JMI-299-155-s001.png (39.2KB, png)

Data Availability Statement

All software and the data that supports the findings of this study are openly available at the University of Strathclyde KnowledgeBase: https://doi.org/10.15129/919393bf‐7735‐4f47‐90cd‐ab09ddb0e8a9.


Articles from Journal of Microscopy are provided here courtesy of Wiley

RESOURCES