Commits
308 308 | } |
309 309 | |
310 310 | |
311 311 | } |
312 312 | |
313 313 | if(thisSpwSelValid || ignoreframe){ |
314 314 | andFreqSelection(mss_p.nelements()-1, Int(freqList(k,0)), lowfreq, topfreq, selFreqFrame_p); |
315 315 | andChanSelection(mss_p.nelements()-1, Int(chanlist(k,0)), Int(chanlist(k,1)),Int(chanlist(k,2))); |
316 316 | } |
317 317 | } |
318 - | if(! (selectionValid && !ignoreframe)){ |
318 + | //if(! (selectionValid && !ignoreframe)){ |
319 + | if(!selectionValid && !ignoreframe){ |
319 320 | os << "Did not match spw selection in the selected ms " << LogIO::WARN << LogIO::POST; |
320 321 | retval=False; |
321 322 | } |
322 323 | //fselections_p->add(channelSelector); |
323 324 | ////////////////////////////////// |
324 325 | } |
325 326 | else{ |
326 327 | |
327 328 | //////More workaroung CAS-8829 |
328 329 | //MFrequency::Types freqFrame=MFrequency::castType(ROMSColumns(*mss_p[mss_p.nelements()-1]).spectralWindow().measFreqRef()(Int(freqList(0,0)))); |
377 378 | unlockMSs(); |
378 379 | throw( AipsError("Error in selectData() : "+x.getMesg()) ); |
379 380 | } |
380 381 | |
381 382 | return retval; |
382 383 | |
383 384 | |
384 385 | |
385 386 | } |
386 387 | void SynthesisImagerVi2::andChanSelection(const Int msId, const Int spwId, const Int startchan, const Int endchan){ |
388 + | |
387 389 | map<Int, Vector<Int> > spwsel; |
388 390 | auto it=channelSelections_p.find(msId); |
389 391 | if(it !=channelSelections_p.end()) |
390 392 | spwsel=it->second; |
391 393 | auto hasspw=spwsel.find(spwId); |
392 394 | Vector<Int>chansel(2,-1); |
393 395 | if(hasspw != spwsel.end()){ |
394 396 | chansel.resize(); |
395 397 | chansel=hasspw->second; |
396 398 | } |
411 413 | chansel(0)=nchan+(startchan-chansel(1)); |
412 414 | } |
413 415 | } |
414 416 | spwsel[spwId]=chansel; |
415 417 | channelSelections_p[msId]=spwsel; |
416 418 | //cerr << "chansel "<< channelSelections_p << endl; |
417 419 | |
418 420 | } |
419 421 | void SynthesisImagerVi2::andFreqSelection(const Int msId, const Int spwId, const Double freqBeg, const Double freqEnd, const MFrequency::Types frame){ |
420 422 | |
421 - | |
423 + | |
422 424 | Int key=msId; |
423 425 | |
424 426 | Bool isDefined=False; |
425 427 | FrequencySelectionUsingFrame frameSel(frame); |
426 428 | for (uInt k =0; k<freqBegs_p.size(); ++k){ |
427 429 | //cerr <<freqBegs_p[k].first << " == " << key << " && " << freqSpws_p[k].second<< " == " << spwId << " && " << freqBeg << " < " << freqEnds_p[k].second<< " && " << freqEnd << " > " << freqBegs_p[k].second << endl; |
428 430 | if((freqBegs_p[k].first == key || key <0 ) && (freqSpws_p[k].second==spwId || spwId <0) && (freqBeg < freqEnds_p[k].second) && (freqEnd > freqBegs_p[k].second)){ |
429 431 | isDefined=True; |
430 432 | //cerr << k << " inside freqBegs " << freqBegs_p[k].second << " " << freqBeg << endl; |
431 433 | if(freqBegs_p[k].second < freqBeg) |