Ekos::CaptureProcess

Search for usage in LXR

Ekos::CaptureProcess Class Reference

#include <captureprocess.h>

Inheritance diagram for Ekos::CaptureProcess:

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 newView (const QSharedPointer< FITSView > &view)
 
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)
 
QProcesscaptureScript ()
 
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)
 
Q_SCRIPTABLE void executeJob ()
 
QStringList filterLabels ()
 
SequenceJobfindNextPendingJob ()
 
QStringList frameTypes ()
 
QStringList generateScriptArguments () const
 
bool hasCoolerControl ()
 
void jobCreated (SequenceJob *newJob)
 
void llsq (QVector< double > x, QVector< double > y, double &a, double &b)
 
bool loadSequenceQueue (const QString &fileURL, const QString &targetName="", bool setOptions=true)
 
Q_SCRIPTABLE void pauseCapturing ()
 
void prepareActiveJobStage1 ()
 
void prepareActiveJobStage2 ()
 
void prepareJob (SequenceJob *job)
 
void prepareJobExecution ()
 
IPState previewImageCompletedAction ()
 
void processCaptureError (ISD::Camera::ErrorType type)
 
void processCaptureTimeout ()
 
void processFITSData (const QSharedPointer< FITSData > &data, const QString &extension)
 
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)
 
Q_SCRIPTABLE void resetFrame ()
 
void restartCamera (const QString &name)
 
IPState resumeSequence ()
 
IPState runCaptureScript (ScriptTypes scriptType, bool precond=true)
 
bool saveSequenceQueue (const QString &path, bool loadOptions=true)
 
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)
 
Q_SCRIPTABLE void toggleSequence ()
 
void toggleVideo (bool enabled)
 
void updateCompletedCaptureCountersAction ()
 
IPState updateDownloadTimesAction ()
 
void updateFilterInfo ()
 
void updateFITSViewer (const QSharedPointer< FITSData > data, const FITSMode &captureMode, const FITSScale &captureFilter, const QString &filename, const QString &deviceName)
 
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 ()
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
QBindable< QStringbindableObjectName ()
 
bool blockSignals (bool block)
 
const QObjectListchildren () 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 () const const
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, 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
 
QList< T > findChildren (Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isQuickItemType () const const
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_GADGET_EXPORT (EXPORT_MACRO)
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_MOC_INCLUDE Q_MOC_INCLUDE
 
 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
 
qobject_cast (const QObject *object)
 
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 setObjectName (QAnyStringView name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool setProperty (const char *name, QVariant &&value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType)
 
QThreadthread () const const
 

Additional Inherited Members

- Properties inherited from QObject
 objectName
 
- Static Public Member Functions inherited from QObject
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)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from QObject
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
 
QObjectsender () 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:
  1. 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.
  1. Prepare the selected job
    • update the counters of captured frames ({
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.
  1. 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()}
  1. Capture a single frame
    • Initiate capturing (set diverse settings of {
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()}
  1. 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
  1. Process received image
    • update the FITS image meta data {
updateImageMetadataAction()}
  • update time calculation and counters and execute post capture script ({
imageCapturingCompleted()})
  1. 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.) ({
startNextExposure()}) TODO: check why we need this separate method and cannot use {
updatePreCaptureCalibrationStatus()}
  • if the current sequence is complete,
    • execute the post sequence script ({
processJobCompletion1()})
  • stop the current sequence job ({
processJobCompletion2()})
  • recall {
resumeSequence()}, which calls {
startNextJob()}
  • if there is another job to be executed, jump to 2., otherwise Capture is completed by sending a stopCapture(CAPTURE_COMPLETE) event

ADU based flats calibration

Capturing ADU based flats begins like capturing other frame types. The difference begins as soon as an image has been received (step 6 above) in {

See also
imageCapturingCompleted()}. Here {
checkFlatCalibration()} is called to check the frame's ADU. If the ADU isn't in the expected range, a new frame is captured with modified exposure time ({
startNextExposure()}.

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:
  1. 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.
  1. 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 112 of file captureprocess.h.

Member Enumeration Documentation

◆ ADUAlgorithm

enum Ekos::CaptureProcess::ADUAlgorithm

Definition at line 117 of file captureprocess.h.

Constructor & Destructor Documentation

◆ CaptureProcess()

Ekos::CaptureProcess::CaptureProcess ( QSharedPointer< CaptureModuleState > newModuleState,
QSharedPointer< CaptureDeviceAdaptor > newDeviceAdaptor )

Definition at line 39 of file captureprocess.cpp.

Member Function Documentation

◆ calculateFlatExpTime()

double Ekos::CaptureProcess::calculateFlatExpTime ( double currentADU)

calculateFlatExpTime calculate the next flat exposure time from the measured ADU value

Parameters
currentADUADU of the last captured frame
Returns
next exposure time to be tried for the flat capturing

Definition at line 2243 of file captureprocess.cpp.

◆ captureImage()

void Ekos::CaptureProcess::captureImage ( )

captureImage Initiates image capture in the active job.

Definition at line 1396 of file captureprocess.cpp.

◆ capturePreview()

void Ekos::CaptureProcess::capturePreview ( bool loop = false)

capturePreview Capture a preview (single or looping ones)

Definition at line 288 of file captureprocess.cpp.

◆ captureScript()

QProcess & Ekos::CaptureProcess::captureScript ( )
inline

Definition at line 685 of file captureprocess.h.

◆ captureStarted()

void Ekos::CaptureProcess::captureStarted ( CaptureModuleState::CAPTUREResult rc)

captureStarted Manage the result when capturing has been started

Definition at line 797 of file captureprocess.cpp.

◆ checkCamera()

void Ekos::CaptureProcess::checkCamera ( )

configureCamera Refreshes the CCD information in the capture module.

Definition at line 1866 of file captureprocess.cpp.

◆ checkFlatCalibration()

bool Ekos::CaptureProcess::checkFlatCalibration ( QSharedPointer< FITSData > imageData,
double exp_min,
double exp_max )

checkFlatCalibration check the flat calibration

Parameters
imageDatacurrent image data to be analysed
exp_minminimal possible exposure time
exp_maxmaximal possible exposure time
Returns
false iff calibration has not been reached yet

Definition at line 2119 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:

  1. Are there any pending jobs that failed? If yes, return with IPS_ALERT.
  2. Has pausing been initiated (
    See also
    checkPausing()).
  3. Is a meridian flip already running (
    See also
    m_MeridianFlipState->checkMeridianFlipRunning()) or ready for execution (
    CaptureModuleState::checkMeridianFlipReady()).
  4. 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 (
    See also
    Capture::setGuideDeviation(double, double)).
  5. Check if dithering is required or running.
  6. 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
  7. 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 748 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 845 of file captureprocess.cpp.

◆ checkPausing()

bool Ekos::CaptureProcess::checkPausing ( CaptureModuleState::ContinueAction continueAction)

checkPausing check if a pause has been planned and pause subsequently

Parameters
continueActionaction to be executed when resume after pausing
Returns
true iff capturing has been paused

Definition at line 2562 of file captureprocess.cpp.

◆ clearFlatCache()

void Ekos::CaptureProcess::clearFlatCache ( )

clearFlatCache Clear the measured values for flat calibrations

Definition at line 2354 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 1619 of file captureprocess.cpp.

◆ executeJob()

void Ekos::CaptureProcess::executeJob ( )

executeJob Start the execution of activeJob by initiating updatePreCaptureCalibrationStatus().

Definition at line 648 of file captureprocess.cpp.

◆ filterLabels()

QStringList Ekos::CaptureProcess::filterLabels ( )

filterLabels list of currently available filter labels

Definition at line 2759 of file captureprocess.cpp.

◆ findNextPendingJob()

SequenceJob * Ekos::CaptureProcess::findNextPendingJob ( )

findExecutableJob find next job to be executed

Definition at line 2579 of file captureprocess.cpp.

◆ frameTypes()

QStringList Ekos::CaptureProcess::frameTypes ( )

frameTypes Retrieve the frame types from the active camera's primary chip.

Definition at line 2749 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 2710 of file captureprocess.cpp.

◆ hasCoolerControl()

bool Ekos::CaptureProcess::hasCoolerControl ( )

Does the CCD has a cooler control (On/Off) ?

Definition at line 2716 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 265 of file captureprocess.cpp.

◆ llsq()

void Ekos::CaptureProcess::llsq ( QVector< double > x,
QVector< double > y,
double & a,
double & b )

Definition at line 2664 of file captureprocess.cpp.

◆ loadSequenceQueue()

bool Ekos::CaptureProcess::loadSequenceQueue ( const QString & fileURL,
const QString & targetName = "",
bool setOptions = true )

Loads the Ekos Sequence Queue file in the Sequence Queue.

Jobs are appended to existing jobs.

Parameters
fileURLfull URL of the filename
targetNameoverride the target defined in the sequence queue file (necessary for using the target of the scheduler)

Definition at line 2495 of file captureprocess.cpp.

◆ pauseCapturing()

void Ekos::CaptureProcess::pauseCapturing ( )

pauseCapturing Pauses capturing as soon as the current capture is complete.

Definition at line 411 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 605 of file captureprocess.cpp.

◆ prepareActiveJobStage2()

void Ekos::CaptureProcess::prepareActiveJobStage2 ( )

prepareActiveJobStage2 Reset #calibrationStage and continue with preparePreCaptureActions().

Definition at line 621 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 434 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 702 of file captureprocess.cpp.

◆ previewImageCompletedAction()

IPState Ekos::CaptureProcess::previewImageCompletedAction ( )

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 1663 of file captureprocess.cpp.

◆ processCaptureError()

void Ekos::CaptureProcess::processCaptureError ( ISD::Camera::ErrorType type)

processCaptureError Handle when image capture fails

Parameters
typeerror type

Definition at line 2087 of file captureprocess.cpp.

◆ processCaptureTimeout()

void Ekos::CaptureProcess::processCaptureTimeout ( )

processCaptureTimeout If exposure timed out, let's handle it.

Definition at line 2020 of file captureprocess.cpp.

◆ processFITSData()

void Ekos::CaptureProcess::processFITSData ( const QSharedPointer< FITSData > & data,
const QString & extension )

newFITS process new FITS data received from camera.

Update status of active job and overall sequence.

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()})
    Parameters
    datapointer to blob containing FITS data
    extensiondefining the file type

Definition at line 1011 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 1298 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 1314 of file captureprocess.cpp.

◆ processNewRemoteFile()

void Ekos::CaptureProcess::processNewRemoteFile ( QString file)

setNewRemoteFile A new image has been stored as remote file

Parameters
filelocal file path

Definition at line 1224 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 1236 of file captureprocess.cpp.

◆ reconnectCameraDriver()

void Ekos::CaptureProcess::reconnectCameraDriver ( const QString & camera,
const QString & filterWheel )

reconnectDriver Reconnect the camera driver

Definition at line 1917 of file captureprocess.cpp.

◆ refreshOpticalTrain()

void Ekos::CaptureProcess::refreshOpticalTrain ( QString name)

refreshOpticalTrain Refresh the devices from the optical train configuration

Parameters
namename of the optical train configuration

Definition at line 724 of file captureprocess.cpp.

◆ removeDevice()

void Ekos::CaptureProcess::removeDevice ( const QSharedPointer< ISD::GenericDevice > & device)

Generic method for removing any connected device.

Definition at line 1944 of file captureprocess.cpp.

◆ resetFrame()

void Ekos::CaptureProcess::resetFrame ( )

resetFrame Reset frame settings of the camera

Definition at line 1519 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
nameName 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 2732 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 895 of file captureprocess.cpp.

◆ runCaptureScript()

IPState Ekos::CaptureProcess::runCaptureScript ( ScriptTypes scriptType,
bool precond = true )

runCaptureScript Run the pre-/post capture/job script

Parameters
scriptTypescript type (pre-/post capture/job)
precondadditional pre condition for starting the script
Returns
IPS_BUSY, of script exists, IPS_OK otherwise

Definition at line 1787 of file captureprocess.cpp.

◆ saveSequenceQueue()

bool Ekos::CaptureProcess::saveSequenceQueue ( const QString & path,
bool loadOptions = true )

Saves the Sequence Queue to the Ekos Sequence Queue file.

Parameters
fileURLfull URL of the filename

Definition at line 2520 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 1805 of file captureprocess.cpp.

◆ selectCamera()

void Ekos::CaptureProcess::selectCamera ( QString name)

setCamera select camera device

Parameters
nameName of the camera device

Definition at line 1858 of file captureprocess.cpp.

◆ setCamera() [1/2]

void Ekos::CaptureProcess::setCamera ( bool connection)

Connect or disconnect the camera device.

Parameters
connectionflag if connect (=true) or disconnect (=false)

Definition at line 2527 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
devicepointer to camera INDI device.
Returns
True if added successfully, false if duplicate or failed to add.

Definition at line 166 of file captureprocess.cpp.

◆ setCoolerControl()

bool Ekos::CaptureProcess::setCoolerControl ( bool enable)

Set the CCD cooler ON/OFF.

Definition at line 2724 of file captureprocess.cpp.

◆ setDome()

bool Ekos::CaptureProcess::setDome ( ISD::Dome * device)

setDome Connect to the given dome device

Parameters
devicepoint to dome INDI device
Returns
True if added successfully, false if duplicate or failed to add.

Definition at line 156 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 1603 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
devicepointer to dust cap INDI device
Returns
True if added successfully, false if duplicate or failed to add.

Definition at line 132 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 1529 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
devicepointer to filter wheel INDI device.
Returns
True if added successfully, false if duplicate or failed to add.

Definition at line 2549 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
devicepointer to light box INDI device.
Returns
True if added successfully, false if duplicate or failed to add.

Definition at line 145 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
devicepointer to Mount device.
Returns
True if added successfully, false if duplicate or failed to add.

Definition at line 82 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
devicepointer to rotator INDI device
Returns
True if added successfully, false if duplicate or failed to add.

Definition at line 105 of file captureprocess.cpp.

◆ setScope()

void Ekos::CaptureProcess::setScope ( const QString & name)
inline

setScope Set active train telescope name

Parameters
nameName of scope

Definition at line 190 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
    jobselected sequence job

Definition at line 428 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 871 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 1360 of file captureprocess.cpp.

◆ startNextPendingJob()

void Ekos::CaptureProcess::startNextPendingJob ( )

startNextPendingJob Start the next pending job.

Find the next job to be executed:

  1. If there are already some jobs defined, {
    See also
    findNextPendingJob()} is used to find the next job to be executed.
  2. If the list is empty, the current settings are used to create a job instantly, which subsequently will be executed.

Definition at line 244 of file captureprocess.cpp.

◆ stopCapturing()

void Ekos::CaptureProcess::stopCapturing ( CaptureState targetState)

stopCapturing Stopping the entire capturing state (envelope for aborting, suspending, pausing, ...)

Parameters
targetStatestate capturing should be having afterwards

Definition at line 311 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
modelName of camera driver in the DSLR database.

Definition at line 1897 of file captureprocess.cpp.

◆ toggleSequence()

void Ekos::CaptureProcess::toggleSequence ( )

toggleSequence Toggle sequence state depending on its current state.

  1. If paused, then resume sequence.
  2. If idle or completed, then start sequence.
  3. Otherwise, abort current sequence.

Definition at line 210 of file captureprocess.cpp.

◆ toggleVideo()

void Ekos::CaptureProcess::toggleVideo ( bool enabled)

Toggle video streaming if supported by the device.

Parameters
enabledSet to true to start video streaming, false to stop it if active.

Definition at line 181 of file captureprocess.cpp.

◆ updateCompletedCaptureCountersAction()

void Ekos::CaptureProcess::updateCompletedCaptureCountersAction ( )

updateCompletedCaptureCounters Update counters if an image has been captured

Definition at line 1681 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 1643 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 2379 of file captureprocess.cpp.

◆ updateFITSViewer()

void Ekos::CaptureProcess::updateFITSViewer ( const QSharedPointer< FITSData > data,
const FITSMode & captureMode,
const FITSScale & captureFilter,
const QString & filename,
const QString & deviceName )

updateFITSViewer display new image in the configured FITSViewer tab.

Definition at line 2417 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 2767 of file captureprocess.cpp.

◆ updateImageMetadataAction()

IPState Ekos::CaptureProcess::updateImageMetadataAction ( QSharedPointer< FITSData > imageData)

updateImageMetadataAction Update meta data of a captured image

Definition at line 1728 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 2801 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 1276 of file captureprocess.cpp.

◆ updateTelescopeInfo()

void Ekos::CaptureProcess::updateTelescopeInfo ( )

updateTelescopeInfo Update the scope information in the camera's INDI driver.

Definition at line 2360 of file captureprocess.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:48:28 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.