In [1]:
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 = 2459769
Date = 7-8-2022
data_path = "/mnt/sn1/2459769"
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)
372 sum files found between JDs 2459769.25320 and 2459769.33619
372 diff files found between JDs 2459769.25320 and 2459769.33619

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 10log10($|\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.039471 0.857257 1.611018 1.445793 1.572514 1.786789 1.660340 1.668045 1.755235 2.678374
4 1 2 1.209088 0.921656 2.420282 2.341893 2.343447 1.705987 2.126956 2.304789 2.964166 2.677522
5 1 2 1.078397 0.910677 1.841374 1.423821 1.865640 1.576586 2.315040 1.712218 5.567079 7.286223
7 2 0 1.031656 0.880996 1.916419 1.811605 1.913033 1.779221 1.939618 1.891479 2.258819 2.709953
8 2 0 1.144522 20.513176 3.165258 76.665528 2.496802 60.247601 2.743603 22.768603 3.727027 90.335919
9 2 0 0.885293 0.845140 1.775244 1.574286 1.852960 1.883738 1.963536 1.776033 2.100789 1.947976
10 2 1 0.994705 1.131175 1.651578 2.337352 1.683687 1.966755 1.876707 2.755444 2.201564 9.598654
15 1 3 1.614882 1.294920 1.953083 1.628294 2.437046 2.525910 2.260363 2.521701 9.344215 8.091226
16 1 3 1.160863 0.997247 1.910844 1.722193 1.947050 2.123550 1.870361 2.268659 6.194623 5.796318
17 1 3 1.162949 0.978478 1.788944 1.626963 2.190294 1.899317 1.777274 1.737418 2.948596 2.736148
18 1 0 55.429869 13.655486 3.745837 2.757431 246.394723 58.314501 1.677754 1.675801 2.047297 1.609566
19 2 1 1.093010 0.881681 3.038530 1.763578 2.514517 1.832751 2.802026 1.684143 3.508108 4.983143
20 2 1 0.831544 0.894929 1.532739 1.525301 1.586938 1.690435 1.549280 1.769319 1.798286 2.498964
21 2 2 0.998193 0.782697 1.713642 1.633849 1.697643 1.868707 1.841160 1.972043 2.017255 3.367746
27 1 0 3.607179 3.374272 7.270629 16.841057 11.002853 5.797789 4.285631 2.231657 3.777962 1.877977
28 1 0 54.924292 14.929338 6.040586 56.597914 256.379062 50.422377 1.576703 18.764642 2.364865 73.605923
29 1 1 1.625003 1.015493 4.419583 1.667651 3.184368 2.086523 3.721510 3.793996 6.991334 5.410234
30 1 1 1.373677 1.077094 1.669227 1.827732 1.968117 1.979295 5.059779 6.653363 3.064736 9.865186
31 2 2 1.109429 1.369080 1.699046 1.463600 2.082089 2.082636 3.730033 10.130161 5.342641 17.755506
32 2 2 1.546421 1.706920 1.780760 1.918051 1.949024 2.299561 6.054712 8.618670 6.836948 11.496169
33 2 3 34.377019 0.839841 3.688694 1.404043 155.867721 1.587972 1.595289 1.631784 2.015421 2.103605
36 3 3 1.471298 1.175155 1.673779 1.650114 1.776180 1.789892 1.739910 1.747742 1.940952 2.939061
37 3 1 1.222014 0.976938 2.243663 1.518502 2.726665 1.905508 2.132103 1.858606 5.691363 4.416890
38 3 1 1.032809 1.065176 1.972022 1.559354 1.955956 2.018226 2.609325 2.442643 2.498175 2.890096
40 4 1 0.993817 0.997210 1.480731 1.586086 1.601095 2.092604 1.630749 2.328460 2.184218 3.550004
41 4 3 1.134082 0.998731 1.767254 1.585234 2.048765 1.939692 1.926805 1.671120 1.849369 2.001827
42 4 0 0.982984 0.899717 1.595116 1.541476 1.806108 1.938455 1.819209 1.816737 4.368103 8.881791
45 5 0 1.357531 0.924971 3.971325 1.621564 3.432103 1.831859 3.313383 1.797062 3.428689 2.095176
46 5 0 1.605322 0.976673 1.763077 1.680695 3.038557 1.763509 1.960779 1.691004 2.906410 3.078421
50 3 3 1.033345 0.873016 1.699423 1.741360 1.949747 1.926856 1.673633 1.830500 2.134279 2.242835
51 3 2 3.904188 0.831415 12.048579 2.047268 5.803594 1.685317 4.910937 1.857078 7.180156 3.599145
52 3 3 5.117568 1.225400 15.585284 1.867205 3.893937 2.000260 3.507579 2.306096 4.093954 4.411730
53 3 2 1.056137 1.032596 2.789048 2.742501 2.389816 2.732767 2.452106 2.628179 5.740728 5.120737
54 4 0 1.078853 0.909992 1.864978 1.814335 2.340989 2.214942 2.094851 1.884392 2.926949 4.178034
55 4 2 0.943943 0.865447 2.625998 1.320755 2.299226 1.791097 2.679428 1.593741 4.334706 1.845141
56 4 1 1.218312 1.193956 1.710727 1.777761 2.954361 2.487639 2.500711 2.112644 3.737510 3.841286
57 4 3 1.005610 0.855391 2.481756 1.450173 2.185320 1.697958 2.035196 1.617246 2.237126 1.877089
65 3 0 1.175481 0.783632 3.105336 1.825042 2.225447 1.756982 2.018586 1.766043 2.521584 2.219536
66 3 0 1.206162 1.129682 2.552754 3.157495 2.363251 2.579655 2.006961 1.791091 2.470266 4.904668
67 3 0 0.979951 0.869881 1.728541 1.351498 1.654197 1.697262 1.693388 1.479138 1.871300 2.012786
68 3 1 0.924912 0.814009 1.742967 1.674251 1.786098 1.677799 1.651148 1.793516 1.941521 2.278352
69 4 1 1.042116 0.923806 1.972587 2.141670 2.230190 1.976857 2.466215 2.370929 3.249464 3.321190
70 4 2 1.329545 1.261538 2.682586 1.728691 3.245481 2.173456 2.712655 2.001234 2.982918 2.880419
71 4 2 0.960691 0.946136 2.008347 1.513112 1.600036 1.714948 1.925649 1.682541 2.082371 2.082004
72 4 0 1.068570 1.067788 1.616484 1.902791 2.117193 3.579764 1.709490 1.927274 2.079625 2.886736
73 5 0 1.069696 1.085673 1.852417 1.612448 2.157554 2.083819 2.103106 1.956766 2.976271 2.931089
81 7 0 1.997508 1.629913 2.209239 1.858987 2.448783 3.058424 3.660682 1.829174 17.444007 7.170366
82 7 0 0.996713 1.053129 1.640341 2.358221 1.583528 2.250449 1.514802 1.752661 2.478794 2.831326
83 7 0 1.044194 0.861093 2.370674 1.759282 2.171235 1.584038 2.238710 1.759825 3.058240 2.712467
88 9 0 2.623483 8.750043 16.035028 36.092027 10.976494 35.576275 4.990385 4.844288 7.639803 3.359462
89 9 2 nan nan nan nan nan nan nan nan nan nan
90 9 0 16.647639 5.979837 5.147927 3.867328 31.658163 16.712769 63.026364 21.868726 121.616005 53.451274
91 9 1 3.568007 3.440027 12.579813 12.194298 5.527531 10.753811 5.531492 4.206179 7.927783 2.667953
92 10 0 1.703637 1.376363 1.759731 2.162423 1.704061 1.578556 1.965562 1.658938 1.900299 1.829752
93 10 0 4.001653 1.358284 12.795724 2.006225 6.227410 1.529867 3.612469 1.801211 3.153597 2.040904
94 10 0 1.017751 1.292999 1.480173 3.164448 1.807998 2.705687 1.807143 3.067291 2.277228 17.324473
98 7 2 3.481145 15.362615 1.712413 55.194559 6.830727 43.680163 15.910326 16.608684 144.558352 69.377656
99 7 2 0.977421 0.831403 1.737149 1.651049 1.764360 1.720920 1.969609 1.783784 3.572578 3.501564
100 7 1 1.023962 24.753070 2.348870 112.913760 1.805388 76.503807 1.938831 30.058482 2.774673 104.598788
105 9 1 2.356163 2.559903 13.870823 6.859040 3.019516 7.649236 4.797072 2.216989 8.816557 2.702976
106 9 3 1.302886 1.378021 1.716101 1.783276 2.769077 2.784794 2.601203 4.238407 4.210703 2.894199
107 9 0 2.577858 2.849119 21.905037 29.779297 3.928254 2.624661 2.829502 4.441545 4.439617 9.065715
108 9 1 1.208499 0.841700 1.963099 1.611005 1.762068 1.524286 1.798350 1.786569 2.898190 2.309125
109 10 1 2.145118 1.587351 2.163919 2.135171 4.148518 4.097489 1.839600 1.914657 2.568244 2.213436
110 10 1 1.235660 1.448498 2.789235 1.283660 2.820524 2.801713 2.787763 2.140437 3.459976 1.564426
111 10 1 1.062662 1.036630 2.184157 1.799323 2.256885 1.985644 1.994585 1.698754 1.937721 1.660158
112 10 2 1.017218 0.910991 2.077029 1.700663 2.176121 1.852867 1.932277 1.758064 2.415810 2.440797
116 7 2 0.982966 0.769165 2.436432 1.958834 2.319126 1.630611 2.567437 1.756589 4.597581 2.984431
117 7 3 1.334372 1.449519 1.911216 2.277429 1.876526 1.991638 2.061901 3.598419 3.483657 8.323526
118 7 3 1.023500 1.107905 1.865880 1.794806 1.681653 1.933295 1.991910 2.324895 3.008917 6.034118
119 7 1 0.954771 0.781586 1.568758 1.695567 1.736908 1.652870 1.793565 1.773600 3.723231 2.312660
124 9 2 nan nan nan nan nan nan nan nan nan nan
125 9 3 3.844996 1.815385 40.323426 12.850164 10.020062 5.530673 3.399553 2.231515 5.032797 2.220070
126 9 3 2.571263 2.267023 30.479314 8.251774 6.132344 6.780373 3.486483 4.147131 4.897428 3.798873
127 10 2 2.180015 2.205888 3.174870 2.179063 4.686471 7.518033 6.909371 7.530108 7.206264 9.546868
128 10 2 0.855860 0.926455 1.843423 1.982013 1.841828 1.857086 1.933197 1.562929 2.736918 3.945154
129 10 3 1.102294 0.795029 1.738813 1.292587 1.605057 1.439505 1.635096 1.277190 1.644154 2.305526
130 10 3 1.359909 1.401005 3.105994 13.552877 1.956715 1.710625 2.661386 2.039775 3.477938 1.930025
135 12 2 0.949868 0.834755 1.818812 1.571207 1.758392 1.755029 1.807447 1.875045 1.911066 2.047173
136 12 2 1.288422 1.047811 4.053698 1.655909 2.120369 1.675882 6.267334 2.749361 6.460605 6.809028
137 7 3 2.384817 1.316924 12.128795 7.938647 4.480199 2.574296 3.224176 1.780040 4.100727 1.963893
138 7 1 1.125508 3.560033 1.922123 3.585872 2.582728 3.008077 2.149350 2.047560 11.898154 2.449729
140 13 2 1.159623 0.957919 1.616463 1.700593 1.994454 1.874770 1.771580 2.216230 2.247008 3.387470
141 13 2 3.892769 1.058138 13.436683 1.616962 14.238169 1.813030 11.156850 1.996361 10.492735 2.936903
142 13 2 2.508834 1.477102 5.608563 3.405430 5.078819 2.555515 2.461902 1.526086 3.227505 2.919265
143 14 2 1.081027 0.799941 2.273907 1.603804 1.861541 1.742124 2.306154 2.116922 2.394740 2.986485
144 14 3 2.029205 1.639172 1.696858 1.685007 4.756434 3.163286 2.356373 1.869553 3.736873 3.121256
145 14 3 2.808180 4.158083 15.783845 19.416009 9.818932 10.767491 3.180885 2.031414 2.839319 1.986626
150 15 1 3.558305 10.531552 22.242486 47.040881 4.604432 8.803591 5.401321 19.292738 6.045955 34.081795
155 12 2 2.955335 3.547453 8.229858 21.130531 3.454791 4.183981 3.489722 8.330228 3.332245 2.253502
156 12 3 1.396155 1.403433 1.769451 1.938160 2.936591 3.106923 1.895419 2.507649 2.030896 2.993259
157 12 3 1.212761 1.046910 1.533753 1.921931 2.064704 2.128816 1.792547 2.228376 1.868595 2.676212
158 12 3 1.324882 1.058023 2.669936 1.676405 3.090806 2.373627 2.663920 3.180555 5.599482 4.816151
160 13 3 2.287870 2.995399 9.334492 22.534858 3.635162 4.326647 2.773517 4.034737 2.905837 3.591108
161 13 0 1.899251 1.238288 1.357013 1.670977 4.931722 2.164077 3.212488 1.760724 6.056289 4.594146
162 13 0 0.967296 0.889147 1.666318 1.584367 1.738899 1.777420 1.988513 1.678643 2.149925 2.081580
163 14 2 1.146286 1.059239 1.846737 1.895757 1.840097 2.089093 2.197349 2.424382 2.807933 8.926243
164 14 2 1.041039 0.969732 1.805413 1.744019 1.998237 1.813028 1.878260 3.311908 3.539390 3.125810
165 14 0 6.586632 4.797707 9.900602 9.678011 24.610191 11.259257 5.812431 6.876134 23.542738 16.895463
166 14 0 1.253233 2.217386 1.720466 1.525788 2.508890 3.643692 2.732558 6.582866 2.200783 5.732620
167 15 1 1.422992 7.354341 1.891916 38.163723 2.548082 3.058068 2.438191 2.645013 2.833866 3.104103
168 15 2 1.647112 1.227647 3.748569 2.570229 2.970189 2.168577 4.994443 6.950363 7.384338 7.903164
169 15 2 1.089957 9.786073 2.636161 45.444067 2.165180 13.367638 2.972692 7.604682 3.810697 21.699631
170 15 2 1.467848 13.718024 2.903871 64.157309 3.935644 13.218324 5.177760 9.763700 5.551891 23.150354
176 12 0 0.905088 0.907253 1.612873 1.654810 1.565029 1.818584 1.904672 1.972629 2.374980 2.535813
177 12 0 0.973768 0.974969 1.706672 1.817640 1.948855 1.981492 1.845900 1.813168 3.092681 2.647117
178 12 0 1.054022 0.944631 1.657234 1.434735 1.987988 1.952430 1.856019 2.129427 2.613805 2.064319
179 12 1 1.307610 0.849637 1.721070 1.607515 2.389566 1.509783 4.234613 2.282983 4.611651 2.695842
180 13 3 2.101795 11.520951 12.281382 0.783199 2.569804 44.310354 2.828073 8.891736 2.270003 23.612560
181 13 3 1.109799 0.950626 1.884682 1.397888 2.240161 1.842242 2.071374 1.514567 3.029835 1.764949
182 13 0 1.668860 1.336951 5.083150 2.135185 5.723407 3.800017 2.102175 1.857667 1.949881 2.268519
183 13 1 1.082663 0.962139 1.554009 1.611055 3.172267 2.425702 1.673666 1.734928 2.061173 2.880550
184 14 0 0.956444 0.820640 1.843527 1.787510 1.850709 1.703416 1.860888 1.761448 4.059812 6.691869
185 14 1 1.208976 1.214725 1.828276 1.611790 1.907660 2.168642 2.033273 2.370050 2.287561 1.885493
186 14 1 1.102537 0.999620 1.758931 1.499338 1.873255 1.745029 1.750790 1.877538 2.701848 3.204125
187 14 1 1.183072 1.340820 2.189907 3.016603 2.218119 2.993225 3.058896 5.150843 8.967903 17.435116
189 15 3 0.963593 1.105398 1.951169 1.871262 1.800399 1.987291 1.696185 2.095630 2.197934 3.109255
190 15 3 3.142376 2.109126 9.754334 1.069203 3.210754 3.038870 2.743513 2.606361 3.092847 4.492902
191 15 3 1.161049 1.148199 2.107244 1.610467 2.454766 2.637232 1.979576 1.976967 2.137373 2.061968
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 4.160743 4.726850 10.383256 24.714736 4.126617 6.499891 5.231860 4.248228 7.641566 3.765973
321 2 3 1.262547 0.809007 1.796401 1.984130 1.752329 1.589394 1.709424 1.783152 2.037568 2.142897
323 2 3 0.891840 2.424182 4.319706 5.507827 1.511336 3.572273 1.621889 1.786720 1.920427 3.048588
324 4 3 0.874406 5.100507 4.433820 43.607550 1.609278 1.699685 1.746948 1.614379 1.769024 2.256230
329 12 1 0.792984 0.917218 2.237211 10.084823 1.652991 1.936972 1.646386 1.889769 1.996324 2.329436
333 12 1 0.829949 1.085806 1.806240 2.069581 2.161505 3.567452 1.664093 1.882305 1.884007 2.282576
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 [ ]: