Skip to content
  • Wolfgang Reissenberger's avatar
    Flats Speedup · 32578a1e
    Wolfgang Reissenberger authored and Jasem Mutlaq's avatar Jasem Mutlaq committed
    Flats capturing implementation is currently not optimal, since the last captured calibration frame doesn't get stored, although it fits the criteria.
    
    To implement this, it is necessary to rework the entire FITS handling and transfer it from ISD::Camera to CaptureProcess.
    
    The refactoring is done in the following steps:
    1. Dead code removed, documentation for flats generation process added
    2. Code in Camera for image file buffer creation extracted as separate function. This is necessary to keep the image data in memory, but deciding later whether it should be stored or not.
    3. Shift the decision whether a received frame should be saved from Camera to CaptureProcess::processFITSData(), which is triggered by the newImage() event from Camera. The logic for saving the image file remains in Camera, but is now triggered from outside.
    4. Shift the logic for updating the FITSViewer from Camera to CaptureProcess as step in CaptureProcess::processFITSData(), making Camera independent from the FITSViewer.
    5. Move the file name generation from Camera to CaptureModuleState, making Camera independent from PlaceholderPath. This is possible since triggering Camera to save an image now resides in CaptureProcess.
    6. Refactoring inside CaptureProcess extracting the decision logic whether a received image should be saved to a dedicated function CaptureProcess::checkSavingReceivedImage().
    7. Add a call to CaptureProcess::checkSavingReceivedImage() for the case that a calibrated frame satisfies the calibration conditions. This is the step where all the refactoring was necessary for.
    8. Code cleanup
    32578a1e