All cameras produce noise which can be one or more of the following:
- A salt and pepper-like pattern.
- Pixels that are always on and appear white on a mono camera, or red, green, or blue on a color camera.
- Pixels that are always off and appear black.
Noise increases with temperature and exposure length. You won't notice noise in a daylight image because it's significantly brighter than the noise, but with long exposures at night you'll likely see it. Newer cameras tend to produce less noise, but they still produce it.
Even expensive cameras like the Hubble Space Telescope produce noise, which is why they are cooled to extremely cold temperatures. Most cameras designed for amature astrophotographers are also cooled, but typically only 10 - 30 degrees C below ambient temperature.
Many people find noise distracting, and a good way to decrease it is to subtract it from a captured image. A picture that contains your desired object, e.g., night sky, and noise is called a "light frame". A picture with just the noise is called a "dark frame" because it's mostly dark. Subtracting a dark frame from a light frame leaves just your desired object.
Dark frames don't currently work with RPi HQ cameras, but they will in a future release of Allsky when running on the Bullseye or newer operating system.
When should I take dark frames?
You can take dark frames anytime - the software will use your night settings when taking dark frames, even if you take them during the day. The most important thing is to cover your lens fully so no light gets in. This isn't always easy and is why many people take dark frames at night. A good time to take them is on cloudy nights so you aren't "wasting" any time.
The lens caps that come with many cameras let a small amount of light in, so don't depend on them to block all the light. Use the lens cap to keep the lens clean, but put a dark towel or something else over the lens. To be extra careful, only take dark frames at night or in a dark room.
You'll probably want to take dark frames before you install your allsky camera, especially if the camera will be difficult to access, for example, on the top of a tall pole. The noise produced by a camera changes over time so you'll want to take new darks whenever you notice "too much" noise.
Some people put their camera in the freezer before taking darks, then take darks until the camera is fully warmed. If that's not possible, take darks a few times a year when the temperature changes. The goal is to have a range of temperatures, but it's not critical to have EVERY possible temperature. A 2 or 3 degree spread is usually fine, e.g., 21, 24, 27 degrees C.
How do I take and use darks?
Execute these steps to take and then use dark frames.
Capture dark frames
- In the WebUI open the Allsky Settings page and set Take Dark Frames to Yes.
- Click on the Save changes button. This will stop Allsky and wait until you manually start it below.
- Cover your camera lens and/or dome. Make sure NO light can get in.
- Start Allsky:
systemctl start allsky
. Dark frames will be saved in the ~/allsky/darks directory. A new dark is created every time the sensor temperature changes by 1 degree C.
If there are no dark frames in the ~/allsky/darks folder something went wrong so check the /var/log/allsky.log file. - After you are done taking darks, set Take Dark Frames in the WebUI to No. Allsky will stop and wait for you to manually start it.
- Remove the cover from the lens/dome.
- Restart Allsky:
systemctl start allsky
.
Subtract dark frames
- On the Allsky Settings page in the WebUI set Use Dark Frames to Yes.
- Click on the Save changes button. This will restart Allsky taking light frames, and subtract dark frames at night.
How does the software handle darks?
When you are taking dark frames, the software will turn off auto-exposure, auto-gain, and any overlay settings (e.g., time) and use your nighttime settings for Max Auto-Exposure, Gain, and Binning.
If you later change any of those settings you should discard the old darks and take new ones. If you think you'll go back to the original settings, save the old darks instead of discarding them.When a dark image is taken a file called dark.jpg (or dark.png) is saved in ~/allsky/tmp, then moved to ~/allsky/darks with a name like "XX.jpg", where "XX" is the temperature, for example, 21.jpg.
When darks are being subtracted, the software looks in ~/allsky/darks for the dark frame that is closest to the current sensor temperature. For example, if the current temperature is 21 and you have 3 darks, 17.jpg, 20.jpg, and 23.jpg, the software will pick 20.jpg because it's only 1 degree off from the current sensor temperature.
The software does not actually look in the dark files - it simply looks at the names of the files. Unless something is really weird with your camera, or your darks are pretty old, the closest dark frame will give the best results.