I am new to this forum and new to the use of Fast Fourier transforms although I can program in Python 3 a bit.

I have an unusual question and am seeking some general advice on (a) whether what I am proposing is possible (b) whether it will actually work and (c) how to apply it in code in a 3 (or) 4 dimensional sense. I am happy to work through the coding at my own pace but I need some advice on how one goes about solving this problem.

Here's the story.

Many years ago I stumbled across a NASA website at


Where citizen scientists could examine images from the SOHO spacecraft to try and discover comets. The spacecraft has cameras pointing at the sun with a disk to block the suns light so you can see what is going on close to the sun. Periodically sungrazer comets can be seen moving through the images.

The comets move through a series of images, generally taken 12 minutes apart and look like a bright spot or star moving in a straight line at a constant speed. I wrote a python program to identify the bright spots in the image, then look to see whether there was a series of bright spots across a number of images that mathematically looked like a comet. It worked and I was able to identify and discover 27 previously undiscovered comets by processing 24 years worth of data. Each day's data consisted of up to 120 images, generally 12 minutes apart being 1024 x 1024 pixels with color rgb values of 0-255 although I only used the red values in my processing.

Having achieved this I want to try to process the images to filter out noise and see if I can bring faint comets out of the noise.

Here is an example series of images which illustrate what I am talking about.

wget -r -l1 --no-parent -e robots=off -A *c3_1024.jpg https://soho.nascom.nasa.gov/data/REPROCESSING/Completed/2016/c3/20160313/

This should pull down a series of C3 camera images. If you use an image viewing program like Irfanview and tab quickly through all the images like it was a movie you will see a moving dot emerge in the lower left hand side of the image from the noise. That is a comet. I am not concerned with identifying the object once it has sufficiently brightened and come out of the noise. I want to be able to process a series of images like this to be able to see the comet at a much earlier point in time i.e. when it is buried in the noise.

I had read about how one could take an image, convert it into the frequency domain using FFT, put a high or low pass filter through it and then do an Inverse FFT to reconstruct the newly filtered image. But that is just a single image. In a single image my comet will just be a faint dot.

However if you imagine the series of images (red values only) as a series of 1024 x 1024 numpy arrays stacked on each other you end up with a cube that is (assuming say 120 images) 1024,x 1024 x 120 in size where one axis is time. There will be gaps in the layers where the gaps in time between images is something other than 12 minutes. Looking at that cube the comet will appear as a straight line eg from [200][200][10] to [300][300][100]. The values in the 3d pixels along that line will start off at the noise level and gradually increase as the comet gets closer to the centre of the image (the Sun) over time.

if one converted the cube into the frequency domain i think one would be able to see a low frequency along the line of the comet path. Theoretically one should be able to do a FFT transform, filter out high frequency noise to make that line more visible and then do the inverse FFT to reconstruct the filtered image. Hopefully then the comet would be more visible at earlier points in time.

Is what I am proposing feasible and if so, how would one do a 3d FFT transform and inverse transform in python to make it possible? Also how would one deal with the problem of there being gaps in image data eg only having images as follow

Image time

0000 0012 0012 0036 0048 0135 0148 0200 0212 etc

Is what I am proposing doable or is there a better or easier way to process such a series of images to make faint comets clearer and bring them out of the noise?

Thank Peter

  • $\begingroup$ questions should be sort and specific $\endgroup$ – Gideon Genadi Kogan Mar 30 '20 at 6:35
  • 2
    $\begingroup$ Hi, are you looking for an answer specifically along the lines you are suggesting here or along the lines of the general problem of identigying comets? Also, "There will be gaps in the layers where the gaps in time between images is something other than 12 minutes" this is not going to be the case unless you explicitly write it this way. Overall, I think it would be benificial if the question was made a bit more specific too. You can split it into sections so that it is easier to go through if it still needs to be longer ("Background" is required in this case I think). $\endgroup$ – A_A Mar 30 '20 at 9:42
  • $\begingroup$ Thanks There are general elements to my questions and then more specific elements in terms of implementation. My starting question is quite simple though. will it work? To be more precise, given my detailed description of the images above and what comets look like, will the use of FFT + filtering + Inverse FFT succeed in pulling very faint comets out of the noise? If not there is no point going any further however if there are other better ways of achieving the same result I am open to them... $\endgroup$ – Peter Berrett Mar 30 '20 at 10:57
  • 2
    $\begingroup$ Sounds like you want to do "Pseudo Coherent Integration" of images. The problem is the comet moves. Hence it is better to assume a movement model and integrate images compensating on the movement. Read about Optical Flow. $\endgroup$ – Royi Mar 30 '20 at 11:07
  • 1
    $\begingroup$ Following up on @Royi 's comment: Once you find a comet with high SNR frames and have a movement model, go back and align earlier frames so that the comet should be in the same spot in every image. Adding up series of frames, the return of light from the comet should intensify compared to the noise background. $\endgroup$ – Andy Walls Mar 30 '20 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.