From d5857ab3885504aa4d41d5028d34c100a3cc6f28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20J=C3=BCrges?= <jurges@astron.nl> Date: Tue, 5 Feb 2019 16:16:47 +0000 Subject: [PATCH] SW-546: Explain the assumption for the first spectral frame --- RTCP/Cobalt/OutputProc/src/TBB_Dipole.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/RTCP/Cobalt/OutputProc/src/TBB_Dipole.cc b/RTCP/Cobalt/OutputProc/src/TBB_Dipole.cc index f9778d1e08c..6acb39c64d4 100644 --- a/RTCP/Cobalt/OutputProc/src/TBB_Dipole.cc +++ b/RTCP/Cobalt/OutputProc/src/TBB_Dipole.cc @@ -207,7 +207,7 @@ namespace LOFAR * Then we can write flags while data comes in. Else, leave * as-is. */ - if(doTransient()) + if(transientMode == true) { itsDipoleDataset()->flagOffsets().create( itsDumpInfo.itsFlagOffsets.size()).set( @@ -407,6 +407,12 @@ namespace LOFAR */ else if(currentSubBand.isInitialised == false) { + /** + * Assume that the first ever received frame for any sub-band is + * the very first frame that got ever sent for that sub-band. This + * is the only assumption made about the order of frames sent by + * TBB. + */ currentSubBand.time0 = frame.header.time; currentSubBand.slice0 = sliceNr; @@ -446,8 +452,7 @@ namespace LOFAR currentSubBand.dataSet->timeResolution().value = static_cast< double >(SPECTRAL_TRANSFORM_SIZE) / (frame.header.sampleFreq * 1000000.0); - currentSubBand.dataSet->timeResolutionUnit().value = - "s"; + currentSubBand.dataSet->timeResolutionUnit().value = "s"; currentSubBand.dataSet->bandwidth().value = static_cast< double >(frame.header.sampleFreq) * 1000000.0 / static_cast< double >(SPECTRAL_TRANSFORM_SIZE); @@ -483,7 +488,7 @@ namespace LOFAR << currentSubBand.slice0 << ", HDF5 SubbandDataset name = " << currentSubBand.dataSet->name() - << " , dipole = " + << ", dipole = " << itsDipoleGroup()->name() << ", station id = " << static_cast< uint32_t >(frame.header.stationID) -- GitLab