diff --git a/CEP/BB/BBS/src/BBSrun.cc b/CEP/BB/BBS/src/BBSrun.cc index ab0c7e5e318dc318304d2d54754a49f853a8b35d..12d44ebf6831a14a9d6a1d3207448a9901d66b2a 100644 --- a/CEP/BB/BBS/src/BBSrun.cc +++ b/CEP/BB/BBS/src/BBSrun.cc @@ -202,6 +202,7 @@ bool doIt (const string& parsetName) Prediffer prediffer(measurementSet, ParmDBMeta("aips", instrumentPDB), ParmDBMeta("aips", skyPDB), + 0, calcUVW); // Set strategy. StrategyProp stratProp; diff --git a/CEP/BB/BBS/src/MMapMSInfo.cc b/CEP/BB/BBS/src/MMapMSInfo.cc index c2b42e3d5ee05f7779cef857ba2d1e84265527e5..e7fd98ec4b8d090b0349470d12a9912d57b0a18f 100644 --- a/CEP/BB/BBS/src/MMapMSInfo.cc +++ b/CEP/BB/BBS/src/MMapMSInfo.cc @@ -21,20 +21,31 @@ //# $Id$ #include <BBS/MMapMSInfo.h> +#include <MS/MSDesc.h> namespace LOFAR { - MMapMSInfo::MMapMSInfo (int nrCorr, int nrChan, int nrBL, + MMapMSInfo::MMapMSInfo (const MSDesc& msdesc, uint ddid, bool reverseChan) - : itsNrCorr (nrCorr), - itsNrChan (nrChan), - itsNrBL (nrBL), - itsTimeSize (nrCorr*nrChan*nrBL), + : itsNrCorr (msdesc.corrTypes.size()), + itsNrChan (msdesc.nchan[ddid]), + itsNrBL (msdesc.ant1.size()), + itsTimeSize (0), itsReverseChan (reverseChan), itsInData (0), itsOutData (0), - itsTimeStep (0) - {} + itsTimeSlot (0), + itsDDOffset (0) + { + // Calculate the length of each timeslot. + for (uint i=0; i<msdesc.nchan.size(); ++i) { + itsTimeSize += itsNrCorr*itsNrBL * msdesc.nchan[i]; + if (i < ddid) { + // Keep the offset for the required spw. + itsDDOffset = itsTimeSize; + } + } + } } diff --git a/CEP/BB/BBS/src/MMapMSInfo.h b/CEP/BB/BBS/src/MMapMSInfo.h index cfccc5d60f92afcc29d989427f0a53ce1530a21e..dc521f28f0d447d5b9b4f9d7921b8f2cd832c5c1 100644 --- a/CEP/BB/BBS/src/MMapMSInfo.h +++ b/CEP/BB/BBS/src/MMapMSInfo.h @@ -31,6 +31,8 @@ namespace LOFAR { + // Forward Declarations. + class MSDesc; // \ addtogroup BBS // @{ @@ -40,12 +42,14 @@ namespace LOFAR class MMapMSInfo { public: - // Create the object for given nr of correlations in MS - // and given size of one time slot (is #corr*#chan*#bl). - explicit MMapMSInfo (int nrCorr=0, int nrChan=0, int nrBL=0, - bool reverseChan=false); + MMapMSInfo() + {} + + // Create the object for the given MS description and dd (spw). + MMapMSInfo (const MSDesc& msdesc, uint ddid, bool reverseChan); // Set pointer to the mapped data chunk that is to be used next. + // It adds the offset to get the pointer to the wanted spw. // <group> void setInData (fcomplex* data) { itsInData = data; } @@ -53,9 +57,9 @@ public: { itsOutData = data; } // </group> - // Set the time step in the part mapped in. - void setTimes (int timeStep, int nrTimes) - { itsTimeStep = timeStep; itsNrTimes = nrTimes; } + // Set the time slot in the part mapped in. + void setTimes (int timeSlot, int nrTimes) + { itsTimeSlot = timeSlot; itsNrTimes = nrTimes; } // Get the info. // <group> @@ -69,16 +73,18 @@ public: { return itsNrTimes; } int timeSize() const { return itsTimeSize; } + int ddOffset() const + { return itsDDOffset; } int reverseChan() const { return itsReverseChan; } fcomplex* inData() const { return itsInData; } fcomplex* outData() const { return itsOutData; } - int timeStep() const - { return itsTimeStep; } + int timeSlot() const + { return itsTimeSlot; } int64 timeOffset() const - { return int64(itsTimeStep) * itsTimeSize; } + { return int64(itsTimeSlot) * itsTimeSize; } // </group> private: @@ -89,8 +95,9 @@ private: bool itsReverseChan; fcomplex* itsInData; fcomplex* itsOutData; - int itsTimeStep; + int itsTimeSlot; int itsNrTimes; + int itsDDOffset; //# Offset for the dd (spw) to process }; // @} diff --git a/CEP/BB/BBS/src/MNS/MeqJonesMMap.cc b/CEP/BB/BBS/src/MNS/MeqJonesMMap.cc index 7958a0917e20e55e9ac32d2bee6ace856cbf7a83..5d03a476713a48e55c79612c60afaac66ad289b3 100644 --- a/CEP/BB/BBS/src/MNS/MeqJonesMMap.cc +++ b/CEP/BB/BBS/src/MNS/MeqJonesMMap.cc @@ -28,7 +28,7 @@ namespace LOFAR { MeqJonesMMap::MeqJonesMMap (const MMapMSInfo& info, int blnr) : itsInfo (&info), - itsOffsetBL (int64(blnr) * info.nrChan() * info.nrCorr()) + itsOffsetBL (int64(blnr)*info.nrChan()*info.nrCorr() + info.ddOffset()) {} MeqJonesMMap::~MeqJonesMMap() diff --git a/CEP/BB/BBS/src/Prediffer.cc b/CEP/BB/BBS/src/Prediffer.cc index f0eec2d1d9196e15186f1d297e21aaf4500d4b9a..5008c0aa857ec4609c1113a80adb097b3523f2f6 100644 --- a/CEP/BB/BBS/src/Prediffer.cc +++ b/CEP/BB/BBS/src/Prediffer.cc @@ -97,6 +97,7 @@ namespace LOFAR Prediffer::Prediffer(const string& msName, const ParmDB::ParmDBMeta& meqPdm, const ParmDB::ParmDBMeta& skyPdm, + uint ddid, bool calcUVW) : itsMSName (msName), @@ -127,11 +128,8 @@ Prediffer::Prediffer(const string& msName, << itsCalcUVW << ")" ); // Read the meta data and map the flags file. readDescriptiveData (msName); - fillStations(); + processMSDesc (ddid); itsFlagsMap = new FlagsMap(msName + "/vis.flg", MMap::Read); - // Set the MS info. - itsMSMapInfo = MMapMSInfo (itsNCorr, itsNrChan, itsNrBl, - itsReverseChan); // Get all sources from the ParmDB. itsSources = new MeqSourceList(itsGSMMEP, itsParmGroup); // Create the UVW nodes and fill them with uvw-s from MS if not calculated. @@ -400,7 +398,7 @@ Prediffer::~Prediffer() MeqMatrixRealArr::poolDeactivate(); } -void Prediffer::readDescriptiveData(const string& fileName) +void Prediffer::readDescriptiveData (const string& fileName) { // Get meta data from description file. string name(fileName+"/vis.des"); @@ -409,12 +407,16 @@ void Prediffer::readDescriptiveData(const string& fileName) BlobIBufStream bbs(istr); BlobIStream bis(bbs); bis >> itsMSDesc; - ASSERTSTR (itsMSDesc.nchan.size() == 1, - "Multiple bands in MS cannot be handled"); +} + +void Prediffer::processMSDesc (uint ddid) +{ + ASSERT (ddid < itsMSDesc.nchan.size()); + // Set the observation info. itsNCorr = itsMSDesc.corrTypes.size(); - itsNrChan = itsMSDesc.nchan[0]; - itsStartFreq = itsMSDesc.startFreq[0]; - itsEndFreq = itsMSDesc.endFreq[0]; + itsNrChan = itsMSDesc.nchan[ddid]; + itsStartFreq = itsMSDesc.startFreq[ddid]; + itsEndFreq = itsMSDesc.endFreq[ddid]; itsStepFreq = (itsEndFreq - itsStartFreq)/itsNrChan; itsNrBl = itsMSDesc.ant1.size(); itsReverseChan = itsStartFreq > itsEndFreq; @@ -424,7 +426,12 @@ void Prediffer::readDescriptiveData(const string& fileName) itsStartFreq = tmp; itsStepFreq = std::abs(itsStepFreq); } - getPhaseRef(itsMSDesc.ra, itsMSDesc.dec, itsMSDesc.startTime); + // Set the MS info. + itsMSMapInfo = MMapMSInfo (itsMSDesc, ddid, itsReverseChan); + // Set the phase center info. + getPhaseRef (itsMSDesc.ra, itsMSDesc.dec, itsMSDesc.startTime); + // Set station info. + fillStations(); } void Prediffer::getPhaseRef(double ra, double dec, double startTime) @@ -993,7 +1000,8 @@ void Prediffer::processData (bool useFlags, bool preCalc, bool calcDeriv, int nrchan = itsLastChan-itsFirstChan+1; double startFreq = itsStartFreq + itsFirstChan*itsStepFreq; double endFreq = itsStartFreq + (itsLastChan+1)*itsStepFreq; - unsigned int freqOffset = itsFirstChan*itsNCorr; + // Add offset for dd (band) and channel. + unsigned int freqOffset = itsFirstChan*itsNCorr + itsMSMapInfo.ddOffset(); // Determine if perturbed values have to be calculated. int nrpert = calcDeriv ? itsNrPert:0; // Loop through the domain of the data to be processed. diff --git a/CEP/BB/BBS/src/Prediffer.h b/CEP/BB/BBS/src/Prediffer.h index e131218a43c7bf26b6b6403989127e8b3fb35368..3f4aeeb9d3393ca1cac2fc7d5b4406b38831df82 100644 --- a/CEP/BB/BBS/src/Prediffer.h +++ b/CEP/BB/BBS/src/Prediffer.h @@ -82,13 +82,12 @@ class Prediffer public: // Create Prediffer object for a specific // MeaurementSet, MEQ model (with associated MEP database) and skymodel - // for the specified data descriptor (i.e. spectral window) and antennas. - // The database type (aips or postgres) has to be given. - // For postgres the database name has to be given as well. - // The UVW coordinates can be recalculated or taken from the MS. + // for the specified data descriptor (i.e. spectral window). + // The UVW coordinates can be calculated or taken from the MS. Prediffer (const string& msName, const ParmDB::ParmDBMeta& meqPtd, const ParmDB::ParmDBMeta& skyPtd, + uint ddid, bool calcUVW); // Destructor @@ -199,6 +198,9 @@ private: // Get measurement set description from file void readDescriptiveData (const string& fileName); + // Process the MS description for the given dd (sectral window). + void Prediffer::processMSDesc (uint ddid); + // Get the phase reference position of the first field. void getPhaseRef (double ra, double dec, double startTime); diff --git a/CEP/BB/BBS/test/tCorrect.cc b/CEP/BB/BBS/test/tCorrect.cc index 4edf6b7138c305cf9e599c7f93fe190e5f231eb8..1cf7241401578bc2326da7d6ae1c432357089f58 100644 --- a/CEP/BB/BBS/test/tCorrect.cc +++ b/CEP/BB/BBS/test/tCorrect.cc @@ -67,7 +67,7 @@ int main (int argc, const char* argv[]) // Do a correct. { cout << "Starting correct test" << endl; - Prediffer pre1(argv[2], meqPdm, skyPdm, false); + Prediffer pre1(argv[2], meqPdm, skyPdm, 0, false); vector<int> antVec(100); for (uint i=0; i<antVec.size(); ++i) { antVec[i] = i; diff --git a/CEP/BB/BBS/test/tMSData.cc b/CEP/BB/BBS/test/tMSData.cc index 5ae59cfbe68bc1bfcf69a2031bb6ae2b65f94d14..415be31bb6253084b8fe61d9eead963d9e8a6955 100644 --- a/CEP/BB/BBS/test/tMSData.cc +++ b/CEP/BB/BBS/test/tMSData.cc @@ -43,7 +43,8 @@ using namespace casa; using namespace std; void doIt (const string& msName, Prediffer& prediff, const string& column, - int nrant, int stchan, int nrchan, bool useTree, bool useAutoCorr) + int spwid, int nrant, int stchan, int nrchan, + bool useTree, bool useAutoCorr) { cout << "Checking data in " << msName << " for channels " << stchan << '-' << stchan+nrchan-1 << endl; @@ -51,6 +52,7 @@ void doIt (const string& msName, Prediffer& prediff, const string& column, // Only use antenna < nrant. Table tab(msName); TableExprNode ten = tab.col("ANTENNA1")<nrant && tab.col("ANTENNA2")<nrant; + ten = ten && tab.col("DATA_DESC_ID")==spwid; if (!useAutoCorr) { ten = ten && (tab.col("ANTENNA1") != tab.col("ANTENNA2")); } @@ -97,8 +99,8 @@ void doIt (const string& msName, Prediffer& prediff, const string& column, int main(int argc, char** argv) { try { - if (argc < 7) { - cout << "Run as: tMSData ms user msname meqparmtable skyparmtable nrant [datacolumn]" << endl; + if (argc < 8) { + cout << "Run as: tMSData ms user msname meqparmtable skyparmtable spwid nrant [datacolumn]" << endl; cout << " datacolumn defaults to MODEL_DATA" << endl; return 0; } @@ -119,12 +121,15 @@ int main(int argc, char** argv) bis >> msd; } + uint spwid; + std::istringstream istr1(argv[6]); + istr1 >> spwid; uint nrant; - std::istringstream istr(argv[6]); - istr >> nrant; + std::istringstream istr2(argv[7]); + istr2 >> nrant; string column("MODEL_DATA"); - if (argc > 7) { - column = argv[7]; + if (argc > 8) { + column = argv[8]; } if (nrant > msd.antNames.size()) { nrant = msd.antNames.size(); @@ -135,16 +140,16 @@ int main(int argc, char** argv) for (uint i=0; i<nrant; ++i) { antVec[i] = i; } - Prediffer pre (argv[3], meqPdm, skyPdm, false); + Prediffer pre (argv[3], meqPdm, skyPdm, spwid, false); StrategyProp stratProp; stratProp.setAntennas (antVec); stratProp.setAutoCorr (true); ASSERT (pre.setStrategyProp (stratProp)); - doIt (argv[1], pre, column, nrant, 0, 50, false, true); - doIt (argv[1], pre, column, nrant, 10,10, false, false); - //doIt (argv[1], pre, column, nrant, 10,2, false, false); - doIt (argv[1], pre, column, nrant, 0, 50, true, false); - doIt (argv[1], pre, column, nrant, 10,11, true, true); + doIt (argv[1], pre, column, spwid, nrant, 0, 50, false, true); + doIt (argv[1], pre, column, spwid, nrant, 10,10, false, false); + //doIt (argv[1], pre, column, spwid, nrant, 10,2, false, false); + doIt (argv[1], pre, column, spwid, nrant, 0, 50, true, false); + doIt (argv[1], pre, column, spwid, nrant, 10,11, true, true); } catch (exception& x) { cout << "Unexpected expection: " << x.what() << endl; return 1; diff --git a/CEP/BB/BBS/test/tMSData.run b/CEP/BB/BBS/test/tMSData.run index 3e3f4740f83350d7e898024715cea490f96afe02..1174fd3feae6ec28f54197ae27921ebf4123103a 100755 --- a/CEP/BB/BBS/test/tMSData.run +++ b/CEP/BB/BBS/test/tMSData.run @@ -10,13 +10,48 @@ fi # Create the ParmDB tables for tMSData. $srcdir/makeDemoParmDB tMSData -$LOFAR_CHECKTOOL ./tMSData /data/PSS3/diepen/BBS2/demo3.MS $USER /data/PSS3/diepen/BBS2/demo3.MS_p1 tMSData_tmp.demo_instr tMSData_tmp.demo_sky 100 MODEL_DATA +echo "run1 ..." +$LOFAR_CHECKTOOL ./tMSData /data/PSS3/diepen/BBS2/demo3.MS $USER /data/PSS3/diepen/BBS2/demo3.MS_p1 tMSData_tmp.demo_instr tMSData_tmp.demo_sky 0 100 MODEL_DATA status=$? -$LOFAR_CHECKTOOL ./tMSData /data/PSS3/diepen/BBS2/3C343/10008336.MS $USER /data/PSS3/diepen/BBS2/3C343/10008336.MS_p1 tMSData_tmp.demo_instr tMSData_tmp.demo_sky 14 DATA +echo "run2 ..." +$LOFAR_CHECKTOOL ./tMSData /data/PSS3/diepen/BBS2/3C343/10008336.MS $USER /data/PSS3/diepen/BBS2/3C343/10008336.MS_p1 tMSData_tmp.demo_instr tMSData_tmp.demo_sky 0 14 DATA stat=$? if [ $stat != 0 ]; then status=$stat fi -exit $status +# Try to do a test with multiple bands by creating an MS with 2 bands.. +if [ ! -d $HOME/WSRT_ANTENNA ]; then + exit $status +fi +cat > makems.cfg << EOF +StartFreq=1170e6 +StepFreq=100000 +StartTime=2000/08/03/13:22:30 +StepTime=10 +RightAscension=16:38:28.205274248 +Declination=62.34.44.313606568 +NBands=2 +NFrequencies=100 +NTimes=14 +NParts=1 +WriteAutoCorr=T +AntennaTableName=$HOME/WSRT_ANTENNA +MSName=tMSData_tmp.MS +MSDesPath=. +EOF +makems +\rm -f makems.cfg +echo "run3 band 0 ..." +$LOFAR_CHECKTOOL ./tMSData tMSData_tmp.MS_p1 $USER tMSData_tmp.MS_p1 tMSData_tmp.demo_instr tMSData_tmp.demo_sky 0 14 DATA +stat=$? +if [ $stat != 0 ]; then + status=$stat +fi +echo "run3 band 1 ..." +$LOFAR_CHECKTOOL ./tMSData tMSData_tmp.MS_p1 $USER tMSData_tmp.MS_p1 tMSData_tmp.demo_instr tMSData_tmp.demo_sky 1 14 DATA +stat=$? +if [ $stat != 0 ]; then + status=$stat +fi diff --git a/CEP/BB/BBS/test/tPerturbed.cc b/CEP/BB/BBS/test/tPerturbed.cc index 001fbf798af91a8de62f623f2e42b1c397482cc3..4462c4f9e6861ec467b97998dbbf7a1377ef4706 100644 --- a/CEP/BB/BBS/test/tPerturbed.cc +++ b/CEP/BB/BBS/test/tPerturbed.cc @@ -147,7 +147,7 @@ int main (int argc, const char* argv[]) // Read the info for the ParmTables ParmDB::ParmDBMeta meqPdm("aips", argv[3]); ParmDB::ParmDBMeta skyPdm("aips", argv[4]); - Prediffer pre1(argv[2], meqPdm, skyPdm, false); + Prediffer pre1(argv[2], meqPdm, skyPdm, 0, false); // Do a solve using the model and a few stations. { diff --git a/CEP/BB/BBS/test/tPredSolv.cc b/CEP/BB/BBS/test/tPredSolv.cc index dc3a0a103df31b4561a7d900f98ef19c6956caf5..ce30640d5e9177464bfc649f0550c00d2e323afd 100644 --- a/CEP/BB/BBS/test/tPredSolv.cc +++ b/CEP/BB/BBS/test/tPredSolv.cc @@ -197,7 +197,7 @@ int main (int argc, const char* argv[]) // Do a solve for RA using a few stations. { cout << "Starting first test" << endl; - Prediffer pre1(argv[2], meqPdm, skyPdm, false); + Prediffer pre1(argv[2], meqPdm, skyPdm, 0, false); vector<int> antVec(10); for (uint i=0; i<antVec.size(); ++i) { antVec[i] = 2*i; @@ -229,8 +229,8 @@ int main (int argc, const char* argv[]) // Do a solve using 2 prediffers. { cout << "Starting test with two prediffers" << endl; - Prediffer pre1(argv[2], meqPdm, skyPdm, false); - Prediffer pre2(argv[2], meqPdm, skyPdm, false); + Prediffer pre1(argv[2], meqPdm, skyPdm, 0, false); + Prediffer pre2(argv[2], meqPdm, skyPdm, 0, false); vector<int> antVec(10); for (uint i=0; i<antVec.size(); ++i) { antVec[i] = 2*i; @@ -263,7 +263,7 @@ int main (int argc, const char* argv[]) // Take more baselines. { cout << "Starting test with 21 antennas" << endl; - Prediffer pre1(argv[2], meqPdm, skyPdm, false); + Prediffer pre1(argv[2], meqPdm, skyPdm, 0, false); vector<int> antVec(21); for (uint i=0; i<antVec.size(); ++i) { antVec[i] = 4*i; @@ -292,7 +292,7 @@ int main (int argc, const char* argv[]) // This should be the last one. { cout << "Starting test with updating parmtable" << endl; - Prediffer pre1(argv[2], meqPdm, skyPdm, false); + Prediffer pre1(argv[2], meqPdm, skyPdm, 0, false); vector<int> antVec(10); for (uint i=0; i<antVec.size(); ++i) { antVec[i] = 2*i; diff --git a/CEP/BB/BBS/test/tPredict.cc b/CEP/BB/BBS/test/tPredict.cc index 1a0e60d2281ddc33ef1f1fe23f6b9dfc3c06ab51..b841cf803c3bfd07f029171a3adb938e8c468d5d 100644 --- a/CEP/BB/BBS/test/tPredict.cc +++ b/CEP/BB/BBS/test/tPredict.cc @@ -63,7 +63,7 @@ int main (int argc, const char* argv[]) // Read the info for the ParmTables ParmDB::ParmDBMeta meqPdm("aips", argv[3]); ParmDB::ParmDBMeta skyPdm("aips", argv[4]); - Prediffer pre1(argv[2], meqPdm, skyPdm, false); + Prediffer pre1(argv[2], meqPdm, skyPdm, 0, false); // Do a predict. { diff --git a/CEP/BB/BBS/test/tSubtract.cc b/CEP/BB/BBS/test/tSubtract.cc index a2699c62a1fbb2e364c6f34082b3aaa774df5ab2..6f550bc9d1cb554a7ea7efd494497dd4f8606fa2 100644 --- a/CEP/BB/BBS/test/tSubtract.cc +++ b/CEP/BB/BBS/test/tSubtract.cc @@ -67,7 +67,7 @@ int main (int argc, const char* argv[]) // Do a subtract. { cout << "Starting subtract test" << endl; - Prediffer pre1(argv[2], meqPdm, skyPdm, false); + Prediffer pre1(argv[2], meqPdm, skyPdm, 0, false); vector<int> antVec(100); for (uint i=0; i<antVec.size(); ++i) { antVec[i] = i; diff --git a/CEP/BB/BBSKernel/include/BBSKernel/MMapMSInfo.h b/CEP/BB/BBSKernel/include/BBSKernel/MMapMSInfo.h index cfccc5d60f92afcc29d989427f0a53ce1530a21e..dc521f28f0d447d5b9b4f9d7921b8f2cd832c5c1 100644 --- a/CEP/BB/BBSKernel/include/BBSKernel/MMapMSInfo.h +++ b/CEP/BB/BBSKernel/include/BBSKernel/MMapMSInfo.h @@ -31,6 +31,8 @@ namespace LOFAR { + // Forward Declarations. + class MSDesc; // \ addtogroup BBS // @{ @@ -40,12 +42,14 @@ namespace LOFAR class MMapMSInfo { public: - // Create the object for given nr of correlations in MS - // and given size of one time slot (is #corr*#chan*#bl). - explicit MMapMSInfo (int nrCorr=0, int nrChan=0, int nrBL=0, - bool reverseChan=false); + MMapMSInfo() + {} + + // Create the object for the given MS description and dd (spw). + MMapMSInfo (const MSDesc& msdesc, uint ddid, bool reverseChan); // Set pointer to the mapped data chunk that is to be used next. + // It adds the offset to get the pointer to the wanted spw. // <group> void setInData (fcomplex* data) { itsInData = data; } @@ -53,9 +57,9 @@ public: { itsOutData = data; } // </group> - // Set the time step in the part mapped in. - void setTimes (int timeStep, int nrTimes) - { itsTimeStep = timeStep; itsNrTimes = nrTimes; } + // Set the time slot in the part mapped in. + void setTimes (int timeSlot, int nrTimes) + { itsTimeSlot = timeSlot; itsNrTimes = nrTimes; } // Get the info. // <group> @@ -69,16 +73,18 @@ public: { return itsNrTimes; } int timeSize() const { return itsTimeSize; } + int ddOffset() const + { return itsDDOffset; } int reverseChan() const { return itsReverseChan; } fcomplex* inData() const { return itsInData; } fcomplex* outData() const { return itsOutData; } - int timeStep() const - { return itsTimeStep; } + int timeSlot() const + { return itsTimeSlot; } int64 timeOffset() const - { return int64(itsTimeStep) * itsTimeSize; } + { return int64(itsTimeSlot) * itsTimeSize; } // </group> private: @@ -89,8 +95,9 @@ private: bool itsReverseChan; fcomplex* itsInData; fcomplex* itsOutData; - int itsTimeStep; + int itsTimeSlot; int itsNrTimes; + int itsDDOffset; //# Offset for the dd (spw) to process }; // @} diff --git a/CEP/BB/BBSKernel/include/BBSKernel/Prediffer.h b/CEP/BB/BBSKernel/include/BBSKernel/Prediffer.h index e131218a43c7bf26b6b6403989127e8b3fb35368..3f4aeeb9d3393ca1cac2fc7d5b4406b38831df82 100644 --- a/CEP/BB/BBSKernel/include/BBSKernel/Prediffer.h +++ b/CEP/BB/BBSKernel/include/BBSKernel/Prediffer.h @@ -82,13 +82,12 @@ class Prediffer public: // Create Prediffer object for a specific // MeaurementSet, MEQ model (with associated MEP database) and skymodel - // for the specified data descriptor (i.e. spectral window) and antennas. - // The database type (aips or postgres) has to be given. - // For postgres the database name has to be given as well. - // The UVW coordinates can be recalculated or taken from the MS. + // for the specified data descriptor (i.e. spectral window). + // The UVW coordinates can be calculated or taken from the MS. Prediffer (const string& msName, const ParmDB::ParmDBMeta& meqPtd, const ParmDB::ParmDBMeta& skyPtd, + uint ddid, bool calcUVW); // Destructor @@ -199,6 +198,9 @@ private: // Get measurement set description from file void readDescriptiveData (const string& fileName); + // Process the MS description for the given dd (sectral window). + void Prediffer::processMSDesc (uint ddid); + // Get the phase reference position of the first field. void getPhaseRef (double ra, double dec, double startTime); diff --git a/CEP/BB/BBSKernel/src/BBSrun.cc b/CEP/BB/BBSKernel/src/BBSrun.cc index ab0c7e5e318dc318304d2d54754a49f853a8b35d..12d44ebf6831a14a9d6a1d3207448a9901d66b2a 100644 --- a/CEP/BB/BBSKernel/src/BBSrun.cc +++ b/CEP/BB/BBSKernel/src/BBSrun.cc @@ -202,6 +202,7 @@ bool doIt (const string& parsetName) Prediffer prediffer(measurementSet, ParmDBMeta("aips", instrumentPDB), ParmDBMeta("aips", skyPDB), + 0, calcUVW); // Set strategy. StrategyProp stratProp; diff --git a/CEP/BB/BBSKernel/src/MMapMSInfo.cc b/CEP/BB/BBSKernel/src/MMapMSInfo.cc index c2b42e3d5ee05f7779cef857ba2d1e84265527e5..e7fd98ec4b8d090b0349470d12a9912d57b0a18f 100644 --- a/CEP/BB/BBSKernel/src/MMapMSInfo.cc +++ b/CEP/BB/BBSKernel/src/MMapMSInfo.cc @@ -21,20 +21,31 @@ //# $Id$ #include <BBS/MMapMSInfo.h> +#include <MS/MSDesc.h> namespace LOFAR { - MMapMSInfo::MMapMSInfo (int nrCorr, int nrChan, int nrBL, + MMapMSInfo::MMapMSInfo (const MSDesc& msdesc, uint ddid, bool reverseChan) - : itsNrCorr (nrCorr), - itsNrChan (nrChan), - itsNrBL (nrBL), - itsTimeSize (nrCorr*nrChan*nrBL), + : itsNrCorr (msdesc.corrTypes.size()), + itsNrChan (msdesc.nchan[ddid]), + itsNrBL (msdesc.ant1.size()), + itsTimeSize (0), itsReverseChan (reverseChan), itsInData (0), itsOutData (0), - itsTimeStep (0) - {} + itsTimeSlot (0), + itsDDOffset (0) + { + // Calculate the length of each timeslot. + for (uint i=0; i<msdesc.nchan.size(); ++i) { + itsTimeSize += itsNrCorr*itsNrBL * msdesc.nchan[i]; + if (i < ddid) { + // Keep the offset for the required spw. + itsDDOffset = itsTimeSize; + } + } + } } diff --git a/CEP/BB/BBSKernel/src/MMapMSInfo.h b/CEP/BB/BBSKernel/src/MMapMSInfo.h index cfccc5d60f92afcc29d989427f0a53ce1530a21e..dc521f28f0d447d5b9b4f9d7921b8f2cd832c5c1 100644 --- a/CEP/BB/BBSKernel/src/MMapMSInfo.h +++ b/CEP/BB/BBSKernel/src/MMapMSInfo.h @@ -31,6 +31,8 @@ namespace LOFAR { + // Forward Declarations. + class MSDesc; // \ addtogroup BBS // @{ @@ -40,12 +42,14 @@ namespace LOFAR class MMapMSInfo { public: - // Create the object for given nr of correlations in MS - // and given size of one time slot (is #corr*#chan*#bl). - explicit MMapMSInfo (int nrCorr=0, int nrChan=0, int nrBL=0, - bool reverseChan=false); + MMapMSInfo() + {} + + // Create the object for the given MS description and dd (spw). + MMapMSInfo (const MSDesc& msdesc, uint ddid, bool reverseChan); // Set pointer to the mapped data chunk that is to be used next. + // It adds the offset to get the pointer to the wanted spw. // <group> void setInData (fcomplex* data) { itsInData = data; } @@ -53,9 +57,9 @@ public: { itsOutData = data; } // </group> - // Set the time step in the part mapped in. - void setTimes (int timeStep, int nrTimes) - { itsTimeStep = timeStep; itsNrTimes = nrTimes; } + // Set the time slot in the part mapped in. + void setTimes (int timeSlot, int nrTimes) + { itsTimeSlot = timeSlot; itsNrTimes = nrTimes; } // Get the info. // <group> @@ -69,16 +73,18 @@ public: { return itsNrTimes; } int timeSize() const { return itsTimeSize; } + int ddOffset() const + { return itsDDOffset; } int reverseChan() const { return itsReverseChan; } fcomplex* inData() const { return itsInData; } fcomplex* outData() const { return itsOutData; } - int timeStep() const - { return itsTimeStep; } + int timeSlot() const + { return itsTimeSlot; } int64 timeOffset() const - { return int64(itsTimeStep) * itsTimeSize; } + { return int64(itsTimeSlot) * itsTimeSize; } // </group> private: @@ -89,8 +95,9 @@ private: bool itsReverseChan; fcomplex* itsInData; fcomplex* itsOutData; - int itsTimeStep; + int itsTimeSlot; int itsNrTimes; + int itsDDOffset; //# Offset for the dd (spw) to process }; // @} diff --git a/CEP/BB/BBSKernel/src/MNS/MeqJonesMMap.cc b/CEP/BB/BBSKernel/src/MNS/MeqJonesMMap.cc index 7958a0917e20e55e9ac32d2bee6ace856cbf7a83..5d03a476713a48e55c79612c60afaac66ad289b3 100644 --- a/CEP/BB/BBSKernel/src/MNS/MeqJonesMMap.cc +++ b/CEP/BB/BBSKernel/src/MNS/MeqJonesMMap.cc @@ -28,7 +28,7 @@ namespace LOFAR { MeqJonesMMap::MeqJonesMMap (const MMapMSInfo& info, int blnr) : itsInfo (&info), - itsOffsetBL (int64(blnr) * info.nrChan() * info.nrCorr()) + itsOffsetBL (int64(blnr)*info.nrChan()*info.nrCorr() + info.ddOffset()) {} MeqJonesMMap::~MeqJonesMMap() diff --git a/CEP/BB/BBSKernel/src/Prediffer.cc b/CEP/BB/BBSKernel/src/Prediffer.cc index f0eec2d1d9196e15186f1d297e21aaf4500d4b9a..5008c0aa857ec4609c1113a80adb097b3523f2f6 100644 --- a/CEP/BB/BBSKernel/src/Prediffer.cc +++ b/CEP/BB/BBSKernel/src/Prediffer.cc @@ -97,6 +97,7 @@ namespace LOFAR Prediffer::Prediffer(const string& msName, const ParmDB::ParmDBMeta& meqPdm, const ParmDB::ParmDBMeta& skyPdm, + uint ddid, bool calcUVW) : itsMSName (msName), @@ -127,11 +128,8 @@ Prediffer::Prediffer(const string& msName, << itsCalcUVW << ")" ); // Read the meta data and map the flags file. readDescriptiveData (msName); - fillStations(); + processMSDesc (ddid); itsFlagsMap = new FlagsMap(msName + "/vis.flg", MMap::Read); - // Set the MS info. - itsMSMapInfo = MMapMSInfo (itsNCorr, itsNrChan, itsNrBl, - itsReverseChan); // Get all sources from the ParmDB. itsSources = new MeqSourceList(itsGSMMEP, itsParmGroup); // Create the UVW nodes and fill them with uvw-s from MS if not calculated. @@ -400,7 +398,7 @@ Prediffer::~Prediffer() MeqMatrixRealArr::poolDeactivate(); } -void Prediffer::readDescriptiveData(const string& fileName) +void Prediffer::readDescriptiveData (const string& fileName) { // Get meta data from description file. string name(fileName+"/vis.des"); @@ -409,12 +407,16 @@ void Prediffer::readDescriptiveData(const string& fileName) BlobIBufStream bbs(istr); BlobIStream bis(bbs); bis >> itsMSDesc; - ASSERTSTR (itsMSDesc.nchan.size() == 1, - "Multiple bands in MS cannot be handled"); +} + +void Prediffer::processMSDesc (uint ddid) +{ + ASSERT (ddid < itsMSDesc.nchan.size()); + // Set the observation info. itsNCorr = itsMSDesc.corrTypes.size(); - itsNrChan = itsMSDesc.nchan[0]; - itsStartFreq = itsMSDesc.startFreq[0]; - itsEndFreq = itsMSDesc.endFreq[0]; + itsNrChan = itsMSDesc.nchan[ddid]; + itsStartFreq = itsMSDesc.startFreq[ddid]; + itsEndFreq = itsMSDesc.endFreq[ddid]; itsStepFreq = (itsEndFreq - itsStartFreq)/itsNrChan; itsNrBl = itsMSDesc.ant1.size(); itsReverseChan = itsStartFreq > itsEndFreq; @@ -424,7 +426,12 @@ void Prediffer::readDescriptiveData(const string& fileName) itsStartFreq = tmp; itsStepFreq = std::abs(itsStepFreq); } - getPhaseRef(itsMSDesc.ra, itsMSDesc.dec, itsMSDesc.startTime); + // Set the MS info. + itsMSMapInfo = MMapMSInfo (itsMSDesc, ddid, itsReverseChan); + // Set the phase center info. + getPhaseRef (itsMSDesc.ra, itsMSDesc.dec, itsMSDesc.startTime); + // Set station info. + fillStations(); } void Prediffer::getPhaseRef(double ra, double dec, double startTime) @@ -993,7 +1000,8 @@ void Prediffer::processData (bool useFlags, bool preCalc, bool calcDeriv, int nrchan = itsLastChan-itsFirstChan+1; double startFreq = itsStartFreq + itsFirstChan*itsStepFreq; double endFreq = itsStartFreq + (itsLastChan+1)*itsStepFreq; - unsigned int freqOffset = itsFirstChan*itsNCorr; + // Add offset for dd (band) and channel. + unsigned int freqOffset = itsFirstChan*itsNCorr + itsMSMapInfo.ddOffset(); // Determine if perturbed values have to be calculated. int nrpert = calcDeriv ? itsNrPert:0; // Loop through the domain of the data to be processed. diff --git a/CEP/BB/BBSKernel/src/Prediffer.h b/CEP/BB/BBSKernel/src/Prediffer.h index e131218a43c7bf26b6b6403989127e8b3fb35368..3f4aeeb9d3393ca1cac2fc7d5b4406b38831df82 100644 --- a/CEP/BB/BBSKernel/src/Prediffer.h +++ b/CEP/BB/BBSKernel/src/Prediffer.h @@ -82,13 +82,12 @@ class Prediffer public: // Create Prediffer object for a specific // MeaurementSet, MEQ model (with associated MEP database) and skymodel - // for the specified data descriptor (i.e. spectral window) and antennas. - // The database type (aips or postgres) has to be given. - // For postgres the database name has to be given as well. - // The UVW coordinates can be recalculated or taken from the MS. + // for the specified data descriptor (i.e. spectral window). + // The UVW coordinates can be calculated or taken from the MS. Prediffer (const string& msName, const ParmDB::ParmDBMeta& meqPtd, const ParmDB::ParmDBMeta& skyPtd, + uint ddid, bool calcUVW); // Destructor @@ -199,6 +198,9 @@ private: // Get measurement set description from file void readDescriptiveData (const string& fileName); + // Process the MS description for the given dd (sectral window). + void Prediffer::processMSDesc (uint ddid); + // Get the phase reference position of the first field. void getPhaseRef (double ra, double dec, double startTime); diff --git a/CEP/BB/BBSKernel/test/tCorrect.cc b/CEP/BB/BBSKernel/test/tCorrect.cc index 4edf6b7138c305cf9e599c7f93fe190e5f231eb8..1cf7241401578bc2326da7d6ae1c432357089f58 100644 --- a/CEP/BB/BBSKernel/test/tCorrect.cc +++ b/CEP/BB/BBSKernel/test/tCorrect.cc @@ -67,7 +67,7 @@ int main (int argc, const char* argv[]) // Do a correct. { cout << "Starting correct test" << endl; - Prediffer pre1(argv[2], meqPdm, skyPdm, false); + Prediffer pre1(argv[2], meqPdm, skyPdm, 0, false); vector<int> antVec(100); for (uint i=0; i<antVec.size(); ++i) { antVec[i] = i; diff --git a/CEP/BB/BBSKernel/test/tMSData.cc b/CEP/BB/BBSKernel/test/tMSData.cc index 5ae59cfbe68bc1bfcf69a2031bb6ae2b65f94d14..415be31bb6253084b8fe61d9eead963d9e8a6955 100644 --- a/CEP/BB/BBSKernel/test/tMSData.cc +++ b/CEP/BB/BBSKernel/test/tMSData.cc @@ -43,7 +43,8 @@ using namespace casa; using namespace std; void doIt (const string& msName, Prediffer& prediff, const string& column, - int nrant, int stchan, int nrchan, bool useTree, bool useAutoCorr) + int spwid, int nrant, int stchan, int nrchan, + bool useTree, bool useAutoCorr) { cout << "Checking data in " << msName << " for channels " << stchan << '-' << stchan+nrchan-1 << endl; @@ -51,6 +52,7 @@ void doIt (const string& msName, Prediffer& prediff, const string& column, // Only use antenna < nrant. Table tab(msName); TableExprNode ten = tab.col("ANTENNA1")<nrant && tab.col("ANTENNA2")<nrant; + ten = ten && tab.col("DATA_DESC_ID")==spwid; if (!useAutoCorr) { ten = ten && (tab.col("ANTENNA1") != tab.col("ANTENNA2")); } @@ -97,8 +99,8 @@ void doIt (const string& msName, Prediffer& prediff, const string& column, int main(int argc, char** argv) { try { - if (argc < 7) { - cout << "Run as: tMSData ms user msname meqparmtable skyparmtable nrant [datacolumn]" << endl; + if (argc < 8) { + cout << "Run as: tMSData ms user msname meqparmtable skyparmtable spwid nrant [datacolumn]" << endl; cout << " datacolumn defaults to MODEL_DATA" << endl; return 0; } @@ -119,12 +121,15 @@ int main(int argc, char** argv) bis >> msd; } + uint spwid; + std::istringstream istr1(argv[6]); + istr1 >> spwid; uint nrant; - std::istringstream istr(argv[6]); - istr >> nrant; + std::istringstream istr2(argv[7]); + istr2 >> nrant; string column("MODEL_DATA"); - if (argc > 7) { - column = argv[7]; + if (argc > 8) { + column = argv[8]; } if (nrant > msd.antNames.size()) { nrant = msd.antNames.size(); @@ -135,16 +140,16 @@ int main(int argc, char** argv) for (uint i=0; i<nrant; ++i) { antVec[i] = i; } - Prediffer pre (argv[3], meqPdm, skyPdm, false); + Prediffer pre (argv[3], meqPdm, skyPdm, spwid, false); StrategyProp stratProp; stratProp.setAntennas (antVec); stratProp.setAutoCorr (true); ASSERT (pre.setStrategyProp (stratProp)); - doIt (argv[1], pre, column, nrant, 0, 50, false, true); - doIt (argv[1], pre, column, nrant, 10,10, false, false); - //doIt (argv[1], pre, column, nrant, 10,2, false, false); - doIt (argv[1], pre, column, nrant, 0, 50, true, false); - doIt (argv[1], pre, column, nrant, 10,11, true, true); + doIt (argv[1], pre, column, spwid, nrant, 0, 50, false, true); + doIt (argv[1], pre, column, spwid, nrant, 10,10, false, false); + //doIt (argv[1], pre, column, spwid, nrant, 10,2, false, false); + doIt (argv[1], pre, column, spwid, nrant, 0, 50, true, false); + doIt (argv[1], pre, column, spwid, nrant, 10,11, true, true); } catch (exception& x) { cout << "Unexpected expection: " << x.what() << endl; return 1; diff --git a/CEP/BB/BBSKernel/test/tMSData.run b/CEP/BB/BBSKernel/test/tMSData.run index 3e3f4740f83350d7e898024715cea490f96afe02..1174fd3feae6ec28f54197ae27921ebf4123103a 100755 --- a/CEP/BB/BBSKernel/test/tMSData.run +++ b/CEP/BB/BBSKernel/test/tMSData.run @@ -10,13 +10,48 @@ fi # Create the ParmDB tables for tMSData. $srcdir/makeDemoParmDB tMSData -$LOFAR_CHECKTOOL ./tMSData /data/PSS3/diepen/BBS2/demo3.MS $USER /data/PSS3/diepen/BBS2/demo3.MS_p1 tMSData_tmp.demo_instr tMSData_tmp.demo_sky 100 MODEL_DATA +echo "run1 ..." +$LOFAR_CHECKTOOL ./tMSData /data/PSS3/diepen/BBS2/demo3.MS $USER /data/PSS3/diepen/BBS2/demo3.MS_p1 tMSData_tmp.demo_instr tMSData_tmp.demo_sky 0 100 MODEL_DATA status=$? -$LOFAR_CHECKTOOL ./tMSData /data/PSS3/diepen/BBS2/3C343/10008336.MS $USER /data/PSS3/diepen/BBS2/3C343/10008336.MS_p1 tMSData_tmp.demo_instr tMSData_tmp.demo_sky 14 DATA +echo "run2 ..." +$LOFAR_CHECKTOOL ./tMSData /data/PSS3/diepen/BBS2/3C343/10008336.MS $USER /data/PSS3/diepen/BBS2/3C343/10008336.MS_p1 tMSData_tmp.demo_instr tMSData_tmp.demo_sky 0 14 DATA stat=$? if [ $stat != 0 ]; then status=$stat fi -exit $status +# Try to do a test with multiple bands by creating an MS with 2 bands.. +if [ ! -d $HOME/WSRT_ANTENNA ]; then + exit $status +fi +cat > makems.cfg << EOF +StartFreq=1170e6 +StepFreq=100000 +StartTime=2000/08/03/13:22:30 +StepTime=10 +RightAscension=16:38:28.205274248 +Declination=62.34.44.313606568 +NBands=2 +NFrequencies=100 +NTimes=14 +NParts=1 +WriteAutoCorr=T +AntennaTableName=$HOME/WSRT_ANTENNA +MSName=tMSData_tmp.MS +MSDesPath=. +EOF +makems +\rm -f makems.cfg +echo "run3 band 0 ..." +$LOFAR_CHECKTOOL ./tMSData tMSData_tmp.MS_p1 $USER tMSData_tmp.MS_p1 tMSData_tmp.demo_instr tMSData_tmp.demo_sky 0 14 DATA +stat=$? +if [ $stat != 0 ]; then + status=$stat +fi +echo "run3 band 1 ..." +$LOFAR_CHECKTOOL ./tMSData tMSData_tmp.MS_p1 $USER tMSData_tmp.MS_p1 tMSData_tmp.demo_instr tMSData_tmp.demo_sky 1 14 DATA +stat=$? +if [ $stat != 0 ]; then + status=$stat +fi diff --git a/CEP/BB/BBSKernel/test/tPerturbed.cc b/CEP/BB/BBSKernel/test/tPerturbed.cc index 001fbf798af91a8de62f623f2e42b1c397482cc3..4462c4f9e6861ec467b97998dbbf7a1377ef4706 100644 --- a/CEP/BB/BBSKernel/test/tPerturbed.cc +++ b/CEP/BB/BBSKernel/test/tPerturbed.cc @@ -147,7 +147,7 @@ int main (int argc, const char* argv[]) // Read the info for the ParmTables ParmDB::ParmDBMeta meqPdm("aips", argv[3]); ParmDB::ParmDBMeta skyPdm("aips", argv[4]); - Prediffer pre1(argv[2], meqPdm, skyPdm, false); + Prediffer pre1(argv[2], meqPdm, skyPdm, 0, false); // Do a solve using the model and a few stations. { diff --git a/CEP/BB/BBSKernel/test/tPredSolv.cc b/CEP/BB/BBSKernel/test/tPredSolv.cc index dc3a0a103df31b4561a7d900f98ef19c6956caf5..ce30640d5e9177464bfc649f0550c00d2e323afd 100644 --- a/CEP/BB/BBSKernel/test/tPredSolv.cc +++ b/CEP/BB/BBSKernel/test/tPredSolv.cc @@ -197,7 +197,7 @@ int main (int argc, const char* argv[]) // Do a solve for RA using a few stations. { cout << "Starting first test" << endl; - Prediffer pre1(argv[2], meqPdm, skyPdm, false); + Prediffer pre1(argv[2], meqPdm, skyPdm, 0, false); vector<int> antVec(10); for (uint i=0; i<antVec.size(); ++i) { antVec[i] = 2*i; @@ -229,8 +229,8 @@ int main (int argc, const char* argv[]) // Do a solve using 2 prediffers. { cout << "Starting test with two prediffers" << endl; - Prediffer pre1(argv[2], meqPdm, skyPdm, false); - Prediffer pre2(argv[2], meqPdm, skyPdm, false); + Prediffer pre1(argv[2], meqPdm, skyPdm, 0, false); + Prediffer pre2(argv[2], meqPdm, skyPdm, 0, false); vector<int> antVec(10); for (uint i=0; i<antVec.size(); ++i) { antVec[i] = 2*i; @@ -263,7 +263,7 @@ int main (int argc, const char* argv[]) // Take more baselines. { cout << "Starting test with 21 antennas" << endl; - Prediffer pre1(argv[2], meqPdm, skyPdm, false); + Prediffer pre1(argv[2], meqPdm, skyPdm, 0, false); vector<int> antVec(21); for (uint i=0; i<antVec.size(); ++i) { antVec[i] = 4*i; @@ -292,7 +292,7 @@ int main (int argc, const char* argv[]) // This should be the last one. { cout << "Starting test with updating parmtable" << endl; - Prediffer pre1(argv[2], meqPdm, skyPdm, false); + Prediffer pre1(argv[2], meqPdm, skyPdm, 0, false); vector<int> antVec(10); for (uint i=0; i<antVec.size(); ++i) { antVec[i] = 2*i; diff --git a/CEP/BB/BBSKernel/test/tPredict.cc b/CEP/BB/BBSKernel/test/tPredict.cc index 1a0e60d2281ddc33ef1f1fe23f6b9dfc3c06ab51..b841cf803c3bfd07f029171a3adb938e8c468d5d 100644 --- a/CEP/BB/BBSKernel/test/tPredict.cc +++ b/CEP/BB/BBSKernel/test/tPredict.cc @@ -63,7 +63,7 @@ int main (int argc, const char* argv[]) // Read the info for the ParmTables ParmDB::ParmDBMeta meqPdm("aips", argv[3]); ParmDB::ParmDBMeta skyPdm("aips", argv[4]); - Prediffer pre1(argv[2], meqPdm, skyPdm, false); + Prediffer pre1(argv[2], meqPdm, skyPdm, 0, false); // Do a predict. { diff --git a/CEP/BB/BBSKernel/test/tSubtract.cc b/CEP/BB/BBSKernel/test/tSubtract.cc index a2699c62a1fbb2e364c6f34082b3aaa774df5ab2..6f550bc9d1cb554a7ea7efd494497dd4f8606fa2 100644 --- a/CEP/BB/BBSKernel/test/tSubtract.cc +++ b/CEP/BB/BBSKernel/test/tSubtract.cc @@ -67,7 +67,7 @@ int main (int argc, const char* argv[]) // Do a subtract. { cout << "Starting subtract test" << endl; - Prediffer pre1(argv[2], meqPdm, skyPdm, false); + Prediffer pre1(argv[2], meqPdm, skyPdm, 0, false); vector<int> antVec(100); for (uint i=0; i<antVec.size(); ++i) { antVec[i] = i;