1. Introduction
Compressive sensing (CS) is a mathematical theory for simultaneous data acquisition and compression. For sparse images, or for images that can be transformed to a sparse domain, CS measures a collective sum of
m random projections, where
m is less than the total pixels in the image otherwise required for Nyquist-rate sampling [
1,
2,
3]. We apply this technique to gravitational microlensing events. Gravitational microlensing is an astronomical phenomenon that occurs due to a precise alignment of an observed source star and a lensing mass. The lensing system warps space-time due to its gravitational field causing a deflection in the light reaching the observatory from the source star. This deflection in light causes a change in magnification of the brightness of the source star, which can be quantitatively measured. Using this technique, exoplanets can be detected [
4]. In our study, we show the efficacy of using CS to obtain these photmetric light curves depicting microlensed events and the effects of noise on the measured light curves. For our CS modelling, we assume our image of interest,
x, to be
k-sparse and of dimension
n ×
n. We define a
k-sparse signal as one with
k coefficients whose values are significantly higher than the rest of the coefficients [
1]. We apply the CS measurement matrix,
A, of dimension
m ×
n, onto the image
x. The CS measurements acquired due to this projection are obtained in the matrix,
y, and are of dimension
m ×
n, where
m ≪
n. Once
y is obtained, we can solve for a sparse
x, given
A, using various reconstruction algorithms [
5,
6].
We solve for Equation (
1) to determine
x through the observation
y.
In this work, we use a greedy algorithm—orthogonal matching pursuit, provided by the Python library.
2. CS Architecture
We use CS architecture based on our previous work, as described in [
7,
8]. A figurative description is shown in
Figure 1.
A reference image can be viewed as a clean image. The observed image will have a change in pixel flux of the microlensing source star over time, as well as any noise. If the point spread function (PSF) of the observed and reference image are not identical, differencing algorithms can be applied. Differencing algorithms obtain a convolution kernel to match the PSF of the observed and reference image, and then perform subtraction on the convolved reference image and the observed image. However, to eliminate an additional layer of complexity, in order to accurately evaluate the effect of CS on reconstruction, we assume that the PSF of the observed and reference image are the same. Due to this assumption, we perform a subtraction to obtain the differenced measurements,
, as shown in Equation (
3).
For our simulation modeling purposes, we assume optimal differencing results, typically provided with both reference and observed images with the same detector response. The result of differencing can then be used to only detect a change in magnitude corresponding to a microlensing event. We can write the differenced image in that case as
The differenced image consists of relevant information needed to reconstruct a transient photometric curve. From the architecture in
Figure 1, we obtain
Differencing the images makes them sparse, with non-zero pixel coefficients for only the star sources experiencing magnification. Adding noise leads to less sparse images, which can hinder performance of CS reconstruction algorithms. Further details on the type of noise used in our work are discussed in
Section 3.
For 2D images, we apply CS in the following manner:
Generate a spatial sky image of size n × n using uniform random distribution, in the range of 50 and 5000 pixel value. The radius of these star sources are generated using an airy point spread function with an aperture radius between 1 and 5 pixel units, which is randomly chosen.
Magnification for the source star experiencing a single-lens microlensing event is determined by the microlensing equations [
4]. The center pixel value,
, at any time,
t, is given by
where
is the amplification value,
P is the pixel value from step 1, and
M(
t) is the magnification value at time
t.
If adding source noise or background noise, generate a noise image of the same size, n × n. Add this image to the image generated in step 1.
Generate a CS-based projection matrix of size m × n, where . In our simulations, we use .
Create CS-based measurements by
where
is the observed spatial region,
is the CS measurements acquired from applying CS on
, and
is the total measurement noise added.
Create CS-based measurements from a reference image,
, and the same measurement matrix,
A:
Obtain the difference, .
Reconstruct using CS reconstruction algorithms, given and A. Reconstruction algorithms such as orthogonal matching pursuit (OMP) or optimization algorithms can be used. We use OMP in our work. For OMP alogirthms, we set the sparsity level to be of n. Hence, once of n non-zero elements are obtained, the algorithm successfully exits. This value was used based on prior knowledge about transient sources in spatial sky images.
A sample reference image (
), a sample observed image (
), and a sample differenced image (
) are shown in
Figure 2,
Figure 3 and
Figure 4, respectively.
Once we have a differenced image, we can select the group of pixels that represent a source star experiencing a microlensing event, and plot the magnification over time, to obtain a photometric light curve. In our result analysis, we perform error calculations using this photometric curve over time.
3. Noise in Compressive Sensing Measurements
In this section, we discuss two types of noise: source noise and measurement noise.
3.1. Source Noise
This noise is associated with the sampling star field itself. The star sources can be contaminated with flux from surrounding stars. In addition, other sky background noise can leak into the source star flux measurement. For our analysis, we will assume the source noise is of Gaussian distribution. We can characterize it by
where
is Gaussian noise. In this case, noise gets folded into the measurement matrix,
A [
9]. Incorporating this for differenced images, as stated in Equation (
3), we obtain
where
.
3.2. Measurement Noise
Measurement noise is associated with the data acquisition process at the detector front end. For measurement noise, we model photocurrent shot noise using Poisson distribution. This modeling can be generalized to any type of noise, which requires applying Poisson noise to the data measurements.
3.2.1. Shot Noise
Shot noise is associated with the implicit arrival of electrons at the detector. This noise is applied to the detector measurements [
10,
11]. For equation purposes, we write this as additive noise to
. However, for practical purposes, shot noise is applied to
, as it is dependent on the signal and thus cannot be added independently to the measurements. We use Poisson distribution to depict shot noise.
3.2.2. Thermal Noise
This noise is produced by the random motion of electrons in the detector [
10,
12]. We can model this by stationary Gaussian random noise.
3.3. Total Noise in Detectors
Since random, uncorrelated noise adds quadratically, total detector noise,
is given by
where
is shot noise, and
is thermal noise. Incorporating all the noise sources, CS can be modeled as
In our simulations, we model shot noise.
3.4. SNR for CS Applications
In this section, we discuss the theoretical implications of noise on CS reconstruction. For source noise, we generate Gaussian random noise. By varying the standard deviation of the Gaussian kernel, we can obtain noise with different signal-to-noise ratios (SNR). We define SNR as
where
is the power of the observed image, and
is the power of the noisy observed image.
3.5. Expected Value and Variance for CS Applications
Since
A and
are independent random variables, the expected value of the noise is
Given that
has a Gaussian distribution with mean 0, the expected value of
. If we assume thermal noise to be normally distributed as well,
. Hence,
in those circumstances. For all independent noise sources, variance is given by
In our work, we propose to construct A so that it has a low variance. We compare the results with a binomial distribution as well as Gaussian distribution.
In this section, we also describe mutual coherence of a matrix and its relation to CS reconstruction. Hence, the variance of the noise as well as mutual coherence, , of A will factor in the reconstruction accuracy using CS methods.
3.6. Mutual Coherence of a Matrix
From [
1], we can incorporate the following equations for CS analysis. First, we define
as given in [
1]:
where
A is the measurement matrix, and
a represents a column of
A.
Given
A, the sparsity of the signal, or the number of non-zero elements,
k, in a signal is given by Equation (
18) [
1].
Hence, we want to be as low as possible, in order to increase the bound for k. This will ensure a higher accuracy in CS reconstruction with a higher sparsity tolerance in signals.
4. Numerical Results
To analyze the effect on single-lensed microlensing events in crowded star fields, we generate dense stellar fields with airy spread point sources. For a
pixel image, we generate star sources equal to
of the total number of pixels. Each star is chosen to have an airy disk radius between 1 and 5 in pixel units and amplitude ranging from 50 to 5000 units. The values are chosen randomly from a uniform random distribution. For an image of size
n ×
n, where
, we use
m =
. Hence, instead of using 16,384 samples to obtain a 16,384 pixel image, we use 4096 samples. From Equation (
1),
y is of size
. For transient events, as portrayed by our modeling using single-lens gravitational microlensing, we want to reconstruct the time domain signal, representing the pixels experiencing a transient event. For CS, sparsity is essential; hence, in our simulations, we apply CS on differenced images, which are sparse. We difference the crowded star fields with a reference image. For understanding the effect of noise, the crowded stellar images have noise added. Thus, when differenced, noise as well as the microelensed star should be evident in the residual. For ideal comparison, we simulate the detector point spread function (PSF) to be the same for the observed and reference image. Noise is the only addition in the observed image. Hence, in the differenced image, the characteristics of the noise are preserved. In our simulations, we use orthogonal matching pursuit (OMP) to reconstruct CS measurements. Convex optimization algorithms provide better accuracy in reconstruction [
5] than greedy algorithms. However, greedy algorithms are computationally less complex and can have faster run times. Due to the latter advantage, we use greedy algorithms to run 100 Monte Carlo simulations for each set of parameters.
Percent error as described in Equation (
19) is used as a metric to quantify the accuracy in reconstruction of the image.
where
and
are the total fluxes within the 3-pixel radius of the source positions of the reconstructed and original differenced images, respectively. The error at the source star is of critical importance as the photometric light curve is generated based on the magnification of the source star of interest.
4.1. Gravitational Microlensing Setup
For all our simulations, we use a gravitational microlensing curve generated by a single lens. The amplification over time due to a single microlensing event is generated by the equation given in [
4].
Here,
t is the time sample,
is the impact parameter,
is the peak magnification time, and
is the Einstein ring radius crossing time. In our simulations, we use
and
to vary the amplitude of the photometric curve, in order to understand the effect of noise with the different magnifications. We use
and
.
Figure 5 shows sample magnification curves with
and
. The lower
value provides a higher magnification of the light curve.
In practical applications where the samples are not exactly zero, we can distinguish sparse signals as signals whose coeffecients decay at a high rate. In
Figure 6 and
Figure 7, we show the rate of decay of the coefficients for
and
.
Hence, it is evident that photometric curves with have a higher rate of decay compared to photometric curves with . Therefore, for CS, sparser signals should have better reconstruction accuracy.
4.2. CS Analysis with Source Noise
This set of simulations vary the amount of source noise,
, added to the observed image for a single-lens microlensing event with
and
. Simulations are performed using the model described in Equation (
7).
To characterize source noise or background noise, we use Gaussian noise, with mean 0 and varying standard deviation. By varying the standard deviation of the added Gaussian noise, we obtain the different SNRs for the observed image and noisy observed image.
Figure 8 shows the CS reconstruction error with different amounts of added source noise to the observed image. A binomial measurement matrix with
CS measurements is used for this simulation.
In
Figure 8, we can note that the % error is the lowest when the magnification peaks at
, as shown in
Figure 5. We also see the effect of the different levels of noise on the % error.
Figure 9 shows the comparison between
and
. As the SNR decreases, the % error difference between the two
also increases. For high-magnification events, where
is lower, sparsity is higher. Thus, the % error is lower in those circumstances, as noted in
Figure 9. From
Figure 8 and
Figure 9, it is evident that for low SNR images, CS reconstruction works better when the impact factor
, as opposed to when
. A summarizing result from this figure is that CS works well for high-magnification images, even with addition of noise, following the need for sparsity in signals for accurate CS reconstruction.
From Equation (
16), we get the total noise variance for added Gaussian source noise with noise variance,
, as shown in
Table 1. We obtain the average
over 100 Monte Carlo simulations of
A.
As SNR decreases for the higher-magnification event, with , the % error between starts to decrease at a lower rate as compared to .
From
Figure 10 and
Figure 11, we note that CS reconstruction is better with lower mutual coherence measurement matrices. By adding source noise, we are making the images less sparse; thus, the Gaussian measurement matrix, which has lower mutual coherence, works better. In the case of source noise, variance of
A does not affect CS reconstruction. Changing the variance of
A is equivalent to scaling the
y measurements. The
A matrix folds into
x as well as
, thereby retaining the same SNR level, so, in turn, it should have no effect on CS reconstruction.
4.3. CS with Added Measurement Noise
For our numerical analysis, we use addition of shot noise, as well as thermal noise. Typically, shot noise is of Poisson distribution. Poisson noise is applied and cannot be added, as it is signal dependent. Hence, for each element in
y, Poisson noise is applied by generating a Poisson distribution with
the value of that specific element in
y. Here,
is the expected value of the Poisson distribution. We apply Poisson noise to different simulated star fields, over 100 simulations, and obtain the average % error over all the Monte Carlo simulations. We use
A as a binomial random matrix. The expected value of the product of the two independent probability distributions are given by
where
is the expected value and variance of the Poisson distribution for each element in
y, and
p is the expected value of the binomial distribution in
A with the number of trials = 1. Hence,
refers to the expected value of the variance of the Poisson distribution over all samples of
y.
In order to reduce the Poisson noise variance,
p can be tuned. However, CS reconstruction depends on
as well.
Table 2 shows the noise variance and mutual coherence of
A for the binomial distributions with
and
. Both the distributions have similar
values.
Shot noise is applied using Poisson distribution to
. We apply Poisson noise with
, where i represents the
element in
. If the microlensing star pixel flux is lower than the other pixel star fluxes in the images, then the addition of Poisson noise to
can significantly degrade the CS reconstruction of
.
Figure 12 and
Figure 13 show the effect of tuning
p on CS reconstruction.
Figure 12 and
Figure 13 show that for high-magnification pixels in the time-series light curve (as shown in
Figure 5), the Poisson noise error is lowest at those time samples, as compared to the low-magnification time samples. In addition, we show that by decreasing
p of the Binomial matrix,
A, we can decrease the noise error by an average of
over all time samples for
and
for
.
5. Conclusions
In our previous studies on the application of compressive sensing to gravitational microlensing, we showed that CS is able to reconstruct the light curve without compromising the scientific parameters of interest. However, our study did not incorporate the effect of noise. In this study, we show the effect of source noise as well as measurement noise. For source noise, we note that choosing a measurement matrix with low mutual coherence can improve results, as expected by CS theory. Our analytical and numerical results show that for a measurement matrix with lower mutual coherence, CS reconstruction works better. We compared the Gaussian measurement matrix with 0 mean, and 0.25 units of variance, with a binomial measurement matrix with 0.25 units of variance as well. The binomial measurement matrix has a higher mutual coherence as compared to a Gaussian measurement, as also shown through numerical simulations. Through our simulations, we can conclude that matrices with lower mutual coherence provide better CS results when source noise is present. For the measurement noise analysis, we applied Poisson noise to depict shot noise. As Poisson noise is dependent on the signal itself, we note that for high-magnification events, where the flux of the microlensing source star pixels are comparatively higher, Poisson noise during CS measurements acquisition can lead to a lower % error. In addition, we show through our analytical and numerical results that by reducing the value of p, where p represents the expected value of the binomial distribution of A, we can achieve lower noise variance, thereby decreasing the average % error in CS reconstruction. Our results demonstrate effectiveness using the OMP algorithm. Various other algorithms, such as convex optimization, can provide better sensitivity and reconstruction accuracy with a trade-off of computational complexity.
Author Contributions
Conceptualization, A.K.-P.; Investigation, A.K.-P.; Software, A.K.-P.; Supervision, R.K.B. and T.M.; Writing—original draft, A.K.-P. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
Not applicable.
Conflicts of Interest
The authors declare no conflict of interest.
Abbreviations
The following abbreviations are used in this manuscript:
CS | Compressive sensing |
SNR | Signal-to-noise ratio |
References
- Eldar, Y.C.; Kutyniok, G. (Eds.) Compressed Sensing: Theory and Applications; Cambridge University Press: Cambridge, UK, 2012. [Google Scholar]
- Bobin, J.; Starck, J.; Ottensamer, R. Compressed Sensing in Astronomy. IEEE J. Sel. Top. Signal Process. 2008, 2, 718–726. [Google Scholar] [CrossRef] [Green Version]
- Candès, E.J. Compressive sampling. In Proceedings of the International Congress of Mathematicians, Madrid, Spain, 22–30 August 2006. [Google Scholar]
- Seager, S. (Ed.) Exoplanets; University of Arizona Press: Tucson, AZ, USA, 2010. [Google Scholar]
- Pope, G. Compressive Sensing: A Summary of Reconstruction Algorithms. Master’s Thesis, ETH, Swiss Federal Institute of Technology Zurich, Department of Computer Science, Zurich, Switzerland, 2009. [Google Scholar]
- Diamond, S.; Boyd, S. CVXPY: A Python-embedded modeling language for convex optimization. J. Mach. Learn. Res. 2016, 17, 2909–2913. [Google Scholar]
- Korde-Patel, A.; Barry, R.K.; Mohsenin, T. Application of Compressive Sensing to Gravitational Microlensing Experiments. In Proceedings of the International Astronomical Union, Sorento, Italy, 19–25 October 2016; pp. 67–70. [Google Scholar]
- Korde-Patel, A.; Barry, R.K.; Mohsenin, T. Compressive Sensing Based Data Acquisition Architecture for Transient Stellar Events in Crowded Star Fields. In Proceedings of the IEEE International Instrumentation and Measurement Technology Conference (I2MTC), Dubrovnik, Croatia, 25–28 May 2020; pp. 1–6. [Google Scholar]
- Arias-Castro, E.; Eldar, Y.C. Noise folding in compressed sensing. IEEE Signal Process. Lett. 2011, 18, 478–481. [Google Scholar] [CrossRef] [Green Version]
- Jauregui-Sánchez, Y.; Clemente, P.; Latorre-Carmona, P.; Tajahuerce, E.; Lancis, J. Signal-to-noise ratio of single-pixel cameras based on photodiodes. Appl. Ortics 2018, 57, B67–B73. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Hasinoff, S.W. Photon, Poisson Noise. Comput. Vision Ref. Guide 2014, 14, 608–610. [Google Scholar]
- Zmuidzinas, J. Thermal noise and correlations in photon detection. Appl. Opt. 2003, 42, 4989–5008. [Google Scholar] [CrossRef] [PubMed]
Figure 1.
CS architecture. The blue block represents CS data acquisition, which can be performed on-board a spaceflight instrument, while the orange blocks represent computations, which can be performed on the ground.
Figure 1.
CS architecture. The blue block represents CS data acquisition, which can be performed on-board a spaceflight instrument, while the orange blocks represent computations, which can be performed on the ground.
Figure 2.
Sample reference image.
Figure 2.
Sample reference image.
Figure 3.
Sample observed image.
Figure 3.
Sample observed image.
Figure 4.
Sample differenced image.
Figure 4.
Sample differenced image.
Figure 5.
Magnification curve for and .
Figure 5.
Magnification curve for and .
Figure 6.
Rate of decay of coefficients for and .
Figure 6.
Rate of decay of coefficients for and .
Figure 7.
Rate of decay of coefficients, zoomed in towards the higher magnification coefficients to view the difference between and .
Figure 7.
Rate of decay of coefficients, zoomed in towards the higher magnification coefficients to view the difference between and .
Figure 8.
Summary of the % error for an image with added Gaussian source noise for a single-lensed microlensing event with and for varying levels of Gaussian noise addition to the spatial region of interest.
Figure 8.
Summary of the % error for an image with added Gaussian source noise for a single-lensed microlensing event with and for varying levels of Gaussian noise addition to the spatial region of interest.
Figure 9.
Average % error for an image with added Gaussian source noise for a single-lensed microlensing event with and .
Figure 9.
Average % error for an image with added Gaussian source noise for a single-lensed microlensing event with and .
Figure 10.
Graph of % error for an image with added Gaussian source noise for a single-lensed microlensing event with . Binomial and Gaussian measurement matrices, with the given variance, are used for comparison.
Figure 10.
Graph of % error for an image with added Gaussian source noise for a single-lensed microlensing event with . Binomial and Gaussian measurement matrices, with the given variance, are used for comparison.
Figure 11.
Graph of % error for an image with added Gaussian source noise for a single-lensed microlensing event with . Binomial and Gaussian measurement matricies, with the given variance, are used for comparison.
Figure 11.
Graph of % error for an image with added Gaussian source noise for a single-lensed microlensing event with . Binomial and Gaussian measurement matricies, with the given variance, are used for comparison.
Figure 12.
Average % error for an image with applied Poisson noise to CS measurements for a single-lensed microlensing event with using binomial measurement matrix with and .
Figure 12.
Average % error for an image with applied Poisson noise to CS measurements for a single-lensed microlensing event with using binomial measurement matrix with and .
Figure 13.
Average % error for an image with applied Poisson noise to CS measurements for a single-lensed microlensing event with using binomial measurement matrix with and .
Figure 13.
Average % error for an image with applied Poisson noise to CS measurements for a single-lensed microlensing event with using binomial measurement matrix with and .
Table 1.
Total noise variance and mutual coherence of A, , with the given properties of A.
Table 1.
Total noise variance and mutual coherence of A, , with the given properties of A.
Measurement Matrix, A | Total Noise Variance | Average |
---|
Gaussian with | | 0.616 |
Binomial with | | 0.841 |
Table 2.
Total noise variance and mutual coherence for A with the given properties of a binomial distribution.
Table 2.
Total noise variance and mutual coherence for A with the given properties of a binomial distribution.
Measurement Matrix, A | Expected Value of Total Noise Variance | Average |
---|
Binomial with | | 0.841 |
Binomial with | | 0.789 |
| Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).