The Flat Frame Dust Distance Finder works out how far in front of the sensor the dust behind each Dust Donut on a Flat Frame sits, and whether it is on the sensor cover glass, the camera window or a filter. Open a flat, tell it which Telescope and Camera took it, and it measures every donut, so you know which surface to clean.
How to use it
- Open a flat frame, or drop the file onto the page. The tool reads uncompressed FITS (.fit, .fits, .fts) as well as PNG and JPEG images, but it refuses compressed .fz and .gz files. Your file is read in the browser and never leaves your computer. Until you open one, you see a generated example.
- Set the Telescope. Pick it from the catalogue or type its aperture and focal length in mm. If the FITS header carries these values, they fill in on their own. When the header’s focal length already includes a reducer or flattener, leave Barlow / reducer on None.
- Set the Camera’s pixel size in µm, or pick the Camera. For a binned flat, multiply the pixel size by the binning. A FITS header’s XPIXSZ already accounts for it.
- List your Optical Surfaces, giving each one a name and a distance in mm in front of the sensor: the sensor cover glass, the camera window, a filter. You will find the distances in the specifications of your Camera and filter wheel.
- Choose how the flat is shown and how hard the tool searches. Flattened removes the vignetting so the dust stands out, while Raw shows the flat as you shot it. Stretch starts at ±2.0% and sets the brightness range either side of the flat’s own level. Sensitivity starts at 4.5σ and sets how far above the noise a donut must stand. Ignore under starts at 20 px and drops any smaller donut.
- Read the result. Each donut is circled on the flat and numbered in the table. The summary gathers similar distances into groups lettered A, B, C from the nearest, and gives each group its likely location. Click a donut to see its distance, a close-up and its radial profile.
- Fix anything the tool got wrong. If a donut’s edge looks off, type its diameter in px. Use Add a missed donut for one it skipped, or remove a false one. Copy CSV puts every donut on the clipboard.
How it works
Dust on the sensor cover glass casts a small, sharp donut, while dust farther away, on the camera window or a filter, casts a larger and fainter one. That happens because the light reaching each pixel arrives as a cone whose width follows the focal ratio N. Dust a distance d in front of the sensor therefore blocks a disc d ÷ N across.
First the tool fits the flat’s smooth illumination, the vignetting, and removes it. It then searches for round dark spots at many sizes and measures the radial profile of each one at full resolution. The edge goes where the profile falls through half its deepest dimming. If your Telescope has a central obstruction, the donuts are rings, and the tool measures the outer edge and outlines the hole.
Donuts from one surface scatter by a few percent, so any distance within 12% of a group’s mean joins that group. A donut takes a surface’s name when its distance is within 20% of that surface’s distance. If no surface is close, it keeps only its group letter. A surface without a distance is ignored.
The distance scales with the measured diameter, so a 5% error in the diameter means a 5% error in the distance. A donut cut off by the edge of the frame is flagged Edge, because its size is less reliable. Keep in mind that the surface distances come from you. Clean the likely surface, then shoot new flats.
Formula
d = Ø × p ÷ 1000 × N
d is the Dust Distance, in mm in front of the sensor. Ø is the donut’s diameter in pixels, and p is the pixel size in µm (dividing by 1000 turns it into mm). N is the focal ratio of the whole train after any barlow or reducer, which is the focal length ÷ aperture.
Worked example
Say your Telescope has a 750 mm focal length and a 150 mm aperture, so N = 750 ÷ 150 = 5. With 3.76 µm pixels, a donut 60 px across measures 60 × 3.76 = 225.6 µm = 0.2256 mm on the sensor. Then d = 0.2256 mm × 5 = 1.13 mm. If your sensor cover glass sits 1 mm in front of the sensor, the donut is 13% away from it, which is within 20%, so it gets the cover glass’s name.
Common questions
How do I calculate the distance of a dust donut from the sensor?
Multiply the donut’s diameter in pixels by the pixel size in mm, then by the focal ratio of the whole train. The tool does this for every donut and shows the answer in mm.
How can I tell if the dust is on the sensor or on a filter?
Give each Optical Surface its distance in front of the sensor. A donut takes a surface’s name when its distance is within 20% of that surface’s, and donuts that share a distance form a group. Even without surface distances, the groups still show you which donuts share a distance.
Is my flat frame uploaded anywhere?
No. The file is read in your browser and never leaves your computer. There is no account, and the tool keeps nothing about your flat.
Why does it find no dust donuts, or too many?
Lowering Sensitivity finds fainter donuts, though you will also get more false ones. Ignore under matters too. At f/10 with 3.76 µm pixels, dust 0.75 mm from the sensor makes a donut only 20 px across, so lower it if you are looking for closer dust.
How accurate are the distances?
They are only as good as the measured diameter, the pixel size and the focal ratio. Check a donut’s radial profile, and if the edge looks wrong, type the diameter yourself.
Related tools
In the store
Equipment this tool helps you choose, at David Astro: