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
1 merge request!59Resolve "Add stationresponse comparison for oskar"
......@@ -78,7 +78,8 @@ vector3r_t TransformToFieldCoordinates(
// casacore::ArrayQuantColumn<casacore::Double> c_position(table, "POSITION",
// "m");
// casacore::ArrayQuantColumn<casacore::Double> c_axes(table,
// "COORDINATE_SYSTEM", "m");
// "COORDINATE_SYSTEM",
// "m");
//
// // Read antenna field center (ITRF).
// casacore::Vector<casacore::Quantity> aips_position = c_position(id);
......@@ -105,7 +106,8 @@ vector3r_t TransformToFieldCoordinates(
BeamFormer::Ptr ReadMSv3AntennaField(const Table &table, unsigned int id,
ElementResponse::Ptr element_response) {
Antenna::CoordinateSystem coordinate_system = common::ReadCoordinateSystem(table, id);
Antenna::CoordinateSystem coordinate_system =
common::ReadCoordinateSystem(table, id);
BeamFormer::Ptr beam_former(
new BeamFormerIdenticalAntennas(coordinate_system));
// BeamFormer::Ptr beam_former(new BeamFormer(coordinate_system));
......
......@@ -11,8 +11,7 @@ using namespace everybeam;
using namespace everybeam::telescope;
using namespace casacore;
OSKAR::OSKAR(MeasurementSet &ms,
const Options &options)
OSKAR::OSKAR(MeasurementSet &ms, const Options &options)
: Telescope(ms, options) {
stations_.resize(nstations_);
ReadAllStations(ms, options_.element_response_model);
......
......@@ -48,8 +48,7 @@ class OSKAR final : public Telescope {
* @param model Element Response model
* @param options telescope options
*/
OSKAR(casacore::MeasurementSet &ms,
const Options &options);
OSKAR(casacore::MeasurementSet &ms, const Options &options);
std::unique_ptr<griddedresponse::GriddedResponse> GetGriddedResponse(
const coords::CoordinateSystem &coordinate_system) override;
......@@ -66,7 +65,6 @@ class OSKAR final : public Telescope {
return stations_[station_idx];
}
private:
void ReadAllStations(const casacore::MeasurementSet &ms,
const ElementResponseModel model) {
......@@ -82,7 +80,6 @@ class OSKAR final : public Telescope {
const ElementResponseModel model) const;
std::vector<Station::Ptr> stations_;
};
} // namespace telescope
} // namespace everybeam
......
......@@ -9,6 +9,8 @@
#include "load.h"
#include "options.h"
#include "config.h"
#include "coords/coordutils.h"
#include "coords/itrfconverter.h"
using namespace everybeam;
......@@ -24,9 +26,24 @@ int main(int argc, char** argv){
ms.field(),
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
auto telescope = Load(ms, options);
......@@ -40,9 +57,6 @@ int main(int argc, char** argv){
auto q = antenna->coordinate_system_.axes.q;
auto r = antenna->coordinate_system_.axes.r;
const vector3r_t station0 = r;
const vector3r_t tile0 = r;
double freq = 50e6;
......@@ -67,12 +81,6 @@ int main(int argc, char** argv){
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 = {
x*p[0] + y*q[0] + z*r[0],
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.
Finish editing this message first!
Please register or to comment