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);
615 * @param targetName override the target defined in the sequence queue file (necessary for using the target of the scheduler)
617 bool loadSequenceQueue(const QString &fileURL, const QString &targetName = "", bool setOptions = true);
646 * @return generates argument list consisting of one argument -metadata followed by JSON-formatted key:value pair:
669 * @brief restartCamera Restarts the INDI driver associated with a camera. Remote and Local drivers are supported.
670 * @param name Name of camera to restart. If a driver defined multiple cameras, they would be removed and added again
672 * @note Restarting camera should only be used as a last resort when it comes completely unresponsive. Due the complex
830 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:1846
void updateTelescopeInfo()
updateTelescopeInfo Update the scope information in the camera's INDI driver.
Definition cameraprocess.cpp:2430
void processCaptureTimeout()
processCaptureTimeout If exposure timed out, let's handle it.
Definition cameraprocess.cpp:2090
bool setMount(ISD::Mount *device)
setMount Connect to the given mount device (and deconnect the old one if existing)
Definition cameraprocess.cpp:84
void setExposureProgress(ISD::CameraChip *tChip, double value, IPState state)
setExposureProgress Manage exposure progress reported by the camera device.
Definition cameraprocess.cpp:1581
IPState startNextExposure()
startNextExposure Ensure that all pending preparation tasks are be completed (focusing,...
Definition cameraprocess.cpp:920
void updatePreCaptureCalibrationStatus()
updatePreCaptureCalibrationStatus This is a wrapping loop for processPreCaptureCalibrationStage(),...
Definition cameraprocess.cpp:1328
void reconnectCameraDriver(const QString &camera, const QString &filterWheel)
reconnectDriver Reconnect the camera driver
Definition cameraprocess.cpp:1987
IPState checkLightFramePendingTasks()
Check all tasks that might be pending before capturing may start.
Definition cameraprocess.cpp:796
void checkNextExposure()
checkNextExposure Try to start capturing the next exposure (
Definition cameraprocess.cpp:894
void clearFlatCache()
clearFlatCache Clear the measured values for flat calibrations
Definition cameraprocess.cpp:2424
bool loadSequenceQueue(const QString &fileURL, const QString &targetName="", bool setOptions=true)
Loads the Ekos Sequence Queue file in the Sequence Queue.
Definition cameraprocess.cpp:2635
bool setFilterWheel(ISD::FilterWheel *device)
setFilterWheel Connect to the given filter wheel device (and deconnect the old one if existing)
Definition cameraprocess.cpp:2695
void startNextPendingJob()
startNextPendingJob Start the next pending job.
Definition cameraprocess.cpp:267
Q_SCRIPTABLE void resetFrame()
resetFrame Reset frame settings of the camera
Definition cameraprocess.cpp:1571
bool saveSequenceQueue(const QString &path, bool loadOptions=true)
Saves the Sequence Queue to the Ekos Sequence Queue file.
Definition cameraprocess.cpp:2660
QStringList generateScriptArguments() const
generateScriptArguments Generate argument list to pass to capture script
Definition cameraprocess.cpp:2871
IPState previewImageCompletedAction()
previewImageCompletedAction Activities required when a preview image has been captured.
Definition cameraprocess.cpp:1714
bool setDome(ISD::Dome *device)
setDome Connect to the given dome device
Definition cameraprocess.cpp:158
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:651
void updateCompletedCaptureCountersAction()
updateCompletedCaptureCounters Update counters if an image has been captured
Definition cameraprocess.cpp:1732
void scriptFinished(int exitCode, QProcess::ExitStatus status)
scriptFinished Slot managing the return status of pre/post capture/job scripts
Definition cameraprocess.cpp:1864
bool setRotator(ISD::Rotator *device)
setRotator Connect to the given rotator device (and deconnect the old one if existing)
Definition cameraprocess.cpp:107
Q_SCRIPTABLE void executeJob()
executeJob Start the execution of activeJob by initiating updatePreCaptureCalibrationStatus().
Definition cameraprocess.cpp:694
SequenceJob * findNextPendingJob()
findExecutableJob find next job to be executed
Definition cameraprocess.cpp:2725
void stopCapturing(CaptureState targetState)
stopCapturing Stopping the entire capturing state (envelope for aborting, suspending,...
Definition cameraprocess.cpp:334
void updateFilterInfo()
updateFilterInfo Update the filter information in the INDI drivers of the current camera and dust cap
Definition cameraprocess.cpp:2449
IPState processPreCaptureCalibrationStage()
processPreCaptureCalibrationStage Execute the tasks that need to be completed before capturing may st...
Definition cameraprocess.cpp:1287
bool setCamera(ISD::Camera *device)
setCamera Connect to the given camera device (and deconnect the old one if existing)
Definition cameraprocess.cpp:168
QSharedPointer< StreamWG > getVideoWindow()
getVideoWindow Return the current video window and initialize it if required.
Definition cameraprocess.cpp:2589
void checkCamera()
configureCamera Refreshes the CCD information in the capture module.
Definition cameraprocess.cpp:1936
void updateGain(double value, QMap< QString, QMap< QString, QVariant > > &propertyMap)
getGain Update the gain value from the custom property value.
Definition cameraprocess.cpp:2932
QStringList filterLabels()
filterLabels list of currently available filter labels
Definition cameraprocess.cpp:2924
bool setLightBox(ISD::LightBox *device)
setLightBox Connect to the given dust cap device (and deconnect the old one if existing)
Definition cameraprocess.cpp:147
Q_SCRIPTABLE void toggleSequence()
toggleSequence Toggle sequence state depending on its current state.
Definition cameraprocess.cpp:233
IPState startNextJob()
startNextJob Select the next job that is either idle or aborted and call prepareJob(*SequenceJob) to ...
Definition cameraprocess.cpp:1412
bool checkPausing(CaptureContinueAction continueAction)
checkPausing check if a pause has been planned and pause subsequently
Definition cameraprocess.cpp:2708
void prepareActiveJobStage2()
prepareActiveJobStage2 Reset #calibrationStage and continue with preparePreCaptureActions().
Definition cameraprocess.cpp:667
void showFITSPreview(const QSharedPointer< FITSData > &data)
showFITSPreview Directly show the FITS data as preview
Definition cameraprocess.cpp:1268
void removeDevice(const QSharedPointer< ISD::GenericDevice > &device)
Generic method for removing any connected device.
Definition cameraprocess.cpp:2014
void startJob(SequenceJob *job)
startJob Start the execution of a selected sequence job:
Definition cameraprocess.cpp:457
void refreshOpticalTrain(QString name)
refreshOpticalTrain Refresh the devices from the optical train configuration
Definition cameraprocess.cpp:770
QStringList frameTypes()
frameTypes Retrieve the frame types from the active camera's primary chip.
Definition cameraprocess.cpp:2910
void updateOffset(double value, QMap< QString, QMap< QString, QVariant > > &propertyMap)
getOffset Update the offset value from the custom property value.
Definition cameraprocess.cpp:2966
void capturePreview(bool loop=false)
capturePreview Capture a preview (single or looping ones)
Definition cameraprocess.cpp:311
void processJobCompletion2()
processJobCompletionStage2 Stop execution of the current sequence and check whether there exists a ne...
Definition cameraprocess.cpp:1366
bool checkFlatCalibration(QSharedPointer< FITSData > imageData, double exp_min, double exp_max)
checkFlatCalibration check the flat calibration
Definition cameraprocess.cpp:2189
IPState updateImageMetadataAction(QSharedPointer< FITSData > imageData)
updateImageMetadataAction Update meta data of a captured image
Definition cameraprocess.cpp:1779
void captureStarted(CaptureResult rc)
captureStarted Manage the result when capturing has been started
Definition cameraprocess.cpp:846
void processFITSData(const QSharedPointer< FITSData > &data, const QString &extension)
newFITS process new FITS data received from camera.
Definition cameraprocess.cpp:1060
void prepareJob(SequenceJob *job)
prepareJob Update the counters of existing frames and continue with prepareActiveJob(),...
Definition cameraprocess.cpp:463
void processNewRemoteFile(QString file)
setNewRemoteFile A new image has been stored as remote file
Definition cameraprocess.cpp:1275
Q_SCRIPTABLE void pauseCapturing()
pauseCapturing Pauses capturing as soon as the current capture is complete.
Definition cameraprocess.cpp:440
IPState updateDownloadTimesAction()
updateDownloadTimesAction Add the current download time to the list of already measured ones
Definition cameraprocess.cpp:1694
double calculateFlatExpTime(double currentADU)
calculateFlatExpTime calculate the next flat exposure time from the measured ADU value
Definition cameraprocess.cpp:2313
void processCaptureError(ISD::Camera::ErrorType type)
processCaptureError Handle when image capture fails
Definition cameraprocess.cpp:2157
IPState continueFramingAction(const QSharedPointer< FITSData > &imageData)
continueFramingAction If framing is running, start the next capture sequence
Definition cameraprocess.cpp:1671
void syncDSLRToTargetChip(const QString &model)
syncDSLRToTargetChip Syncs INDI driver CCD_INFO property to the DSLR values.
Definition cameraprocess.cpp:1967
void setDownloadProgress()
setDownloadProgress update the Capture Module and Summary Screen's estimate of how much time is left ...
Definition cameraprocess.cpp:1655
void prepareJobExecution()
preparePreCaptureActions Trigger setting the filter, temperature, (if existing) the rotator angle and...
Definition cameraprocess.cpp:748
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:2516
void processJobCompletion1()
processJobCompletionStage1 Process job completion.
Definition cameraprocess.cpp:1350
void captureImage()
captureImage Initiates image capture in the active job.
Definition cameraprocess.cpp:1448
bool setDustCap(ISD::DustCap *device)
setDustCap Connect to the given dust cap device (and deconnect the old one if existing)
Definition cameraprocess.cpp:134
void restartCamera(const QString &name)
restartCamera Restarts the INDI driver associated with a camera.
Definition cameraprocess.cpp:2893
bool hasCoolerControl()
Does the CCD has a cooler control (On/Off) ?
Definition cameraprocess.cpp:2877
void toggleVideo(bool enabled)
Toggle video streaming if supported by the device.
Definition cameraprocess.cpp:195
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 Sat Dec 21 2024 17:04:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.