Kstars
cameraprocess.h
30 * Executing the sequence jobs is a complex process (explained here for light frames) and works roughly
31 * as follows and starts by calling {@see Capture#start()} either from the scheduler, by DBUS or by
33 * 1. Select the next sequence job to be executed ({@see startNextPendingJob()}. If the list of jobs is
48 * flip actions, guiding deviation, dithering, re-focusing, ..., see {@see #checkLightFramePendingTasks()}
50 * - Initiate capturing (set diverse settings of {@see #activeCamera()} (see {@see #captureImage})
64 * - update time calculation and counters and execute post capture script ({@see imageCapturingCompleted()})
69 * TODO: check why we need this separate method and cannot use {@see updatePreCaptureCalibrationStatus()}
79 * Capturing ADU based flats begins like capturing other frame types. The difference begins as soon as an
80 * image has been received (step 6 above) in {@see imageCapturingCompleted()}. Here {@see checkFlatCalibration()}
81 * is called to check the frame's ADU. If the ADU isn't in the expected range, a new frame is captured with
86 * Capture has three ways that trigger autofocus during a capturing sequence: HFR based, temperature drift based,
87 * timer based and post meridian flip based. Each time the capture execution reaches the preparation of caturing
98 * {@see #updateMFMountState(MeridianFlipState::MeridianFlipMountState)}, the meridian flip state is set
100 * - If capturing is running the state remains in this state until the frame has been captured. As soon as
101 * the capturing state changes to id, suspended or aborted (see {@see CameraState::setCaptureState(CaptureState)}),
102 * the meridian flip state is set to MF_ACCEPTED (see {@see MeridianFlipState::updateMeridianFlipStage(const MFStage)}).
103 * This is triggered from {@see #checkLightFramePendingTasks()}, i.e. this function is looping once per second until
108 * As soon as the meridian flip has been completed (and the Capture module is waiting for it), the Capture module
109 * takes over the control and executes all necessary tasks: aligning, re-focusing, guiding, etc. This happens all through
134 CameraProcess(QSharedPointer<CameraState> newModuleState, QSharedPointer<CaptureDeviceAdaptor> newDeviceAdaptor);
272 * @brief prepareJob Update the counters of existing frames and continue with prepareActiveJob(), if there exist less
282 * @brief prepareActiveJobStage2 Reset #calibrationStage and continue with preparePreCaptureActions().
287 * @brief preparePreCaptureActions Trigger setting the filter, temperature, (if existing) the rotator angle and
291 * After triggering the settings, this method returns. This mechanism is slightly tricky, since it
292 * asynchronous and event based and works as collaboration between Capture and SequenceJob. Capture has
297 * SequenceJob checks, if it has reached the target value and if yes, sets this action as as completed.
299 * As soon as all actions are completed, SequenceJob emits a prepareComplete() event, which triggers
305 * @brief executeJob Start the execution of #activeJob by initiating updatePreCaptureCalibrationStatus().
321 * 3. Is a meridian flip already running (@see m_MeridianFlipState->checkMeridianFlipRunning()) or ready
338 * @brief updatePreCaptureCalibrationStatus This is a wrapping loop for processPreCaptureCalibrationStage(),
348 * @brief processPreCaptureCalibrationStage Execute the tasks that need to be completed before capturing may start.
370 * @brief startNextExposure Ensure that all pending preparation tasks are be completed (focusing, dithering, etc.)
376 * to be checked before each single frame capture. efore starting to capture the next light frame,
381 * - For bias, dark and flat frames, preparation jobs are only executed when starting a sequence.
384 * @return IPS_OK, iff all pending preparation jobs are completed (@see checkLightFramePendingTasks()).
404 * @brief newFITS process new FITS data received from camera. Update status of active job and overall sequence.
433 * @brief processJobCompletionStage1 Process job completion. In stage 1 when simply check if the is a post-job script to be running
439 * @brief processJobCompletionStage2 Stop execution of the current sequence and check whether there exists a next sequence
485 * @brief updateDownloadTimesAction Add the current download time to the list of already measured ones
490 * @brief previewImageCompletedAction Activities required when a preview image has been captured.
594 void updateFITSViewer(const QSharedPointer<FITSData> data, const FITSMode &captureMode, const FITSScale &captureFilter, const QString &filename, const QString &deviceName);
595 void updateFITSViewer(const QSharedPointer<FITSData> data, ISD::CameraChip *tChip, const QString &filename);
603 * @param targetName override the target defined in the sequence queue file (necessary for using the target of the scheduler)
605 bool loadSequenceQueue(const QString &fileURL, const QString &targetName = "", bool setOptions = true);
634 * @return generates argument list consisting of one argument -metadata followed by JSON-formatted key:value pair:
657 * @brief restartCamera Restarts the INDI driver associated with a camera. Remote and Local drivers are supported.
658 * @param name Name of camera to restart. If a driver defined multiple cameras, they would be removed and added again
660 * @note Restarting camera should only be used as a last resort when it comes completely unresponsive. Due the complex
812 bool checkSavingReceivedImage(const QSharedPointer<FITSData> &data, const QString &extension, QString &filename);
The CameraProcess class holds the entire business logic to control capturing execution.
Definition cameraprocess.h:113
IPState runCaptureScript(ScriptTypes scriptType, bool precond=true)
runCaptureScript Run the pre-/post capture/job script
Definition cameraprocess.cpp:1820
void updateTelescopeInfo()
updateTelescopeInfo Update the scope information in the camera's INDI driver.
Definition cameraprocess.cpp:2404
void processCaptureTimeout()
processCaptureTimeout If exposure timed out, let's handle it.
Definition cameraprocess.cpp:2064
bool setMount(ISD::Mount *device)
setMount Connect to the given mount device (and deconnect the old one if existing)
Definition cameraprocess.cpp:83
void setExposureProgress(ISD::CameraChip *tChip, double value, IPState state)
setExposureProgress Manage exposure progress reported by the camera device.
Definition cameraprocess.cpp:1555
IPState startNextExposure()
startNextExposure Ensure that all pending preparation tasks are be completed (focusing,...
Definition cameraprocess.cpp:896
void updatePreCaptureCalibrationStatus()
updatePreCaptureCalibrationStatus This is a wrapping loop for processPreCaptureCalibrationStage(),...
Definition cameraprocess.cpp:1302
void reconnectCameraDriver(const QString &camera, const QString &filterWheel)
reconnectDriver Reconnect the camera driver
Definition cameraprocess.cpp:1961
IPState checkLightFramePendingTasks()
Check all tasks that might be pending before capturing may start.
Definition cameraprocess.cpp:772
void checkNextExposure()
checkNextExposure Try to start capturing the next exposure (
Definition cameraprocess.cpp:870
void clearFlatCache()
clearFlatCache Clear the measured values for flat calibrations
Definition cameraprocess.cpp:2398
bool loadSequenceQueue(const QString &fileURL, const QString &targetName="", bool setOptions=true)
Loads the Ekos Sequence Queue file in the Sequence Queue.
Definition cameraprocess.cpp:2563
bool setFilterWheel(ISD::FilterWheel *device)
setFilterWheel Connect to the given filter wheel device (and deconnect the old one if existing)
Definition cameraprocess.cpp:2621
void startNextPendingJob()
startNextPendingJob Start the next pending job.
Definition cameraprocess.cpp:253
Q_SCRIPTABLE void resetFrame()
resetFrame Reset frame settings of the camera
Definition cameraprocess.cpp:1545
bool saveSequenceQueue(const QString &path, bool loadOptions=true)
Saves the Sequence Queue to the Ekos Sequence Queue file.
Definition cameraprocess.cpp:2588
QStringList generateScriptArguments() const
generateScriptArguments Generate argument list to pass to capture script
Definition cameraprocess.cpp:2782
IPState previewImageCompletedAction()
previewImageCompletedAction Activities required when a preview image has been captured.
Definition cameraprocess.cpp:1688
bool setDome(ISD::Dome *device)
setDome Connect to the given dome device
Definition cameraprocess.cpp:157
void setScope(const QString &name)
setScope Set active train telescope name
Definition cameraprocess.h:190
void prepareActiveJobStage1()
prepareActiveJobStage1 Check for pre job script to execute.
Definition cameraprocess.cpp:627
void updateCompletedCaptureCountersAction()
updateCompletedCaptureCounters Update counters if an image has been captured
Definition cameraprocess.cpp:1706
void scriptFinished(int exitCode, QProcess::ExitStatus status)
scriptFinished Slot managing the return status of pre/post capture/job scripts
Definition cameraprocess.cpp:1838
bool setRotator(ISD::Rotator *device)
setRotator Connect to the given rotator device (and deconnect the old one if existing)
Definition cameraprocess.cpp:106
Q_SCRIPTABLE void executeJob()
executeJob Start the execution of activeJob by initiating updatePreCaptureCalibrationStatus().
Definition cameraprocess.cpp:670
SequenceJob * findNextPendingJob()
findExecutableJob find next job to be executed
Definition cameraprocess.cpp:2651
void stopCapturing(CaptureState targetState)
stopCapturing Stopping the entire capturing state (envelope for aborting, suspending,...
Definition cameraprocess.cpp:320
void updateFilterInfo()
updateFilterInfo Update the filter information in the INDI drivers of the current camera and dust cap
Definition cameraprocess.cpp:2423
IPState processPreCaptureCalibrationStage()
processPreCaptureCalibrationStage Execute the tasks that need to be completed before capturing may st...
Definition cameraprocess.cpp:1262
bool setCamera(ISD::Camera *device)
setCamera Connect to the given camera device (and deconnect the old one if existing)
Definition cameraprocess.cpp:167
void checkCamera()
configureCamera Refreshes the CCD information in the capture module.
Definition cameraprocess.cpp:1910
void updateGain(double value, QMap< QString, QMap< QString, QVariant > > &propertyMap)
getGain Update the gain value from the custom property value.
Definition cameraprocess.cpp:2839
QStringList filterLabels()
filterLabels list of currently available filter labels
Definition cameraprocess.cpp:2831
bool setLightBox(ISD::LightBox *device)
setLightBox Connect to the given dust cap device (and deconnect the old one if existing)
Definition cameraprocess.cpp:146
Q_SCRIPTABLE void toggleSequence()
toggleSequence Toggle sequence state depending on its current state.
Definition cameraprocess.cpp:219
IPState startNextJob()
startNextJob Select the next job that is either idle or aborted and call prepareJob(*SequenceJob) to ...
Definition cameraprocess.cpp:1386
bool checkPausing(CaptureContinueAction continueAction)
checkPausing check if a pause has been planned and pause subsequently
Definition cameraprocess.cpp:2634
void prepareActiveJobStage2()
prepareActiveJobStage2 Reset #calibrationStage and continue with preparePreCaptureActions().
Definition cameraprocess.cpp:643
void showFITSPreview(const QSharedPointer< FITSData > &data)
showFITSPreview Directly show the FITS data as preview
Definition cameraprocess.cpp:1243
void removeDevice(const QSharedPointer< ISD::GenericDevice > &device)
Generic method for removing any connected device.
Definition cameraprocess.cpp:1988
void startJob(SequenceJob *job)
startJob Start the execution of a selected sequence job:
Definition cameraprocess.cpp:443
void refreshOpticalTrain(QString name)
refreshOpticalTrain Refresh the devices from the optical train configuration
Definition cameraprocess.cpp:746
QStringList frameTypes()
frameTypes Retrieve the frame types from the active camera's primary chip.
Definition cameraprocess.cpp:2821
void updateOffset(double value, QMap< QString, QMap< QString, QVariant > > &propertyMap)
getOffset Update the offset value from the custom property value.
Definition cameraprocess.cpp:2873
void capturePreview(bool loop=false)
capturePreview Capture a preview (single or looping ones)
Definition cameraprocess.cpp:297
void processJobCompletion2()
processJobCompletionStage2 Stop execution of the current sequence and check whether there exists a ne...
Definition cameraprocess.cpp:1340
bool checkFlatCalibration(QSharedPointer< FITSData > imageData, double exp_min, double exp_max)
checkFlatCalibration check the flat calibration
Definition cameraprocess.cpp:2163
IPState updateImageMetadataAction(QSharedPointer< FITSData > imageData)
updateImageMetadataAction Update meta data of a captured image
Definition cameraprocess.cpp:1753
void captureStarted(CaptureResult rc)
captureStarted Manage the result when capturing has been started
Definition cameraprocess.cpp:822
void processFITSData(const QSharedPointer< FITSData > &data, const QString &extension)
newFITS process new FITS data received from camera.
Definition cameraprocess.cpp:1036
void prepareJob(SequenceJob *job)
prepareJob Update the counters of existing frames and continue with prepareActiveJob(),...
Definition cameraprocess.cpp:449
void processNewRemoteFile(QString file)
setNewRemoteFile A new image has been stored as remote file
Definition cameraprocess.cpp:1250
Q_SCRIPTABLE void pauseCapturing()
pauseCapturing Pauses capturing as soon as the current capture is complete.
Definition cameraprocess.cpp:426
IPState updateDownloadTimesAction()
updateDownloadTimesAction Add the current download time to the list of already measured ones
Definition cameraprocess.cpp:1668
double calculateFlatExpTime(double currentADU)
calculateFlatExpTime calculate the next flat exposure time from the measured ADU value
Definition cameraprocess.cpp:2287
void processCaptureError(ISD::Camera::ErrorType type)
processCaptureError Handle when image capture fails
Definition cameraprocess.cpp:2131
IPState continueFramingAction(const QSharedPointer< FITSData > &imageData)
continueFramingAction If framing is running, start the next capture sequence
Definition cameraprocess.cpp:1645
void syncDSLRToTargetChip(const QString &model)
syncDSLRToTargetChip Syncs INDI driver CCD_INFO property to the DSLR values.
Definition cameraprocess.cpp:1941
void setDownloadProgress()
setDownloadProgress update the Capture Module and Summary Screen's estimate of how much time is left ...
Definition cameraprocess.cpp:1629
void prepareJobExecution()
preparePreCaptureActions Trigger setting the filter, temperature, (if existing) the rotator angle and...
Definition cameraprocess.cpp:724
void 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 cameraprocess.cpp:2490
void processJobCompletion1()
processJobCompletionStage1 Process job completion.
Definition cameraprocess.cpp:1324
void captureImage()
captureImage Initiates image capture in the active job.
Definition cameraprocess.cpp:1422
bool setDustCap(ISD::DustCap *device)
setDustCap Connect to the given dust cap device (and deconnect the old one if existing)
Definition cameraprocess.cpp:133
void restartCamera(const QString &name)
restartCamera Restarts the INDI driver associated with a camera.
Definition cameraprocess.cpp:2804
bool hasCoolerControl()
Does the CCD has a cooler control (On/Off) ?
Definition cameraprocess.cpp:2788
void toggleVideo(bool enabled)
Toggle video streaming if supported by the device.
Definition cameraprocess.cpp:190
Sequence Job is a container for the details required to capture a series of images.
Q_OBJECTQ_OBJECT
ExitStatus
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:47:11 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:47:11 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.