Saturday, April 20, 2013

M81 & M82

Last week, I attempted to capture an image for the beautiful galaxy pair M81 & M82 in the constellation of Ursa Major. Since I live in a heavily light polluted city in Kuwait, I knew that broadband imaging is quite challenging, and was quite shocked when I found out that the background level due to light pollution noise cuts half the dynamic range of the CCD!

So even after processing, I ended up with a quite poor image:


So I decided to pick my gear, and head to AlSalmy, which is an isolated desert area northwest of Kuwait. While the skies there are not as dark as I'd like it to be, it's the best thing we have in Kuwait, for the time being at least as I'm pretty sure light pollution will ruin it within a decade or less. The trip was well worth the effort, and despite a waxing gibbous moon that lured close to the zenith, the background noise was substantially better than the inner city, no surprises here.

Here is the final image, taken with Ekos, and processed with PixInsight.

Lum: 8x240
Red: 5x240
Green: 5x240
Blue: 5x240


Friday, March 29, 2013

Say Hi to J065514.3+540858

For the last couple of years, I have been working on building a 5 meter radio telescope for educational purposes in my free time. Its primary purpose is to map neutral hydrogen distribution in the milky way. Hydrogen, the simplest atom, shines at the radio frequency of 1.42 Ghz (or 21 cm line), and we use multistage amplifiers to boost the very weak radio signal to something that can be processed by the electronics of a spectrometer.

Using INDI + KStars as the control platform, the user can command the telescope to slew and track objects. Slewing to an object is quite trivial. The telescope is equipped with absolute optical multiturn encoders that provide the positional feedback to the control system. If we know the home position of the telescope and the encoder to degrees ratio, it would be possible to command the dish to move to a new position and stop whenever the new desired angle is reached. Tracking, however, is another matter.

The telescope motion is in Alt-Az (Altitude-Azimuth) while objects rotate due to the motion of the earth from east to west at sidereal rate. Hence, both altitude and azimuth axis must move in a step-wise ladder direction to keep up with the sidereal motion. Due to limitation in the mechanical system of the dish, the minimum speed of both axis is still a lot faster than the sidereal rate, and therefore, tracking was developed to keep the object within the beamwidth of the radio dish, which is 3 degrees, at all times via a user configurable tracking threshold. Whenever the threshold is exceeded, the dish corrects itself using the minimum speed possible.

The following is a screenshot taken for the creatively named J065514.3+540858 radio source in the constellation of Lynx. It is a relatively bright radio source with integrated flux of 1371 mJy @ 1.42 Ghz.


In the next few days, the goal is to fine tune the pointing accuracy and to calibrate the overall system noise. Finally, I'd like to thanks the developers of Kst for making such a great program! I use Kst to stream real time measurements from the continuum spectrometer, and this saved a lot of development time and effort. Kudos to the Kst team!

Saturday, October 20, 2012

M42 with Ekos & PixInsight

A few days ago, I used Ekos to take a 100-seconds exposure for M42, the Orion's Nebula, using Orion EON 120mm scope and QSI 583wsg CCD.

Initially, I processed the image using KStars FITSViewer histogram tool to bring out the contrast, then I used GIMP to crop and fine tune the image using the curves tool. Only the light frame was captured, no Dark, Bias, or Flat frames were taken, and hence no pre-processing was performed. The outcome was the following:

M42 with minimal processing

You can immediately notice that the M42 core is over exposed, as it can get quite tricky to balance long exposures to bring out the nebula details without saturating the core. Therefore, I decided to process the image under PixInsight, a multi-platform advanced image processing tool tailored for astrophotography. Using Dynamic Background Extraction (DBE), HDR transforms, and ACDNR noise reduction tool, the results were quite impressive:

M42 after PixInsight processing
With Ekos & PixInsight, I finally have everything I need for astrophotography under Linux!

Tuesday, October 9, 2012

First image with Ekos!

For the past few weeks, Ekos, KStars Astrophotography tool, went thought a lot of updates and testing. Today I was able to use Ekos to take my first astrophotography image of M33, the Triangulum Galaxy using QSI 583wsg CCD.


M33 - 5 minutes exposure

During the course of the night, and after setting up my Orion EON 120mm refractor, Loadstar autoguider, and Robofocus at the roof of my house, I began with using Ekos Autofocus tool to get the CCD focused, then used the autoguiding tool to keep the M 33 field of view centered during the 5 minute exposure run. This is a raw image with no filters and no dark or flat frames taken to perform post-processing and calibration. It was processed by GIMP by adjusting levels to bring out the contrast. Unfortunately, GIMP does not handle 16bit depth images as of now, which limits its capability in processing astrophotography images.

It is very exciting to finally use 100% based Linux software to perform astrophotography tasks. Ekos is still under heavy development, and is slated for release in the next KDE 4.10 release.

Sunday, September 9, 2012

Autoguiding in KStars


In a previous post, I briefly talked about developing the Autoguide feature in KStars. Guiding is process by which a star field is kept stationary within the field of view of a telescope when performing long exposure astronomical imaging. The telescope mount must keep tracking the selected celestial object during the imaging process as it transit the sky. Due to imperfections in the mechanics of the mount and periodic errors, the star field may drift with time. If the drift is not corrected, the resulting image may contain star trails among other deformities. The guiding process depends on selecting a reference star in the frame and correcting the telescope motion by detecting drifts in the telescope axes, and issuing correction commands accordingly.

Guiding under Ekos
Autoguiding feature was once a GSoC 2012 project, but students who got accepted were selected for other projects in KStars, so I decided to implement the feature myself. KStars supports INDI which can operate and control numerous astronomical devices. The goal of the GSoC project is to add autoguiding support to KStars Ekos tool. Ekos is a tool to aid amateur astronomers in astrophotography. It enables focusing, guiding, and capture of astronomical images using INDI.


So instead of reinventing the wheel, I decided to base the autoguiding code on existing open source software. Under Linux, the primary tools are OpenPHD and Lin Guider.  After researching both options, Andrew Stepanenko lin_guider was selected because it was battle tested, and especially since it is based on Qt and hence, import will be easier. After a couple of weeks of importing the code and rewritings part of it to fit KStars and INDI framework, the autoguider tool was complete, at least under simulation. The autoguiding tool, in addition to the autofocus tool previously developed should now complete the basic stack of tools required by astrophotography. The next step is to field test all those features!

The following is a video illustrating the autoguide feature in KStars:




Tuesday, August 21, 2012

New filters for KStars FITSViewer

In preparation for my first astrophotography trial using 100% Linux based software, I added a couple of important filters to KStars FITSViewer tool. The first filter Equalize performs histogram equalization which enhances the contrast of an image. The filter works quite well with images of diffuse continuous flux such as nebulae or galaxies. For star fields, the filter actually significantly raises the background noise level, and stars become buried within the noise. Here is an example of applying the Equalize filter to M42. As you can see, the contrast of the image is greatly enhanced.

M42 before Equalize filter
M42 after Equalize filter
The second filter is a simple low pass filter that brings out the details of an image without adding too much noise. The filter calculates a cutoff point in the image histogram, and rescales the image after chopping off the high flux pixels. The filter is demonstrated in the example below:

Star field before Low Filter Pass

Star field after Low Filter Pass


Monday, August 20, 2012

Getting Focused with KStars



KStars Ekos tool

The excitement of discovery is not confined within the realm of professional astronomy only, amateur astronomers have contributed to many significant discoveries including spotting Supernova 1987A, several comets, and even exo-planets! As the hardware used to observe the night sky gets more sophisticated, affordable, and sensitive, so does the sophistication and variety of the software. One of the primary issues for amateur astronomers utilizing Linux is not the lack of hardware support as it was often the case a few years ago. Nowadays most astronomical hardware is well supported under Linux, with the exception of a few cameras and auxiliary devices. However, what is severely lacking is a complete software suite that caters to the needs of amateur astronomers. As it stands now, you have a plethora of astronomy and control applications in Linux that cater to different stages of the amateur astronomer astrophotography train: You can use App X to control the telescope and camera, App Y to perform guiding, App Z to focus, and none of these applications talk to each other! If you want to perform stacking, you have to find another program, and list just goes on. This can be incredibly frustrating for amateur astronomers new to Linux, and even those with experience. Last year, I purchased a 120mm aprochromatic refractor telescope, Quantum Scientific Imaging (QSI) CCD camera , Starlight Xpress Lodestar autoguider, and RoboFocus. There, I was set for astrophotography!


Star detection in KStars

After working a bit on INDI drivers, I was able to control these devices directly under KStars, but it was not enough. I needed tools to aid me in alignment, focusing, and guiding. The INDI interface in KStars was designed for generic control, and not to serve the particularities of astrophtography. Hence, Ekos was born, a complete tool in KStars to cater for all those requirements in one intuitive easy to use interface.

Ekos plans to support alignment, focusing, guiding, capture, and stacking of images using the telescope, CCD (and guider), filter wheel, and focuser. This required almost a complete rewrite of the KStars INDI engine in order to support the features required by Ekos. Currently, the capture and focusing modules were developed.

Focusing has to be of the most daunting, and dreadful, processes for an amateur astronomer. If you are looking to get one of those crisp images that you see in Sky & Telescope or Astronomy Picture of the Day, be prepared for long hours of trial, error, and disappointment. Microfocusers emerged to aid in the fine focusing required for super crisp CCD images. Due to the lack of any general purpose focusing tool in Linux, I decided to develop my own. It works with all CCDs and Focusers supported by INDI. In order to focus an image, you need to establish a numerical method for gauging how good your focus is. It's easy when you look at an image and can see it as unfocused, as the human is very good at detecting that, but how can a program possibly know that?

Initial focus condition

There are multiple methods. One is to calculate the Full Width at Half Maximum (FHWM) of a star profile within an image, and then adjust the focus until an optimal (narrower) FWHM is reached. The problem with FWHM is that it assumes the initial focus position to be close to the critical focus. Additionally, FWHM does not perform very well under low intensity fluxes. An Alternative method is Half-Flux-Radius (HFR), which is a measure of the width in pixels counting from the center of the stars until the accumulated intensity is half of the total flux of the star. HFR proved to be much more stable in conditions where you might have unfavorable sky conditions, when the brightness profile of the stars is low, and when the starting position of the focus is far from the optimal focus.

Final focus condition

After Ekos processes an image to find the center of stars, it measures the HFR for each star, and the average HFR for the image overall. It then asks the focuser to focus in or out, and re-measures the HFR. This establishes a V curve in which the sweet spot of optimal focus is at the center of the V curve, and the slope of which depends on the properties of the telescope and camera in use. Because the HFR varies linearly with focus distance, it is possible to calculate the optimal focus point. In practice, Ekos performs several large iterations to until it get closer to the optimal focus where the gears change and smaller, finer moves are now made to reach the optimal focus. Ekos let the user set a configurable tolerance parameter, or how good is good enough. Under simulation, the Ekos Autofocus tool runs very well, taking only about 25 seconds to reach focus, even with added extra noise and sky glow thrown in to confuse the algorithm. But of course this never prepares you for the challenges faced under real sky conditions. This is what I plan to do in the next few days: put Ekos to the test! By field testing Ekos, the tool can better adjust to the variable real sky conditions.

In addition to Ekos Autofocus tool, we are also working on a guiding module that should keep the telescope synced with a guide star. This along with other exciting features should make Ekos along with KStars powerful features very attractive to amateur astronomers.