Ekos::CameraProcess

Search for usage in LXR

Ekos::CameraProcess Class Reference

#include <cameraprocess.h>

Inheritance diagram for Ekos::CameraProcess:

Public Types

enum  ADUAlgorithm { ADU_LEAST_SQUARES , ADU_POLYNOMIAL }
 
typedef struct Ekos::CameraProcess::FitsvViewerTabIDs FitsvViewerTabIDs
 
- Public Types inherited from QObject
typedef  QObjectList
 

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 (bool isValid)
 
void refreshCameraSettings ()
 
void refreshFilterSettings ()
 
void requestAction (CaptureWorkflowActionType action)
 
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

 CameraProcess (QSharedPointer< CameraState > newModuleState, QSharedPointer< CaptureDeviceAdaptor > newDeviceAdaptor)
 
double calculateFlatExpTime (double currentADU)
 
void captureImage ()
 
void capturePreview (bool loop=false)
 
QProcesscaptureScript ()
 
void captureStarted (CaptureResult rc)
 
void checkCamera ()
 
bool checkFlatCalibration (QSharedPointer< FITSData > imageData, double exp_min, double exp_max)
 
IPState checkLightFramePendingTasks ()
 
void checkNextExposure ()
 
bool checkPausing (CaptureContinueAction 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 showFITSPreview (const QSharedPointer< FITSData > &data)
 
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 updateFITSViewer (const QSharedPointer< FITSData > data, ISD::CameraChip *tChip, const QString &filename)
 
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)
 
- 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 CameraProcess 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
CameraState::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 {
CameraState::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 cameraprocess.h.

Member Enumeration Documentation

◆ ADUAlgorithm

enum Ekos::CameraProcess::ADUAlgorithm

Definition at line 117 of file cameraprocess.h.

Constructor & Destructor Documentation

◆ CameraProcess()

Ekos::CameraProcess::CameraProcess ( QSharedPointer< CameraState > newModuleState,
QSharedPointer< CaptureDeviceAdaptor > newDeviceAdaptor )

Definition at line 40 of file cameraprocess.cpp.

Member Function Documentation

◆ calculateFlatExpTime()

double Ekos::CameraProcess::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 2287 of file cameraprocess.cpp.

◆ captureImage()

void Ekos::CameraProcess::captureImage ( )

captureImage Initiates image capture in the active job.

Definition at line 1422 of file cameraprocess.cpp.

◆ capturePreview()

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

capturePreview Capture a preview (single or looping ones)

Definition at line 297 of file cameraprocess.cpp.

◆ captureScript()

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

Definition at line 692 of file cameraprocess.h.

◆ captureStarted()

void Ekos::CameraProcess::captureStarted ( CaptureResult rc)

captureStarted Manage the result when capturing has been started

Definition at line 822 of file cameraprocess.cpp.

◆ checkCamera()

void Ekos::CameraProcess::checkCamera ( )

configureCamera Refreshes the CCD information in the capture module.

Definition at line 1910 of file cameraprocess.cpp.

◆ checkFlatCalibration()

bool Ekos::CameraProcess::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 2163 of file cameraprocess.cpp.

◆ checkLightFramePendingTasks()

IPState Ekos::CameraProcess::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 (
    CameraState::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 772 of file cameraprocess.cpp.

◆ checkNextExposure()

void Ekos::CameraProcess::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 870 of file cameraprocess.cpp.

◆ checkPausing()

bool Ekos::CameraProcess::checkPausing ( CaptureContinueAction 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 2634 of file cameraprocess.cpp.

◆ clearFlatCache()

void Ekos::CameraProcess::clearFlatCache ( )

clearFlatCache Clear the measured values for flat calibrations

Definition at line 2398 of file cameraprocess.cpp.

◆ continueFramingAction()

IPState Ekos::CameraProcess::continueFramingAction ( const QSharedPointer< FITSData > & imageData)

continueFramingAction If framing is running, start the next capture sequence

Returns
IPS_OK in all cases

Definition at line 1645 of file cameraprocess.cpp.

◆ executeJob()

void Ekos::CameraProcess::executeJob ( )

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

Definition at line 670 of file cameraprocess.cpp.

◆ filterLabels()

QStringList Ekos::CameraProcess::filterLabels ( )

filterLabels list of currently available filter labels

Definition at line 2831 of file cameraprocess.cpp.

◆ findNextPendingJob()

SequenceJob * Ekos::CameraProcess::findNextPendingJob ( )

findExecutableJob find next job to be executed

Definition at line 2651 of file cameraprocess.cpp.

◆ frameTypes()

QStringList Ekos::CameraProcess::frameTypes ( )

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

Definition at line 2821 of file cameraprocess.cpp.

◆ generateScriptArguments()

QStringList Ekos::CameraProcess::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 2782 of file cameraprocess.cpp.

◆ hasCoolerControl()

bool Ekos::CameraProcess::hasCoolerControl ( )

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

Definition at line 2788 of file cameraprocess.cpp.

◆ jobCreated()

void Ekos::CameraProcess::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 274 of file cameraprocess.cpp.

◆ llsq()

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

Definition at line 2736 of file cameraprocess.cpp.

◆ loadSequenceQueue()

bool Ekos::CameraProcess::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 2563 of file cameraprocess.cpp.

◆ pauseCapturing()

void Ekos::CameraProcess::pauseCapturing ( )

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

Definition at line 426 of file cameraprocess.cpp.

◆ prepareActiveJobStage1()

void Ekos::CameraProcess::prepareActiveJobStage1 ( )

prepareActiveJobStage1 Check for pre job script to execute.

If none, move to stage 2

Definition at line 627 of file cameraprocess.cpp.

◆ prepareActiveJobStage2()

void Ekos::CameraProcess::prepareActiveJobStage2 ( )

prepareActiveJobStage2 Reset #calibrationStage and continue with preparePreCaptureActions().

Definition at line 643 of file cameraprocess.cpp.

◆ prepareJob()

void Ekos::CameraProcess::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 449 of file cameraprocess.cpp.

◆ prepareJobExecution()

void Ekos::CameraProcess::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 CameraProcess.

Definition at line 724 of file cameraprocess.cpp.

◆ previewImageCompletedAction()

IPState Ekos::CameraProcess::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 1688 of file cameraprocess.cpp.

◆ processCaptureError()

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

processCaptureError Handle when image capture fails

Parameters
typeerror type

Definition at line 2131 of file cameraprocess.cpp.

◆ processCaptureTimeout()

void Ekos::CameraProcess::processCaptureTimeout ( )

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

Definition at line 2064 of file cameraprocess.cpp.

◆ processFITSData()

void Ekos::CameraProcess::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 1036 of file cameraprocess.cpp.

◆ processJobCompletion1()

void Ekos::CameraProcess::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 1324 of file cameraprocess.cpp.

◆ processJobCompletion2()

void Ekos::CameraProcess::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 1340 of file cameraprocess.cpp.

◆ processNewRemoteFile()

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

setNewRemoteFile A new image has been stored as remote file

Parameters
filelocal file path

Definition at line 1250 of file cameraprocess.cpp.

◆ processPreCaptureCalibrationStage()

IPState Ekos::CameraProcess::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 1262 of file cameraprocess.cpp.

◆ reconnectCameraDriver()

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

reconnectDriver Reconnect the camera driver

Definition at line 1961 of file cameraprocess.cpp.

◆ refreshOpticalTrain()

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

refreshOpticalTrain Refresh the devices from the optical train configuration

Parameters
namename of the optical train configuration

Definition at line 746 of file cameraprocess.cpp.

◆ removeDevice()

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

Generic method for removing any connected device.

Definition at line 1988 of file cameraprocess.cpp.

◆ resetFrame()

void Ekos::CameraProcess::resetFrame ( )

resetFrame Reset frame settings of the camera

Definition at line 1545 of file cameraprocess.cpp.

◆ restartCamera()

void Ekos::CameraProcess::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 2804 of file cameraprocess.cpp.

◆ resumeSequence()

IPState Ekos::CameraProcess::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 920 of file cameraprocess.cpp.

◆ runCaptureScript()

IPState Ekos::CameraProcess::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 1820 of file cameraprocess.cpp.

◆ saveSequenceQueue()

bool Ekos::CameraProcess::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 2588 of file cameraprocess.cpp.

◆ scriptFinished()

void Ekos::CameraProcess::scriptFinished ( int exitCode,
QProcess::ExitStatus status )

scriptFinished Slot managing the return status of pre/post capture/job scripts

Definition at line 1838 of file cameraprocess.cpp.

◆ selectCamera()

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

setCamera select camera device

Parameters
nameName of the camera device

Definition at line 1891 of file cameraprocess.cpp.

◆ setCamera() [1/2]

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

Connect or disconnect the camera device.

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

Definition at line 2595 of file cameraprocess.cpp.

◆ setCamera() [2/2]

bool Ekos::CameraProcess::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 167 of file cameraprocess.cpp.

◆ setCoolerControl()

bool Ekos::CameraProcess::setCoolerControl ( bool enable)

Set the CCD cooler ON/OFF.

Definition at line 2796 of file cameraprocess.cpp.

◆ setDome()

bool Ekos::CameraProcess::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 157 of file cameraprocess.cpp.

◆ setDownloadProgress()

void Ekos::CameraProcess::setDownloadProgress ( )

setDownloadProgress update the Capture Module and Summary Screen's estimate of how much time is left in the download

Definition at line 1629 of file cameraprocess.cpp.

◆ setDustCap()

bool Ekos::CameraProcess::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 133 of file cameraprocess.cpp.

◆ setExposureProgress()

void Ekos::CameraProcess::setExposureProgress ( ISD::CameraChip * tChip,
double value,
IPState state )

setExposureProgress Manage exposure progress reported by the camera device.

Definition at line 1555 of file cameraprocess.cpp.

◆ setFilterWheel()

bool Ekos::CameraProcess::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 2621 of file cameraprocess.cpp.

◆ setLightBox()

bool Ekos::CameraProcess::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 146 of file cameraprocess.cpp.

◆ setMount()

bool Ekos::CameraProcess::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 83 of file cameraprocess.cpp.

◆ setRotator()

bool Ekos::CameraProcess::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 106 of file cameraprocess.cpp.

◆ setScope()

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

setScope Set active train telescope name

Parameters
nameName of scope

Definition at line 190 of file cameraprocess.h.

◆ showFITSPreview()

void Ekos::CameraProcess::showFITSPreview ( const QSharedPointer< FITSData > & data)

showFITSPreview Directly show the FITS data as preview

Parameters
datapointer to blob containing FITS data

Definition at line 1243 of file cameraprocess.cpp.

◆ startJob()

void Ekos::CameraProcess::startJob ( SequenceJob * job)

startJob Start the execution of a selected sequence job:

  • Initialize the state for capture preparation ({
    See also
    CameraState::initCapturePreparation()}
  • Prepare the selected job ({
    See also
    prepareJob(SequenceJob *)})
    Parameters
    jobselected sequence job

Definition at line 443 of file cameraprocess.cpp.

◆ startNextExposure()

IPState Ekos::CameraProcess::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 896 of file cameraprocess.cpp.

◆ startNextJob()

IPState Ekos::CameraProcess::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 1386 of file cameraprocess.cpp.

◆ startNextPendingJob()

void Ekos::CameraProcess::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 253 of file cameraprocess.cpp.

◆ stopCapturing()

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

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

Parameters
targetStatestate capturing should be having afterwards

Definition at line 320 of file cameraprocess.cpp.

◆ syncDSLRToTargetChip()

void Ekos::CameraProcess::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 1941 of file cameraprocess.cpp.

◆ toggleSequence()

void Ekos::CameraProcess::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 219 of file cameraprocess.cpp.

◆ toggleVideo()

void Ekos::CameraProcess::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 190 of file cameraprocess.cpp.

◆ updateCompletedCaptureCountersAction()

void Ekos::CameraProcess::updateCompletedCaptureCountersAction ( )

updateCompletedCaptureCounters Update counters if an image has been captured

Definition at line 1706 of file cameraprocess.cpp.

◆ updateDownloadTimesAction()

IPState Ekos::CameraProcess::updateDownloadTimesAction ( )

updateDownloadTimesAction Add the current download time to the list of already measured ones

Definition at line 1668 of file cameraprocess.cpp.

◆ updateFilterInfo()

void Ekos::CameraProcess::updateFilterInfo ( )

updateFilterInfo Update the filter information in the INDI drivers of the current camera and dust cap

Definition at line 2423 of file cameraprocess.cpp.

◆ updateFITSViewer() [1/2]

void Ekos::CameraProcess::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 2490 of file cameraprocess.cpp.

◆ updateFITSViewer() [2/2]

void Ekos::CameraProcess::updateFITSViewer ( const QSharedPointer< FITSData > data,
ISD::CameraChip * tChip,
const QString & filename )

Definition at line 2556 of file cameraprocess.cpp.

◆ updateGain()

void Ekos::CameraProcess::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 2839 of file cameraprocess.cpp.

◆ updateImageMetadataAction()

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

updateImageMetadataAction Update meta data of a captured image

Definition at line 1753 of file cameraprocess.cpp.

◆ updateOffset()

void Ekos::CameraProcess::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 2873 of file cameraprocess.cpp.

◆ updatePreCaptureCalibrationStatus()

void Ekos::CameraProcess::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 1302 of file cameraprocess.cpp.

◆ updateTelescopeInfo()

void Ekos::CameraProcess::updateTelescopeInfo ( )

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

Definition at line 2404 of file cameraprocess.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 Mon Nov 18 2024 12:16:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.