Astrofriend's homepage

Navigation

Advertisement /
Annons:

Project News

Advertisement /
Annons:

Tutorial:
Can dithering replace dark calibration?


Dithering

  1. What is dithering?
  2. My hardware and software
  3. Setup APT
  4. Setup PHD2
  5. Sigma clipping
  6. Calculation of calibration noise

1: What is dithering?

When you talk about dithering in astronomy it's normally a small movement of the mount between each sub photo you take. What happens then is that when align and stacking the images the images will be shifted a bit to align the stars. But then also any static pattern from the sensor, hot pixels, column defects and alike will be placed in different position relative the stars on each sub image.

If the the sub images are just aligned and added the hot pixel will move around by random and look like this. The blurring look comes from it's a color camera and I used deBayer technique and above that zoom factor of x20 that take the sub image from 40x40 pixel to 800x800:

Hot red pixel

This image show a defect hot red pixel. It's only one pixel but it has been moving around by the dithering process. Hot pixels are normally cancelled out by dark calibration.

But dark calibration is very time consuming, especially if you don't have a temperature regulated cold camera, and your cameras lifetime will be shortened because of all the extra dark sub images you have to take. To my old Canon 5D camera I have 40 GigaBytes of sub dark images. And every time we add or subtract calibration images it adds random noise.

Can we use dithering to skip the dark calibration?

Yes, if the camera has very low static pattern (this is not noise, noise are random not static), I have read modern Sony cameras are good. I did this test on my own camera, a Canon EOS 6D.

If we use a function called Sigma clipping/reject instead of just add the sub images in combination with the dithering function.

It works like this:
After aligned the sub images the Sigma clipping function looks on the same pixel coordinates of each sub image. Let say 29 of 30 sub images has the level from 800 to 880 and the the 30th has 10000. The last is a hot pixel. The sigma clipping function will then exclude say everything that's outside mean value 840 +/- 30%, the pixel with value 10000 is outside and will be excluded and maybe replaced with the mean value of the others.

The result could look like this:

Hot pixel canceled

The hot pixel has almost disappear, it could be better than this if optimizing the parameters for dithering and Sigma clipping.

My camera is a color camera and then I have to do a deBayering process before I align the sub images, that will smear out the defect pixels and it cause the Sigma reject function to be less effective. A mono chrome camera had been a better choice.

It's important that the dithering move the mount large enough to separate the hot pixels enough. But at the same time, big movements makes the auto guiding more complicated, it take more time after a dithering until the mount stabilize again.

Update:
Now I use an another technic without debayering, I demosaic the image first to its color planes, red, green1, green2 and blue. After that align and median/sigma stack. Much better and I believe I don't have to do that strong dithering in the future. With smaller dithering the auto guiding don't need that long time to stabilize. Normally it's recommended 5 to 10 pixels dithering on a monochrome camera. If you have a color camera as I have I have found 10 to 20 pixels is enough. Maybe I can reduce that now with my own process.

You can read here how I use it, I have test it on a couple of images (Canon EOS 6D) and it looks to work perfect:
../tutorial-astroimagej/ tutorial-aij-01-introduction.html

Dithering

    Pros:
  • Reduce hot pixel and static pattern disturbance
  • Save camera lifetime
  • Save hard disk space
  • Save a lot of time
  • Eliminate aircraft and satellite tracks
  • No additional random noise from dark/bias calibration images
  • Make me happy :-)
    Cons:
  • Auto guiding after a dithering take longer time to stabilize but also give the camera time to cool down (DSLR)
Back to contents

2: My equipment and softwares to do dithering

My equipment:

  • Canon EOS 6D as main camera
  • Mount EQ6 Synscan goto controlled by EQMOD
  • QHY5 as guide camera, connected by a off-axis adapter.
  • An astroserver (Windows PC) that is controlled by remote.

Here is a list of what software I use and where you can download them, all of them are free.

This is just what I use, there are a lot of other hardware and software that can do this.

You have to be familiar with these software or what other software you use otherwise it will be difficult to follow.

Back to contents

Advertisement / Annons:


3: Setup APT

There isn't very much to setup in APT to do dithering. Maybe not necessary to put in the telescope focal length and camera pixel size. But I think it's wise and you need it for other purpose also. Here how it looks in the APT, down right:

APT camera and telscope setup

What's more important is to find out the dithering distance. You have to do a test to see how much you have to separate your hot pixels or other patterns you want to get rid off.

APT dithering setting

In my case I found that dithering distance =3 is optimal. It works like a scaling factor to the settings in PHD2. It correspond that the mount moves about 10 to 20 pixels every dithering. A mono chrome camera maybe needs less. But if there is static column pattern then it could need very big movements. If you use the software DSS to stack the sub images there is information about how much the move has been in x and y axis.

When I increased dithering distance from 2 to 3 I got problem with the auto guiding, I had to increase the timeout to 25 seconds.

If you working with short focal lenses you maybe don't have auto guiding. Then you can change setting from PHD guiding to APT guiding in the APT guide menu. I haven't tried this but then APT communicate with the mount to force it to move (dithering) between each sub image. Don't forget to connect scope.

Back to contents

4: Setup PHD2

Push the brain symbol in PHD to come to the advanced setup menu.

PHD2 setup, focalenght

Here you set the focal length of your guide telescope. For me it's the same as my main telescope because I have an off-axis guider (no guide telescope).

PHD2 setup pixelsize guide camera

Here you set the pixel size. Note! The guide camera's pixel size!

PHD2 dither setting

With my equipment I have found out that Dither Scale =2 is the optimal setting in PHD2.

PHD2 server enabled

Don't forget to enable server under tools!

Back to contents

Advertisement / Annons:


5: Sigma clipping

When you are finished with your sub images you have to align and stack them in your favorite software with a Sigma Clipping/Rejecting or Median function or similar.

Here are the software that I'm used to work with, they are old today but free. I believe most of the astro edit softwares can do this.

I normally use the standard setting, but for you it could be different.

Even if I haven't done it here you should still do a flat calibration.

Update:
Before you do the flat calibration you must adjust the level of your image, replace the bias with a constant. Fitswork which I use always do this to all images by automatic. If the exposures are very long the dark current must also be compensated for, do a measure of a darkimage without the edges, that mean value include the bias and dark current. Why a constant instead of real images? A constant don't have any random noise!

If you want to read more about dithering Lasse H. has provided some links here:

Back to contents

Advertisement / Annons:


6: Calculation of calibration noise

How much better will the signal / noise relation be with dithering instead of dark calibration?

Update:
I got some comments from the forum Cloudy Nights that there was a miss from me about the contribution of noise from flat calibration. I did some dirty math here to correct the influence from flat calibration.
And I also miss the note that gain is equal to one, 1 e- = 1 ADU.
I have added what happens with the S/N at the edges when the optics vignetting, very interesting to see.

Here is an (new) attempt to show a common situation:

CalibrationRandom noise from calibration: Dark/Bias vs Dithering/Median

The weak signal could be a nebula or a galaxy.

Random noise from dark, bias, flat and flat/bias calibration images is thought to be only readout noise, in flat also Poisson noise.

Note:
It could be something wrong with the calculation and it's very simplified, I will update it if I find anything wrong with it.

But still you get an idea about why it's better to use dithering instead of dark image calibration under some circumstances.

There are noise added even with dithering and one source of it are that different pixels are used, and they're not exactly the same, it's a static error but since dithering is random it appears as a noise. But anyway, you always use different pixel because the tracking normally don't is that exact. Some cameras are more suitable than others. Specifically, the static errors should not be in big areas, small in the area distribution. There should not be any amp glow as in old cameras. Pixel to pixel variation should of course be low as well.

Here you can download the Excel file above if you want to put in your own values for a test:

NOTE!
You download and use this file at your own risk, I can not take any responsibility if something happens.

Here you can read why we get noise from the object and background itself:


Advertisement / Annons:

Back to contents

back