Jump to content

Stargazers Lounge Uses Cookies

Like most websites, SGL uses cookies in order to deliver a secure, personalised service, to provide social media functions and to analyse our traffic. Continued use of SGL indicates your acceptance of our cookie policy.

sgl_imaging_challenge_banner_30_second_exp_2_winners.thumb.jpg.b5430b40547c40d344fd4493776ab99f.jpg

Demonperformer

oversampling

Recommended Posts

Can someone please explain to me in words of one syllable (preferably less:D) what is so bad about oversampling. I've seen it stated that it hurts SNR, but when I look up oversampling on that source of all (almost accurate) knowledge, Wikipedia, it says that the reduction of noise is one of the reasons for using oversampling and isn't reducing noise supposed to be good for SNR?

I understand that if you undersample, (your pixels are too big) then you will start to see the pixels themselves, the light from a point source like a star occupying far more than the spread caused by the optics and they will start to look "square" instead of round. But if I cram the same area with 100x the number of pixels, I can surely only be increasing the resolution and so the stars will look the roundest possible.

I realise there is certainly a mathematical answer using words like myquist and others that I won't understand, but what will a picture that is oversampled actually look like that is so bad?

Thanks.

Share this post


Link to post
Share on other sites

Cannot answer your question, but I would also be interested to see the replies.  Currently in the market for an astro camera so have been looking at this a little more closely, but I like you (I think) are looking for a simple answer.  Would also be good to see images of an oversampled nature.

Sorry can't help with answering your query.   

Share this post


Link to post
Share on other sites

If you oversample you do not gain anything in terms of real resolution, you just spread out the signal over more pixels. This means that each of the pixels receives less light during a given exposure time, and because the photon noise in the signal scales with the square root of the number of photons, S/N goes down. In itself this is not a huge problem, if you then bin the signal, but that assumes the dark current, read-out, and amplifier noise contributions are zero, which they are not. Dark current might be zero for rapid planetary images, but read-out and amplifier noise are independent of exposure time. If you first oversample by a factor of 2, and then bin 2x2 to get back to optimal resolution, the amplifier and read-out noise in the resulting pixels will roughly be twice that of the optimal acquisition without binning.

  • Like 2

Share this post


Link to post
Share on other sites

Over sampling is not a big issue in reality. It depends on by how much and what you want to do with the data. If noise is a problem expose for longer.

The normaly quoted figure is a rough guide as in practice the criteria that the theory is based on are not met even approximately.

If you are making scientific measurements e.g. in spectroscopy then the "optimal" sampling can be 3 or 4 times the standard quoted figure.

Don't go mad but don't  sweat it either.

Regards Andrew 

  • Thanks 1

Share this post


Link to post
Share on other sites

Oversampling is hard to describe in words of one syllable because it has 4 syllables (and even syllable has 3) ?

One way to think about oversampling is by analogy to the digital audio space. Undersampling an audio signal is bad because you lose information at higher frequencies which affects sound quality. Oversampling just means more data to process for no gain since the limitation is the frequency response of the human ear.

Like the above posters I think it is not such a big deal. It is one of the considerations when choosing a new camera but should be looked at in relation to other factors. If you follow the approach of exposing each sub to be shot noise dominant it becomes a matter of exposure time per sub. Smaller pixels mean less light per pixel means longer exposure to be shot noise dominant. Note that, the exposure time needed is a function of focal ratio, read noise and brightness of the sky background and more. If the exposure time needed exceeds the abilities of your mount then it could be a problem. Diving deeper, if the exposure time needed leads to other camera issues like excessive amp glow then it could be a problem. Otherwise you can just bin or downsample in post-processing to reduce noise. Long exposure times are most likely to be needed when narrow band imaging under dark skies.

When choosing a camera, the order of things I would look at are:

  1. mono/OSC;
  2. sensor size in mm to get the desired FOV for the range of focal lengths I'm planning to use.
  3.  dynamic range which is a function of full well capacity and read noise.
  4. I think price would come into the equation about here as it is mostly driven by sensor size and well depth.
  5. The pixel size might then come into play from the point of view of the image size - will it look pixellated or not sharp when displayed the way I want to. That is more akin to considering undersampling.
  6. I doubt oversampling per se would ever come into the thought process but if it did it would be in relation to data transfer times and disk storage like the audio analogy

 


 

Share this post


Link to post
Share on other sites

Like already mentioned, if you over sample you loose SNR (this one I will put out for debate in a minute), you don't capture any significant information (compared to optimum sampling) and there is one more thing I'm not sure anyone mentioned - you give up some FOV for same size of the chip (if alternate scope that does not over sample can provide fully corrected field of appropriate size).

I'm lately starting to be in favor of oversampling actually. It's still work in progress but I think that SNR might not be an issue with proper handling of data. It is already becoming feasible with low read noise CMOS sensors (dark current is really small in both CMOS and CCD so it's the least of worries).

Here are some benefits of over sampling:

- one reduces pixel blur by effectively using smaller pixels (more point like - sampling is about point like samples rather than pixels having surface - so large pixels introduce blur over point samples).

- you can bin to get to proper resolution and recover SNR, but straight forward binning is not the best way to do it. I'm working on different binning techniques that will keep reduced pixel blur and push SNR gains past expected x2 (for 2x2 bin), thus maybe even reversing problem of thermal and read noise mentioned above.

Approach is fairly simple - noise is random and frequency distribution is spread throughout frequency domain. Original signal is band limited (both with optics, but more commonly with long exposure PSF - meaning seeing, tracking/guiding and optics combined). Smaller pixels compared to the smallest frequency captured lead to more noise frequency components being above band limit of actual signal, so we can cut off more noise frequency components without fear that we will impact signal. This lowers the noise and recovers even more SNR.

Share this post


Link to post
Share on other sites
16 hours ago, Demonperformer said:

 what will a picture that is oversampled actually look like that is so bad?

It will look slightly noisier. That's all. That is unless the noise has been removed during processing.

The noise component across the range from images that are massively oversampled to greatly undersampled only shows a small variation and has a very broad "peak" where real-world results are indistinguishable.

Almost every practical example of amateur gear: from 500mm focal length up to 4000mm f/l and pixel sizes from 3µ up to 12µ is capable of producing very fine images - or crappy ones, depending on the processing skill of the user.

Total exposure time, tracking accuracy, FoV, air stability & transparency and sky darkness all have a much bigger effect.

Share this post


Link to post
Share on other sites
11 minutes ago, pete_l said:

It will look slightly noisier. That's all. That is unless the noise has been removed during processing.

The noise component across the range from images that are massively oversampled to greatly undersampled only shows a small variation and has a very broad "peak" where real-world results are indistinguishable.

Almost every practical example of amateur gear: from 500mm focal length up to 4000mm f/l and pixel sizes from 3µ up to 12µ is capable of producing very fine images - or crappy ones, depending on the processing skill of the user.

Total exposure time, tracking accuracy, FoV, air stability & transparency and sky darkness all have a much bigger effect.

I don't think I agree completely with this.

If you look at two images, one sampled at the proper sampling frequency, and other sampled at twice that frequency, for all other things being equal (same camera, same aperture, same sky conditions, same imaging time, only focal length change) and you observe them at 1:1 ratio (100% zoom or 1 pixel maps to 1 pixel on screen), you will find that image that has been oversampled will simply offer enlarged version of the same image that has been properly sampled without small scale details - this relates to magnifying image on screen (it will look like when you zoom in on any image) - things start to look blurry - stars will be larger and whole image will look more blurry. There is another thing - it will have more than twice lower SNR. So if area has for example SNR of 5 in properly sampled image - you will be able to process it to be fairly decent and show itself (although darker but it will be there) - in oversampled image it will have SNR less than 2.5 - no amount of denoising and processing can make it look good.

If you look at those images scaled down (so not 1:1, but to fit the screen) - both will look almost the same, and oversampled one can even be a bit sharper, but will be of lower SNR - more noise.

Share this post


Link to post
Share on other sites

Anyone like to offer what optimal sampling is for imaging? If the seeing is say 1 arc second  and your optics can resolve to this level what do you consider is optimal ?

Regards Andrew 

Share this post


Link to post
Share on other sites
11 minutes ago, andrew s said:

Anyone like to offer what optimal sampling is for imaging? If the seeing is say 1 arc second  and your optics can resolve to this level what do you consider is optimal ?

Regards Andrew 

Couple of ways to go about it, and I believe it's been discussed before.

You can either measure average FWHM in your exposures, or calculate it (approximate would be better term).

Approximation of star FWHM would be based on couple of parameters: seeing FWHM that is likely for your location, or if you want to have optimum resolution for those special moments - go with best likely seeing FWHM, take Gaussian approximation to Airy disk for your optics, take guiding RMS and pixel size - and convolve all of that and measure FWHM / sigma of resulting gaussian (or you can approximate each by gaussian and do square root sum squared on corresponding sigma).

Either way you get FWHM/sigma of gaussian approximation for PSF (either measured or estimated). Do Fourier transform on it - result will be another Gaussian (take squared value since we want power of it, or conjugate times complex number, or magnitude of complex number), and then you can choose threshold value (let's say 5% but you can choose 1% if you want to try to do frequency restoration) and select frequency that has been attenuated by this threshold value (for which value of frequency on X axis is the Gaussian 0.05 or less?). This frequency will determine your sampling rate via Nyquist - you need twice number of samples corresponding to that frequency (want to capture that frequency and all smaller frequencies than that one).

Simple, right? :D

 

  • Thanks 1

Share this post


Link to post
Share on other sites

@andrew s

I just thought of a simpler way to determine proper sampling frequency - although above will give rigorous mathematical analysis and ultimately formula, you can do a simple simulation and measure it. It just takes plain old ImageJ to do it.

Let's suppose we have system that is producing 1.6" FWHM stars (mount/scope/skies) and we want to see what sort of sampling would be good for that.

Fire up ImageJ and create 32bit blank image (let's say 1000x1000 or so).

Take pen tool and put single pixel roughly at the center of image. Let's say that our image represents 0.1"/pixel resolution. 1.6" FWHM is equal to 2.355 sigma, or sigma = ~0.6794". In pixels for resolution of 0.1"/pixel that will be 6.794.

Now apply gaussian blur to image with sigma being 6.794 (I'm using plugin "Accurate Gaussian blur" because it's a bit better than the stock one)

Next do fourier transform of the image

image.png.6f431267b8180d108963eefb33b88d68.png

Observe values under the cursor and position cursor until you have value of 240 (these values are log values scaled to 0-255, so 240 is roughly 5%) . r value will display wavelength of current frequency, in this case it will be 25.47 pixels per cycle, or scaled back to arc seconds that is ~2.55". We want our sampling to be at twice that frequency (of half wavelength) - this means ~ 1.27"/pixel.

If you want 1% threshold - that would be value of 232, and in this case it's giving us ~20.3 pixels / cycle, or proper sampling frequency would be ~ 1"/pixel.

I often recommend that 1"/pixel is the most one should go, because it's not often that one will be able to do stars with less than 1.6" FWHM or there about.

(BTW you can set fourier transform options to calculate raw power spectrum as well, use that image instead, but it will not give you stats like above, process would be to scale gaussian so that max is 1 and then inspect with cursor where it falls to threshold value - 0.05 for example and note distance to center, or measure it. Divide total image size with this value and you will get pixels per cycle value like above which then you can use to calculate sampling frequency).

Share this post


Link to post
Share on other sites
8 hours ago, andrew s said:

Anyone like to offer what optimal sampling is for imaging? If the seeing is say 1 arc second  and your optics can resolve to this level what do you consider is optimal ?

Just multiply the size of a pixel in microns by 200 to get the optimal focal length in mm.
So for a camera with 4.7µ pixels, a focal length of 940mm yields 1 arc-second per pixel.
If you are aiming for 2 arc-sec/px, then the focal length should be half of that.

Share this post


Link to post
Share on other sites

Thanks pete_l and Vliav, sorry for the delay but I was out yesterday. As vliav commented this has been discussed before so  I will not take it further but thanks for the response. 

Regards Andrew 

Share this post


Link to post
Share on other sites

My 'practical imager's' low-syllable-count reply would begin by pointing out that oversampling can arise from two sources, the pixels being too small or the focal length too long.

If it arises from the focal length being too long you are losing field of view for nothing since, although your reduced field of view will bring you 'closer' to a small target, the result will contain no more real details than an image of the wider field from a shorter focal length instrument. Things like guiding and seeing will stop the potentially finer details from finding their way into the image. This is why putting a small pixel DSLR in the back of a long FL SCT is not a good idea.

If oversampling arises from having overly small pixels each of those pixels gets less light. (As it seems to me!)

I've imaged M101 and M51 carefully in order to compare a reflector and a refractor for an Astronomy Now article but the same data can be used to compare the two sampling rates, roughly 0.63"PP and 0.9"PP. I found no significant difference in the resolution of detail in the final images. I just think that oversampling can waste either FOV or time or both. But not fatally.

Olly

Edit: At the other end of the scale I regard 3.5"PP as the closest I'd go to undersampling. There is nothing blocky about the stars and, although there is a loss of fine detail, I find my Tak data shot at this resolution is very beautiful to work on. This makes lovely widefield data.

 

Edited by ollypenrice

Share this post


Link to post
Share on other sites

Thought I posted this yesterday, but it seems to have got lost ... or maybe it's just me who's losing it ...

Thanks for all the replies.

Putting a few details on my original enquiry: I have just got myself a couple of matched cameras with the idea of making it easier to combine mono and osc images (a bit of a way down the road, but the cameras were on offer) and they have smaller pixels, giving me resolutions of 1.33"/px for my main setup and 0.39"/px for my larger occasionally used setup. Having seen posts on other threads with people saying it was essential to bin when resolution was less than 1"/px, I was wondering if I had just made a very expensive mistake, but from what has been said above, it would appear that that worry was misplaced.

Thanks.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.