Tuesday, 30 January 2018

Raspberry Pi cameras for Lunar imaging

The raspberry Pi Zero camera module can be mounted in the Pi case. The lens is unscrewed and a Mogg adapter attached to the Pi case. This means that the Pi Zero is both computer and camera.



The Pi-computer-camera running Rasbian Linux was placed at the Newtonian focus of an f/5, 130mm Newtonian and a neutral density filter was attached to the adapter.



Python software was written to display and capture bmp images



Two overlapping sets of 50 bmp images were captured and then stacked, with flatfield correction in lxnstack. They were processed and combined into a 2 pane mosaic of the terminator.


In a separate experiment, a Raspberry Pi 3 running Ubuntu MATE Linux was used with a remounted camera module which was attached to the 130mm Newtonian and a neutral density filter was attached to the adapter.

Using the Python capture software, sets of 150 bmp images were captured of different regions of the Moon. The sets were aligned and stacked with flatfield correction using lxnstack.



Both Pi cameras suffer from Pixel vignetting and they have inbuilt chief ray angle correction. With the lenses intended for these cameras, the chief rays pass at right angles to the pixel in the middle of the sensor, but at more oblique angles and produce lower levels of illumination further away from the middle of the sensor. Moreover, there are chrominance as well as luminance effects at different places on the sensor. The inbuilt chief ray correction in the camera compensates for the expected pixel vignetting.  However, if the small lens is removed from the camera and  the sensor is placed at the focus of a telescope, there is no need for the inbuilt chief ray correction. But, the correction is still made.
The result of this inbuilt correction is that the centre of the image is dimmed slightly and the outer regions of the image are increased in brightness.
This problem is corrected by flatfield correction. Classical vignetting is corrected by flatfield correction. The auto-corrected pixel vignetting produces an effect opposite to classical vignetting as the two following images show.
Classical vignetting
The centre of a classically vignetted image is brighter than the edges of the image and this is what a flat field image would look like.

Flat field from an auto corrected pixel vignetted sensor of a Raspberry Pi camera
The centre of this flat field image is darker than the outer regions. This is opposite to classical vignetting.

Nevertheless, unsurprisingly, the flatfield can correct the telescopic images captured from the Pi cameras as shown by the following animation:
Alternating flatfield corrected and uncorrected images using the same data captured from the Raspberry Pi camera. Unsaturated images were captured in order to avoid the chrominance effects of the chief ray correction, making the camera effectively monochrome.



The problem of auto corrected pixel vignetting seems to be a problem of other webcams with very small, but high resolution sensors. Future experiments will involve using only luminance data and flatfields from these devices to see if they can be useful imagers.

Saturday, 6 January 2018

Histograms, AstroDMx Capture for Linux and The Orion Nebula

A ZWO ASI120MC camera was placed at the Newtonian focus of an f/5, Skywatcher Explorer 130 P-DS OTA Newtonian mounted on a Celestron AVX, EQ, GOTO mount. 100 x 15s exposures of the Orion nebula were captured with AstroDMx Capture Linux running on a Fedora laptop. 25 matching dark frames were also captured.

The imaging setup


The images were registered, stacked and dark frame corrected in lxnstack, a native Linux application. The final image was processed in the Gimp 2.9.
Nicola has now implemented histograms in the software, some of which can be seen in the live preview screenshots below.
Screenshot showing a linear, averaged RGB histogram


Screenshot showing a logarithmic, averaged RGB histogram


The histograms can also show computed luminance, R, G and B channels as well as the RGB channels together.
Final image of M42/43


Box-mounted Raspberry Pi camera module, a Skymax 127 and Tycho

A Waveshare 5Mp Raspberry Pi camera module with a OV5647 CMOS sensor was mounted in a project box and a connector was used to connect the short ribbon cable from the camera, to a 1m ribbon cable from the Raspberry Pi 3 running Ubunto MATE Linux.

Box-mounter PiCamera


The camera was placed at the prime focus of a Skymax 127 Maksutov mounted on an EQ mount.

Using Python 3 software that I have written to capture .bmp images, I captured 100 .bmp images at 1024 x 768 resolution, of the Tycho region of the Moon. The images were registered and stacked in the Linux application lxnstack. The resulting image was wavelet processed in Registax 6 running in Wine via Exagear, and post processed in the Gimp, all on the Raspberry Pi. The wavelet processing was the only part of the process that ran slowly.

The Tycho region



Friday, 29 December 2017

The Raspberry Pi camera module as a LunaCam

Lunar imaging with the Raspberry Pi 3 and the Pi Camera module.

The Pi camera module was fitted with a C/CS mount and a scope adapter, and was placed at the Newtonian focus of an f/5, Skywatcher Explorer 130 P-DS OTA Newtonian on a Star Discovery AZ, GOTO mount.

Using Python software that I have been writing for the past couple of weeks. I captured Flat frames against a grey sky and later, 100 bmp images at 800 x 600 resolution. (100 images were also captured at 1024 x 768). The images were registered, flatfield corrected and stacked in lnxstack. The resulting image was processed in the Gimp and Pinta, all native Linux programs, on the Raspberry Pi 3 running Ubuntu MATE.

A Waveshare 5Mp Raspberry Pi camera module with a OV5647 CMOS sensor was used because the lens assembly can be unscrewed and replaced by a C/CS mount, or the lens itself can be unscrewed and a standard webcam scope adapter attached. A 1m ribbon cable enabled the camera to be mounted on the scope.


Raspberry Pi camera module

C/CS mount attached to Pi Camera module board

Scope adapter attached to Pi Camera module


Pi Camera module at the Newtonian focus 

The imaging setup 

Semi-transparent mode for setting up captures


Fully opaque mode for setting camera brightness & contrast
Click on the image to get a closer view.

Final 800 x 600 image



Final 1024 x 768 image


The Pi camera module will be implemented in AstroDMx Capture for Linux. However, Nicola is currently sorting out an issue with the ZWO SDK with USB2 and long exposures before a new version is released implementing the QHY cameras. QHY is already implemented, but the release is delayed until the issue with the new ZWO SDK is resolved.
Meanwhile, my simple Python program is showing that the Picam module has potential as a prime focus Lunacam.

Friday, 1 December 2017

89% waxing Moon with AstroDMx Capture for Linux

Four overlapping panes of the Moon were captured as 2500 frame SER files at maximum resolution of 1280 x 960, using AstroDMx Capture for Linux, running in Debian, with an f/5, Skywatcher Explorer 130 P-DS OTA Newtonian and a QHY-5L-II-M camera, fitted with a 2" adapter and a 13% transmission neutral density filter, mounted on a Celestron AVX, EQ, GOTO mount. The best 40% of the frames in each SER file were stacked in Autostakkert! running in Wine. Each of the four resulting images was wavelet processed in Registax 5.1 running in Wine and the resulting images were stitched in Microsoft ICE also running in Wine. The final Mosaic image was processed in the Gimp 2.9.



Monday, 30 October 2017

Waxing Moon with AstroDMx Capture for Linux and a QHY 5L-II-M camera

The Skywatcher Star Discovery, 6", f/5 Newtonian is a very good OTA. 6" rings can be fitted with no fouling of the integral dovetail bar. The scope can then be used with an EQ mount.

In this image, the Star Discovery 6" Newtonian is attached to a Celestron AVX GOTO mount

A new version of AstroDMx Capture for Linux is tested here. Nicola is almost ready to release this version. There have been bug fixes, other efficiency changes under the hood, some slight GUI changes and the QHY 5L II cameras have been implemented.

The imaging setup

Six overlapping panels of the 68%, waxing Moon were imaged with a 6 inch Star Discovery Newtonian OTA mounted in rings and mounted on a Celestron AVx GOTO, EQ mount and a QHY 5L-II-M camera. AstroDMx Capture for Linux was used to capture 2000 frame SER files for each panel. The best 50% of the frames in each of the SER files were registered and stacked in Autostakkert!2.6.8 running in Wine. The six resulting images were stitched in Microsoft ICE running in Wine. The resulting image was wavelet processed in Registax 5.1 also running in Wine. The final image was post processed in the Gimp 2.9.

Screenshot of AstroDMx Capture for Linux running on Linux Mint

68%, waxing, gibbous Moon



UBUNTU 17.10

The following test was done with Ubuntu 17.10, the latest version of Ubuntu, without the now defunct Unity desktop, and with a slightly non-standard Gnome 3 made to look like Unity. AstroDMx Capture worked with this desktop without the very basic rendering of Unity.

Eleven overlapping panels of the 48%, waxing Moon were imaged with a Skymax 127 Maksutov mounted on a Celestron AVx GOTO mount and a QHY 5L-II-M camera. AstroDMx Capture for Linux was used to capture 2000 frame SER files for each panel. The best 50% of the frames in each of the SER files were registered and stacked in Autostakkert!3 running in Wine. The resulting images were wavelet processed in Registax 5.1 also running in Wine. The 11 resulting images were stitched in Microsoft ICE running in Wine. The images were combined and post processed in the Gimp 2.9.

The imaging setup

Screenshot of AstroDMx Capture for Linux running on Ubuntu 17.10

One panel of the eleven captured



Final image of the 48% waxing Moon



The final tests are being done and then another significant set of cameras, the QHY 5L-II will be available with AstroDMx Capture for Linux

Saturday, 14 October 2017

Update on DFK .AS camera problems with USB 3

It has been known for some time that DFK astronomy cameras have a problem with USB 3. Specifically in YUYV format the camera streams video but the controls for exposure, gain etc do not work, where they work fine in USB 2. This is a problem with Windows and Linux. On Nicola's website http://www.linux-astro-imaging.uk/  where AstroDMx Capture for Linux can be downloaded, she gives a hack that routes the data from the USB ports through the EHCI controller, instead of the xHCI controller. On newer laptops that often have USB 3 and USB 2 ports, the USB 2 ports are often also routed through the xHCI controller, which means that the DFK also doesn't work correctly with the USB 3 or the USB 2 ports on these machines.


Nicola's hack will also work on these laptops, causing both USB 3 (which knows that the DFK is a USB 2 device) and the USB 2 ports to work correctly with the DFK. However, on the latest laptops, which only have xHCI controllers, the hack doesn't work.
However, none of this matters, because even without the hack, the Bayer mode works correctly and either Bayer or RGB SER or AVI files can be saved. The simplest solution is to select the Bayer mode when connecting the DFK camera to AstroDMx Capture for Linux.

Tuesday, 3 October 2017

90%, Waxing, gibbous Moon in 16 bits, with AstroDMx Capture for Linux

90%, waxing, gibbous Moon tonight. Captured as 2 overlapping 16bit SER movie files, using AstroDMx Capture for Linux, an f/5.5 ED refractor mounted on an iOptron Cube Pro, AZ GOTO mount and a QHY 5L-II-M camera. The SER files were stacked in Autostakkert! 2.6, stitched in Microsoft ICE and wavelet processed in Registax 5.1, all running in Wine. The final image was processed in the Gimp 2.9 and Pinta. It should be noted that the QHY camera has a 12 bit ADC not a 16 bit ADC. This means that images are captured with 4,096 levels of brightness (not 65,534 levels as with a 16 bit ADC) The 12 bit data are however, placed in a 16 bit container at capture time. Nevertheless, 4,096 levels are an improvement on 256 levels of 8 bits. 12-16 bits will be more valuable for deep sky images with wide dynamic range objects.


Full size


Tuesday, 26 September 2017

Implementation of the QHY 5L-II-M and QHY 5L-II-C cameras in AstroDMx Capture for Linux.

Nicola is now working on the implementation of the QHY 5L-II-M and QHY 5L-II-C cameras in AstroDMx Capture for Linux. The QHY 5L-II-C camera has been kindly loaned by Derek Francis (Swansea Astronomical Society).
Test rig with both cameras fitted with lenses


8 bit capture is implemented and 16 bit (12 bit in 16 bit containers) implementation is almost complete.

The monochrome QHY 5L-II-M camera was used in 8 bit mode to capture TIFF files of 20s exposures of M27, using an 5/5.5, 80mm, ED refractor, mounted on an AVX GOTO EQ mount. 30 images were stacked in Deep Sky Stacker running in Wine on a Linux Mint computer. The resulting image was post processed in the Gimp 2.9.


Full size

Screenshot of AstroDMx Capture for Linux


Screenshot of The data stacked in Deep Sky Stacker running in Wine

The 29%, waxing, crescent Moon was imaged with the same equipment capturing two overlapping, 1000 frame SER files.

The best 400 frames of the SER files were stacked using Autostakkert! 2.6 running in Wine, stitched using Microsoft ICE running in Wine and wavelet processed in Registax 5.1 also running in Wine. The final image was post processed in the Gimp 2.9.

Full size

A Skymax 127 Maksutov, mounted on the AVX mount was used to image Saturn using the QHY 5L-II-C camera and AstroDMx Capture for Linux.
Saturn was very low in the sky and almost setting over the mountain, producing poor seeing. A 2000 frame SER file was captured and the best 40% of the frames were stacked in Autostakkert with RGB alignment, running in Wine. The resulting image was wavelet processed in Registax 5.1 also running in Wine, and post processed in the Gimp 2.9 on a Linux Mint laptop.


Screenshot of AstroDMx Capture for Linux

When 16 bit capture has been implemented, another release will be imminent.
However, Nicola has also been working on the implementation of Atik cameras and has already extracted images from the Atik 314L camera. She has not yet decided whether to release the next version of AstroDMx Capture for Linux when the QHY camera implementation is complete, or whether to wait a little longer until the Atik cameras are implemented.
Watch this space!

Tuesday, 12 September 2017

AstroDMx Capture for Linux released

Nicola Mackin has now released AstroDMx Capture for Linux.
She has been working on the coding for more than a year and has a very stable release that works with a range of Cameras.

The software can be downloaded at www.linux-astro-imaging.uk

Splash screen of AstroDMx Capture for Linux

List of cameras implemented for AstroDMx Capture for Linux
USB Astronomy Cameras
DMK 21AU04.AS (8 bit ADC)
DFK 21AU04.AS (8 bit ADC)
DBK 21AU04.AS (8 bit ADC)
ZWO ASI120MC (USB2.0, 12 bit ADC)
ZWO ASI120MC-S (USB3.0, 12 bit ADC)
ZWO ASI120MM-S (USB3.0, 12 bit ADC)
Bresser MicrOcular Full HD Digital Camera (8 bit ADC)
USB cameras
ELP 1.3Mp CMOS board-level HD USB camera (8 bit ADC)
Lucky Zoom 5Mp microscope USB CMOS camera (8 bit ADC)
Vimicro USB2.0 UVC PC camera (e.g. Maplin USB2.0 Microscope) (8 bit ADC)
USB Capture cards
KWORLD DVD MAKER 2 (8 bit ADC)
UVC capture card (Motion-JPEG only) (8 bit ADC)
EasyCAP (Motion-JPEG only) (8 bit ADC)
USB webcams
Sweex WC066 HD webcam (8 bit ADC)
Sweex WC070 ViewPlus (8 bit ADC)
Philips SPC900NC including SPC800 and Philips 740 flashed to SPC900NC (8 bit ADC)
Philips 740 ToUCam Pro (mono feed only) map YUYV to greyscale for true mono. (8 bit ADC)
Philips 690 Vesta Pro Webcam (8 bit ADC)
Logitech HD C525 (8 bit ADC)
Microsoft LIFECAM 2 (8 bit ADC)
Creative Webcam Live (8 bit ADC) Bayer output only.
All Video 4 Linux cameras.
Ongoing and planned future camera implementation
QHY 5-II series of astronomy cameras (ongoing)
Atik cameras (Planned)

List of Linux Operating systems and desktop environments tested to date with 
AstroDMx Capture for Linux
Linux Mint 18.2 Cinnamon
Linux Mint 18.2 Mate
Linux Mint 18.2 xfce
Debian 9 Cinnamon
Debian 9 LXDE
Debian 9 xfce
Debian 9 GNOME
Kubuntu 16.04 LTS
Kubuntu 17.04
Xubuntu 17.04
Lubuntu 17.04
Ubuntu Gnome 3 or classic
Fedora 24, 25, 26 with Gnome 3
Fedora 26 with Cinnamon
Peppermint OS
Ubuntu 16.04 with Unity (with the additional download package)
Ubuntu 17.04 with Unity (with the additional download package)
Ubuntu 17.04 with Budgie
POP!_OS
Antergos Linux
PC Linux Mate
Mageia Linux
Elementary OS. Runs from the command line only at the moment