Gaussian Process Guider & guide graph
Introduction
This MR adds the Gaussian Process Guider (GPG) as a new internal guider option for RA.It has been in use for several years in Phd2, where it is known as Predictive PEC guiding (PPEC).In my experience, it is a significant guiding improvement, though much of the improvement may be for those who haven't removed the RA periodic error from their mounts in other ways. You can easily read more about it by googling Predictive PEC Guider.
The main code for this algorithm has a BSD license from the Max Planck Society, and is included in its own subdirectory below ekos/guide/internalguide. I have been in touch with one of the authors (Edgar Klenske, this work was a key part of his Phd thesis https://www.research-collection.ethz.ch/handle/20.500.11850/129665) who answered many questions of mine.
Of course, I needed to add support code for GPG, and that is detailed below.
As part of working with and evaluating the guider, I made other significant improvements/changes.
- The Drift Graph was upgraded to allow zooming in the x-axis, kept the y-axis more stable, and optional new plots of RMS error and guide-star SNR (SNR only available for Phd2 and SEP MultiStar).
- Added a Guide Star SNR text box to the Guide tab
- Refactored a number of things. I moved (much) of calibration to a new class/file--not the state-machine (yet), but the object holding and using the calibration. This will allow future saving/restoring calibration and makes the code a little easier to maintain/modify.
New UIs
About KStars: see the new credit for Max Planck: https://photos.app.goo.gl/zFq9c3h1KrwLHMi8A
New GPG Options page in the Guider Options Window: https://photos.app.goo.gl/R6MoXRqsM9i8uqVE9
Guide Tab: Changes are (a) an SNR textbox in the bottom left, and the drift graphics have a new SNR graph (in yellow), a new RMS graph (in red), +/- buttons to control the zoom below the graph, and new checkboxes to control SNR and RMS.
https://photos.app.goo.gl/kWJ4kkCxSBLjtvR46
Details
Code under Max Planck license
ekos/guide/internalguide/MPI_IS_gaussian_process (the directory name is theirs):
- src/*
Above contains 3 .cpp/.h file pairs which are the GPP algorithm.
* README.md
The original MPI README.md
- tests/*
- tools/*
Above two directories are included for completeness, and could be integrated into KStars, but aren't yet. So, the tests don't run from there. I also didn't include a CMakeLists.txt file. I did compile and run them from the phd2 source, and they do succeed. The tools are python scripts and the like for experimenting with this. Perhaps should be removed?
- doc/*
Am tempted to remove doc, but left for now for feedback in this review. Doc contains a pdf that describes the algorithm in use, but was clearly written for Phd2, and says so inside it.
Changes to KStars
kstars/CMakeLists.txt
- Add the new files that need to be compiled
- kstars/main.cppCredit to Max Planck Society for the new code (also an update to my contributions).
- kstars/ekos/guide/internalguide/calibration.cpp/h
- Tests/internalguide/testguidestars.cpp
- New Calibration class, and tests for it
kstars/ekos/guide/internalguide/gpg.cpp/h
- New GPG support class, used by gmath.cpp and internalguider.cpp
kstars/ekos/guide/opsgpg.cpp/h/ui
- New Options page (in the guider options window) where GPG parameters are edited/viewed.
kstars/kstars.kcfg
- New storage for options for GPG (and guide-graph changes, see below).
kstars/ekos/guide/internalguide/guidestars.cpp/h
- Switch to using the new Calibration class.
- A change to how guidestars are evaluated.
kstars/ekos/guide/internalguide/gmath.cpp/h & kstars/ekos/guide/internalguide/internalguider.cpp/h
- GPG support, removed some dead code, move to new calibration class, support SNR in guide graph.
kstars/ekos/guide/guide.cpp/h/ui
- guide graph has new SNR and RMS lines, buttons to turn them on/off, and x-axis zoom
- guide tab has new SNR text-boxrefactor (turn numbers into symbols for various guide graphs)
- support new GPG options page
- reset GPG on slew
kstars/ekos/guide/externalguide/phd2.cpp
- emit SNR for guide graph