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 astrometry.net 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 astrometry.net 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!

Tuesday, February 27, 2018

KStars 2.9.3 is out with numerous fixes

After some heavy lifting in KStars January v2.9.2 release, we dedicated February to fix all those KStars issues that have been accumulating for a while. Today, KStars v2.9.3 is released with many several important fixes, mostly in Ekos scheduler and capture modules.

It is available for Windows, MacOS, and Linux.

Monday, January 29, 2018

KStars 2.9.2 Released!

Glad to announce the release of KStars 2.9.2 for Windows, MacOS, and Linux.

In addition to the usual bug fixes and enhancement, we finally have proper cross-platform theming support! Most of the code was based on Digikam's theming code so Kudos to Digikam team for their great work!

Now Windows and MacOS users can enjoy the KStars dark theme in all of its glory!


KStars Dark Theme in MacOS


Furthermore, an automatic FOV for your sensor can be be displayed on the sky map along with the CCD name and the FOV dimensions in arcminutes. This feature, along with the DSS overlay, can make planning your astrophotography session very convenient!

Auto FOV
Ekos alignment module can now work with mounts using differential slewing instead of syncing, which would enable Ekos to operate some advanced mounts such as Paramount. Finally, Robert Lancaster made more improvements to the Star Profile tool to make it more user-friendly and efficient.
3D Star Profile

Thursday, January 11, 2018

KStars 2.9.1 is off to a fantastic start in 2018!

We're kicking off 2018 with a new fantastic release of KStars for Windows & MacOS. Linux users should wait a few more days to get the release in the official PPA due to Canonical's Launchpad downtime because of the Meltdown and Spectre CPU vulnerabilities discovered recently.

KStars 2.9.1 aka "Lancaster" release is primarily a bugfix release, but it brings with it as well several new features and improvements to existing technologies.

Over the holidays, Robert Lancaster made significant improvements to KStars and this release is named in his honor. Thank you Robert for your awesome contributions to KStars and Open Astronomy community!

MacOS users gained a few additional drivers with this release including Apogee, QHY, and Meade DSI support!

Set Park Position

Setting a custom parking position used to involve going to INDI Control Panel and tinkering with a few settings before it is saved and active. With KStars 2.9.1, it is now a very accessible action. Simply click anywhere on the sky map and select your desired custom parking position.

The mount shall slew normally to the desired location and save it as the parking position. It will NOT park the mount, it will just save that position as the desired position. To park the mount, use the parking/unparking controls from the toolbar or from the sky map as you normally would.

Additional PHD 2 Support


Robert Lancaster built upon his previous changes to PHD2 to add a PHD2 command request list so that KStars can keep track of what it has asked PHD2 to do. This allowed the addition of several additional commands that could be used to control PHD2. Now, users can use the Ekos Guide Module to change the PHD2 exposure time, change the DEC guide settings, and get information about the guiding pulses sent to the mount. Also, after changing the Connect/Disconnect code, the PHD2 connection seems to be more reliable.

Dither support was improved by using the timeout variable in the Guide options to control how long KStars will wait after issuing a dither command before continuing. And in a related fix, the Guide module will use the setting in the guide options “Dither Failure Aborts Autoguide” to control whether a dither issue will cause the entire sequence to abort. The last two changes were due to the fact that if PHD2 did not send back a response after dithering, KStars would not complete the sequence and if PHD2 reported a guide error, it would abort the entire sequence regardless of the setting in the guide options. This should all now be fixed. Also he added a PHD2 Lost Lock Timer so that if it loses track of the guide star but then regains it within 5 seconds, then it won’t abort guiding.

Drift Graphics Updates


Robert Lancaster made several improvements to the graphs in the Guide Module. These changes will work whether the user is using PHD2 or the internal guider. First, the mount corrections were added to the Drift Graphics plot so that the user could see not just the RA and DEC error, but also the corrections that the mount is making in each axis.

Since this graph naturally has a different scale than the guide errors, a separate axis was added along with a slider to control its scale independently of the other axis. A set of controls was added at the bottom left so that each component could be added or removed from the graph independently. A slider was added so that the user could scroll through the guide history, or click the “Max” checkbox to lock the graph onto the latest point so it will autoscroll.

Also buttons were added for autoscaling the graphs, or exporting the guide data to a CSV file, clearing all the guide data, and for scaling the target in the Drift Plot. Finally, a label was added to the guide graph every time that a dither occurred so the user knows guiding was not bad at those points.

New 3D Star Profile and Data Visualization Tool


Robert Lancaster created a new KStars tool based on some QT Examples that would plot the Pixel Data shown in any of the KStars Image Views so that the user can inspect the data in a new manner. This is particularly useful for astrophotographers who want to visualize the profile of a star they are considering focusing or guiding on, for scientists who want to examine a cross section of their data to understand the relative brightness of different objects in the image, and for imagers who want to visually see what is going on in their data collection in a new way.

Note that in order to use this feature, KStars must be built with the Data Visualization module installed. For the Mac OS X DMG, users can start using this function right away. We are working to get it into the Windows exe and Linux PPA very soon so that these users can also use this function right out of the box. But for now, Linux users would have to build from source with Data Visualizations installed to have these features.

To use the new feature, the user needs to select the View Star Profile Icon in one of the Ekos Module Views, or in the Fitsviewer. Then, the region selected in the green tracking box will show up in the 3D graph as shown above. The user will then have one of the following toolbars at the bottom.



At the far left, the sample size combo box will let the user select the size of the image crop shown in the graph. This option is only available in the Summary Screen, the Align Module, and the Fitsviewer. The second combo box lets the user control whether they are selecting an individual item, or a row, or a column of pixels.

The slice button will be enabled if the user selects “Row” or “Column.” It will put the graph in slice mode so that the user can see a cross section view of the image. Third, is a check box that will open up two sliders that will let the user drag the slider to change the selection.

This is extremely useful in the slide mode to change the selected point and to move the cross section around the graph. It is also useful in the normal view when in “Explore Mode” so that the user can zoom around the image examining the pixels. 


Then the user has the “Zoom To” combo box, which the user can use to zoom the graph to different preset locations. Next is the combo box that lets the user select the color scheme of the graph. Then are the HFR and the Peak checkboxes, which will both turn on the HFR and Peak labels on each found star in the image, but will also display one of them at the bottom of the screen. And finally comes the Scaling checkbox, which enables the Scaling Side Panel. In that panel are three sliders, one to control the minimum value displayed on the graph or “black point”, one to control the maximum value displayed in the graph or the “white point,” and a third that is disabled by default that lets the user control the cutoff value for data displayed on the graph.

This third slider is very useful to get really big peaks out of the way so you can study the finer details in the image. There is a checkbox at the top to enable/disable the cutoff slider.


And finally at the bottom of the sliders is the “Auto scale” button. This will auto scale the sliders as you sample different areas in the image. It will not only optimize the display of the data, but will also affect the minimum and maximum points of the slider.


If you disable auto scale, then as you sample different parts of the image, they will be displayed at the same scale. A particularly useful way to use this is to select an area of your image using auto scale, tweak the min, max, and cutoff sliders to your liking, and then turn off the auto scale feature to explore other areas of the graph.