A high quality pan-tilt-zoom camera on the roof of the observatory at an altitude of 13,630ft? Just too much fun. I have found myself logging into the camera at sunset to enjoy the view, or keeping the video in the corner of my screen through a Hawaiian blizzard. I have even forwarded images to a local television station when they requested views of a white Christmas in Hawaiʻi. Yes, they used them for the evening news!
To make the best of this wonderful toy I need some tools. To that end several Python programs have been written, including a camera scheduler. This program takes a text file with a schedule and captures images at the programmed time and date. All of this was easy to implement in Python, all of the necessary ‘net protocol support is available in the libraries.
The schedule file can contain any number of separate schedules for multiple sequences. At the specified time the program insures the camera is set properly, moves the camera to the correct position and captures the image. Each sequence is saved to a unique directory and given a sequential name suitable for compiling time lapse video. Add a simple GUI to allow images and status to be monitored and the program becomes a very useful tool.
There are now multiple sequences running… Photos of the summit ridge at each sunset, the shadow of the GPS antenna every day at noon, the Kohala mountain every day mid-morning, the TMT construction site several times a day, and more.
The shadow cast by any large mountain is a beautiful symmetrical cone, a sublime sight from the summit of Mauna Kea. Watching dawn or sunset I often find myself wandering away from the tourists watching the Sun, walking to the other side of the summit where you can see the shadow. Interestingly the shape is a result of perspective, and does not relay on the actual shape of the summit casting the shadow. Even if the mountain were flat-topped, the shadow will be a symmetrical cone.
If you take a photo too early you do not see the shadow. The Sun needs to rise a bit to allow sunlight to illuminate the haze west of the summit. You do get a very nice image of the Earth’s shadow setting and the Belt of Venus. The photo posted at the left is what you get before the shadow appears.
Perhaps a 15 minute delay? Adjust the schedule and wait for another dawn… Adding fifteen minutes to the calculated sunrise time results in a good shadow image. Perhaps not the best possible shadow image, the tip of the shadow could be a little higher and just above the horizon.
For the next trial I set the camera to take photos at one minute intervals after the moment of calculated sunrise, covering a fifty minute period. (why did I not do that the first time?). The result is compiled as a video.
The Python code and a sample scheduler files is included here in a zip archive. The code is written for Python 3.4 and requires installation of Pillow package to handle the images. Pillow is needed only to display the images, the program could be modified to remove that function. The code is a bit naive, better checking could be done for network errors or bad syntax in the schedule file… The code is provided as-is, use at your own risk.
Below is a snippet from the schedule file. A simple syntax sets up a sequence of images. Any number of sequences can be defined and processed, there are currently more than a dozen in the file I am using. Each set of sequence imagery is stored in a separate directory with a unique filename. There is support for more than one camera specified by IP address. This file is read in when the start button is pressed and checked against the time a couple times each minute.
#--------------------------------------------------------------------
# Kohala Weather
#
# - Acquire an image of Kohala every day mid-morning
#
# Added 29Dec2014 A. Cooper
#
start Kohala 192.168.75.10 H:\Images\Kohala\ Kohala
img everyday 0730 Kohala
end#--------------------------------------------------------------------
# Mauna Kea Shadow
#
# - Acquire an image of the mountain shadow every morning through 2015
# - Use sunrise times calculated by the USNO Data Center for 2014
# - Add 15 minutes to allow Sun to rise from horizon plane
#
# Added 29Dec2014 A. Cooper
#
start MaunaKeaShadow 192.168.75.10 H:\Images\MaunaKeaShadow\ MaunaKeaShadow
img 20150101 0712 Sunset
img 20150102 0712 Sunset
img 20150103 0712 Sunset
img 20150104 0713 Sunset
...
img 20151228 0710 Sunset
img 20151229 0711 Sunset
img 20151230 0711 Sunset
img 20151231 0711 Sunset
end
One worry is that the PTZ mechanism will not register each image well. That each day the camera will be panned to a slightly different place. This can create jittery video when the daily sequences are assembled as time lapse. And indeed, over time there has been shift in the images. There will need to be a bit of post processing needed to align the images allowing the creation of jitter free video.
I do not expect most of these time lapse sequences to produce anything interesting. Some will, I just need to wait and see what I get over the coming months and years. I can add new sequences as new ideas occur to me.
Now… What will a year of mountain shadows look like when assembled as a video?