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 1571 *.sum.red_avg_zscore.h5 files starting with /mnt/sn1/data1/2460551/zen.2460551.16919.sum.red_avg_zscore.h5.
UVParameter instrument does not match. Combining anyway. UVParameter antenna_diameters does not match. Combining anyway.
# 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 1571 *.sum.smooth.calfits files starting with /mnt/sn1/data1/2460551/zen.2460551.16919.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}.')
60.598% of waterfall flagged to start. 62.839% of waterfall flagged after flagging z > 5.0 outliers.
63.315% 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 1 integrations and 115 channels. Flagging 7 channels previously flagged 25.00% or more. Flagging 168 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 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. 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. 69.676% 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 1571 *.sum.flag_waterfall_round_2.h5 files starting with /mnt/sn1/data1/2460551/zen.2460551.16919.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/data1/2460551/2460551_aposteriori_flags.yaml ------------------------------------------------------------------------------ JD_flags: [[2460551.1690820684, 2460551.257106528], [2460551.2576657687, 2460551.257777617], [2460551.257889465, 2460551.258001313], [2460551.2584487055, 2460551.2594553386], [2460551.2595671867, 2460551.259679035], [2460551.259790883, 2460551.260014579], [2460551.2601264273, 2460551.2603501235], [2460551.2605738197, 2460551.260685668], [2460551.26113306, 2460551.261244908], [2460551.261468604, 2460551.2615804523], [2460551.262251541, 2460551.2625870854], [2460551.2628107816, 2460551.263146326], [2460551.263370022, 2460551.2634818703], [2460551.2637055665, 2460551.2639292628], [2460551.264376655, 2460551.2646003515], [2460551.26527144, 2460551.2654951364], [2460551.266613617, 2460551.2669491614], [2460551.2671728577, 2460551.267284706], [2460551.267396554, 2460551.26762025], [2460551.2679557945, 2460551.268291339], [2460551.2690742756, 2460551.2691861237], [2460551.2700809087, 2460551.270304605], [2460551.2707519974, 2460551.2708638455], [2460551.271311238, 2460551.271423086], [2460551.2722060224, 2460551.2725415668], [2460551.2733245036, 2460551.2735482], [2460551.273883744, 2460551.2741074404], [2460551.274666681, 2460551.274890377], [2460551.275561466, 2460551.275673314], [2460551.2760088583, 2460551.2761207065], [2460551.276456251, 2460551.276568099], [2460551.276679947, 2460551.2769036433], [2460551.2773510357, 2460551.277574732], [2460551.2777984277, 2460551.278022124], [2460551.278805061, 2460551.279028757], [2460551.2794761495, 2460551.2796998457], [2460551.279923542, 2460551.280147238], [2460551.2807064787, 2460551.280930175], [2460551.2812657193, 2460551.2813775674], [2460551.2816012637, 2460551.28182496], [2460551.281936808, 2460551.282048656], [2460551.2822723524, 2460551.2824960486], [2460551.2831671373, 2460551.283502681], [2460551.2839500736, 2460551.28417377], [2460551.285180403, 2460551.285404099], [2460551.2855159473, 2460551.2856277954], [2460551.2858514916, 2460551.286075188], [2460551.286187036, 2460551.286298884], [2460551.2866344284, 2460551.2867462765], [2460551.2874173652, 2460551.2876410615], [2460551.2878647577, 2460551.288088454], [2460551.2884239983, 2460551.2886476945], [2460551.289542479, 2460551.289766175], [2460551.2901017196, 2460551.290325416], [2460551.2907728083, 2460551.2911083526], [2460551.2912202007, 2460551.291555745], [2460551.2917794413, 2460551.2920031375], [2460551.2922268338, 2460551.29245053], [2460551.2931216187, 2460551.293345315], [2460551.2937927074, 2460551.2942401], [2460551.29479934, 2460551.295023036], [2460551.2954704287, 2460551.295694125], [2460551.2961415173, 2460551.29658891], [2460551.296924454, 2460551.2970363023], [2460551.2973718466, 2460551.297595543], [2460551.297819239, 2460551.297931087], [2460551.2983784797, 2460551.298602176], [2460551.2993851127, 2460551.299608809], [2460551.299832505, 2460551.3003917453], [2460551.3005035934, 2460551.3007272896], [2460551.301174682, 2460551.3013983783], [2460551.302069467, 2460551.302181315], [2460551.3024050114, 2460551.3026287076], [2460551.302852404, 2460551.3030761], [2460551.3037471888, 2460551.303970885], [2460551.3043064293, 2460551.3044182775], [2460551.304753822, 2460551.304977518], [2460551.3052012143, 2460551.3056486067], [2460551.3057604544, 2460551.3059841506], [2460551.306319695, 2460551.306431543], [2460551.306543391, 2460551.3066552393], [2460551.3067670874, 2460551.307326328], [2460551.3076618724, 2460551.3077737205], [2460551.3079974167, 2460551.308109265], [2460551.308444809, 2460551.3088922016], [2460551.309227746, 2460551.3097869866], [2460551.310234379, 2460551.3106817715], [2460551.3109054677, 2460551.31135286], [2460551.311800252, 2460551.3120239484], [2460551.3121357965, 2460551.3123594928], [2460551.3131424296, 2460551.3132542777], [2460551.31370167, 2460551.3140372145], [2460551.3150438475, 2460551.315267544], [2460551.3157149362, 2460551.3158267844], [2460551.3159386325, 2460551.3161623287], [2460551.316497873, 2460551.316609721], [2460551.3167215693, 2460551.3169452655], [2460551.317057113, 2460551.3171689613], [2460551.3172808094, 2460551.3176163537], [2460551.3181755943, 2460551.3183992906], [2460551.318622987, 2460551.318958531], [2460551.3191822274, 2460551.3194059236], [2460551.3195177717, 2460551.319741468], [2460551.319965164, 2460551.3200770123], [2460551.3204125566, 2460551.3205244048], [2460551.320636253, 2460551.320748101], [2460551.320971797, 2460551.3210836453], [2460551.321754734, 2460551.3220902784], [2460551.322537671, 2460551.322649519], [2460551.322985063, 2460551.323096911], [2460551.3234324553, 2460551.3235443034], [2460551.3237679997, 2460551.323991696], [2460551.324103544, 2460551.324215392], [2460551.3244390883, 2460551.3245509365], [2460551.3246627846, 2460551.3247746327], [2460551.324886481, 2460551.325110177], [2460551.3255575695, 2460551.326004962], [2460551.3264523544, 2460551.3265642026], [2460551.327123443, 2460551.3272352912], [2460551.3274589875, 2460551.3275708356], [2460551.328130076, 2460551.3282419243], [2460551.3288011644, 2460551.3289130125], [2460551.329360405, 2460551.329584101], [2460551.330143342, 2460551.330367038], [2460551.3305907343, 2460551.3307025824], [2460551.3308144305, 2460551.3309262786], [2460551.3310381267, 2460551.331261823], [2460551.331485519, 2460551.3315973673], [2460551.332156608, 2460551.332380304], [2460551.3329395447, 2460551.333051393], [2460551.333386937, 2460551.3336106334], [2460551.3339461777, 2460551.3341698735], [2460551.3343935697, 2460551.334840962], [2460551.3351765065, 2460551.3352883547], [2460551.335400203, 2460551.335623899], [2460551.335735747, 2460551.3358475952], [2460551.3360712915, 2460551.3362949877], [2460551.33674238, 2460551.3370779245], [2460551.337637165, 2460551.3381964057], [2460551.33853195, 2460551.338643798], [2460551.3387556463, 2460551.3390911906], [2460551.339314887, 2460551.339538583], [2460551.339762279, 2460551.339874127], [2460551.3402096713, 2460551.340768912], [2460551.340992608, 2460551.341104456], [2460551.3415518487, 2460551.341999241], [2460551.3423347855, 2460551.3424466336], [2460551.3425584817, 2460551.34267033], [2460551.342782178, 2460551.342894026], [2460551.3431177223, 2460551.3432295704], [2460551.343676963, 2460551.343788811], [2460551.343900659, 2460551.3441243554], [2460551.3450191403, 2460551.3452428365], [2460551.346025773, 2460551.346249469], [2460551.3465850134, 2460551.3468087097], [2460551.3474797984, 2460551.3475916465], [2460551.348262735, 2460551.348933824], [2460551.34915752, 2460551.3493812163], [2460551.3496049126, 2460551.349828609], [2460551.350052305, 2460551.3503878494], [2460551.3509470895, 2460551.3511707857], [2460551.351618178, 2460551.352512963], [2460551.3529603556, 2460551.353184052], [2460551.353407748, 2460551.3536314443], [2460551.3537432924, 2460551.3539669886], [2460551.354302533, 2460551.3546380773], [2460551.3547499254, 2460551.3549736217], [2460551.3556447104, 2460551.3557565585], [2460551.3559802547, 2460551.356203951], [2460551.356539495, 2460551.356651343], [2460551.356763191, 2460551.3573224316], [2460551.357546128, 2460551.357769824], [2460551.3581053684, 2460551.358664609], [2460551.3588883053, 2460551.3590001534], [2460551.3591120015, 2460551.359447546], [2460551.35978309, 2460551.3598949383], [2460551.3600067864, 2460551.3602304826], [2460551.360454179, 2460551.360789723], [2460551.3610134195, 2460551.361460812], [2460551.361684508, 2460551.3617963563], [2460551.3624674445, 2460551.363138533], [2460551.3633622294, 2460551.3645925587], [2460551.364704407, 2460551.364928103], [2460551.365039951, 2460551.3652636474], [2460551.3654873436, 2460551.368395394], [2460551.3685072423, 2460551.3687309385], [2460551.3688427866, 2460551.369290179], [2460551.369402027, 2460551.3696257235], [2460551.369961268, 2460551.370073116], [2460551.3704086603, 2460551.371079749], [2460551.371303445, 2460551.3715271414], [2460551.3717508377, 2460551.371862686], [2460551.371974534, 2460551.37219823], [2460551.3723100782, 2460551.3727574707], [2460551.372869319, 2460551.372981167], [2460551.373204863, 2460551.373540407], [2460551.3740996476, 2460551.37454704], [2460551.3751062807, 2460551.3756655212], [2460551.3760010656, 2460551.3761129137], [2460551.376224762, 2460551.376448458], [2460551.3766721543, 2460551.3771195468], [2460551.377343243, 2460551.377566939], [2460551.3776787873, 2460551.3777906355], [2460551.37812618, 2460551.378461724], [2460551.3787972685, 2460551.3791328124], [2460551.379915749, 2460551.3800275973], [2460551.3802512935, 2460551.38047499], [2460551.380698686, 2460551.3811460785], [2460551.3813697747, 2460551.381481623], [2460551.381593471, 2460551.381817167], [2460551.3819290153, 2460551.3821527115], [2460551.3823764077, 2460551.3828238], [2460551.3832711927, 2460551.383494889], [2460551.383718585, 2460551.3838304332], [2460551.3840541295, 2460551.384389674], [2460551.3846133696, 2460551.384948914], [2460551.3853963064, 2460551.385955547], [2460551.3864029394, 2460551.3865147876], [2460551.386738484, 2460551.38696218], [2460551.387968813, 2460551.388080661], [2460551.3883043574, 2460551.3884162055], [2460551.38875175, 2460551.389087294], [2460551.3893109905, 2460551.3894228386], [2460551.391324256, 2460551.3916598004], [2460551.3928901297, 2460551.3936730665], [2460551.3946796996, 2460551.39523894], [2460551.3953507883, 2460551.3957981807], [2460551.396357421, 2460551.3970285095], [2460551.397699598, 2460551.3981469907], [2460551.398258839, 2460551.3989299275], [2460551.399489168, 2460551.399601016], [2460551.3998247124, 2460551.4000484087], [2460551.4010550417, 2460551.401390586], [2460551.4015024337, 2460551.401614282], [2460551.4030683073, 2460551.4031801554], [2460551.403739396, 2460551.4042986366], [2460551.4053052696, 2460551.405528966], [2460551.406423751, 2460551.406647447], [2460551.4069829914, 2460551.407206687], [2460551.40821332, 2460551.4084370164], [2460551.409779194, 2460551.409891042], [2460551.4103384344, 2460551.4104502825], [2460551.410785827, 2460551.410897675], [2460551.4112332193, 2460551.4114569155], [2460551.4123517005, 2460551.4125753967], [2460551.4130227887, 2460551.413246485], [2460551.4147005104, 2460551.4149242067], [2460551.415036055, 2460551.415259751], [2460551.4157071435, 2460551.4159308397], [2460551.4166019284, 2460551.417049321], [2460551.418615194, 2460551.4188388903], [2460551.419509979, 2460551.419733675], [2460551.4201810677, 2460551.420292916], [2460551.420516612, 2460551.4207403082], [2460551.4211877007, 2460551.421299549], [2460551.4218587894, 2460551.422306182], [2460551.422529878, 2460551.4229772706], [2460551.4244312956, 2460551.424878688], [2460551.4251023843, 2460551.4252142324], [2460551.4254379286, 2460551.425661625], [2460551.425885321, 2460551.4262208655], [2460551.4271156504, 2460551.4272274985], [2460551.427563043, 2460551.427898587], [2460551.4280104353, 2460551.4283459797], [2460551.429464461, 2460551.429688157], [2460551.4303592453, 2460551.4304710934], [2460551.430918486, 2460551.431142182], [2460551.4313658783, 2460551.431813271], [2460551.432148815, 2460551.4322606632], [2460551.432819904, 2460551.4330436], [2460551.4337146888, 2460551.434162081], [2460551.4344976256, 2460551.434721322], [2460551.435056866, 2460551.4351687143], [2460551.43539241, 2460551.435504258], [2460551.4357279544, 2460551.4358398025], [2460551.4359516506, 2460551.436175347], [2460551.4368464355, 2460551.4369582837], [2460551.437517524, 2460551.4377412205], [2460551.4389715497, 2460551.439195246], [2460551.439978183, 2460551.440090031], [2460551.4405374234, 2460551.4409848154], [2460551.441544056, 2460551.4419914484], [2460551.442438841, 2460551.442662537], [2460551.444563955, 2460551.444675803], [2460551.4451231956, 2460551.4452350438], [2460551.4457942843, 2460551.4460179806], [2460551.446465373, 2460551.446689069], [2460551.446800917, 2460551.447024613], [2460551.4475838537, 2460551.447695702], [2460551.448031246, 2460551.4482549424], [2460551.4483667905, 2460551.448702335], [2460551.448814183, 2460551.448926031], [2460551.44959712, 2460551.449932664], [2460551.4504919047, 2460551.450603753], [2460551.4510511453, 2460551.4513866897], [2460551.451834082, 2460551.4521696265], [2460551.452952563, 2460551.453064411], [2460551.4536236515, 2460551.4538473478], [2460551.453959196, 2460551.45429474], [2460551.4553013733, 2460551.4555250695], [2460551.455972462, 2460551.45608431], [2460551.4566435507, 2460551.456755399], [2460551.4572027912, 2460551.4574264875], [2460551.457762032, 2460551.4579857276], [2460551.460110842, 2460551.46022269], [2460551.4606700824, 2460551.4608937786], [2460551.4633544367, 2460551.463466285], [2460551.465703247, 2460551.4659269433], [2460551.46670988, 2460551.4668217283], [2460551.4669335764, 2460551.4670454245], [2460551.46849945, 2460551.4688349944], [2460551.4689468425, 2460551.4690586906], [2460551.4691705382, 2460551.469729779], [2460551.470065323, 2460551.4701771713], [2460551.470960108, 2460551.471071956], [2460551.4731970704, 2460551.4735326148], [2460551.4838226405, 2460551.4839344886], [2460551.485164818, 2460551.485388514], [2460551.486842539, 2460551.4869543873], [2460551.4880728684, 2460551.4882965647], [2460551.488408413, 2460551.488632109], [2460551.4893031977, 2460551.489415046], [2460551.4908690713, 2460551.4912046157], [2460551.4924349445, 2460551.4926586407], [2460551.49388897, 2460551.494000818], [2460551.49567854, 2460551.495790388], [2460551.495902236, 2460551.4961259323], [2460551.4970207172, 2460551.497244413], [2460551.4976918055, 2460551.498139198], [2460551.5008235527, 2460551.501047249], [2460551.502053882, 2460551.502277578], [2460551.5041789957, 2460551.504402692], [2460551.5057448694, 2460551.5058567175], [2460551.506415958, 2460551.5069751986], [2460551.5070870467, 2460551.507198895], [2460551.5079818317, 2460551.50809368], [2460551.508764768, 2460551.508876616], [2460551.5089884643, 2460551.5091003124], [2460551.5093240086, 2460551.509547705], [2460551.509659553, 2460551.509883249], [2460551.5099950973, 2460551.5102187935], [2460551.5113372747, 2460551.511672819], [2460551.5120083634, 2460551.5123439077], [2460551.5127913, 2460551.513350541], [2460551.515028262, 2460551.5152519583], [2460551.515811199, 2460551.516034895], [2460551.516146743, 2460551.5162585913], [2460551.5163704394, 2460551.5164822876], [2460551.5165941357, 2460551.516817832], [2460551.517824465, 2460551.517936313], [2460551.520061427, 2460551.520285123]] freq_flags: [[46859741.2109375, 64804077.1484375], [65292358.3984375, 65414428.7109375], [65536499.0234375, 68099975.5859375], [68344116.2109375, 68466186.5234375], [68588256.8359375, 68710327.1484375], [68954467.7734375, 73104858.3984375], [73593139.6484375, 73715209.9609375], [73837280.2734375, 75912475.5859375], [77377319.3359375, 78964233.3984375], [87387084.9609375, 108261108.3984375], [109970092.7734375, 110092163.0859375], [113632202.1484375, 113754272.4609375], [116439819.3359375, 116561889.6484375], [122787475.5859375, 124252319.3359375], [124496459.9609375, 125473022.4609375], [125839233.3984375, 134872436.5234375], [135116577.1484375, 135604858.3984375], [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], [145736694.3359375, 145858764.6484375], [146102905.2734375, 146835327.1484375], [147445678.7109375, 147567749.0234375], [148300170.8984375, 148544311.5234375], [148666381.8359375, 148788452.1484375], [149154663.0859375, 149520874.0234375], [149765014.6484375, 150009155.2734375], [150741577.1484375, 150863647.4609375], [154159545.8984375, 154403686.5234375], [157577514.6484375, 157699584.9609375], [169906616.2109375, 170150756.8359375], [175155639.6484375, 175277709.9609375], [187362670.8984375, 187606811.5234375], [189926147.4609375, 190048217.7734375], [191146850.5859375, 191513061.5234375], [197128295.8984375, 197372436.5234375], [198104858.3984375, 198348999.0234375], [199203491.2109375, 199325561.5234375], [201644897.4609375, 201889038.0859375], [204940795.8984375, 205062866.2109375], [208480834.9609375, 208724975.5859375], [209945678.7109375, 210067749.0234375], [212142944.3359375, 212265014.6484375], [220687866.2109375, 220809936.5234375], [223129272.4609375, 223373413.0859375], [227401733.3984375, 227523803.7109375], [229110717.7734375, 229354858.3984375], [229965209.9609375, 230087280.2734375], [231063842.7734375, 231185913.0859375]] ex_ants: [[8, Jee], [8, Jnn], [15, Jnn], [18, Jee], [18, Jnn], [22, Jnn], [27, Jee], [27, Jnn], [28, Jee], [28, Jnn], [29, Jnn], [31, Jnn], [32, Jnn], [33, Jnn], [34, Jee], [36, Jee], [37, Jnn], [40, Jnn], [45, Jee], [46, Jee], [46, Jnn], [47, Jee], [47, Jnn], [51, Jee], [51, Jnn], [53, Jee], [53, Jnn], [54, Jnn], [57, Jee], [61, Jee], [61, Jnn], [62, Jee], [63, Jee], [63, Jnn], [64, Jee], [64, Jnn], [69, Jee], [72, Jnn], [73, Jee], [73, Jnn], [77, Jee], [77, Jnn], [78, Jee], [78, Jnn], [83, Jnn], [86, Jee], [86, Jnn], [87, Jee], [88, Jee], [88, Jnn], [89, Jee], [89, Jnn], [90, Jee], [90, Jnn], [91, Jee], [91, Jnn], [92, Jee], [97, Jnn], [98, Jnn], [99, Jnn], [104, Jnn], [105, Jee], [105, Jnn], [106, Jee], [106, Jnn], [107, Jee], [107, Jnn], [108, Jee], [108, Jnn], [109, Jnn], [111, Jee], [116, Jee], [116, Jnn], [117, Jee], [120, Jee], [121, Jee], [124, Jee], [124, Jnn], [125, Jee], [125, Jnn], [126, Jee], [126, Jnn], [130, Jee], [131, Jee], [136, Jee], [136, Jnn], [145, Jee], [155, Jee], [161, Jnn], [170, Jee], [171, Jnn], [172, Jee], [176, Jee], [176, Jnn], [177, Jee], [177, Jnn], [178, Jee], [178, Jnn], [179, Jee], [179, Jnn], [180, Jee], [180, Jnn], [182, Jee], [188, Jee], [188, Jnn], [194, Jee], [197, Jnn], [199, Jnn], [200, Jee], [200, Jnn], [201, Jnn], [202, Jnn], [209, Jnn], [212, Jnn], [215, Jee], [215, Jnn], [218, Jnn], [231, Jee], [231, Jnn], [232, Jee], [241, Jee], [241, Jnn], [242, Jee], [242, Jnn], [243, Jee], [243, Jnn], [250, Jee], [251, Jee], [255, Jnn], [256, Jee], [256, Jnn], [268, Jnn], [270, Jee], [272, Jee], [272, Jnn], [281, Jee], [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.dev108+g192db21 hera_qm: 2.2.0 hera_filters: 0.1.5
hera_notebook_templates: 0.1.dev930+ga905b26 pyuvdata: 3.0.1.dev46+g690c7ce
print(f'Finished execution in {(time.time() - tstart) / 60:.2f} minutes.')
Finished execution in 23.93 minutes.