Commits

Mark Kettenis authored 8b91705fc01
CAS-13266: Optimize MS metadata usage

casa5/code/synthesis/CalTables/CTPatchedInterp.cc

Modified
1198 1198 Path pathname(ct_.tableName());
1199 1199 String tabname=pathname.baseName().before(".tempMem");
1200 1200
1201 1201 // Size/initialize interpolation engines
1202 1202 IPosition tIsize(4,nMSElem_,nMSSpw_,nMSFld_,nMSObs_);
1203 1203 tI_.resize(tIsize);
1204 1204 tI_.set(NULL);
1205 1205 tIdel_.resize(tIsize);
1206 1206 tIdel_.set(false);
1207 1207
1208 + Record summary = msmc_->msmd().getSummary();
1209 + std::set<Int> scans = msmc_->msmd().getScanNumbers(0, 0);
1210 +
1208 1211 Bool reportBadSpw(false);
1209 1212 for (Int iMSObs=0;iMSObs<nMSObs_;++iMSObs) {
1210 1213 for (Int iMSFld=0;iMSFld<nMSFld_;++iMSFld) {
1211 1214
1212 1215 if (altFld_(iMSFld)==iMSFld) {
1213 1216
1214 1217 // cout << "Making interpolators for " << iMSFld << " (mapped from " << fldMap_(iMSFld) << ")" << endl;
1215 1218
1219 + std::set<uInt> spws = msmc_->msmd().getSpwsForField(iMSFld);
1220 +
1216 1221 for (Int iMSSpw=0;iMSSpw<nMSSpw_;++iMSSpw) {
1217 1222
1218 1223 // Only if the required CT spw is available
1219 1224 // (spwmap applied in spwOK method)
1220 1225 if (this->spwOK(iMSSpw)) {
1221 1226
1222 1227 // Size up the timeResult_ Cube (NB: channel shape matches Cal Table)
1223 1228 if (timeResult_(iMSSpw,iMSFld,iMSObs).nelements()==0) {
1224 1229 timeResult_(iMSSpw,iMSFld,iMSObs).resize(nFPar_,nChanIn_(spwMap_(iMSSpw)),nMSElem_);
1225 1230 timeResFlag_(iMSSpw,iMSFld,iMSObs).resize(nPar_,nChanIn_(spwMap_(iMSSpw)),nMSElem_);
1245 1250 tI_(tIip)=NULL;
1246 1251 tR.set(0.0);
1247 1252 tRf.set(true);
1248 1253
1249 1254 // Get Obs Id from summary, from third set of keys get scan(s)
1250 1255 // Get antenna from scan and fields for scan
1251 1256 // Logic check -->
1252 1257 // Do you have obs/scan -> is your field in scans? Spw in field? antenna in scan?
1253 1258 // If all true print below, else don't print anything
1254 1259
1255 - Record summary = msmc_->msmd().getSummary();
1256 - std::set<uInt> spws = msmc_->msmd().getSpwsForField(iMSFld);
1257 - std::set<Int> scans = msmc_->msmd().getScanNumbers(0, 0);
1258 -
1259 1260 LogIO log;
1260 1261 ostringstream msg;
1261 1262
1262 1263 if (spws.find(iMSSpw) != spws.end()) {
1263 1264 if (byScan_) {
1264 1265 if (scans.find(iMSObs) != scans.end()) {
1265 1266
1266 1267 // casa log post
1267 1268 msg << "MS scan=" << iMSObs
1268 1269 << ",fld=" << iMSFld

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut