Skip to content
Snippets Groups Projects
Select Git revision
  • c46eeb115bce7a98f69d185726fde0a14c25b116
  • MCCS-163 default
  • main
  • sar-277-update-docs-with-examples-for-lrc
  • st-946-automate
  • sar_302-log-fix
  • sar-287_subarray_commands_to_lrc
  • sar_302-POC_await_sub_device_state
  • sat_302_fix_pipelines
  • sar-286_lrc_one_subarry_command
  • sar-286_lrc_improvements
  • sar-288-async-controller
  • sar-276-combine-tango-queue
  • sar-255_remove_nexus_reference
  • sar-275-add-LRC
  • sar-273-add-lrc-attributes
  • sar-272
  • sp-1106-marvin-1230525148-ska-tango-base
  • sp-1106-marvin-813091765-ska-tango-base
  • sar-255/Publish-package-to-CAR
  • mccs-661-device-under-test-fixture
  • mccs-659-pep257-docstring-linting
  • 0.11.3
  • 0.11.2
  • 0.11.1
  • 0.11.0
  • 0.10.1
  • 0.10.0
  • 0.9.1
  • 0.9.0
  • 0.8.1
  • 0.8.0
  • 0.7.2
  • 0.7.1
  • 0.7.0
  • 0.6.6
  • 0.6.5
  • 0.6.4
  • 0.6.3
  • 0.6.2
  • 0.6.1
  • 0.6.0
42 results

conf.py

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_