Skip to content
Snippets Groups Projects
Commit 02409c8f authored by Jan David Mol's avatar Jan David Mol
Browse files

bug 1362: use LDA writer by default if available; and fixed bug in LDA writer

parent e7e24eab
No related branches found
No related tags found
No related merge requests found
...@@ -251,6 +251,7 @@ namespace LOFAR ...@@ -251,6 +251,7 @@ namespace LOFAR
BF_BeamGroup beam = sap.beam(beamNr); BF_BeamGroup beam = sap.beam(beamNr);
beam.create();
beam.groupType() .set("Beam"); beam.groupType() .set("Beam");
beam.nofStations() .set(parset.nrStations()); beam.nofStations() .set(parset.nrStations());
beam.stationsList().set(parset.allStationNames()); // TODO: SS beamformer, support subsets of allStations beam.stationsList().set(parset.allStationNames()); // TODO: SS beamformer, support subsets of allStations
......
...@@ -151,15 +151,15 @@ void OutputThread::createMS() ...@@ -151,15 +151,15 @@ void OutputThread::createMS()
LOG_INFO_STR(itsLogPrefix << "Writing to " << path); LOG_INFO_STR(itsLogPrefix << "Writing to " << path);
try { try {
#ifdef USE_DAL #ifdef USE_LDA
if (path.rfind(".h5") == path.length() - strlen(".h5")) { if (path.rfind(".h5") == path.length() - strlen(".h5")) {
// HDF5 writer requested // HDF5 writer requested
switch (itsOutputType) { switch (itsOutputType) {
case COHERENT_STOKES: case COHERENT_STOKES:
itsWriter = new MSWriterDAL<float,3>(path.c_str(), itsParset, itsOutputType, itsStreamNr, itsIsBigEndian); itsWriter = new MSWriterLDA<float,3>(path.c_str(), itsParset, itsOutputType, itsStreamNr, itsIsBigEndian);
break; break;
case BEAM_FORMED_DATA: case BEAM_FORMED_DATA:
itsWriter = new MSWriterDAL<float,4>(path.c_str(), itsParset, itsOutputType, itsStreamNr, itsIsBigEndian); itsWriter = new MSWriterLDA<float,4>(path.c_str(), itsParset, itsOutputType, itsStreamNr, itsIsBigEndian);
break; break;
default: default:
THROW(StorageException, "HDF5 not supported for this data type"); THROW(StorageException, "HDF5 not supported for this data type");
...@@ -167,15 +167,15 @@ void OutputThread::createMS() ...@@ -167,15 +167,15 @@ void OutputThread::createMS()
} else { } else {
itsWriter = new MSWriterFile(path, itsOutputType == COHERENT_STOKES || itsOutputType == BEAM_FORMED_DATA || itsOutputType == INCOHERENT_STOKES); itsWriter = new MSWriterFile(path, itsOutputType == COHERENT_STOKES || itsOutputType == BEAM_FORMED_DATA || itsOutputType == INCOHERENT_STOKES);
} }
#elif defined USE_LDA #elif defined USE_DAL
if (path.rfind(".h5") == path.length() - strlen(".h5")) { if (path.rfind(".h5") == path.length() - strlen(".h5")) {
// HDF5 writer requested // HDF5 writer requested
switch (itsOutputType) { switch (itsOutputType) {
case COHERENT_STOKES: case COHERENT_STOKES:
itsWriter = new MSWriterLDA<float,3>(path.c_str(), itsParset, itsOutputType, itsStreamNr, itsIsBigEndian); itsWriter = new MSWriterDAL<float,3>(path.c_str(), itsParset, itsOutputType, itsStreamNr, itsIsBigEndian);
break; break;
case BEAM_FORMED_DATA: case BEAM_FORMED_DATA:
itsWriter = new MSWriterLDA<float,4>(path.c_str(), itsParset, itsOutputType, itsStreamNr, itsIsBigEndian); itsWriter = new MSWriterDAL<float,4>(path.c_str(), itsParset, itsOutputType, itsStreamNr, itsIsBigEndian);
break; break;
default: default:
THROW(StorageException, "HDF5 not supported for this data type"); THROW(StorageException, "HDF5 not supported for this data type");
......
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