From a0dde36eee7af257f474f650645612b30fe97ec0 Mon Sep 17 00:00:00 2001 From: Martin Gels <gels@astron.nl> Date: Tue, 15 May 2007 13:07:02 +0000 Subject: [PATCH] BugID: 1005 The purpose of this change is to make sure that the UVW vector in the Measurement Set points from ANTENNA1 to ANTENNA2, that is, UVW = UVW(ANTENNA2) - UVW(ANTENNA1) In order to comply with WSRT Measurement Sets, it is furthermore required that ANTENNA1 <= ANTENNA2. Before this change, the UVW vector pointed exactly in the opposite direction, hence the UVW vector is reversed. The orientation of the sky was nevertheless correct. In order to prevent point mirroring the sky with respect to the phase centre because of the reversal of the UVW coordinates, it is necessary to conjugate the visibilities prior to writing them to disk. This conjugation is a temporary fix until the minus signs and conjugations in the polyphase filter, FFT, fringe tracking, correlator, and MS exporter are all reviewed in order to determine the proper place for this conjugation. --- Appl/CEP/CS1/CS1_Storage/src/MSWriterImpl.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Appl/CEP/CS1/CS1_Storage/src/MSWriterImpl.cc b/Appl/CEP/CS1/CS1_Storage/src/MSWriterImpl.cc index bc99a59e477..2403ddc98fc 100644 --- a/Appl/CEP/CS1/CS1_Storage/src/MSWriterImpl.cc +++ b/Appl/CEP/CS1/CS1_Storage/src/MSWriterImpl.cc @@ -627,9 +627,9 @@ namespace LOFAR MBaseline MB_J2000; MVBaseline MBV_J2000; - for (int i=0; i<itsNrAnt; i++) { - for (int j=0; j<=i; j++) { - MB_ITRF = MBaseline(MVBaseline(basel(0,i,j), basel(1,i,j), basel(2,i,j)), + for (int ant2=0; ant2<itsNrAnt; ant2++) { + for (int ant1=0; ant1<=ant2; ant1++) { + MB_ITRF = MBaseline(MVBaseline(basel(0,ant1,ant2), basel(1,ant1,ant2), basel(2,ant1,ant2)), MBaseline::ITRF); MB_J2000 = MBaseline::Convert (MB_ITRF, MBaseline::Ref (MBaseline::J2000, *itsFrame)) (); MBV_J2000 = MB_J2000.getValue(); @@ -641,8 +641,8 @@ namespace LOFAR itsMSCol->flagRow().put (rowNumber, False); itsMSCol->time().put (rowNumber, time); - itsMSCol->antenna1().put (rowNumber, j); - itsMSCol->antenna2().put (rowNumber, i); + itsMSCol->antenna1().put (rowNumber, ant1); + itsMSCol->antenna2().put (rowNumber, ant2); itsMSCol->feed1().put (rowNumber, 0); itsMSCol->feed2().put (rowNumber, 0); itsMSCol->dataDescId().put (rowNumber, bandId); @@ -667,6 +667,8 @@ namespace LOFAR Array<Complex> dataArray(dShape, (Complex*)data, SHARE); IPosition start(2, 0, channelId); IPosition leng(2, shape[0], nrChannels); + dataArray.apply(conj); // Temporary fix, necessary to prevent flipping of the sky, since + // the UVW coordinates are reversed (20070515) itsMSCol->data().putSlice(rowNumber, Slicer(start, leng), dataArray); } catch (AipsError& e) -- GitLab