Wednesday 7 July 2021

Russian Tux: Astronomical imaging with a Chromebook and AstroDMx Capture for Chrome OS Linux.

Russian Tux:

Chromebooks have never been really suitable for astronomical imaging. The reason is that Chrome OS, the operating system of Chromebooks, whilst being, under the hood, a Linux distribution, is so locked down that normal Linux desktop applications can’t be installed and run in it. There are, however, a couple of ways that proper astronomical imaging can be done with a Chromebook, and we shall take a look at them. There are at least two systems that can be deployed in Chrome OS that will allow astronomical imaging to be done. By astronomical imaging, I mean the capture of images, the registration, calibration and stacking of images, post-processing of stacked images and the stitching together of images if required, to make a mosaic. System 1, Crostini The first system is being developed by Google and has been in the development channels for a few years. However, with the advent of build 91 of Chrome OS, it has been moved to the stable channel, that is, the channel that is run by normal users when they turn on their Chromebook. This system is a container, in which runs in a virtual machine, into which a Linux distribution is installed. Then, normal Linux desktop applications can be run in the Linux container. This whole setup is called Crostini. The default Linux distribution that gets installed into the virtual machine is currently Debian. It is very easy to install Linux into a build 91 or above Chrome OS Chromebook, and Google Help provides detailed instructions for doing it. Using Linux in the Crostini virtual machine in a Chromebook is one way of doing some astronomical imaging using AstroDMx Capture for Chrome OS Linux. It may be surprising that this is possible, because at the time of writing, cameras are not supported in the USB implementation of the Crostini virtual machine. If you navigate to Settings, Advanced, Developers, Linux development environment (Beta), Learn more; you will be taken to the Chromebook Help Center. (This page gives instructions on setting up Linux on your Chromebook and other related topics. This is where you will find detailed instructions for setting up Linux on your Chromebook). The headings on this Help page are: * Setup Linux on your Chromebook * Turn on Linux * Turn off Linux * Access your microphone on Linux * Security & permissions * Backup & restore * Fix problems with Linux * Check what’s not supported yet The very first item in ‘Check what’s not supported’, states, “Cameras aren’t yet supported”. This is likely because the cameras that are not supported are UVC (USB Video Class) cameras, devices like webcams. Most astronomy cameras are not UVC devices and they are just recognised as USB devices. However, to date, the only astronomy cameras that we have found to work correctly in Linux on a Chromebook are the SVBONY SV305 USB 2.0 (Colour camera), SV305 Pro USB 3.0 (Colour camera) and the SV305M Pro, USB 3.0 (Monochrome camera). This may change in the future, but for the moment, we are restricted to these few, but fortunately good, astronomy cameras. It should be noted that the SV105 and SV205 cameras will NOT work with this system because they are UVC cameras! When you have Linux installed and you plug in a USB device, a window pops up in the bottom right hand corner of the screen, and you have the opportunity to connect the device to Linux. When you click on Connect to Linux, the device, (if it is an SV305 series camera) then becomes available to AstroDMx Capture for Chrome OS Linux.
Screenshot showing the Connect to Linux dialogue at the bottom right of the screen

Closeup of the Connect to Linux dialogue showing the SVBONY SV305 ready to connect to Linux.

Similarly, the SV305 Pro and the SV305M Pro can be connected to Linux and they both report themselves as SV305PRO

Nicola has prepared a special version of AstroDMx Capture for Linux that will run in the Crostini virtual machine in Chrome OS and she has given it a dark theme. This is AstroDMx Capture for Chrome OS Linux.
At the start of this article I wrote: “By astronomical imaging, I mean the capture of images, the registration, calibration and stacking of images, post-processing of stacked images and the stitching together of images if required, to make a mosaic”. 

It was a simple matter to install the other Linux applications to enable all of these jobs to be done. The applications are Hugin panorama creator, The Gimp image processor, SER Player for playing and processing SER files, Siril for registering, calibrating and stacking images, and of course AstroDMx Capture for Chrome OS Linux for capturing images. We may explain in a future article, how to install these Linux applications into your Chromebook.

Screenshot showing all of the Linux applications neatly organised into a group.

For testing purposes, an SVBONY SV305 was placed at the focus of an 80mm, f/5.5, ED refractor which was pointed across the valley at an area of vegetation.
Screenshot of AstroDMx Capture for Chrome OS Linux streaming video of Foxgloves growing across the valley.
The streaming and capturing are fine and on the Chromebook we were using (A Lenovo Chromebook S345-14 with an AMD A6 CPU, 4GB RAM and 64GB SSD), the sliders and scrollbars all work but are rather sluggish. We find that it is best to type in exposures and gain rather than pulling the sliders. However, notwithstanding these caveats, the camera, software and OS all behaved well. This is the burden of using a virtualisation system with all of its performance overheads, that I think is far from the best way of running Linux desktop applications on a Chromebook. It feels irrational to have a Linux operating system, Chrome OS, into which you install a virtual machine, into which you install another Linux operating system. Google has created a Russian doll out of Linux! This might be fine (although it is still a strange idea) if we were dealing with a powerful computer with high specs. However, the fact is that many if not most Chromebooks, have fairly low specifications, so the performance penalties of using virtualisation will readily manifest themselves. Google may well justify this approach on security grounds, but Linux systems are anyway the most secure operating systems. I think that it may have been done this way because adding the capability to run Linux desktop applications to Chrome OS is a ‘bolt on’ that was added as a second thought, and was adopted before other possibilities were considered thoroughly. When the weather permits, we shall test this system further, with Solar system imaging as well as deep sky imaging, and post the results in a future blog. System 2, Crouton There is another much more sensible way of achieving the goal of running desktop Linux applications in a Chromebook that does not involve virtualisation and the performance penalties associated with it, as it runs natively within the operating system. This method uses a system called Crouton which was developed by a Google hardware engineer, David Schneider, and is maintained by him on GitHub. It involves the Chromebook being in Developer mode which is slightly less secure than the standard Chrome OS stable channel; but don’t forget that this is all Linux. Suffice it to say for the moment, that the writer believes that Google would have done better developing the Crouton system for the stable channel, than pursuing the virtualisation of Crostini. The Crouton method will be discussed in a future blog.
Release
Nicola will release the special version of AstroDMx Capture for Chrome OS Linux, available for download before the end of the week. I shall update this message once the release has been made.