Tuesday, October 6, 2015

Direct FITS overlay on the sky map

In upcoming KStars 2.4.0, due to be released in KDE Application 15.12, astrophotographers will enjoy a new feature that would help them further in framing and visualizing their images: Direct FITS overlay!

Before you use Ekos Align module, make sure to enable both World-Coordinate-System (WCS) and Overlay checkboxes. WCS appends parameters to the captured FITS image to include information on the celestial coordinates, rotation, and scale..etc. Once you perform your first successful alignment, and subsequent images will be scaled and drawn directly on the sky map.

Sunday, September 20, 2015

FITSViewer Histogram gets a face lift

The FITS histogram tool is one of the few tools in KStars that did not receive any significant updates for more than 10+ years. I first wrote it back in 2004 and used a custom painting widget to show the overall shape of the histogram. But with KStars gaining color FITS support a while back, it was necessary to support multi-channel histogram within the viewer.

While the FITSViewer tool, as the name suggests, is not designed for processing of astrophotography images; features such as the histogram and statistics tools are often important for decision-making during the capture process and for quickly inspecting images, and hence they were made available to the end user. The histogram implementation was also quite buggy as it was designed for 8-bit FITS, but now KStars support 8, 16, 32-bit signed integer, 32-bit IEEE floating point, and 64-bit IEEE double precision floating point. The updated implementation now caters to all data types and is smarter about selection of bin widths for each image.

In addition to supporting multi-channel histograms, the GUI was revamped and is now utilizing the amazing QCustomPlot library. At first, I wanted to utilize the KPlotting KDE library, which was authored by our very own Jason Harris, KStars founder back in 2001! But QCustomPlot offers several advantages over KPlotting including user interaction capabilities such as zoom and drag in addition to a host of other features. Furthermore, QCustomPlot is being actively developed while KPlotting hasn't received any noticeable updates in a very long time.

The following is a screenshot of the older histogram implementation:

And this the updated implementation, to be available for KDE Applications 15.12:

Tuesday, June 30, 2015

KStars GSoC 2015 Project

This year marks my first year as a Google Summer of Code (GSoC) mentor, and it has been an exciting experience thus far. I have been a KStars developer for the last 12 years and it is amazing what KStars has accomplished in all those years.

Since KStars caters to both casual and experienced astronomy enthusiasts, the KStars's 2015 GSoC projects reflects this direction. For the casual educational fun side, I proposed the inclusion of constellation art work to be superimposed on the sky map. KStars currently draws constellation lines, names, and boundaries, but constellation art is missing. We required that the data structure must support multiple sky cultures (e.g. western, Chinese..etc) and the artwork itself must be available under a permissible license. New constellation artwork should be available for download using the KNewStuff framework. 

Here is a very early look at the constellation art in KStars. The student still needs to work on scaling, rotation, among other things, but it looks promising! But the end of the project, all 88 western constellations can be viewed within KStars in addition to another cultural group.

For the more advanced users who utilize KStars to perform astrophotography, I proposed a simple Ekos Scheduler tool.

Ekos is an advanced astrophotography tool for Linux. It utilizes INDI for device control. With Ekos, the user can use the telescope, CCD, and other equipment to perform Astrophotography tasks. However, the user has to be present to configure the options and to command the actions to perform all the astrophotography related tasks, and hence a scheduler is required to automate observations to be constrained within certain limitations such as required minimum angular separation from the moon, whether conditions...etc. Furthermore, the observations should be triggered when certain conditions are met such as observation time, object's altitude...etc.

The Ekos scheduler is still at very early stages but the workhorse algorithm responsible for dispatching observations jobs is in the works and should be completed soon. Even though the scheduler is currently an Ekos module, it operates by utilizing Ekos DBus interface completely. 

Fortunately for KStars, both projects were accepted in GSoC 2015 and I am glad to be working with two very talented and highly motivated students:
The students have made good progress on the objectives of the project and been great when it comes to communications. Being introduced to a new framework and a new paradigm of thinking is a shock to new comers who need time to adjust and get the wheel rolling.

I certainly hope the projects stay on track and get completed on time!

Wednesday, February 18, 2015

Automatic Meridian Flip in Ekos

Over the past couple of weeks, I worked on a new feature in Ekos: Automatic Meridian Flip.

Equatorial mounts flip after crossing the meridian in order to prevent the imaging equipment train from hitting the tripod. With Ekos, you can set an hour angle limit which if exceeded, the mount will be commnded to flip. The mount must begin tracking east of the meridian in order to the meridian flip to be commanded in Ekos.

When commanding a meridian flip, Ekos will suspend the autoguiding process and waits until the mount completes the flip. Once the mount begins tracking again post meridian flip, Ekos will plate-solve and make any necessary slew commands to bring the mount to the exact location it was tracking prior to the flip.

Next, it will automatically capture a frame and select a suitable guide star, performs calibration, and resumes autoguiding. If In-Sequence focuing is enabled, it will also capture and focus a suitable star. It then resumes the capture process form where it left.

All these steps are completely automated and require no user intervention! Watch the video below for a live demo of this feature!

Tuesday, February 3, 2015

3D Cube FITS & Debayer support in KStars

Recently I was finally able to close BUG#305960 where a user requested support for 3D Cube FITS support in KStars. The FITSViewer tool always supported monochrome images since its inception, as this is what most CCD cameras in astronomy use. But single-shot color CCDs and DSLRs' utilization within the astrophotography world kept growing over the last few years.

Now the FITSViewer tool can display any 2D (monochrome) & 3D (color) cube FITS, and while most of the operations in KStars are geared toward single-channel images, the migration to 3 channel support was relatively smooth.

In addition to the 3D cube support, the FITSViewer tool can debayer images captured from color cameras and stored in RAW format with a specific color filter array (CFA).

DSLR users will gladly welcome this feature as they can inspect their color RAW images in color and may adjust the debayer parameters to produce a clear image of their target. Internally, KStars converts the debayerd image to a 3D Cube FITS without changing the RAW data at all. While the user may save the file as a 3D Cube FITS, it is not recommend. In fact, the debayer functionality should only be used to inspect the image, and the RAW image should always be processed under a dedicated astrophtography tool like PixInsight in order to carry out proper calibration procedure before any integration and registration processes.

In addition to DSLRs, the SBIG CCD INDI driver now also supports color CCDs. More INDI CCD drivers will have color support soon.

Sunday, August 3, 2014

NGC6992 with Ekos

A lot has changed in the last few months in Ekos, KStars advanced astrophotraphy tool. The powerful builtin sequence queue is more robust now and can support in-sequence autofocusing, autoguiding limits with dither support, and autopark functionality. The astrometry.net based alignment module has been improved to support the online astrometry solver using Web Services, thereby eliminating the need for an offline astrometry solver that requires gigabytes of star indexes in order to solve.

Coupled with an ever improving INDI drivers, Ekos provides users with a complete astrophotography stack in Linux. While the majority of Ekos development takes place indoors with the help of INDI's powerful device simulator, nothing beats on-site testing with all the hardware connected and ready to go. So a couple of days ago, I decided to put Ekos to the test!

Since I live in a heavily light polluted area about 30 KM south of Kuwait City, my friend and I decided to conduct the astrophotography session some 100 KM away northwest of Kuwait in AlSalmy desert. It's a quite desolate desert, but it is more rocky than sandish so that would help a lot in case we get some wind our way. After setting up the equipment (Orion Sirius EON 120mm APO, QSI 583 CCD, Lodestar autoguider, and Moonlite focuser), I performed the initial autofocus routine, followed by plate-solving a frame in order to establish the telescope's actual position in the night sky. Before Ekos alignment module, this process would take anywhere between 10-20 minutes to get the scope properly aligned using 2 or 3 star alignments, and even after that, the GOTO might not be accurate. With Ekos alignment module, GOTO is highly accurate and it increases in accuracy with each subsequent frame captured and solved.

Using Ekos Sequence Queue, I added 4 jobs, each consists of 6x300s exposures in each filter (Hydrogen Alpha, Red, Green, and Blue). Then I used the Guide module to calibrate the guider and start the autoguide process after slewing to NGC6992 and engaging tracking.

After the light frames were completed, flats and darks were taken. The flats were captured using an artificial uniform light source. Due to a temperature of 39 degrees Celsius in the desert (around 8:15 PM),  the CCD was only cooled to zero degrees.

The next day I downloaded all the images to my desktop and used PixInsight to process them. PixInsight is a really powerful tool if mastered well, and there is still a lot of learn from this great tool. I ended up with a decent image that was captured and processed 100% in Linux!

Monday, January 6, 2014

Remote observatory using Raspberry PI

One the great strengths of the INDI protocol is that it is based on a Server/Client architecture where commands are sent back and forth in XML over TCP/IP. Therefore, network transparency is built right at the protocol level and it makes distributed data acquisition and control quite trivial.

For the last few months, I have been running all my astrophotography gear (HEQ Mount, QSI CCD, Lodestar Guider, MoonLite focuser) on my HP laptop using INDI & KStars/Ekos. As it was getting quite cold recently (even in Kuwait it gets quite cold!), I found myself using VNC to access the laptop which sits with all my equipment on the roof. While the performance was OK since it is a local network, I was curious to try to use Raspberry PI (RPi) to run the INDI server and drivers, and connect to them remotely from Ekos.

Building and installing the drivers on RPi was straightforward. Due to power limitations of the RPi, I used a powered USB hub to connect all my equipment. That worked pretty well, and to my surprise, everything worked without a hitch from the first time! I used a USB WiFi dongle on the RPi and gave it a static IP address as well.

Connecting to the RPi from Ekos was straight forward, and I was able to carry on 6+ hours of continious image aquisition, guiding, and focusing without any issues! While all my equipment only sit less than 20 meters away, the same principle is applicable to 2000 km away as long as you have a reliable network connection.

For those curious about using RPi with their astro gear, I wrote a tutorial on getting started with INDI & Raspberry PI.