Skip to content
Snippets Groups Projects
Select Git revision
  • 6d0c79b82ecf7eb46fa4937571ac8d16f25a992f
  • master default protected
  • zhang-master-patch-34807
  • add-single-element-interface
  • ast-919-readthedocs
  • ncp_fix
  • workaround-wsclean-issue-83
  • ast-645-add-beam-normalisation-mode-preapplied
  • ast-645-add-beam-normalisation-mode-jm
  • activate-oskar-pybindings
  • disable-element-beam-1
  • submodulesync
  • fix-eigen
  • ncp_check
  • random-fixes
  • lobes-se607-1
  • test-schaapcommon
  • just-testing
  • extend-add_beaminfo-script
  • extend-telescope-interface-to-support-dp3
  • lobes-investigation
  • v0.3.1
  • v0.3.0
  • v0.2.0
  • v0.1.3
  • v0.1.2
  • v0.1.1
  • v0.1.0
28 results

oskar.h

Blame
  • Forked from ResearchAndDevelopment / EveryBeam
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    oskar.h 2.64 KiB
    // LOFARTelescope.h: Base class for computing the response for the LOFAR
    // telescope.
    //
    // Copyright (C) 2020
    // ASTRON (Netherlands Institute for Radio Astronomy)
    // P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
    //
    // This file is part of the EveryBeam software suite.
    // The EveryBeam software suite is free software: you can redistribute it and/or
    // modify it under the terms of the GNU General Public License as published
    // by the Free Software Foundation, either version 3 of the License, or
    // (at your option) any later version.
    //
    // The EveryBeam software suite is distributed in the hope that it will be
    // useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    // GNU General Public License for more details.
    //
    // You should have received a copy of the GNU General Public License along
    // with the EveryBeam software suite. If not, see
    // <http://www.gnu.org/licenses/>.
    //
    // $Id$
    
    #ifndef EVERYBEAM_TELESCOPE_OSKAR_H_
    #define EVERYBEAM_TELESCOPE_OSKAR_H_
    
    #include "../station.h"
    #include "../elementresponse.h"
    #include "telescope.h"
    
    #include <casacore/measures/Measures/MPosition.h>
    #include <casacore/measures/Measures/MDirection.h>
    #include <casacore/measures/Measures/MEpoch.h>
    #include <memory>
    
    namespace everybeam {
    
    namespace telescope {
    
    //! LOFAR telescope class
    class OSKAR final : public Telescope {
     public:
      /**
       * @brief Construct a new OSKAR object
       *
       * @param ms MeasurementSet
       * @param model Element Response model
       * @param options telescope options
       */
      OSKAR(casacore::MeasurementSet &ms, const Options &options);
    
      std::unique_ptr<griddedresponse::GriddedResponse> GetGriddedResponse(
          const coords::CoordinateSystem &coordinate_system) override;
    
      /**
       * @brief Get station by index
       *
       * @param station_id Station index to retrieve
       * @return Station::Ptr
       */
      Station::Ptr GetStation(std::size_t station_idx) const {
        // Assert only in DEBUG mode
        assert(station_idx < nstations_);
        return stations_[station_idx];
      }
    
     private:
      void ReadAllStations(const casacore::MeasurementSet &ms,
                           const ElementResponseModel model) {
        casacore::ROMSAntennaColumns antenna(ms.antenna());
    
        for (std::size_t i = 0; i < antenna.nrow(); ++i) {
          stations_[i] = ReadStation(ms, i, model);
        }
      };
    
      Station::Ptr ReadStation(const casacore::MeasurementSet &ms,
                               const std::size_t id,
                               const ElementResponseModel model) const;
    
      std::vector<Station::Ptr> stations_;
    };
    }  // namespace telescope
    }  // namespace everybeam
    
    #endif  // EVERYBEAM_TELESCOPE_OSKAR_H_