28 #include <QtCore/QDateTime>
29 #include <QtCore/QDir>
30 #include <QtCore/QFile>
31 #include <QtCore/QFileInfo>
32 #include <QtCore/QList>
33 #include <QtCore/QMap>
34 #include <QtCore/QTextStream>
35 #include <QtCore/QVector>
50 #ifdef HAVE_MK4_DATA_H
54 #define T230_VERSION 0
55 #include <hops/mk4_data.h>
60 #ifdef HAVE_MK4_DFIO_H
63 #include <hops/mk4_dfio.h>
71 # define FALSE_SAVED FALSE
75 # define TRUE_SAVED TRUE
80 #include <hops/mk4_vex.h>
84 # define FALSE FALSE_SAVED
89 # define TRUE TRUE_SAVED
113 #if !defined HAVE_MK4_DATA_H || !defined HAVE_MK4_DFIO_H || !defined HAVE_MK4_VEX_H
117 std::cout <<
"HOPS were not found.\n";
119 "::getDataFromFringeFiles(): cannot read fringe files, the software was compiled without HOPS "
135 const QMap<QString, QString>&, QString&)
143 const VexInfo&,
const QString&,
const QMap<QString, QString>&,
const QMap<QString, QString>&,
144 const QMap<QString, QString>&,
const QMap<QString, QString>&,
const QMap<QString, QString>&,
145 const QMap<QString, int>&,
int&)
169 QString polarization_;
170 double sky_frequency_;
171 QString net_sideband_;
181 QString if_sideband_;
183 ChannelInfo(
const ChannelInfo& ci);
184 ChannelInfo& operator=(
const ChannelInfo& ci);
187 ChannelInfo::ChannelInfo() :
199 sky_frequency_ = -1.0;
204 ChannelInfo::ChannelInfo(
const ChannelInfo& ci)
207 polarization_ = ci.polarization_;
208 sky_frequency_ = ci.sky_frequency_;
209 net_sideband_ = ci.net_sideband_;
210 bandwidth_ = ci.bandwidth_;
211 band_id_ = ci.band_id_;
212 chan_id_ = ci.chan_id_;
213 bbc_id_ = ci.bbc_id_;
214 pcal_id_ = ci.pcal_id_;
216 bbc_no_ = ci.bbc_no_;
217 if_name_ = ci.if_name_;
218 if_total_lo_ = ci.if_total_lo_;
219 if_sideband_ = ci.if_sideband_;
221 ChannelInfo& ChannelInfo::operator=(
const ChannelInfo& ci)
224 polarization_ = ci.polarization_;
225 sky_frequency_ = ci.sky_frequency_;
226 net_sideband_ = ci.net_sideband_;
227 bandwidth_ = ci.bandwidth_;
228 band_id_ = ci.band_id_;
229 chan_id_ = ci.chan_id_;
230 bbc_id_ = ci.bbc_id_;
231 pcal_id_ = ci.pcal_id_;
233 bbc_no_ = ci.bbc_no_;
234 if_name_ = ci.if_name_;
235 if_total_lo_ = ci.if_total_lo_;
236 if_sideband_ = ci.if_sideband_;
251 QMap<QString, ChannelInfo> channelByName_;
253 StationInfo(
const StationInfo& si);
254 StationInfo& operator=(
const StationInfo& si);
257 StationInfo::StationInfo() :
269 StationInfo::StationInfo(
const StationInfo& si) :
271 id_2char_(si.id_2char_),
272 id_1char_(si.id_1char_),
275 recorderType_ = si.recorderType_;
276 trackFormat_ = si.trackFormat_;
277 bits_sample_ = si.bits_sample_;
278 sampleRate_ = si.sampleRate_;
279 channelByName_.clear();
280 for (QMap<QString, ChannelInfo>::const_iterator it=si.channelByName_.begin();
281 it!=si.channelByName_.end(); ++it)
282 channelByName_.insert(it.key(), it.value());
284 StationInfo& StationInfo::operator=(
const StationInfo& si)
287 id_2char_ = si.id_2char_;
288 id_1char_ = si.id_1char_;
289 recorderType_ = si.recorderType_;
290 trackFormat_ = si.trackFormat_;
291 bits_sample_ = si.bits_sample_;
292 sampleRate_ = si.sampleRate_;
293 channelByName_.clear();
294 for (QMap<QString, ChannelInfo>::const_iterator it=si.channelByName_.begin();
295 it!=si.channelByName_.end(); ++it)
296 channelByName_.insert(it.key(), it.value());
309 VexInfo(
const VexInfo& vi);
310 VexInfo& operator=(
const VexInfo& vi);
313 VexInfo::VexInfo() : expName_(
"")
318 VexInfo::VexInfo(
const VexInfo& vi)
322 VexInfo& VexInfo::operator=(
const VexInfo& vi)
324 sampleRate_ = vi.sampleRate_;
325 apLength_ = vi.apLength_;
326 expName_ = vi.expName_;
334 struct FringeFileName
343 inline FringeFileName(
const FringeFileName& fn) {*
this = fn;};
344 FringeFileName(
const QString fileName);
345 QString fileName()
const
346 {
return isOk_?(baselineId_ +
"." + bandId_ +
"." + sequenceId_ +
"." + rootCodeId_):
"";};
348 {
return isOk_?(baselineId_ +
"." + bandId_):
"";};
349 FringeFileName& operator=(
const FringeFileName& fn);
352 FringeFileName::FringeFileName() : baselineId_(
""), bandId_(
""), sequenceId_(
""), rootCodeId_(
"")
358 FringeFileName::FringeFileName(
const QString fileName) :
359 baselineId_(
""), bandId_(
""), sequenceId_(
""), rootCodeId_(
"")
363 QStringList itemList=fileName.split(
'.');
364 if (itemList.size() == 4)
366 baselineId_ = itemList.at(0);
367 bandId_ = itemList.at(1);
368 sequenceId_ = itemList.at(2);
369 rootCodeId_ = itemList.at(3);
370 if (baselineId_.size()==2 && baselineId_.at(0)!=baselineId_.at(1) &&
371 bandId_.size()==1 && sequenceId_.size()>0 && rootCodeId_.size()>0)
372 sequenceNumber_ = sequenceId_.toInt(&isOk_);
376 FringeFileName& FringeFileName::operator=(
const FringeFileName& fn)
378 baselineId_ = fn.baselineId_;
379 bandId_ = fn.bandId_;
380 sequenceId_ = fn.sequenceId_;
381 rootCodeId_ = fn.rootCodeId_;
383 sequenceNumber_ = fn.sequenceNumber_;
392 class FringeFileMap :
public QMap<QString, FringeFileName>
395 inline FringeFileMap() : QMap<QString, FringeFileName>() {};
396 inline ~FringeFileMap() {clear();};
397 void registerFileName(
const QString fileName);
400 void FringeFileMap::registerFileName(
const QString fileName)
402 FringeFileName ffName(fileName);
405 if (contains(ffName.id()))
407 if (value(ffName.id()).sequenceNumber_ < ffName.sequenceNumber_)
410 "FringeFileMap::registerFileName(): the fringe file name " +
411 (*
this)[ffName.id()].fileName() +
" is being replaced by " + ffName.fileName());
412 (*this)[ffName.id()] = ffName;
417 insert(ffName.id(), ffName);
425 struct CorelRootFileName
431 CorelRootFileName(
const QString fileName);
432 inline CorelRootFileName(
const CorelRootFileName& cr) {*
this = cr;};
434 QString fileName()
const
435 {
return isOk_?(sourceId_ +
"." + rootCodeId_):
"";};
436 CorelRootFileName& operator=(
const CorelRootFileName& cr);
439 CorelRootFileName::CorelRootFileName() : sourceId_(
""), rootCodeId_(
"")
444 CorelRootFileName::CorelRootFileName(
const QString fileName) :
445 sourceId_(
""), rootCodeId_(
"")
448 QStringList itemList=fileName.split(
'.');
449 if (itemList.size() == 2)
451 sourceId_ = itemList.at(0);
452 rootCodeId_ = itemList.at(1);
457 CorelRootFileName& CorelRootFileName::operator=(
const CorelRootFileName& cr)
459 sourceId_ = cr.sourceId_;
460 rootCodeId_ = cr.rootCodeId_;
482 const QString& altDatabaseName,
const QString& altCorrelatorName,
483 const QString& historyFileName,
const QString& mapFileName,
486 bool isOk=
false, isScanDirOk;
490 QRegExp reScanDirName(
"[0-9]{3}-[0-9]{4}[a-zA-Z]{0,1}");
495 FringeFileMap scanFileNames;
496 QMap<QString, CorelRootFileName>
498 QString sPiName, sExperDescr;
499 QMap<QString, int> piNamesByCount, expDescrsByCount, expNameByCount;
500 QMap<int, int> expSerialNumByCount;
501 QString correlatorComments(historyFileName);
502 QString correlatorName(
"");
503 QMap<QString, QString> stnNameById, stnNameByI;
506 QMap<QString, QString>
stn2stn;
507 QMap<QString, QString>
src2src;
508 QMap<QString, QString> bnd2bnd;
509 QMap<QString, int> fringeErrorCodeByInt;
510 QMap<QString, int> corrNameByCount;
513 dirList = dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot, QDir::Name);
514 if (dirList.size() == 0)
517 "::getDataFromFringeFiles(): nothing to read");
526 "::getDataFromFringeFiles(): loaded " + QString(
"").setNum(
stn2stn.size()) +
527 " entries for station name maps");
530 "::getDataFromFringeFiles(): loaded " + QString(
"").setNum(
src2src.size()) +
531 " entries for source name maps");
534 "::getDataFromFringeFiles(): loaded " + QString(
"").setNum(bnd2bnd.size()) +
535 " entries for bnd name maps");
536 if (fringeErrorCodes2Skip.size())
538 for (
int i=0; i<fringeErrorCodes2Skip.size(); i++)
539 fringeErrorCodeByInt.insert(fringeErrorCodes2Skip.at(i), 1);
543 for (
int i=0; i<dirList.size(); i++)
544 dirsOfScans << dirList.at(i);
547 "::getDataFromFringeFiles(): filtered " + QString(
"").setNum(dirsOfScans.size()) +
548 " scan entries from " + QString(
"").setNum(dirList.size()) +
" total number of directories");
552 for (
int i=0; i<dirsOfScans.size(); i++)
554 const QString &inDirName=dirsOfScans.at(i);
555 CorelRootFileName croot;
557 dir.setPath(path2data +
"/" + inDirName);
559 dirList = dir.entryList(QDir::Files | QDir::NoDotAndDotDot | QDir::Readable, QDir::Name);
562 "::getDataFromFringeFiles(): processing directory '" + dir.path() +
"'");
565 scanFileNames.clear();
569 QStringList listOfVexFiles;
570 for (
int j=0; j<dirList.size(); j++)
572 const QString &fileName=dirList.at(j);
577 CorelRootFileName croot(fileName);
580 if (!crootById.contains(croot.rootCodeId_))
581 crootById.insert(croot.rootCodeId_, croot);
584 "::getDataFromFringeFiles(): the croot file " + fileName +
" with crootId '" +
585 croot.rootCodeId_ +
"' already registered as '" +
586 crootById.value(croot.rootCodeId_).fileName() +
"'");
593 scanFileNames.registerFileName(fileName);
596 if (crootById.size() < 1)
599 "::getDataFromFringeFiles(): cannot find any VEX file in the directory " + dir.path() +
603 if (scanFileNames.size() < 1)
606 "::getDataFromFringeFiles(): cannot find any usable fringe file in the directory " +
607 dir.path() +
", skipped");
613 QMap<QString, QMap<QString, StationInfo> >
615 QMap<QString, VexInfo> vexInfoById;
618 for (QMap<QString, CorelRootFileName>::iterator it=crootById.begin(); it!=crootById.end(); ++it)
621 QMap<QString, StationInfo>
623 const QString &vexFileName=it.value().fileName();
628 if (correlatorName ==
"difx" || correlatorName ==
"sfxc")
630 vexInfoById.insert(it.key(), vi);
631 stnInfoByNameById.insert(it.key(), stnInfoByName);
634 for (QMap<QString, StationInfo>::iterator it=stnInfoByName.begin();
635 it!=stnInfoByName.end(); ++it)
637 const QString& stnName=it.value().name_;
638 const QString& stn2chrId=it.value().id_2char_;
639 const QString& stn1chrId=it.value().id_1char_;
641 if (stnNameById.contains(stn2chrId))
643 if (stnNameById.value(stn2chrId) != stnName)
646 "::getDataFromFringeFiles(): -------------------------------------------");
648 "::getDataFromFringeFiles(): the croot file " + inDirName +
"/" + vexFileName +
649 " contains station identities that missmatch previous data:");
651 "::getDataFromFringeFiles(): " + stnNameById.value(stn2chrId) +
"[" +
652 stn2chrId +
"] != " + stnName);
654 "::getDataFromFringeFiles(): -------------------------------------------");
658 stnNameById.insert(stn2chrId, stnName);
660 if (stnNameByI.contains(stn1chrId))
662 if (stnNameByI.value(stn1chrId) != stnName)
665 "::getDataFromFringeFiles(): -------------------------------------------");
667 "::getDataFromFringeFiles(): the croot file " + inDirName +
"/" + vexFileName +
668 " contains station identities that missmatch previous data:");
670 "::getDataFromFringeFiles(): " + stnNameByI.value(stn1chrId) +
"[" +
671 stn1chrId +
"] != " + stnName);
673 "::getDataFromFringeFiles(): -------------------------------------------");
677 stnNameByI.insert(stn1chrId, stnName);
680 parseVexFile(dir.path() +
"/" + vexFileName, sPiName, sExperDescr);
682 piNamesByCount[sPiName]++;
683 expDescrsByCount[sExperDescr]++;
684 expNameByCount[vi.expName_]++;
685 corrNameByCount[correlatorName]++;
687 "::getDataFromFringeFiles(): the corel.root file " + vexFileName +
" has been processed");
709 for (QMap<QString, FringeFileName>::iterator jt=scanFileNames.begin(); jt!=scanFileNames.end();
712 FringeFileName &ffn=jt.value();
713 const QString &crootId=ffn.rootCodeId_;
715 if (!(crootById.contains(crootId) && vexInfoById.contains(crootId) &&
716 stnInfoByNameById.contains(crootId)))
718 "::getDataFromFringeFiles(): cannot find a corel.root file for the fringe file '" +
719 ffn.fileName() +
"' with rootId=[" + crootId +
"], skipped");
724 vexInfoById.value(crootId), crootById.value(crootId).fileName(), stnNameById, stnNameByI,
726 expSerialNumByCount[sn]++;
739 "::getDataFromFringeFiles(): nothing useful found");
752 if (piNamesByCount.count() == 1)
754 if (piNamesByCount.begin().key().size())
759 "::getDataFromFringeFiles(): session P.I agency name was set to " +
getPiAgencyName());
766 "::getDataFromFringeFiles(): more than one PI agency names collected:");
767 for (QMap<QString, int>::iterator itt=piNamesByCount.begin(); itt!=piNamesByCount.end(); ++itt)
769 "::getDataFromFringeFiles(): \"" + itt.key() +
"\" => " + QString(
"").setNum(itt.value()));
771 if (expNameByCount.count() == 1)
773 if (expNameByCount.begin().key().size())
778 "::getDataFromFringeFiles(): session code was set to " +
getSessionCode());
785 "::getDataFromFringeFiles(): more than one experiment name found:");
786 for (QMap<QString, int>::iterator itt=expNameByCount.begin(); itt!=expNameByCount.end(); ++itt)
788 "::getDataFromFringeFiles(): \"" + itt.key() +
"\" => " + QString(
"").setNum(itt.value()));
790 if (expDescrsByCount.count() == 1)
792 if (expDescrsByCount.begin().key().size())
797 "::getDataFromFringeFiles(): session description was set to " +
getDescription());
804 "::getDataFromFringeFiles(): more than one experiment description found:");
805 for (QMap<QString, int>::iterator itt=expDescrsByCount.begin(); itt!=expDescrsByCount.end(); ++itt)
807 "::getDataFromFringeFiles(): \"" + itt.key() +
"\" => " + QString(
"").setNum(itt.value()));
812 if (expSerialNumByCount.count() == 1)
815 n = expSerialNumByCount.begin().key();
820 "::getDataFromFringeFiles(): session serial number was set to " +
825 "::getDataFromFringeFiles(): the observations do not have correct experiment serial number " +
826 QString(
"").sprintf(
"(==%d)", n));
832 "::getDataFromFringeFiles(): more than one experiment serial number found:");
833 for (QMap<int, int>::iterator it=expSerialNumByCount.begin(); it!=expSerialNumByCount.end(); ++it)
835 "::getDataFromFringeFiles(): " + QString(
"").sprintf(
"%d -> %d times", it.key(), it.value()));
838 if (corrNameByCount.count() == 1)
840 if (corrNameByCount.begin().key().size())
844 "::getDataFromFringeFiles(): correlator name was set to \"" +
getCorrelatorName() +
"\"");
850 "::getDataFromFringeFiles(): cannot find correlator name in the vex files");
858 "::getDataFromFringeFiles(): more than one correlator name collected:");
859 for (QMap<QString, int>::iterator itt=corrNameByCount.begin(); itt!=corrNameByCount.end(); ++itt)
861 "::getDataFromFringeFiles(): \"" + itt.key() +
"\" => " + QString(
"").setNum(itt.value()));
864 if (altCorrelatorName.size())
868 "::getDataFromFringeFiles(): correlator name was explicitly set to \"" + altCorrelatorName +
"\"");
871 if (altDatabaseName.size() == 9)
879 "::getDataFromFringeFiles(): database name was explicitly set to " + altDatabaseName);
881 else if (altDatabaseName.size() && altDatabaseName.size()!=9)
883 "::getDataFromFringeFiles(): the provided database name, " + altDatabaseName +
887 QMap<double, SgVlbiBand*> bandByFreq;
889 for (
int i=0; i<
bands_.size(); i++)
892 QString bandKey=band->
getKey();
906 "::getDataFromFringeFiles(): cannot set up a frequency for " + bandKey +
"-band");
910 "::getDataFromFringeFiles(): the frequency " + QString(
"").setNum(band->
getFrequency()) +
911 " is already registered");
920 if (correlatorComments.size()==0)
922 dir.setPath(path2data +
"/../control/");
926 "::getDataFromFringeFiles(): cannot get correlator comments, the directory does not exist: " +
931 dirList = dir.entryList(QStringList() <<
"*.corr",
932 QDir::Files | QDir::NoDotAndDotDot | QDir::Readable, QDir::Name);
933 if (dirList.size() == 0)
936 "::getDataFromFringeFiles(): cannot get correlator comments, no any *.corr file found: " +
939 else if (dirList.size() > 1)
942 "::getDataFromFringeFiles(): found more than one file with correlator comments:");
943 for (
int j=0; j<dirList.size(); j++)
945 "::getDataFromFringeFiles(): " + dirList.at(j));
948 "::getDataFromFringeFiles(): picked up this one: " + str);
954 correlatorComments = path2data +
"/../control/" + str;
956 if (correlatorComments.size())
960 for (
int i=0; i<
bands_.size(); i++)
962 bands_.at(i)->history().addHistoryRecord(
"== The correlator report was not provided. ==",
967 "::getDataFromFringeFiles(): the correlator report was not provided.");
973 QString primeBandKey;
977 "::getDataFromFringeFiles(): importing typical IVS session");
983 "::getDataFromFringeFiles(): importing a foreign session setup");
984 if (bandByFreq.size() > 1)
1001 "::getDataFromFringeFiles(): the observation " + obs->
getKey() +
1002 " of the scan " + obs->
getScanName() +
" is being removed from the data set");
1014 "::getDataFromFringeFiles(): " + QString(
"").setNum(num) +
1015 " second-band-only observation" + (num==1?
" was":
"s were") +
" removed");
1024 "::getDataFromFringeFiles(): session selfcheck complete");
1028 "::getDataFromFringeFiles(): the selfcheck for the session failed");
1036 for (QMap<QString, SgVlbiObservable*>::iterator it=obs->
observableByKey().begin();
1044 "::getDataFromFringeFiles(): phase cal delays were calculated");
1050 "::getDataFromFringeFiles(): cannot get the experiment serial number");
1061 QFile f(vexFileName);
1063 bool foundPiName, foundExpDescr;
1065 QRegExp reExpDescr(
"^\\s*exper_description\\s*=\\s*\"?(\\S+.*\\S+)\"?;$");
1066 QRegExp rePiName(
"^\\s*PI_name\\s*=\\s*(\\S+);");
1069 foundPiName = foundExpDescr =
false;
1070 if (f.open(QFile::ReadOnly))
1074 while (!s.atEnd() && !(foundPiName && foundExpDescr))
1077 if (str.contains(reExpDescr))
1079 sExpDescr = reExpDescr.cap(1);
1080 if (sExpDescr.at(0) ==
'\"')
1081 sExpDescr.remove(0,1);
1082 if (sExpDescr.at(sExpDescr.size()-1) ==
'\"')
1084 foundExpDescr =
true;
1086 else if (str.contains(rePiName))
1088 sPiName = rePiName.cap(1);
1094 "::parseVexFile(): PI Name was not found; the file is " + vexFileName);
1097 "::parseVexFile(): Experiment Description was not found; the file is " + vexFileName);
1104 "::parseVexFile(): cannot open a file " + vexFileName +
" for reading");
1111 VexInfo& vi,
const QMap<QString, QString>&
stn2stn, QString& correlatorName)
1114 QString path2textFiles(PATH_2_HOPS_SHARE);
1116 have2clearEnv =
false;
1117 if (!getenv(
"TEXT"))
1119 path2textFiles += QString(
"/text");
1120 setenv(
"TEXT", qPrintable(path2textFiles), 0);
1121 have2clearEnv =
true;
1123 "::processVexFile(): the env.variable TEXT was set to " + path2textFiles);
1128 char vexkey[2]={0,0};
1131 scan_struct *scan=NULL;
1132 evex_struct *evex=NULL;
1133 *vexRoot.filename = 0;
1135 filename =
new char[vexFileName.size() + 1];
1136 strcpy(filename, qPrintable(vexFileName));
1138 if ((rc=get_vex(filename, OVEX | EVEX | IVEX | LVEX, vexkey, &vexRoot)) != 0)
1141 "::processVexFile(): cannot get_vex the file " + vexFileName +
"; RC=" + QString(
"").setNum(rc));
1143 else if (!(scan=vexRoot.ovex))
1146 "::processVexFile(): the ovex struct is NULL");
1148 else if (!(evex=vexRoot.evex))
1151 "::processVexFile(): the evex struct is NULL");
1155 QString sScanName(
"");
1156 QString sSrcName(
"");
1159 vi.expName_ = scan->exper_name;
1160 vi.apLength_ = evex->ap_length;
1162 stationByName.clear();
1168 source_struct &src=scan->src;
1169 sScanName = scan->scan_name;
1170 correlatorName = scan->correlator;
1171 sSrcName = src.source_name;
1172 numStns = scan->nst;
1173 for (
int i=0; i<numStns; i++)
1175 station_struct &stn=scan->st[i];
1176 int maxNumChannels=
sizeof(stn.channels)/
sizeof(chan_struct);
1177 StationInfo station;
1178 station.name_.sprintf(
"%-8s", stn.site_name);
1182 station.name_ =
stn2stn.value(station.name_);
1184 "::processVexFile(): the input station name \"" + stn.site_name +
"\" has been mapped to \"" +
1185 station.name_ +
"\"");
1187 station.id_2char_ = stn.site_id;
1188 station.id_1char_ = stn.mk4_site_id;
1189 if (stn.recorder_type != I_UNDEFINED)
1190 station.recorderType_ = stn.recorder_type;
1191 else if (stn.rack_type != I_UNDEFINED)
1192 station.recorderType_ = stn.rack_type;
1193 if (stn.track_format != I_UNDEFINED)
1194 station.trackFormat_ = stn.track_format;
1195 if (stn.bits_sample != I_UNDEFINED)
1196 station.bits_sample_ = stn.bits_sample;
1197 if (stn.samplerate != F_UNDEFINED)
1198 station.sampleRate_ = stn.samplerate;
1199 for (
int j=0; j<maxNumChannels; j++)
1201 chan_struct &chan=stn.channels[j];
1202 if (chan.sky_frequency > 1.0e3)
1204 ChannelInfo channel;
1205 channel.name_ = chan.chan_name;
1206 channel.polarization_ = chan.polarization;
1207 channel.sky_frequency_ = chan.sky_frequency;
1208 channel.net_sideband_ = chan.net_sideband;
1209 channel.bandwidth_ = chan.bandwidth;
1210 channel.band_id_ = chan.band_id;
1211 channel.chan_id_ = chan.chan_id;
1212 channel.bbc_id_ = chan.bbc_id;
1213 channel.pcal_id_ = chan.pcal_id;
1214 channel.if_id_ = chan.if_id;
1215 channel.bbc_no_ = chan.bbc_no;
1216 channel.if_name_ = chan.if_name;
1217 channel.if_total_lo_ = chan.if_total_lo;
1218 channel.if_sideband_ = chan.if_sideband;
1219 station.channelByName_[channel.name_] = channel;
1222 if (stationByName.contains(station.name_))
1224 "::processVexFile(): got a duplicate record for the station \"" + station.name_ +
"\"");
1225 stationByName[station.name_] = station;
1239 const QMap<QString, StationInfo>& stnsInfo,
const VexInfo& vexInfo,
const QString& vexFileName,
1240 const QMap<QString, QString>& stnNameById,
const QMap<QString, QString>& stnNameByI,
1241 const QMap<QString, QString>&
stn2stn,
const QMap<QString, QString>&
src2src,
1242 const QMap<QString, QString>& bnd2bnd,
const QMap<QString, int>& fringeErrorCodeByInt,
1243 int& expSerialNumber)
1249 QString bandKey(
"");
1250 QRegExp reBandName(
"^(\\S*)([0-9a-zA-Z]{2})\\.([a-zA-Z]{1})\\."
1251 "\\d+\\.([0-9a-zA-Z]{5,7})$");
1254 str = path2file +
"/" + fringeFileName;
1255 filename =
new char[str.size() + 1];
1256 strcpy(filename, qPrintable(str));
1258 if (fringeFileName.contains(reBandName))
1260 bandKey = reBandName.cap(3);
1269 "::processFringeFile(): skipping the observation " + fringeFileName +
1270 ": the band \"" + bandKey +
"\" have to be skipped");
1271 clear_mk4fringe(&fringe);
1277 if ((rc=read_mk4fringe(filename, &fringe)) != 0)
1280 "::processFringeFile(): cannot read_mk4fringe the file " + str +
1281 "; RC=" + QString(
"").setNum(rc));
1283 else if (!bandKey.size())
1286 "::processFringeFile(): cannot figure out a name of band from the file name " + str);
1290 type_200 *t200=fringe.t200;
1291 type_201 *t201=fringe.t201;
1292 type_202 *t202=fringe.t202;
1293 type_203 *t203=fringe.t203;
1294 type_204 *t204=fringe.t204;
1295 type_205 *t205=fringe.t205;
1296 type_206 *t206=fringe.t206;
1297 type_207 *t207=fringe.t207;
1298 type_208 *t208=fringe.t208;
1299 type_210 *t210=fringe.t210;
1302 if (fringeErrorCodeByInt.size() && t208->errcode !=
' ')
1304 if (fringeErrorCodeByInt.contains(
"*") ||
1305 fringeErrorCodeByInt.contains(QString(t208->errcode)))
1308 "::processFringeFile(): skipping the observation " + fringeFileName +
1309 ": the fringe error code is \"" + QString(t208->errcode) +
"\"");
1310 clear_mk4fringe(&fringe);
1332 QString station1Name, station2Name, sourceName, baselineName;
1333 QString scanName, scanId, obsKey;
1347 bool isSbdSigmaNan, isSbdSigmaInf;
1348 bool isGrdSigmaNan, isGrdSigmaInf;
1349 bool isPhrSigmaNan, isPhrSigmaInf;
1351 char buff1[32], buff2[32];
1353 double effFreq4GR=0.0, effFreq4PH=0.0, effFreq4RT=0.0;
1366 epoch.
setUpEpoch(t200->frt.year, 0, t200->frt.day,
1367 t200->frt.hour, t200->frt.minute, t200->frt.second);
1371 memset(buff1, 0, 32);
1372 memset(buff2, 0, 32);
1373 strncpy(buff1, t202->ref_name, 8);
1374 strncpy(buff2, t202->rem_name, 8);
1375 station1Name.sprintf(
"%-8s", buff1);
1376 station2Name.sprintf(
"%-8s", buff2);
1377 sourceName .sprintf(
"%-8s", t201->source);
1385 "::processFringeFile(): skipping the observation " + fringeFileName +
1386 ": the station \"" + station1Name +
"\" have to be skipped");
1387 clear_mk4fringe(&fringe);
1394 "::processFringeFile(): skipping the observation " + fringeFileName +
1395 ": the station \"" + station2Name +
"\" have to be skipped");
1396 clear_mk4fringe(&fringe);
1406 "::processFringeFile(): skipping the observation " + fringeFileName +
1407 ": the source \"" + sourceName +
"\" have to be skipped");
1408 clear_mk4fringe(&fringe);
1417 str = QString(t202->baseline[0]);
1418 if (!stnNameByI.contains(str))
1421 "::processFringeFile(): cannot find a station for ref one-char id '" + str +
"'");
1422 clear_mk4fringe(&fringe);
1426 else if (stnNameByI.value(str) != station1Name)
1429 "::processFringeFile(): the file '" + filename +
"' contains wrong station identities: " +
1430 station1Name +
" instead of " + stnNameByI.value(str) +
" with CId='" + str +
"'");
1431 clear_mk4fringe(&fringe);
1435 str = QString(t202->baseline[1]);
1436 if (!stnNameByI.contains(str))
1439 "::processFringeFile(): cannot find a station for rem one-char id '" + str +
"'");
1440 clear_mk4fringe(&fringe);
1444 else if (stnNameByI.value(str) != station2Name)
1447 "::processFringeFile(): the file '" + filename +
"' contains wrong station identities: " +
1448 station2Name +
" instead of " + stnNameByI.value(str) +
" with CId='" + str +
"'");
1449 clear_mk4fringe(&fringe);
1454 str = QString(t202->ref_intl_id[0]);
1455 str += QString(t202->ref_intl_id[1]);
1456 if (!stnNameById.contains(str))
1459 "::processFringeFile(): cannot find a station for two-char id '" + str +
"'");
1460 clear_mk4fringe(&fringe);
1464 else if (stnNameById.value(str) != station1Name)
1467 "::processFringeFile(): the file '" + filename +
"' contains wrong station identities: " +
1468 station1Name +
" instead of " + stnNameById.value(str) +
" with SId='" + str +
"'");
1469 clear_mk4fringe(&fringe);
1473 str = QString(t202->rem_intl_id[0]);
1474 str += QString(t202->rem_intl_id[1]);
1475 if (!stnNameById.contains(str))
1478 "::processFringeFile(): cannot find a station for two-char id '" + str +
"'");
1479 clear_mk4fringe(&fringe);
1483 else if (stnNameById.value(str) != station2Name)
1486 "::processFringeFile(): the file '" + filename +
"' contains wrong station identities: " +
1487 station2Name +
" instead of " + stnNameById.value(str) +
" with SId='" + str +
"'");
1488 clear_mk4fringe(&fringe);
1494 baselineName = station1Name +
":" + station2Name;
1497 if (t200->scan_name)
1498 scanName.sprintf(
"%-10s", t200->scan_name);
1500 scanName.sprintf(
"%03d-%02d:%02d:%04.1f@%s",
1502 qPrintable(sourceName));
1505 obsKey.sprintf(
"%s",
1527 "::processFringeFile(): failed to add the observable at the baseline <" +
1528 station1Name +
":" + station2Name +
"> observing " + sourceName +
" source at " +
1535 if (t205->version_no[0] ==
'0' && t205->version_no[1] ==
'0')
1537 else if (t205->version_no[0] ==
'0' && t205->version_no[1] ==
'1')
1541 "::processFringeFile(): unknown version of the type_205 struct: " +
1542 path2file +
"/" + fringeFileName);
1543 for (
int i=0; i<nTmp; i++)
1544 if (t205->ffit_chan[i].channels[0]>-1 ||
1545 t205->ffit_chan[i].channels[1]>-1 )
1548 expSerialNumber = t200->expt_no;
1559 station1Info->
setCid(t202->baseline[0]);
1560 station1Info->
setSid(t202->ref_intl_id[0], t202->ref_intl_id[1]);
1570 station2Info->
setCid(t202->baseline[1]);
1571 station2Info->
setSid(t202->rem_intl_id[0], t202->rem_intl_id[1]);
1648 isSbdSigmaNan = isSbdSigmaInf = isGrdSigmaNan = isGrdSigmaInf = isPhrSigmaNan = isPhrSigmaInf
1651 f = t208->sbd_error;
1655 "::processFringeFile(): the observation #" + QString(
"").setNum(obsIdx) +
1656 " at the baseline <" + baselineName +
"> observing " + sourceName +
" source at " +
1658 " contains wrong sigma (inf) for the single band delay",
true);
1659 isSbdSigmaInf =
true;
1665 "::processFringeFile(): the observation #" + QString(
"").setNum(obsIdx) +
1666 " at the baseline <" + baselineName +
"> observing " + sourceName +
" source at " +
1668 " contains wrong sigma (nan) for the single band delay",
true);
1669 isSbdSigmaNan =
true;
1675 f = t208->mbd_error;
1679 "::processFringeFile(): the observation #" + QString(
"").setNum(obsIdx) +
1680 " at the baseline <" + baselineName +
"> observing " + sourceName +
" source at " +
1682 " contains wrong sigma (inf) for the group delay",
true);
1683 isGrdSigmaInf =
true;
1689 "::processFringeFile(): the observation #" + QString(
"").setNum(obsIdx) +
1690 " at the baseline <" + baselineName +
"> observing " + sourceName +
" source at " +
1692 " contains wrong sigma (nan) for the group delay",
true);
1693 isGrdSigmaNan =
true;
1699 f = t208->rate_error;
1703 "::processFringeFile(): the observation #" + QString(
"").setNum(obsIdx) +
1704 " at the baseline <" + baselineName +
"> observing " + sourceName +
" source at " +
1706 " contains wrong sigma (inf) for the group delay",
true);
1707 isPhrSigmaInf =
true;
1713 "::processFringeFile(): the observation #" + QString(
"").setNum(obsIdx) +
1714 " at the baseline <" + baselineName +
"> observing " + sourceName +
" source at " +
1716 " contains wrong sigma (nan) for the group delay",
true);
1717 isPhrSigmaNan =
true;
1722 if (isSbdSigmaNan || isSbdSigmaInf ||
1723 isGrdSigmaNan || isGrdSigmaInf ||
1724 isPhrSigmaNan || isPhrSigmaInf )
1726 QString s1(
""), s2(
""), s3(
"");
1727 s1 = (isSbdSigmaNan || isGrdSigmaNan || isPhrSigmaNan)?
"(nan)":
"(inf)";
1728 if (isSbdSigmaNan || isSbdSigmaInf)
1729 s2 =
"single band delay, ";
1730 if (isGrdSigmaNan || isGrdSigmaInf)
1731 s2+=
"group delay, ";
1732 if (isPhrSigmaNan || isPhrSigmaInf)
1733 s2+=
"delay rate, ";
1734 s2 = s2.left(s2.size() - 2);
1739 "::processFringeFile(): The observation #" + QString(
"").setNum(obsIdx) +
1740 ", " + s3 +
" contains wrong sigma " + s1 +
" for " + s2 +
".");
1752 str = t208->quality;
1753 nTmp = str.toInt(&isTmp);
1757 memset(buff1, 0, 32);
1758 strncpy(buff1, t208->tape_qcode,
sizeof(t208->tape_qcode)<32?
sizeof(t208->tape_qcode):31);
1781 str = QString(t208->version_no[0]);
1782 str += QString(t208->version_no[1]);
1783 nTmp = str.toInt(&isTmp);
1788 obs->
setDTec (t201->dispersion);
1794 "::processFringeFile(): cannot convert version number [" + str +
1795 "] to integer type: " + o->
strId());
1806 auxObs_1->
setTapeId(QString(
"").sprintf(
"%.8s", t202->ref_tape));
1815 auxObs_2->setAzimuthAngle (t202->rem_az *
DEG2RAD);
1816 auxObs_2->setElevationAngle (t202->rem_elev *
DEG2RAD);
1817 auxObs_2->setEstZenithDelay (t202->rem_zdelay*1.0e-6);
1818 auxObs_2->setTapeId(QString(
"").sprintf(
"%.8s", t202->rem_tape));
1840 t200->corr_date.day,
1841 t200->corr_date.hour,
1842 t200->corr_date.minute,
1843 t200->corr_date.second);
1846 epoch.
setUpEpoch( t200->fourfit_date.year, 0,
1847 t200->fourfit_date.day,
1848 t200->fourfit_date.hour,
1849 t200->fourfit_date.minute,
1850 t200->fourfit_date.second);
1855 t200->scantime.hour,
1856 t200->scantime.minute,
1857 t200->scantime.second);
1862 t205->utc_central.day,
1863 t205->utc_central.hour,
1864 t205->utc_central.minute,
1865 t205->utc_central.second);
1873 t205->start.second);
1884 bool hasStn_1Info=
false, hasStn_2Info=
false;
1885 StationInfo si_1, si_2;
1886 if (stnsInfo.contains(station1Name))
1888 si_1 = stnsInfo[station1Name];
1889 hasStn_1Info =
true;
1893 "::processFringeFile(): the station#1, " + station1Name +
", was not found in the VEX file");
1894 if (stnsInfo.contains(station2Name))
1896 si_2 = stnsInfo[station2Name];
1897 hasStn_2Info =
true;
1901 "::processFringeFile(): the station#2, " + station2Name +
", was not found in the VEX file");
1902 if (hasStn_1Info && hasStn_2Info && si_1.sampleRate_ != si_2.sampleRate_)
1905 "::processFringeFile(): stations sample rates mismatch: " +
1906 QString(
"").sprintf(
"%g vs %g.", si_1.sampleRate_, si_2.sampleRate_) +
": " + o->
strId());
1908 f = t203->channels[0].sample_rate*1.0e3;
1909 if (hasStn_1Info && fabs(si_1.sampleRate_ - f)>0.0 && si_1.sampleRate_>0.0)
1911 if (t204->ff_version[0] <= 3)
1912 f = si_1.sampleRate_;
1915 "::processFringeFile(): OVEX and Fringe sample rates mismatch: " +
1916 QString(
"").sprintf(
"%g vs %g.", si_1.sampleRate_, f) +
": " + o->
strId());
1920 if (hasStn_1Info && hasStn_2Info && si_1.bits_sample_ != si_2.bits_sample_)
1922 "::processFringeFile(): stations bits per sample mismatch: " +
1923 QString(
"").sprintf(
"%d vs %d", si_1.bits_sample_, si_2.bits_sample_) +
": " + o->
strId());
1928 isTmp = ( t206->version_no[0]==
'0' &&
1929 t206->version_no[1]==
'0' );
1930 for (
int i=0; i<numOfChannels; i++)
1932 int idx=t205->ffit_chan[i].channels[0];
1936 "::processFringeFile(): first channel index is -1, switch to the second one");
1937 idx=t205->ffit_chan[i].channels[1];
1962 if (fabs(t207->ref_pcamp[i].usb - t207->ref_pcamp[i].lsb) > 1.0e-8)
1964 "::processFringeFile(): reference station, sidebands have different phase cal amplitudes: " +
1965 QString(
"").sprintf(
"%g vs %g, diff=%g", t207->ref_pcamp[i].usb, t207->ref_pcamp[i].lsb,
1966 fabs(t207->ref_pcamp[i].usb - t207->ref_pcamp[i].lsb)));
1967 if (fabs(t207->rem_pcamp[i].usb - t207->rem_pcamp[i].lsb) > 1.0e-8)
1969 "::processFringeFile(): remote station, sidebands have different phase cal amplitudes: " +
1970 QString(
"").sprintf(
"%g vs %g, diff=%g", t207->rem_pcamp[i].usb, t207->rem_pcamp[i].lsb,
1971 fabs(t207->rem_pcamp[i].usb - t207->rem_pcamp[i].lsb)));
1973 if (fabs(t207->ref_pcphase[i].usb - t207->ref_pcphase[i].lsb) > 1.0e-8)
1975 "::processFringeFile(): reference station, sidebands have different phase cal phases: " +
1976 QString(
"").sprintf(
"%g vs %g, diff=%g", t207->ref_pcphase[i].usb, t207->ref_pcphase[i].lsb,
1977 fabs(t207->ref_pcphase[i].usb - t207->ref_pcphase[i].lsb)));
1978 if (fabs(t207->rem_pcphase[i].usb - t207->rem_pcphase[i].lsb) > 1.0e-8)
1980 "::processFringeFile(): remote station, sidebands have different phase cal phases: " +
1981 QString(
"").sprintf(
"%g vs %g, diff=%g", t207->rem_pcphase[i].usb, t207->rem_pcphase[i].lsb,
1982 fabs(t207->rem_pcphase[i].usb - t207->rem_pcphase[i].lsb)));
1983 if (t207->ref_errate[i] != 0.0)
1985 "::processFringeFile(): reference station has a non-zero pcal error rate: " +
1986 QString(
"").sprintf(
"%g", t207->ref_errate[i]));
1987 if (t207->rem_errate[i] != 0.0)
1989 "::processFringeFile(): remote station has a non-zero pcal error rate: " +
1990 QString(
"").sprintf(
"%g", t207->ref_errate[i]));
1993 (*o->
chanIdByChan()) [i] = t205->ffit_chan[i].ffit_chan_id;
1995 t203->channels[t205->ffit_chan[i].channels[0]].index:-1;
1997 t203->channels[t205->ffit_chan[i].channels[1]].index:-1;
2000 str = t203->channels[idx].ref_chan_id;
2003 if (si_1.channelByName_.contains(str))
2005 const ChannelInfo &ci=si_1.channelByName_.value(str);
2012 "::processFringeFile(): cannot find channel ID [" + str +
"] in the corel root file " +
2013 vexFileName +
" for the station " + station1Info->
getKey());
2017 str = t203->channels[idx].rem_chan_id;
2020 if (si_2.channelByName_.contains(str))
2022 const ChannelInfo &ci=si_2.channelByName_.value(str);
2029 "::processFringeFile(): cannot find channel ID [" + str +
"] in the corel root file " +
2030 vexFileName +
" for the station " + station2Info->
getKey());
2038 for (
int i=0; i<numOfChannels; i++)
2040 for (
int j=0; j<5; j++)
2045 "::processFringeFile(): st1 one of phase cal values is NAN " +
2046 QString(
"").sprintf(
"(chan=%d:dat=%d)", i, j) +
" from the scan " + obs->
getScanName() +
2047 " fringefile " + fringeFileName);
2053 "::processFringeFile(): st2 one of phase cal values is NAN " +
2054 QString(
"").sprintf(
"(chan=%d:dat=%d)", i, j) +
" from the scan " + obs->
getScanName() +
2055 " fringefile " + fringeFileName);
2090 for (
int i=0; i<6; i++)
2094 for (
unsigned int i=1; i<
sizeof(type_200::software_rev)/
sizeof(
short); i++)
2095 if (t200->software_rev[i] != 0)
2097 "::processFringeFile(): type200's software revision has more than one meaningful field at " +
2098 "the scan " + obs->
getScanName() +
" fringefile " + fringeFileName);
2112 clear_mk4fringe(&fringe);
2124 QString str, strAux;
2129 "::getCorrelatorHistory(): the session has no any band");
2136 "::getCorrelatorHistory(): the history file [" + f.fileName() +
"] does not exist");
2141 if (f.open(QFile::ReadOnly))
2145 QFileInfo fi(f.fileName());
2146 QDateTime d(fi.lastModified());
2153 if (d < fi.created())
2158 QDateTime ct(QDateTime::currentDateTimeUtc());
2159 SgMJD tCreated( d.date().year(), d.date().month(), d.date().day(),
2160 d.time().hour(), d.time().minute(),
2161 d.time().second()+d.time().msec()*0.001);
2162 SgMJD tCurrent( ct.date().year(), ct.date().month(), ct.date().day(),
2163 ct.time().hour(), ct.time().minute(),
2164 ct.time().second()+ct.time().msec()*0.001);
2165 if (tCurrent < tCreated)
2168 "::getCorrelatorHistory(): the correlator report file has the `last modified time' that "
2172 tCreated = tCurrent - 60.0/
DAY2SEC;
2174 "::getCorrelatorHistory(): the `last modified time' of the correlator report file "
2186 "::getCorrelatorHistory(): read " + QString(
"").setNum(numOfStrs) +
2187 " strings from the history file [" + f.fileName() +
"]");
2192 "::getCorrelatorHistory(): cannot open the history file [" + f.fileName() +
"] for read access");
2199 for (
int bIdx=1; bIdx<
bands_.size(); bIdx++)
2202 for (
int i=0; i<history.size(); i++)
2204 history.at(i)->getVersion(), history.at(i)->getText()));
2206 "::getCorrelatorHistory(): the history records were propagated to the " +
2207 bands_.at(bIdx)->getKey() +
"-band");
QString interval2Str(double days)
#define DAY2SEC
radians to mas:
#define DEG2RAD
hours to radians:
QMap< QString, QString > src2src
QMap< QString, QString > stn2stn
void evaluateEffectiveFreqs(const SgVector &numOfAccPeriodsByChan_USB, const SgVector &numOfAccPeriodsByChan_LSB, const SgVector &refFreqByChan, const SgVector &fringeAmplitudeByChan, const SgVector &numOfSamplesByChan_USB, const SgVector &numOfSamplesByChan_LSB, double sampleRate, double refFreq, int numOfChannels, double &effFreq4GR, double &effFreq4PH, double &effFreq4RT, const QString &correlatorType, const QString &oId, bool useEqualWeights=false)
virtual void write(LogLevel, quint32, const QString &, bool=false)
@ F_YYYYMMDDHHMMSSSS
Long verbose: Fri, the 2nd of Apr, 2010; 17hr 02min 43.6400sec.
@ F_INTERNAL
Digits, date and time: 20100402.71.
QString toString(Format format=F_Verbose) const
int calcDayOfYear() const
static SgMJD currentMJD()
void setUpEpoch(int year, int month, int day, int hour, int min, double sec)
void setElement(unsigned int i, unsigned int j, double d)
double getElement(unsigned int i, unsigned int j) const
void setKey(const QString &key)
void incNumTotal(DataType, int=1)
const QString & getKey() const
virtual int getMediaIdx() const
virtual void setMediaIdx(int idx)
virtual void setMJD(const SgMJD &)
void setElement(unsigned int i, double d)
void setAzimuthAngle(double angle)
void setEstZenithDelay(double d)
void setElevationAngle(double angle)
void setTapeId(const QString id)
void setFrequency(double f)
void setTCreation(const SgMJD &t)
QMap< QString, SgVlbiBaselineInfo * > & baselinesByName()
QMap< QString, SgVlbiStationInfo * > & stationsByName()
void setInputFileName(const QString &fileName)
void setInputFileVersion(int version)
QMap< int, SgVlbiBaselineInfo * > & baselinesByIdx()
QMap< QString, SgVlbiSourceInfo * > & sourcesByName()
QMap< int, SgVlbiSourceInfo * > & sourcesByIdx()
double getFrequency() const
QMap< int, SgVlbiStationInfo * > & stationsByIdx()
@ Attr_PRIMARY
the band is a primary band;
void setAmbiguitySpacing(double)
void setResidualFringeFitting(double r)
void setGeocenterValue(double)
QVector< int > * corelIndexNumLSB()
void setEpochOfCorrelation(const SgMJD &)
const QString & getFourfitOutputFName() const
void setEpochCentral(const SgMJD &)
void setBitsPerSample(int bps)
void setTstart(const SgMJD &t)
void setCorrClocks(int i, int j, double d)
void setTotalPhase(double)
void setHopsRevisionNumber(int num)
double getSampleRate() const
QVector< char > * polarization_1ByChan()
SgVector * loFreqByChan_1()
QVector< char > * chanIdByChan()
void setIncohSegmAddAmp(double d)
QVector< int > * corelIndexNumUSB()
void setPhaseCalModes(int modes)
SgMatrix * phaseCalData_2ByChan()
void setAcceptedRatio(double d)
void setTstop(const SgMJD &t)
void setEpochOfFourfitting(const SgMJD &)
SgVector * numOfAccPeriodsByChan_LSB()
void setIncohChanAddAmp(double d)
void setCentrOffset(double offset)
void setEffIntegrationTime(double d)
void setFourfitOutputFName(const QString &)
QVector< char > * polarization_2ByChan()
SgVector * numOfAccPeriodsByChan_USB()
QVector< int > * bbcIdxByChan_1()
void setFourfitControlFile(const QString &cf)
SgVlbiMeasurement & phDRate()
void setGeocenterResidPhase(double d)
void setCorrelStarElev_2(double v)
void setProbabOfFalseDetection(double d)
void setQualityFactor(int)
void setGeocenterTotalPhase(double d)
void setDiscardRatio(double d)
SgVector * fringeAmplitudeByChan()
void setCorrCoeff(double)
void setEpochOfScan(const SgMJD &)
void setUrVr(int i, double d)
void setCorrelZdelay_1(double v)
SgVector * numOfSamplesByChan_LSB()
void setAprioriDra(int i, double d)
void setInstrDelay(int i, double d)
void setPhaseCalRates(int i, double d)
void setStopOffset(int offset)
void setUvFrPerAsec(int i, double d)
void setErrorCode(const QString &)
SgMatrix * phaseCalData_1ByChan()
SgVector * numOfSamplesByChan_USB()
void setFourfitCommandOverride(const QString &co)
void setReferenceFrequency(double)
void setCorrelZdelay_2(double v)
double getReferenceFrequency() const
void allocateChannelsSetupStorages(int numOfChans)
SgVlbiMeasurement & phDelay()
void setTapeQualityCode(const QString &code)
SgVector * loFreqByChan_2()
SgVlbiMeasurement & grDelay()
void setStartOffset(int offset)
SgVlbiMeasurement & sbDelay()
SgVector * fringePhaseByChan()
SgVector * refFreqByChan()
void setFourfitSearchParameters(int i, double d)
void setSampleRate(double sr)
void setCorrelStarElev_1(double v)
QVector< int > * bbcIdxByChan_2()
void setFourfitVersion(int idx, int ver)
void setStation1Idx(short int idx)
void setScanId(const QString &sId)
void setSourceIdx(short int idx)
void setApLength(double d)
bool addObservable(const QString &, const SgVlbiObservable &)
void setDTecStdDev(double e)
void setScanName(const QString &sName)
void setupActiveObservable(const QString &)
void setCorrRootFileName(const QString &sName)
void setStation2Idx(short int idx)
SgVlbiObservable * observable(const QString &)
const QString & getScanName() const
QMap< QString, SgVlbiObservable * > & observableByKey()
void setBaselineIdx(short int idx)
void setKey(const QString &)
const QString & getCorrelatorType() const
void setOfficialName(const QString &name)
void setSchedulerName(const QString &name)
void setSessionCode(const QString &code)
void setDescription(const QString &description)
@ OT_MK4
observations are from Mk4-compatible correlator output;
void setName(const QString &name)
void setCorrelatorType(const QString &name)
CorrelatorPostProcSoftware cppsSoft_
@ Attr_FF_CREATED
the session has been imported from correlator;//vgosDbMake
const QString & getCorrelatorName() const
int getExperimentSerialNumber() const
void setExperimentSerialNumber(int sn)
const QString & getPiAgencyName() const
const QString & getDescription() const
void setNetworkSuffix(const QString &suffix)
void setSubmitterName(const QString &name)
void setCorrelatorName(const QString &name)
const QString & getSessionCode() const
void setPiAgencyName(const QString &name)
void setOriginType(OriginType type)
StationsByName stationsByName_
QMap< QString, SgVlbiObservation * > observationByKey_
bool getDataFromFringeFiles(const QString &path2, const QString &altDatabaseName, const QString &altCorrelatorName, const QString &historyFileName, const QString &mapFileName, const QList< QString > &)
QList< SgVlbiBand * > bands_
void processFringeFile(const QString &path2file, const QString &fringeFileName, const QMap< QString, StationInfo > &stnsInfo, const VexInfo &, const QString &vexFileName, const QMap< QString, QString > &stnNameById, const QMap< QString, QString > &stnNameByI, const QMap< QString, QString > &stn2stn, const QMap< QString, QString > &src2src, const QMap< QString, QString > &bnd2bnd, const QMap< QString, int > &fringeErrorCodeByInt, int &expSerialNumber)
bool selfCheck(bool guiExpected)
QMap< QString, SgVlbiBand * > bandByKey_
QList< SgVlbiObservation * > observations_
bool getCorrelatorHistory(const QString &fileName)
QMap< int, SgVlbiStationInfo * > stationsByIdx_
void importMapFile(const QString &mapFileName, QMap< QString, QString > &map4Stn, QMap< QString, QString > &map4Src, QMap< QString, QString > &map4Bnd)
void parseVexFile(const QString &, QString &, QString &)
BaselinesByName baselinesByName_
void processVexFile(const QString &, QMap< QString, StationInfo > &, VexInfo &, const QMap< QString, QString > &stn2stn, QString &correlatorName)
SgVlbiBand * primaryBand_
static QString className()
QMap< int, SgVlbiBaselineInfo * > baselinesByIdx_
SourcesByName sourcesByName_
bool check4NameMap(const QMap< QString, QString > &map, QString &name)
QMap< int, SgVlbiSourceInfo * > sourcesByIdx_
QMap< QString, SgVlbiAuxObservation * > * auxObservationByScanId()
void setSid(char c1, char c2)