diff --git a/RTCP/Cobalt/CoInterface/src/Parset.cc b/RTCP/Cobalt/CoInterface/src/Parset.cc index ec4a2021f61b789f80facd0c5e2e100968a1d260..47f3e8cbfd7ec9edde528952da2ea312476a5dee 100644 --- a/RTCP/Cobalt/CoInterface/src/Parset.cc +++ b/RTCP/Cobalt/CoInterface/src/Parset.cc @@ -761,7 +761,7 @@ namespace LOFAR // Note that RingCoordinates provide *relative* coordinates, and // we need absolute ones. tab.direction.type = ptrRingCoords->coordTypeAsString(); - tab.direction.angle1 = obsSap.direction.angle1 + pointing.first; + tab.direction.angle1 = obsSap.direction.angle1 + pointing.first; // TODO: missing projection bug (also below for angle2) tab.direction.angle2 = obsSap.direction.angle2 + pointing.second; // One dispersion measure for all TABs in rings is inconvenient, // but not used anyway. Unclear if setting to 0.0 is better/worse. diff --git a/RTCP/Cobalt/CoInterface/src/RingCoordinates.cc b/RTCP/Cobalt/CoInterface/src/RingCoordinates.cc index a402cb83679ab81db61160226217b0df87a9005b..1732aa80dd0bd0f6f923ec703059d6e29b8946e2 100644 --- a/RTCP/Cobalt/CoInterface/src/RingCoordinates.cc +++ b/RTCP/Cobalt/CoInterface/src/RingCoordinates.cc @@ -1,5 +1,5 @@ //# RingCoordinates.cc -//# Copyright (C) 2008-2013 ASTRON (Netherlands Institute for Radio Astronomy) +//# Copyright (C) 2008-2015 ASTRON (Netherlands Institute for Radio Astronomy) //# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands //# //# This file is part of the LOFAR software suite. @@ -22,8 +22,7 @@ #include <lofar_config.h> #include "RingCoordinates.h" -#include <math.h> // sqrt -#include <algorithm> // std::transform +#include <math.h> // sqrt, cos using namespace std; @@ -142,6 +141,8 @@ namespace LOFAR //# stride for each side, starting left from the top, clock - wise CoordinateVector preCoords; + // Note: these asci art ring coord figures are wrong in the sense that + // they are rotated by 30 degr. The first ring vertex is actually on top. /* # _ # / \_ @@ -201,7 +202,9 @@ namespace LOFAR if (itsType == RingCoordinates::OTHER) return offset; - double cos_dec = cos(itsCenter.second + offset.second); + // warp coordinates closer to the NCP + + double cos_dec = cos(itsCenter.second + offset.second); // TODO: stop gap solution for missing projection bug; unlike comment this code actually fails close to NCP double epsilon = 0.0001; if (cos_dec > epsilon) diff --git a/RTCP/Cobalt/CoInterface/src/RingCoordinates.h b/RTCP/Cobalt/CoInterface/src/RingCoordinates.h index 5beb8fd39a7009d3ba5c34e123da9c62d540be13..afb5d745134f5f25f6b06a0a3233e4be836ea1d4 100644 --- a/RTCP/Cobalt/CoInterface/src/RingCoordinates.h +++ b/RTCP/Cobalt/CoInterface/src/RingCoordinates.h @@ -61,6 +61,8 @@ namespace LOFAR private: + // Note: these asci art ring coord figures are wrong in the sense that + // they are rotated by 30 degr. The first ring vertex is actually on top. /* * _ * / \ @@ -111,8 +113,8 @@ namespace LOFAR Coordinate cos_adjust(Coordinate const& offset); CoordinateVector itsCoordinates; - size_t itsNRings; - double itsWidth; + size_t itsNRings; ///< central beam is ring nr 1 + double itsWidth; ///< radius of ring 2 around central TAB Coordinate itsCenter; COORDTYPES itsType; }; diff --git a/RTCP/Cobalt/OutputProc/src/MSWriterDAL.cc b/RTCP/Cobalt/OutputProc/src/MSWriterDAL.cc index 12e5fda1d4a5603ae3cb59a7092b32947b5fc4b7..46b3de6e8e23f4790a2dfedda200e1143be41388 100644 --- a/RTCP/Cobalt/OutputProc/src/MSWriterDAL.cc +++ b/RTCP/Cobalt/OutputProc/src/MSWriterDAL.cc @@ -257,7 +257,7 @@ namespace LOFAR beam.pointRAUnit().value = "deg"; beam.pointDEC().value = tabDir.angle2 * 180.0 / M_PI; beam.pointDECUnit().value = "deg"; - beam.pointOffsetRA().value = (tabDir.angle1 - beamDir.angle1) * 180.0 / M_PI; + beam.pointOffsetRA().value = (tabDir.angle1 - beamDir.angle1) * 180.0 / M_PI; // TODO: missing projection bug (also below for angle2) beam.pointOffsetRAUnit().value = "deg"; beam.pointOffsetDEC().value = (tabDir.angle2 - beamDir.angle2) * 180.0 / M_PI; beam.pointOffsetDECUnit().value = "deg";