Commits

Rui Xue authored 1640624e024 Merge
Pull request #1457: PIPE-2517: fix a bug related to the scenario of consecutive calibrator scans in mosaic observations.

Merge in PIPE/pipeline from PIPE-2517-address-the-scenario-of-consecutive-calibrator-scans-in-mosaic-data-within-hif_selfcal to main * commit 'c57fbe24093384ecf71bd99f19f311609b19d242': PIPE-2517: fix a bug related to the scenario of consecutive calibrator scans in mosaic observations.

pipeline/hif/heuristics/auto_selfcal/auto_selfcal.py

Modified
1792 1792
1793 1793 scans = np.concatenate(scans)[order]
1794 1794 intents = np.concatenate(intents)[order]
1795 1795
1796 1796 is_gaincalibrator = intents == "phase"
1797 1797 scans = scans[is_gaincalibrator]
1798 1798
1799 1799 msmd.open(vis)
1800 1800 include_scans = []
1801 1801 for iscan in range(scans.size-1):
1802 - include_scans.append(",".join(np.intersect1d(msmd.scansforfield(target),
1803 - np.array(list(range(scans[iscan]+1, scans[iscan+1])))).astype(str)))
1802 + scan_group = np.intersect1d(msmd.scansforfield(target), np.array(
1803 + list(range(scans[iscan]+1, scans[iscan+1])))).astype(str)
1804 + if scan_group.size > 0:
1805 + include_scans.append(",".join(scan_group))
1804 1806 msmd.close()
1805 1807 elif guess_scan_combine:
1806 1808 msmd.open(vis)
1807 1809
1808 1810 scans = msmd.scansforfield(target)
1809 1811
1810 1812 include_scans = []
1811 1813 for iscan in range(scans.size):
1812 1814 if len(include_scans) > 0:
1813 1815 if str(scans[iscan]) in include_scans[-1]:

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

Add shortcut