Introduction

Charge-Coupled Devices (CCDs)1 and Complementary Metal-Oxide-Semiconductor sensors (CMOS)2 capture photons via the photoelectric effect, making them well-suited for optical astronomical observations. For decades, CCDs have been the preeminent choice in optical astronomy due to their significant performance advantages in performance. However, although CMOS sensors initially struggled with higher noise levels and limited dynamic range compared to CCDs, these differences have diminished substantially with advances in technology, particularly in noise reduction and dynamic range optimization. For example, for the Sony IMX455 ZWO ASI6200MM Pro CMOS detector, the typical read noise is about 1.028 \(\,e^-\) at a gain of \(0.25\,e^-/\textrm{ADU}\), and the dark current is about 0.002 \(e^{-} \cdot \text {pixel}^{-1} \cdot \text {s}^{-1}\) at \(0^\circ \text {C}\)3. In recent years, with their lower cost and greater accessibility, CMOS detectors are increasingly being adopted in optical astronomy. Notable examples of their use include the Tsinghua University Ma Huateng Telescopes for Survey (TMTS)4, the SiTian project (SiTian)5, and the Large Array Survey Telescope (LAST)6.

Pixel-to-pixel variations or pixel-response non-uniformity, are a widespread issue for both CCDs and CMOS sensors. It poses a significant challenge for high-precision photometry (at the millimagnitude level or higher precision), astrometric measurements, and morphological analysis of celestial objects–core objectives of almost all astronomical projects. The physical origins of pixel-to-pixel variations are multifactorial. Pixel-to-pixel variations in CCD cameras mainly originate from inhomogeneities in adjacent pixels’ quantum efficiency, and uniform in effective pixel area7. Over recent years, several studies have addressed the impact of pixel-to-pixel variations in CCDs. For example, Wachter et al.8 developed a method to derive pixel-to-pixel variations corrections for solar imaging instruments. Baumer et al.7 introduced a model that infers distortions in the pixel grid from flat field images, calculating the effects of improper flat fielding on photometry, astrometry, and PSF shape. Additionally, Xiao et al.9 studied the pixel-to-pixel variations in CCDs across various wavelengths and provide a physical model to explain the relationship between pixel-to-pixel variations and wavelength. Lastly, Luo et al.10 proposed a parametric method to model the wavelength dependence of pixel-to-pixel variations in laser-annealed, backside-illuminated CCDs. These studies demonstrated the significance of pixel-to-pixel variations in high-precision optical astronomical observations.

However, pixel-to-pixel variation is even more critical and complex for CMOS sensors than for CCDs. Unlike CCDs, which involve charge transfer processes, CMOS sensors read each pixel individually. Consequently, in addition to inhomogeneities in quantum efficiency and variations in effective pixel area among adjacent pixels, electronic instabilities (such as gain variations across pixels) also contribute to the pixel-to-pixel variation in CMOS sensors. Studying the amplitude of pixel-to-pixel variation in CMOS is therefore essential.

Moreover, in astronomical observations, pixel-to-pixel variations are typically corrected by capturing flat-fielding images and dividing the bias-subtracted observation image by the bias-subtracted flat-fielding images. These flat-fielding images often include dome flats, twilight flats, and super-sky flats. Although the spectral energy distribution (SED) of dome flats and optical paths differs significantly from that of the observed target, dome flats are generally the most effective method for achieving a high signal-to-noise ratio (SNR) for pixel-to-pixel variation. However, not all observatories possess the equipment to capture dome flats. Super-sky flats, despite having an SED closest to the target, demand long exposure times to achieve sufficient SNR and necessitate multiple exposures at different sky positions–a process that can be time-consuming. In contrast, twilight flats, while limited in exposure time and dependent on weather conditions, are more versatile and typically provide an SNR between the other two types of flats. Since a single twilight flat generally lacks sufficient SNR for high-precision pixel-to-pixel variation correction, combining multiple twilight flats into a single high-SNR pixel-to-pixel variation is a straightforward and effective approach when pixel-to-pixel variations remain stable over time. Therefore, studying the temporal stability and spatial uniformity of pixel-to-pixel variations in CMOS sensors is crucial for determining better flat-fields correction strategies.

The mini-Sitian array (MST)11, located at the Xinglong Observatory, consists of three 30 cm telescopes (named MST1, MST2, and MST3, respectively), each equipped with a single large 9k \(\times\) 6k Sony IMX455 ZWO ASI6200MM Pro CMOS camera, which provides a 3 deg\(^2\) field-of-view with a pixel scale of 0.86\(^{\prime \prime }\), and an optical filter. Specifically, MST2 has been capturing flat fielding images in an SDSS-like g-band filter for nearly two years, centered at approximately 4800 Å  with a full width at half maximum (FWHM) of about 800 Å 12. The first year was primarily devoted to testing, and the subsequent year (from October 2023 to September 2024) provided an excellent dataset for analyzing the temporal and spatial stability of pixel-to-pixel variations in CMOS sensor cameras. This study exploits this unique dataset to characterize pixel-to-pixel variations stability in CMOS sensors, critical for advancing high-precision photometric techniques in astronomy.

Results

Temporal stability of the pixel-to-pixel variations from single-exposure flat-field

MST2 captured 20 twilight flat field daily. Taking November 6, 2023 as an example, the left panel of Fig. 1 illustrates the pixel-to-pixel variations. The pixel-to-pixel variations are observed, and qualitatively, the variation of each individual pixel-to-pixel remains similar throughout the day.

Figure 1
figure 1

MST2 is outfitted with a diffuser plate to homogenize the incident light. Left panels: 20 pixel-to-pixel variations from November 6, 2023. The observation times are marked in each panel, and the panels are numbered in the order of observation time. The standard deviations of pixel-to-pixel variation are also calculated and indicated in each panel. Right panels: the result of subtracting 20 pixel-to-pixel variations by the first one. Color bar is overplotted at the right indicating the normalized electrical signal, respectively. The standard deviation are also labeled in each panel.

To quantitatively assess the scale and intraday stability of pixel-to-pixel variations, we first examined the histogram of pixel values from individual-exposure flat-field images. These distributions closely resemble Gaussian profiles. By fitting each histogram with a Gaussian function, we derived the standard deviation as a measure of the pixel-to-pixel variation. The resulting standard deviations range from 1.209% to 1.225%, with a typical value of 1.216%. It is important to note that this scatter originates from both intrinsic pixel-to-pixel variation and Poisson noise (e.g., shot noise and read noise).

Here, we roughly estimated the contribution of Poisson noise. For each bias-subtracted flat-field, we calculated the SNR by taking the square root of the median number of electrons, which was estimated by multiplying the median ADU value by the gain (\(\sim 0.25~e^-\)/ADU for MST2). The inverse of the SNR provides an approximate estimate of the random error, yielding a typical value of about \(1.160\%\). This suggests that the standard deviation of pixel-to-pixel variations in a single flat-field is primarily dominated by Poisson noise rather than intrinsic pixel-to-pixel variations. It means that using a single flat-field for correction introduces a random photometric error of approximately \(1.160\%\) per pixel, and if a star spans 10 pixels on the detector, this will introduce a random error of about 0.367 \(\%\) mag in its photometric measurement.

Moreover, the standard deviation of the intrinsic pixel-to-pixel variations was theoretically estimated by calculating the arithmetic square root of the squared difference between the typical standard deviation of pixel-to-pixel variations from a single flat-field (\(1.216\%\)) and the random error induced by Poisson noise (\(1.160\%\)), yielding a value of approximately 0.365%.

To quantitatively investigate the stability of pixel-to-pixel variations across 20 flat fields taken on a single day, we used the first flat as a reference and calculated, for each subsequent frame, the standard deviation of the pixel-to-pixel variations after division by or subtraction from it. The results of subtraction for November 6, 2023, are displayed in the right panel of Fig. 1, showing no significant pixel-to-pixel variations. We then performed Gaussian fitting on the pixel distributions after both division and subtraction to derive the standard deviation as a quantitative measure of stability. The two methods produced consistent results, with standard deviations ranging from \(1.639\%\) to \(1.650\%\) and a typical value of \(1.641\%\), which includes a random error contribution of approximately \(\sqrt{0.01641^2 - (\sqrt{2}\times 0.01160)^2} \sim 0.0004\) (\(\sqrt{2}\) results from the combination of two independent variables). This implies that the stability of the pixel-to-pixel variations derived from single flat-field is better than 0.1% over the course of a day.

Temporal stability of the pixel-to-pixel variations from daily flat-fields

In light of the demonstrated intra-day stability of pixel-to-pixel variations, we adopt the average derived from 20 flat fields as the representative daily pixel-to-pixel variation. We also tested the use of the median and obtained similar results.

Figure 2
figure 2

Left panels: as an example, pixel-to-pixel variations of November 2023 for selected regions are composed of \(100 \times 100\) pixels (X from 1900 to 2000 and Y from 1900 to 2000). Right panels: the result of subtracting 17 daily flat field by the November 6, 2023. Color bar is overplotted at the right indicating the normalized electrical signal, respectively. The date and standard deviation are labeled in each panel.

Figure 3
figure 3

Values of nine randomly selected pixels vary over time (i.e. daily pixel-to-pixel variations; blue dots). The results of the monthly pixel-to-pixel variations overplotted with red asterisks. The black and green lines represent the median values and the standard deviation, respectively. The standard deviation is labeled in each panel.

To systematically analyze the stability of daily pixel-to-pixel variations, we conducted a year study using the MST2 dataset. As a representative example for illustration, we present the results from November 2023. The left panel of Fig. 2 shows zoomed-in \(100\times 100\) pixel regions of the daily pixel-to-pixel variations throughout that month. Visually, the spatial structures of the variations remain largely consistent from day to day. For a quantitative assessment, we calculated the standard deviation of the daily pixel-to-pixel variations using Gaussian fitting. Across the full dataset, the values generally range from \(0.434\%\) to \(0.533\%\), with a typical value around \(0.453\%\). At this stage, the influence of random noise in each daily flat-field (20) (approximately \(0.0116 / \sqrt{20} \sim 0.0026\)) has been substantially reduced; consequently, the impact of random errors diminishes, and the intrinsic pixel-to-pixel variations become the dominant contributor. Using a daily flat field for correction will introduce a random photometric uncertainty of about \(0.3\%\) per pixel, which corresponds to roughly \(0.1\%\) mag photometric error for a star spanning 10 pixels.

To evaluate the stability of daily variations within a given month, we similarly use the first daily pixel-to-pixel variations of each month as a reference. For each subsequent frame, we calculated the pixel-to-pixel variations after division by or subtraction from this reference. Again using November 2023 as an illustrative case, shown in the right panel of Fig. 2, the residuals exhibit flatness, with a standard deviation of approximately \(0.412\%\), confirming that daily pixel-to-pixel variations remain highly stable (\(\sqrt{0.00412^2 - (\sqrt{2}\times 0.0026)^2} \sim 0.0019\)) over the month.

To clearly demonstrate the stability of daily variations, we give an intuitive example. We randomly selected nine pixels from various regions of the detector and tracked their normalized pixel values over the course of one year, as clearly shown in Fig. 3. These values display excellent consistency, with a standard deviation of about \(0.2\%\), supporting the reliability of combining daily pixel-to-pixel variations into higher-SNR monthly pixel-to-pixel variations.

Temporal stability of the pixel-to-pixel variations from monthly flat-fields

Figure 4
figure 4

Like Fig. 1, but for monthly results zooming the same region as Fig. 2.

Given the observed stability of pixel-to-pixel variations within individual months, the mean value calculated from multiple flat-fields exposures was employed to characterize monthly pixel response patterns. As an illustrative example, the monthly pixel-to-pixel variation for November 2023 is computed by averaging the 17 available daily variations from that month. Similarly, comparative analysis using median values yielded statistically comparable characterization outcomes.

Figure 4 shows the monthly pixel-to-pixel variations for 10 months. Qualitative assessment shows that the spatial structures of the variations exhibit a high degree of consistency from month to month. The standard deviations of the resulting monthly pixel-to-pixel variation are also determined via Gaussian fitting, yielding values between \(0.344\%\) and \(0.361\%\). In this context, the contribution of Poisson noise less than \(0.1\%\), so the measured standard deviation almost reflects the intrinsic pixel-to-pixel variation.

Similarly, we use the first monthly pixel-to-pixel variations (October 2023) as the reference, for each subsequent frame, we calculated the pixel-to-pixel variations after division by or subtraction from this reference, and the results of subtraction for pixel-to-pixel variations of October 2023 are shown in the right panel of Fig. 4. The standard deviations of residuals range from approximately \(0.08\%\) to \(0.15\%\), confirming that monthly pixel-to-pixel variations remain stable over a year.

Additionally, we present pairwise comparisons between each set of monthly pixel-to-pixel variation in Fig. 5. For all monthly pixel-to-pixel variations pairs, data points for every pair of months are highly concentrated around the \(y = x\) line, with a sharp decrease in density as one moves away from this line. We calculated linear correlation coefficients between the spatial distributions of monthly variation pairs also fitted the slopes of the linear fits for their scatter plots. Linear correlation coefficients are generally greater than 0.95 (except for September 2024), with a median value of 0.96. The results of the linear fit for each pair are close to 1. This indicates a strong positive correlation between the monthly variations. The standard deviations of the fits are all smaller than 0.08% (except for September 2024), demonstrating a high degree of consistency and stability among the monthly pixel-to-pixel variations.

Figure 5
figure 5

The correlation plots between pixel-to-pixel variations for each month. For each panel, the black lines represent y=x. The correlation coefficient (R) and standard deviation (\(\sigma\)) are marked.

The spatial stability of the pixel-to-pixel variations

Figure 6
figure 6

Left panels: spatial distribution of pixel-to-pixel variations from 10 month. Right panels: each subplot in the left panel subtract the first subplot. The standard deviation is labeled in each panel.

Studying the spatial stability of pixel-to-pixel variations in CMOS cameras is crucial, as spatial non-uniformity in photon response can introduce detector position-dependent systematic errors in the photometric, astrometric, and morphological measurements of celestial objects.

To examine the spatial stability of monthly pixel-to-pixel variations, we divided the physical pixels of the CMOS sensor into \(20 \times 20\) bins and computed the standard deviation of the normalized signal in each bin using Gaussian fitting, as shown in the left panels of Fig. 6. While slight differences in standard deviation are observed across bins, the standard deviation of these values across all \(20 \times 20\) bins is approximately \(0.006\%\), corresponding to a negligible photometric error of only \(0.007\%\) mag per pixel. This indicates that the pixel-to-pixel variations in CMOS cameras are spatially stable to within \(0.01\%\). In addition, there is a systematic increase (approximately 0.0001) of the standard deviation on the right side of each left panel. This pattern is more likely attributable to the sensor itself rather than illumination-related effects, as the latter typically manifest at larger spatial scales and exhibit central symmetry.

Comparing the subplots in the left panels of Fig. 6 reveals that the spatial structure of pixel-to-pixel variations remains qualitatively consistent throughout one year. To quantify, we calculated linear correlation coefficients between the spatial distributions of monthly variation pairs and performed linear regression to estimate the corresponding slope parameters. Except for September 2024 (attributed to lower SNR), all inter-month correlation coefficients exceed 0.95 and the median value of the linear fitting slopes is approximately 1.

To further assess spatial stability throughout a year, we subtracted the monthly pixel-to-pixel variation of October 2023 from those of the remaining months, as shown in the right panel of Fig. 6. The resulting difference are nearly flat, with standard deviations below \(0.001\%\), providing strong quantitative evidence that the spatial structure of pixel-to-pixel variations in the MST CMOS detector remains remarkably stable throughout one year.

Discussion

Correction strategy of pixel-to-pixel variations

As previously mentioned, the pixel-to-pixel variation after stacking over a single day exhibits a random error of approximately 0.4%, while the pixel-to-pixel variation over a month is more precise, with random errors falling below 0.1%. In practical data processing, using fewer daily flats improves the processing efficiency, provided sufficient precision is maintained. This section will discuss the optimal number of daily flats for MST data processing, where the precision of each pixel exceeds one thousandth.

Figure 7
figure 7

Top panel: the standard deviation of the N-stacked flat fields in November, 2023. Pink dots and the yellow hollow circles are the standard deviations of the mean and median of the stacked flat fields, respectively. Gray dots represent the per-day standard deviation of the pixel-to-pixel variations. Bottom panel: the standard deviation of N-stacked flat fields divided by the mean flat fields of this month.

Figure 8
figure 8

The results after a \(2 \times 2\) binning (left panels) and \(4 \times 4\) binning (right panels) during the readout process of the left panel of Fig. 4, respectively. For each panel, the date and standard deviation is labeled in the bottom right corners..

To quantitatively track the evolution of the standard deviation of pixel-to-pixel variations as the number of combined days (N) increases, we calculated the standard deviation of pixel-to-pixel variations averaged over N days. Here, both the median and mean averaging methods were tested, yielding similar results. An example is shown in the left panel of Fig. 7. We can see that the standard deviation decreases rapidly as N initially increases, and the decrease rate slows as it approaches a stable region when \(N \ge 11\), where the difference in the standard deviation of the combined pixel-to-pixel variations is about 0.003%. In this stable region, the standard deviation is primarily driven by pixel-to-pixel variations, with random errors contributing only minimally. The results are the same for all months.

To achieve precision better than \(0.01\%\) for the intrinsic pixel-to-pixel variation, we then computed the standard deviation of the pixel-to-pixel variations obtained by dividing the N-day combined pixel-to-pixel variations by the monthly one. The right panel of Fig. 7 plotted this standard deviation against N in the month of November, 2023. We can see that when \(N \sim 11\), the standard deviation of the divided pixel-to-pixel variations is better than 0.05%. This indicates that combining pixel-to-pixel variations for more than 11 days enables us to achieve a precision exceeding 0.05% mag per pixel.

However, achieving a precision that exceeds 0.05% with the 11-day flat-fields combination is not universally applicable; it is specific to the MST11. For other surveys, this section only outlines a more general strategy that can be applied.

The impact of binning on pixel-to-pixel variations

In the previous section, we describe the method for obtaining high SNR pixel-to-pixel variations by stacking multiple daily pixel-to-pixel variations. Here, we discuss an alternative approach–binning–for obtaining high SNR pixel-to-pixel variations. Specifically, we examine the effects of \(2 \times 2\) and \(4 \times 4\) binning during the readout process on pixel-to-pixel variations. In the \(2 \times 2\) binning process, the median value is calculated from the four adjacent pixels, whereas in \(4 \times 4\) binning, the median is derived from the sixteen adjacent pixels.

The results of monthly pixel-to-pixel variations after binning are shown in Fig. 8. It is evident that with the application of binning, the pixel-to-pixel variations gradually diminish. Moreover, the pixel-to-pixel variations after binning appear to remain stable over time. Similarly, the standard deviation of the medians within each bin is estimated using Gaussian fitting and is represented by the green and red dots in Fig. 9. We observe that, after \(2 \times 2\) binning, the monthly pixel-to-pixel variations exhibit standard deviations ranging from 0.201% to 0.210%, with a median deviation of 0.204%. In contrast, following the \(4 \times 4\) binning, the standard deviations of the monthly pixel-to-pixel variations range from 0.148% to 0.153%, with a typical deviation of 0.150%.

This clearly demonstrates that, in practical observations, utilizing a binning readout mode can significantly reduce the number of daily flat-fields required, thereby making it far more feasible to achieve pixel-to-pixel variation corrections with millimagnitude precision or higher.

Correlation between the response of adjacent pixels

Multi-pixel imaging detectors (e.g., CCDs or CMOS) comprise millions of heterogeneous pixels. As we know, even with well-established technology, each pixel in a real-world imaging system exhibits slight differences. Under the assumption of illumination by a monochromatic, uniform surface light source, these variations manifest as the pixel-to-pixel variation discussed in this paper. Furthermore, a distinguishing feature of CMOS sensors, more pronounced than in CCDs, is that each pixel can be treated almost as an independent detector. This section will explore the correlation between the responses of adjacent pixels.

We first divide the detector space into four equal-area regions (the upper-left, lower-left, upper-right, and lower-right regions). Next, one pixel is randomly selected from each region of the monthly pixel-to-pixel variation, and the median of the normalized electrical signals for these pixels is then calculated, repeated approximately \(9000\times 6000 / 4\) \(=\) 1,350,000 times. Finally, the standard deviation of these 1,350,000 values is estimated using Gaussian fitting.

Figure 9
figure 9

The dependence on time of the standard deviation of monthly pixel-to-pixel variations. Black, green, and red dots denote the standard deviations of physical pixels, \(2 \times 2\), and \(4 \times 4\) binning, respectively. Blue dots represent the standard deviations of the median of four randomly selected non-adjacent physical pixels. Each colored line corresponds to the median value of data points of the same color.

The standard deviation of the 1,350,000 values as a function of months is also shown in Fig. 9 (represented by blue dots). It is observed that the results for the 10 months are nearly all within the range of 0.190% to 0.198%, with a typical value around 0.193%. Compared to the pixel-to-pixel variations after \(2 \times 2\) binning, the absolute difference is approximately 0.011%, which is a small value and can be considered negligible for milli-magnitude level photometry. The relative difference is about 0.00011/0.00193 = 5.70%. This indicates that the correlation between adjacent pixels is minimal and can essentially be disregarded.

Comparison of pixel-to-pixel variations between the MST CMOS and e2v CCD cameras

In this section, we provide a rough comparison of the pixel-to-pixel variations between the e2v CCDs and the MST CMOS sensors. For a statistically rigorous comparison, it is imperative that all conditions be held constant (e.g., filters, optical system, etc.), except for the sensors themselves. However, such conditions are not currently available. To provide a rough reference, we draw upon examples from the CCD camera used in the Javalambre Physics of the Accelerating Universe Astrophysical Survey (J-PAS)13 and the Euclid mission14, as their typical pixel-to-pixel variation results have been provided in9 and14, respectively.

Table 1 The standard deviations of pixel-to-pixel variations for typical CCD and CMOS cameras.

The J-PAS-Pathfinder camera is equipped with a single, large \(9216 \times 9232\) CCD290-99 detector manufactured by Teledyne e2v. The J-PAS filter system includes 54 narrow-band filters spanning wavelengths from 3780 to 9100 Å, with FWHM about 100 Å. Due to the low sky background of the narrow-band filters, J-PAS images are read out using a \(2 \times 2\) binning mode to reduce readout noise. The typical SNR is about 1000 per pixel. In this work, we use the pixel-to-pixel variation of the narrow passband of J480 to compare with MST. The visual imager on Euclid, known as VIS, operates within a single red passband (approximately 5500–9200 Å). The VIS detectors are CCDs, specifically 36 CCD273-82 units designed and manufactured by e2v. Each CCD is segmented into four quadrants, each containing \(4132 \times 4096\) pixels, resulting in a total of \(6.09 \times 10^8\) pixels across the VIS images14,15.

The standard deviations of pixel-to-pixel variations for both CCD and CMOS cameras, for physical pixels as well as after \(2 \times 2\) and \(4 \times 4\) binning, are presented in Table 1. The values for the J-PAS camera are derived from Figure 4 of Xiao et al.9, while the values corresponding to the Euclid camera are sourced from Verhoeve et al.14. It can be observed that the CMOS camera generally exhibits no higher standard deviations compared to the CCD camera, both for physical pixels and after binning.

Moreover, we investigated the spatial distribution of pixel-to-pixel variations between the e2v CCD and MST Sony IMX455 CMOS cameras. We found that the standard deviation of the spatial distribution for CCD pixel-to-pixel variations is approximately 0.03% Xiao et al.16, while that for CMOS is less than 0.006%. In any case, both are so negligible that they can be disregarded in astronomical observations.

It is important to note that using the J-PAS narrow-band filter for comparison may not be entirely fair, as it assumes that the pixel-to-pixel variation of the J-PAS CCD detector is consistent across the wavelength range of \(4800 \pm 800\)Å. Additionally, since the SNR for the Euclid image is not provided in Verhoeve et al.14, we cannot exclude the potential for overestimation in the results that they provided. Therefore, we conservatively conclude that the pixel-to-pixel variations and their spatial distribution in CMOS sensors do not exhibit more significant variations than those in CCDs.

Methods

Data pre-processing

Figure 10
figure 10

Left panels: an example illustrating 20 flat fields from November 6, 2023, with a color bar shown on the right and the title displayed at the top. In astronomical observations, structures such as vignetting and dust shadows typically span more than 51 pixels and thus remain in the large-scale flat field, without affecting the structure of pixel-to-pixel variations. The circular rings in the image, possibly caused by dust and particularly noticeable in the upper-middle and upper-right corners with a diameter of approximately 500 pixels, will have a negligible impact on this study and thus have not been addressed. Right panel: standard deviations of the ratio between the raw flat field and the median-smoothed flat field, as a function of kernel size, are illustrated using November 6, 2023, as an example. Similar results are observed for other dates. From bottom to top, five set data points of different colors represent five equally spaced images selected in chronological order of observation, with their corresponding SNRs labeled in the lower-right corner. The standard deviations of the first and last pixel-to-pixel variations on this day, evaluated at a kernel size of 51, are labeled. The left and right gray dashed lines indicate kernel sizes of 21 and 301, respectively.

From October 2023 to September 2024, MST2 captured 20 twilight flat field and 10 bias images daily. The number of days each month on which MST2 conducted these observations is shown in Table 2. To process the data, we employed the MST Imaging Processing Pipeline11 to generate flat field images after subtracting the master bias. This process was performed independently for each day, with the master bias constructed by combining the 10 bias images captured on that specific day. For this study, flat field images after subtracting the master bias are used as the default.

As an example, the left panel of Fig. 10 presents 20 flat field images taken on November 6, 2023. Each panel clearly displays a vignetting structure, characterized by brighter centers and darker edges in the field of view, as well as the pixel-to-pixel variations, small-scale.

The median value of each flat field image observed on different days was typically around 20,000 ADU. The signal-to-noise ratio (SNR) of each flat field image was estimated to be \(\sqrt{20000 \times \text {gain}} \sim 70.7\), assuming the MST gain of \(0.25\,e^-/\textrm{ADU}\). The SNR for the stacked flat field images observed each month was then calculated (the SNR of flat created from N daily flats would be approximately \(\sqrt{N}\) times that of a single exposure), with results presented in the rightmost column of Table 2.

Table 2 Number of observation days, individual exposures and typical signal-to-noise ratio (SNR) in each month.

Achieving the pixel-to-pixel variation

Pixel-to-pixel variations are often obtained by dividing the flats by a large-scale flat9. In this work, the large-scale flat is estimated using a running median filter algorithm from OpenCV (http://docs.opencv.org/) with a specified kernel size and the default border handling mode (reflection padding). The kernel size plays a crucial role in this process. If the kernel size is too large, the resulting pixel-to-pixel variation will include some large-scale flat field components. Conversely, if the kernel size is too small, some of the pixel-to-pixel variation components may be lost.

As an example, we took five flat fields at equal time intervals from the 20 flats of November 6, 2023, to estimate the dependence of the standard deviation of the pixel-to-pixel variation on the kernel size. The results are presented in the right panel of Fig. 10. As expected, with a small kernel size, the standard deviation increases rapidly as the kernel size grows since the lost pixel-to-pixel variation components are gradually recovered. Once the kernel size reaches 21, the standard deviation starts to level off, reaching a plateau as the kernel size increases. At the plateau, the difference between the maximum and minimum values of the standard deviation is less than 0.0053% (leading to a photometry error of \(\frac{|-2.5|}{\ln 10} \times 0.0053\% = 0.0058\%\) mag per pixel). When the kernel size continues to increase, particularly exceeding 301, the standard deviation rises rapidly again, indicating that large-scale flat field components begin to mix into the results. This behavior is consistent across other dates, as verified by randomly selecting several flats from the ten months of data.

In this study, we adopt a kernel size of 51 to obtain the pixel-to-pixel variations. The selection of this kernel size is based on a balance between stability and computational efficiency. For one, when the kernel sizes between 51 and 301, the first derivative of the standard deviation remains below 10\(^{-6}\), indicating that its impact on photometric accuracy is negligible. For another, smaller kernel sizes significantly accelerate the median filtering process–a crucial when handling matrices containing hundreds of millions of pixels. In this case, the fraction of white noise removed by the median filter with kernel size 51 is negligible.