Control script for Alcor OMEA all-sky camera. This code wraps up fswebcam and embraces many of its nice features for adjustment and image archiving.
alcor.py runs like a daemon, adjusting the camera settings depending on the Sun's current altitude. This enables relatively seemless day and night time imaging of the sky above NGTS.
The configuration files should be adjusted depending on the camera and installtion location etc. See Installation section below.
usage: alcor.py [-h] [--debug] [--v]
Alcor all-sky camera control script. Camera control is done using fswebcam.
Edit camera's day/night settings using the fswebcam .conf files in the Git
repo.
optional arguments:
-h, --help show this help message and exit
--sunalt SUNALT Sun altitude limit for day/night transition
--debug Run in deugging mode
--v Increased verbosity
To start the script simply run:
python alcor.py [--sunalt SUNALT, --v]
This will run an infinite loop taking images and adjusting the camera based on the settings in the configuration files and the Sun altitude limit for the day/night transition. If no --sunalt is given alcor.py defaults to -5 degrees.
We need real time images of the sky above NGTS. The best solution is an all-sky camera.
Depends on the following:
libgd2-noxpm-dev
fswebcam
ttf-dejavu (optional, different fonts can be used, see .conf files)
astropy
Install the dependencies above, clone this repo and edit the observatory setup section at the beginning of the alcor.py script:
# edit here
image_dir="/home/ops/allskycam"
# observatory set up
olat=-24.-(37./60.)-(38./3600.)
olon=-70.-(24./60.)-(15./3600.)
elev=2418.
obsloc=EarthLocation(lat=olat*u.deg,lon=olon*u.deg,height=elev*u.m)
Adjust the configuration parameters in the day and night .conf files, e.g:
# Paranal_day.conf - James McCormac 20160110
# Be very quiet...
quiet
# Or be very loud?
#verbose
# The image source -
device "/dev/video0"
input 0
palette GREY
resolution 1600x1200
loop 30
skip 5
set "exposure (absolute)"="1000"
timeout 5
frames 100
# design the banner
top-banner
font "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf"
title "NGTS All Sky Camera"
subtitle "PAO subtitle"
info "PAO info"
banner-colour #FF000000
line-colour #FF000000
text-colour #FF000000
gmt
# Save it to a shared folder.
save "/home/ops/allskycam/allsky.jpeg"
# Save another copy for the archive. The archive contains a folder for each
# day of images. First we create the folder if it doesn't already exist.
exec "mkdir /home/ops/allskycam/%Y%m%d 2> /dev/null"
# Then save the image into it.
save "/home/ops/allskycam/%Y%m%d/allsky-%Y%m%d-%H%M%S.jpeg"
Additional .conf files maybe included (e.g. for twilight). This would require a slight modification of alcor.py to add an additional check on the Sun altitude. I will investigate this further when our OMEA camera goes on sky in February.
A full description of all the fswebcam parameters is given in the fswebcam help file. Voila, you are ready to take some images
N/A
Update - add example images and output shots from terminal
James McCormac
Update