Skip to content
Snippets Groups Projects
Select Git revision
  • 060df8ce81acf6109dd8b4461ae169390fb88641
  • master default protected
  • fix-64-bit
  • L2SDP-261
  • 2021-04-14T14.09.01_sdptr
  • 2021-04-14T13.43.34_sdptr
6 results

fpga.cpp

Blame
  • Forked from LOFAR2.0 / sdptr
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    GaussianSource.h 2.22 KiB
    // GaussianSource.h: Gaussian source model component.
    //
    // Copyright (C) 2020 ASTRON (Netherlands Institute for Radio Astronomy)
    // SPDX-License-Identifier: GPL-3.0-or-later
    
    #ifndef DPPP_GAUSSIANSOURCE_H
    #define DPPP_GAUSSIANSOURCE_H
    
    #include <PointSource.h>
    
    namespace dp3 {
    namespace base {
    
    /// \brief Gaussian source model component.
    
    /// @{
    
    class GaussianSource : public dp3::base::PointSource {
    public:
      typedef std::shared_ptr<GaussianSource> Ptr;
      typedef std::shared_ptr<const GaussianSource> ConstPtr;
    
      GaussianSource(const Direction &direction);
      GaussianSource(const Direction &direction, const Stokes &stokes,
                     size_t beam_id = 0);
      GaussianSource(const Direction &direction, const Spectrum &spectrum,
                     double position_angle, bool is_position_angle_absolute,
                     double minor_axis, double major_axis, size_t beam_id = 0);
    
      /// Set position angle in radians. The position angle is the smallest angle
      /// between the major axis and North, measured positively North over East.
      void SetPositionAngle(double angle);
      double GetPositionAngle() const { return position_angle_; }
    
      /// Set whether the position angle (orientation) is absolute, see
      /// documentation of class member)
      void SetPositionAngleIsAbsolute(bool positionAngleIsAbsolute) {
        is_position_angle_absolute_ = positionAngleIsAbsolute;
      }
    
      /// Return whether the position angle (orientation) is absolute, see
      /// documentation of class member.
      bool GetPositionAngleIsAbsolute() const {
        return is_position_angle_absolute_;
      }
    
      /// Set the major axis length (FWHM in radians).
      void SetMajorAxis(double fwhm);
      double GetMajorAxis() const { return major_axis_; }
    
      /// Set the minor axis length (FWHM in radians).
      void SetMinorAxis(double fwhm);
      double GetMinorAxis() const { return minor_axis_; }
    
    private:
      double position_angle_;
      /// Whether the position angle (also refered to as orientation) is absolute
      /// (w.r.t. to the local declination axis) or with respect to the declination
      /// axis at the phase center (the default until 2022, it was fixed in 5.3.0)
      bool is_position_angle_absolute_;
      double major_axis_;
      double minor_axis_;
    };
    
    /// @}
    
    } // namespace base
    } // namespace dp3
    
    #endif