Skip to content
Snippets Groups Projects
Select Git revision
  • 200748966cae5d52b9aa73f810da4e09d23694f5
  • master default protected
  • gec-84-c-compiler-dependency
  • gec-50-only-test-plot-with-gtkmm
  • make-baseline-aoqplot-nicer
  • use-system-pybind11
  • fix-filterbank-imagesets
  • fix-drawing-large-images
  • allow-writing-to-filterbanksets
  • implement-nroamlize-bandpass-for-non-complex-data
  • support-multiple-pols-in-filterbank
  • solve-flipped-axis-crashes
  • improve-statistics-speed
  • avoid-deprecated-gtkmm
  • ast-1621-deprecated-deletetable
  • ast-1613-update-hdf5-url
  • rename-use-input-flags-variable
  • dockerfile-fix
  • open-correct-data-column
  • add-target-cpu
  • add-git-to-format-conatiner
  • v3.4.0
  • v3.3.0
  • v3.2.0
  • test-vx.y
  • v3.1.0
  • v3.0.0
  • v2.15.0
  • v2.14.0
  • v2.13.0
  • v2.12.1
  • v2.12.0
  • v2.11.0
  • v2.10.0
  • v2.9.0
  • v2.8.0
  • v2.7.0
  • v2.6.0
  • v2.5.0
  • v2.4.0
  • v2.3.0
41 results

run-cpplint.sh

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    msv3readutils.h 2.49 KiB
    // msv3readutils.h: Utility functions to read the meta data relevant for
    // simulating the beam from OSKAR simulations stored in MS format.
    //
    // Copyright (C) 2013
    // ASTRON (Netherlands Institute for Radio Astronomy)
    // P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
    //
    // This file is part of the LOFAR software suite.
    // The LOFAR 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 LOFAR 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 LOFAR software suite. If not, see <http://www.gnu.org/licenses/>.
    //
    // $Id$
    
    #ifndef EVERYBEAM_MSV3READUTILS_H_
    #define EVERYBEAM_MSV3READUTILS_H_
    
    // \file
    // Utility functions to read the meta data relevant for simulating the beam from
    // OSKAR simulations stored in MS format.
    
    #include "station.h"
    #include "elementresponse.h"
    
    #include <casacore/ms/MeasurementSets/MeasurementSet.h>
    #include <casacore/ms/MeasurementSets/MSAntennaColumns.h>
    #include <casacore/measures/Measures/MDirection.h>
    
    namespace everybeam {
    const ElementResponseModel defaultElementResponseModel =
        ElementResponseModel::kUnknown;
    
    /**
     * @brief Read single station from MeasurementSet
     *
     * @param ms Measurement set
     * @param id Station id
     * @param model Element response model
     * @return Station::Ptr
     */
    Station::Ptr ReadMSv3Station(
        const casacore::MeasurementSet &ms, unsigned int id,
        const ElementResponseModel model = defaultElementResponseModel);
    
    /**
     * @brief Read multiple stations from measurment set into buffer out_it
     * Loops over ReadMSv3Station for all the antennas in MeasurementSet
     *
     * @tparam T Template type
     * @param ms Measurement set
     * @param out_it Out buffer
     * @param model Element Response buffer
     */
    template <typename T>
    void ReadMSv3Stations(
        const casacore::MeasurementSet &ms, T out_it,
        const ElementResponseModel model = defaultElementResponseModel) {
      casacore::ROMSAntennaColumns antenna(ms.antenna());
      for (unsigned int i = 0; i < antenna.nrow(); ++i) {
        *out_it++ = ReadMSv3Station(ms, i, model);
      }
    }
    
    }  // namespace everybeam
    #endif  // EVERYBEAM_MSV3READUTILS_H_