Sunday 29 September 2024

AllSky: new box, dark frames & other tweaks

When conditions allow, I've been having fun with Allsky.

What started because of a meteor shower, has become a wider interest in things in the night sky.

And I've been tidying & tweaking my system.

For me, my Allsky systems remains a 'fair weather' camera system which I only deploy on clear-sky nights where there is no rain forecast. While most users seem to want a 365 day system with a 180 degree sky image mounted on their roof, my needs are more modest.

I don't have a full clear view of the night sky, so using a RaspberryPi module 3 camera with a 'wide' lens is OK. This lens has a 67 degree vertical field of view (FOV) and does a pretty good job with the amount of sky visible from our garden.

new enclosure

I recently bought a cheap black ABS box and have just transferred the bits across from the previous system.

As you can see, the box includes a simply inclinometer/protractor scale and the tripod head has a 'bubble' level. But this is not a precision instrument. The camera module is rather crudely mounted on just 2 screws with spacers, so I'm sure the module is not perfectly square and parallel to the box. However, these devices are still useful in providing some degree of repeatability when aligning the system.

I've fixed a small piece of hardboard to a 1" Terry clip to hold the battery in place, with connectors facing downwards in case of unexpected rain.

 


This is still work-in-progress. As my existing 10A PowerBank no longer lasts right through the night (...winters coming...the nights are getting longer) I've ordered a 20A unit. When this arrives I'll try to develop the battery holder, replace the elastic bands, and may put the PowerBank in a plastic bag or something to ensure it keeps dry.

Although the camera enclosure is not water-proof, it should protect the system from a light, unexpected shower.

orientation

I was finding it difficult to correlate the stars in my Allsky images with the constellations. As my-piece-of-the-sky is quite limited, nothing seemed to match any of the sky-maps I found on-line. So I bought "Stargazing For Beginners" by Will Gater & Anton Vamplew.

This book is full of good info, but the single most important suggestion from the book was to install the free program: Stellarium

It took me a while to get into it (...and I'm still finding my way) but having set this program up for my location, I realised that my view of the sky was inverted; left to right (east to west).

I flipped my image and everything came good. So now my camera points due north with an altitude (i.e. 'degrees up') of approx 70 degrees. This puts the northern horizon at the bottom of the image/screen with the westerly direction on the left side of the screen, as indicated on my overlay.


When you tell people on the Allsky Discussion forum that you have done this, some shout at you!

They say you should imagine you are laying on your back with your head pointing north, so west is on your right side. (I say "if you bend over and look at the night sky through the gap between your legs, you can see Uranus!")

So now, right or wrong, the view I see on my screen now matches what I see on Stellarium and what I see if I stand in the garden looking north. By adjusting the vertical FOV and altitude on Stellarium, I can easily identify the stars in my image and also any visible satellites that cross my path (e.g. ISS, Dragon Crew).

I may do a post in the future to discuss Stellarium because its just a great, useful program.

auto focus

The Pi module 3 camera has auto-focus. But the last thing you want it to do is waste time trying to auto focus while photographing the night sky. The Allsky settings page allows you to set Extra Arguments, so add:-

--autofocus-mode manual --lens-position 0.0

auto gain & exposure

For night time images, I can't see any point in allowing the gain/exposure to auto adjust. I want the image 'brightness' to reflect what is happening in the night sky.

At the moment I've set a fixed Exposure of 30 seconds and a Delay of 1 second, so a photo is taken every 31 seconds.

My Gain is set to 4, but I'm currently experimenting with this since turning on Stretch. I think the Gain may need to be increased because I see some 'blotchy-ness' in the dark background.

Stretch

In the Editor for Allsky config.sh there is a feature called Stretch which I've now turned on with the default settings:-

# Auto stretch images saved at night.  The numbers below are good defaults.
AUTO_STRETCH="true"
AUTO_STRETCH_AMOUNT=10
AUTO_STRETCH_MID_POINT="10%"

This does some image manipulation magic and helps display more stars. It also makes the overall image brighter, which is why I initially turned down the Gain setting.

broken startrails

In my earlier post I mentioned broken startrails, where some star trails had gaps in them. This was due to images being deleted by the system because they were considered too dark. So I've simply lowered the limit in config.sh:-

# Remove corrupt or too dim/bright images.
REMOVE_BAD_IMAGES="true"
REMOVE_BAD_IMAGES_THRESHOLD_LOW=0.1
REMOVE_BAD_IMAGES_THRESHOLD_HIGH=90

dark frames

As mentioned in this post from 2020, camera pixels can be problematic. Some noise problems can be reduced by subtracting dark images from the current image to remove 'hot & stuck pixels'. This capability is included in Allky for some camera models but currently, not the Pi module 3. (note: will probably be fixed in the next release, due out soon).

My solution to implement this now:-

1. Add an additional statement to Extra Arguments so it looks like this:-

--autofocus-mode manual --lens-position 0.0  --metadata /home/steve/allsky/config/overlay/extra/libcamera.json

2. Modify the script darkCapture.sh

This is the mod:-

DARKS_DIR="${ALLSKY_DARKS}"
mkdir -p "${DARKS_DIR}"
if [[ -z ${AS_TEMPERATURE_C} ]]; then
    # The camera doesn't support temperature so we'll keep overwriting the file until
    # AS_TEMPERATURE_C is set.
    # This allows users to continually look for a new dark file and rename it manually.
    MOVE_TO_FILE="${DARKS_DIR}/$(basename "${CURRENT_IMAGE}")"
  
 #+++SteveDee mod+++++++++++++++++++++++++
    CameraFile=$HOME
    CameraFile+="/allsky/config/overlay/extra/libcamera.json"
    DarkFile=$HOME
    DarkFile+="/allsky/darks/dark.jpg"
    TemperatureFile=$HOME
    TemperatureFile+="/allsky/darks/"
    sTemp="SensorTemperature"
    if [ -e "$CameraFile" ]; then
        cat $CameraFile | while read key value; do
            if [[ "$key" == *"$sTemp"* ]]; then
                newfile=${value%.*}.jpg
                if [ -e "$DarkFile" ]; then
                    TemperatureFile+=$newfile
                    mv ${DarkFile} $TemperatureFile
                    #echo ">>> Dark file created: ${TemperatureFile}"
                fi
            fi
        done
    fi
    #---Mod End -----------------------------
else
    MOVE_TO_FILE="${DARKS_DIR}/${AS_TEMPERATURE_C}.${DARK_EXTENSION}"
fi

3. Modify saveImage.sh

The new lines of code are inserted just before AS_TEMPERATURE_C is tested (around about line number 124 in saveImage.sh):-

CameraFile=$HOME
CameraFile+="/allsky/config/overlay/extra/libcamera.json"
sTemp="SensorTemperature"
if [ -e "$CameraFile" ]; then
    cat $CameraFile | while read key value; do
        if [[ "$key" == "$sTemp" ]]; then
            echo ${value%.*} > "${ALLSKY_TMP}/temperature.txt"
        fi
    done
fi


You will then be able to turn on "Take Dark Frames", cover the lens, and take a series of dark images, each of which will be named with the current camera temperature (e.g. 20.jpg, 21.jpg, 22.jpg & so on).

Once complete, turn off "Take Dark Frames" and turn on "Use Dark Frames". These will then be selected by the system when taking nighttime images, based upon the reported camera temperature.

See also: https://github.com/AllskyTeam/allsky/discussions/3802


keograms

I'd never heard of keograms, but they provide a useful reference, not only of conditions, but also how the sky is being rendered by the system.

With the camera orientated north/south, the keogram is constructed from the central vertical column of pixels from each image.

You can see the sunset twilight on the left and the beginning of sunrise on the right.

This next one is interesting because I appear to have got the pole star nicely aligned to the centre of the camera image...

...and the white central area shows how the sky was affected by cloud illuminated by the full moon for a couple of hours.

more stuff

This star trail image shows our first to capture the International Space Station (ISS). Its the line broken into 4 sections that runs from the top of the image to the right side.

The line is broken because the ISS took about 2 minutes to cross [our view] of the sky. So each section of the line represents 30 seconds and each break is 1 second.

Another ISS pass...


 And the SpaceX Dragon Crew 8...



 

See also:-

Stellarium

Spot the Station (...then click on a blue pin near you)

SpaceX Follow Dragon

Find Starlink

Dark Sky Map (England)

RaspberryPi Camera Documentation



No comments:

Post a Comment