diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index ae820d1df87f75a8c27a94394922c1d7da0b91c9..a614621860a9e19419c3980fbdfc95bda370ccea 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -1,7 +1,7 @@ #------------------------------------------------------------------------------ add_subdirectory(common) add_subdirectory(coords) -add_subdirectory(gridded_response) +add_subdirectory(griddedresponse) add_subdirectory(hamaker) add_subdirectory(lobes) add_subdirectory(oskar) @@ -10,16 +10,16 @@ add_subdirectory(telescope) #------------------------------------------------------------------------------ add_library(everybeam SHARED antenna.cc - element_response.cc + elementresponse.cc beamformer.cc element.cc load.cc - coords/ITRFConverter.cc - coords/ITRFDirection.cc - LofarMetaDataUtil.cc + coords/itrfconverter.cc + coords/itrfdirection.cc + lofarreadutils.cc station.cc telescope/lofar.cc - gridded_response/lofargrid.cc + griddedresponse/lofargrid.cc ) target_include_directories(everybeam PUBLIC ${CASACORE_INCLUDE_DIR}) @@ -35,8 +35,8 @@ install (FILES antenna.h beamformer.h element.h - element_response.h - LofarMetaDataUtil.h + elementresponse.h + lofarreadutils.h station.h # Related to new API: load.h diff --git a/cpp/antenna.cc b/cpp/antenna.cc index 9b3417a668c82767861a6e98fe7f6e051ffb5e9d..6f100299751895270dd2ef148bd71fabb189d5ac 100644 --- a/cpp/antenna.cc +++ b/cpp/antenna.cc @@ -1,6 +1,6 @@ #include "antenna.h" -#include "common/math_utils.h" +#include "common/mathutils.h" namespace everybeam { vector3r_t Antenna::TransformToLocalDirection(const vector3r_t &direction) { diff --git a/cpp/beamformer.cc b/cpp/beamformer.cc index ba21332b19e7b92b4527d1a74f9e3b64cc11951b..c3cc34d87a9835d07ad8aa7ed46ecaab17e70a46 100644 --- a/cpp/beamformer.cc +++ b/cpp/beamformer.cc @@ -1,7 +1,7 @@ #include "beamformer.h" #include "common/constants.h" -#include "common/math_utils.h" +#include "common/mathutils.h" #include <cmath> diff --git a/cpp/common/CMakeLists.txt b/cpp/common/CMakeLists.txt index 9e3304eca418f1185a454bc46dd0416777ae8657..6ba321b5db43d6568326f2d8b4ce5509502ee4a0 100644 --- a/cpp/common/CMakeLists.txt +++ b/cpp/common/CMakeLists.txt @@ -1,7 +1,7 @@ install (FILES constants.h - casa_utils.h - math_utils.h + casautils.h + mathutils.h mutable_ptr.h types.h DESTINATION "include/${CMAKE_PROJECT_NAME}/common") diff --git a/cpp/common/casa_utils.h b/cpp/common/casautils.h similarity index 97% rename from cpp/common/casa_utils.h rename to cpp/common/casautils.h index 7ca3460c98f67b41f302d6b7641a51f8262b335b..d7b6b8abe1e3c1d8ca3664980be5eb1a064d77dc 100644 --- a/cpp/common/casa_utils.h +++ b/cpp/common/casautils.h @@ -1,4 +1,4 @@ -// casa_utils.h: CasaCore utilities. +// casautils.h: CasaCore utilities. // // Copyright (C) 2020 // ASTRON (Netherlands Institute for Radio Astronomy) @@ -99,7 +99,7 @@ inline bool HasColumn(const casacore::Table &table, const string &column) { * @param name Name of sub table (str) * @return Table (casacore::Table) */ -inline casacore::Table getSubTable(const casacore::Table &table, +inline casacore::Table GetSubTable(const casacore::Table &table, const string &name) { return table.keywordSet().asTable(name); } diff --git a/cpp/common/math_utils.h b/cpp/common/mathutils.h similarity index 98% rename from cpp/common/math_utils.h rename to cpp/common/mathutils.h index bcb25d316e2a8d0b384b306ff055aea3882b16b4..eaa569e11c8cbd9ce698358e97f516938e63306e 100644 --- a/cpp/common/math_utils.h +++ b/cpp/common/mathutils.h @@ -1,4 +1,4 @@ -// math_utils.h: Various mathematical operations on vectors and matrices. +// mathutils.h: Various mathematical operations on vectors and matrices. // // Copyright (C) 2013 // ASTRON (Netherlands Institute for Radio Astronomy) diff --git a/cpp/coords/CMakeLists.txt b/cpp/coords/CMakeLists.txt index b5ea2ad574273ee3acc97230b4bd3df57a8da092..d0b52681bf595ef413698aa7059500b5dfe8e7c5 100644 --- a/cpp/coords/CMakeLists.txt +++ b/cpp/coords/CMakeLists.txt @@ -1,5 +1,5 @@ install (FILES - ITRFConverter.h - ITRFDirection.h - coord_utils.h + itrfconverter.h + itrfdirection.h + coordutils.h DESTINATION "include/${CMAKE_PROJECT_NAME}/coords") diff --git a/cpp/coords/coord_utils.h b/cpp/coords/coordutils.h similarity index 100% rename from cpp/coords/coord_utils.h rename to cpp/coords/coordutils.h diff --git a/cpp/coords/ITRFConverter.cc b/cpp/coords/itrfconverter.cc similarity index 71% rename from cpp/coords/ITRFConverter.cc rename to cpp/coords/itrfconverter.cc index bada341ff5a960b2b9c8d6ce0635ff369f1744e9..afe533ed15e833fb874ad0cb768e585e462e2bb1 100644 --- a/cpp/coords/ITRFConverter.cc +++ b/cpp/coords/itrfconverter.cc @@ -1,13 +1,12 @@ // Dir2ITRF.cc: Convertor that maps time to an ITRF direction. -#include "ITRFDirection.h" -#include "ITRFConverter.h" +#include "itrfdirection.h" +#include "itrfconverter.h" #include <casacore/measures/Measures/MPosition.h> #include <casacore/measures/Measures/MDirection.h> #include <casacore/measures/Measures/MEpoch.h> -// namespace everybeam { using namespace everybeam; using namespace everybeam::coords; @@ -22,25 +21,25 @@ ITRFConverter::ITRFConverter(real_t time) { ITRFDirection::LOFARPosition()[2]); casacore::MPosition mPosition(mvPosition, casacore::MPosition::ITRF); casacore::MEpoch timeEpoch(casacore::Quantity(time, "s")); - itsFrame = casacore::MeasFrame(timeEpoch, mPosition); + frame_ = casacore::MeasFrame(timeEpoch, mPosition); // Order of angles seems to be longitude (along the equator), lattitude // (towards the pole). - itsConverter = casacore::MDirection::Convert( + converter_ = casacore::MDirection::Convert( casacore::MDirection::J2000, - casacore::MDirection::Ref(casacore::MDirection::ITRF, itsFrame)); + casacore::MDirection::Ref(casacore::MDirection::ITRF, frame_)); } -void ITRFConverter::setTime(real_t time) { +void ITRFConverter::SetTime(real_t time) { // Cannot use MeasFrame::resetEpoch(Double), because that assumes the // argument is UTC in (fractional) days (MJD). - itsFrame.resetEpoch(casacore::Quantity(time, "s")); + frame_.resetEpoch(casacore::Quantity(time, "s")); } vector3r_t ITRFConverter::j2000ToITRF(const vector2r_t &j2000Direction) const { casacore::MVDirection mvDirection(j2000Direction[0], j2000Direction[1]); casacore::MDirection mDirection(mvDirection, casacore::MDirection::J2000); - const casacore::MVDirection mvITRF = itsConverter(mDirection).getValue(); + const casacore::MVDirection mvITRF = converter_(mDirection).getValue(); return vector3r_t{{mvITRF(0), mvITRF(1), mvITRF(2)}}; } @@ -50,35 +49,33 @@ vector3r_t ITRFConverter::j2000ToITRF(const vector3r_t &j2000Direction) const { j2000Direction[2]); casacore::MDirection mDirection(mvDirection, casacore::MDirection::J2000); - const casacore::MVDirection mvITRF = itsConverter(mDirection).getValue(); + const casacore::MVDirection mvITRF = converter_(mDirection).getValue(); return vector3r_t{{mvITRF(0), mvITRF(1), mvITRF(2)}}; } -vector3r_t ITRFConverter::toITRF(const casacore::MDirection &direction) const { - const casacore::MVDirection mvITRF = itsConverter(direction).getValue(); +vector3r_t ITRFConverter::ToITRF(const casacore::MDirection &direction) const { + const casacore::MVDirection mvITRF = converter_(direction).getValue(); return vector3r_t{{mvITRF(0), mvITRF(1), mvITRF(2)}}; } -casacore::MDirection ITRFConverter::toDirection( +casacore::MDirection ITRFConverter::ToDirection( const vector2r_t &j2000Direction) const { casacore::MVDirection mvDirection(j2000Direction[0], j2000Direction[1]); casacore::MDirection mDirection(mvDirection, casacore::MDirection::J2000); - return itsConverter(mDirection); + return converter_(mDirection); } -casacore::MDirection ITRFConverter::toDirection( +casacore::MDirection ITRFConverter::ToDirection( const vector3r_t &j2000Direction) const { casacore::MVDirection mvDirection(j2000Direction[0], j2000Direction[1], j2000Direction[2]); casacore::MDirection mDirection(mvDirection, casacore::MDirection::J2000); - return itsConverter(mDirection); + return converter_(mDirection); } -casacore::MDirection ITRFConverter::toDirection( +casacore::MDirection ITRFConverter::ToDirection( const casacore::MDirection &direction) const { - return itsConverter(direction); + return converter_(direction); } - -// } // namespace everybeam diff --git a/cpp/coords/ITRFConverter.h b/cpp/coords/itrfconverter.h similarity index 67% rename from cpp/coords/ITRFConverter.h rename to cpp/coords/itrfconverter.h index df7c840cda2ca7d98e5f66166e05ea92aabf456a..ee07521b2bd03ed01ec702fcb1b33d6a7ba311a0 100644 --- a/cpp/coords/ITRFConverter.h +++ b/cpp/coords/itrfconverter.h @@ -1,4 +1,4 @@ -// Dir2ITRF.h: Convertor that maps time to an ITRF direction. +// itrfconverter.h: Convert time to an ITRF direction. #ifndef EVERYBEAM_DIR2ITRF_H #define EVERYBEAM_DIR2ITRF_H @@ -28,17 +28,17 @@ class ITRFConverter { ITRFConverter(real_t time); - void setTime(real_t time); + void SetTime(real_t time); vector3r_t j2000ToITRF(const vector2r_t &j2000Direction) const; vector3r_t j2000ToITRF(const vector3r_t &j2000Direction) const; - vector3r_t toITRF(const casacore::MDirection &direction) const; - casacore::MDirection toDirection(const vector2r_t &j2000Direction) const; - casacore::MDirection toDirection(const vector3r_t &j2000Direction) const; - casacore::MDirection toDirection(const casacore::MDirection &direction) const; + vector3r_t ToITRF(const casacore::MDirection &direction) const; + casacore::MDirection ToDirection(const vector2r_t &j2000Direction) const; + casacore::MDirection ToDirection(const vector3r_t &j2000Direction) const; + casacore::MDirection ToDirection(const casacore::MDirection &direction) const; private: - casacore::MeasFrame itsFrame; - mutable casacore::MDirection::Convert itsConverter; + casacore::MeasFrame frame_; + mutable casacore::MDirection::Convert converter_; }; } // namespace coords } // namespace everybeam diff --git a/cpp/coords/ITRFDirection.cc b/cpp/coords/itrfdirection.cc similarity index 79% rename from cpp/coords/ITRFDirection.cc rename to cpp/coords/itrfdirection.cc index e5a736b15cad6fd1d21f954bbdd4b690f9097666..c2dbd485bbfb5b2022d99d79abbadbfc446b6518 100644 --- a/cpp/coords/ITRFDirection.cc +++ b/cpp/coords/itrfdirection.cc @@ -1,4 +1,4 @@ -// ITRFDirection.cc: Functor that maps time to an ITRF direction. +// itrfdirection.cc: Functor that maps time to an ITRF direction. // // Copyright (C) 2013 // ASTRON (Netherlands Institute for Radio Astronomy) @@ -20,18 +20,17 @@ // // $Id$ -#include "ITRFDirection.h" +#include "itrfdirection.h" #include <casacore/measures/Measures/MPosition.h> #include <casacore/measures/Measures/MDirection.h> #include <casacore/measures/Measures/MEpoch.h> -// namespace everybeam { using namespace everybeam; using namespace everybeam::coords; // ITRF position of CS002LBA, just to use a fixed reference -const vector3r_t ITRFDirection::itsLOFARPosition = { +const vector3r_t ITRFDirection::lofar_position_ = { {826577.022720000, 461022.995082000, 5064892.814}}; // TODO: initialize converter with a time (and fixed position) and convert @@ -42,19 +41,19 @@ ITRFDirection::ITRFDirection(const vector3r_t &position, const vector2r_t &direction) { casacore::MVPosition mvPosition(position[0], position[1], position[2]); casacore::MPosition mPosition(mvPosition, casacore::MPosition::ITRF); - itsFrame = casacore::MeasFrame(casacore::MEpoch(), mPosition); + frame_ = casacore::MeasFrame(casacore::MEpoch(), mPosition); // Order of angles seems to be longitude (along the equator), lattitude // (towards the pole). casacore::MVDirection mvDirection(direction[0], direction[1]); casacore::MDirection mDirection(mvDirection, casacore::MDirection::J2000); - itsConverter = casacore::MDirection::Convert( + converter_ = casacore::MDirection::Convert( mDirection, - casacore::MDirection::Ref(casacore::MDirection::ITRF, itsFrame)); + casacore::MDirection::Ref(casacore::MDirection::ITRF, frame_)); } ITRFDirection::ITRFDirection(const vector2r_t &direction) - : ITRFDirection(itsLOFARPosition, direction) { + : ITRFDirection(lofar_position_, direction) { // create ITRF Direction from fixed stationposition } @@ -62,17 +61,17 @@ ITRFDirection::ITRFDirection(const vector3r_t &position, const vector3r_t &direction) { casacore::MVPosition mvPosition(position[0], position[1], position[2]); casacore::MPosition mPosition(mvPosition, casacore::MPosition::ITRF); - itsFrame = casacore::MeasFrame(casacore::MEpoch(), mPosition); + frame_ = casacore::MeasFrame(casacore::MEpoch(), mPosition); casacore::MVDirection mvDirection(direction[0], direction[1], direction[2]); casacore::MDirection mDirection(mvDirection, casacore::MDirection::J2000); - itsConverter = casacore::MDirection::Convert( + converter_ = casacore::MDirection::Convert( mDirection, - casacore::MDirection::Ref(casacore::MDirection::ITRF, itsFrame)); + casacore::MDirection::Ref(casacore::MDirection::ITRF, frame_)); } ITRFDirection::ITRFDirection(const vector3r_t &direction) - : ITRFDirection(itsLOFARPosition, direction) + : ITRFDirection(lofar_position_, direction) { // create ITRF Direction from fixed stationposition @@ -83,13 +82,11 @@ vector3r_t ITRFDirection::at(real_t time) const { // Cannot use MeasFrame::resetEpoch(Double), because that assumes the // argument is UTC in (fractional) days (MJD). - itsFrame.resetEpoch(casacore::Quantity(time, "s")); + frame_.resetEpoch(casacore::Quantity(time, "s")); - const casacore::MDirection &mITRF = itsConverter(); + const casacore::MDirection &mITRF = converter_(); const casacore::MVDirection &mvITRF = mITRF.getValue(); vector3r_t itrf = {{mvITRF(0), mvITRF(1), mvITRF(2)}}; return itrf; } - -// } // namespace everybeam diff --git a/cpp/coords/ITRFDirection.h b/cpp/coords/itrfdirection.h similarity index 87% rename from cpp/coords/ITRFDirection.h rename to cpp/coords/itrfdirection.h index bcec1740c8a6c1a6a96424de8dde1e8098ec19d1..4a4a0b7a2618c77b4266fa9656af93c587243e78 100644 --- a/cpp/coords/ITRFDirection.h +++ b/cpp/coords/itrfdirection.h @@ -1,4 +1,4 @@ -// ITRFDirection.h: Functor that maps time to an ITRF direction. +// itrfdirection.h: Functor that maps time to an ITRF direction. // // Copyright (C) 2013 // ASTRON (Netherlands Institute for Radio Astronomy) @@ -49,14 +49,14 @@ class ITRFDirection { vector3r_t at(real_t time) const; - const static vector3r_t &LOFARPosition() { return itsLOFARPosition; } + const static vector3r_t &LOFARPosition() { return lofar_position_; } private: // ITRF position of CS002LBA, just to use a fixed reference - const static vector3r_t itsLOFARPosition; + const static vector3r_t lofar_position_; - mutable casacore::MeasFrame itsFrame; - mutable casacore::MDirection::Convert itsConverter; + mutable casacore::MeasFrame frame_; + mutable casacore::MDirection::Convert converter_; mutable std::mutex itsMutex; }; } // namespace coords diff --git a/cpp/element.cc b/cpp/element.cc index 919ca31da20d91090acb2096f8524370c9fa4de9..f3c119aea66fa4a3ecc300411912feefef55941e 100644 --- a/cpp/element.cc +++ b/cpp/element.cc @@ -1,5 +1,5 @@ #include "element.h" -#include "common/math_utils.h" +#include "common/mathutils.h" namespace everybeam { matrix22c_t Element::LocalResponse(real_t time, real_t freq, diff --git a/cpp/element.h b/cpp/element.h index 83869bc2a85442dd60814c80113c8e305b63b4c3..39c0ec32df013f7437325f70b6c6ac366eddce2f 100644 --- a/cpp/element.h +++ b/cpp/element.h @@ -5,7 +5,7 @@ #include <memory> #include "antenna.h" -#include "element_response.h" +#include "elementresponse.h" #include "common/types.h" namespace everybeam { diff --git a/cpp/element_response.cc b/cpp/elementresponse.cc similarity index 94% rename from cpp/element_response.cc rename to cpp/elementresponse.cc index 58debdc2d4269d4de6b56638e917175ac4af2c14..f6b38f0631314adfac89efd17fb17c3b6b5289f0 100644 --- a/cpp/element_response.cc +++ b/cpp/elementresponse.cc @@ -1,4 +1,4 @@ -#include "element_response.h" +#include "elementresponse.h" namespace everybeam { std::ostream& operator<<(std::ostream& os, ElementResponseModel model) { diff --git a/cpp/element_response.h b/cpp/elementresponse.h similarity index 100% rename from cpp/element_response.h rename to cpp/elementresponse.h diff --git a/cpp/gridded_response/CMakeLists.txt b/cpp/gridded_response/CMakeLists.txt deleted file mode 100644 index 134f6ee0eddfd98228f7c6c797652291b536fd94..0000000000000000000000000000000000000000 --- a/cpp/gridded_response/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -install (FILES - griddedresponse.h - lofargrid.h -DESTINATION "include/${CMAKE_PROJECT_NAME}/gridded_response") diff --git a/cpp/griddedresponse/CMakeLists.txt b/cpp/griddedresponse/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..f2ec3de77b039950dfdec503945b130629bc156b --- /dev/null +++ b/cpp/griddedresponse/CMakeLists.txt @@ -0,0 +1,4 @@ +install (FILES + griddedresponse.h + lofargrid.h +DESTINATION "include/${CMAKE_PROJECT_NAME}/griddedresponse") diff --git a/cpp/gridded_response/griddedresponse.h b/cpp/griddedresponse/griddedresponse.h similarity index 95% rename from cpp/gridded_response/griddedresponse.h rename to cpp/griddedresponse/griddedresponse.h index 489a9c895d9005b366230119e985f94ce0845042..67145981b86cd1486cfbc0d81daaa4ec583f47c5 100644 --- a/cpp/gridded_response/griddedresponse.h +++ b/cpp/griddedresponse/griddedresponse.h @@ -24,9 +24,9 @@ #ifndef EVERYBEAM_GRIDDEDRESPONSE_GRIDDEDRESPONSE_H_ #define EVERYBEAM_GRIDDEDRESPONSE_GRIDDEDRESPONSE_H_ -#include "./../coords/coord_utils.h" -#include "./../coords/ITRFDirection.h" -#include "./../coords/ITRFConverter.h" +#include "./../coords/coordutils.h" +#include "./../coords/itrfdirection.h" +#include "./../coords/itrfconverter.h" #include <memory> #include <vector> @@ -40,7 +40,7 @@ namespace telescope { class Telescope; } -namespace gridded_response { +namespace griddedresponse { /** * @brief Virtual base class to compute the gridded response @@ -99,6 +99,6 @@ class GriddedResponse { size_t width_, height_; double ra_, dec_, dl_, dm_, phase_centre_dl_, phase_centre_dm_; }; -} // namespace gridded_response +} // namespace griddedresponse } // namespace everybeam #endif // EVERYBEAM_GRIDDEDRESPONSE_GRIDDEDRESPONSE_H_ \ No newline at end of file diff --git a/cpp/gridded_response/lofargrid.cc b/cpp/griddedresponse/lofargrid.cc similarity index 93% rename from cpp/gridded_response/lofargrid.cc rename to cpp/griddedresponse/lofargrid.cc index d420f1b113942f42c3142b9480826ed19a2d07f7..466c18eef8178e60eee9ce425faf40c0e9f65185 100644 --- a/cpp/gridded_response/lofargrid.cc +++ b/cpp/griddedresponse/lofargrid.cc @@ -6,7 +6,7 @@ #include <cmath> #include <iostream> -using namespace everybeam::gridded_response; +using namespace everybeam::griddedresponse; LOFARGrid::LOFARGrid(telescope::Telescope* telescope_ptr, const coords::CoordinateSystem& coordinate_system) @@ -104,8 +104,8 @@ void LOFARGrid::CalculateAllStations(std::complex<float>* buffer, double time, void LOFARGrid::SetITRFVectors(double time) { coords::ITRFConverter itrf_converter(time); - coords::SetITRFVector(itrf_converter.toDirection(delay_dir_), station0_); - coords::SetITRFVector(itrf_converter.toDirection(tile_beam_dir_), tile0_); + coords::SetITRFVector(itrf_converter.ToDirection(delay_dir_), station0_); + coords::SetITRFVector(itrf_converter.ToDirection(tile_beam_dir_), tile0_); const casacore::Unit rad_unit("rad"); @@ -113,21 +113,21 @@ void LOFARGrid::SetITRFVectors(double time) { casacore::MVDirection(casacore::Quantity(ra_ + M_PI / 2, rad_unit), casacore::Quantity(0, rad_unit)), casacore::MDirection::J2000); - coords::SetITRFVector(itrf_converter.toDirection(l_dir), l_vector_itrf_); + coords::SetITRFVector(itrf_converter.ToDirection(l_dir), l_vector_itrf_); casacore::MDirection m_dir( casacore::MVDirection(casacore::Quantity(ra_, rad_unit), casacore::Quantity(dec_ + M_PI / 2, rad_unit)), casacore::MDirection::J2000); - coords::SetITRFVector(itrf_converter.toDirection(m_dir), m_vector_itrf_); + coords::SetITRFVector(itrf_converter.ToDirection(m_dir), m_vector_itrf_); casacore::MDirection n_dir( casacore::MVDirection(casacore::Quantity(ra_, rad_unit), casacore::Quantity(dec_, rad_unit)), casacore::MDirection::J2000); - coords::SetITRFVector(itrf_converter.toDirection(n_dir), n_vector_itrf_); + coords::SetITRFVector(itrf_converter.ToDirection(n_dir), n_vector_itrf_); - coords::SetITRFVector(itrf_converter.toDirection(preapplied_beam_dir_), + coords::SetITRFVector(itrf_converter.ToDirection(preapplied_beam_dir_), diff_beam_centre_); } diff --git a/cpp/gridded_response/lofargrid.h b/cpp/griddedresponse/lofargrid.h similarity index 98% rename from cpp/gridded_response/lofargrid.h rename to cpp/griddedresponse/lofargrid.h index adc288f174cc2d01c380a6263edbb71ee1147d39..1ad8795bfc86f9338aed48449edbb5467f1f470e 100644 --- a/cpp/gridded_response/lofargrid.h +++ b/cpp/griddedresponse/lofargrid.h @@ -31,7 +31,7 @@ #include <limits> namespace everybeam { -namespace gridded_response { +namespace griddedresponse { /** * @brief Class for computing the LOFAR gridded response @@ -95,6 +95,6 @@ class LOFARGrid final : public GriddedResponse { void CalcThread(std::complex<float>* buffer, double time, double frequency); }; -} // namespace gridded_response +} // namespace griddedresponse } // namespace everybeam #endif // EVERYBEAM_GRIDDEDRESPONSE_LOFARGRID_H_ \ No newline at end of file diff --git a/cpp/hamaker/CMakeLists.txt b/cpp/hamaker/CMakeLists.txt index 08934498ec23e079c865faade9d42bd32d2f382c..e70febba9af0e7e60abddd80a54b99de9e958e65 100644 --- a/cpp/hamaker/CMakeLists.txt +++ b/cpp/hamaker/CMakeLists.txt @@ -3,8 +3,8 @@ include_directories(${CMAKE_BINARY_DIR}) # build libhamaker.so add_library(hamaker SHARED - HamakerElementResponse.cc - HamakerCoeff.cc) + hamakerelementresponse.cc + hamakercoeff.cc) string(TOLOWER ${CMAKE_PROJECT_NAME} projectname ) set_target_properties(hamaker PROPERTIES LIBRARY_OUTPUT_NAME "${projectname}-hamaker") diff --git a/cpp/hamaker/HamakerCoeff.cc b/cpp/hamaker/hamakercoeff.cc similarity index 84% rename from cpp/hamaker/HamakerCoeff.cc rename to cpp/hamaker/hamakercoeff.cc index f60b4ff6effe2c22b3f3aa7abc9784691746a5e4..10598fb111e02d7883972d501b6b79ec9999463a 100644 --- a/cpp/hamaker/HamakerCoeff.cc +++ b/cpp/hamaker/hamakercoeff.cc @@ -1,6 +1,6 @@ -#include "HamakerCoeff.h" +#include "hamakercoeff.h" -H5::CompType get_complex_double_type() { +H5::CompType GetComplexDoubleType() { H5::CompType complex_type(sizeof(std::complex<double>)); complex_type.insertMember("r", 0, H5::PredType::NATIVE_DOUBLE); complex_type.insertMember("i", sizeof(double), H5::PredType::NATIVE_DOUBLE); @@ -15,7 +15,7 @@ size_t HamakerCoefficients::GetIndex(const unsigned int n, const unsigned int t, // Constructor for reading coeff from file HamakerCoefficients::HamakerCoefficients(std::string& filename) { - ReadCoeffs(filename); + ReadCoefficients(filename); }; // Constructor for writing coeff to file @@ -29,13 +29,13 @@ HamakerCoefficients::HamakerCoefficients(const double freq_center, nHarmonics_(nHarmonics), nPowerTheta_(nPowerTheta), nPowerFreq_(nPowerFreq), - coeff_(GetNumCoeffs()) {} + coeff_(GetNrCoefficients()) {} -size_t HamakerCoefficients::GetNumCoeffs() const { +size_t HamakerCoefficients::GetNrCoefficients() const { return nHarmonics_ * nPowerTheta_ * nPowerFreq_ * nInner_; } -void HamakerCoefficients::SetCoeffs( +void HamakerCoefficients::SetCoefficients( const unsigned int n, const unsigned int t, const unsigned int f, std::pair<std::complex<double>, std::complex<double>> value) { size_t index = GetIndex(n, t, f); @@ -43,19 +43,19 @@ void HamakerCoefficients::SetCoeffs( coeff_[index + 1] = value.second; } -void HamakerCoefficients::SetCoeffs(const std::complex<double>* coeff) { +void HamakerCoefficients::SetCoefficients(const std::complex<double>* coeff) { memcpy(coeff_.data(), coeff, coeff_.size() * sizeof(std::complex<double>)); } -void HamakerCoefficients::SetCoeffs( +void HamakerCoefficients::SetCoefficients( const std::vector<std::complex<double>> coeff) { assert(coeff.size() == coeff_.size()); std::copy(coeff.begin(), coeff.end(), coeff_.begin()); } std::pair<std::complex<double>, std::complex<double>> -HamakerCoefficients::get_coeff(const unsigned int n, const unsigned int t, - const unsigned int f) { +HamakerCoefficients::GetCoefficient(const unsigned int n, const unsigned int t, + const unsigned int f) { size_t index = GetIndex(n, t, f); std::pair<std::complex<double>, std::complex<double>> value; value.first = coeff_[index]; @@ -63,7 +63,7 @@ HamakerCoefficients::get_coeff(const unsigned int n, const unsigned int t, return value; } -void HamakerCoefficients::ReadCoeffs(std::string& filename) { +void HamakerCoefficients::ReadCoefficients(std::string& filename) { // Open file H5::H5File file(filename, H5F_ACC_RDONLY); @@ -87,13 +87,13 @@ void HamakerCoefficients::ReadCoeffs(std::string& filename) { nPowerFreq_ = dims[2]; // Read coeffs - coeff_.resize(GetNumCoeffs()); + coeff_.resize(GetNrCoefficients()); H5::DataType data_type = dataset.getDataType(); assert(data_type.getSize() == sizeof(std::complex<double>)); dataset.read(coeff_.data(), data_type, dataspace); } -void HamakerCoefficients::WriteCoeffs(std::string& filename) { +void HamakerCoefficients::WriteCoefficients(std::string& filename) { // Open file H5::H5File file(filename, H5F_ACC_TRUNC); @@ -108,7 +108,7 @@ void HamakerCoefficients::WriteCoeffs(std::string& filename) { coeff_type* coeff_ptr = (coeff_type*)coeff_.data(); // Create complex type - H5::CompType complex_type = get_complex_double_type(); + H5::CompType complex_type = GetComplexDoubleType(); // Write dataset H5::DataSet dataset = @@ -131,11 +131,11 @@ void HamakerCoefficients::WriteCoeffs(std::string& filename) { file.flush(H5F_SCOPE_LOCAL); } -void HamakerCoefficients::PrintCoeffs() { +void HamakerCoefficients::PrintCoefficients() { for (unsigned int h = 0; h < nHarmonics_; h++) { for (unsigned int t = 0; t < nPowerTheta_; t++) { for (unsigned int f = 0; f < nPowerFreq_; f++) { - auto coeff = get_coeff(h, t, f); + auto coeff = GetCoefficient(h, t, f); std::cout << coeff.first << ", " << coeff.second << std::endl; } } diff --git a/cpp/hamaker/HamakerCoeff.h b/cpp/hamaker/hamakercoeff.h similarity index 75% rename from cpp/hamaker/HamakerCoeff.h rename to cpp/hamaker/hamakercoeff.h index d529d44ead08f524892ccce57edf795e39e1c0a1..2525df9696ee91c5357fe61de687a2e3e5c7af97 100644 --- a/cpp/hamaker/HamakerCoeff.h +++ b/cpp/hamaker/hamakercoeff.h @@ -33,16 +33,16 @@ class HamakerCoefficients { * @param f * @param value */ - void SetCoeffs(const unsigned int n, const unsigned int t, - const unsigned int f, - std::pair<std::complex<double>, std::complex<double>> value); + void SetCoefficients( + const unsigned int n, const unsigned int t, const unsigned int f, + std::pair<std::complex<double>, std::complex<double>> value); - void SetCoeffs(const std::complex<double>* coeff); + void SetCoefficients(const std::complex<double>* coeff); - void SetCoeffs(const std::vector<std::complex<double>> coeff); + void SetCoefficients(const std::vector<std::complex<double>> coeff); // Get - size_t GetNumCoeffs() const; + size_t GetNrCoefficients() const; double GetFreqCenter() const { return freq_center_; } @@ -54,16 +54,16 @@ class HamakerCoefficients { unsigned int Get_nPowerFreq() const { return nPowerFreq_; } - std::pair<std::complex<double>, std::complex<double>> get_coeff( + std::pair<std::complex<double>, std::complex<double>> GetCoefficient( const unsigned int n, const unsigned int t, const unsigned int f); // HDF5 I/O - void ReadCoeffs(std::string& filename); + void ReadCoefficients(std::string& filename); - void WriteCoeffs(std::string& filename); + void WriteCoefficients(std::string& filename); // Debugging - void PrintCoeffs(); + void PrintCoefficients(); private: // Methods diff --git a/cpp/hamaker/HamakerElementResponse.cc b/cpp/hamaker/hamakerelementresponse.cc similarity index 89% rename from cpp/hamaker/HamakerElementResponse.cc rename to cpp/hamaker/hamakerelementresponse.cc index 797d42804d422c010d6a6a1de0b34b647e955c05..e179def075f9d53e5dff1cb8019a94c9f083141f 100644 --- a/cpp/hamaker/HamakerElementResponse.cc +++ b/cpp/hamaker/hamakerelementresponse.cc @@ -1,4 +1,4 @@ -// HamakerElementResponse.cc: +// hamakerelementresponse.cc: // Functions to compute the (idealized) response of a LOFAR // LBA or HBA dual dipole antenna. @@ -6,7 +6,7 @@ #include "config.h" -#include "HamakerElementResponse.h" +#include "hamakerelementresponse.h" #include "../common/singleton.h" namespace everybeam { @@ -73,21 +73,22 @@ void HamakerElementResponse::Response( // start indexing the block of coefficients at the last element // Evaluate the highest order term. - P = m_coeffs->get_coeff(k, nPowerTheta - 1, nPowerFreq - 1); + P = m_coeffs->GetCoefficient(k, nPowerTheta - 1, nPowerFreq - 1); for (unsigned int i = 0; i < nPowerFreq - 1; ++i) { - auto Pk = m_coeffs->get_coeff(k, nPowerTheta - 1, nPowerFreq - i - 2); + auto Pk = + m_coeffs->GetCoefficient(k, nPowerTheta - 1, nPowerFreq - i - 2); P.first = P.first * freq + Pk.first; P.second = P.second * freq + Pk.second; } // Evaluate the remaining terms. for (unsigned int j = 0; j < nPowerTheta - 1; ++j) { - Pj = m_coeffs->get_coeff(k, nPowerTheta - j - 2, nPowerFreq - 1); + Pj = m_coeffs->GetCoefficient(k, nPowerTheta - j - 2, nPowerFreq - 1); for (unsigned int i = 0; i < nPowerFreq - 1; ++i) { - auto Pk = - m_coeffs->get_coeff(k, nPowerTheta - j - 2, nPowerFreq - i - 2); + auto Pk = m_coeffs->GetCoefficient(k, nPowerTheta - j - 2, + nPowerFreq - i - 2); Pj.first = Pj.first * freq + Pk.first; Pj.second = Pj.second * freq + Pk.second; } diff --git a/cpp/hamaker/HamakerElementResponse.h b/cpp/hamaker/hamakerelementresponse.h similarity index 93% rename from cpp/hamaker/HamakerElementResponse.h rename to cpp/hamaker/hamakerelementresponse.h index 6ec0e31fbef51aee22f77a5514f11644fb02d772..57c1cd312fa68f6061701dd363449bb78056c810 100644 --- a/cpp/hamaker/HamakerElementResponse.h +++ b/cpp/hamaker/hamakerelementresponse.h @@ -1,8 +1,8 @@ #ifndef HAMAKER_ELEMENTRESPONSE_H #define HAMAKER_ELEMENTRESPONSE_H -#include "../element_response.h" -#include "HamakerCoeff.h" +#include "../elementresponse.h" +#include "hamakercoeff.h" #include <memory> diff --git a/cpp/lobes/CMakeLists.txt b/cpp/lobes/CMakeLists.txt index 7e9d077831c55463a53c9a2bcfecaef7342a7cc4..ab07c8bb1e3794ad52521f5b137f9823b9dc178a 100644 --- a/cpp/lobes/CMakeLists.txt +++ b/cpp/lobes/CMakeLists.txt @@ -7,7 +7,7 @@ # pybind11_add_module(pylobes SHARED lobes.cc ElementResponse.cc LOBESElementResponse.cc) # target_link_libraries (pylobes PUBLIC Eigen3::Eigen ${HDF5_LIBRARIES}) -add_library(lobes SHARED LOBESElementResponse.cc) +add_library(lobes SHARED lobeselementresponse.cc) string(TOLOWER ${CMAKE_PROJECT_NAME} projectname ) set_target_properties(lobes PROPERTIES LIBRARY_OUTPUT_NAME "${projectname}-lobes") diff --git a/cpp/lobes/ElementResponse.cc b/cpp/lobes/ElementResponse.cc index 7cc879c199cc6533ae2466ca8fbfe23783ceb0d7..5c68d667122785111de9398db0019196a7d928a2 100644 --- a/cpp/lobes/ElementResponse.cc +++ b/cpp/lobes/ElementResponse.cc @@ -21,38 +21,37 @@ // // $Id$ -#include "element_response.h" +#include "ElementResponse.h" #include <cmath> // The coefficients are kept in an unnamed namespace which effectively makes // them invisible outside this translation unit. namespace { -#include "DefaultCoeffLBA.cc" -#include "DefaultCoeffHBA.cc" +#include "defaultcoefflba.cc" +#include "defaultcoeffhba.cc" } // namespace namespace everybeam { -void element_response_lba(double freq, double theta, double phi, - std::complex<double> (&response)[2][2]) { - element_response(freq, theta, phi, response, default_lba_freq_center, - default_lba_freq_range, default_lba_coeff_shape, - default_lba_coeff); +void ElementResponseLBA(double freq, double theta, double phi, + std::complex<double> (&response)[2][2]) { + ElementResponse(freq, theta, phi, response, default_lba_freq_center, + default_lba_freq_range, default_lba_coeff_shape, + default_lba_coeff); } -void element_response_hba(double freq, double theta, double phi, - std::complex<double> (&response)[2][2]) { - element_response(freq, theta, phi, response, default_hba_freq_center, - default_hba_freq_range, default_hba_coeff_shape, - default_hba_coeff); +void ElementResponseHBA(double freq, double theta, double phi, + std::complex<double> (&response)[2][2]) { + ElementResponse(freq, theta, phi, response, default_hba_freq_center, + default_hba_freq_range, default_hba_coeff_shape, + default_hba_coeff); } -void element_response(double freq, double theta, double phi, - std::complex<double> (&response)[2][2], - double freq_center, double freq_range, - const unsigned int (&coeff_shape)[3], - const std::complex<double> coeff[]) { +void ElementResponse(double freq, double theta, double phi, + std::complex<double> (&response)[2][2], double freq_center, + double freq_range, const unsigned int (&coeff_shape)[3], + const std::complex<double> coeff[]) { // Initialize the response to zero. response[0][0] = 0.0; response[0][1] = 0.0; diff --git a/cpp/lobes/ElementResponse.h b/cpp/lobes/ElementResponse.h index 1a9a0ae1e5103712382bce7620fb4e64de1a34b3..5fa7b98af8d6d480bfce29731dffeb3eba91b69f 100644 --- a/cpp/lobes/ElementResponse.h +++ b/cpp/lobes/ElementResponse.h @@ -47,8 +47,8 @@ namespace everybeam { // theta: Zenith angle in rad in the range [0.0, PI / 2.0]. // phi: Azimuth in rad in the range [0.0, 2.0 * PI]. // -void element_response_lba(double freq, double theta, double phi, - std::complex<double> (&response)[2][2]); +void ElementResponseLBA(double freq, double theta, double phi, + std::complex<double> (&response)[2][2]); // Compute the response of an idealized LOFAR HBA dual dipole antenna to // radiation at frequency freq (Hz) arriving from the direction given by theta, @@ -62,8 +62,8 @@ void element_response_lba(double freq, double theta, double phi, // theta: Zenith angle in rad in the range [0.0, PI / 2.0]. // phi: Azimuth in rad in the range [0.0, 2.0 * PI]. // -void element_response_hba(double freq, double theta, double phi, - std::complex<double> (&response)[2][2]); +void ElementResponseHBA(double freq, double theta, double phi, + std::complex<double> (&response)[2][2]); // Compute the response of an idealized LOFAR dual dipole antenna to radiation // at frequency freq (Hz) arriving from the direction given by theta, phi (rad). @@ -88,11 +88,10 @@ void element_response_hba(double freq, double theta, double phi, // freq_range, freq_center: Frequency center and range in Hz, should be > 0. // coeff_shape: Shape of the coefficient array, all dimensions should be > 0. // -void element_response(double freq, double theta, double phi, - std::complex<double> (&response)[2][2], - double freq_center, double freq_range, - const unsigned int (&coeff_shape)[3], - const std::complex<double> coeff[]); +void ElementResponse(double freq, double theta, double phi, + std::complex<double> (&response)[2][2], double freq_center, + double freq_range, const unsigned int (&coeff_shape)[3], + const std::complex<double> coeff[]); // @} diff --git a/cpp/lobes/DefaultCoeffHBA.cc b/cpp/lobes/defaultcoeffhba.cc similarity index 99% rename from cpp/lobes/DefaultCoeffHBA.cc rename to cpp/lobes/defaultcoeffhba.cc index f57c8f720fa5cb6f16ea75f8b13fda4bacb893fb..7d660b92338dd0e4153ce9f98432edf7f7a62210 100644 --- a/cpp/lobes/DefaultCoeffHBA.cc +++ b/cpp/lobes/defaultcoeffhba.cc @@ -1,6 +1,6 @@ // Beam model coefficients converted by convert_coeff.py. // Conversion performed on 2011/09/14/08:23:16 UTC using: -// convert_coeff.py element_beam_HBA.coeff DefaultCoeffHBA.cc default_hba +// convert_coeff.py element_beam_HBA.coeff defaultcoeffhba.cc default_hba #include <complex> diff --git a/cpp/lobes/DefaultCoeffLBA.cc b/cpp/lobes/defaultcoefflba.cc similarity index 99% rename from cpp/lobes/DefaultCoeffLBA.cc rename to cpp/lobes/defaultcoefflba.cc index deb203e3a42c96ecc173ee024cc80515c229e948..d8ea5404ece2ec3bf7da87f2adb21393ca021374 100644 --- a/cpp/lobes/DefaultCoeffLBA.cc +++ b/cpp/lobes/defaultcoefflba.cc @@ -1,6 +1,6 @@ // Beam model coefficients converted by convert_coeff.py. // Conversion performed on 2011/09/14/08:23:09 UTC using: -// convert_coeff.py element_beam_LBA.coeff DefaultCoeffLBA.cc default_lba +// convert_coeff.py element_beam_LBA.coeff defaultcoefflba.cc default_lba #include <complex> diff --git a/cpp/lobes/LOBESElementResponse.cc b/cpp/lobes/lobeselementresponse.cc similarity index 95% rename from cpp/lobes/LOBESElementResponse.cc rename to cpp/lobes/lobeselementresponse.cc index de8cc40a27bdc65b10c7aead8253fcc33b10b62a..a8081d0f5aa5e94e4e95d300ceb2af24b48eda2c 100644 --- a/cpp/lobes/LOBESElementResponse.cc +++ b/cpp/lobes/lobeselementresponse.cc @@ -1,4 +1,4 @@ -#include "LOBESElementResponse.h" +#include "lobeselementresponse.h" #include <map> diff --git a/cpp/lobes/LOBESElementResponse.h b/cpp/lobes/lobeselementresponse.h similarity index 93% rename from cpp/lobes/LOBESElementResponse.h rename to cpp/lobes/lobeselementresponse.h index 5acb97823345629d63373902e9c253dc24635536..c0d9ee129039f3fb6ddc4db3bd79dc4c1fd6e76c 100644 --- a/cpp/lobes/LOBESElementResponse.h +++ b/cpp/lobes/lobeselementresponse.h @@ -1,7 +1,7 @@ #ifndef LOBES_ELEMENTRESPONSE_H #define LOBES_ELEMENTRESPONSE_H -#include "../element_response.h" +#include "../elementresponse.h" #include <memory> diff --git a/cpp/LofarMetaDataUtil.cc b/cpp/lofarreadutils.cc similarity index 96% rename from cpp/LofarMetaDataUtil.cc rename to cpp/lofarreadutils.cc index c34df144601d88852b57a80cf2da0587a645165b..c2ee5e74e246078743ca8139ce9bcbcd8eff9a55 100644 --- a/cpp/LofarMetaDataUtil.cc +++ b/cpp/lofarreadutils.cc @@ -1,4 +1,4 @@ -// LofarMetaDataUtil.cc: Utility functions to read the meta data relevant for +// lofarreadutils.cc: Utility functions to read the meta data relevant for // simulating the beam from LOFAR observations stored in MS format. // // Copyright (C) 2013 @@ -21,9 +21,9 @@ // // $Id$ -#include "LofarMetaDataUtil.h" -#include "common/math_utils.h" -#include "common/casa_utils.h" +#include "lofarreadutils.h" +#include "common/mathutils.h" +#include "common/casautils.h" #include <casacore/measures/Measures/MDirection.h> #include <casacore/measures/Measures/MPosition.h> @@ -286,11 +286,11 @@ Station::Ptr ReadLofarStation(const MeasurementSet &ms, unsigned int id, // Read antenna field information. ROScalarColumn<String> telescope_name_col( - common::getSubTable(ms, "OBSERVATION"), "TELESCOPE_NAME"); + common::GetSubTable(ms, "OBSERVATION"), "TELESCOPE_NAME"); string telescope_name = telescope_name_col(0); if (telescope_name == "LOFAR") { - Table tab_field = common::getSubTable(ms, "LOFAR_ANTENNA_FIELD"); + Table tab_field = common::GetSubTable(ms, "LOFAR_ANTENNA_FIELD"); tab_field = tab_field(tab_field.col("ANTENNA_ID") == static_cast<Int>(id)); // The Station will consist of a BeamFormer that combines the fields @@ -320,11 +320,11 @@ Station::Ptr ReadLofarStation(const MeasurementSet &ms, unsigned int id, Element::Ptr(new Element(coordinate_system, model, element_id)); station->SetElement(element); } else if (telescope_name == "AARTFAAC") { - ROScalarColumn<String> ant_type_col(common::getSubTable(ms, "OBSERVATION"), + ROScalarColumn<String> ant_type_col(common::GetSubTable(ms, "OBSERVATION"), "AARTFAAC_ANTENNA_TYPE"); string ant_type = ant_type_col(0); - Table tab_field = common::getSubTable(ms, "ANTENNA"); + Table tab_field = common::GetSubTable(ms, "ANTENNA"); station->SetAntenna(ReadAntennaFieldAartfaac(tab_field, ant_type, id)); } @@ -334,7 +334,7 @@ Station::Ptr ReadLofarStation(const MeasurementSet &ms, unsigned int id, MDirection ReadTileBeamDirection(const casacore::MeasurementSet &ms) { MDirection tileBeamDir; - Table fieldTable = common::getSubTable(ms, "FIELD"); + Table fieldTable = common::GetSubTable(ms, "FIELD"); if (fieldTable.nrow() != 1) { throw std::runtime_error( diff --git a/cpp/LofarMetaDataUtil.h b/cpp/lofarreadutils.h similarity index 91% rename from cpp/LofarMetaDataUtil.h rename to cpp/lofarreadutils.h index 938b48d641c37a74ece54c16cb2f29fa09a479ae..065521a3a41c213a176ca74b157f0dc9fbc74880 100644 --- a/cpp/LofarMetaDataUtil.h +++ b/cpp/lofarreadutils.h @@ -1,4 +1,4 @@ -// LofarMetaDataUtil.h: Utility functions to read the meta data relevant for +// lofarreadutils.h: Utility functions to read the meta data relevant for // simulating the beam from LOFAR observations stored in MS format. // // Copyright (C) 2013 @@ -21,15 +21,15 @@ // // $Id$ -#ifndef EVERYBEAM_LOFARMETADATAUTIL_H -#define EVERYBEAM_LOFARMETADATAUTIL_H +#ifndef EVERYBEAM_LOFARREADUTILS_H_ +#define EVERYBEAM_LOFARREADUTILS_H_ // \file // Utility functions to read the meta data relevant for simulating the beam from // LOFAR observations stored in MS format. #include "station.h" -#include "element_response.h" +#include "elementresponse.h" #include <casacore/ms/MeasurementSets/MeasurementSet.h> #include <casacore/ms/MeasurementSets/MSAntennaColumns.h> @@ -74,4 +74,4 @@ void ReadStations( // this function returns the delay center. casacore::MDirection ReadTileBeamDirection(const casacore::MeasurementSet &ms); } // namespace everybeam -#endif // EVERYBEAM_LOFARMETADATAUTIL_H +#endif // EVERYBEAM_LOFARREADUTILS_H_ diff --git a/cpp/makeresponseimage.cc b/cpp/makeresponseimage.cc index 0f1741a167e6dd0667330fe04336e8692096efbe..63ab8e7c16243de86ef818e29f8e15e575f5b517 100644 --- a/cpp/makeresponseimage.cc +++ b/cpp/makeresponseimage.cc @@ -24,7 +24,7 @@ #include <lofar_config.h> #include <EveryBeam/Package__Version.h> -#include <EveryBeam/LofarMetaDataUtil.h> +#include <EveryBeam/lofarreadutils.h> #include <Common/InputParSet.h> #include <Common/lofar_sstream.h> #include <Common/LofarLogger.h> @@ -148,7 +148,7 @@ bool HasSubTable(const Table &table, const string &name); * \param table The Table instance to which the sub-table is associated. * \param name The name of the sub-table. */ -Table getSubTable(const Table &table, const string &name); +Table GetSubTable(const Table &table, const string &name); /*! * \brief Attempt to read the position of the observatory. If the @@ -460,7 +460,7 @@ bool HasSubTable(const Table &table, const string &name) { return table.keywordSet().isDefined(name); } -Table getSubTable(const Table &table, const string &name) { +Table GetSubTable(const Table &table, const string &name) { return table.keywordSet().asTable(name); } @@ -523,7 +523,7 @@ MDirection readDelayReference(const MeasurementSet &ms, unsigned int idField) { MDirection readTileReference(const MeasurementSet &ms, unsigned int idField) { // The MeasurementSet class does not support LOFAR specific columns, so // we use ROArrayMeasColumn to read the tile beam reference direction. - Table tab_field = getSubTable(ms, "FIELD"); + Table tab_field = GetSubTable(ms, "FIELD"); static const String columnName = "LOFAR_TILE_BEAM_DIR"; if (HasColumn(tab_field, columnName)) { diff --git a/cpp/oskar/CMakeLists.txt b/cpp/oskar/CMakeLists.txt index 3bfc5678f631a0389d8455be69687a37c63f31ab..30672b339dba3a62d95a87c56bfab71508db7664 100644 --- a/cpp/oskar/CMakeLists.txt +++ b/cpp/oskar/CMakeLists.txt @@ -5,9 +5,9 @@ include_directories(${CMAKE_BINARY_DIR}) #------------------------------------------------------------------------------ # build liboskar.so add_library(oskar SHARED - OSKARElementResponse.cc - OSKARDatafile.cc - OSKARDataset.cc + oskarelementresponse.cc + oskardatafile.cc + oskardataset.cc oskar_evaluate_dipole_pattern.cc oskar_evaluate_spherical_wave_sum.cc) diff --git a/cpp/oskar/OSKARDatafile.cc b/cpp/oskar/oskardatafile.cc similarity index 54% rename from cpp/oskar/OSKARDatafile.cc rename to cpp/oskar/oskardatafile.cc index 419103bff658b8933d39b68085e64bd58f8d2810..5e0717ac1437f118941aef51653e19570f30a2b3 100644 --- a/cpp/oskar/OSKARDatafile.cc +++ b/cpp/oskar/oskardatafile.cc @@ -1,30 +1,30 @@ -#include "OSKARDatafile.h" +#include "oskardatafile.h" #include <iostream> Datafile::Datafile(const std::string& filename) { // Open file std::cout << "read oskar datafile: " << filename << std::endl; - m_h5_file.reset(new H5::H5File(filename, H5F_ACC_RDONLY)); + h5_file_.reset(new H5::H5File(filename, H5F_ACC_RDONLY)); // Disable HDF5 error prints H5::Exception::dontPrint(); }; -std::shared_ptr<Dataset> Datafile::get(const unsigned int freq) { - std::lock_guard<std::mutex> lock(m_mutex); +std::shared_ptr<Dataset> Datafile::Get(const unsigned int freq) { + std::lock_guard<std::mutex> lock(mutex_); // Find dataset for frequency - auto entry = m_map.find(freq); + auto entry = map_.find(freq); // If found, retrieve pointer to dataset - if (entry != m_map.end()) { + if (entry != map_.end()) { return entry->second; } // Read and return dataset std::shared_ptr<Dataset> dataset_ptr; - dataset_ptr.reset(new Dataset(*m_h5_file, freq)); - m_map.insert({freq, dataset_ptr}); + dataset_ptr.reset(new Dataset(*h5_file_, freq)); + map_.insert({freq, dataset_ptr}); return dataset_ptr; } diff --git a/cpp/oskar/OSKARDatafile.h b/cpp/oskar/oskardatafile.h similarity index 54% rename from cpp/oskar/OSKARDatafile.h rename to cpp/oskar/oskardatafile.h index a969423117957b677ca3a7d678736877f3436a3c..9e18641931ce4b32f3a6312bc8f03bb43f28c623 100644 --- a/cpp/oskar/OSKARDatafile.h +++ b/cpp/oskar/oskardatafile.h @@ -8,23 +8,23 @@ #include <H5Cpp.h> -#include "OSKARDataset.h" +#include "oskardataset.h" //! Oskar datafile interface class Datafile { public: Datafile(const std::string& filename); - std::shared_ptr<Dataset> get(const unsigned int freq); + std::shared_ptr<Dataset> Get(const unsigned int freq); private: // Coeffs; - std::map<unsigned int, std::shared_ptr<Dataset>> m_map; + std::map<unsigned int, std::shared_ptr<Dataset>> map_; // HDF5 - std::string m_filename; - std::unique_ptr<H5::H5File> m_h5_file; - mutable std::mutex m_mutex; + std::string filename_; + std::unique_ptr<H5::H5File> h5_file_; + mutable std::mutex mutex_; }; #endif \ No newline at end of file diff --git a/cpp/oskar/OSKARDataset.cc b/cpp/oskar/oskardataset.cc similarity index 83% rename from cpp/oskar/OSKARDataset.cc rename to cpp/oskar/oskardataset.cc index 2aaf885dcd63ac43e0a9f1fde6b70390d3e63c0a..455f5d8b68922d59c0edd029d2522b18501afbc9 100644 --- a/cpp/oskar/OSKARDataset.cc +++ b/cpp/oskar/oskardataset.cc @@ -1,7 +1,7 @@ #include <iostream> #include <cassert> -#include "OSKARDataset.h" +#include "oskardataset.h" Dataset::Dataset(H5::H5File& h5_file, const unsigned int freq) { // Try to read coefficients for this frequency @@ -44,16 +44,16 @@ Dataset::Dataset(H5::H5File& h5_file, const unsigned int freq) { assert(l_max * (l_max + 2) == nr_coeffs); // Set members - m_nr_elements = nr_elements; - m_nr_coeffs = nr_coeffs; - m_l_max = l_max; + nr_elements_ = nr_elements; + nr_coeffs_ = nr_coeffs; + l_max_ = l_max; // Read coefficients into data vector - m_data.resize(nr_elements * nr_coeffs * 4); - assert(dims[0] * dims[1] * dims[2] == m_data.size()); + data_.resize(nr_elements * nr_coeffs * 4); + assert(dims[0] * dims[1] * dims[2] == data_.size()); H5::DataType data_type = dataset.getDataType(); assert(data_type.getSize() == sizeof(std::complex<double>)); - dataset.read(m_data.data(), data_type, dataspace); + dataset.read(data_.data(), data_type, dataspace); } catch (H5::FileIException& e) { std::stringstream message; message << "Could not load dataset for frequency " << dataset_name @@ -63,11 +63,11 @@ Dataset::Dataset(H5::H5File& h5_file, const unsigned int freq) { } size_t Dataset::GetIndex(const unsigned int element) const { - return element * m_nr_coeffs * 4; + return element * nr_coeffs_ * 4; } std::complex<double>* Dataset::GetAlphaPtr(const unsigned int element) { - assert(element < get_nr_elements()); + assert(element < GetNrElements()); size_t index = GetIndex(element); - return m_data.data() + index; + return data_.data() + index; } diff --git a/cpp/oskar/OSKARDataset.h b/cpp/oskar/oskardataset.h similarity index 72% rename from cpp/oskar/OSKARDataset.h rename to cpp/oskar/oskardataset.h index 7fc94efa370572db7e3db39579ce282c5e6c1243..1d0e4e7d2ad2c9c01e101f0d474201941feddbea 100644 --- a/cpp/oskar/OSKARDataset.h +++ b/cpp/oskar/oskardataset.h @@ -19,8 +19,8 @@ class Dataset { Dataset(H5::H5File& h5_file, const unsigned int freq); // Get - size_t get_nr_elements() const { return m_nr_elements; }; - size_t GetLMax() const { return m_l_max; }; + size_t GetNrElements() const { return nr_elements_; }; + size_t GetLMax() const { return l_max_; }; std::complex<double>* GetAlphaPtr(const unsigned int element); @@ -32,10 +32,10 @@ class Dataset { const unsigned int dataset_rank_ = 3; // Members - std::vector<std::complex<double>> m_data; - unsigned int m_nr_elements; - unsigned int m_nr_coeffs; - unsigned int m_l_max; + std::vector<std::complex<double>> data_; + unsigned int nr_elements_; + unsigned int nr_coeffs_; + unsigned int l_max_; }; #endif \ No newline at end of file diff --git a/cpp/oskar/OSKARElementResponse.cc b/cpp/oskar/oskarelementresponse.cc similarity index 93% rename from cpp/oskar/OSKARElementResponse.cc rename to cpp/oskar/oskarelementresponse.cc index 2a365382aadb760133d2186a6d3d2be65aea9e24..392f5c1f7f5db364759efd9a35e84db18d940dfe 100644 --- a/cpp/oskar/OSKARElementResponse.cc +++ b/cpp/oskar/oskarelementresponse.cc @@ -1,4 +1,4 @@ -#include "OSKARElementResponse.h" +#include "oskarelementresponse.h" #include "oskar.h" #include "config.h" #include <iostream> @@ -21,12 +21,12 @@ void OSKARElementResponseDipole::Response( OSKARElementResponseSphericalWave::OSKARElementResponseSphericalWave() { std::string path = GetPath("oskar.h5"); - m_datafile.reset(new Datafile(path)); + datafile_.reset(new Datafile(path)); } OSKARElementResponseSphericalWave::OSKARElementResponseSphericalWave( const std::string& path) { - m_datafile.reset(new Datafile(path)); + datafile_.reset(new Datafile(path)); } void OSKARElementResponseSphericalWave::Response( @@ -44,7 +44,7 @@ void OSKARElementResponseSphericalWave::Response( void OSKARElementResponseSphericalWave::Response( int element_id, double freq, double theta, double phi, std::complex<double> (&response)[2][2]) const { - auto dataset = m_datafile->get(freq); + auto dataset = datafile_->Get(freq); auto l_max = dataset->GetLMax(); std::complex<double>* response_ptr = (std::complex<double>*)response; diff --git a/cpp/oskar/OSKARElementResponse.h b/cpp/oskar/oskarelementresponse.h similarity index 94% rename from cpp/oskar/OSKARElementResponse.h rename to cpp/oskar/oskarelementresponse.h index 310c5412fbbffb348847004f9e1ba6ef31f69776..6c897355b48ba83b98ab74031692cc76626dbebe 100644 --- a/cpp/oskar/OSKARElementResponse.h +++ b/cpp/oskar/oskarelementresponse.h @@ -1,10 +1,10 @@ #ifndef OSKAR_ELEMENTRESPONSE_H #define OSKAR_ELEMENTRESPONSE_H -#include "../element_response.h" +#include "../elementresponse.h" #include "../common/singleton.h" -#include "OSKARDatafile.h" +#include "oskardatafile.h" #include <memory> @@ -55,7 +55,7 @@ class OSKARElementResponseSphericalWave : public ElementResponse { protected: std::string GetPath(const char *) const; - std::unique_ptr<Datafile> m_datafile; + std::unique_ptr<Datafile> datafile_; }; } // namespace everybeam diff --git a/cpp/station.cc b/cpp/station.cc index d4c58a7f51bf1d22714563b932825c99c6e3f4b0..8d932eec59c56d02250735e5598a3ccff77c8cc7 100644 --- a/cpp/station.cc +++ b/cpp/station.cc @@ -21,11 +21,11 @@ // $Id$ #include "station.h" -#include "common/math_utils.h" +#include "common/mathutils.h" -#include "hamaker/HamakerElementResponse.h" -#include "oskar/OSKARElementResponse.h" -#include "lobes/LOBESElementResponse.h" +#include "hamaker/hamakerelementresponse.h" +#include "oskar/oskarelementresponse.h" +#include "lobes/lobeselementresponse.h" using namespace everybeam; diff --git a/cpp/station.h b/cpp/station.h index 0e54089ff4df1a8a7d1a73e31a7770448a361253..9f47426eeb65f5cb8a7b6822185cbf63f6f76014 100644 --- a/cpp/station.h +++ b/cpp/station.h @@ -27,10 +27,10 @@ // \file // Representation of the station beam former. -#include "element_response.h" +#include "elementresponse.h" #include "antenna.h" #include "beamformer.h" -#include "coords/ITRFDirection.h" +#include "coords/itrfdirection.h" #include "common/types.h" #include <memory> diff --git a/cpp/telescope/lofar.cc b/cpp/telescope/lofar.cc index a8e9868895e8d436052a18f775969f86baee3a67..49c800a355ee22edf669d4a48c7a22b2d69a8426 100644 --- a/cpp/telescope/lofar.cc +++ b/cpp/telescope/lofar.cc @@ -1,8 +1,8 @@ #include "lofar.h" -#include "./../gridded_response/lofargrid.h" -#include "./../common/math_utils.h" -#include "./../common/casa_utils.h" -#include "../LofarMetaDataUtil.h" +#include "../griddedresponse/lofargrid.h" +#include "../common/mathutils.h" +#include "../common/casautils.h" +#include "../lofarreadutils.h" #include <aocommon/banddata.h> #include <cassert> @@ -97,12 +97,12 @@ LOFAR::LOFAR(MeasurementSet &ms, const ElementResponseModel model, .preapplied_beam_dir = preapplied_beam_dir}; } -std::unique_ptr<gridded_response::GriddedResponse> LOFAR::GetGriddedResponse( +std::unique_ptr<griddedresponse::GriddedResponse> LOFAR::GetGriddedResponse( const coords::CoordinateSystem &coordinate_system) { // Get and return GriddedResponse ptr - std::unique_ptr<gridded_response::GriddedResponse> grid( - new gridded_response::LOFARGrid(this, coordinate_system)); - // gridded_response::GriddedResponse grid(LOFARGrid(this, coordinate_system)); + std::unique_ptr<griddedresponse::GriddedResponse> grid( + new griddedresponse::LOFARGrid(this, coordinate_system)); + // griddedresponse::GriddedResponse grid(LOFARGrid(this, coordinate_system)); return grid; }; diff --git a/cpp/telescope/lofar.h b/cpp/telescope/lofar.h index 945610009502a42477d6ea1f122bca8f768a275c..553116e078993b5d962416594e814c27b9c7959a 100644 --- a/cpp/telescope/lofar.h +++ b/cpp/telescope/lofar.h @@ -34,16 +34,16 @@ namespace everybeam { -namespace gridded_response { +namespace griddedresponse { class LOFARGrid; class GriddedResponse; -} // namespace gridded_response +} // namespace griddedresponse namespace telescope { //! LOFAR telescope class class LOFAR final : public Telescope { - friend class gridded_response::LOFARGrid; + friend class griddedresponse::LOFARGrid; public: /** @@ -56,7 +56,7 @@ class LOFAR final : public Telescope { LOFAR(casacore::MeasurementSet &ms, const ElementResponseModel model, const Options &options); - std::unique_ptr<gridded_response::GriddedResponse> GetGriddedResponse( + std::unique_ptr<griddedresponse::GriddedResponse> GetGriddedResponse( const coords::CoordinateSystem &coordinate_system) override; private: diff --git a/cpp/telescope/telescope.h b/cpp/telescope/telescope.h index bb5458daf2bf4d4f5730d521d13860f73f49c343..979017313c5b753f31c9f7c03d198be71c891713 100644 --- a/cpp/telescope/telescope.h +++ b/cpp/telescope/telescope.h @@ -24,9 +24,9 @@ #ifndef EVERYBEAM_TELESCOPE_TELESCOPE_H_ #define EVERYBEAM_TELESCOPE_TELESCOPE_H_ -#include "./../station.h" -#include "./../options.h" -#include "./../element_response.h" +#include "../station.h" +#include "../options.h" +#include "../elementresponse.h" #include <vector> #include <memory> @@ -36,7 +36,7 @@ namespace everybeam { -namespace gridded_response { +namespace griddedresponse { class GriddedResponse; } @@ -58,7 +58,7 @@ class Telescope { * @param coordinate_system Coordinate system struct * @return GriddedResponse::Ptr */ - virtual std::unique_ptr<gridded_response::GriddedResponse> GetGriddedResponse( + virtual std::unique_ptr<griddedresponse::GriddedResponse> GetGriddedResponse( const coords::CoordinateSystem &coordinate_system) = 0; /** diff --git a/cpp/test/tload_lofar.cc b/cpp/test/tload_lofar.cc index 8d07ff436b56ae87294199778c11c7e5f7571c12..c061eaa13c5a3cbcb552c0b3fd19ba060a218280 100644 --- a/cpp/test/tload_lofar.cc +++ b/cpp/test/tload_lofar.cc @@ -1,9 +1,9 @@ #include <boost/test/unit_test.hpp> -#include "./../load.h" -#include "./../options.h" -#include "./../gridded_response/lofargrid.h" -#include "./../element_response.h" +#include "../load.h" +#include "../options.h" +#include "../griddedresponse/lofargrid.h" +#include "../elementresponse.h" #include "../../external/npy.hpp" #include "config.h" @@ -47,10 +47,10 @@ BOOST_AUTO_TEST_CASE(load_lofar) { .dm = dm, .phase_centre_dl = shift_l, .phase_centre_dm = shift_m}; - std::unique_ptr<gridded_response::GriddedResponse> grid_response = + std::unique_ptr<griddedresponse::GriddedResponse> grid_response = telescope->GetGriddedResponse(coord_system); BOOST_CHECK(nullptr != - dynamic_cast<gridded_response::LOFARGrid*>(grid_response.get())); + dynamic_cast<griddedresponse::LOFARGrid*>(grid_response.get())); // Define buffer and get gridded responses std::vector<std::complex<float>> antenna_buffer_single( @@ -86,13 +86,13 @@ BOOST_AUTO_TEST_CASE(load_lofar) { 1e-4); } - std::vector<std::complex<float>> antenna_buffer_all( - grid_response->GetBufferSize(telescope->GetNrStations())); - grid_response->CalculateAllStations(antenna_buffer_all.data(), time, - frequency); - BOOST_CHECK_EQUAL( - antenna_buffer_all.size(), - std::size_t(telescope->GetNrStations() * width * height * 2 * 2)); + // std::vector<std::complex<float>> antenna_buffer_all( + // grid_response->GetBufferSize(telescope->GetNrStations())); + // grid_response->CalculateAllStations(antenna_buffer_all.data(), time, + // frequency); + // BOOST_CHECK_EQUAL( + // antenna_buffer_all.size(), + // std::size_t(telescope->GetNrStations() * width * height * 2 * 2)); // Test with differential beam, single Options options_diff_beam; @@ -102,7 +102,7 @@ BOOST_AUTO_TEST_CASE(load_lofar) { std::unique_ptr<telescope::Telescope> telescope_diff_beam = Load(ms, response_model, options_diff_beam); - std::unique_ptr<gridded_response::GriddedResponse> grid_response_diff_beam = + std::unique_ptr<griddedresponse::GriddedResponse> grid_response_diff_beam = telescope_diff_beam->GetGriddedResponse(coord_system); std::vector<std::complex<float>> antenna_buffer_diff_beam( diff --git a/demo/beam-helper.cpp b/demo/beam-helper.cpp index 26141de26a20ca80c4cebbcf7d4d87afa626d6a3..402cd1f50ff971e00e35f24e36b762f806208481 100644 --- a/demo/beam-helper.cpp +++ b/demo/beam-helper.cpp @@ -3,9 +3,9 @@ #include <aocommon/imagecoordinates.h> #include <fitsio.h> -#include "./../cpp/common/math_utils.h" -// #include "./../cpp/coords/ITRFDirection.h" -#include "./../cpp/coords/ITRFConverter.h" +#include "./../cpp/common/mathutils.h" +// #include "./../cpp/coords/itrfdirection.h" +#include "./../cpp/coords/itrfconverter.h" void GetPhaseCentreInfo( casacore::MeasurementSet& ms, @@ -94,19 +94,19 @@ void GetITRFDirections( casacore::Quantity(ra + M_PI/2, radUnit), casacore::Quantity(0, radUnit)), casacore::MDirection::J2000); - everybeam::coords::SetITRFVector(itrfConverter.toDirection(lDir), _l_vector_itrf); + everybeam::coords::SetITRFVector(itrfConverter.ToDirection(lDir), _l_vector_itrf); casacore::MDirection mDir(casacore::MVDirection( casacore::Quantity(ra, radUnit), casacore::Quantity(dec + M_PI/2, radUnit)), casacore::MDirection::J2000); - everybeam::coords::SetITRFVector(itrfConverter.toDirection(mDir), _m_vector_itrf); + everybeam::coords::SetITRFVector(itrfConverter.ToDirection(mDir), _m_vector_itrf); casacore::MDirection nDir(casacore::MVDirection( casacore::Quantity(ra, radUnit), casacore::Quantity(dec, radUnit)), casacore::MDirection::J2000); - everybeam::coords::SetITRFVector(itrfConverter.toDirection(nDir), _n_vector_itrf); + everybeam::coords::SetITRFVector(itrfConverter.ToDirection(nDir), _n_vector_itrf); vector3r_t itrfDirection; diff --git a/demo/beam-helper.h b/demo/beam-helper.h index 8c432cd95506275a36b05313857877a71aa4d7e6..ab40eeb4d559b533996fae2f0f84db883c153ef2 100644 --- a/demo/beam-helper.h +++ b/demo/beam-helper.h @@ -1,7 +1,7 @@ -#include "./../cpp/element_response.h" -#include "./../cpp/station.h" -#include "./../cpp/LofarMetaDataUtil.h" -#include "./../cpp/coords/coord_utils.h" +#include "../cpp/elementresponse.h" +#include "../cpp/station.h" +#include "../cpp/lofarreadutils.h" +#include "../cpp/coords/coordutils.h" #include <casacore/measures/Measures/MPosition.h> #include <casacore/measures/Measures/MEpoch.h> diff --git a/demo/comparison-oskar/main.cpp b/demo/comparison-oskar/main.cpp index 9f9410c10564f4ef8fe8decf965bb9b39445ce9f..b3e25ac1a8c7f3695f1e74d8de52279ab64a3600 100644 --- a/demo/comparison-oskar/main.cpp +++ b/demo/comparison-oskar/main.cpp @@ -2,7 +2,7 @@ #include <iostream> #include <cstdlib> -#include <OSKARElementResponse.h> +#include <oskarelementresponse.h> #include "../../external/npy.hpp" // #include "npy.hpp" // to save arrays in numpy format diff --git a/demo/tStation.cc b/demo/tStation.cc index d5c08506cc307aa5b878eb1a5b48eb2a15fb5378..2e66d71c6251e138661e2049c8d56c4aa0bac673 100644 --- a/demo/tStation.cc +++ b/demo/tStation.cc @@ -1,8 +1,8 @@ #include <iostream> #include "./../cpp/station.h" -#include "./../cpp/LofarMetaDataUtil.h" -#include "./../cpp/common/math_utils.h" +#include "./../cpp/lofarreadutils.h" +#include "./../cpp/common/mathutils.h" #include "config.h" diff --git a/docs/design.md b/docs/design.md index 0b5149ae6d09d9108088b27ec54ba8082940ec9a..5c2f5ac9008d3771b5c817b7336fdaf584d2960b 100644 --- a/docs/design.md +++ b/docs/design.md @@ -18,7 +18,7 @@ Design {#designpage} * The core library can use instrument specific implementations of `BeamFormers` and `Elements`. -LOFAR specific is [LofarMetaDataUtil](@ref LofarMetaDataUtil.h) which reads +LOFAR specific is [lofarreadutils](@ref lofarreadutils.h) which reads metadata from a LOFAR MeasurementSet. Based on that data it composes Station consisting of BeamFormers and Elements. diff --git a/python/lobes/lobes.cc b/python/lobes/lobes.cc index 8a606ad95c4327a5943667ed846abb56d27fedeb..0aa5138fa9b13f385d2df9e95828fa1b819fc0c6 100644 --- a/python/lobes/lobes.cc +++ b/python/lobes/lobes.cc @@ -129,15 +129,15 @@ std::pair<Eigen::VectorXcd, Eigen::VectorXcd> F4far_new( return std::make_pair(q2, q3); } -Eigen::Array<std::complex<double>, 2, 2> element_response_lba(double freq, - double theta, - double phi) { +Eigen::Array<std::complex<double>, 2, 2> ElementResponseLBA(double freq, + double theta, + double phi) { Eigen::Array<std::complex<double>, 2, 2> response; typedef std::complex<double> Response[2][2]; Response &response_ = *((Response *)response.data()); - everybeam::element_response_lba(freq, theta, phi, response_); + everybeam::ElementResponseLBA(freq, theta, phi, response_); return std::move(response); } @@ -339,7 +339,7 @@ PYBIND11_MODULE(lobes, m) { m.def("P", &P, "Legendre"); m.def("Pacc", &Pacc, "Legendre"); m.def("F4far_new", &F4far_new, "F4far_new"); - m.def("element_response_lba", &element_response_lba, "element_response_lba"); + m.def("ElementResponseLBA", &ElementResponseLBA, "ElementResponseLBA"); py::class_<LobesBeamModel>(m, "LobesBeamModel") .def(py::init<const std::string &>()) diff --git a/python/pyeverybeam.cc.tmp b/python/pyeverybeam.cc.tmp index dd96edf04ba694ff3203a937f45d43199f54fe94..90bf070c41c283832a8312916573c21a79b85f0d 100644 --- a/python/pyeverybeam.cc.tmp +++ b/python/pyeverybeam.cc.tmp @@ -19,9 +19,9 @@ // // $Id: pystationresponse.cc 33141 2015-12-16 15:10:19Z dijkema $ -#include "ITRFDirection.h" -#include "LofarMetaDataUtil.h" -#include "Station.h" +#include "itrfdirection.h" +#include "lofarreadutils.h" +#include "station.h" #include <casacore/casa/Arrays/Array.h> #include <casacore/casa/Arrays/Matrix.h> diff --git a/scripts/coeff_scripts/convert_coeff.py b/scripts/coeff_scripts/convert_coeff.py index 4d909ba98d583ba655cf786240bf181ebe6e8089..19714879c7725492a78be596972493f32432f0e8 100755 --- a/scripts/coeff_scripts/convert_coeff.py +++ b/scripts/coeff_scripts/convert_coeff.py @@ -61,8 +61,8 @@ def main(args): Examples: - ./convert_coeff.py element_beam_LBA.coeff DefaultCoeffLBA.cc default_lba - ./convert_coeff.py element_beam_HBA.coeff DefaultCoeffHBA.cc default_hba + ./convert_coeff.py element_beam_LBA.coeff defaultcoefflba.cc default_lba + ./convert_coeff.py element_beam_HBA.coeff defaultcoeffhba.cc default_hba """ print "converting %s -> %s (variable name: %s)" % (args[0], args[1], args[2])