Ry Cutter

Logo

A PhD in Astrophysics turned Data Scientist and Software Engineer, driven by a passion for science communication and innovative problem-solving.

Multidisciplinary:
- Lead Innovation Data Scientist
- Customer Insights and Behaivour Analyst
- Machine Learning Engineer

Machine Learning, Embedded ML, Software/Firmware Engineering, Automation, Python, Time Series, Forecasting, NLP, Data Visualisation, Experimental Design, Physics, Statistics, Wearable Tech, Connectivity, Human Factors, UI/UX

View My LinkedIn Profile

My CV

View My GitHub Profile

Data Augmentation using Zernike Moments for realistic and extreeme PSFs Part1

Part1: Image Subtraction, The need for a robust PSF kernel.

Project Context: My PhD centred on the rapid discovery of kilonovae. These are the explosions caused by colliding neutron stars. They last between 2-10 days in the visible spectrum, so locating them fast is crucial to understanding their physics. The challenge is that we are looking for them as a counterpart to gravitational waves, the LIGO-O3 sensitivity meant this was usually the whole sky (see below).

To search these large areas, we need a wide field telescope GOTO. The problem becomes finding new explosions in a sea of stars. To do this, astronomers use a technique called image subtraction. I implemented a parallelised pythonic version of the ZOGY algorithm, this meant image subtraction could be achieved on the large GOTO images in real time (i.e., image subtraction was completed in less time than the exposure time of the camerars). To make matters more difficult, GOTO had extreeme edges. Most telescopes are set such that stars will appear as circles with a 2D-Gaussian spread, this spresd is called the point spread function (PSF). However, this assumption does not hold true for GOTO, meaning a simple Guassian convolution kernel will not do the trick for image subtraction (see below).

A guassian convolution kernel on a non-guassian point source, the convolved template does not match the target which results in a residual in the subtracted image.

There are a few compounding issues here. The first, a kernel that makes no assumption about the PSF shape is needed. Secondly, the kernel needs to vary across the the image as the PSF is a function across a 2D plane (see below).

The Full Width Half Maximum (FWHM) of the PSF across the image plane. Highlighting the variability of the PSF in a GOTO image.

The solution to this problem is Zernike Moments, Zernike moments are a function that maps an image onto a set of complex Zernike polynomials. In short, these functions can recrrate any abitraliy complex 2D images.

Using Zernike Moments to rebuild the image of a kitten.

Here’s the result of the variable Zernike Moments function across one GOTO image. It’s versatility allows for a variety of convolution kernels to be built.

Using Zernike Moments to build a variable convolution kernel across a GOTO image.

We can now compare the results of the subtraction of the leading software (PSFex) to my new Zenike Moments subtraction.

Comparison of PSFex to Zernike moment kernels when computing image subtraction. There is a definite residual in the PSFex subtracrtion, whereas the "resdual" seen in ZM is not above the noise level.

Thus ends part 1! Here I have shown the need for a robust PSF kernel for image subtraction and how zernike moments was a way to achieve that.