Second Round of Full Day RFI Flagging¶
by Josh Dillon, last updated July 31, 2023
This notebook is synthesizes information from individual delay_filtered_average_zscore notebooks to find low-level RFI and flag it. That notebook takes smooth_cal
ibrated data, redundantly averages it, performs a high-pass delay filter, and then incoherently averages across baselines, creating a per-polarization z-score. This notebook then takes that whole night of z-scores and finds a new set of flags to both add to the smooth_cal
files, which are updated in place, and to write down as new UVFlag
waterfall-type .h5
files.
Here's a set of links to skip to particular figures and tables:
• Figure 1: Waterfall of Maximum z-Score of Either Polarization Before Round 2 Flagging¶
• Figure 2: Histogram of z-scores¶
• Figure 3: Waterfall of Maximum z-Score of Either Polarization After Round 2 Flagging¶
• Figure 4: Spectra of Time-Averaged z-Scores¶
• Figure 5: Summary of Flags Before and After Round 2 Flagging¶
import time
tstart = time.time()
import os
os.environ['HDF5_USE_FILE_LOCKING'] = 'FALSE'
import h5py
import hdf5plugin # REQUIRED to have the compression plugins available
import numpy as np
import glob
import matplotlib.pyplot as plt
import matplotlib
import copy
import warnings
from pyuvdata import UVFlag, UVCal
from hera_cal import utils
from hera_qm import xrfi
from hera_qm.time_series_metrics import true_stretches
from IPython.display import display, HTML
%matplotlib inline
display(HTML("<style>.container { width:100% !important; }</style>"))
_ = np.seterr(all='ignore') # get rid of red warnings
%config InlineBackend.figure_format = 'retina'
# get input data file names
SUM_FILE = os.environ.get("SUM_FILE", None)
# SUM_FILE = '/lustre/aoc/projects/hera/h6c-analysis/IDR2/2459861/zen.2459861.25297.sum.uvh5'
SUM_SUFFIX = os.environ.get("SUM_SUFFIX", 'sum.uvh5')
# get input and output suffixes
SMOOTH_CAL_SUFFIX = os.environ.get("SMOOTH_CAL_SUFFIX", 'sum.smooth.calfits')
ZSCORE_SUFFIX = os.environ.get("ZSCORE_SUFFIX", 'sum.red_avg_zscore.h5')
FLAG_WATERFALL2_SUFFIX = os.environ.get("FLAG_WATERFALL2_SUFFIX", 'sum.flag_waterfall_round_2.h5')
OUT_YAML_SUFFIX = os.environ.get("OUT_YAML_SUFFIX", '_aposteriori_flags.yaml')
OUT_YAML_DIR = os.environ.get("OUT_YAML_DIR", None)
# build globs
sum_glob = '.'.join(SUM_FILE.split('.')[:-3]) + '.*.' + SUM_SUFFIX
cal_files_glob = sum_glob.replace(SUM_SUFFIX, SMOOTH_CAL_SUFFIX)
zscore_glob = sum_glob.replace(SUM_SUFFIX, ZSCORE_SUFFIX)
# build out yaml file
if OUT_YAML_DIR is None:
OUT_YAML_DIR = os.path.dirname(SUM_FILE)
out_yaml_file = os.path.join(OUT_YAML_DIR, SUM_FILE.split('.')[-4] + OUT_YAML_SUFFIX)
# get flagging parameters
Z_THRESH = float(os.environ.get("Z_THRESH", 5))
WS_Z_THRESH = float(os.environ.get("WS_Z_THRESH", 4))
AVG_Z_THRESH = float(os.environ.get("AVG_Z_THRESH", 1))
MAX_FREQ_FLAG_FRAC = float(os.environ.get("MAX_FREQ_FLAG_FRAC", .25))
MAX_TIME_FLAG_FRAC = float(os.environ.get("MAX_TIME_FLAG_FRAC", .1))
for setting in ['Z_THRESH', 'WS_Z_THRESH', 'AVG_Z_THRESH', 'MAX_FREQ_FLAG_FRAC', 'MAX_TIME_FLAG_FRAC']:
print(f'{setting} = {eval(setting)}')
Z_THRESH = 5.0 WS_Z_THRESH = 4.0 AVG_Z_THRESH = 1.0 MAX_FREQ_FLAG_FRAC = 0.25 MAX_TIME_FLAG_FRAC = 0.1
Load z-scores¶
# load z-scores
zscore_files = sorted(glob.glob(zscore_glob))
print(f'Found {len(zscore_files)} *.{ZSCORE_SUFFIX} files starting with {zscore_files[0]}.')
uvf = UVFlag(zscore_files, use_future_array_shapes=True)
Found 1921 *.sum.red_avg_zscore.h5 files starting with /mnt/sn1/data2/2460594/zen.2460594.25255.sum.red_avg_zscore.h5.
# get calibration solution files
cal_files = sorted(glob.glob(cal_files_glob))
print(f'Found {len(cal_files)} *.{SMOOTH_CAL_SUFFIX} files starting with {cal_files[0]}.')
Found 1921 *.sum.smooth.calfits files starting with /mnt/sn1/data2/2460594/zen.2460594.25255.sum.smooth.calfits.
assert len(zscore_files) == len(cal_files)
# extract z-scores and correct by a single number per polarization to account for biases created by filtering
zscore = {pol: uvf.metric_array[:, :, np.argwhere(uvf.polarization_array == utils.polstr2num(pol, x_orientation=uvf.x_orientation))[0][0]] for pol in ['ee', 'nn']}
zscore = {pol: zscore[pol] - np.nanmedian(zscore[pol]) for pol in zscore}
freqs = uvf.freq_array
times = uvf.time_array
extent = [freqs[0] / 1e6, freqs[-1] / 1e6, times[-1] - int(times[0]), times[0] - int(times[0])]
def plot_max_z_score(zscore, flags=None):
if flags is None:
flags = np.any(~np.isfinite(list(zscore.values())), axis=0)
plt.figure(figsize=(14,10), dpi=100)
plt.imshow(np.where(flags, np.nan, np.nanmax([zscore['ee'], zscore['nn']], axis=0)), aspect='auto',
cmap='coolwarm', interpolation='none', vmin=-10, vmax=10, extent=extent)
plt.colorbar(location='top', label='Max z-score of either polarization', extend='both', aspect=40, pad=.02)
plt.xlabel('Frequency (MHz)')
plt.ylabel(f'JD - {int(times[0])}')
plt.tight_layout()
Figure 1: Waterfall of Maximum z-Score of Either Polarization Before Round 2 Flagging¶
Shows the worse of the two results from delay_filtered_average_zscore from either polarization. Dips near flagged channels are expected, due to overfitting of noise. Positive-going excursions are problematic and likely evidence of RFI.
plot_max_z_score(zscore)
All-NaN axis encountered
def plot_histogram():
plt.figure(figsize=(14,4), dpi=100)
bins = np.arange(-50, 100, .1)
hist_ee = plt.hist(np.ravel(zscore['ee']), bins=bins, density=True, label='ee-polarized z-scores', alpha=.5)
hist_nn = plt.hist(np.ravel(zscore['nn']), bins=bins, density=True, label='nn-polarized z-scores', alpha=.5)
plt.plot(bins, (2*np.pi)**-.5 * np.exp(-bins**2 / 2), 'k:', label='Gaussian approximate\nnoise-only distribution')
plt.axvline(WS_Z_THRESH, c='r', ls='--', label='Watershed z-score')
plt.axvline(Z_THRESH, c='r', ls='-', label='Threshold z-score')
plt.yscale('log')
all_densities = np.concatenate([hist_ee[0][hist_ee[0] > 0], hist_nn[0][hist_nn[0] > 0]])
plt.ylim(np.min(all_densities) / 2, np.max(all_densities) * 2)
plt.xlim([-50, 100])
plt.legend()
plt.xlabel('z-score')
plt.ylabel('Density')
plt.tight_layout()
Figure 2: Histogram of z-scores¶
Shows a comparison of the histogram of z-scores in this file (one per polarization) to a Gaussian approximation of what one might expect from thermal noise. Without filtering, the actual distribution is a weighted sum of Rayleigh distributions. Filtering further complicates this. To make the z-scores more reliable, a single per-polarization median is subtracted from each waterfall, which allows us to flag low-level outliers with more confidence. Any points beyond the solid red line are flagged. Any points neighboring a flag beyond the dashed red line are also flagged. Finally, flagging is performed for low-level outliers in whole times or channels.
plot_histogram()
Perform flagging¶
def iteratively_flag_on_averaged_zscore(flags, zscore, avg_z_thresh=1.5, verbose=True):
'''Flag whole integrations or channels based on average z-score. This is done
iteratively to prevent bad times affecting channel averages or vice versa.'''
flagged_chan_count = 0
flagged_int_count = 0
while True:
zspec = np.nanmean(np.where(flags, np.nan, zscore), axis=0)
ztseries = np.nanmean(np.where(flags, np.nan, zscore), axis=1)
if (np.nanmax(zspec) < avg_z_thresh) and (np.nanmax(ztseries) < avg_z_thresh):
break
if np.nanmax(zspec) >= np.nanmax(ztseries):
flagged_chan_count += np.sum((zspec >= np.nanmax(ztseries)) & (zspec >= avg_z_thresh))
flags[:, (zspec >= np.nanmax(ztseries)) & (zspec >= avg_z_thresh)] = True
else:
flagged_int_count += np.sum((ztseries >= np.nanmax(zspec)) & (ztseries >= avg_z_thresh))
flags[(ztseries >= np.nanmax(zspec)) & (ztseries >= avg_z_thresh), :] = True
if verbose:
print(f'\tFlagging an additional {flagged_int_count} integrations and {flagged_chan_count} channels.')
def impose_max_chan_flag_frac(flags, max_flag_frac=.25, verbose=True):
'''Flag channels already flagged more than max_flag_frac (excluding completely flagged times).'''
unflagged_times = ~np.all(flags, axis=1)
frequently_flagged_chans = np.mean(flags[unflagged_times, :], axis=0) >= max_flag_frac
if verbose:
print(f'\tFlagging {np.sum(frequently_flagged_chans) - np.sum(np.all(flags, axis=0))} channels previously flagged {max_flag_frac:.2%} or more.')
flags[:, frequently_flagged_chans] = True
def impose_max_time_flag_frac(flags, max_flag_frac=.25, verbose=True):
'''Flag times already flagged more than max_flag_frac (excluding completely flagged channels).'''
unflagged_chans = ~np.all(flags, axis=0)
frequently_flagged_times = np.mean(flags[:, unflagged_chans], axis=1) >= max_flag_frac
if verbose:
print(f'\tFlagging {np.sum(frequently_flagged_times) - np.sum(np.all(flags, axis=1))} times previously flagged {max_flag_frac:.2%} or more.')
flags[frequently_flagged_times, :] = True
flags = np.any(~np.isfinite(list(zscore.values())), axis=0)
print(f'{np.mean(flags):.3%} of waterfall flagged to start.')
# flag largest outliers
for pol in ['ee', 'nn']:
flags |= (zscore[pol] > Z_THRESH)
print(f'{np.mean(flags):.3%} of waterfall flagged after flagging z > {Z_THRESH} outliers.')
# watershed flagging
while True:
nflags = np.sum(flags)
for pol in ['ee', 'nn']:
flags |= xrfi._ws_flag_waterfall(zscore[pol], flags, WS_Z_THRESH)
if np.sum(flags) == nflags:
break
print(f'{np.mean(flags):.3%} of waterfall flagged after watershed flagging on z > {WS_Z_THRESH} neightbors of prior flags.')
# flag whole integrations or channels
while True:
nflags = np.sum(flags)
for pol in ['ee', 'nn']:
iteratively_flag_on_averaged_zscore(flags, zscore[pol], avg_z_thresh=AVG_Z_THRESH, verbose=True)
impose_max_chan_flag_frac(flags, max_flag_frac=MAX_FREQ_FLAG_FRAC, verbose=True)
impose_max_time_flag_frac(flags, max_flag_frac=MAX_TIME_FLAG_FRAC, verbose=True)
if np.sum(flags) == nflags:
break
print(f'{np.mean(flags):.3%} of waterfall flagged after flagging whole times and channels with average z > {AVG_Z_THRESH}.')
41.196% of waterfall flagged to start. 42.669% of waterfall flagged after flagging z > 5.0 outliers.
43.028% of waterfall flagged after watershed flagging on z > 4.0 neightbors of prior flags.
Mean of empty slice Mean of empty slice
Flagging an additional 0 integrations and 12 channels. Flagging 6 channels previously flagged 25.00% or more. Flagging 294 times previously flagged 10.00% or more.
Flagging an additional 0 integrations and 1 channels. Flagging 0 channels previously flagged 25.00% or more. Flagging 0 times previously flagged 10.00% or more. Flagging an additional 0 integrations and 0 channels. Flagging 0 channels previously flagged 25.00% or more. Flagging 0 times previously flagged 10.00% or more.
Flagging an additional 0 integrations and 0 channels. Flagging 0 channels previously flagged 25.00% or more. Flagging 0 times previously flagged 10.00% or more. 48.845% of waterfall flagged after flagging whole times and channels with average z > 1.0.
Show results of flagging¶
Figure 3: Waterfall of Maximum z-Score of Either Polarization After Round 2 Flagging¶
The same as Figure 1, but after the flagging performed in this notebook.
plot_max_z_score(zscore, flags=flags)
All-NaN axis encountered
def zscore_spectra():
fig, axes = plt.subplots(2, 1, figsize=(14,6), dpi=100, sharex=True, sharey=True, gridspec_kw={'hspace': 0})
for ax, pol in zip(axes, ['ee', 'nn']):
ax.plot(freqs / 1e6, np.nanmean(zscore[pol], axis=0),'r', label=f'{pol}-Polarization Before Round 2 Flagging', lw=.5)
ax.plot(freqs / 1e6, np.nanmean(np.where(flags, np.nan, zscore[pol]), axis=0), label=f'{pol}-Polarization After Round 2 Flagging')
ax.legend(loc='lower right')
ax.set_ylabel('Time-Averged Z-Score\n(Excluding Flags)')
ax.set_ylim(-11, 11)
axes[1].set_xlabel('Frequency (MHz)')
plt.tight_layout()
Figure 4: Spectra of Time-Averaged z-Scores¶
The average along the time axis of Figures 1 and 3 (though now separated per-polarization). This plot is useful for showing channels with repeated low-level RFI.
zscore_spectra()
Mean of empty slice Mean of empty slice
def summarize_flagging():
plt.figure(figsize=(14,10), dpi=100)
cmap = matplotlib.colors.ListedColormap(((0, 0, 0),) + matplotlib.cm.get_cmap("Set2").colors[0:2])
plt.imshow(np.where(np.any(~np.isfinite(list(zscore.values())), axis=0), 1, np.where(flags, 2, 0)),
aspect='auto', cmap=cmap, interpolation='none', extent=extent)
plt.clim([-.5, 2.5])
cbar = plt.colorbar(location='top', aspect=40, pad=.02)
cbar.set_ticks([0, 1, 2])
cbar.set_ticklabels(['Unflagged', 'Previously Flagged', 'Flagged Here Using Delayed Filtered z-Scores'])
plt.xlabel('Frequency (MHz)')
plt.ylabel(f'JD - {int(times[0])}')
plt.tight_layout()
Figure 5: Summary of Flags Before and After Round 2 Flagging¶
This plot shows which times and frequencies were flagged before and after this notebook. It is directly comparable to Figure 5 of the first round full_day_rfi notebook.
summarize_flagging()
The get_cmap function was deprecated in Matplotlib 3.7 and will be removed two minor releases later. Use ``matplotlib.colormaps[name]`` or ``matplotlib.colormaps.get_cmap(obj)`` instead.
Save results¶
add_to_history = 'by full_day_rfi_round_2 notebook with the following environment:\n' + '=' * 65 + '\n' + os.popen('conda env export').read() + '=' * 65
tind = 0
always_flagged_ants = set()
ever_unflagged_ants = set()
for cal_file in cal_files:
with warnings.catch_warnings():
warnings.simplefilter("ignore")
# update cal_file
uvc = UVCal()
uvc.read(cal_file, use_future_array_shapes=True)
uvc.flag_array |= (flags[tind:tind + len(uvc.time_array), :].T)[None, :, :, None]
uvc.history += 'Modified ' + add_to_history
uvc.write_calfits(cal_file, clobber=True)
# keep track of flagged antennas
for antnum in uvc.ant_array:
for antpol in ['Jee', 'Jnn']:
if np.all(uvc.get_flags(antnum, antpol)):
if (antnum, antpol) not in ever_unflagged_ants:
always_flagged_ants.add((antnum, antpol))
else:
ever_unflagged_ants.add((antnum, antpol))
always_flagged_ants.discard((antnum, antpol))
# Create new flag object
uvf_out = UVFlag(uvc, waterfall=True, mode='flag')
uvf_out.flag_array |= flags[tind:tind + len(uvc.time_array), :, None]
uvf_out.history += 'Produced ' + add_to_history
uvf_out.write(cal_file.replace(SMOOTH_CAL_SUFFIX, FLAG_WATERFALL2_SUFFIX), clobber=True)
# increment time index
tind += len(uvc.time_array)
print(f'Saved {len(cal_files)} *.{FLAG_WATERFALL2_SUFFIX} files starting with {cal_files[0].replace(SMOOTH_CAL_SUFFIX, FLAG_WATERFALL2_SUFFIX)}.')
Saved 1921 *.sum.flag_waterfall_round_2.h5 files starting with /mnt/sn1/data2/2460594/zen.2460594.25255.sum.flag_waterfall_round_2.h5.
# write summary of entirely flagged times/freqs/ants to yaml
all_flagged_times = np.all(flags, axis=1)
all_flagged_freqs = np.all(flags, axis=0)
all_flagged_ants = sorted(always_flagged_ants)
dt = np.median(np.diff(times))
out_yml_str = 'JD_flags: ' + str([[times[flag_stretch][0] - dt / 2, times[flag_stretch][-1] + dt / 2]
for flag_stretch in true_stretches(all_flagged_times)])
df = np.median(np.diff(freqs))
out_yml_str += '\n\nfreq_flags: ' + str([[freqs[flag_stretch][0] - df / 2, freqs[flag_stretch][-1] + df / 2]
for flag_stretch in true_stretches(all_flagged_freqs)])
out_yml_str += '\n\nex_ants: ' + str(all_flagged_ants).replace("'", "").replace('(', '[').replace(')', ']')
print(f'Writing the following to {out_yaml_file}\n' + '-' * (25 + len(out_yaml_file)))
print(out_yml_str)
with open(out_yaml_file, 'w') as outfile:
outfile.writelines(out_yml_str)
Writing the following to /mnt/sn1/data2/2460594/2460594_aposteriori_flags.yaml ------------------------------------------------------------------------------ JD_flags: [[2460594.252663199, 2460594.252886895], [2460594.252998743, 2460594.253557984], [2460594.25378168, 2460594.254788313], [2460594.2550120093, 2460594.2560186423], [2460594.2561304905, 2460594.2562423386], [2460594.2631769213, 2460594.2632887694], [2460594.2648546426, 2460594.2649664907], [2460594.268098238, 2460594.268321934], [2460594.269664111, 2460594.269775959], [2460594.271677377, 2460594.2719010734], [2460594.272460314, 2460594.272572162], [2460594.273355099, 2460594.273466947], [2460594.273578795, 2460594.2739143395], [2460594.274249884, 2460594.274361732], [2460594.27447358, 2460594.274585428], [2460594.274809124, 2460594.274920972], [2460594.27503282, 2460594.275927605], [2460594.2761513013, 2460594.2762631495], [2460594.27682239, 2460594.2771579344], [2460594.2783882637, 2460594.278500112], [2460594.2790593524, 2460594.2802896816], [2460594.281296314, 2460594.2824147954], [2460594.2825266435, 2460594.2836451246], [2460594.2837569728, 2460594.283868821], [2460594.283980669, 2460594.284763606], [2460594.28509915, 2460594.2852109983], [2460594.2853228464, 2460594.2854346945], [2460594.2858820865, 2460594.2859939346], [2460594.286553175, 2460594.2870005677], [2460594.287112416, 2460594.287336112], [2460594.287559808, 2460594.2877835045], [2460594.288119049, 2460594.288230897], [2460594.288454593, 2460594.2885664413], [2460594.2890138337, 2460594.289125682], [2460594.28923753, 2460594.289461226], [2460594.2895730743, 2460594.290020467], [2460594.290132315, 2460594.2908034036], [2460594.2910271, 2460594.2920337324], [2460594.2921455805, 2460594.2929285173], [2460594.2930403654, 2460594.293487758], [2460594.293599606, 2460594.2940469985], [2460594.2941588466, 2460594.2949417834], [2460594.2950536315, 2460594.29572472], [2460594.2958365683, 2460594.296619505], [2460594.2967313533, 2460594.2969550495], [2460594.297066897, 2460594.297849834], [2460594.297961682, 2460594.29807353], [2460594.2982972264, 2460594.298632771], [2460594.298744619, 2460594.2991920114], [2460594.2994157076, 2460594.299751252], [2460594.3001986444, 2460594.300757885], [2460594.300869733, 2460594.3019882143], [2460594.3024356067, 2460594.303218543], [2460594.3034422393, 2460594.3035540874], [2460594.3037777836, 2460594.3038896318], [2460594.3044488723, 2460594.304896265], [2460594.305008113, 2460594.3054555054], [2460594.3057910497, 2460594.306014746], [2460594.306126594, 2460594.307021379], [2460594.307133227, 2460594.3072450752], [2460594.3076924677, 2460594.30813986], [2460594.3082517083, 2460594.308587252], [2460594.3086991003, 2460594.3098175814], [2460594.31048867, 2460594.3109360626], [2460594.3116071513, 2460594.3117189994], [2460594.3118308475, 2460594.316528468], [2460594.316640316, 2460594.32469338], [2460594.324805228, 2460594.3566819383], [2460594.3567937864, 2460594.3571293307], [2460594.357241179, 2460594.3579122676], [2460594.3580241157, 2460594.358135964], [2460594.3586952044, 2460594.3588070525], [2460594.3593662926, 2460594.359701837], [2460594.36070847, 2460594.360820318], [2460594.361826951, 2460594.3619387993], [2460594.36249804, 2460594.362609888], [2460594.362721736, 2460594.3629454323], [2460594.363728369, 2460594.3638402172], [2460594.3647350017, 2460594.36484685], [2460594.366971964, 2460594.3671956602], [2460594.380393737, 2460594.3807292813], [2460594.386657231, 2460594.386769079], [2460594.3875520155, 2460594.3876638636], [2460594.388111256, 2460594.388223104], [2460594.3884468004, 2460594.3885586485], [2460594.400638244, 2460594.400750092], [2460594.4029870545, 2460594.4030989027], [2460594.4041055352, 2460594.4042173834], [2460594.404888472, 2460594.40500032], [2460594.406901738, 2460594.4070135863], [2460594.4090268523, 2460594.4091387005], [2460594.4122704472, 2460594.4123822954], [2460594.414731106, 2460594.41506665], [2460594.4170799158, 2460594.417191764], [2460594.4208827517, 2460594.4209946], [2460594.4281528783, 2460594.4282647264], [2460594.428935815, 2460594.429047663], [2460594.4291595113, 2460594.4292713595], [2460594.429606904, 2460594.429718752], [2460594.4335215874, 2460594.4336334355], [2460594.4354230054, 2460594.4355348535], [2460594.437212575, 2460594.4373244233], [2460594.440344322, 2460594.44045617], [2460594.441462803, 2460594.4415746513], [2460594.443476069, 2460594.443587917], [2460594.4439234613, 2460594.4440353094], [2460594.4443708537, 2460594.44459455], [2460594.445601183, 2460594.445713031], [2460594.44638412, 2460594.446607816], [2460594.447726297, 2460594.4479499934], [2460594.448285538, 2460594.448509234], [2460594.449963259, 2460594.450075107], [2460594.4515291327, 2460594.451640981], [2460594.451976525, 2460594.4520883732], [2460594.4530950063, 2460594.4532068544], [2460594.4541016393, 2460594.4543253356], [2460594.4555556644, 2460594.4556675125], [2460594.457233386, 2460594.457345234], [2460594.4574570823, 2460594.458016323], [2460594.458128171, 2460594.458240019], [2460594.461595462, 2460594.4617073103], [2460594.4638324245, 2460594.4639442726], [2460594.4646153613, 2460594.4648390575], [2460594.4664049307, 2460594.466516779], [2460594.466628627, 2460594.466740475], [2460594.4670760194, 2460594.4671878675], [2460594.468753741, 2460594.4688655892], [2460594.469648526, 2460594.469760374], [2460594.471997336, 2460594.4722210323], [2460594.4777015895, 2460594.4778134376], [2460594.4823992103, 2460594.4825110584], [2460594.4826229066, 2460594.4827347547], [2460594.483405843, 2460594.483517691], [2460594.483629539, 2460594.4839650835], [2460594.4848598684, 2460594.4849717165], [2460594.486202046, 2460594.486313894], [2460594.4900048813, 2460594.4901167294], [2460594.49067597, 2460594.490899666], [2460594.4912352106, 2460594.4913470587], [2460594.4954854385, 2460594.4955972866], [2460594.4971631602, 2460594.4972750084], [2460594.5035385024, 2460594.5036503505], [2460594.505104376, 2460594.505216224], [2460594.506558401, 2460594.506670249], [2460594.5071176416, 2460594.5072294897], [2460594.5077887303, 2460594.5080124266], [2460594.5086835152, 2460594.5087953634], [2460594.509354604, 2460594.509466452], [2460594.5096901483, 2460594.5098019964], [2460594.5120389583, 2460594.5122626545], [2460594.5124863507, 2460594.512710047], [2460594.512933743, 2460594.5130455913], [2460594.513828528, 2460594.513940376], [2460594.514499617, 2460594.514611465], [2460594.5160654904, 2460594.5161773385], [2460594.5167365787, 2460594.5172958192], [2460594.5176313636, 2460594.5177432117], [2460594.5184143004, 2460594.5185261485], [2460594.5195327816, 2460594.5196446297], [2460594.5204275665, 2460594.520763111], [2460594.520874959, 2460594.520986807], [2460594.5214341995, 2460594.521769744], [2460594.52255268, 2460594.5227763765], [2460594.5228882246, 2460594.523111921], [2460594.524118554, 2460594.52434225], [2460594.5249014907, 2460594.525013339], [2460594.525348883, 2460594.5256844275], [2460594.5259081237, 2460594.526019972], [2460594.52613182, 2460594.526243668], [2460594.5266910605, 2460594.5268029086], [2460594.5269147567, 2460594.527250301], [2460594.527362149, 2460594.5274739973], [2460594.5280332374, 2460594.5281450856], [2460594.5288161743, 2460594.5289280224], [2460594.530717592, 2460594.5308294403], [2460594.5309412885, 2460594.5311649847], [2460594.531388681, 2460594.531612377], [2460594.532507162, 2460594.5329545545], [2460594.533290099, 2460594.533401947], [2460594.533625643, 2460594.533961187], [2460594.53496782, 2460594.5355270607], [2460594.5363099976, 2460594.536533694], [2460594.5372047825, 2460594.5374284787], [2460594.537540327, 2460594.537764023], [2460594.5397772887, 2460594.539889137], [2460594.540000985, 2460594.540112833], [2460594.5403365293, 2460594.5404483774], [2460594.5405602255, 2460594.54089577], [2460594.5413431623, 2460594.5423497953], [2460594.5425734916, 2460594.543020884], [2460594.5434682765, 2460594.544139365], [2460594.5445867577, 2460594.544698606], [2460594.5450341497, 2460594.545369694], [2460594.5455933902, 2460594.5458170865], [2460594.5459289346, 2460594.5469355676], [2460594.547159264, 2460594.54738296], [2460594.5476066563, 2460594.5479422007], [2460594.548165897, 2460594.548389593], [2460594.5485014413, 2460594.5487251375], [2460594.5488369856, 2460594.54917253], [2460594.5495080743, 2460594.5496199224], [2460594.5497317705, 2460594.5498436186], [2460594.5499554668, 2460594.550067315], [2460594.550179163, 2460594.550402859], [2460594.5530872135, 2460594.553534606], [2460594.554429391, 2460594.554541239], [2460594.554653087, 2460594.5548767834], [2460594.5557715683, 2460594.556107112], [2460594.5573374415, 2460594.5574492896], [2460594.557784834, 2460594.55800853], [2460594.5581203783, 2460594.5582322264], [2460594.5585677708, 2460594.558679619], [2460594.559015163, 2460594.5591270113], [2460594.5592388595, 2460594.5594625557], [2460594.5601336444, 2460594.5603573406], [2460594.5604691887, 2460594.560581037], [2460594.5616995175, 2460594.5618113657], [2460594.561923214, 2460594.562035062], [2460594.562258758, 2460594.5624824543], [2460594.5636009355, 2460594.56393648], [2460594.5643838723, 2460594.5647194167], [2460594.5656142016, 2460594.5657260497], [2460594.565837898, 2460594.565949746], [2460594.566061594, 2460594.566173442], [2460594.5665089865, 2460594.5666208346], [2460594.566844531, 2460594.567068227], [2460594.567180075, 2460594.5672919233], [2460594.5680748597, 2460594.568410404], [2460594.5687459484, 2460594.5690814927], [2460594.5696407333, 2460594.5697525814], [2460594.5700881258, 2460594.570199974], [2460594.5709829107, 2460594.571094759], [2460594.571430303, 2460594.5715421513], [2460594.5716539994, 2460594.572436936], [2460594.5726606324, 2460594.5731080244], [2460594.573443569, 2460594.573667265], [2460594.5738909612, 2460594.5740028094], [2460594.574450202, 2460594.5748975943], [2460594.5752331386, 2460594.5753449867], [2460594.575568683, 2460594.575680531], [2460594.5760160754, 2460594.5761279236], [2460594.5767990123, 2460594.5769108604], [2460594.5770227085, 2460594.5771345566], [2460594.577581949, 2460594.5780293415], [2460594.5781411896, 2460594.5782530378], [2460594.578924126, 2460594.579147822], [2460594.579930759, 2460594.580042607], [2460594.580713696, 2460594.58104924], [2460594.5820558732, 2460594.5821677214], [2460594.5823914176, 2460594.5825032657], [2460594.582726962, 2460594.582950658], [2460594.5830625063, 2460594.5833980506], [2460594.5835098987, 2460594.583621747], [2460594.583733595, 2460594.583845443], [2460594.584292835, 2460594.5845165313], [2460594.5846283794, 2460594.5847402276], [2460594.5848520757, 2460594.584963924], [2460594.585075772, 2460594.58518762], [2460594.5854113162, 2460594.5855231644], [2460594.5858587087, 2460594.5865297974], [2460594.5866416455, 2460594.5868653418], [2460594.587200886, 2460594.5874245823], [2460594.5875364305, 2460594.5877601267], [2460594.587871975, 2460594.588095671], [2460594.5883193673, 2460594.5884312154], [2460594.589102304, 2460594.589214152], [2460594.5894378484, 2460594.5901089367], [2460594.590220785, 2460594.590332633], [2460594.5907800253, 2460594.5910037216], [2460594.591562962, 2460594.5916748103], [2460594.5921222027, 2460594.592234051], [2460594.592457747, 2460594.592569595], [2460594.5935762282, 2460594.5940236207], [2460594.594247317, 2460594.5946947094], [2460594.59525395, 2460594.595477646], [2460594.595589494, 2460594.595701342], [2460594.595925038, 2460594.5960368863], [2460594.5962605826, 2460594.5963724307], [2460594.5970435194, 2460594.5971553675], [2460594.5972672156, 2460594.5973790637], [2460594.5983856968, 2460594.598497545], [2460594.598609393, 2460594.598721241], [2460594.598833089, 2460594.5990567855], [2460594.5991686336, 2460594.5992804817], [2460594.599727874, 2460594.6001752666], [2460594.600510811, 2460594.600734507], [2460594.601181899, 2460594.6012937473], [2460594.6015174435, 2460594.601852988], [2460594.601964836, 2460594.602076684], [2460594.602971469, 2460594.6035307096], [2460594.60408995, 2460594.6044254946], [2460594.6045373427, 2460594.604761039], [2460594.604872887, 2460594.6052084314], [2460594.6061032163, 2460594.6062150644], [2460594.6064387606, 2460594.607333545], [2460594.607445393, 2460594.6078927857], [2460594.6096823555, 2460594.609906052], [2460594.6100179, 2460594.610241596], [2460594.6103534442, 2460594.6108008367], [2460594.611024533, 2460594.611248229], [2460594.6113600773, 2460594.6115837735], [2460594.612031166, 2460594.61236671], [2460594.6128141023, 2460594.6129259504], [2460594.6131496467, 2460594.613261495], [2460594.613597039, 2460594.6138207354], [2460594.6140444316, 2460594.6141562797], [2460594.614268128, 2460594.614379976], [2460594.6147155203, 2460594.6149392165], [2460594.6150510646, 2460594.615274761], [2460594.616281394, 2460594.61650509], [2460594.617176179, 2460594.617288027], [2460594.617399875, 2460594.617511723], [2460594.6178472675, 2460594.6179591157], [2460594.6181828114, 2460594.6182946595], [2460594.6184065077, 2460594.6194131407], [2460594.619524989, 2460594.619636837], [2460594.619748685, 2460594.6201960775], [2460594.6203079256, 2460594.6204197737], [2460594.620531622, 2460594.62064347], [2460594.6213145587, 2460594.621426407], [2460594.622768584, 2460594.6228804323], [2460594.6235515205, 2460594.623887065], [2460594.625900331, 2460594.626124027], [2460594.626906964, 2460594.627018812], [2460594.62713066, 2460594.6273543565], [2460594.628025445, 2460594.6281372933], [2460594.6282491414, 2460594.6283609895], [2460594.629032078, 2460594.6291439263], [2460594.629255774, 2460594.62947947], [2460594.6299268627, 2460594.630038711], [2460594.630262407, 2460594.630374255], [2460594.6317164325, 2460594.6319401287], [2460594.6327230656, 2460594.632946762], [2460594.633170458, 2460594.633282306], [2460594.633953395, 2460594.634065243], [2460594.6344007873, 2460594.6345126354], [2460594.6352955718, 2460594.63540742], [2460594.637420686, 2460594.637644382], [2460594.6387628634, 2460594.6389865596], [2460594.6405524327, 2460594.640776129], [2460594.642565699, 2460594.642677547], [2460594.643572332, 2460594.64368418], [2460594.644578965, 2460594.644802661], [2460594.64547375, 2460594.645585598], [2460594.6459211423, 2460594.6460329904], [2460594.6467040787, 2460594.646815927], [2460594.64782256, 2460594.647934408], [2460594.6487173447, 2460594.648829193], [2460594.649164737, 2460594.6492765853], [2460594.6502832184, 2460594.6503950665], [2460594.6514016995, 2460594.6515135476], [2460594.652296484, 2460594.652408332], [2460594.654421598, 2460594.655428231], [2460594.658559978, 2460594.6591192186], [2460594.659566611, 2460594.659678459], [2460594.6600140035, 2460594.6601258516], [2460594.6628102064, 2460594.6630339026], [2460594.6634812946, 2460594.663704991], [2460594.66493532, 2460594.6650471683], [2460594.665606409, 2460594.665830105], [2460594.6669485862, 2460594.684620587]] freq_flags: [[46859741.2109375, 46981811.5234375], [47592163.0859375, 48202514.6484375], [49911499.0234375, 50277709.9609375], [54183959.9609375, 54916381.8359375], [56381225.5859375, 56747436.5234375], [62240600.5859375, 62850952.1484375], [69931030.2734375, 70053100.5859375], [82870483.3984375, 83602905.2734375], [84213256.8359375, 84579467.7734375], [85433959.9609375, 86288452.1484375], [87142944.3359375, 108139038.0859375], [109970092.7734375, 110092163.0859375], [112655639.6484375, 112777709.9609375], [113265991.2109375, 113388061.5234375], [113632202.1484375, 113754272.4609375], [116073608.3984375, 116195678.7109375], [116439819.3359375, 116561889.6484375], [116683959.9609375, 116806030.2734375], [124740600.5859375, 125350952.1484375], [127548217.7734375, 127670288.0859375], [129989624.0234375, 130111694.3359375], [136215209.9609375, 136459350.5859375], [136947631.8359375, 138046264.6484375], [138656616.2109375, 138778686.5234375], [141464233.3984375, 141586303.7109375], [141708374.0234375, 141830444.3359375], [142074584.9609375, 142318725.5859375], [143783569.3359375, 144027709.9609375], [144882202.1484375, 145004272.4609375], [145492553.7109375, 145614624.0234375], [145736694.3359375, 145858764.6484375], [147445678.7109375, 147567749.0234375], [148422241.2109375, 148544311.5234375], [149154663.0859375, 149276733.3984375], [149887084.9609375, 150009155.2734375], [154159545.8984375, 154403686.5234375], [155258178.7109375, 155380249.0234375], [155990600.5859375, 156112670.8984375], [159164428.7109375, 159286499.0234375], [169906616.2109375, 170150756.8359375], [170883178.7109375, 171005249.0234375], [175155639.6484375, 175277709.9609375], [181137084.9609375, 181259155.2734375], [183212280.2734375, 183334350.5859375], [187362670.8984375, 187606811.5234375], [189926147.4609375, 190048217.7734375], [191146850.5859375, 191513061.5234375], [192367553.7109375, 192611694.3359375], [192855834.9609375, 192977905.2734375], [193222045.8984375, 193344116.2109375], [197128295.8984375, 197372436.5234375], [198104858.3984375, 198348999.0234375], [199203491.2109375, 199325561.5234375], [201766967.7734375, 201889038.0859375], [204940795.8984375, 205062866.2109375], [207138061.5234375, 207260131.8359375], [208480834.9609375, 208724975.5859375], [209945678.7109375, 210067749.0234375], [212142944.3359375, 212265014.6484375], [215194702.1484375, 215316772.4609375], [220687866.2109375, 220809936.5234375], [223007202.1484375, 223373413.0859375], [227401733.3984375, 227523803.7109375], [229110717.7734375, 229354858.3984375], [229965209.9609375, 230087280.2734375], [231063842.7734375, 231185913.0859375]] ex_ants: [[7, Jee], [8, Jee], [9, Jee], [15, Jnn], [16, Jee], [18, Jee], [18, Jnn], [21, Jee], [22, Jee], [22, Jnn], [27, Jee], [27, Jnn], [28, Jee], [28, Jnn], [31, Jnn], [33, Jnn], [34, Jee], [34, Jnn], [35, Jee], [35, Jnn], [36, Jee], [36, Jnn], [37, Jnn], [40, Jnn], [42, Jnn], [45, Jee], [46, Jee], [47, Jee], [47, Jnn], [48, Jee], [48, Jnn], [49, Jee], [49, Jnn], [51, Jee], [54, Jnn], [55, Jee], [61, Jee], [61, Jnn], [62, Jee], [62, Jnn], [63, Jee], [63, Jnn], [64, Jee], [64, Jnn], [69, Jee], [72, Jnn], [73, Jee], [77, Jee], [77, Jnn], [78, Jee], [78, Jnn], [82, Jnn], [84, Jnn], [85, Jnn], [86, Jee], [86, Jnn], [87, Jee], [88, Jee], [88, Jnn], [90, Jee], [90, Jnn], [91, Jee], [92, Jee], [95, Jee], [96, Jee], [97, Jnn], [98, Jnn], [100, Jnn], [101, Jnn], [102, Jnn], [104, Jnn], [107, Jee], [107, Jnn], [108, Jnn], [109, Jnn], [120, Jee], [120, Jnn], [121, Jee], [121, Jnn], [130, Jee], [130, Jnn], [132, Jee], [132, Jnn], [134, Jee], [136, Jee], [136, Jnn], [137, Jee], [137, Jnn], [142, Jnn], [144, Jee], [144, Jnn], [161, Jnn], [170, Jee], [171, Jnn], [176, Jee], [176, Jnn], [177, Jee], [177, Jnn], [178, Jee], [178, Jnn], [179, Jee], [179, Jnn], [180, Jee], [180, Jnn], [181, Jnn], [182, Jee], [184, Jee], [188, Jnn], [189, Jee], [189, Jnn], [193, Jee], [194, Jee], [198, Jnn], [199, Jnn], [200, Jee], [200, Jnn], [201, Jnn], [202, Jnn], [204, Jee], [204, Jnn], [205, Jee], [205, Jnn], [206, Jee], [206, Jnn], [208, Jee], [209, Jnn], [212, Jnn], [213, Jee], [213, Jnn], [215, Jee], [215, Jnn], [218, Jnn], [232, Jee], [235, Jee], [240, Jee], [240, Jnn], [241, Jee], [241, Jnn], [242, Jee], [242, Jnn], [243, Jee], [243, Jnn], [245, Jnn], [246, Jee], [246, Jnn], [250, Jee], [251, Jee], [253, Jnn], [255, Jnn], [256, Jee], [256, Jnn], [261, Jee], [261, Jnn], [262, Jee], [262, Jnn], [266, Jee], [268, Jnn], [270, Jee], [270, Jnn], [272, Jee], [281, Jee], [281, Jnn], [320, Jee], [320, Jnn], [321, Jee], [321, Jnn], [323, Jee], [323, Jnn], [324, Jee], [324, Jnn], [325, Jee], [325, Jnn], [326, Jee], [326, Jnn], [327, Jee], [327, Jnn], [328, Jee], [328, Jnn], [329, Jee], [329, Jnn], [331, Jee], [331, Jnn], [332, Jee], [332, Jnn], [333, Jee], [333, Jnn], [336, Jee], [336, Jnn], [340, Jee], [340, Jnn]]
Metadata¶
for repo in ['hera_cal', 'hera_qm', 'hera_filters', 'hera_notebook_templates', 'pyuvdata']:
exec(f'from {repo} import __version__')
print(f'{repo}: {__version__}')
hera_cal: 3.6.2.dev110+g0529798 hera_qm: 2.2.0 hera_filters: 0.1.6.dev1+g297dcce
hera_notebook_templates: 0.1.dev936+gdc93cad pyuvdata: 3.0.1.dev70+g283dda3
print(f'Finished execution in {(time.time() - tstart) / 60:.2f} minutes.')
Finished execution in 44.89 minutes.