Skip to content
Snippets Groups Projects
Commit 6d0c79b8 authored by Bas van der Tol's avatar Bas van der Tol
Browse files

clang-format

parent 458afa31
No related branches found
No related tags found
No related merge requests found
...@@ -78,7 +78,8 @@ vector3r_t TransformToFieldCoordinates( ...@@ -78,7 +78,8 @@ vector3r_t TransformToFieldCoordinates(
// casacore::ArrayQuantColumn<casacore::Double> c_position(table, "POSITION", // casacore::ArrayQuantColumn<casacore::Double> c_position(table, "POSITION",
// "m"); // "m");
// casacore::ArrayQuantColumn<casacore::Double> c_axes(table, // casacore::ArrayQuantColumn<casacore::Double> c_axes(table,
// "COORDINATE_SYSTEM", "m"); // "COORDINATE_SYSTEM",
// "m");
// //
// // Read antenna field center (ITRF). // // Read antenna field center (ITRF).
// casacore::Vector<casacore::Quantity> aips_position = c_position(id); // casacore::Vector<casacore::Quantity> aips_position = c_position(id);
...@@ -105,7 +106,8 @@ vector3r_t TransformToFieldCoordinates( ...@@ -105,7 +106,8 @@ vector3r_t TransformToFieldCoordinates(
BeamFormer::Ptr ReadMSv3AntennaField(const Table &table, unsigned int id, BeamFormer::Ptr ReadMSv3AntennaField(const Table &table, unsigned int id,
ElementResponse::Ptr element_response) { ElementResponse::Ptr element_response) {
Antenna::CoordinateSystem coordinate_system = common::ReadCoordinateSystem(table, id); Antenna::CoordinateSystem coordinate_system =
common::ReadCoordinateSystem(table, id);
BeamFormer::Ptr beam_former( BeamFormer::Ptr beam_former(
new BeamFormerIdenticalAntennas(coordinate_system)); new BeamFormerIdenticalAntennas(coordinate_system));
// BeamFormer::Ptr beam_former(new BeamFormer(coordinate_system)); // BeamFormer::Ptr beam_former(new BeamFormer(coordinate_system));
......
...@@ -11,8 +11,7 @@ using namespace everybeam; ...@@ -11,8 +11,7 @@ using namespace everybeam;
using namespace everybeam::telescope; using namespace everybeam::telescope;
using namespace casacore; using namespace casacore;
OSKAR::OSKAR(MeasurementSet &ms, OSKAR::OSKAR(MeasurementSet &ms, const Options &options)
const Options &options)
: Telescope(ms, options) { : Telescope(ms, options) {
stations_.resize(nstations_); stations_.resize(nstations_);
ReadAllStations(ms, options_.element_response_model); ReadAllStations(ms, options_.element_response_model);
......
...@@ -48,8 +48,7 @@ class OSKAR final : public Telescope { ...@@ -48,8 +48,7 @@ class OSKAR final : public Telescope {
* @param model Element Response model * @param model Element Response model
* @param options telescope options * @param options telescope options
*/ */
OSKAR(casacore::MeasurementSet &ms, OSKAR(casacore::MeasurementSet &ms, const Options &options);
const Options &options);
std::unique_ptr<griddedresponse::GriddedResponse> GetGriddedResponse( std::unique_ptr<griddedresponse::GriddedResponse> GetGriddedResponse(
const coords::CoordinateSystem &coordinate_system) override; const coords::CoordinateSystem &coordinate_system) override;
...@@ -66,7 +65,6 @@ class OSKAR final : public Telescope { ...@@ -66,7 +65,6 @@ class OSKAR final : public Telescope {
return stations_[station_idx]; return stations_[station_idx];
} }
private: private:
void ReadAllStations(const casacore::MeasurementSet &ms, void ReadAllStations(const casacore::MeasurementSet &ms,
const ElementResponseModel model) { const ElementResponseModel model) {
...@@ -82,7 +80,6 @@ class OSKAR final : public Telescope { ...@@ -82,7 +80,6 @@ class OSKAR final : public Telescope {
const ElementResponseModel model) const; const ElementResponseModel model) const;
std::vector<Station::Ptr> stations_; std::vector<Station::Ptr> stations_;
}; };
} // namespace telescope } // namespace telescope
} // namespace everybeam } // namespace everybeam
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
#include "load.h" #include "load.h"
#include "options.h" #include "options.h"
#include "config.h" #include "config.h"
#include "coords/coordutils.h"
#include "coords/itrfconverter.h"
using namespace everybeam; using namespace everybeam;
...@@ -24,9 +26,24 @@ int main(int argc, char** argv){ ...@@ -24,9 +26,24 @@ int main(int argc, char** argv){
ms.field(), ms.field(),
casacore::MSField::columnName(casacore::MSFieldEnums::REFERENCE_DIR)); casacore::MSField::columnName(casacore::MSFieldEnums::REFERENCE_DIR));
auto preapplied_beam_dir = referenceDirColumn(0); auto reference_dir = referenceDirColumn(0);
std::cout << preapplied_beam_dir << std::endl; std::cout << ms.nrow() << std::endl;;
auto unique_times_table = ms.sort("TIME", casacore::Sort::Ascending, casacore::Sort::NoDuplicates);
std::cout << unique_times_table.nrow() << std::endl;
casacore::ScalarColumn<double> time_column(ms, "TIME");
real_t time = time_column(0);
std::cout << "time: " << time << std::endl;
std::cout << reference_dir << std::endl;
vector3r_t station0 ;
vector3r_t tile0;
coords::ITRFConverter itrf_converter(time);
coords::SetITRFVector(itrf_converter.ToDirection(reference_dir), station0);
coords::SetITRFVector(itrf_converter.ToDirection(reference_dir), tile0);
// Load OSKAR Telescope // Load OSKAR Telescope
auto telescope = Load(ms, options); auto telescope = Load(ms, options);
...@@ -40,9 +57,6 @@ int main(int argc, char** argv){ ...@@ -40,9 +57,6 @@ int main(int argc, char** argv){
auto q = antenna->coordinate_system_.axes.q; auto q = antenna->coordinate_system_.axes.q;
auto r = antenna->coordinate_system_.axes.r; auto r = antenna->coordinate_system_.axes.r;
const vector3r_t station0 = r;
const vector3r_t tile0 = r;
double freq = 50e6; double freq = 50e6;
...@@ -67,12 +81,6 @@ int main(int argc, char** argv){ ...@@ -67,12 +81,6 @@ int main(int argc, char** argv){
double z = sqrt(1.0 - x*x - y*y); double z = sqrt(1.0 - x*x - y*y);
// double theta = asin(sqrt(x*x + y*y));
// double phi = atan2(y,x);
real_t time = 0;
real_t freq = 50e6;
const vector3r_t direction = { const vector3r_t direction = {
x*p[0] + y*q[0] + z*r[0], x*p[0] + y*q[0] + z*r[0],
x*p[1] + y*q[1] + z*r[1], x*p[1] + y*q[1] + z*r[1],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment