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/QRegularExpression>
35 #include <QtCore/QTextStream>
36 #include <QtCore/QVector>
51 #ifdef HAVE_MK4_DATA_H
55 #define T230_VERSION 0
56 #include <hops/mk4_data.h>
61 #ifdef HAVE_MK4_DFIO_H
64 #include <hops/mk4_dfio.h>
72 # define FALSE_SAVED FALSE
76 # define TRUE_SAVED TRUE
81 #include <hops/mk4_vex.h>
85 # define FALSE FALSE_SAVED
90 # define TRUE TRUE_SAVED
114 #if !defined HAVE_MK4_DATA_H || !defined HAVE_MK4_DFIO_H || !defined HAVE_MK4_VEX_H
118 std::cout <<
"HOPS were not found.\n";
120 "::getDataFromFringeFiles(): cannot read fringe files, the software was compiled without HOPS "
136 const QMap<QString, QString>&, QString&)
144 const VexInfo&,
const QString&,
const QMap<QString, QString>&,
const QMap<QString, QString>&,
145 const QMap<QString, QString>&,
const QMap<QString, QString>&,
const QMap<QString, QString>&,
146 const QMap<QString, int>&,
int&)
170 QString polarization_;
171 double sky_frequency_;
172 QString net_sideband_;
182 QString if_sideband_;
184 ChannelInfo(
const ChannelInfo& ci);
185 ChannelInfo& operator=(
const ChannelInfo& ci);
188 ChannelInfo::ChannelInfo() :
200 sky_frequency_ = -1.0;
205 ChannelInfo::ChannelInfo(
const ChannelInfo& ci)
208 polarization_ = ci.polarization_;
209 sky_frequency_ = ci.sky_frequency_;
210 net_sideband_ = ci.net_sideband_;
211 bandwidth_ = ci.bandwidth_;
212 band_id_ = ci.band_id_;
213 chan_id_ = ci.chan_id_;
214 bbc_id_ = ci.bbc_id_;
215 pcal_id_ = ci.pcal_id_;
217 bbc_no_ = ci.bbc_no_;
218 if_name_ = ci.if_name_;
219 if_total_lo_ = ci.if_total_lo_;
220 if_sideband_ = ci.if_sideband_;
222 ChannelInfo& ChannelInfo::operator=(
const ChannelInfo& ci)
225 polarization_ = ci.polarization_;
226 sky_frequency_ = ci.sky_frequency_;
227 net_sideband_ = ci.net_sideband_;
228 bandwidth_ = ci.bandwidth_;
229 band_id_ = ci.band_id_;
230 chan_id_ = ci.chan_id_;
231 bbc_id_ = ci.bbc_id_;
232 pcal_id_ = ci.pcal_id_;
234 bbc_no_ = ci.bbc_no_;
235 if_name_ = ci.if_name_;
236 if_total_lo_ = ci.if_total_lo_;
237 if_sideband_ = ci.if_sideband_;
252 QMap<QString, ChannelInfo> channelByName_;
254 StationInfo(
const StationInfo& si);
255 StationInfo& operator=(
const StationInfo& si);
258 StationInfo::StationInfo() :
270 StationInfo::StationInfo(
const StationInfo& si) :
272 id_2char_(si.id_2char_),
273 id_1char_(si.id_1char_),
276 recorderType_ = si.recorderType_;
277 trackFormat_ = si.trackFormat_;
278 bits_sample_ = si.bits_sample_;
279 sampleRate_ = si.sampleRate_;
280 channelByName_.clear();
281 for (QMap<QString, ChannelInfo>::const_iterator it=si.channelByName_.begin();
282 it!=si.channelByName_.end(); ++it)
283 channelByName_.insert(it.key(), it.value());
285 StationInfo& StationInfo::operator=(
const StationInfo& si)
288 id_2char_ = si.id_2char_;
289 id_1char_ = si.id_1char_;
290 recorderType_ = si.recorderType_;
291 trackFormat_ = si.trackFormat_;
292 bits_sample_ = si.bits_sample_;
293 sampleRate_ = si.sampleRate_;
294 channelByName_.clear();
295 for (QMap<QString, ChannelInfo>::const_iterator it=si.channelByName_.begin();
296 it!=si.channelByName_.end(); ++it)
297 channelByName_.insert(it.key(), it.value());
310 VexInfo(
const VexInfo& vi);
311 VexInfo& operator=(
const VexInfo& vi);
314 VexInfo::VexInfo() : expName_(
"")
319 VexInfo::VexInfo(
const VexInfo& vi)
323 VexInfo& VexInfo::operator=(
const VexInfo& vi)
325 sampleRate_ = vi.sampleRate_;
326 apLength_ = vi.apLength_;
327 expName_ = vi.expName_;
335 struct FringeFileName
344 inline FringeFileName(
const FringeFileName& fn) {*
this = fn;};
345 FringeFileName(
const QString fileName);
346 QString fileName()
const
347 {
return isOk_?(baselineId_ +
"." + bandId_ +
"." + sequenceId_ +
"." + rootCodeId_):
"";};
349 {
return isOk_?(baselineId_ +
"." + bandId_):
"";};
350 FringeFileName& operator=(
const FringeFileName& fn);
353 FringeFileName::FringeFileName() : baselineId_(
""), bandId_(
""), sequenceId_(
""), rootCodeId_(
"")
359 FringeFileName::FringeFileName(
const QString fileName) :
360 baselineId_(
""), bandId_(
""), sequenceId_(
""), rootCodeId_(
"")
364 QStringList itemList=fileName.split(
'.');
365 if (itemList.size() == 4)
367 baselineId_ = itemList.at(0);
368 bandId_ = itemList.at(1);
369 sequenceId_ = itemList.at(2);
370 rootCodeId_ = itemList.at(3);
371 if (baselineId_.size()==2 && baselineId_.at(0)!=baselineId_.at(1) &&
372 bandId_.size()==1 && sequenceId_.size()>0 && rootCodeId_.size()>0)
373 sequenceNumber_ = sequenceId_.toInt(&isOk_);
377 FringeFileName& FringeFileName::operator=(
const FringeFileName& fn)
379 baselineId_ = fn.baselineId_;
380 bandId_ = fn.bandId_;
381 sequenceId_ = fn.sequenceId_;
382 rootCodeId_ = fn.rootCodeId_;
384 sequenceNumber_ = fn.sequenceNumber_;
393 class FringeFileMap :
public QMap<QString, FringeFileName>
396 inline FringeFileMap() : QMap<QString, FringeFileName>() {};
397 inline ~FringeFileMap() {clear();};
398 void registerFileName(
const QString fileName);
401 void FringeFileMap::registerFileName(
const QString fileName)
403 FringeFileName ffName(fileName);
406 if (contains(ffName.id()))
408 if (value(ffName.id()).sequenceNumber_ < ffName.sequenceNumber_)
411 "FringeFileMap::registerFileName(): the fringe file name " +
412 (*
this)[ffName.id()].fileName() +
" is being replaced by " + ffName.fileName());
413 (*this)[ffName.id()] = ffName;
418 insert(ffName.id(), ffName);
426 struct CorelRootFileName
432 CorelRootFileName(
const QString fileName);
433 inline CorelRootFileName(
const CorelRootFileName& cr) {*
this = cr;};
435 QString fileName()
const
436 {
return isOk_?(sourceId_ +
"." + rootCodeId_):
"";};
437 CorelRootFileName& operator=(
const CorelRootFileName& cr);
440 CorelRootFileName::CorelRootFileName() : sourceId_(
""), rootCodeId_(
"")
445 CorelRootFileName::CorelRootFileName(
const QString fileName) :
446 sourceId_(
""), rootCodeId_(
"")
449 QStringList itemList=fileName.split(
'.');
450 if (itemList.size() == 2)
452 sourceId_ = itemList.at(0);
453 rootCodeId_ = itemList.at(1);
458 CorelRootFileName& CorelRootFileName::operator=(
const CorelRootFileName& cr)
460 sourceId_ = cr.sourceId_;
461 rootCodeId_ = cr.rootCodeId_;
483 const QString& altDatabaseName,
const QString& altCorrelatorName,
484 const QString& historyFileName,
const QString& mapFileName,
487 bool isOk=
false, isScanDirOk;
491 QRegExp reScanDirName(
"[0-9]{3}-[0-9]{4}[a-zA-Z]{0,1}");
496 FringeFileMap scanFileNames;
497 QMap<QString, CorelRootFileName>
499 QString sPiName, sExperDescr;
500 QMap<QString, int> piNamesByCount, expDescrsByCount, expNameByCount;
501 QMap<int, int> expSerialNumByCount;
502 QString correlatorComments(historyFileName);
503 QString correlatorName(
"");
504 QMap<QString, QString> stnNameById, stnNameByI;
507 QMap<QString, QString>
stn2stn;
508 QMap<QString, QString>
src2src;
509 QMap<QString, QString> bnd2bnd;
510 QMap<QString, int> fringeErrorCodeByInt;
511 QMap<QString, int> corrNameByCount;
513 QRegularExpression reOldDbName(
"(\\d{2})([A-Z]{3})(\\d{2})([A-Z0-9]{1,2})");
514 QRegularExpression reNewDbName(
"(\\d{8})-([\\S]{2,12})");
515 QRegularExpressionMatch match;
517 dirList = dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot, QDir::Name);
518 if (dirList.size() == 0)
521 "::getDataFromFringeFiles(): nothing to read");
529 "::getDataFromFringeFiles(): loaded " + QString(
"").setNum(
stn2stn.size()) +
530 " entries for station name maps");
533 "::getDataFromFringeFiles(): loaded " + QString(
"").setNum(
src2src.size()) +
534 " entries for source name maps");
537 "::getDataFromFringeFiles(): loaded " + QString(
"").setNum(bnd2bnd.size()) +
538 " entries for bnd name maps");
539 if (fringeErrorCodes2Skip.size())
541 for (
int i=0; i<fringeErrorCodes2Skip.size(); i++)
542 fringeErrorCodeByInt.insert(fringeErrorCodes2Skip.at(i), 1);
546 for (
int i=0; i<dirList.size(); i++)
547 dirsOfScans << dirList.at(i);
550 "::getDataFromFringeFiles(): filtered " + QString(
"").setNum(dirsOfScans.size()) +
551 " scan entries from " + QString(
"").setNum(dirList.size()) +
" total number of directories");
555 for (
int i=0; i<dirsOfScans.size(); i++)
557 const QString &inDirName=dirsOfScans.at(i);
558 CorelRootFileName croot;
560 dir.setPath(path2data +
"/" + inDirName);
562 dirList = dir.entryList(QDir::Files | QDir::NoDotAndDotDot | QDir::Readable, QDir::Name);
565 "::getDataFromFringeFiles(): processing directory '" + dir.path() +
"'");
568 scanFileNames.clear();
572 QStringList listOfVexFiles;
573 for (
int j=0; j<dirList.size(); j++)
575 const QString &fileName=dirList.at(j);
576 CorelRootFileName croot(fileName);
579 if (!crootById.contains(croot.rootCodeId_))
580 crootById.insert(croot.rootCodeId_, croot);
583 "::getDataFromFringeFiles(): the croot file " + fileName +
" with crootId '" +
584 croot.rootCodeId_ +
"' already registered as '" +
585 crootById.value(croot.rootCodeId_).fileName() +
"'");
588 scanFileNames.registerFileName(fileName);
591 if (crootById.size() < 1)
594 "::getDataFromFringeFiles(): cannot find any VEX file in the directory " + dir.path() +
598 if (scanFileNames.size() < 1)
601 "::getDataFromFringeFiles(): cannot find any usable fringe file in the directory " +
602 dir.path() +
", skipped");
608 QMap<QString, QMap<QString, StationInfo> >
610 QMap<QString, VexInfo> vexInfoById;
613 for (QMap<QString, CorelRootFileName>::iterator it=crootById.begin(); it!=crootById.end(); ++it)
616 QMap<QString, StationInfo>
618 const QString &vexFileName=it.value().fileName();
623 if (correlatorName ==
"difx" || correlatorName ==
"sfxc")
625 vexInfoById.insert(it.key(), vi);
626 stnInfoByNameById.insert(it.key(), stnInfoByName);
629 for (QMap<QString, StationInfo>::iterator it=stnInfoByName.begin();
630 it!=stnInfoByName.end(); ++it)
632 const QString& stnName=it.value().name_;
633 const QString& stn2chrId=it.value().id_2char_;
634 const QString& stn1chrId=it.value().id_1char_;
636 if (stnNameById.contains(stn2chrId))
638 if (stnNameById.value(stn2chrId) != stnName)
641 "::getDataFromFringeFiles(): -------------------------------------------");
643 "::getDataFromFringeFiles(): the croot file " + inDirName +
"/" + vexFileName +
644 " contains station identities that missmatch previous data:");
646 "::getDataFromFringeFiles(): " + stnNameById.value(stn2chrId) +
"[" +
647 stn2chrId +
"] != " + stnName);
649 "::getDataFromFringeFiles(): -------------------------------------------");
653 stnNameById.insert(stn2chrId, stnName);
655 if (stnNameByI.contains(stn1chrId))
657 if (stnNameByI.value(stn1chrId) != stnName)
660 "::getDataFromFringeFiles(): -------------------------------------------");
662 "::getDataFromFringeFiles(): the croot file " + inDirName +
"/" + vexFileName +
663 " contains station identities that missmatch previous data:");
665 "::getDataFromFringeFiles(): " + stnNameByI.value(stn1chrId) +
"[" +
666 stn1chrId +
"] != " + stnName);
668 "::getDataFromFringeFiles(): -------------------------------------------");
672 stnNameByI.insert(stn1chrId, stnName);
675 parseVexFile(dir.path() +
"/" + vexFileName, sPiName, sExperDescr);
677 piNamesByCount[sPiName]++;
678 expDescrsByCount[sExperDescr]++;
679 expNameByCount[vi.expName_]++;
680 corrNameByCount[correlatorName]++;
682 "::getDataFromFringeFiles(): the corel.root file " + vexFileName +
" has been processed");
685 for (QMap<QString, FringeFileName>::iterator jt=scanFileNames.begin(); jt!=scanFileNames.end();
688 FringeFileName &ffn=jt.value();
689 const QString &crootId=ffn.rootCodeId_;
691 if (!(crootById.contains(crootId) && vexInfoById.contains(crootId) &&
692 stnInfoByNameById.contains(crootId)))
694 "::getDataFromFringeFiles(): cannot find a corel.root file for the fringe file '" +
695 ffn.fileName() +
"' with rootId=[" + crootId +
"], skipped");
700 vexInfoById.value(crootId), crootById.value(crootId).fileName(), stnNameById, stnNameByI,
702 expSerialNumByCount[sn]++;
715 "::getDataFromFringeFiles(): nothing useful found");
728 if (piNamesByCount.count() == 1)
730 if (piNamesByCount.begin().key().size())
735 "::getDataFromFringeFiles(): session P.I agency name was set to " +
getPiAgencyName());
742 "::getDataFromFringeFiles(): more than one PI agency names collected:");
743 for (QMap<QString, int>::iterator itt=piNamesByCount.begin(); itt!=piNamesByCount.end(); ++itt)
745 "::getDataFromFringeFiles(): \"" + itt.key() +
"\" => " + QString(
"").setNum(itt.value()));
747 if (expNameByCount.count() == 1)
749 if (expNameByCount.begin().key().size())
754 "::getDataFromFringeFiles(): session code was set to " +
getSessionCode());
761 "::getDataFromFringeFiles(): more than one experiment name found:");
762 for (QMap<QString, int>::iterator itt=expNameByCount.begin(); itt!=expNameByCount.end(); ++itt)
764 "::getDataFromFringeFiles(): \"" + itt.key() +
"\" => " + QString(
"").setNum(itt.value()));
766 if (expDescrsByCount.count() == 1)
768 if (expDescrsByCount.begin().key().size())
773 "::getDataFromFringeFiles(): session description was set to " +
getDescription());
780 "::getDataFromFringeFiles(): more than one experiment description found:");
781 for (QMap<QString, int>::iterator itt=expDescrsByCount.begin(); itt!=expDescrsByCount.end(); ++itt)
783 "::getDataFromFringeFiles(): \"" + itt.key() +
"\" => " + QString(
"").setNum(itt.value()));
788 if (expSerialNumByCount.count() == 1)
791 n = expSerialNumByCount.begin().key();
796 "::getDataFromFringeFiles(): session serial number was set to " +
801 "::getDataFromFringeFiles(): the observations do not have correct experiment serial number " +
802 QString(
"").sprintf(
"(==%d)", n));
808 "::getDataFromFringeFiles(): more than one experiment serial number found:");
809 for (QMap<int, int>::iterator it=expSerialNumByCount.begin(); it!=expSerialNumByCount.end(); ++it)
811 "::getDataFromFringeFiles(): " + QString(
"").sprintf(
"%d -> %d times", it.key(), it.value()));
814 if (corrNameByCount.count() == 1)
816 if (corrNameByCount.begin().key().size())
820 "::getDataFromFringeFiles(): correlator name was set to \"" +
getCorrelatorName() +
"\"");
826 "::getDataFromFringeFiles(): cannot find correlator name in the vex files");
834 "::getDataFromFringeFiles(): more than one correlator name collected:");
835 for (QMap<QString, int>::iterator itt=corrNameByCount.begin(); itt!=corrNameByCount.end(); ++itt)
837 "::getDataFromFringeFiles(): \"" + itt.key() +
"\" => " + QString(
"").setNum(itt.value()));
842 if (2 < altDatabaseName.size())
844 if ((match=reOldDbName.match(altDatabaseName)).hasMatch())
852 "::getDataFromFringeFiles(): database name was explicitly set to " + altDatabaseName +
853 ", a version 1 database name pattern");
855 else if ((match=reNewDbName.match(altDatabaseName)).hasMatch())
863 "::getDataFromFringeFiles(): database name was explicitly set to " + altDatabaseName +
864 ", a version 2 database name pattern");
868 "::getDataFromFringeFiles(): the provided database name, " + altDatabaseName +
869 ", does not fit any known pattern and was ignored");
873 QMap<double, SgVlbiBand*> bandByFreq;
875 for (
int i=0; i<
bands_.size(); i++)
878 QString bandKey=band->
getKey();
892 "::getDataFromFringeFiles(): cannot set up a frequency for " + bandKey +
"-band");
896 "::getDataFromFringeFiles(): the frequency " + QString(
"").setNum(band->
getFrequency()) +
897 " is already registered");
906 if (correlatorComments.size()==0)
908 dir.setPath(path2data +
"/../control/");
912 "::getDataFromFringeFiles(): cannot get correlator comments, the directory does not exist: " +
917 dirList = dir.entryList(QStringList() <<
"*.corr",
918 QDir::Files | QDir::NoDotAndDotDot | QDir::Readable, QDir::Name);
919 if (dirList.size() == 0)
922 "::getDataFromFringeFiles(): cannot get correlator comments, no any *.corr file found: " +
925 else if (dirList.size() > 1)
928 "::getDataFromFringeFiles(): found more than one file with correlator comments:");
929 for (
int j=0; j<dirList.size(); j++)
931 "::getDataFromFringeFiles(): " + dirList.at(j));
934 "::getDataFromFringeFiles(): picked up this one: " + str);
940 correlatorComments = path2data +
"/../control/" + str;
942 if (correlatorComments.size())
946 for (
int i=0; i<
bands_.size(); i++)
948 bands_.at(i)->history().addHistoryRecord(
"== The correlator report was not provided. ==",
953 "::getDataFromFringeFiles(): the correlator report was not provided.");
959 QString primeBandKey;
963 "::getDataFromFringeFiles(): importing typical IVS session");
969 "::getDataFromFringeFiles(): importing a foreign session setup");
970 if (bandByFreq.size() > 1)
987 "::getDataFromFringeFiles(): the observation " + obs->
getKey() +
988 " of the scan " + obs->
getScanName() +
" is being removed from the data set");
1000 "::getDataFromFringeFiles(): " + QString(
"").setNum(num) +
1001 " second-band-only observation" + (num==1?
" was":
"s were") +
" removed");
1010 "::getDataFromFringeFiles(): session selfcheck complete");
1014 "::getDataFromFringeFiles(): the selfcheck for the session failed");
1019 if (altCorrelatorName.size())
1023 "::getDataFromFringeFiles(): correlator name was explicitly set to \"" + altCorrelatorName +
"\"");
1031 for (QMap<QString, SgVlbiObservable*>::iterator it=obs->
observableByKey().begin();
1039 "::getDataFromFringeFiles(): phase cal delays were calculated");
1050 QFile f(vexFileName);
1052 bool foundPiName, foundExpDescr;
1054 QRegExp reExpDescr(
"^\\s*exper_description\\s*=\\s*\"?(\\S+.*\\S+)\"?;$");
1055 QRegExp rePiName(
"^\\s*PI_name\\s*=\\s*(\\S+);");
1058 foundPiName = foundExpDescr =
false;
1059 if (f.open(QFile::ReadOnly))
1063 while (!s.atEnd() && !(foundPiName && foundExpDescr))
1066 if (str.contains(reExpDescr))
1068 sExpDescr = reExpDescr.cap(1);
1069 if (sExpDescr.at(0) ==
'\"')
1070 sExpDescr.remove(0,1);
1071 if (sExpDescr.at(sExpDescr.size()-1) ==
'\"')
1073 foundExpDescr =
true;
1075 else if (str.contains(rePiName))
1077 sPiName = rePiName.cap(1);
1081 if (
false && !foundPiName)
1083 "::parseVexFile(): PI Name was not found; the file is " + vexFileName);
1086 "::parseVexFile(): Experiment Description was not found; the file is " + vexFileName);
1093 "::parseVexFile(): cannot open a file " + vexFileName +
" for reading");
1100 VexInfo& vi,
const QMap<QString, QString>&
stn2stn, QString& correlatorName)
1103 QString path2textFiles(PATH_2_HOPS_SHARE);
1105 have2clearEnv =
false;
1106 if (!getenv(
"TEXT"))
1108 path2textFiles += QString(
"/text");
1109 setenv(
"TEXT", qPrintable(path2textFiles), 0);
1110 have2clearEnv =
true;
1119 char vexkey[2]={0,0};
1122 scan_struct *scan=NULL;
1123 evex_struct *evex=NULL;
1124 *vexRoot.filename = 0;
1126 filename =
new char[vexFileName.size() + 1];
1127 strcpy(filename, qPrintable(vexFileName));
1129 if ((rc=get_vex(filename, OVEX | EVEX | IVEX | LVEX, vexkey, &vexRoot)) != 0)
1132 "::processVexFile(): cannot get_vex the file " + vexFileName +
"; RC=" + QString(
"").setNum(rc));
1134 else if (!(scan=vexRoot.ovex))
1137 "::processVexFile(): the ovex struct is NULL");
1139 else if (!(evex=vexRoot.evex))
1142 "::processVexFile(): the evex struct is NULL");
1146 QString sScanName(
"");
1147 QString sSrcName(
"");
1150 vi.expName_ = scan->exper_name;
1151 vi.apLength_ = evex->ap_length;
1153 stationByName.clear();
1159 source_struct &src=scan->src;
1160 sScanName = scan->scan_name;
1161 correlatorName = scan->correlator;
1162 sSrcName = src.source_name;
1163 numStns = scan->nst;
1164 for (
int i=0; i<numStns; i++)
1166 station_struct &stn=scan->st[i];
1167 int maxNumChannels=
sizeof(stn.channels)/
sizeof(chan_struct);
1168 StationInfo station;
1169 station.name_.sprintf(
"%-8s", stn.site_name);
1173 station.name_ =
stn2stn.value(station.name_);
1175 "::processVexFile(): the input station name \"" + stn.site_name +
"\" has been mapped to \"" +
1176 station.name_ +
"\"");
1178 station.id_2char_ = stn.site_id;
1179 station.id_1char_ = stn.mk4_site_id;
1180 if (stn.recorder_type != I_UNDEFINED)
1181 station.recorderType_ = stn.recorder_type;
1182 else if (stn.rack_type != I_UNDEFINED)
1183 station.recorderType_ = stn.rack_type;
1184 if (stn.track_format != I_UNDEFINED)
1185 station.trackFormat_ = stn.track_format;
1186 if (stn.bits_sample != I_UNDEFINED)
1187 station.bits_sample_ = stn.bits_sample;
1188 if (stn.samplerate != F_UNDEFINED)
1189 station.sampleRate_ = stn.samplerate;
1190 for (
int j=0; j<maxNumChannels; j++)
1192 chan_struct &chan=stn.channels[j];
1193 if (chan.sky_frequency > 1.0e3)
1195 ChannelInfo channel;
1196 channel.name_ = chan.chan_name;
1197 channel.polarization_ = chan.polarization;
1198 channel.sky_frequency_ = chan.sky_frequency;
1199 channel.net_sideband_ = chan.net_sideband;
1200 channel.bandwidth_ = chan.bandwidth;
1201 channel.band_id_ = chan.band_id;
1202 channel.chan_id_ = chan.chan_id;
1203 channel.bbc_id_ = chan.bbc_id;
1204 channel.pcal_id_ = chan.pcal_id;
1205 channel.if_id_ = chan.if_id;
1206 channel.bbc_no_ = chan.bbc_no;
1207 channel.if_name_ = chan.if_name;
1208 channel.if_total_lo_ = chan.if_total_lo;
1209 channel.if_sideband_ = chan.if_sideband;
1210 station.channelByName_[channel.name_] = channel;
1213 if (stationByName.contains(station.name_))
1215 "::processVexFile(): got a duplicate record for the station \"" + station.name_ +
"\"");
1216 stationByName[station.name_] = station;
1230 const QMap<QString, StationInfo>& stnsInfo,
const VexInfo& vexInfo,
const QString& vexFileName,
1231 const QMap<QString, QString>& stnNameById,
const QMap<QString, QString>& stnNameByI,
1232 const QMap<QString, QString>&
stn2stn,
const QMap<QString, QString>&
src2src,
1233 const QMap<QString, QString>& bnd2bnd,
const QMap<QString, int>& fringeErrorCodeByInt,
1234 int& expSerialNumber)
1240 QString bandKey(
"");
1241 QRegExp reBandName(
"^(\\S*)([0-9a-zA-Z]{2})\\.([a-zA-Z]{1})\\."
1242 "\\d+\\.([0-9a-zA-Z]{5,7})$");
1245 str = path2file +
"/" + fringeFileName;
1246 filename =
new char[str.size() + 1];
1247 strcpy(filename, qPrintable(str));
1249 if (fringeFileName.contains(reBandName))
1251 bandKey = reBandName.cap(3);
1260 "::processFringeFile(): skipping the observation " + fringeFileName +
1261 ": the band \"" + bandKey +
"\" have to be skipped");
1262 clear_mk4fringe(&fringe);
1268 if ((rc=read_mk4fringe(filename, &fringe)) != 0)
1271 "::processFringeFile(): cannot read_mk4fringe the file " + str +
1272 "; RC=" + QString(
"").setNum(rc));
1274 else if (!bandKey.size())
1277 "::processFringeFile(): cannot figure out a name of band from the file name " + str);
1281 type_200 *t200=fringe.t200;
1282 type_201 *t201=fringe.t201;
1283 type_202 *t202=fringe.t202;
1284 type_203 *t203=fringe.t203;
1285 type_204 *t204=fringe.t204;
1286 type_205 *t205=fringe.t205;
1287 type_206 *t206=fringe.t206;
1288 type_207 *t207=fringe.t207;
1289 type_208 *t208=fringe.t208;
1290 type_210 *t210=fringe.t210;
1293 if (fringeErrorCodeByInt.size() && t208->errcode !=
' ')
1295 if (fringeErrorCodeByInt.contains(
"*") ||
1296 fringeErrorCodeByInt.contains(QString(t208->errcode)))
1299 "::processFringeFile(): skipping the observation " + fringeFileName +
1300 ": the fringe error code is \"" + QString(t208->errcode) +
"\"");
1301 clear_mk4fringe(&fringe);
1323 QString station1Name, station2Name, sourceName, baselineName;
1324 QString scanName, scanId, obsKey;
1338 bool isSbdSigmaNan, isSbdSigmaInf;
1339 bool isGrdSigmaNan, isGrdSigmaInf;
1340 bool isPhrSigmaNan, isPhrSigmaInf;
1342 char buff1[32], buff2[32];
1344 double effFreq4GR=0.0, effFreq4PH=0.0, effFreq4RT=0.0;
1357 epoch.
setUpEpoch(t200->frt.year, 0, t200->frt.day,
1358 t200->frt.hour, t200->frt.minute, t200->frt.second);
1362 memset(buff1, 0, 32);
1363 memset(buff2, 0, 32);
1364 strncpy(buff1, t202->ref_name, 8);
1365 strncpy(buff2, t202->rem_name, 8);
1366 station1Name.sprintf(
"%-8s", buff1);
1367 station2Name.sprintf(
"%-8s", buff2);
1368 sourceName .sprintf(
"%-8s", t201->source);
1376 "::processFringeFile(): skipping the observation " + fringeFileName +
1377 ": the station \"" + station1Name +
"\" have to be skipped");
1378 clear_mk4fringe(&fringe);
1385 "::processFringeFile(): skipping the observation " + fringeFileName +
1386 ": the station \"" + station2Name +
"\" have to be skipped");
1387 clear_mk4fringe(&fringe);
1397 "::processFringeFile(): skipping the observation " + fringeFileName +
1398 ": the source \"" + sourceName +
"\" have to be skipped");
1399 clear_mk4fringe(&fringe);
1408 str = QString(t202->baseline[0]);
1409 if (!stnNameByI.contains(str))
1412 "::processFringeFile(): cannot find a station for ref one-char id '" + str +
"'");
1413 clear_mk4fringe(&fringe);
1417 else if (stnNameByI.value(str) != station1Name)
1420 "::processFringeFile(): the file '" + filename +
"' contains wrong station identities: " +
1421 station1Name +
" instead of " + stnNameByI.value(str) +
" with CId='" + str +
"'");
1422 clear_mk4fringe(&fringe);
1426 str = QString(t202->baseline[1]);
1427 if (!stnNameByI.contains(str))
1430 "::processFringeFile(): cannot find a station for rem one-char id '" + str +
"'");
1431 clear_mk4fringe(&fringe);
1435 else if (stnNameByI.value(str) != station2Name)
1438 "::processFringeFile(): the file '" + filename +
"' contains wrong station identities: " +
1439 station2Name +
" instead of " + stnNameByI.value(str) +
" with CId='" + str +
"'");
1440 clear_mk4fringe(&fringe);
1445 str = QString(t202->ref_intl_id[0]);
1446 str += QString(t202->ref_intl_id[1]);
1447 if (!stnNameById.contains(str))
1450 "::processFringeFile(): cannot find a station for two-char id '" + str +
"'");
1451 clear_mk4fringe(&fringe);
1455 else if (stnNameById.value(str) != station1Name)
1458 "::processFringeFile(): the file '" + filename +
"' contains wrong station identities: " +
1459 station1Name +
" instead of " + stnNameById.value(str) +
" with SId='" + str +
"'");
1460 clear_mk4fringe(&fringe);
1464 str = QString(t202->rem_intl_id[0]);
1465 str += QString(t202->rem_intl_id[1]);
1466 if (!stnNameById.contains(str))
1469 "::processFringeFile(): cannot find a station for two-char id '" + str +
"'");
1470 clear_mk4fringe(&fringe);
1474 else if (stnNameById.value(str) != station2Name)
1477 "::processFringeFile(): the file '" + filename +
"' contains wrong station identities: " +
1478 station2Name +
" instead of " + stnNameById.value(str) +
" with SId='" + str +
"'");
1479 clear_mk4fringe(&fringe);
1485 baselineName = station1Name +
":" + station2Name;
1488 if (t200->scan_name)
1489 scanName.sprintf(
"%-10s", t200->scan_name);
1491 scanName.sprintf(
"%03d-%02d:%02d:%04.1f@%s",
1493 qPrintable(sourceName));
1496 obsKey.sprintf(
"%s",
1518 "::processFringeFile(): failed to add the observable at the baseline <" +
1519 station1Name +
":" + station2Name +
"> observing " + sourceName +
" source at " +
1526 if (t205->version_no[0] ==
'0' && t205->version_no[1] ==
'0')
1528 else if (t205->version_no[0] ==
'0' && t205->version_no[1] ==
'1')
1532 "::processFringeFile(): unknown version of the type_205 struct: " +
1533 path2file +
"/" + fringeFileName);
1534 for (
int i=0; i<nTmp; i++)
1535 if (t205->ffit_chan[i].channels[0]>-1 ||
1536 t205->ffit_chan[i].channels[1]>-1 )
1539 expSerialNumber = t200->expt_no;
1550 station1Info->
setCid(t202->baseline[0]);
1551 station1Info->
setSid(t202->ref_intl_id[0], t202->ref_intl_id[1]);
1561 station2Info->
setCid(t202->baseline[1]);
1562 station2Info->
setSid(t202->rem_intl_id[0], t202->rem_intl_id[1]);
1639 isSbdSigmaNan = isSbdSigmaInf = isGrdSigmaNan = isGrdSigmaInf = isPhrSigmaNan = isPhrSigmaInf
1642 f = t208->sbd_error;
1646 "::processFringeFile(): the observation #" + QString(
"").setNum(obsIdx) +
1647 " at the baseline <" + baselineName +
"> observing " + sourceName +
" source at " +
1649 " contains wrong sigma (inf) for the single band delay",
true);
1650 isSbdSigmaInf =
true;
1656 "::processFringeFile(): the observation #" + QString(
"").setNum(obsIdx) +
1657 " at the baseline <" + baselineName +
"> observing " + sourceName +
" source at " +
1659 " contains wrong sigma (nan) for the single band delay",
true);
1660 isSbdSigmaNan =
true;
1666 f = t208->mbd_error;
1670 "::processFringeFile(): the observation #" + QString(
"").setNum(obsIdx) +
1671 " at the baseline <" + baselineName +
"> observing " + sourceName +
" source at " +
1673 " contains wrong sigma (inf) for the group delay",
true);
1674 isGrdSigmaInf =
true;
1680 "::processFringeFile(): the observation #" + QString(
"").setNum(obsIdx) +
1681 " at the baseline <" + baselineName +
"> observing " + sourceName +
" source at " +
1683 " contains wrong sigma (nan) for the group delay",
true);
1684 isGrdSigmaNan =
true;
1690 f = t208->rate_error;
1694 "::processFringeFile(): the observation #" + QString(
"").setNum(obsIdx) +
1695 " at the baseline <" + baselineName +
"> observing " + sourceName +
" source at " +
1697 " contains wrong sigma (inf) for the group delay",
true);
1698 isPhrSigmaInf =
true;
1704 "::processFringeFile(): the observation #" + QString(
"").setNum(obsIdx) +
1705 " at the baseline <" + baselineName +
"> observing " + sourceName +
" source at " +
1707 " contains wrong sigma (nan) for the group delay",
true);
1708 isPhrSigmaNan =
true;
1713 if (isSbdSigmaNan || isSbdSigmaInf ||
1714 isGrdSigmaNan || isGrdSigmaInf ||
1715 isPhrSigmaNan || isPhrSigmaInf )
1717 QString s1(
""), s2(
""), s3(
"");
1718 s1 = (isSbdSigmaNan || isGrdSigmaNan || isPhrSigmaNan)?
"(nan)":
"(inf)";
1719 if (isSbdSigmaNan || isSbdSigmaInf)
1720 s2 =
"single band delay, ";
1721 if (isGrdSigmaNan || isGrdSigmaInf)
1722 s2+=
"group delay, ";
1723 if (isPhrSigmaNan || isPhrSigmaInf)
1724 s2+=
"delay rate, ";
1725 s2 = s2.left(s2.size() - 2);
1730 "::processFringeFile(): The observation #" + QString(
"").setNum(obsIdx) +
1731 ", " + s3 +
" contains wrong sigma " + s1 +
" for " + s2 +
".");
1743 str = t208->quality;
1744 nTmp = str.toInt(&isTmp);
1748 memset(buff1, 0, 32);
1749 strncpy(buff1, t208->tape_qcode,
sizeof(t208->tape_qcode)<32?
sizeof(t208->tape_qcode):31);
1772 str = QString(t208->version_no[0]);
1773 str += QString(t208->version_no[1]);
1774 nTmp = str.toInt(&isTmp);
1779 obs->
setDTec(t201->dispersion);
1780 f = t208->tec_error;
1785 "::processFringeFile(): the observation #" + QString(
"").setNum(obsIdx) +
1786 " at the baseline <" + baselineName +
"> observing " + sourceName +
" source at " +
1788 " contains unnormal value (" + QString(
"").setNum(t208->tec_error) +
") of diffTEC sigma" +
1789 "; corrected to 1e3",
true);
1797 "::processFringeFile(): cannot convert version number [" + str +
1798 "] to integer type: " + o->
strId());
1809 auxObs_1->
setTapeId(QString(
"").sprintf(
"%.8s", t202->ref_tape));
1818 auxObs_2->setAzimuthAngle (t202->rem_az *
DEG2RAD);
1819 auxObs_2->setElevationAngle (t202->rem_elev *
DEG2RAD);
1820 auxObs_2->setEstZenithDelay (t202->rem_zdelay*1.0e-6);
1821 auxObs_2->setTapeId(QString(
"").sprintf(
"%.8s", t202->rem_tape));
1843 t200->corr_date.day,
1844 t200->corr_date.hour,
1845 t200->corr_date.minute,
1846 t200->corr_date.second);
1849 epoch.
setUpEpoch( t200->fourfit_date.year, 0,
1850 t200->fourfit_date.day,
1851 t200->fourfit_date.hour,
1852 t200->fourfit_date.minute,
1853 t200->fourfit_date.second);
1858 t200->scantime.hour,
1859 t200->scantime.minute,
1860 t200->scantime.second);
1865 t205->utc_central.day,
1866 t205->utc_central.hour,
1867 t205->utc_central.minute,
1868 t205->utc_central.second);
1876 t205->start.second);
1887 bool hasStn_1Info=
false, hasStn_2Info=
false;
1888 StationInfo si_1, si_2;
1889 if (stnsInfo.contains(station1Name))
1891 si_1 = stnsInfo[station1Name];
1892 hasStn_1Info =
true;
1896 "::processFringeFile(): the station#1, " + station1Name +
", was not found in the VEX file");
1897 if (stnsInfo.contains(station2Name))
1899 si_2 = stnsInfo[station2Name];
1900 hasStn_2Info =
true;
1904 "::processFringeFile(): the station#2, " + station2Name +
", was not found in the VEX file");
1905 if (hasStn_1Info && hasStn_2Info && si_1.sampleRate_ != si_2.sampleRate_)
1908 "::processFringeFile(): stations sample rates mismatch: " +
1909 QString(
"").sprintf(
"%g vs %g.", si_1.sampleRate_, si_2.sampleRate_) +
": " + o->
strId());
1911 f = t203->channels[0].sample_rate*1.0e3;
1912 if (hasStn_1Info && fabs(si_1.sampleRate_ - f)>0.0 && si_1.sampleRate_>0.0)
1914 if (t204->ff_version[0] <= 3)
1915 f = si_1.sampleRate_;
1918 "::processFringeFile(): OVEX and Fringe sample rates mismatch: " +
1919 QString(
"").sprintf(
"%g vs %g.", si_1.sampleRate_, f) +
": " + o->
strId());
1923 if (hasStn_1Info && hasStn_2Info && si_1.bits_sample_ != si_2.bits_sample_)
1925 "::processFringeFile(): stations bits per sample mismatch: " +
1926 QString(
"").sprintf(
"%d vs %d", si_1.bits_sample_, si_2.bits_sample_) +
": " + o->
strId());
1931 isTmp = ( t206->version_no[0]==
'0' &&
1932 t206->version_no[1]==
'0' );
1933 for (
int i=0; i<numOfChannels; i++)
1935 int idx=t205->ffit_chan[i].channels[0];
1939 "::processFringeFile(): first channel index is -1, switch to the second one");
1940 idx=t205->ffit_chan[i].channels[1];
1965 if (fabs(t207->ref_pcamp[i].usb - t207->ref_pcamp[i].lsb) > 1.0e-8)
1967 "::processFringeFile(): reference station, sidebands have different phase cal amplitudes: " +
1968 QString(
"").sprintf(
"%g vs %g, diff=%g", t207->ref_pcamp[i].usb, t207->ref_pcamp[i].lsb,
1969 fabs(t207->ref_pcamp[i].usb - t207->ref_pcamp[i].lsb)));
1970 if (fabs(t207->rem_pcamp[i].usb - t207->rem_pcamp[i].lsb) > 1.0e-8)
1972 "::processFringeFile(): remote station, sidebands have different phase cal amplitudes: " +
1973 QString(
"").sprintf(
"%g vs %g, diff=%g", t207->rem_pcamp[i].usb, t207->rem_pcamp[i].lsb,
1974 fabs(t207->rem_pcamp[i].usb - t207->rem_pcamp[i].lsb)));
1976 if (fabs(t207->ref_pcphase[i].usb - t207->ref_pcphase[i].lsb) > 1.0e-8)
1978 "::processFringeFile(): reference station, sidebands have different phase cal phases: " +
1979 QString(
"").sprintf(
"%g vs %g, diff=%g", t207->ref_pcphase[i].usb, t207->ref_pcphase[i].lsb,
1980 fabs(t207->ref_pcphase[i].usb - t207->ref_pcphase[i].lsb)));
1981 if (fabs(t207->rem_pcphase[i].usb - t207->rem_pcphase[i].lsb) > 1.0e-8)
1983 "::processFringeFile(): remote station, sidebands have different phase cal phases: " +
1984 QString(
"").sprintf(
"%g vs %g, diff=%g", t207->rem_pcphase[i].usb, t207->rem_pcphase[i].lsb,
1985 fabs(t207->rem_pcphase[i].usb - t207->rem_pcphase[i].lsb)));
1986 if (t207->ref_errate[i] != 0.0)
1988 "::processFringeFile(): reference station has a non-zero pcal error rate: " +
1989 QString(
"").sprintf(
"%g", t207->ref_errate[i]));
1990 if (t207->rem_errate[i] != 0.0)
1992 "::processFringeFile(): remote station has a non-zero pcal error rate: " +
1993 QString(
"").sprintf(
"%g", t207->ref_errate[i]));
1996 (*o->
chanIdByChan()) [i] = t205->ffit_chan[i].ffit_chan_id;
1998 t203->channels[t205->ffit_chan[i].channels[0]].index:-1;
2000 t203->channels[t205->ffit_chan[i].channels[1]].index:-1;
2003 str = t203->channels[idx].ref_chan_id;
2006 if (si_1.channelByName_.contains(str))
2008 const ChannelInfo &ci=si_1.channelByName_.value(str);
2015 "::processFringeFile(): cannot find channel ID [" + str +
"] in the corel root file " +
2016 vexFileName +
" for the station " + station1Info->
getKey());
2020 str = t203->channels[idx].rem_chan_id;
2023 if (si_2.channelByName_.contains(str))
2025 const ChannelInfo &ci=si_2.channelByName_.value(str);
2032 "::processFringeFile(): cannot find channel ID [" + str +
"] in the corel root file " +
2033 vexFileName +
" for the station " + station2Info->
getKey());
2041 for (
int i=0; i<numOfChannels; i++)
2043 for (
int j=0; j<5; j++)
2048 "::processFringeFile(): st1 one of phase cal values is NAN " +
2049 QString(
"").sprintf(
"(chan=%d:dat=%d)", i, j) +
" from the scan " + obs->
getScanName() +
2050 " fringefile " + fringeFileName);
2056 "::processFringeFile(): st2 one of phase cal values is NAN " +
2057 QString(
"").sprintf(
"(chan=%d:dat=%d)", i, j) +
" from the scan " + obs->
getScanName() +
2058 " fringefile " + fringeFileName);
2093 for (
int i=0; i<6; i++)
2097 for (
unsigned int i=1; i<
sizeof(type_200::software_rev)/
sizeof(
short); i++)
2098 if (t200->software_rev[i] != 0)
2100 "::processFringeFile(): type200's software revision has more than one meaningful field at " +
2101 "the scan " + obs->
getScanName() +
" fringefile " + fringeFileName);
2115 clear_mk4fringe(&fringe);
2127 QString str, strAux;
2132 "::getCorrelatorHistory(): the session has no any band");
2139 "::getCorrelatorHistory(): the history file [" + f.fileName() +
"] does not exist");
2144 if (f.open(QFile::ReadOnly))
2148 QFileInfo fi(f.fileName());
2149 QDateTime d(fi.lastModified());
2156 if (d < fi.created())
2161 QDateTime ct(QDateTime::currentDateTimeUtc());
2162 SgMJD tCreated( d.date().year(), d.date().month(), d.date().day(),
2163 d.time().hour(), d.time().minute(),
2164 d.time().second()+d.time().msec()*0.001);
2165 SgMJD tCurrent( ct.date().year(), ct.date().month(), ct.date().day(),
2166 ct.time().hour(), ct.time().minute(),
2167 ct.time().second()+ct.time().msec()*0.001);
2168 if (tCurrent < tCreated)
2171 "::getCorrelatorHistory(): the correlator report file has the `last modified time' that "
2175 tCreated = tCurrent - 60.0/
DAY2SEC;
2177 "::getCorrelatorHistory(): the `last modified time' of the correlator report file "
2189 "::getCorrelatorHistory(): read " + QString(
"").setNum(numOfStrs) +
2190 " strings from the history file [" + f.fileName() +
"]");
2195 "::getCorrelatorHistory(): cannot open the history file [" + f.fileName() +
"] for read access");
2202 for (
int bIdx=1; bIdx<
bands_.size(); bIdx++)
2205 for (
int i=0; i<history.size(); i++)
2207 history.at(i)->getVersion(), history.at(i)->getText()));
2209 "::getCorrelatorHistory(): the history records were propagated to the " +
2210 bands_.at(bIdx)->getKey() +
"-band");
QString interval2Str(double days)
#define DAY2SEC
radians to mas:
#define DEG2RAD
degrees to seconds:
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)