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 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.

Friday, November 1, 2013

Joystick support in the next INDI release!

So it took me a couple of days, but I finally got around to adding support for joysticks in INDI. This is very exciting and it became quite important recently when I started using EQMod driver. For now, all LX200 and EQMod drivers supported. I didn't put a lot of functionality into the telescope drivers joystick control section yet, just the basic N/S/E/W motion and selection of slew speeds.

This is particular useful for EQMOd where it was a pain to try to center any star using the INDI control panel, while at the same time, trying to look in the eye piece! Of course, now with Ekos Alignment module & solver I don't have to do that anymore, but this functionality is indeed essentials for all of those tired of jumping back and forth between the scope and the laptop.

All those features will be available in the next INDI Library v0.9.7 release.

Here is a quick video for controlling LX200 GPS:

Sunday, October 27, 2013

Demo of Ekos Alignment module

Yesterday, I field tested Ekos Alignment Module using EQMod for Linux driver with my Orion Atlas telescope. The module utilizes solver to find the actual celestial coordinates in a given image, making scope alignment quite a trivial procedure with amazingly accurate GOTOs.

To use Ekos for alignment, first you have to put your telescope in the starting home position, which simply means that it should be leveled and pointed at the North Celestial Pole (NCP), if you are in the northern hemisphere. With my mount (HEQ5), I have a polar finder scope so pointing it at the NCP was quite trivial simply by adjusting the mount altitude and azimuth knobs until polaris is within a small circle designated in the polar find scope.

Next, I fired Ekos and started it with two drivers: EQMod & QSI CCD INDI drivers. It would have been possible to use the Synscan driver, but the driver is very limited compared to EQMod. After you use EQMod, you never look back.

Then I asked EQMod to track a nearby star. Now this is where the magic of Ekos comes. You don't have to do anything yourself! No more looking in the eye piece or CCD image to align your scope. You just hit "solve" and it figures where in the sky the telescope is really pointing. Once it finds a solution, you can ask it to either sync the telescope coordinates to the solution coordinates, or sync and slew back to the target we were tracking just earlier. I set it to "Slew to Target" and I had to stop the first iteration of the solver because it was taking too long, but after adjusting some options (as you can see in the video), the solver only took 8 seconds to find a solution.

Each time the solver finds a solution and syncs, an alignment point is added to EQMod Alignment Model, which is N-Star by default. The more alignment points you have, the more accurate your slews become. I then asked EQMod to track another nearby star and repeated the same process, this time the solver only took 2 seconds. Finally, to show that the alignment is really working, I slewed to M31, took an image, and it was dead in the center!

All those exciting Ekos features are coming up in the next KDE 4.12 release. Have to give a shout-out to Jean-Luc Levaire, INDI EQMod driver developer, and Dustin Lang from for all their hard and beautiful work!

Check out this Youtube video showing the whole process!

Saturday, October 12, 2013

Accurate GOTO with plate solving alignment module in KStars

Any amateur astronomer must have experienced the woes of aligning their mount. First, your mount has to be aligned with the polar axis. Second, you need to perform an alignment procedure to enable the built-in GOTO firmware to slew and track your objects of choice. Often we are offered to align the mount with 2 or 3 bright stars spread all over the sky which then enables the firmware to build a simple model for the mount errors that it has to correct for when it slews to a target. Also, at this point, the firmware knows where the telescope is looking at in the sky, or so it thinks as we find out below.

While the simple 2 or 3 star alignment is often sufficient for visual observation, it becomes a source of frustration in astrophotography. After slewing to your target, you often have to perform framing to center the actual object within the CCD desired field of view.  Once that's done, your mount is now tracking the object, and you can begin to take your photos.

For deep sky astrophotography, you typically have to take multiple long exposures frames and later stack them. The mount tracks the object sidereally (i.e. in RA), but most commercial mounts suffer from manufacturing defects in the worm gears and other parts that makes accurate sidereal tracking difficult. Furthermore, your mount has to be perfectly aligned with the earth polar axis as any deviation will cause tracking errors.

This is where Ekos Alignment module comes into play. Alignment module performs the following:

  1. Highly accurate GOTO.
  2. Determine polar alignment errors.
Ekos Alignment Module

The way it works is by capturing an image of a star field, feeding that image to solver, and getting the central coordinates (RA, DEC) of the image. The solver essentially performs a pattern recognition against a catalog of millions of stars. Once the coordinates are determined, the true pointing of the telescope is known. Often, there is a discrepancy between where the telescope thinks it is looking at and where it is truly pointing. The magnitude of this discrepancy can range from a few arcminutes to a couple of degrees. Ekos can then correct the discrepancy by either syncing to the new coordinates, or by slewing the mount to the desired target originally requested.

Furthermore, Ekos can measure the misalignment in the polar axix by taking a couple of images near the meridian and east/west of the meridian. This will enable the user to adjust the mount until the misalignment is minimized.

With the addition of the alignment module, Ekos is now the ultimate astrophotographer tool under Linux!