<sect1 id="ekos-analyze">
    <title>Analyze</title>
    <indexterm>
        <primary>Tools</primary>
        <secondary>Ekos</secondary>
        <tertiary>Analyze</tertiary>
    </indexterm>
    <screenshot>
        <screeninfo>
            Ekos Analyze Module
        </screeninfo>
        <mediaobject>
            <imageobject>
                <imagedata fileref="ekos_analyze.png" format="PNG"/>
            </imageobject>
            <textobject>
                <phrase>Ekos Analyze Module</phrase>
            </textobject>
        </mediaobject>
    </screenshot>
    <sect2 id="analyze-Introduction">
        <title>Introduction</title>
        <para>
            The Analyze Module records and displays what happened in an imaging session. That is, it does not control any if your imaging, but rather reviews what occurred. Sessions are stored in an <filename class="directory">analyze</filename> folder, a sister folder to the main logging folder. The <literal role="extension">.analyze</literal> files written there can be loaded into the <guilabel>Analyze</guilabel> tab to be viewed. <guilabel>Analyze</guilabel> also can display data from the current imaging session.
        </para>
        <para>
          When a new session begins (e.g. Ekos is disconnected at dawn, then reconnected at sunset) the system will start writing a new .analyze file. (This behavior can be controlled from the Analyze settings reached by clicking the options button on the lower right.)
        </para>        
        <para>
            There are two main graphs, <guilabel>Timeline</guilabel> and <guilabel>Stats</guilabel>. They are coordinated&mdash;they always display the same time interval from the Ekos session, though the x-axis of the <guilabel>Timeline</guilabel> shows seconds elapsed from the start of the log, and <guilabel>Stats</guilabel> shows clock time. The x-axis can be zoomed in and out with the <guibutton>+/-</guibutton> buttons, as well as with standard keyboard shortcuts (&eg; zoom-in == <keycombo>&Ctrl;<keycap>+</keycap></keycombo>) The x-axis can be panned with the scroll bar as well as with the left and right arrow keys. You can view your current imaging session, or review old sessions by loading <literal role="extension">.analyze</literal> files using the <guilabel>Input</guilabel> dropdown. Using the &lt;&lt; and &gt;&gt; buttons allows you to display the previous or following .analyze files chronologically. Checking <guilabel>Full Width</guilabel> displays all the data, and <guilabel>Latest</guilabel> displays the most recent data (you can control the width by zooming).
        </para>
        <para>
            The three main displays can be hidden to make more room for the other displays. There are checkboxes to the left of the section titles (Timeline, Statistics, and Details) that enable and hide the displays.
        </para>
    </sect2>
    <sect2 id="analyze-timeline">
        <title>Timeline</title>
        <para>
        Timeline shows the major Ekos processes, and when they were active. For instance, the <guilabel>Capture</guilabel> line shows when images were taken (wither green for RGB or color-coded by the filter) and when imaging was aborted (shown as red sections). Clicking on a capture section gives information about that image, and double clicking on one brings up the image taken then in a fitsviewer, if it is available.
        </para>
        <note>
            <para>
                If you have moved your captured images, you can set an <guilabel>alternate directory</guilabel> in the analyze settings page you can reach from the Options button in the lower right. This alternate directory would be prepended to the base of part of the original file path and would be checked if the image file is not in its original location.
            </para>
        </note>
        <para>
            Clicking on a <guilabel>Focus</guilabel> segment shows focus session information and displays up the position vs HFR measurements from that session. Clicking on a <guilabel>Guider</guilabel> segment shows a drift plot from that session, (if it's guiding) and the session's RMS statistics. Other timelines show status information when clicked.
        </para>
    </sect2>
    <sect2 id="analyze-statistics">
        <title>Statistics</title>
        <para>
          A variety of statistics can be displayed on the <guilabel>Statistics</guilabel> graph. There are too many for all to be shown in a readable way, so select among them with the checkboxes. A reasonable way to start might be to use <guilabel>rms</guilabel>, <guilabel>snr</guilabel> (using the internal guider with SEP Multistar), and <guilabel>hfr</guilabel> (if you have auto-compute HFR in the FITS options). Experiment with others.
        </para>
        <para>
          The left axis shown is initially appropriate only for RA/DEC error, drift, RMS error, RA/DEC pulses, and HFR, plotted in arc-seconds and defaulting to a range of -2 to 5 arc-seconds. However, clicking on one of boxes below the Statistics graph (that shows a statistic's value) will set that statistic's range as the range shown on the left-axis. Double clicking on that box will bring up a menu allowing you to adjust the statistic's plotted y-range (e.g. setting it to auto, explicitly typing in the range, setting it back to its default value, and also changing the color of that statistic's plot).
        </para>
        <para>
          The statistic shown on the left axis can also be scaled (awkwardly) using the mouse <mousebutton>wheel</mousebutton>. It can be panned by dragging the mouse up or down over the left axis' numbers.  Clicking anywhere inside the Statistics graph fills in the values of the displayed statistics. Checking the latest box causes the most recent values (from a live session) to be the statistics displayed. This graph is zoomed and panned horizontally in coordination with the timeline.
        </para>
    </sect2>
</sect1>
