Ekos::CaptureProcess
#include <captureprocess.h>

Public Types | |
enum | ADUAlgorithm { ADU_LEAST_SQUARES, ADU_POLYNOMIAL } |
Signals | |
void | abortFocus () |
void | addJob (SequenceJob *job) |
void | cameraReady () |
void | captureAborted (double exposureSeconds) |
void | captureComplete (const QVariantMap &metadata) |
void | captureImageStarted () |
void | captureRunning () |
void | captureStopped () |
void | captureTarget (QString targetName) |
void | createJob (SequenceJob::SequenceJobType jobtype=SequenceJob::JOBTYPE_BATCH) |
void | darkFrameCompleted () |
void | downloadingFrame () |
void | driverTimedout (const QString &deviceName) |
void | jobExecutionPreparationStarted () |
void | jobPrepared (SequenceJob *job) |
void | jobStarting () |
void | newDownloadProgress (double downloadTimeLeft) |
void | newExposureProgress (SequenceJob *job) |
void | newImage (SequenceJob *job, const QSharedPointer< FITSData > &data) |
void | newLog (const QString &text) |
void | processingFITSfinished (bool success) |
void | refreshCamera () |
void | refreshCameraSettings () |
void | refreshFilterSettings () |
void | resumeGuiding () |
void | rotatorReverseToggled (bool enabled) |
void | sequenceChanged (const QJsonArray &sequence) |
void | stopCapture (CaptureState targetState=CAPTURE_IDLE) |
void | suspendGuiding () |
void | syncGUIToJob (SequenceJob *job) |
void | updateCaptureCountDown (int deltaMS) |
void | updateFrameProperties (int reset) |
void | updateJobTable (SequenceJob *job, bool full=false) |
void | updateMeridianFlipStage (MeridianFlipState::MFStage stage) |
Public Member Functions | |
CaptureProcess (QSharedPointer< CaptureModuleState > newModuleState, QSharedPointer< CaptureDeviceAdaptor > newDeviceAdaptor) | |
double | calculateFlatExpTime (double currentADU) |
void | captureImage () |
void | capturePreview (bool loop=false) |
QProcess & | captureScript () |
void | captureStarted (CaptureModuleState::CAPTUREResult rc) |
void | checkCamera () |
bool | checkFlatCalibration (QSharedPointer< FITSData > imageData, double exp_min, double exp_max) |
IPState | checkLightFramePendingTasks () |
void | checkNextExposure () |
bool | checkPausing (CaptureModuleState::ContinueAction continueAction) |
void | clearFlatCache () |
IPState | continueFramingAction (const QSharedPointer< FITSData > &imageData) |
void | executeJob () |
QStringList | filterLabels () |
SequenceJob * | findNextPendingJob () |
QStringList | frameTypes () |
QStringList | generateScriptArguments () const |
bool | hasCoolerControl () |
void | imageCapturingCompleted () |
void | jobCreated (SequenceJob *newJob) |
void | llsq (QVector< double > x, QVector< double > y, double &a, double &b) |
bool | loadSequenceQueue (const QString &fileURL, QString targetName="") |
void | pauseCapturing () |
void | prepareActiveJobStage1 () |
void | prepareActiveJobStage2 () |
void | prepareJob (SequenceJob *job) |
void | prepareJobExecution () |
IPState | previewImageCompletedAction (QSharedPointer< FITSData > imageData) |
IPState | processCaptureCompleted () |
void | processCaptureError (ISD::Camera::ErrorType type) |
void | processCaptureTimeout () |
void | processFITSData (const QSharedPointer< FITSData > &data) |
void | processJobCompletion1 () |
void | processJobCompletion2 () |
void | processNewRemoteFile (QString file) |
IPState | processPreCaptureCalibrationStage () |
void | reconnectCameraDriver (const QString &camera, const QString &filterWheel) |
void | refreshOpticalTrain (QString name) |
void | removeDevice (const QSharedPointer< ISD::GenericDevice > &device) |
void | resetFrame () |
void | restartCamera (const QString &name) |
IPState | resumeSequence () |
IPState | runCaptureScript (ScriptTypes scriptType, bool precond=true) |
bool | saveSequenceQueue (const QString &path) |
void | scriptFinished (int exitCode, QProcess::ExitStatus status) |
void | selectCamera (QString name) |
void | setCamera (bool connection) |
bool | setCamera (ISD::Camera *device) |
bool | setCoolerControl (bool enable) |
bool | setDome (ISD::Dome *device) |
void | setDownloadProgress () |
bool | setDustCap (ISD::DustCap *device) |
void | setExposureProgress (ISD::CameraChip *tChip, double value, IPState state) |
bool | setFilterWheel (ISD::FilterWheel *device) |
bool | setLightBox (ISD::LightBox *device) |
bool | setMount (ISD::Mount *device) |
bool | setRotator (ISD::Rotator *device) |
void | setScope (const QString &name) |
void | startJob (SequenceJob *job) |
IPState | startNextExposure () |
IPState | startNextJob () |
void | startNextPendingJob () |
void | stopCapturing (CaptureState targetState) |
void | syncDSLRToTargetChip (const QString &model) |
void | toggleSequence () |
void | toggleVideo (bool enabled) |
IPState | updateCompletedCaptureCountersAction () |
IPState | updateDownloadTimesAction () |
void | updateFilterInfo () |
void | updateGain (double value, QMap< QString, QMap< QString, QVariant > > &propertyMap) |
IPState | updateImageMetadataAction (QSharedPointer< FITSData > imageData) |
void | updateOffset (double value, QMap< QString, QMap< QString, QVariant > > &propertyMap) |
void | updatePreCaptureCalibrationStatus () |
void | updateTelescopeInfo () |
![]() | |
QObject (QObject *parent) | |
bool | blockSignals (bool block) |
const QObjectList & | children () const const |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) const const |
bool | disconnect (const QObject *receiver, const char *method) const const |
void | dumpObjectInfo () |
void | dumpObjectInfo () const const |
void | dumpObjectTree () |
void | dumpObjectTree () const const |
QList< QByteArray > | dynamicPropertyNames () const const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegExp ®Exp, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const const |
bool | inherits (const char *className) const const |
void | installEventFilter (QObject *filterObj) |
bool | isWidgetType () const const |
bool | isWindowType () const const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const const |
void | moveToThread (QThread *targetThread) |
QString | objectName () const const |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () const const |
QVariant | property (const char *name) const const |
Q_CLASSINFO (Name, Value) | |
Q_DISABLE_COPY (Class) | |
Q_DISABLE_COPY_MOVE (Class) | |
Q_DISABLE_MOVE (Class) | |
Q_EMIT Q_EMIT | |
Q_ENUM (...) | |
Q_ENUM_NS (...) | |
Q_ENUMS (...) | |
Q_FLAG (...) | |
Q_FLAG_NS (...) | |
Q_FLAGS (...) | |
Q_GADGET Q_GADGET | |
Q_INTERFACES (...) | |
Q_INVOKABLE Q_INVOKABLE | |
Q_NAMESPACE Q_NAMESPACE | |
Q_NAMESPACE_EXPORT (EXPORT_MACRO) | |
Q_OBJECT Q_OBJECT | |
Q_PROPERTY (...) | |
Q_REVISION Q_REVISION | |
Q_SET_OBJECT_NAME (Object) | |
Q_SIGNAL Q_SIGNAL | |
Q_SIGNALS Q_SIGNALS | |
Q_SLOT Q_SLOT | |
Q_SLOTS Q_SLOTS | |
T | qFindChild (const QObject *obj, const QString &name) |
QList< T > | qFindChildren (const QObject *obj, const QRegExp ®Exp) |
QList< T > | qFindChildren (const QObject *obj, const QString &name) |
T | qobject_cast (const QObject *object) |
T | qobject_cast (QObject *object) |
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
void | removeEventFilter (QObject *obj) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const const |
int | startTimer (int interval, Qt::TimerType timerType) |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType) |
QThread * | thread () const const |
Additional Inherited Members | |
![]() | |
objectName | |
![]() | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
bool | disconnect (const QMetaObject::Connection &connection) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
![]() | |
typedef | QObjectList |
![]() | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const const |
int | receivers (const char *signal) const const |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
Detailed Description
The CaptureProcess class holds the entire business logic to control capturing execution.
Capture Execution
Executing the sequence jobs is a complex process (explained here for light frames) and works roughly as follows and starts by calling {
- See also
- Capture::start()} either from the scheduler, by DBUS or by pressing the start button:
- Select the next sequence job to be executed ({
- startNextPendingJob()}. If the list of jobs is empty, an {
- #addJob()} event is sent. The corresponding callback function {
-
#jobAdded(SequenceJob*)} is triggered. Now we know that at least one sequence job is to be executed.
- Prepare the selected job
- update the counters of captured frames ({
- Prepare the selected job
-
prepareJob(SequenceJob *)})
- execute the pre job script, if existing ({
-
prepareActiveJobStage1()})
- set temperature, rotator angle and wait (if required) for the initial guiding deviation being below the configured threshold ({
-
prepareJobExecution()}) and wait until these parameters are OK.
- Prepare capturing a single frame We still need to do some preparation steps before capturing starts.
- {
- Prepare capturing a single frame We still need to do some preparation steps before capturing starts.
-
executeJob()} is the starting point, which simply sets the capture state to "busy" and sets the FITS attributes to the camera
- Check all tasks that need to be completed before capturing may start (post meridian flip actions, guiding deviation, dithering, re-focusing, ..., see {
-
checkLightFramePendingTasks()}
- Capture a single frame
- Initiate capturing (set diverse settings of {
- Capture a single frame
- #activeCamera()} (see {
-
captureImage})
- hand over the control of capturing to the sequence job ({
-
SequenceJob::startCapturing()})
- Select the correct filter (
-
SequenceJobState::prepareTargetFilter()}
- As soon as the correct filter is set, the sequence job state will send the event {
- SequenceJobState::initCaptureComplete()}, which will finally call trigger {
-
SequenceJob::capture()}
- Listen upon capturing progress
- listen to the event {
- Listen upon capturing progress
-
ISD::Camera::newExposureValue}, update the remaining time and wait until the INDI state changes from busy to OK
- start the download timer to measure download times
- listen to the event {
-
ISD::Camera::newImage} and start processing the FITS image as soon as it has been recieved
- Process received image
- update the FITS image meta data {
- Process received image
-
updateImageMetadataAction()}
- update time calculation and counters and execute post capture script ({
-
imageCapturingCompleted()})
- Check how to continue the sequence execution ({
-
resumeSequence()})
- if the current sequence job isn't completed,
- execute the post capture script
- start next exposure (similar to 3.) ({
- if the current sequence job isn't completed,
- startNextExposure()}) TODO: check why we need this separate method and cannot use {
-
updatePreCaptureCalibrationStatus()}
- if the current sequence is complete,
- execute the post sequence script ({
- if the current sequence is complete,
-
processJobCompletion1()})
- stop the current sequence job ({
-
processJobCompletion2()})
- recall {
- resumeSequence()}, which calls {
- startNextJob()}
Autofocus
Capture has three ways that trigger autofocus during a capturing sequence: HFR based, temperature drift based, timer based and post meridian flip based. Each time the capture execution reaches the preparation of caturing a single frame (3. above) (see {
- See also
- CaptureModuleState::startFocusIfRequired()} and {
- RefocusState::checkFocusRequired()}).
Meridian Flip
The meridian flip itself is executed by the Mount module and is controlled by (see {
- See also
- MeridianFlipState}). Nevertheless, the Capture module plays an important rule in the meridian flip:
- Accept a flip to be executed As soon as a meridian flip has been planned (informed through {
-
#updateMFMountState(MeridianFlipState::MeridianFlipMountState)}, the meridian flip state is set to MF_REQUESTED.
- If capturing is running the state remains in this state until the frame has been captured. As soon as the capturing state changes to id, suspended or aborted (see {
- CaptureModuleState::setCaptureState(CaptureState)}), the meridian flip state is set to MF_ACCEPTED (see {
- MeridianFlipState::updateMeridianFlipStage(const MFStage)}). This is triggered from {
-
checkLightFramePendingTasks()}, i.e. this function is looping once per second until the meridian flip has been completed.
- If capturing is not running, the latter happens immediately. Now the meridian flip is started.
- Post MF actions As soon as the meridian flip has been completed (and the Capture module is waiting for it), the Capture module takes over the control and executes all necessary tasks: aligning, re-focusing, guiding, etc. This happens all through {
- See also
- checkLightFramePendingTasks()}. As soon as all has recovered, capturing continues.
Definition at line 103 of file captureprocess.h.
Member Function Documentation
◆ calculateFlatExpTime()
double Ekos::CaptureProcess::calculateFlatExpTime | ( | double | currentADU | ) |
calculateFlatExpTime calculate the next flat exposure time from the measured ADU value
- Parameters
-
currentADU ADU of the last captured frame
- Returns
- next exposure time to be tried for the flat capturing
Definition at line 2131 of file captureprocess.cpp.
◆ captureImage()
void Ekos::CaptureProcess::captureImage | ( | ) |
captureImage Initiates image capture in the active job.
Definition at line 1323 of file captureprocess.cpp.
◆ capturePreview()
void Ekos::CaptureProcess::capturePreview | ( | bool | loop = false | ) |
capturePreview Capture a preview (single or looping ones)
Definition at line 284 of file captureprocess.cpp.
◆ captureStarted()
void Ekos::CaptureProcess::captureStarted | ( | CaptureModuleState::CAPTUREResult | rc | ) |
captureStarted Manage the result when capturing has been started
Definition at line 792 of file captureprocess.cpp.
◆ checkCamera()
void Ekos::CaptureProcess::checkCamera | ( | ) |
configureCamera Refreshes the CCD information in the capture module.
Definition at line 1761 of file captureprocess.cpp.
◆ checkFlatCalibration()
bool Ekos::CaptureProcess::checkFlatCalibration | ( | QSharedPointer< FITSData > | imageData, |
double | exp_min, | ||
double | exp_max | ||
) |
checkFlatCalibration check the flat calibration
- Parameters
-
imageData current image data to be analysed exp_min minimal possible exposure time exp_max maximal possible exposure time
- Returns
- false iff calibration has not been reached yet
Definition at line 2003 of file captureprocess.cpp.
◆ checkLightFramePendingTasks()
IPState Ekos::CaptureProcess::checkLightFramePendingTasks | ( | ) |
Check all tasks that might be pending before capturing may start.
The following checks are executed:
- Are there any pending jobs that failed? If yes, return with IPS_ALERT.
- Has pausing been initiated (
- See also
- checkPausing()).
- Is a meridian flip already running (
- See also
- m_MeridianFlipState->checkMeridianFlipRunning()) or ready for execution (
- CaptureModuleState::checkMeridianFlipReady()).
- check guide deviation for non meridian flip stages if the initial guide limit is set. Wait until the guide deviation is reported to be below the limit (
- Check if dithering is required or running.
- Check if re-focusing is required Needs to be checked after dithering checks to avoid dithering in parallel to focusing, since @startFocusIfRequired() might change its value over time
- Resume guiding if it was suspended (
- See also
- Capture::resumeGuiding())
- Returns
- IPS_OK iff no task is pending, IPS_BUSY otherwise (or IPS_ALERT if a problem occured)
Definition at line 744 of file captureprocess.cpp.
◆ checkNextExposure()
void Ekos::CaptureProcess::checkNextExposure | ( | ) |
checkNextExposure Try to start capturing the next exposure (
- See also
- startNextExposure()). If startNextExposure() returns, that there are still some jobs pending, we wait for 1 second and retry to start it again. If one of the pending preparation jobs has problems, the looping stops.
Definition at line 840 of file captureprocess.cpp.
◆ checkPausing()
bool Ekos::CaptureProcess::checkPausing | ( | CaptureModuleState::ContinueAction | continueAction | ) |
checkPausing check if a pause has been planned and pause subsequently
- Parameters
-
continueAction action to be executed when resume after pausing
- Returns
- true iff capturing has been paused
Definition at line 2604 of file captureprocess.cpp.
◆ clearFlatCache()
void Ekos::CaptureProcess::clearFlatCache | ( | ) |
clearFlatCache Clear the measured values for flat calibrations
Definition at line 2233 of file captureprocess.cpp.
◆ continueFramingAction()
IPState Ekos::CaptureProcess::continueFramingAction | ( | const QSharedPointer< FITSData > & | imageData | ) |
continueFramingAction If framing is running, start the next capture sequence
- Returns
- IPS_OK in all cases
Definition at line 1535 of file captureprocess.cpp.
◆ executeJob()
void Ekos::CaptureProcess::executeJob | ( | ) |
executeJob Start the execution of #activeJob by initiating updatePreCaptureCalibrationStatus().
Definition at line 644 of file captureprocess.cpp.
◆ filterLabels()
QStringList Ekos::CaptureProcess::filterLabels | ( | ) |
filterLabels list of currently available filter labels
Definition at line 2804 of file captureprocess.cpp.
◆ findNextPendingJob()
SequenceJob * Ekos::CaptureProcess::findNextPendingJob | ( | ) |
findExecutableJob find next job to be executed
Definition at line 2624 of file captureprocess.cpp.
◆ frameTypes()
QStringList Ekos::CaptureProcess::frameTypes | ( | ) |
frameTypes Retrieve the frame types from the active camera's primary chip.
Definition at line 2794 of file captureprocess.cpp.
◆ generateScriptArguments()
QStringList Ekos::CaptureProcess::generateScriptArguments | ( | ) | const |
generateScriptArguments Generate argument list to pass to capture script
- Returns
- generates argument list consisting of one argument -metadata followed by JSON-formatted key:value pair: -ts UNIX timestamp -image full path to captured image (if any) -size size of file in bytes (if any) -job {name, index} -capture {name, index} -filter TODO depending on user feedback.
Definition at line 2755 of file captureprocess.cpp.
◆ hasCoolerControl()
bool Ekos::CaptureProcess::hasCoolerControl | ( | ) |
Does the CCD has a cooler control (On/Off) ?
Definition at line 2761 of file captureprocess.cpp.
◆ imageCapturingCompleted()
void Ekos::CaptureProcess::imageCapturingCompleted | ( | ) |
Manage the capture process after a captured image has been successfully downloaded from the camera.
- stop timers for timeout and download progress
- update the download time calculation
- update captured frames counters ({
- See also
- updateCompletedCaptureCountersAction()})
- check flat calibration (for flats only)
- execute the post capture script (if existing)
- resume the sequence ({
- See also
- resumeSequence()})
Definition at line 1086 of file captureprocess.cpp.
◆ jobCreated()
void Ekos::CaptureProcess::jobCreated | ( | SequenceJob * | newJob | ) |
Counterpart to the event {.
- See also
- #createJob(SequenceJob::SequenceJobType)} where the event receiver reports whether one has been added successfully and of which type it was.
Definition at line 261 of file captureprocess.cpp.
◆ loadSequenceQueue()
Loads the Ekos Sequence Queue file in the Sequence Queue.
Jobs are appended to existing jobs.
- Parameters
-
fileURL full URL of the filename targetName override the target defined in the sequence queue file (necessary for using the target of the scheduler)
Definition at line 2296 of file captureprocess.cpp.
◆ pauseCapturing()
void Ekos::CaptureProcess::pauseCapturing | ( | ) |
pauseCapturing Pauses capturing as soon as the current capture is complete.
Definition at line 407 of file captureprocess.cpp.
◆ prepareActiveJobStage1()
void Ekos::CaptureProcess::prepareActiveJobStage1 | ( | ) |
prepareActiveJobStage1 Check for pre job script to execute.
If none, move to stage 2
Definition at line 601 of file captureprocess.cpp.
◆ prepareActiveJobStage2()
void Ekos::CaptureProcess::prepareActiveJobStage2 | ( | ) |
prepareActiveJobStage2 Reset #calibrationStage and continue with preparePreCaptureActions().
Definition at line 617 of file captureprocess.cpp.
◆ prepareJob()
void Ekos::CaptureProcess::prepareJob | ( | SequenceJob * | job | ) |
prepareJob Update the counters of existing frames and continue with prepareActiveJob(), if there exist less images than targeted.
If enough images exist, continue with processJobCompletion().
Definition at line 430 of file captureprocess.cpp.
◆ prepareJobExecution()
void Ekos::CaptureProcess::prepareJobExecution | ( | ) |
preparePreCaptureActions Trigger setting the filter, temperature, (if existing) the rotator angle and let the #activeJob execute the preparation actions before a capture may take place (
- See also
- SequenceJob::prepareCapture()).
After triggering the settings, this method returns. This mechanism is slightly tricky, since it asynchronous and event based and works as collaboration between Capture and SequenceJob. Capture has the connection to devices and SequenceJob knows the target values.
Each time Capture receives an updated value - e.g. the current CCD temperature (
- See also
- updateCCDTemperature()) - it informs the #activeJob about the current CCD temperature. SequenceJob checks, if it has reached the target value and if yes, sets this action as as completed.
As soon as all actions are completed, SequenceJob emits a prepareComplete() event, which triggers executeJob() from the CaptureProcess.
Definition at line 698 of file captureprocess.cpp.
◆ previewImageCompletedAction()
IPState Ekos::CaptureProcess::previewImageCompletedAction | ( | QSharedPointer< FITSData > | imageData | ) |
previewImageCompletedAction Activities required when a preview image has been captured.
- Returns
- IPS_OK if a preview has been completed, IPS_IDLE otherwise
Definition at line 1579 of file captureprocess.cpp.
◆ processCaptureCompleted()
IPState Ekos::CaptureProcess::processCaptureCompleted | ( | ) |
processCaptureCompleted Manage the capture process after a captured image has been successfully downloaded from the camera.
When a image frame has been captured and downloaded successfully, send the image to the client (if configured) and execute the book keeping for the captured frame. After this, either processJobCompletion() is executed in case that the job is completed, and resumeSequence() otherwise.
Special case for flat capturing: exposure time calibration is executed in this process step as well.
Book keeping means:
- increase / decrease the counters for focusing and dithering
- increase the frame counter
- update the average download time
- Returns
- IPS_OK if processing has been completed, IPS_BUSY if otherwise.
◆ processCaptureError()
void Ekos::CaptureProcess::processCaptureError | ( | ISD::Camera::ErrorType | type | ) |
processCaptureError Handle when image capture fails
- Parameters
-
type error type
Definition at line 1971 of file captureprocess.cpp.
◆ processCaptureTimeout()
void Ekos::CaptureProcess::processCaptureTimeout | ( | ) |
processCaptureTimeout If exposure timed out, let's handle it.
Definition at line 1915 of file captureprocess.cpp.
◆ processFITSData()
void Ekos::CaptureProcess::processFITSData | ( | const QSharedPointer< FITSData > & | data | ) |
newFITS process new FITS data received from camera.
Update status of active job and overall sequence.
- Parameters
-
data pointer to blob containing FITS data
Definition at line 963 of file captureprocess.cpp.
◆ processJobCompletion1()
void Ekos::CaptureProcess::processJobCompletion1 | ( | ) |
processJobCompletionStage1 Process job completion.
In stage 1 when simply check if the is a post-job script to be running if yes, we run it and wait until it is done before we move to stage2
Definition at line 1225 of file captureprocess.cpp.
◆ processJobCompletion2()
void Ekos::CaptureProcess::processJobCompletion2 | ( | ) |
processJobCompletionStage2 Stop execution of the current sequence and check whether there exists a next sequence and start it, if there is a next one to be started (
- See also
- resumeSequence()).
Definition at line 1241 of file captureprocess.cpp.
◆ processNewRemoteFile()
void Ekos::CaptureProcess::processNewRemoteFile | ( | QString | file | ) |
setNewRemoteFile A new image has been stored as remote file
- Parameters
-
file local file path
Definition at line 1078 of file captureprocess.cpp.
◆ processPreCaptureCalibrationStage()
IPState Ekos::CaptureProcess::processPreCaptureCalibrationStage | ( | ) |
processPreCaptureCalibrationStage Execute the tasks that need to be completed before capturing may start.
For light frames, checkLightFramePendingTasks() is called.
- Returns
- IPS_OK if all necessary tasks have been completed
Definition at line 1163 of file captureprocess.cpp.
◆ reconnectCameraDriver()
void Ekos::CaptureProcess::reconnectCameraDriver | ( | const QString & | camera, |
const QString & | filterWheel | ||
) |
reconnectDriver Reconnect the camera driver
Definition at line 1812 of file captureprocess.cpp.
◆ refreshOpticalTrain()
void Ekos::CaptureProcess::refreshOpticalTrain | ( | QString | name | ) |
refreshOpticalTrain Refresh the devices from the optical train configuration
- Parameters
-
name name of the optical train configuration
Definition at line 720 of file captureprocess.cpp.
◆ removeDevice()
void Ekos::CaptureProcess::removeDevice | ( | const QSharedPointer< ISD::GenericDevice > & | device | ) |
Generic method for removing any connected device.
Definition at line 1839 of file captureprocess.cpp.
◆ resetFrame()
void Ekos::CaptureProcess::resetFrame | ( | ) |
resetFrame Reset frame settings of the camera
Definition at line 1435 of file captureprocess.cpp.
◆ restartCamera()
void Ekos::CaptureProcess::restartCamera | ( | const QString & | name | ) |
restartCamera Restarts the INDI driver associated with a camera.
Remote and Local drivers are supported.
- Parameters
-
name Name of camera to restart. If a driver defined multiple cameras, they would be removed and added again after driver restart.
- Note
- Restarting camera should only be used as a last resort when it comes completely unresponsive. Due the complex nature of driver interactions with Ekos, restarting cameras can lead to unexpected behavior.
Definition at line 2777 of file captureprocess.cpp.
◆ resumeSequence()
IPState Ekos::CaptureProcess::resumeSequence | ( | ) |
resumeSequence Try to continue capturing.
Take the active job, if there is one, or search for the next one that is either idle or aborted. If a new job is selected, call startNextJob() to prepare it. If the current job is still active, initiate checkNextExposure().
- Returns
- IPS_OK if there is a job that may be continued, IPS_BUSY otherwise.
Definition at line 879 of file captureprocess.cpp.
◆ runCaptureScript()
IPState Ekos::CaptureProcess::runCaptureScript | ( | ScriptTypes | scriptType, |
bool | precond = true |
||
) |
runCaptureScript Run the pre-/post capture/job script
- Parameters
-
scriptType script type (pre-/post capture/job) precond additional pre condition for starting the script
- Returns
- IPS_BUSY, of script exists, IPS_OK otherwise
Definition at line 1683 of file captureprocess.cpp.
◆ saveSequenceQueue()
bool Ekos::CaptureProcess::saveSequenceQueue | ( | const QString & | path | ) |
Saves the Sequence Queue to the Ekos Sequence Queue file.
- Parameters
-
fileURL full URL of the filename
Definition at line 2411 of file captureprocess.cpp.
◆ scriptFinished()
void Ekos::CaptureProcess::scriptFinished | ( | int | exitCode, |
QProcess::ExitStatus | status | ||
) |
scriptFinished Slot managing the return status of pre/post capture/job scripts
Definition at line 1700 of file captureprocess.cpp.
◆ selectCamera()
void Ekos::CaptureProcess::selectCamera | ( | QString | name | ) |
setCamera select camera device
- Parameters
-
name Name of the camera device
Definition at line 1753 of file captureprocess.cpp.
◆ setCamera() [1/2]
void Ekos::CaptureProcess::setCamera | ( | bool | connection | ) |
Connect or disconnect the camera device.
- Parameters
-
connection flag if connect (=true) or disconnect (=false)
Definition at line 2569 of file captureprocess.cpp.
◆ setCamera() [2/2]
bool Ekos::CaptureProcess::setCamera | ( | ISD::Camera * | device | ) |
setCamera Connect to the given camera device (and deconnect the old one if existing)
- Parameters
-
device pointer to camera INDI device.
- Returns
- True if added successfully, false if duplicate or failed to add.
Definition at line 162 of file captureprocess.cpp.
◆ setCoolerControl()
bool Ekos::CaptureProcess::setCoolerControl | ( | bool | enable | ) |
Set the CCD cooler ON/OFF.
Definition at line 2769 of file captureprocess.cpp.
◆ setDome()
bool Ekos::CaptureProcess::setDome | ( | ISD::Dome * | device | ) |
setDome Connect to the given dome device
- Parameters
-
device point to dome INDI device
- Returns
- True if added successfully, false if duplicate or failed to add.
Definition at line 152 of file captureprocess.cpp.
◆ setDownloadProgress()
void Ekos::CaptureProcess::setDownloadProgress | ( | ) |
setDownloadProgress update the Capture Module and Summary Screen's estimate of how much time is left in the download
Definition at line 1519 of file captureprocess.cpp.
◆ setDustCap()
bool Ekos::CaptureProcess::setDustCap | ( | ISD::DustCap * | device | ) |
setDustCap Connect to the given dust cap device (and deconnect the old one if existing)
- Parameters
-
device pointer to dust cap INDI device
- Returns
- True if added successfully, false if duplicate or failed to add.
Definition at line 128 of file captureprocess.cpp.
◆ setExposureProgress()
void Ekos::CaptureProcess::setExposureProgress | ( | ISD::CameraChip * | tChip, |
double | value, | ||
IPState | state | ||
) |
setExposureProgress Manage exposure progress reported by the camera device.
Definition at line 1445 of file captureprocess.cpp.
◆ setFilterWheel()
bool Ekos::CaptureProcess::setFilterWheel | ( | ISD::FilterWheel * | device | ) |
setFilterWheel Connect to the given filter wheel device (and deconnect the old one if existing)
- Parameters
-
device pointer to filter wheel INDI device.
- Returns
- True if added successfully, false if duplicate or failed to add.
Definition at line 2591 of file captureprocess.cpp.
◆ setLightBox()
bool Ekos::CaptureProcess::setLightBox | ( | ISD::LightBox * | device | ) |
setLightBox Connect to the given dust cap device (and deconnect the old one if existing)
- Parameters
-
device pointer to light box INDI device.
- Returns
- True if added successfully, false if duplicate or failed to add.
Definition at line 141 of file captureprocess.cpp.
◆ setMount()
bool Ekos::CaptureProcess::setMount | ( | ISD::Mount * | device | ) |
setMount Connect to the given mount device (and deconnect the old one if existing)
- Parameters
-
device pointer to Mount device.
- Returns
- True if added successfully, false if duplicate or failed to add.
Definition at line 78 of file captureprocess.cpp.
◆ setRotator()
bool Ekos::CaptureProcess::setRotator | ( | ISD::Rotator * | device | ) |
setRotator Connect to the given rotator device (and deconnect the old one if existing)
- Parameters
-
device pointer to rotator INDI device
- Returns
- True if added successfully, false if duplicate or failed to add.
Definition at line 101 of file captureprocess.cpp.
◆ setScope()
|
inline |
setScope Set active train telescope name
- Parameters
-
name Name of scope
Definition at line 170 of file captureprocess.h.
◆ startJob()
void Ekos::CaptureProcess::startJob | ( | SequenceJob * | job | ) |
startJob Start the execution of a selected sequence job:
- Initialize the state for capture preparation ({
- See also
- CaptureModuleState::initCapturePreparation()}
- Prepare the selected job ({
- See also
- prepareJob(SequenceJob *)})
- Parameters
-
job selected sequence job
Definition at line 424 of file captureprocess.cpp.
◆ startNextExposure()
IPState Ekos::CaptureProcess::startNextExposure | ( | ) |
startNextExposure Ensure that all pending preparation tasks are be completed (focusing, dithering, etc.) and start the next exposure.
Checks of pending preparations depends upon the frame type:
- For light frames, pending preparations like focusing, dithering etc. needs to be checked before each single frame capture. efore starting to capture the next light frame, checkLightFramePendingTasks() is called to check if all pending preparation tasks have been completed successfully. As soon as this is the case, the sequence timer #seqTimer is started to wait the configured delay and starts capturing the next image.
- For bias, dark and flat frames, preparation jobs are only executed when starting a sequence. Hence, for these frames we directly start the sequence timer #seqTimer.
- Returns
- IPS_OK, iff all pending preparation jobs are completed (
- See also
- checkLightFramePendingTasks()). In that case, the #seqTimer is started to wait for the configured settling delay and then capture the next image (
- Capture::captureImage). In case that a pending task aborted, IPS_IDLE is returned.
Definition at line 849 of file captureprocess.cpp.
◆ startNextJob()
IPState Ekos::CaptureProcess::startNextJob | ( | ) |
startNextJob Select the next job that is either idle or aborted and call prepareJob(*SequenceJob) to prepare its execution and resume guiding if it was suspended (and no meridian flip is running).
- Returns
- IPS_OK if a job to be executed exists, IPS_IDLE otherwise.
Definition at line 1287 of file captureprocess.cpp.
◆ startNextPendingJob()
void Ekos::CaptureProcess::startNextPendingJob | ( | ) |
startNextPendingJob Start the next pending job.
Find the next job to be executed:
- If there are already some jobs defined, {
- See also
- findNextPendingJob()} is used to find the next job to be executed.
- If the list is empty, the current settings are used to create a job instantly, which subsequently will be executed.
Definition at line 240 of file captureprocess.cpp.
◆ stopCapturing()
void Ekos::CaptureProcess::stopCapturing | ( | CaptureState | targetState | ) |
stopCapturing Stopping the entire capturing state (envelope for aborting, suspending, pausing, ...)
- Parameters
-
targetState state capturing should be having afterwards
Definition at line 307 of file captureprocess.cpp.
◆ syncDSLRToTargetChip()
void Ekos::CaptureProcess::syncDSLRToTargetChip | ( | const QString & | model | ) |
syncDSLRToTargetChip Syncs INDI driver CCD_INFO property to the DSLR values.
This include Max width, height, and pixel sizes.
- Parameters
-
model Name of camera driver in the DSLR database.
Definition at line 1792 of file captureprocess.cpp.
◆ toggleSequence()
void Ekos::CaptureProcess::toggleSequence | ( | ) |
toggleSequence Toggle sequence state depending on its current state.
- If paused, then resume sequence.
- If idle or completed, then start sequence.
- Otherwise, abort current sequence.
Definition at line 206 of file captureprocess.cpp.
◆ toggleVideo()
void Ekos::CaptureProcess::toggleVideo | ( | bool | enabled | ) |
Toggle video streaming if supported by the device.
- Parameters
-
enabled Set to true to start video streaming, false to stop it if active.
Definition at line 177 of file captureprocess.cpp.
◆ updateCompletedCaptureCountersAction()
IPState Ekos::CaptureProcess::updateCompletedCaptureCountersAction | ( | ) |
updateCompletedCaptureCounters Update counters if an image has been captured
- Returns
Definition at line 1599 of file captureprocess.cpp.
◆ updateDownloadTimesAction()
IPState Ekos::CaptureProcess::updateDownloadTimesAction | ( | ) |
updateDownloadTimesAction Add the current download time to the list of already measured ones
Definition at line 1559 of file captureprocess.cpp.
◆ updateFilterInfo()
void Ekos::CaptureProcess::updateFilterInfo | ( | ) |
updateFilterInfo Update the filter information in the INDI drivers of the current camera and dust cap
Definition at line 2258 of file captureprocess.cpp.
◆ updateGain()
void Ekos::CaptureProcess::updateGain | ( | double | value, |
QMap< QString, QMap< QString, QVariant > > & | propertyMap | ||
) |
getGain Update the gain value from the custom property value.
Depending on the camera, it is either stored as GAIN property value of CCD_GAIN or as Gain property value from CCD_CONTROLS.
Definition at line 2812 of file captureprocess.cpp.
◆ updateImageMetadataAction()
IPState Ekos::CaptureProcess::updateImageMetadataAction | ( | QSharedPointer< FITSData > | imageData | ) |
updateImageMetadataAction Update meta data of a captured image
Definition at line 1628 of file captureprocess.cpp.
◆ updateOffset()
void Ekos::CaptureProcess::updateOffset | ( | double | value, |
QMap< QString, QMap< QString, QVariant > > & | propertyMap | ||
) |
getOffset Update the offset value from the custom property value.
Depending on the camera, it is either stored as OFFSET property value of CCD_OFFSET or as Offset property value from CCD_CONTROLS.
Definition at line 2846 of file captureprocess.cpp.
◆ updatePreCaptureCalibrationStatus()
void Ekos::CaptureProcess::updatePreCaptureCalibrationStatus | ( | ) |
updatePreCaptureCalibrationStatus This is a wrapping loop for processPreCaptureCalibrationStage(), which contains all checks before captureImage() may be called.
If processPreCaptureCalibrationStage() returns IPS_OK (i.e. everything is ready so that capturing may be started), captureImage() is called. Otherwise, it waits for a second and calls itself again.
Definition at line 1203 of file captureprocess.cpp.
◆ updateTelescopeInfo()
void Ekos::CaptureProcess::updateTelescopeInfo | ( | ) |
updateTelescopeInfo Update the scope information in the camera's INDI driver.
Definition at line 2239 of file captureprocess.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Dec 11 2023 04:03:27 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.