Warning, /education/kstars/doc/ekos-guide.docbook is written in an unsupported language. File is not indexed.

0001 <sect1 id="ekos-guide">
0002     <title>Guide</title>
0003     <indexterm>
0004         <primary>Tools</primary>
0005         <secondary>Ekos</secondary>
0006         <tertiary>Guide</tertiary>
0007     </indexterm>
0008     <screenshot>
0009         <screeninfo>
0010             Ekos Guide Module
0011         </screeninfo>
0012         <mediaobject>
0013             <imageobject>
0014                 <imagedata fileref="ekos_guide.png" format="PNG"/>
0015             </imageobject>
0016             <textobject>
0017                 <phrase>Ekos Guide Module</phrase>
0018             </textobject>
0019         </mediaobject>
0020     </screenshot>
0021     <sect2 id="guide-Introduction">
0022         <title>Introduction</title>
0023         <para>
0024             The Ekos Guide Module performs autoguiding using either the powerful built-in guider, or at your option, external guiding via <ulink url="https://openphdguiding.org/">PHD2</ulink> or <ulink url="https://sourceforge.net/projects/linguider/">lin_guider</ulink>. Using the internal guiding, guider camera frames are captured and sent to Ekos for analysis. Depending on the deviations of the stars from their lock positions, guiding pulses corrections are sent to your mount's RA and DEC axes motors. Most of the &GUI; options in the Guide Module are well documented so just hover your mouse over an item and a tooltip will popup with helpful information.
0025         </para>
0026     </sect2>
0027 
0028     <sect2 id="guide-Setup">
0029         <title>Setup</title>
0030         <screenshot>
0031             <screeninfo>
0032                 Ekos Profile Guider Selection
0033             </screeninfo>
0034             <mediaobject>
0035                 <imageobject>
0036                     <imagedata fileref="ekos_profile_guide.png" format="PNG"/>
0037                 </imageobject>
0038                 <textobject>
0039                     <phrase>Ekos Profile Guider Selection</phrase>
0040                 </textobject>
0041             </mediaobject>
0042         </screenshot>
0043         <para>
0044             To perform guiding, you need (one time) to select a Guider in the Profile Editor for the profile you will be using. In the profile editor, choose Internal for the Ekos internal guider, or PHD2.
0045         </para>
0046         <screenshot>
0047             <screeninfo>
0048               Ekos Guider Optical Train
0049             </screeninfo>
0050             <mediaobject>
0051                 <imageobject>
0052                     <imagedata fileref="ekos_guide_optical_train.png" format="PNG"/>
0053                 </imageobject>
0054                 <textobject>
0055                     <phrase>Ekos Guider Optical Train</phrase>
0056                 </textobject>
0057             </mediaobject>
0058         </screenshot>
0059         <para>
0060             To perform guiding, you also need to set up your guiding optical train. This 2nd optical train is almost always different from the one you are using with capture/align/focus. See the image above for an example guider optical train configuration. Note that the telescope chosen is the guiding scope, which may be the same as your main telescope if you are using an OAG (off-axis-guiding) or ONAG guiding scheme. The camera selected is, of course, your guiding camera. The Guide Via should be your mount, assuming you are sending guide pulses directly to your mount, or the name of the ST4 device (e.g. your camera) should you be using ST4 guide pulses.
0061         </para>
0062         <para>
0063           Please look at the main guider page shown at the start of this Guider section. There are many parameters that also can be adjusted, some of which are listed below. 
0064         </para>
0065         <itemizedlist>
0066             <listitem>
0067                 <para>
0068                     <guilabel>Exposure</guilabel>: On the main guiding page you can adjust the guiding exposure time. After the guide-camera completes the exposure, the guide algorithm computes and sends the guide pulses to the mount, then it waits a user-configurable delay, and then then begins its next exposure.
0069                 </para>
0070             </listitem>
0071             <listitem>
0072                 <para>
0073                     <guilabel>Binning</guilabel>: Pixel binning for the guide image. It usually makes sense to bin the pixels 2x2. The algorithms can still find sub-pixel star positions and send proper guide pulses to the mount.
0074                 </para>
0075             </listitem>
0076             <listitem>
0077                 <para>
0078                     <guilabel>Box</guilabel>: This only is applicable to guide algorithms other than MultiStar, and MultiStar is the recommended guiding scheme. Size of the box enclosing the guide star. Select a suitable size that is neither too large or too small for the selected star.
0079                 </para>
0080             </listitem>
0081             <listitem>
0082                 <para>
0083                     <guilabel>Directions</guilabel>: Typically you want to keep all the directions boxes checked. Unchecking them will disable guiding in those directions. For instance it is possible to disable DEC guiding in the North direction.
0084                 </para>
0085             </listitem>
0086             <listitem>
0087                 <para>
0088                     <guilabel>Dark</guilabel>: Check this to enable dark-frame corrections to your guiding image. See below.
0089                 </para>
0090             </listitem>
0091             <listitem>
0092                 <para>
0093                     <guilabel>Clear Calibration</guilabel>: Check this to delete your calibration data. See the calibration section below.
0094                 </para>
0095             </listitem>
0096             <listitem>
0097                 <para>
0098                     <guilabel>Subframe, AutoStar</guilabel>: These only apply to guide algorithms other than MultiStar, and MultiStar is the recommended guiding scheme. 
0099                 </para>
0100             </listitem>
0101         </itemizedlist>
0102     </sect2>
0103     <sect2 id="guide-calibration">
0104         <title>Calibration</title>
0105 
0106         <screenshot>
0107             <screeninfo>
0108                 Calibration Settings
0109             </screeninfo>
0110             <mediaobject>
0111                 <imageobject>
0112                     <imagedata fileref="guide_calibration_settings.png" format="PNG"/>
0113                 </imageobject>
0114                 <textobject>
0115                     <phrase>Calibration Settings</phrase>
0116                 </textobject>
0117             </mediaobject>
0118         </screenshot>
0119         <para>
0120           Autoguiding is a two-step process: Calibration &amp; Guiding. Calibration is needed for the scheme to understand the camera's orientation, relative to the RA and DEC axes, and also the effects of guide pulses (e.g. how much a 100ms RA guide pulse will typically move the RA axis). Once it estimates these values, the guider can correct the mount's position effectively. You can see calibrated values for those parameters in the above image in the "Calibrated Values" section.
0121         </para>
0122         <para>
0123           Similar to other guiders, we recommend that you carefully calibrate once, and then only re-calibrate when necessary. It is necessary to re-calibrate when the camera is moved (e.g. rotate) relative to the mount. It should not be necessary to calibrate every time you slew the mount.  You should calibrate when pointing near the Meridian and along the Celestial Equator (probably just West of it). Guiding (and guide calibration) is problematic near the pole--it probably won't work. <ulink url="https://openphdguiding.org/PHD2_BestPractices_2019-12.pdf">This slide show</ulink> contains good advice on how to calibrate the Internal Guider and/or PHD2.
0124         </para>
0125         <para>
0126           The important options on the calibration options page (above) are:
0127         </para>
0128         <itemizedlist>
0129             <listitem>
0130                 <para>
0131                     <guilabel>Pulse Size</guilabel>: should be large enough to move your image a few pixels.
0132                 </para>
0133             </listitem>
0134             <listitem>
0135                 <para>
0136                     <guilabel>Re-using Calibration</guilabel>: There are two checkboxes related to keeping your calibration. We recommend checking "Store and re-use guide calibration when possible", and un-checking "Reset Guide Calibration After Each Mount Slew".
0137                 </para>
0138             </listitem>
0139             <listitem>
0140                 <para>
0141                     <guilabel>Reverse DEC...</guilabel>: It is also important to check or un-check (it is mount dependent) "Reverse DEC on pier-side change when re-using calibration". To find out the right setting for your mount, you need to successfully calibrate on one pier side, make sure guiding is working well on that side, then switch to the other side. Guide for a minute or two. If DEC runs away, then you probably have the wrong setting for the "Reverse DEC..." checkbox.
0142                 </para>
0143             </listitem>
0144             <listitem>
0145                 <para>
0146                     <guilabel>Max Move, Iterations</guilabel>: We recommend you keep iterations large (e.g. 10) and Max Move large (e.g. 20+ pixels). This way you should get a good estimate of the guiding calibration parameters. Calibration should be something you do rarely, so it is best to take a little extra time and get right.
0147                 </para>
0148             </listitem>
0149         </itemizedlist>
0150         <para>
0151           To (re)calibrate, clear your calibration on the main guiding page, and then simply click on the <guibutton>Guide</guibutton> button. Note that if calibration was already completed successfully before, and you didn't clear the calibration, and you are re-using calibrations, then the autoguiding process will begin immediately, otherwise, it will start the calibration process. 
0152        </para>
0153         <para>
0154             Ekos begins the calibration process by sending pulses to move the mount in RA and DEC. It pulses out the RA axis, then pulses it back in. After that it moves a little in DEC to clear and backlash that might exist, and then pulses out and back in for DEC. To view this graphically, click on the "Calibration Plot" subtab on the main guiding page.
0155         </para>
0156         <sect3 id="guide-calibration-failures">
0157         <title>Calibration Failures</title>
0158             <para>
0159                 Calibration can fail for a variety of reasons. To improve the chances of success, try the tips below.
0160             </para>
0161         <itemizedlist>
0162             <listitem>
0163                 <para>
0164                     Bad sky conditions. If your sky condition are not great, it may not be worth fighting guiding/calibration.
0165                 </para>
0166             </listitem>
0167             <listitem>
0168                 <para>
0169                     Guide camera focus. 
0170                 </para>
0171             </listitem>
0172             <listitem>
0173                 <para>
0174                     Leave algorithm to the default value (<guimenuitem>SEP MultiStar</guimenuitem>) in the Guide Option tab.
0175                 </para>
0176             </listitem>
0177             <listitem>
0178                 <para>
0179                     Try the "Guide-Default" SEP star-detection parameters (in the Guide Option tab) and adjust them if necessary. 
0180                 </para>
0181             </listitem>
0182             <listitem>
0183                 <para>
0184                     <guilabel>Better Polar Alignment</guilabel>: This is critical to the success of any astrophotography session. Use the Ekos <link linkend="ekos-align-polaralignment">Polar Alignment procedure</link> in the <guilabel>Align</guilabel> module.
0185                 </para>
0186             </listitem>
0187             <listitem>
0188                 <para>
0189                     <guilabel>Set binning to 2x2</guilabel>: Binning improves SNR and is often very important to the success of the calibration and guiding procedures.
0190                 </para>
0191             </listitem>
0192             <listitem>
0193                 <para>
0194                     Take dark frames to reduce noise.
0195                 </para>
0196             </listitem>
0197         </itemizedlist>
0198     </sect3>
0199     </sect2>
0200     <sect2 id="guide-guiding">
0201         <title>Guiding</title>
0202 
0203         <screenshot>
0204             <screeninfo>
0205                 Guide Settings
0206             </screeninfo>
0207             <mediaobject>
0208                 <imageobject>
0209                     <imagedata fileref="guide_guide_settings.png" format="PNG"/>
0210                 </imageobject>
0211                 <textobject>
0212                     <phrase>Guide Settings</phrase>
0213                 </textobject>
0214             </mediaobject>
0215         </screenshot>
0216         <para>
0217             Once the calibration process is completed successfully, guiding begins automatically. The guiding performance is displayed in the <guilabel>Drift Graphics</guilabel> region where <guilabel>Green</guilabel> reflects deviations in RA and <guilabel>Blue</guilabel> deviations in DEC. The colors of the RA/DE lines can be changed in <link linkend="colors">&kstars; color scheme</link> in &kstars; settings dialog. The vertical axis denotes the deviation in arcsecs from the lock position and the horizontal axis denotes time. You can hover over the line to get the exact deviation at this particular point in time. You can also zoom and drag/pan the graph to inspect a specific region of the graph. Another convenient place to examine guiding performance is in the Analyze tab.
0218         </para>
0219         <para>
0220             Ekos can utilize multiple algorithms to determine the drift from the (original) lock position, but by far the most accurate is the (default) SEP MultiStar algorithm. It uses the detected position of many stars (in the above settings, up to 50) to determine its best estimate for the current drift. It is dependent on accurate star detection. Thus, it may be important to adjust star-detection parameters. Start with the default Guide-Default SEP profile, and optionally edit its parameters if you feel stars are not being detected accurately.
0221         </para>
0222         <para>
0223           Here are some of the parameters you may want to adjust. Again, good advice in choosing parameters is available on the internet, e.g. from <ulink url="https://openphdguiding.org/PHD2_BestPractices_2019-12.pdf">the above slideshow</ulink>.
0224         </para>
0225         <itemizedlist>
0226             <listitem>
0227                 <para>
0228                     Aggressiveness. How quickly you want the guider to correct the error. Values of 0.5 or 0.6 are usually best (i.e. correcting about half the observed error). Unintuitively, it seems that correcting 100% of the error can cause poor performance as the guider will often oscillate with overcorrections.
0229                 </para>
0230             </listitem>
0231             <listitem>
0232                 <para>
0233                     Algorithm. We strongly recommend you use the most up-to-date algorithm: SEP MultiStar. Pretty much the only reason not to would be if you can't get your SEP star-detection to perform adequately.
0234                 </para>
0235             </listitem>
0236             <listitem>
0237                 <para>
0238                     SEP Profile. Start with Guide-Default, though you may choose others if you have very large or small stars (in terms of number of pixels in diameter).
0239                 </para>
0240             </listitem>
0241         </itemizedlist>
0242     </sect2>
0243     <sect2 id="guide-dithering">
0244         <title>Dithering</title>
0245 
0246         <screenshot>
0247             <screeninfo>
0248                 Dithering Settings
0249             </screeninfo>
0250             <mediaobject>
0251                 <imageobject>
0252                     <imagedata fileref="ekos_guide_dithering_settings.png" format="PNG"/>
0253                 </imageobject>
0254                 <textobject>
0255                     <phrase>Dithering Settings</phrase>
0256                 </textobject>
0257             </mediaobject>
0258         </screenshot>
0259         <para>
0260             To enable automatic dithering between frames, make sure to check the <guilabel>Dither</guilabel> checkbox. By default, Ekos should dither (&ie; move) the guiding box by up to 3 pixels after every N frames captured in <link linkend="ekos-capture">Ekos Capture Module</link>. The motion duration and direction are randomized. Since the guiding performance can oscillate immediately after dithering, you can set the appropriate <guilabel>Settle</guilabel> duration to wait after dither is complete before resuming the capture process. In rare cases where the dithering process can get stuck in an endless loop, set the appropriate <guilabel>Timeout</guilabel> to abort the process. But even if dithering fails, you can select whether this failure should terminate the autoguiding process or not. Toggle <guilabel>Abort Autoguide on failure</guilabel> to select the desired behavior.
0261         </para>
0262         <para>
0263           Dithering does not result in a long wander from the original target position. Ekos keeps track of the original and current target positions, and moves the target back towards the original target should the position have drifted too far.
0264         </para>
0265         <para>
0266             One-pulse dithering is an interesting quicker option which sends a pulse to dither, but does not verify that the dither reached its desired location. It is possible that the dithering for any given dither isn't as much as desired, but the overall effect should be good.
0267         </para>
0268         <para>
0269             Non-guide dithering is also supported. This is useful when no guide camera is available or when performing short exposures. In this case, the mount can be commanded to dither in a random direction for up to the pulse specified in the <guilabel>Non-Guide Dither Pulse</guilabel> option.
0270         </para>
0271     </sect2>
0272     <sect2 id="guide-drift-graphics">
0273         <title>Drift Graphics</title>
0274         <screenshot>
0275             <screeninfo>
0276                 Drift Graphics
0277             </screeninfo>
0278             <mediaobject>
0279                 <imageobject>
0280                     <imagedata fileref="guide_drift_graphics.png" format="PNG"/>
0281                 </imageobject>
0282                 <textobject>
0283                     <phrase>Drift Graphics</phrase>
0284                 </textobject>
0285             </mediaobject>
0286         </screenshot>
0287         <para>
0288             The drift graphics is a very useful tool to monitor the guiding performance. It is a 2D plot of guiding <emphasis>deviations</emphasis> and <emphasis>corrections</emphasis>. By default, only the guiding deviations in RA and DE are displayed. The horizontal axis is the time in seconds since the autoguiding process was started while the vertical axis plots the guiding drift/deviation in arcsecs for each axis. Guiding corrections (pulses) can also be plotted in the same graph and you can enable them by checking the <guilabel>Corr</guilabel> checkbox below each Axis. The corrections are plotted as shaded areas in the background with the same color as that of the axis.
0289         </para>
0290         <para>
0291             You can pan and zoom the plot, and when hovering the mouse over the graph, a tooltip is displayed containing information about this specific point in time. It contains the guiding drift and any corrections made, in addition to the local time, this event was recorded. A vertical slider to the right of the image can be used to adjust the height of the secondary Y-axis for pulses corrections.</para>
0292         <para>
0293             The <guilabel>Trace</guilabel> horizontal slider at the bottom can be used to scroll through the guide history. Alternatively, you can click the <guilabel>Max</guilabel> checkbox to lock the graph onto the latest point so that the drift graphics autoscrolls. The buttons to the right of the slider are used for autoscaling the graphs, exporting the guide data to a CSV file, clearing all the guide data, and for scaling the target in the <guilabel>Drift Plot</guilabel>. Furthermore, the guide graph includes a label to indicate when a dither occurred so the user knows guiding was not bad at those points.
0294         </para>
0295         <para>
0296             The colors of each axis can be customized in <link linkend="colors">&kstars; Settings color scheme</link>.
0297         </para>
0298     </sect2>
0299 
0300     <sect2 id="guide-drift-plot">
0301         <title>Drift Plot</title>
0302         <para>
0303             A bulls-eye scatter plot can be used to gauge the <emphasis>accuracy</emphasis> of the overall guiding performance. It is composed of three concentric rings of varying radii with the central green ring having a default radius of 2 arcsecs. The last RMS value is plotted as <inlinemediaobject><imageobject><imagedata fileref="add-circle.png" format="PNG"/></imageobject></inlinemediaobject> with its color reflecting which concentric ring it falls within. You can change the radius of the innermost green circle by adjusting the drift plot accuracy.
0304         </para>
0305     </sect2>
0306 
0307     <sect2 id="guide-gpg">
0308         <title>Guiding with GPG</title>
0309         <screenshot>
0310             <screeninfo>
0311                 GPG Guiding
0312             </screeninfo>
0313             <mediaobject>
0314                 <imageobject>
0315                     <imagedata fileref="ekos_guide_gpg_settings.png" format="PNG"/>
0316                 </imageobject>
0317                 <textobject>
0318                     <phrase>Guiding with GPG</phrase>
0319                 </textobject>
0320             </mediaobject>
0321         </screenshot>
0322         <para>
0323             With GPG guiding, the internal guider uses predictive and adaptive guiding for the RA axis. This adaptively models the periodic error of the mount, and adds its predicted contribution to each guide pulse. 
0324         </para>
0325         <para>
0326           The main settings to consider are Major Period and Estimate Period. If you know the worm period for your mount, perhaps by examining <ulink url="https://github.com/OpenPHDGuiding/phd2/wiki/Mount-Worm-Period-Info">this table</ulink>, then uncheck Estimate Period and enter your known Major Period. If not, then check Estimate Period.  Intra-frame dark guiding can be used to "spread out the GPG prediction. For instance, if you guide at 5s, you can set the dark guiding interval to 1s and its prediction is pulsed every second, but the guiding drift correction would be sent every 5s. In this way, it outputs the predicted corrections much faster than the guide camera exposure rate, effectively performing periodic error correction and allowing longer guide camera exposures. All the other parameters are best left to defaults.
0327         </para>
0328     </sect2>
0329     <sect2 id="guide-dark-frames">
0330         <title>Dark Frames</title>
0331         <para>
0332             Dark frames can be helpful to reduce noise in your guide frames. If you choose to use this option, then it is recommended that you take dark frames before you begin your calibration or guiding procedure. To take a dark frame, check the <guilabel>Dark</guilabel> checkbox and then click <guibutton>Capture</guibutton>. For the first time this is performed, Ekos will ask you about your camera shutter. If your camera does not have a shutter, then Ekos will warn you anytime you take a dark frame to cover your camera/telescope before proceeding with the capture. On the other hand, if the camera already includes a shutter, then Ekos will directly proceed with taking the dark frame. All dark frames are automatically saved to Ekos Dark Frame Library. By default, the Dark Library keeps reusing dark frames for 30 days after which it will capture new dark frames. This value is configurable and can be adjusted in <link linkend="ekos">Ekos settings</link> in the &kstars; settings dialog.
0333         </para>
0334         <screenshot>
0335             <screeninfo>
0336                 Ekos Dark frames library
0337             </screeninfo>
0338             <mediaobject>
0339                 <imageobject>
0340                     <imagedata fileref="dark_library.png" format="PNG"/>
0341                 </imageobject>
0342                 <textobject>
0343                     <phrase>Ekos Dark frames library</phrase>
0344                 </textobject>
0345             </mediaobject>
0346         </screenshot>
0347         <para>
0348             It is recommended to take dark frames covering several binning and exposure values so that they may be reused transparently by Ekos whenever needed.
0349         </para>
0350     </sect2>
0351     
0352     <sect2 id="guide-phd2-support">
0353         <title>PHD2 Support</title>
0354         <para>
0355             You can opt to select external PHD2 application to perform guiding instead of the built-in guider.
0356         </para>
0357         <screenshot>
0358             <screeninfo>
0359                 Ekos Guide PHD2 settings
0360             </screeninfo>
0361             <mediaobject>
0362                 <imageobject>
0363                     <imagedata fileref="ekos_guide_phd2.png" format="PNG"/>
0364                 </imageobject>
0365                 <textobject>
0366                     <phrase>Ekos Guide PHD2 settings</phrase>
0367                 </textobject>
0368             </mediaobject>
0369         </screenshot>
0370 
0371         <para>
0372             If PHD2 is selected, the <guibutton>Connect</guibutton> and <guibutton>Disconnect</guibutton> buttons are enabled to allow you to establish a connection with the PHD2 server. You can control PHD2 exposure and DEC guide settings. When clicking <guibutton>Guide</guibutton>, PHD2 should perform all the required actions to start the guiding process. PHD2 <emphasis role="bold">must</emphasis> be started and configured <emphasis>before</emphasis> Ekos.
0373         </para>
0374         <para>
0375             After launching PHD2, select your INDI equipment and set their options. From Ekos, connect to PHD2 by clicking the <guibutton>Connect</guibutton> button. On startup, Ekos will attempt to automatically connect to PHD2. Once the connection is established, you may begin the guiding immediately by click on the <guibutton>Guide</guibutton> button. PHD2 performs calibration if necessary. If dithering is selected, PHD2 is commanded to dither given the offset pixels indicated, and once guiding is settled and stable, the capture process in Ekos resumes.
0376         </para>
0377     </sect2>
0378     <sect2 id="guide-logs">
0379         <title>Guiding Logs</title>
0380         <para>
0381             Ekos' internal guider saves a CSV guide log in PHD2 format data that can be useful for analysis of the mount's performance. In Linux this is stored under <filename>~/.local/share/kstars/guidelogs/</filename>. This log is only available when using Ekos' internal guider. It should be compatible with <ulink url="https://openphdguiding.org/phd2-log-viewer/">PHD2's guide log viewer</ulink>.
0382         </para>
0383     </sect2>
0384 </sect1>