Astrophotography Depth of Field: Aperture, Focus and Sharpness
Stars are at infinity as far as any lens is concerned, so aperture cannot change how sharp they are through depth of field. The depth of field problems in astrophotography are everything else: how close a foreground can be, how accurately you can find focus, and how long you can expose before the stars trail.
The foreground problem
If you focus on the stars, you are focused at infinity, and everything nearer than the hyperfocal distance falls out of the sharp zone. Here is the nearest sharp distance when focused at infinity, on full frame:
| Lens | f/1.4 | f/1.8 | f/2.8 | f/4 |
|---|---|---|---|---|
| 14 mm | 4.9 m | 3.8 m | 2.4 m | 1.7 m |
| 20 mm | 9.9 m | 7.7 m | 5.0 m | 3.5 m |
| 24 mm | 14.3 m | 11.1 m | 7.2 m | 5.0 m |
| 35 mm | 30 m | 24 m | 15 m | 11 m |
So a 24 mm lens at f/2.8 focused on the stars leaves anything nearer than about 7 m soft, and a tree or rock 3 m away will not be sharp. Many online guides give figures about half these, which is the same as assuming a much looser circle of confusion, see the circle of confusion post.
You can focus at the hyperfocal distance instead, which brings the foreground in, but the stars then become discs as big as the circle of confusion: about 5 pixels on a 24 MP sensor and about 7 on 45 MP, which looks bloated at any size above web use. A better answer for a close foreground is two frames. Focus and expose for the stars first. Then, without moving the camera, refocus on the foreground and shoot a second frame, with a longer exposure at lower ISO if you can light it, and blend them. That is the usual method for Milky Way landscapes, and the focus stacking post covers the blending.
Finding infinity
The infinity mark on many lenses is not reliable. Lenses are built with some travel past true infinity to allow for temperature and manufacturing tolerance, so turning the ring to the hard stop usually leaves stars slightly soft. Use manual focus and live view, magnified, on a bright star or planet, and adjust until the point is as small as it gets, then check by overshooting both ways. Do this while there is still some light. Focusing on a distant streetlight, the moon or a bright planet at twilight is far easier than on a faint star in the dark. Then leave the ring alone, or tape it.
Autofocus is hit and miss on stars, though some recent mirrorless cameras can lock onto a bright star or planet. Check by magnifying afterward.
Why aperture still affects focus
Stars at infinity do not change with aperture, but your tolerance for focus error does. The allowed error in sensor position is roughly plus or minus the f-number times your acceptable blur. If you want stars no blurrier than 2 pixels on 24 MP (12 micrometres), that is about 17 micrometres at f/1.4 and 34 micrometres at f/2.8. So wide-open focus is twitchier, and a change in temperature over a long night can shift it. Check focus again every so often, especially if it gets markedly colder.
Choosing the aperture
Aperture matters for light and for coma, an aberration that smears stars into little comet shapes toward the corners. Going from f/4 to f/2.8 doubles the light, so you can halve the exposure or the ISO. Coma is usually worst wide open and improves as you stop down. f/2.8 is the common compromise for wide-angle work. Lenses designed with astrophotography in mind, such as the Sigma 14mm f/1.4 Art and the Sony 14mm f/1.8 GM, are known for controlling coma well enough to use wide open, but check reviews for your own lens. Light is not free either: wide open on a wide lens also pushes the foreground limit out, as the table shows.
How long can you expose?
The sky turns by about 15 arcseconds every second at the celestial equator, less toward the poles. The familiar 500 rule says the maximum exposure in seconds is 500 divided by the focal length (times the crop factor on smaller sensors). It was set for lower-resolution sensors. On a 24 MP full-frame camera at 24 mm it allows 21 seconds, which smears a star across about 6 pixels, and on 45 MP about 8. The NPF rule accounts for the aperture and pixel size: exposure in seconds is 35 times the f-number plus 30 times the pixel pitch in micrometres, divided by the focal length. For the same 24 MP camera at 24 mm and f/2.8 that gives about 12 seconds, and on 45 MP about 10. It is more conservative, and it leaves trails of about 3 or 4 pixels.
| Scenario | Aperture | Exposure | Focus |
|---|---|---|---|
| Milky Way, no foreground | f/2.8 | NPF rule, about 10 to 20 s | Infinity on a bright star |
| Milky Way, foreground beyond the table's distance | f/2.8 to f/4 | Same | Infinity covers both |
| Milky Way, close foreground | f/2.8 sky, f/5.6 foreground | Short for sky, longer for foreground | Two frames, blended |
| Star trails | f/4 to f/5.6 | Many 30 s frames, stacked | Infinity |
| Moon | f/8 to f/11 | 1/125 s or faster | Live view on the surface |
For the distances to the stars and a worked calculation for the Moon, see the companion post on how far away the stars are.
Related reading: Hyperfocal Distance Explained, Night Photography: DOF at High ISO, Focus Stacking: When DOF Is Not Enough.