Kstars

analyze.h
1/*
2 SPDX-FileCopyrightText: 2020 Hy Murveit <hy@murveit.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#ifndef ANALYZE_H
8#define ANALYZE_H
9
10#include <memory>
11#include "ekos/ekos.h"
12#include "ekos/mount/mount.h"
13#include "indi/indimount.h"
14#include "yaxistool.h"
15#include "ui_analyze.h"
16#include "ekos/manager/meridianflipstate.h"
17#include "ekos/focus/focusutils.h"
18
19class FITSViewer;
20class OffsetDateTimeTicker;
21class QCustomPlot;
22
23namespace Ekos
24{
25
26class RmsFilter;
27
28/**
29 *@class Analyze
30 *@short Analysis tab for Ekos sessions.
31 *@author Hy Murveit
32 *@version 1.0
33 */
34class Analyze : public QWidget, public Ui::Analyze
35{
37
38 public:
39 Analyze();
40 ~Analyze();
41
42 // Baseclass used to represent a segment of Timeline data.
43 class Session
44 {
45 public:
46 // Start and end time in seconds since start of the log.
47 double start, end;
48 // y-offset for the timeline plot. Each line uses a different integer.
49 int offset;
50 // Variables used in temporary sessions. A temporary session
51 // represents a process that has started but not yet finished.
52 // Those are plotted "for now", but will be replaced by the
53 // finished line when the process completes.
54 // Rect is the temporary graphic on the Timeline, and
55 // temporaryBrush defines its look.
56 QCPItemRect *rect;
57 QBrush temporaryBrush;
58
59 Session(double s, double e, int o, QCPItemRect *r)
60 : start(s), end(e), offset(o), rect(r) {}
61
62 Session() : start(0), end(0), offset(0), rect(nullptr) {}
63
64 // These 2 are used to build tables for the details display.
65 void setupTable(const QString &name, const QString &status,
67 QTableWidget *table);
68 void addRow(const QString &key, const QString &value);
69
70 // True if this session is temporary.
71 bool isTemporary() const;
72
73 private:
74 QTableWidget *details;
75 QString htmlString;
76 };
77 // Below are subclasses of Session used to represent all the different
78 // lines in the Timeline. Each of those hold different types of information
79 // about the process it represents.
80 class CaptureSession : public Session
81 {
82 public:
83 bool aborted;
84 QString filename;
85 double duration;
86 QString filter;
87 double hfr;
88 CaptureSession(double start_, double end_, QCPItemRect *rect,
89 bool aborted_, const QString &filename_,
90 double duration_, const QString &filter_)
91 : Session(start_, end_, CAPTURE_Y, rect),
92 aborted(aborted_), filename(filename_),
93 duration(duration_), filter(filter_), hfr(0) {}
94 CaptureSession() : Session(0, 0, CAPTURE_Y, nullptr) {}
95 };
96 // Guide sessions collapse some of the possible guiding states.
97 // SimpleGuideState are those collapsed states.
98 typedef enum
99 {
100 G_IDLE, G_GUIDING, G_CALIBRATING, G_SUSPENDED, G_DITHERING, G_IGNORE
101 } SimpleGuideState;
102 class GuideSession : public Session
103 {
104 public:
105 SimpleGuideState simpleState;
106 GuideSession(double start_, double end_, QCPItemRect *rect, SimpleGuideState state_)
107 : Session(start_, end_, GUIDE_Y, rect), simpleState(state_) {}
108 GuideSession() : Session(0, 0, GUIDE_Y, nullptr) {}
109 };
110 class AlignSession : public Session
111 {
112 public:
113 AlignState state;
114 AlignSession(double start_, double end_, QCPItemRect *rect, AlignState state_)
115 : Session(start_, end_, ALIGN_Y, rect), state(state_) {}
116 AlignSession() : Session(0, 0, ALIGN_Y, nullptr) {}
117 };
118 class MountSession : public Session
119 {
120 public:
121 ISD::Mount::Status state;
122 MountSession(double start_, double end_, QCPItemRect *rect, ISD::Mount::Status state_)
123 : Session(start_, end_, MOUNT_Y, rect), state(state_) {}
124 MountSession() : Session(0, 0, MOUNT_Y, nullptr) {}
125 };
126 class MountFlipSession : public Session
127 {
128 public:
129 MeridianFlipState::MeridianFlipMountState state;
130 MountFlipSession(double start_, double end_, QCPItemRect *rect, MeridianFlipState::MeridianFlipMountState state_)
131 : Session(start_, end_, MERIDIAN_MOUNT_FLIP_Y, rect), state(state_) {}
132 MountFlipSession() : Session(0, 0, MERIDIAN_MOUNT_FLIP_Y, nullptr) {}
133 };
134 class SchedulerJobSession : public Session
135 {
136 public:
137 SchedulerJobSession(double start_, double end_, QCPItemRect *rect,
138 const QString &jobName_, const QString &reason_)
139 : Session(start_, end_, SCHEDULER_Y, rect), jobName(jobName_), reason(reason_) {}
140 SchedulerJobSession() : Session(0, 0, SCHEDULER_Y, nullptr) {}
141 QString jobName;
142 QString reason;
143 };
144 class FocusSession : public Session
145 {
146 public:
147 bool success;
148 double temperature;
149 QString filter;
150
151 // Standard focus parameters
152 AutofocusReason reason;
153 QString reasonInfo;
154 AutofocusFailReason failCode;
155 QString failCodeInfo;
156 QString points;
157 bool useWeights;
158 QString curve;
159 QString title;
160 QVector<double> positions; // Double to be more friendly to QCustomPlot addData.
161 QVector<double> hfrs;
162 QVector<double> weights;
163 QVector<bool> outliers;
164
165 // Adaptive focus parameters
166 double tempTicks, altitude, altTicks;
167 int prevPosError, thisPosError, totalTicks, adaptedPosition;
168
169 // false for adaptiveFocus.
170 bool standardSession = true;
171
172 FocusSession() : Session(0, 0, FOCUS_Y, nullptr) {}
173 FocusSession(double start_, double end_, QCPItemRect *rect, bool ok, double temperature_,
174 const QString &filter_, const QString &points_, const QString &curve_, const QString &title_);
175 FocusSession(double start_, double end_, QCPItemRect *rect, bool ok, double temperature_,
176 const QString &filter_, const AutofocusReason reason_, const QString &reasonInfo_, const QString &points_, const bool useWeights_,
177 const QString &curve_, const QString &title_, const AutofocusFailReason failCode_, const QString failCodeInfo_);
178 FocusSession(double start_, double end_, QCPItemRect *rect,
179 const QString &filter_, double temperature_, double tempTicks_, double altitude_,
180 double altTicks_, int prevPosError, int thisPosError, int totalTicks_, int position_);
181 double focusPosition();
182 };
183
184 void clearLog();
185 QStringList logText()
186 {
187 return m_LogText;
188 }
189 QString getLogText()
190 {
191 return m_LogText.join("\n");
192 }
193
194 public slots:
195 // These slots are messages received from the different Ekos processes
196 // used to gather data about those processes.
197
198 // From Capture
199 void captureComplete(const QVariantMap &metadata);
200 void captureStarting(double exposureSeconds, const QString &filter);
201 void captureAborted(double exposureSeconds);
202
203 // From Guide
204 void guideState(Ekos::GuideState status);
205 void guideStats(double raError, double decError, int raPulse, int decPulse,
206 double snr, double skyBg, int numStars);
207
208 // From Focus
209 void autofocusStarting(double temperature, const QString &filter, const AutofocusReason reason, const QString &reasonInfo);
210 void autofocusComplete(const double temperature, const QString &filter, const QString &points, const bool useWeights,
211 const QString &curve, const QString &title);
212 void adaptiveFocusComplete(const QString &filter, double temperature, double tempTicks,
213 double altitude, double altTicks, int prevPosError, int thisPosError, int totalTicks,
214 int position, bool focuserMoved);
215 void autofocusAborted(const QString &filter, const QString &points, const bool useWeights,
216 const AutofocusFailReason failCode, const QString failCodeInfo);
217 void newTemperature(double temperatureDelta, double temperature);
218
219 // From Align
220 void alignState(Ekos::AlignState state);
221
222 // From Mount
223 void mountState(ISD::Mount::Status status);
224 void mountCoords(const SkyPoint &position, ISD::Mount::PierSide pierSide, const dms &haValue);
225 void mountFlipStatus(Ekos::MeridianFlipState::MeridianFlipMountState status);
226
227 void schedulerJobStarted(const QString &jobName);
228 void schedulerJobEnded(const QString &jobName, const QString &endReason);
229 void newTargetDistance(double targetDistance);
230
231 // From YAxisTool
232 void userChangedYAxis(QObject *key, const YAxisInfo &axisInfo);
233 void userSetLeftAxis(QCPAxis *axis);
234 void userSetAxisColor(QObject *key, const YAxisInfo &axisInfo, const QColor &color);
235
236 void yAxisRangeChanged(const QCPRange &newRange);
237
238 void appendLogText(const QString &);
239
240 private slots:
241
242 signals:
243 void newLog(const QString &text);
244
245 private:
246
247 // The file-reading, processInputLine(), and signal-slot codepaths share the methods below
248 // to process their messages. Time is the offset in seconds from the start of the log.
249 // BatchMode is true in the file reading path. It means don't call replot() as there may be
250 // many more messages to come. The rest of the args are specific to the message type.
251 void processCaptureStarting(double time, double exposureSeconds, const QString &filter);
252 void processCaptureComplete(double time, const QString &filename, double exposureSeconds, const QString &filter,
253 double hfr, int numStars, int median, double eccentricity, bool batchMode = false);
254 void processCaptureAborted(double time, double exposureSeconds, bool batchMode = false);
255 void processAutofocusStarting(double time, double temperature, const QString &filter, const AutofocusReason reason, const QString &reasonInfo);
256 void processAutofocusComplete(double time, const QString &filter, const QString &points, const QString &curve, const QString &title, bool batchMode);
257 void processAutofocusCompleteV2(double time, double temperature, const QString &filter, const AutofocusReason reason, const QString &reasonInfo,
258 const QString &points, const bool useWeights, const QString &curve, const QString &title, bool batchMode = false);
259 void processAutofocusAborted(double time, const QString &filter, const QString &points, bool batchMode);
260 void processAutofocusAbortedV2(double time, double temperature, const QString &filter, const AutofocusReason reason, const QString &reasonInfo,
261 const QString &points, const bool useWeights, const AutofocusFailReason failCode, const QString failCodeInfo, bool batchMode = false);
262 void processAdaptiveFocusComplete(double time, const QString &filter, double temperature, double tempTicks,
263 double altitude, double altTicks, int prevPosError, int thisPosError, int totalTicks,
264 int position, bool focuserMoved, bool batchMode = false);
265 void processTemperature(double time, double temperature, bool batchMode = false);
266 void processGuideState(double time, const QString &state, bool batchMode = false);
267 void processGuideStats(double time, double raError, double decError, int raPulse,
268 int decPulse, double snr, double skyBg, int numStars, bool batchMode = false);
269 void processMountCoords(double time, double ra, double dec, double az, double alt,
270 int pierSide, double ha, bool batchMode = false);
271
272 void processMountState(double time, const QString &statusString, bool batchMode = false);
273 void processAlignState(double time, const QString &statusString, bool batchMode = false);
274 void processMountFlipState(double time, const QString &statusString, bool batchMode = false);
275
276 void processSchedulerJobStarted(double time, const QString &jobName);
277 void processSchedulerJobEnded(double time, const QString &jobName, const QString &reason, bool batchMode = false);
278 void checkForMissingSchedulerJobEnd(double time);
279 void processTargetDistance(double time, double targetDistance, bool batchMode = false);
280
281 // Plotting primatives.
282 void replot(bool adjustSlider = true);
283 void zoomIn();
284 void zoomOut();
285 void scroll(int value);
286 void scrollRight();
287 void scrollLeft();
288 void statsYZoom(double zoomAmount);
289 void statsYZoomIn();
290 void statsYZoomOut();
291 // Return true if the session is visible on the plots.
292 bool isVisible(const Session &s) const;
293 // Shift the view so that time is at the center (keeping the current plot width).
294 void adjustView(double time);
295
296
297 // maxXValue keeps the largest time offset we've received so far.
298 // It represents the extent of the plots (0 -> maxXValue).
299 // This is called each time a message is received in case that message's
300 // time is past the current value of maxXValue.
301 void updateMaxX(double time);
302
303 // Callbacks for when the timeline is clicked. ProcessTimelineClick
304 // will determine which segment on which line was clicked and then
305 // call captureSessionClicked() or focusSessionClicked, etc.
306 void processTimelineClick(QMouseEvent *event, bool doubleClick);
307 void captureSessionClicked(CaptureSession &c, bool doubleClick);
308 void focusSessionClicked(FocusSession &c, bool doubleClick);
309 void guideSessionClicked(GuideSession &c, bool doubleClick);
310 void mountSessionClicked(MountSession &c, bool doubleClick);
311 void alignSessionClicked(AlignSession &c, bool doubleClick);
312 void mountFlipSessionClicked(MountFlipSession &c, bool doubleClick);
313 void schedulerSessionClicked(SchedulerJobSession &c, bool doubleClick);
314
315 // Low-level callbacks.
316 // These two call processTimelineClick().
317 void timelineMousePress(QMouseEvent *event);
318 void timelineMouseDoubleClick(QMouseEvent *event);
319 // Calls zoomIn or zoomOut.
320 void timelineMouseWheel(QWheelEvent *event);
321 // Sets the various displays visbile or not according to the checkboxes.
322 void setVisibility();
323
324 void processStatsClick(QMouseEvent *event, bool doubleClick);
325 void statsMousePress(QMouseEvent *event);
326 void statsMouseDoubleClick(QMouseEvent *event);
327 void statsMouseMove(QMouseEvent *event);
328 void setupKeyboardShortcuts(QWidget *plot);
329
330 // (Un)highlights a segment on the timeline after one is clicked.
331 // This indicates which segment's data is displayed in the
332 // graphicsPlot and details table.
333 void highlightTimelineItem(const Session &session);
334 void unhighlightTimelineItem();
335
336 // Tied to the keyboard shortcuts that go to the next or previous
337 // items on the timeline. next==true means next, otherwise previous.
338 void changeTimelineItem(bool next);
339 // These are assigned to various keystrokes.
340 void nextTimelineItem();
341 void previousTimelineItem();
342
343 // logTime() returns the number of seconds between "now" or "time" and
344 // the start of the log. They are useful for recording signal and storing
345 // them to file. They are not useful when reading data from files.
346 double logTime();
347 // Returns the number of seconds between time and the start of the log.
348 double logTime(const QDateTime &time);
349 // Goes back from logSeconds to human-readable clock time.
350 QDateTime clockTime(double logSeconds);
351
352 // Add a new segment to the Timeline graph.
353 // Returns a rect item, which is only important temporary objects, who
354 // need to erase the item when the temporary session is removed.
355 // This memory is owned by QCustomPlot and shouldn't be freed.
356 // This pointer is stored in Session::rect.
357 QCPItemRect * addSession(double start, double end, double y,
358 const QBrush &brush, const QBrush *stripeBrush = nullptr);
359
360 // Manage temporary sessions (only used for live data--file-reading doesn't
361 // need temporary sessions). For example, when an image capture has started
362 // but not yet completed, a temporary session is added to the timeline to
363 // represent the not-yet-completed capture.
364 void addTemporarySession(Session *session, double time, double duration,
365 int y_offset, const QBrush &brush);
366 void removeTemporarySession(Session *session);
367 void removeTemporarySessions();
368 void adjustTemporarySession(Session *session);
369 void adjustTemporarySessions();
370
371 // Add new stats to the statsPlot.
372 void addGuideStats(double raDrift, double decDrift, int raPulse, int decPulse,
373 double snr, int numStars, double skyBackground, double time);
374 void addGuideStatsInternal(double raDrift, double decDrift, double raPulse,
375 double decPulse, double snr, double numStars,
376 double skyBackground, double drift, double rms, double time);
377 void addMountCoords(double ra, double dec, double az, double alt, int pierSide,
378 double ha, double time);
379 void addHFR(double hfr, int numCaptureStars, int median, double eccentricity,
380 const double time, double startTime);
381 void addTemperature(double temperature, const double time);
382 void addFocusPosition(double focusPosition, double time);
383 void addTargetDistance(double targetDistance, const double time);
384
385 // Initialize the graphs (axes, linestyle, pen, name, checkbox callbacks).
386 // Returns the graph index.
387 int initGraph(QCustomPlot *plot, QCPAxis *yAxis, QCPGraph::LineStyle lineStyle,
388 const QColor &color, const QString &name);
389 template <typename Func>
390 int initGraphAndCB(QCustomPlot *plot, QCPAxis *yAxis, QCPGraph::LineStyle lineStyle,
391 const QColor &color, const QString &name, const QString &shortName,
392 QCheckBox *cb, Func setCb, QLineEdit *out = nullptr);
393
394 // Make graphs visible/invisible & add/delete them from the legend.
395 void toggleGraph(int graph_id, bool show);
396
397 // Initializes the main QCustomPlot windows.
398 void initStatsPlot();
399 void initTimelinePlot();
400 void initGraphicsPlot();
401 void initInputSelection();
402
403 // Displays the focus positions and HFRs on the graphics plot.
404 void displayFocusGraphics(const QVector<double> &positions, const QVector<double> &hfrs, const bool useWeights,
405 const QVector<double> &weights, const QVector<bool> &outliers, const QString &curve, const QString &title, bool success);
406 // Displays the guider ra and dec drift plot, and computes RMS errors.
407 void displayGuideGraphics(double start, double end, double *raRMS,
408 double *decRMS, double *totalRMS, int *numSamples);
409
410 // Updates the stats value display boxes next to their checkboxes.
411 void updateStatsValues();
412 // Manages the statsPlot cursor.
413 void setStatsCursor(double time);
414 void removeStatsCursor();
415 void keepCurrent(int state);
416
417 // Restore checkboxs from Options.
418 void initStatsCheckboxes();
419
420 // Clears the data, resets the various plots & displays.
421 void reset();
422 void resetGraphicsPlot();
423
424 // Resets the variables used to process the signals received.
425 void resetCaptureState();
426 void resetAutofocusState();
427 void resetGuideState();
428 void resetGuideStats();
429 void resetAlignState();
430 void resetMountState();
431 void resetMountCoords();
432 void resetMountFlipState();
433 void resetSchedulerJob();
434 void resetTemperature();
435
436 // Read and display an input .analyze file.
437 double readDataFromFile(const QString &filename);
438 double processInputLine(const QString &line);
439
440 // Opens a FITS file for viewing.
441 void displayFITS(const QString &filename);
442
443 // Pop up a help-message window.
444 void helpMessage();
445
446 // Write the analyze log file message.
447 void saveMessage(const QString &type, const QString &message);
448 // low level file writing.
449 void startLog();
450 void appendToLog(const QString &lines);
451
452 // Used to capture double clicks on stats output QLineEdits to set y-axis limits.
453 bool eventFilter(QObject *o, QEvent *e) override;
454 QTimer clickTimer;
455 YAxisInfo m_ClickTimerInfo;
456
457 // Utility that adds a y-axis to the stats plot.
458 QCPAxis *newStatsYAxis(const QString &label, double lower = YAxisInfo::LOWER_RESCALE,
459 double upper = YAxisInfo::UPPER_RESCALE);
460
461 // Save and restore user-updated y-axis limits.
462 QString serializeYAxes();
463 bool restoreYAxes(const QString &encoding);
464
465 // Sets the y-axis to be displayed on the left of the statsPlot.
466 void setLeftAxis(QCPAxis *axis);
467 void updateYAxisMap(QObject *key, const YAxisInfo &axisInfo);
468
469 // The pop-up allowing users to edit y-axis lower and upper graph values.
470 YAxisTool m_YAxisTool;
471
472 // The y-axis values displayed to the left of the stat's graph.
473 QCPAxis *activeYAxis { nullptr };
474
475 void startYAxisTool(QObject *key, const YAxisInfo &info);
476
477 // Map connecting QLineEdits to Y-Axes, so when a QLineEdit is double clicked,
478 // the corresponding y-axis can be found.
479 std::map<QObject*, YAxisInfo> yAxisMap;
480
481 // The .analyze log file being written.
482 QString logFilename { "" };
483 QFile logFile;
484 bool logInitialized { false };
485
486 // These define the view for the timeline and stats plots.
487 // The plots start plotStart seconds from the start of the session, and
488 // are plotWidth seconds long. The end of the X-axis is maxXValue.
489 double plotStart { 0.0 };
490 double plotWidth { 10.0 };
491 double maxXValue { 10.0 };
492
493 // Data are displayed in seconds since the session started.
494 // analyzeStartTime is when the session started, used to translate to clock time.
495 QDateTime analyzeStartTime;
496 QString analyzeTimeZone { "" };
497 bool startTimeInitialized { false };
498
499 // displayStartTime is similar to analyzeStartTime, but references the
500 // start of the log being displayed (e.g. if reading from a file).
501 // When displaying the current session it should equal analyzeStartTime.
502 QDateTime displayStartTime;
503
504 // AddGuideStats uses RmsFilter to compute RMS values of the squared
505 // RA and DEC errors, thus calculating the RMS error.
506 std::unique_ptr<RmsFilter> guiderRms;
507 std::unique_ptr<RmsFilter> captureRms;
508
509 // Used to keep track of the y-axis position when moving it with the mouse.
510 double yAxisInitialPos = { 0 };
511
512 // Used to display clock-time on the X-axis.
514
515 // The rectangle over the current selection.
516 // Memory owned by QCustomPlot.
517 QCPItemRect *selectionHighlight { nullptr };
518
519 // FITS Viewer to display FITS images.
521 // When trying to load a FITS file, if the original file path doesn't
522 // work, Analyze tries to find the file under the alternate folder.
523 QString alternateFolder;
524
525 // The vertical line in the stats plot.
526 QCPItemLine *statsCursor { nullptr };
527 QCPItemLine *timelineCursor { nullptr };
528 double statsCursorTime { -1 };
529
530 // Keeps the directory from the last time the user loaded a .analyze file.
531 QUrl dirPath;
532
533 // True if Analyze is displaying data as it comes in from the other modules.
534 // False if Analyze is displaying data read from a file.
535 bool runtimeDisplay { true };
536
537 // When a module's session is ongoing, we represent it as a "temporary session"
538 // which will be replaced once the session is done.
539 CaptureSession temporaryCaptureSession;
540 FocusSession temporaryFocusSession;
541 GuideSession temporaryGuideSession;
542 AlignSession temporaryAlignSession;
543 MountSession temporaryMountSession;
544 MountFlipSession temporaryMountFlipSession;
545 SchedulerJobSession temporarySchedulerJobSession;
546
547 // Capture state-machine variables.
548 double captureStartedTime { -1 };
549 double previousCaptureStartedTime { 1 };
550 double previousCaptureCompletedTime { 1 };
551 QString captureStartedFilter { "" };
552
553 // Autofocus state-machine variables.
554 double autofocusStartedTime { -1 };
555 QString autofocusStartedFilter { "" };
556 double autofocusStartedTemperature { 0 };
557 AutofocusReason autofocusStartedReason { AutofocusReason::FOCUS_NONE};
558 QString autofocusStartedReasonInfo { "" };
559
560 // GuideState state-machine variables.
561 SimpleGuideState lastGuideStateStarted { G_IDLE };
562 double guideStateStartedTime { -1 };
563
564 // GuideStats state-machine variables.
565 double lastGuideStatsTime { -1 };
566 double lastCaptureRmsTime { -1 };
567 int numStarsMax { 0 };
568 double snrMax { 0 };
569 double skyBgMax { 0 };
570 int medianMax { 0 };
571 int numCaptureStarsMax { 0 };
572 double lastTemperature { -1000 };
573
574 // AlignState state-machine variables.
575 AlignState lastAlignStateReceived { ALIGN_IDLE };
576 AlignState lastAlignStateStarted { ALIGN_IDLE };
577 double lastAlignStateStartedTime { -1 };
578
579 // MountState state-machine variables.
580 double mountStateStartedTime { -1 };
581 ISD::Mount::Status lastMountState { ISD::Mount::Status::MOUNT_IDLE };
582
583 // Mount coords state machine variables.
584 // Used to filter out mount Coords messages--we only process ones
585 // where the values have changed significantly.
586 double lastMountRa { -1 };
587 double lastMountDec { -1 };
588 double lastMountHa { -1 };
589 double lastMountAz { -1 };
590 double lastMountAlt { -1 };
591 int lastMountPierSide { -1 };
592
593 // Flip state machine variables
594 MeridianFlipState::MeridianFlipMountState lastMountFlipStateReceived { MeridianFlipState::MOUNT_FLIP_NONE};
595 MeridianFlipState::MeridianFlipMountState lastMountFlipStateStarted { MeridianFlipState::MOUNT_FLIP_NONE };
596 double mountFlipStateStartedTime { -1 };
597
598 // SchedulerJob state machine variables
599 double schedulerJobStartedTime;
600 QString schedulerJobStartedJobName;
601
602 QMap<QString, QColor> schedulerJobColors;
603 QBrush schedulerJobBrush(const QString &jobName, bool temporary);
604
605 void setSelectedSession(const Session &s);
606 void clearSelectedSession();
607 Session m_selectedSession;
608
609 // Analyze log file info.
610 QStringList m_LogText;
611
612 // Y-offsets for the timeline plot for the various modules.
613 static constexpr int CAPTURE_Y = 1;
614 static constexpr int FOCUS_Y = 2;
615 static constexpr int ALIGN_Y = 3;
616 static constexpr int GUIDE_Y = 4;
617 static constexpr int MERIDIAN_MOUNT_FLIP_Y = 5;
618 static constexpr int MOUNT_Y = 6;
619 static constexpr int SCHEDULER_Y = 7;
620 static constexpr int LAST_Y = 8;
621
622 // Error bars used on the Focus graphs
623 QCPErrorBars *errorBars = nullptr;
624 QCPErrorBars *finalErrorBars = nullptr;
625};
626}
627
628
629#endif // Analyze
Analysis tab for Ekos sessions.
Definition analyze.h:35
Primary window to view monochrome and color FITS images.
Definition fitsviewer.h:50
Manages a single axis inside a QCustomPlot.
A plottable that adds a set of error bars to other plottables.
A line from one point to another.
A rectangle.
Represents the range an axis is encompassing.
The central class of the library. This is the QWidget which displays the plot and interacts with the ...
The sky coordinates of a point in the sky.
Definition skypoint.h:45
Manages adjusting the Y-axis of Analyze stats graphs.
Definition yaxistool.h:69
An angle, stored as degrees, but expressible in many ways.
Definition dms.h:38
Ekos is an advanced Astrophotography tool for Linux.
Definition align.cpp:78
AlignState
Definition ekos.h:145
@ ALIGN_IDLE
No ongoing operations.
Definition ekos.h:146
Q_OBJECTQ_OBJECT
QString join(QChar separator) const const
virtual bool event(QEvent *event) override
void lower()
void show()
bool isVisible() const const
Used to keep track of the various Y-axes and connect them to the QLineEdits.
Definition yaxistool.h:25
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:02 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.