Dust Shadows & Flat Fields

Inevitably it happens: dust shadows (upper right). There's a fainter one at left, almost at the same height.

You can of course remove these digitally by hand, but if you're time-lapsing, that's really onerous. There are photoshop and equivalent plugins, while some of the newer cameras have on-board fixing. In part it depends on the source of the dust, whether it is on the sensor's protective screen, the front of the lens, or somewhere else in the optical path. Hope that the camera's "sensor clean" removes it for your next session. If not, great care must be taken in cleaning, because it is easy to make things worse, permanently.

Flat fields are one way of addressing the problem. Here is a flat with the contrast cranked up to make the left spot come out. Notice as well how the middle is brighter than the edges: classic vignetting in most optical systems.

The concept is straightforward. Software takes the main image and divides by the (normalized) flat. So say the spot at right lets 0.5 (1/2) of the light through. Divide by 0.5 and you get 2, so that area's pixels will be made 2x brighter to compensate. If the spot on the left lets through 90% of the light, then the software divides by 0.9, effectively boosting those pixels by 1.111. Everywhere else has a value of 1, so the original pixel values are untouched. You should flat field (and hot pixel removal) before you do further processing. Flat fields are in common use outside of astronomy, especially in panoramas where vignetting is a distraction in wide fields.

I use ImagesPlus which allows me to process in batch. Tada, shadows are gone:

When the issue is dust, vignetting and shadowing beyond the camera's sensor/protector, the flat field must be done at the same f/ ratio and orientation.

Batch process and Murphy strikes at upper left:

Where did that come from?!?! Looking back at the originals, a new dust shadow appeared on frame 36! So I made a new flat, and re-processed.only to find it was still there! Perplexed, I looked more closely. To make it obvious I contrast stretched it:

The thing shifted from one frame to another! You can see how the division made the target area brighter. Murphy, Murphy, Murphy.

Well in this case I can create my time-lapse by cropping and avoiding this zone. Sigh!