Friday, December 21, 2018

KStars v3.0.0 is released!

After 4 months of development, we present the KStars v3.0.0 release as an early Christmas present for our users worldwide.

KStars v3.0.0 packs a lot of features and bugfixes as we strive to develop the most comprehensive planetarium platform for computers today.

XPlanet Solar System Viewer

Robert Lancaster developed the XPlanet Solar System Viewer which is a significant improvement of the KStars built-in viewer. It can display high resolution images of all the solar system bodies in addition to numerous moons.

By adjusting a few controls, the tool can deliver an immersive experience for the user.

You can zoom, pan, and rotate all objects seamlessly using an efficient algorithm.

Improved FITS Viewer GUI

Significant improvements to FITS loading & processing were made by employing various multi-threading techniques. For large images that requires similar computational tasks, KStars creates 16/32 threads that concurrently work on processing the image data. Most of the backend code now relies on asynchronous loading of data which in turn led to a smooth experience for the users.

Robert Lancaster took on the challenge of simplifying the FITS Viewer interface in order to make all information accessible as fast as possible to the user. The updated FITS Viewer now adds a non-intrusive drawer that the user can drag to expose several functionalities such as:
  • FITS Header
  • Histogram
  • Statistics
  • Recent Images

Scheduler Improvements

Eric Dejouhanet dedicated the last few months to resolving various issues with the Ekos Scheduler. The scheduler is now a lot more robust against many complex observation requirements & scenarios. It is also more tolerance to INDI disconnections and can resume from disconnection without going into panic mode.

This is a full rewrite and verification of all steps of evaluation of a list of scheduler jobs with the following existing constraints:
  • Dark sky, which schedules a job to the next astronomical dusk/dawn interval.
  • Minimal altitude, which schedules a job up to 24 hours away to the next date and time its target is high enough in the sky.
  • Moon separation, combined with altitude constraint, which allows a job to schedule if its target is far enough from the Moon.
  • Fixed startup date and time, which schedules a job at a specific date and time.
  • Culmination offset, which schedules a job to start up to 24 hours away to the next date and time its target is at culmination, adjusted by an offset.
  • Amount of repetitions, eventually infinite, which allows a job imaging procedure to repeat multiple times or indefinitely.
  • Fixed completion date and time, which terminates a job at a specific date and time.

The UI now displays target altitudes at the current simulation time, and at startup and completion times. It also displays the lead time or gap time between jobs to help with imaging time optimization. Warnings appear in some situations for the user to detect problematic situations, such as a job completing under the minimal altitude.

  • The rewrite starts by estimating the imaging duration of each job, and eventually reorders them based on option "Sort Jobs by Altitude and Priority".
  • The reordering algorithm sorts jobs by altitude, considering a setting target is higher than a rising target.
  • When the option is enabled, targets will be automatically sorted whenever jobs are evaluated, using the current simulation time for altitude calculations.
  • When the option is not enabled, a button is available to reorder jobs manually, using the first job startup time for altitude calculation.
  • This reordering helps to optimize imaging time when preparing a schedule with multiple targets.

Scripting & DBbus

KStars makes full use of DBus to enables scripting over many aspects of the application. All the Ekos modules DBus structure was migrated to a modern Property/Method/Signal framework. Furthermore, a new DBus interface added for the Field-Of-View (FOV) objects to enable complete control over them by 3rd party applications.

Lunar Eclipses

Valentin Boettcher added functionality to calculate and draw the earths shadow disk on the Moon from any distance.

There is a new eclipse tool in the astrocalc which can find lunar eclipses quite fast. It is overhauled and modularized over the original code.

The Eclipse Tool comes with an API that can be extended for other eclipse types.

Find Dialog

The venerable Find Dialog is now persistent so it remembers the past searches. Any time you find an object, it stores it in the history list where it can be easily retrieved later.

Capture Module

The capture module now incorporates a cooler On/Off button. Additionally, user can now clear Camera configuration.

The prefix target is automatically set when slewing an object as long as there are no active capture operation.

Misc. Works

Various tasks that not immediately visible on the surface, but it improves the code quality & stability over the long term.

  • Dedicated Binary Object channels when communicate with INDI driver to increase throughput and responsiveness of drivers.
  • Fixed performance regression in Star Profile viewer.
  • Guide mode resets calibration when it detects pier side changing.
  • Migrating code to new style Qt Signal/Slot connections.
  • J2000/JNow support in Mount Module.
  • Do not cast DSO coords seconds to int as we lose important precision. Use full resolution as double.
  • Fix issue with subframed calibration when auto-select star is not enabled. Now subframed star position is set properly in the internal guider before.
  • Support for compressed FITS files (.fits.gz)
  • Add live view support to focus module and rework existing one in capture to be icon based.
  • Show loaded coords in sexigesimal format and in high precision when possible.
  • Do not add any camera or ST4 devices to guide module if guider is external. Instead put guider type in guider dropdown and disable it.
  • Honor settling time in Polar Alignment Assistant tool.
  • Add warning when slewing to Sun. Adjust tracking rate if supported by the mount depending on the object type.
  • Add option to control DSLR image viewer. It can now be turned off.
  • Improve PHD2 support.

Thanks to

  • Yuri Chornoivan excellent maintenance for the documentation, spelling, and grammatical mistakes introduced by us. Thank you Yuri for putting up with our terrible spellings!
  • Csaba Kertesz fixed KStars Lite Android crash.

Thursday, September 13, 2018

KStars on Microsoft Store

I'm glad to announce that KStars is now available on Microsoft Store in over 60 languages! It is the first official KDE App to be published by KDE e.V on the MS Store.

Currently, KStars v2.9.8 is in the store and should be updated every stable release.

While KStars has sand-boxed packages for both MacOS & Windows, we are still missing a Linux sandboxed package. Earlier attempts at packaging a Snap package failed and I didn't pursue it further due to lack of support. Additional work at creating an AppImage also failed due to a few technical issues with linuxdeployqt and SSL. If anyone can help us create a Snap/FlatPak package, that would be great.

This release on the Windows Store would not have been possible without the tremendous work done by Hannah Von Reth. She played a pivotal role in setting up the infrastructure and tools necessary to make this work, thank you Hannah!

Sunday, August 19, 2018

KStars v2.9.8 released

KStars 2.9.8 is released for Windows, MacOS, and Linux. It is a hotfix release that contains bug fixes and stability improvements over the last release.

This marks the last release of the 2.x series, the next KStars release shall be v3.0.0

 + Eric Dejouhanet fixed several issues in the Ekos scheduler to enable running duplicate jobs.
 + Pino Toscano fixed many problematic i18n strings that accumulated over the years.
 + Csaba Kertesz improved KStars Lite android build process and fixed touch support.
 + Andy Galasso fixed several issues with Ekos PHD2 support.
 + Wolfgang Reissenberger fixed logging out in capture module.
+ Yuri Chornoivan fixed minor EBN issues.
+ Using Max RMS value as the threshold to abort the guider instead of maximum pulse length.

Thursday, July 26, 2018

KStars v2.9.7 is Released!

Just in time before the next total lunar eclipse of 2018, KStars v2.9.7 is out for Windows, Linux, and MacOS.

This is a feature-rich release while still continuing on making KStars more resilient and reliable.

MacOS improvements

Robert Lancaster diligently worked to improve INDI driver support on MacOS while adding a new FFMPEG-based Web Camera driver that can even records videos streamed directly from your phone. Furthermore, drivers from SBIG, MGEN, ATIK, INDuino, SSAG, Morovian, Fishcamp, and Radio Detectors have been migrated successfully to MacOS. Peter Polakovic graciously offered assistance in the SSAG and ATIK migrations.

With INDI Webcam driver on MacOS

Robert Tricking Star Detection Algorithm!
Ekos Scheduler

Eric Dejouhanet & Wolfgang Reissenberger contributed significantly to the Ekos scheduler to improve its behavior under a number of scenarios. As a result, the scheduler is now more user-friendly and quite straight forward to setup and monitor progress. More work is pending for the next release to further enhance the scheduler.

Planning Sadr Mosaic with Scheduler
Polar Alignment Assistant

The PAA tool received few improvements to simplify the process, it's now literally a 1-button click operation.

Ekos Live

Support for EkosLive is added in this release. EkosLive is a real-time web application that communicates with Ekos via websockets to provide a feature-rich yet simple interface to control and monitor all the observatory equipment. Backed by Cloud services for storage, users can store their images on the cloud and access them at any time and from anywhere. Thanks to the rich metadata system that ships with EkosLive, it is very easy to search and categorize your astro images.

EkosLive is currently in Beta.

Custom Drivers

Long requested by the community, KStars now offers an easy method to add INDI custom drivers. This is perhaps more important to users who have multiple devices and want to distinguish them. Suppose you have two SBIG cameras and want to use them simultaneously with Ekos. Currently, there is no way to do this out-of-the-box. You need to manual create an alias by copying over the SBIG XML file under /usr/share/indi, and then rename the label to be able to use a different alias.

With the Custom Drivers dialog, it's now quite straight forward to create any alias for any driver. After a restart, you can see the new alias in the Profile Editor. Moreover, this feature also works with INDI Web Manager, so you can create aliases for remote drivers as well!

Here are more highlights:

+ Support for loading compressed FITS (*.fits.gz) in FITS Viewer.
+ Android fixes + improvements by GSoC 2018 student Csaba.
+ Disabled internet check for online astrometry solver to workaround Qt bug.
+ Fixed PHD2 file not found issue.
+ Added option to restart alignment process in scheduler in case of calibration failure.
+ Support for manual dither plus dithering to a specific X,Y location.
+ Support for Auto Park Timer in Mount Module.
+ Support for Remote Drivers in the Profile Editor.
+ Added video exposure duration control to the Video Stream window.

Ekos Auto Park Timer

Saturday, May 26, 2018

KStars 2.9.6 is Released!

I'm glad to announce the release of KStars 2.9.6 for Windows, MacOS, and Linux. This is a minor bugfix release.

KStars on MacOS with QHY
Here are some the highlights:
  • Numerous scheduler fixes and improvements by Eric Dejouhanet.
  • Fixed long-standing bug where Time zone was not updated correctly from INDI GPS.
  • Fixed Filter Manager settings as it was not updating the database properly.
  • Fixed centering & tracking of empty sky.
  • Fixed Polar Alignment Assistant rotation in the southern hemisphere.
  • Added a method to clear DSLR info in case they were entered incorrectly.
  • Added J2000 support in the Mount Control panel in addition to the standard JNow.
  • Alignment FOV is now always editable.
  • CCD Capture format and directory are now persistent.
  • Guiding is aborted when mount is slewing or parking.
  • Clang fixes by Csaba Kertesz as part of GSoC 2018.
Updated Ekos tutorials for the various Ekos modules are now also available. I should be adding more soon.

Tuesday, April 24, 2018

KStars 2.9.5 is out!

KStars v2.9.5 is now available for Windows, MacOS, and Linux.

Autofocus module users would be happy to learn that the HFR value is now responsive to changing seeing conditions. Previously, the first successful autofocus operation would set the HFR Threshold value of which subsequent measurements are compared against during the in-sequence-focusing step.

However, this method suffers from two issues:

  1. Seeing could change during the night.
  2. HFR value could be different for different filters.
These issues can lead to interesting artifacts under the right conditions, most notably repeatedly running a complete autofocus run after each subsequent exposure thereby losing precious observation time in a futile attempt to bring the HFR value down.

In KStars 2.9.5, we introduce an experimental adaptive HFR Thresholding algorithm that selects the median HFR value filter-wise. It still has to be seen whether this is an overall better approach, so go out and test this!

Ekos Scheduler module has received major patches from Eric Dejouhanet to improve its reliability and fix some corner cases. More patches are in the pipeline to make the scheduler rock solid in various complex scenarios.

A quite illusive and annoying time-zone related bug was fixed when using INDI GPS devices. Now KStars correctly accounts for the UTC offset. Another related issue is related to preventing race conditions between multiple devices that may send time information, such as mounts and GPS devices, so now you can explicitly select which device to receive the location and time information from.

Finally, Align module FOV now default to zero on startup. Previously, FOV as calculated from the telescope focal length & camera pixel size was used to derive other values passed to the solver. However, it turns out that the FOV for real optical trains can be different. Using focal reduces, coma correctors, and even filter wheels or spacers can alter this value, sometimes quite significantly to the unsuspecting user.

Therefore, relying alone on the calculated FOV might actually cause to fail since the actual FOV might fall beyond the field of view threshold boundary. With this addition, the first solver run would take a little bit longer but it would also produce a quite accurate effective FOV. You can think of the effective FOV as the real FOV that your combination of your camera, telescope, and whatever sits in between (aka optical train) ends up producing.

This effective FOV is then saved for each Profile-Telescope-Camera combination for future use. This is all done behind the scenes to make user experience much more pleasant and bullet proof when using the Ekos Alignment module.

Clear skies!

Thursday, April 12, 2018

Spring season KStars v2.9.4 is Released!

Glad to announce the release of KStars v2.9.4 aka Emad is now release for Windows, MacOS, and Linux!

The new release brings in more performance improvements and bug fixes.

Spring Galaxy Season
Credit Turki AlAmri

Valentin Boettcher
introduced a highly efficient binary interface for asteroids that would allow quite large (> 100MB) and distant catalogs to be loaded into KStars without a major impact on performance. Before this change, loading any JPL catalogs for faint asteroids (> 15 mag) resulted in significant slowdown of KStars during startup as well as during run-time. Now users can comfortably load fainter asteroids given they have enough system memory to handle it.

Automatic Flat field calculations were fixed for multi-channel DSLR frames along with an improved DSLR popup dialog. The online astrometry option with offline server bug was fixed and now users can connect to local instances of without any problems.

The Ekos scheduler workflow was revamped to evaluate all jobs every time a new job is invoked to ensure all scores are updated accordingly and not only on the first job run. More SEP work for star & galaxy detection is merged into the internal guide module resulting in a better object detection even in noisy environments.
Messier Marathon with Ekos Scheduler

Furthermore, the guide module is now a lot more tolerant to passing clouds. When a star lock is lost, it will attempt to reacquire the lost star for several iterations before giving up.

On the capture frontend, users can now instruct Ekos to take flat field frames exactly at the same focus position where light frames of the same filter were captured. For example, suppose you are taking an LRGB sequence, and the best autofocus position for Green filter is 37,000 ticks. By the time you finish the sequence the focus position would most likely have moved due to the Blue filter (unless they're perfectly parafocal). Once you start capturing flat fields afterwards, typically the focus position is kept as-is. However, now it is possible to synchronize the focus position when capturing flat fields as well. When a flat field Green capture is requested, Ekos shall instruct the focuser to move to 37,000 ticks as indicated by the last successful autofocus operation of the same filter.

Finally, users might have noticed especially on slower systems that opening large FITS files can take a while to load up. In v2.9.4, the FITS handling code was optimized with loading times improving on the order of 300%.

FITS Speed improvements

Turns out that statistics calculations were eating up significant amount of precious CPU cycles. Many of these calculations would greatly benefit from SIMD support like SSE/NEON but since KStars runs on multiple architectures, it requires an architecture-agnostic solution and major refactoring of the code base. Another solution that was more readily available is to employ multiple threads to by partitioning the image and therefore spreading the calculations. It is certainly a poor-man's SIMD in a way, but the results were immediately noticeable.

Using 16 threads, computing min and max values was reduced from 122ms to only 30ms. Running mean and standard deviation calculations took 118ms instead of 270ms. Here is an excerpt from the Qt Concurrent magic that made this signifantly easier to code than using plain pthreads.

QList<QFuture<QPair<double,double>>> futures;

for (int i=0; i < nThreads; i++)
 // Run threads
 futures.append(QtConcurrent::run(this, &FITSData::getSquaredSumAndMean<T>, tStart, (i == (nThreads-1)) ? fStride : tStride));
 tStart += tStride;

double mean=0, squared_sum=0;

// Now wait for results
for (int i=0; i < nThreads; i++)
 QPair<double,double> result = futures[i].result();
 mean += result.first;
 squared_sum += result.second;

double variance = squared_sum / stats.samples_per_channel;

stats.mean[n] = mean/nThreads;
stats.stddev[n] = sqrt(variance);

There is room for more improvement still, especially since now we are loading the FITS twice unnecessarily. This could be resolved by using an implicit sharing data model among FITS files that does not require a deep-copy of the data until the underlying data is altered. This could result in a 100% improvement in loading speeds when using Ekos as well. Stay tuned!