Skip to content
Snippets Groups Projects
Select Git revision
  • a1cd93d077d8f21102da98de4393eb4dad3fe604
  • master default protected
  • L2SS-1914-fix_job_dispatch
  • TMSS-3170
  • TMSS-3167
  • TMSS-3161
  • TMSS-3158-Front-End-Only-Allow-Changing-Again
  • TMSS-3133
  • TMSS-3319-Fix-Templates
  • test-fix-deploy
  • TMSS-3134
  • TMSS-2872
  • defer-state
  • add-custom-monitoring-points
  • TMSS-3101-Front-End-Only
  • TMSS-984-choices
  • SDC-1400-Front-End-Only
  • TMSS-3079-PII
  • TMSS-2936
  • check-for-max-244-subbands
  • TMSS-2927---Front-End-Only-PXII
  • Before-Remove-TMSS
  • LOFAR-Release-4_4_318 protected
  • LOFAR-Release-4_4_317 protected
  • LOFAR-Release-4_4_316 protected
  • LOFAR-Release-4_4_315 protected
  • LOFAR-Release-4_4_314 protected
  • LOFAR-Release-4_4_313 protected
  • LOFAR-Release-4_4_312 protected
  • LOFAR-Release-4_4_311 protected
  • LOFAR-Release-4_4_310 protected
  • LOFAR-Release-4_4_309 protected
  • LOFAR-Release-4_4_308 protected
  • LOFAR-Release-4_4_307 protected
  • LOFAR-Release-4_4_306 protected
  • LOFAR-Release-4_4_304 protected
  • LOFAR-Release-4_4_303 protected
  • LOFAR-Release-4_4_302 protected
  • LOFAR-Release-4_4_301 protected
  • LOFAR-Release-4_4_300 protected
  • LOFAR-Release-4_4_299 protected
41 results

auth.js

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    radler.h 2.88 KiB
    // SPDX-License-Identifier: LGPL-3.0-only
    
    #ifndef RADLER_RADLER_H_
    #define RADLER_RADLER_H_
    
    #include <cstring>
    
    #include <aocommon/polarization.h>
    #include <aocommon/uvector.h>
    
    #include "component_list.h"
    #include "settings.h"
    #include "work_table.h"
    #include "work_table_entry.h"
    
    namespace radler {
    namespace algorithms {
    // Forward declared since the class isn't part of Radler's public interface.
    class ParallelDeconvolution;
    }  // namespace algorithms
    
    /**
     * @brief Main interfacing class of the Radio Astronomical Deconvolution
     * Library.
     *
     */
    class Radler {
     public:
      Radler(const Settings& settings, std::unique_ptr<WorkTable> table,
             double beam_size);
    
      /**
       * @brief Constructor for single channel, single polarization deconvolution.
       * @param[in] psf_image PSF image.
       * @param[in/out] residual_image Residual image.
       * @param[in/out] model_image Model image.
       *
       * Please bear in mind to keep the data buffer in the input images alive in
       * the caller, since Radler internally points to this data buffer during calls
       * to \c Perform.
       */
      Radler(const Settings& settings, const aocommon::Image& psf_image,
             aocommon::Image& residual_image, aocommon::Image& model_image,
             double beam_size,
             aocommon::PolarizationEnum polarization =
                 aocommon::PolarizationEnum::StokesI);
    
      ~Radler();
    
      // TODO(AST-912) Make copy/move operations Google Style compliant.
      Radler(const Radler&) = delete;
      Radler(Radler&&) = default;
      Radler& operator=(const Radler&) = delete;
      Radler& operator=(Radler&&) = delete;
    
      ComponentList GetComponentList() const;
    
      /**
       * @brief Exposes a const reference to either the first algorithm, or - in
       * case of a multiscale clean - the algorithm with the maximum number of scale
       * counts.
       */
      const algorithms::DeconvolutionAlgorithm& MaxScaleCountAlgorithm() const;
    
      void Perform(bool& reached_major_threshold, size_t major_iteration_number);
    
      void FreeDeconvolutionAlgorithms();
    
      bool IsInitialized() const;
    
      /// Return IterationNumber of the underlying \c DeconvolutionAlgorithm
      size_t IterationNumber() const;
    
     private:
      // Constructor that becomes convenient when implementing AST-890
      Radler(const Settings& settings, double beam_size);
    
      // Initializes the deconvolution algorithm
      void InitializeDeconvolutionAlgorithm(std::unique_ptr<WorkTable> table);
    
      void ReadMask(const WorkTable& group_table);
    
      const Settings settings_;
    
      std::unique_ptr<WorkTable> table_;
    
      std::unique_ptr<algorithms::ParallelDeconvolution> parallel_deconvolution_;
    
      aocommon::UVector<bool> clean_mask_;
    
      bool auto_mask_is_finished_;
      aocommon::UVector<double> channel_frequencies_;
      aocommon::UVector<float> channel_weights_;
      size_t image_width_;
      size_t image_height_;
      double pixel_scale_x_;
      double pixel_scale_y_;
      aocommon::UVector<bool> auto_mask_;
      double beam_size_;
    };
    
    }  // namespace radler
    #endif