aurora.cam

programmatic photography

"Programmatic photography" is the use of deployed software to automatically control a camera. It enables consistent unmanned photography, effectively transitioning from day to night, where extreme changes in light can be monitored and photographs optimized. The software adjusts the camera's settings, sends commands to take photographs and stream the photographs off the device. While timelapse photography simply uses intervals to take photographs, programmatic photography uses specific software functionality to ensure optimal clarity and light sensitivity from one photograph to the next.

The programmatic photography components used in our Aurora detection system is comprised of a Sony Alpha camera and a Raspberry Pi. Since the Raspberry Pi runs Debian linux, it comes standard with Python 2. The script responsible for the programmatic photograph is written in Python and deployed to the Raspberry Pi device. Read more about the equipment.

The diagram below shows two camera box deployments each including a Sony mirrorless camera, low light lens, and the Raspberry Pi with the programmatic photography software. Each camera box and its Raspberry Pi operate independently and only connect to a local Wifi network to stream photographs from the camera to the cloud. This diagram shows one deployment positioned to capture the aurora in the Northwest and the other positioned to capture the aurora in the Northeast.

Python script

The Python script on the Raspberry Pi is in charge of connecting to the camera, taking a photography with optimal shutter speed and iSO, and then transferring the photograph from the camera to the Raspberry Pi. Since the cameras takes photographs around the clock, the Python script is required to optimize the camera's settings for two very different light conditions - day and night - all automatically.

The script is programmed to capture photographs at specified intervals. The photograph interval is every 60 seconds. By default, the script tries to first take a photograph at 200 ISO. If the photograph is too dark, the script increases the shutter speed to reach a clear photograph at 200 ISO. If the shutter speed has to be increased greater than 20 seconds while ISO is at 200, then the ISO is increased to an appropriate value. Since Sony Alpha mirrorless cameras have max shutter speeds of 20 seconds, if a shutter speed length above 20 seconds is required, then the script sets the camera to use Auto ISO. (Note that the max shutter speed for the Sony A6300 camera is actually 30 seconds, but any longer than 20 seconds will cause star trailing.)

The Python script uses Sony's Camera Remote API beta. The sad news is that Sony will not longer be providing updates and active support for the Camera Remote API. Sony Alpha Remote Camera API. Thus, this programmatic photography script will only work with Sony A7, Sony A7 II, Sony A6300 and Sony A6000 mirrorless cameras.

The Raspberry PI is connected to a local Wifi network. The script deployed on the Raspberry Pi uses the device's internet connection to upload each photograph after it's captured to AWS S3 for cloud storage and web accessibility. These programmatic photographs are made available in real-time on the Webcams page.