In [1]:
import os
os.environ['HDF5_USE_FILE_LOCKING'] = 'FALSE'
import h5py
import hdf5plugin
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.ticker import FormatStrFormatter
import matplotlib.patches as mpatches
import matplotlib.gridspec as gridspec
import numpy as np
from pyuvdata import UVCal, UVData, UVFlag
import pyuvdata
import os
import sys
import glob
import uvtools as uvt
from astropy.time import Time
from astropy.coordinates import EarthLocation, SkyCoord, AltAz, Angle
import pandas
import warnings 
import copy
from hera_notebook_templates import utils
import hera_qm
from hera_mc import cm_hookup
import h5py
import importlib
from scipy import stats
import scipy
import pandas as pd
from IPython.display import display, HTML
#warnings.filterwarnings('ignore')

%matplotlib inline
%config InlineBackend.figure_format = 'retina'
In [2]:
#get data location
JD = os.environ['JULIANDATE']
data_path = os.environ['DATA_PATH']
nb_outdir = os.environ['NB_OUTDIR']
utc = Time(JD, format='jd').datetime
print(f'JD = {JD}')
print(f'Date = {utc.month}-{utc.day}-{utc.year}')
print(f'data_path = "{data_path}"')
JD = 2459838
Date = 9-15-2022
data_path = "/mnt/sn1/2459838"
In [3]:
# Load in data
HHfiles, difffiles, uvdx, uvdy = utils.load_data_ds(data_path,JD)
    
uvd = UVData()
uvd_diff = UVData()
uvd.read(HHfiles[0])
use_ants = [int(ant) for ant in uvd.get_ants()]
bls = [(ant, ant) for ant in use_ants]
uvd.read(HHfiles[::10], skip_bad_files=True, bls=bls)
uvd_diff.read(difffiles[::10], skip_bad_files=True, bls=bls)
lsts = uvd.lst_array

flagfile = glob.glob(os.path.join(HHfiles[0].split('zen')[0],'zen.{}*total_stage_1_threshold_flags.h5'.format(JD)))
uvf = UVFlag()
uvf.read(flagfile)
bls = [(ant, ant) for ant in uvd.get_ants()]
times_uvf = np.unique(uvf.time_array)
times_uvd = np.unique(uvd.time_array)
idx_times = [np.where(time_uvd == times_uvf)[0][0] for time_uvd in times_uvd]
uvd.flag_array[:,0,:,:] = np.repeat(uvf.flag_array[idx_times], len(bls), axis=0)
1631 sum files found between JDs 2459838.31219 and 2459838.67682
1631 diff files found between JDs 2459838.31219 and 2459838.67682

LST Coverage¶

Shows the LSTs (in hours) and JDs for which data is collected. Green represents data, red means no data.

In [4]:
utils.plot_lst_coverage(uvd)

Delay spectrum¶

Delay spectrum CLEANed using uvtools.dspec.high_pass_fourier_filter with 7th-order Blackman-Harris window function. Odd/even visibilities are used to remove noise bias.

In [5]:
_data_cleaned_sq, d_even, d_odd = utils.clean_ds(bls, uvd, uvd_diff, N_threads=14)

Waterfalls of delay spectra for autocorrelation¶

These plots show autocorrelation delay spectrum waterfalls of each antenna that is active and whose status qualifies for this notebook. For nn/ee polarization, the autocorrelation delay spectrum is normalized by the max of the delay spectrum. For ne polarization, the autocorrelation delay spectrum is normalized by max(sqrt(|nn| * |ee|)). ne and en are the same for autocorrelations, and thus only ne is shown here. The delay spectra are presented in dB with 10*log10($|\tilde{V}|$).

For each node, antennas are ordered by SNAP number, and within that by SNAP input number. The antenna number label color corresponds to the a priori status of that antenna.

nn polarization¶

In [6]:
utils.plot_wfds(uvd, _data_cleaned_sq, 0)

ee polarization¶

In [7]:
utils.plot_wfds(uvd, _data_cleaned_sq, 1)

ne polarization¶

In [8]:
utils.plot_wfds(uvd, _data_cleaned_sq, 2)

Analysis of 2700ns features in delay spectra¶

This plot shows the relative amplitude at 2700 ns feature. The relative amplitude is calculated in dB with the mean amplitude at 2500-3000 ns compared to the mean amplitude at 2000-2500 ns. Larger values of relative feature amplitude indicate higher probability of detecting the peak at 2700 ns. Antennas in the same node are grouped by the shaded region.

In [9]:
utils.plot_antFeatureMap_2700ns(uvd, _data_cleaned_sq, JD, pol='nn')
In [10]:
utils.plot_antFeatureMap_2700ns(uvd, _data_cleaned_sq, JD, pol='ee')

This plot shows a matrix representing the 2700ns feature correlation of each baseline. The color bar indicates the amplitude of 2700ns (mean amplitude of 2500-3000ns delay spectrum) in dB which is the same as that in the above plot.

In [11]:
# utils.CorrMatrix_2700ns(uvd, HHfiles, difffiles, flagfile, JD, N_threads=14)

Analysis of noise floor in delay spectra¶

This plot shows the ratio of delay spectrum to noise floor (averaged over 1000-4000ns). Near 1 indicates the delay spectrum reaches to the noise floor, which may mean good.

In [12]:
utils.plot_antFeatureMap_noise(uvd_diff, d_even, d_odd, JD, pol='nn')
In [13]:
utils.plot_antFeatureMap_noise(uvd_diff, d_even, d_odd, JD, pol='ee')
In [14]:
# get the ratio of delay spectum to noise for different freqeuncy bands and pols
ds_noise_ratio = utils.get_ds_noise_ratio(uvd, uvd_diff, bls)

nodes, antDict, inclNodes = utils.generate_nodeDict(uvd)
ants = uvd.get_ants()
# build dataframe
to_show = {'Ant': ants, 'Node': [int(antDict[ant]['node']) for ant in ants], 'Snap': [int(antDict[ant]['snapLocs'][0]) for ant in ants]}
df = pd.DataFrame(to_show)
 
cols_ratio = []
for key in ds_noise_ratio.keys():
    if(key[0] == 40):
        col = r'Full '
    else:
        col = r'{}-{} MHz '.format(key[0], key[1])
    col += key[2]
    df[col] = ds_noise_ratio[key]
    cols_ratio.append(col)
    

# sort by node number and then by antenna number within nodes
df.sort_values(['Node', 'Ant'], ascending=True)

ratio_cut = 3
# style dataframe
table = df.style.hide_index() \
          .applymap(lambda val: 'color: red' if val > ratio_cut else '', subset=cols_ratio) \
          .set_table_styles([dict(selector="th",props=[('max-width', f'70pt')])])

This table shows the ratio of the delay spectrum to the noise level from diff files for different frequency bands and pols. The ratio > 3 is colored in red

In [15]:
HTML(table.render())
Out[15]:
Ant Node Snap Full nn Full ee 50-85 MHz nn 50-85 MHz ee 120-155 MHz nn 120-155 MHz ee 155-190 MHz nn 155-190 MHz ee 190-225 MHz nn 190-225 MHz ee
3 1 2 1.114861 1.097398 1.634594 1.406470 2.506313 3.002692 1.697297 1.666759 1.531765 2.724649
4 1 2 1.125306 1.126402 2.177898 1.890969 2.599013 2.650769 1.812583 1.947496 2.640012 2.952949
5 1 2 1.117316 0.802939 1.584526 1.493646 2.516037 1.576739 2.191095 1.770193 7.906842 9.251926
7 2 0 1.354946 1.316919 2.017081 1.451050 2.583988 2.553311 1.787585 2.102237 2.520308 5.502128
8 2 0 1.420075 1.029955 4.873970 1.368159 3.951871 2.117661 3.139713 1.727965 2.865034 14.886343
9 2 0 0.951386 0.860661 1.789074 1.470337 2.283091 2.135438 1.775892 1.549970 1.454168 2.196468
10 2 1 0.960406 1.163760 1.528096 1.582170 2.551769 2.954494 1.766980 2.757795 1.683387 3.766643
15 1 3 1.347382 1.168745 2.606848 1.565146 2.619198 2.219266 1.654717 1.846220 3.729491 4.621417
16 1 3 1.158146 0.879671 1.809389 1.357869 2.461125 2.025511 1.681415 1.614032 4.346065 2.527741
17 1 3 1.394239 1.031060 1.971082 1.486920 2.832302 2.023341 1.748067 1.897653 2.052547 2.414920
18 1 0 115.086482 18.394576 2.499591 1.379807 530.937815 65.119689 1.639451 1.382140 1.551062 1.668263
19 2 1 1.223170 0.885174 1.461821 1.496748 2.213435 2.030453 1.461127 1.619907 1.602870 9.567163
20 2 1 1.089513 0.830931 1.680101 1.425544 2.340343 1.793565 1.780539 1.556782 2.016295 2.096358
21 2 2 1.112564 0.945958 1.656390 1.674222 2.735663 2.019641 1.699918 1.612836 1.861072 2.429828
27 1 0 6.526326 4.934493 9.086746 23.658560 21.069434 9.382926 4.553887 3.424906 4.885776 2.029096
28 1 0 75.017995 2.290221 2.170489 1.386178 380.698703 2.214770 2.140023 2.295906 2.816740 5.305364
29 1 1 1.919122 0.913370 5.910000 1.776110 3.580053 1.868044 3.423704 2.859712 6.591437 4.476526
30 1 1 1.216157 0.973249 1.537196 1.431301 2.277060 2.148963 2.619614 2.457494 3.384182 21.391655
31 2 2 1.160615 0.934467 2.102287 1.556416 2.774103 2.185746 1.985469 2.749177 2.459666 6.597990
32 2 2 2.921948 3.038167 1.829177 1.521674 3.476511 3.626073 7.302179 7.554844 8.588099 8.502265
33 2 3 175.950879 0.899505 1.973241 1.826352 874.740458 1.865649 1.784949 1.579728 1.760739 1.860794
36 3 3 1.645570 1.285499 2.498538 1.656895 2.826693 2.476931 2.393074 1.574965 2.192499 2.778929
37 3 1 1.486207 0.921647 1.765944 1.642109 2.883899 2.165968 1.626115 1.923661 2.599071 3.189349
38 3 1 1.157282 1.151071 1.812470 1.525654 2.656552 2.612120 1.829321 2.247225 1.609690 2.577689
40 4 1 25.959487 59.031477 50.393445 170.574410 0.874347 3.812231 0.831107 2.976697 0.929562 1.360533
41 4 3 131.952041 1193.992109 193.983128 623.751068 210.497729 1021.211940 123.477896 1133.809539 199.262192 5460.646097
42 4 0 35.683908 60.348208 80.233789 150.047889 8.181456 9.203209 2.907164 11.251885 1.799838 1.966585
45 5 0 1.673166 0.956069 3.975108 2.171626 4.440019 2.387731 3.814534 2.527124 4.004538 3.634586
46 5 0 1.787517 1.268289 2.011752 1.322288 3.992881 2.444952 2.134869 1.739154 2.314535 3.008565
50 3 3 1.098876 0.840854 1.720345 1.523108 2.457688 2.257949 1.763246 1.722282 1.930685 1.699973
51 3 2 0.167749 0.051587 2.255628 0.128193 0.267632 0.167433 0.178489 0.112929 0.154494 0.159293
52 3 3 1.533788 1.490905 2.131424 4.648012 3.035484 3.371700 1.864369 2.648521 2.100868 4.845042
53 3 2 1.305616 1.707704 3.324121 2.256565 3.515806 5.096015 2.414886 2.808516 3.660716 4.277575
54 4 0 35.784331 43.231889 77.770029 93.320007 6.020692 9.904321 2.791685 4.020600 1.885219 1.965772
55 4 2 42.564117 53.516576 80.091817 84.032677 2.064575 119.980781 5.251539 38.181329 1.810497 14.812569
56 4 1 50.328709 258.119713 71.722942 187.781088 48.665152 342.592542 52.538742 119.814295 133.543348 1039.942563
57 4 3 23.935395 43.716343 66.339186 110.452904 1.502623 14.694064 1.659473 19.410702 0.791154 72.198967
65 3 0 nan nan nan nan nan nan nan nan nan nan
66 3 0 nan nan nan nan nan nan nan nan nan nan
67 3 0 nan nan nan nan nan nan nan nan nan nan
68 3 1 6.799427 1.380874 8.059266 1.589994 7.207045 2.248619 10.567081 2.866664 8.750668 4.422203
69 4 1 37.973180 26.120209 72.750960 58.282882 2.647000 8.451239 1.920485 4.088868 2.571766 12.426222
70 4 2 35.708793 16.189052 78.127245 38.102547 2.576415 1.194672 1.247418 0.936183 0.969644 0.430557
71 4 2 46.171924 33.193582 128.772676 91.242415 4.089103 6.343129 2.035259 14.172953 1.506784 2.672116
72 4 0 25.658973 82.287017 60.571210 94.430173 14.215302 108.906625 4.139834 40.316266 1.576800 42.023714
73 5 0 1.337705 2.331229 1.729108 5.641958 3.871192 8.319405 2.059791 1.841050 3.332556 2.054537
81 7 0 1.428367 0.926304 2.066062 1.845949 2.296136 1.954597 1.831971 1.872684 5.852117 4.538687
82 7 0 1.259255 0.954059 1.660206 1.682334 2.689967 1.947210 1.630038 1.454413 1.956703 1.717087
83 7 0 1.398774 0.939703 1.902574 1.884710 2.698703 1.965322 1.886453 1.553435 2.118051 1.892741
84 8 3 4.962745 1.313702 35.641552 2.039734 7.596365 2.037912 5.223462 1.458449 9.546758 2.938280
85 8 0 1.154336 0.947730 6.333497 1.847370 2.829654 1.918773 2.052824 1.668497 2.493165 1.819084
86 8 0 1.832843 1.082602 4.135426 1.510150 3.305976 2.234295 2.638915 2.306089 22.498491 16.359888
87 8 2 1.577613 3.106060 2.095315 1.010779 3.008763 6.182359 1.675118 2.160338 1.938898 2.907546
88 9 0 1.220656 40.641250 1.814983 109.978407 2.109113 171.955372 1.566655 173.308527 2.749798 205.017504
90 9 0 1.081932 0.821028 2.172826 2.351989 2.700782 1.745731 1.756944 1.527163 1.866857 2.254728
91 9 1 1.276016 31.472863 2.300059 45.670152 2.590864 142.261140 2.252900 158.819237 2.450259 155.732010
92 10 0 nan nan nan nan nan nan nan nan nan nan
93 10 0 nan nan nan nan nan nan nan nan nan nan
94 10 0 nan nan nan nan nan nan nan nan nan nan
98 7 2 1.312977 0.808287 2.395234 2.281079 2.508007 1.884903 4.387773 1.409440 15.770679 1.858029
99 7 2 1.388999 1.216061 2.100073 1.692010 2.525367 2.501813 1.930658 2.193527 3.866620 18.440633
100 7 1 1.195636 1.121190 1.793740 2.488597 2.701440 2.570976 1.625281 1.744031 1.771508 1.940702
101 8 2 1.779171 1.216195 1.828461 1.672863 2.435803 2.078784 1.450433 1.541506 1.470523 7.759373
102 8 0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
103 8 1 2.267195 1.633242 2.253700 1.707172 2.904774 2.454499 1.741057 1.530759 1.827615 1.909015
104 8 1 4.640916 1.266647 0.783815 1.594930 4.279647 1.995701 3.123858 1.483062 3.187076 1.643115
105 9 1 1.477805 0.966952 2.035407 1.577647 2.456045 1.951550 1.760668 1.549434 1.872409 2.065742
106 9 3 1.188557 0.926383 1.985310 2.805219 2.284978 2.553727 2.101078 1.683002 2.191258 2.412371
107 9 0 1.690865 2.187432 3.745801 1.954586 3.532336 2.258621 4.537055 4.542971 50.579415 9.318416
108 9 1 1.239335 1.061952 1.936673 5.156756 2.600262 2.111698 1.708376 1.810859 2.780370 1.871957
109 10 1 nan nan nan nan nan nan nan nan nan nan
110 10 1 nan nan nan nan nan nan nan nan nan nan
111 10 1 nan nan nan nan nan nan nan nan nan nan
112 10 2 nan nan nan nan nan nan nan nan nan nan
116 7 2 0.953092 2.221421 1.511192 6.156429 2.598990 2.587783 1.868427 1.690167 1.801266 2.396174
117 7 3 3.057806 2.469115 5.456022 9.939314 6.259305 3.708736 3.738547 1.975621 4.861595 1.812115
118 7 3 2.218242 1.413990 4.714471 10.269129 3.665715 2.201794 3.589202 1.710812 4.302058 1.962237
119 7 1 1.246851 0.866758 1.858445 1.850942 2.846618 2.146237 1.717365 1.755944 2.027063 1.966236
120 8 1 5.149866 7.028343 13.234627 4.495591 9.695562 9.833482 11.571999 3.659536 35.928286 5.190854
121 8 3 2.110385 2.393850 2.641291 2.006295 2.810341 3.632023 1.860263 2.147845 2.395594 60.618596
122 8 2 4.918730 1.181856 2.980820 2.918133 2.361507 1.964940 1.495899 1.445058 1.677484 1.786609
123 8 3 2.314077 1.077387 1.967702 2.195129 2.560738 1.991098 1.635860 1.587396 1.992225 1.818016
125 9 3 2.897858 0.829231 2.144846 1.673516 4.174935 2.011053 10.139293 1.943188 77.434841 2.102898
126 9 3 1.396042 0.963979 2.658810 1.558226 2.610082 2.173552 1.722625 1.679233 1.941854 1.801901
127 10 2 nan nan nan nan nan nan nan nan nan nan
128 10 2 nan nan nan nan nan nan nan nan nan nan
129 10 3 nan nan nan nan nan nan nan nan nan nan
130 10 3 nan nan nan nan nan nan nan nan nan nan
135 12 2 1.325690 1.139141 1.773483 1.742625 2.215639 2.988019 2.194376 2.134466 2.384905 2.633111
136 12 2 1.900409 1.218344 3.174808 1.463628 3.670139 1.702226 4.378689 2.046118 2.343273 2.217517
137 7 3 1.280415 1.259546 2.328384 3.822238 2.713387 2.758347 1.976206 2.237091 1.951237 2.824504
138 7 1 1.053750 0.823746 1.559249 1.638429 2.643282 1.742293 1.651758 1.645564 1.761228 2.195459
140 13 2 8.750891 8.983871 9.141204 8.622629 8.410272 5.532125 5.861372 12.810271 10.538223 26.833118
141 13 2 10.454588 1.671718 32.848186 1.577153 36.320314 2.220243 23.757253 1.698479 26.380122 2.268566
142 13 2 3.568283 2.739900 10.319005 2.589455 6.961271 3.737590 3.401774 2.293669 4.661677 6.440542
143 14 2 1.268569 0.941715 2.032643 1.546330 2.785559 1.762272 2.045673 1.722156 2.092676 2.679518
144 14 3 1.258038 1.029154 2.340041 1.588989 2.581271 2.421910 1.589056 1.663443 1.731701 2.414860
145 14 3 9.688408 7.339892 31.509604 26.930798 13.886978 21.821906 4.079064 1.831380 3.563321 1.805284
150 15 1 4.823132 6.581728 24.218483 11.378846 6.317595 10.174634 5.235771 12.030788 6.563984 16.367817
155 12 2 4.215531 3.119340 10.341164 29.055456 4.688179 5.390941 3.650961 2.692744 4.215662 1.905851
156 12 3 1.768499 1.162559 1.768772 1.513046 3.054855 1.967084 1.814525 1.474114 1.859873 1.809481
157 12 3 1.302430 1.049795 1.804441 1.697417 2.894173 2.360840 1.768988 1.886448 1.818099 2.079082
158 12 3 1.427473 2.758396 2.951217 5.450870 3.625644 4.539778 2.488489 1.707896 2.429993 1.731600
160 13 3 5.448324 6.642683 12.571722 6.426426 8.405998 12.593359 5.506733 5.223922 3.996214 3.833710
161 13 0 3.688337 1.076390 2.153947 1.481231 5.545657 2.732115 4.267976 1.655580 6.072905 4.946505
162 13 0 1.334089 1.028228 1.580541 1.618681 2.365293 2.538274 1.688971 1.796211 1.471402 1.999576
163 14 2 1.236070 1.054676 3.296570 2.204466 2.497532 2.581706 1.908978 1.996250 2.045898 3.324096
164 14 2 1.126124 1.009111 1.731502 1.981932 2.709249 2.205300 1.868191 2.504809 2.120548 2.575213
165 14 0 1.675924 1.518746 3.970828 4.149258 4.501405 4.215358 1.636315 2.604138 2.495455 3.262068
166 14 0 0.346968 0.531419 0.286619 0.428506 0.400917 0.583482 0.124946 0.238033 0.153728 0.316521
167 15 1 3.774658 3.604664 2.155643 1.393744 2.854156 4.339590 5.356849 2.992185 3.245558 2.256260
168 15 2 2.087632 1.413260 3.620478 2.127905 3.170665 1.901119 5.935228 4.910762 8.653795 5.659441
169 15 2 1.707261 1.765918 2.711323 3.234268 2.806736 2.330310 3.777039 8.367732 7.269171 7.322000
170 15 2 1.738370 1.928778 3.290283 6.917185 2.975557 2.590453 3.308538 4.718880 7.587397 8.164263
176 12 0 0.981434 0.848807 1.925359 1.579055 2.546349 1.956876 2.185392 1.662276 2.469004 2.439209
177 12 0 1.261520 1.031035 1.668214 1.466000 2.702504 2.137949 1.673504 1.562233 1.784993 1.814586
178 12 0 1.108478 1.006478 1.578736 1.523412 2.523188 2.230195 1.739134 2.011834 1.852168 1.630473
179 12 1 1.691658 1.043613 1.653015 1.611998 3.287221 1.807528 5.513183 2.464541 3.440580 2.454499
180 13 3 3.942572 1.342471 18.990813 1.419039 8.345617 2.518306 3.375897 1.916578 3.383677 1.869933
181 13 3 2.661894 6.264779 0.975627 16.698334 6.946029 9.706292 2.128449 2.100174 2.561733 2.043087
182 13 0 8.441349 2.307627 25.944429 2.823888 22.042426 7.060280 4.265217 2.647199 4.328841 3.941247
183 13 1 1.450029 1.337089 1.787248 2.008822 3.408446 2.527289 1.755567 2.011474 2.836351 3.274762
184 14 0 1.003657 0.831581 1.545241 2.328150 2.240065 1.903401 1.715327 1.677836 2.035707 3.637687
185 14 1 0.875804 0.854085 1.311684 1.503372 2.170383 2.211105 1.710516 2.861415 1.848410 2.559602
186 14 1 1.195359 0.872358 1.675591 2.883999 2.831125 1.977901 2.014491 1.807461 2.208717 3.352469
187 14 1 1.459258 1.519821 1.707416 2.663447 2.894600 3.149771 3.244239 4.395085 5.600721 7.942664
189 15 3 1.149293 1.053332 1.875382 1.540472 2.207312 1.941551 1.422672 1.497048 1.699891 1.714065
190 15 3 3.921293 3.260041 16.148342 1.021283 6.238531 5.097992 3.811653 4.830264 4.006344 7.198606
191 15 3 1.200498 0.970961 1.656595 1.569441 2.643559 2.303980 1.665789 1.938780 1.665196 1.722222
203 18 1 nan nan nan nan nan nan nan nan nan nan
220 18 2 nan nan nan nan nan nan nan nan nan nan
221 18 2 nan nan nan nan nan nan nan nan nan nan
222 18 2 nan nan nan nan nan nan nan nan nan nan
320 3 2 7.303225 6.612088 16.537517 35.535489 9.516362 11.985656 12.663701 5.391313 9.452835 4.285159
321 2 3 1.395612 1.186583 1.887930 3.258307 3.418156 2.543785 1.784104 1.719161 1.676000 2.127570
323 2 3 1.383389 2.491050 9.783781 7.916992 3.272656 5.142024 1.943785 2.110594 2.047813 2.478438
324 4 3 44.624767 42.418717 102.685483 112.592059 3.985194 8.703173 3.182650 10.948200 2.087394 2.344236
329 12 1 2.564784 1.999720 8.330802 13.157567 3.157821 2.742968 1.573317 1.668040 1.603840 1.902231
333 12 1 1.540272 2.327842 2.107688 4.361992 3.529927 4.523011 1.625106 1.712430 1.716996 1.759195
In [16]:
csv_file = os.path.join(nb_outdir, 'ds_noise_ratio_{}.csv'.format(JD))
df.to_csv(csv_file, index=False)

Delay spectrum and autocorrelation plot per baseline per polarization for a given frequency (sub-)band¶

Left panel: time averaged delay spectum of autocorrelation in dB with 10*log10($|\tilde{V}|$) (blue) and noise from diff file representing the expected variance of the delay spectrum (red). The time-averaging is performed by 1. binning three time integrations of each even and odd visibility, 2. Fouier transform the binned even and odd visibilities, and 3. multiply the even and odd delay spectra at alternating time bin and average the squared delay spectrum along the time axis. This helps to reduce the noise bias. Both autocorrelation delay spectrum and diff delay spectrum are averaged in the same way

Right panel: time averaged autocorrelations w/o (orange) and w/ xRFI flags (blue). Flagged one is shifted from the unflagged one for clarity

In [17]:
utils.interactive_plots_dspec(bls, uvd, uvd_diff, JD)
In [ ]: