Nightly Per-Antenna Quality Summary Notebook¶

Josh Dillon, Last Revised February 2021

This notebooks brings together as much information as possible from ant_metrics, auto_metrics and redcal to help figure out which antennas are working properly and summarizes it in a single giant table. It is meant to be lightweight and re-run as often as necessary over the night, so it can be run when any of those is done and then be updated when another one completes.

In [1]:
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
import pandas as pd
pd.set_option('display.max_rows', 1000)
from hera_qm.metrics_io import load_metric_file
from hera_cal import utils, io, redcal
import glob
import os
import h5py
from copy import deepcopy
from IPython.display import display, HTML
from hera_notebook_templates.utils import status_colors

%matplotlib inline
%config InlineBackend.figure_format = 'retina'
display(HTML("<style>.container { width:100% !important; }</style>"))
In [2]:
# If you want to run this notebook locally, copy the output of the next cell into the first few lines of this cell.

# JD = "2459122"
# data_path = '/lustre/aoc/projects/hera/H4C/2459122'
# ant_metrics_ext = ".ant_metrics.hdf5"
# redcal_ext = ".maybe_good.omni.calfits"
# nb_outdir = '/lustre/aoc/projects/hera/H4C/h4c_software/H4C_Notebooks/_rtp_summary_'
# os.environ["JULIANDATE"] = JD
# os.environ["DATA_PATH"] = data_path
# os.environ["ANT_METRICS_EXT"] = ant_metrics_ext
# os.environ["REDCAL_EXT"] = redcal_ext
# os.environ["NB_OUTDIR"] = nb_outdir
In [3]:
# Use environment variables to figure out path to data
JD = os.environ['JULIANDATE']
data_path = os.environ['DATA_PATH']
ant_metrics_ext = os.environ['ANT_METRICS_EXT']
redcal_ext = os.environ['REDCAL_EXT']
nb_outdir = os.environ['NB_OUTDIR']
print(f'JD = "{JD}"')
print(f'data_path = "{data_path}"')
print(f'ant_metrics_ext = "{ant_metrics_ext}"')
print(f'redcal_ext = "{redcal_ext}"')
print(f'nb_outdir = "{nb_outdir}"')
JD = "2459750"
data_path = "/mnt/sn1/2459750"
ant_metrics_ext = ".ant_metrics.hdf5"
redcal_ext = ".known_good.omni.calfits"
nb_outdir = "/home/obs/src/H5C_Notebooks/_rtp_summary_"
In [4]:
from astropy.time import Time
utc = Time(JD, format='jd').datetime
print(f'Date: {utc.month}-{utc.day}-{utc.year}')
Date: 6-19-2022
In [5]:
# Per-season options
def ant_to_report_url(ant):
    return f'https://htmlpreview.github.io/?https://github.com/HERA-Team/H5C_Notebooks/blob/main/antenna_report/antenna_{ant}_report.html'

Load Auto Metrics¶

In [6]:
use_auto_metrics = False

# find the auto_metrics file
glob_str = os.path.join(data_path, f'zen.{JD}*.auto_metrics.h5')
auto_metrics_file = sorted(glob.glob(glob_str))

# if it exists, load and extract relevant information
if len(auto_metrics_file) > 0:
    auto_metrics_file = auto_metrics_file[0]
    print(f'Found auto_metrics results file at {auto_metrics_file}.')
    
    auto_metrics = load_metric_file(auto_metrics_file)
    mean_round_modz_cut = auto_metrics['parameters']['mean_round_modz_cut']
    auto_ex_ants = auto_metrics['ex_ants']['r2_ex_ants']
    
    use_auto_metrics = True
else:
    print(f'No files found matching glob {glob_str}. Skipping auto_metrics.')
Found auto_metrics results file at /mnt/sn1/2459750/zen.2459750.25309.sum.auto_metrics.h5.

Load Ant Metrics¶

In [7]:
use_ant_metrics = False

# get a list of all ant_metrics files
glob_str = os.path.join(data_path, f'zen.{JD}.?????.sum{ant_metrics_ext}')
ant_metrics_files = sorted(glob.glob(glob_str))

# if they exist, load as many of them as possible
if len(ant_metrics_files) > 0:
    print(f'Found {len(ant_metrics_files)} ant_metrics files matching glob {glob_str}')
    ant_metrics_apriori_exants = {}
    ant_metrics_xants_dict = {}
    ant_metrics_dead_ants_dict = {}
    ant_metrics_crossed_ants_dict = {}
    ant_metrics_dead_metrics = {}
    ant_metrics_crossed_metrics = {}
    dead_cuts = {}
    crossed_cuts = {}
    for amf in ant_metrics_files:
        with h5py.File(amf, "r") as infile: # use h5py directly since it's much faster than load_metric_file
            # get out results for this file
            dead_cuts[amf] = infile['Metrics']['dead_ant_cut'][()]
            crossed_cuts[amf] = infile['Metrics']['cross_pol_cut'][()]
            xants = infile['Metrics']['xants'][:]
            dead_ants = infile['Metrics']['dead_ants'][:]
            crossed_ants = infile['Metrics']['crossed_ants'][:]        
            try:
                # look for ex_ants in history
                ex_ants_string = infile['Header']['history'][()].decode()
                ex_ants_string = ex_ants_string.split('--apriori_xants')[1]
                ex_ants_string = ex_ants_string.split('--')[0].strip()
            except:
                ex_ants_string = ''
                    
            # This only works for the new correlation-matrix-based ant_metrics
            if 'corr' in infile['Metrics']['final_metrics'] and 'corrXPol' in infile['Metrics']['final_metrics']:
                ant_metrics_dead_metrics[amf] = {eval(ant): infile['Metrics']['final_metrics']['corr'][ant][()]
                                                 for ant in infile['Metrics']['final_metrics']['corr']}
                ant_metrics_crossed_metrics[amf] = {eval(ant): infile['Metrics']['final_metrics']['corrXPol'][ant][()]
                                                    for ant in infile['Metrics']['final_metrics']['corrXPol']}                       
            else:
                raise(KeywordError)
        
        # organize results by file
        ant_metrics_xants_dict[amf] = [(int(ant[0]), ant[1].decode()) for ant in xants]
        ant_metrics_dead_ants_dict[amf] = [(int(ant[0]), ant[1].decode()) for ant in dead_ants]
        ant_metrics_crossed_ants_dict[amf] = [(int(ant[0]), ant[1].decode()) for ant in crossed_ants]
        ant_metrics_apriori_exants[amf] = [int(ant) for ant in ex_ants_string.split()]
    
    dead_cut = np.median(list(dead_cuts.values()))
    crossed_cut = np.median(list(crossed_cuts.values()))
        
    use_ant_metrics = True
else:
    print(f'No files found matching glob {glob_str}. Skipping ant_metrics.')
Found 1849 ant_metrics files matching glob /mnt/sn1/2459750/zen.2459750.?????.sum.ant_metrics.hdf5

Load chi^2 info from redcal¶

In [8]:
use_redcal = False
glob_str = os.path.join(data_path, f'zen.{JD}.?????.sum{redcal_ext}')

redcal_files = sorted(glob.glob(glob_str))
if len(redcal_files) > 0:
    print(f'Found {len(redcal_files)} ant_metrics files matching glob {glob_str}')
    post_redcal_ant_flags_dict = {}
    flagged_by_redcal_dict = {}
    cspa_med_dict = {}
    for cal in redcal_files:
        hc = io.HERACal(cal)
        _, flags, cspa, chisq = hc.read()
        cspa_med_dict[cal] = {ant: np.nanmedian(cspa[ant], axis=1) for ant in cspa}

        post_redcal_ant_flags_dict[cal] = {ant: np.all(flags[ant]) for ant in flags}
        # check history to distinguish antennas flagged going into redcal from ones flagged during redcal
        tossed_antenna_lines =  hc.history.replace('\n','').split('Throwing out antenna ')[1:]
        flagged_by_redcal_dict[cal] = sorted([int(line.split(' ')[0]) for line in tossed_antenna_lines])
        
    use_redcal = True
else:
    print(f'No files found matching glob {glob_str}. Skipping redcal chisq.')
Found 185 ant_metrics files matching glob /mnt/sn1/2459750/zen.2459750.?????.sum.known_good.omni.calfits

Figure out some general properties¶

In [9]:
# Parse some general array properties, taking into account the fact that we might be missing some of the metrics
ants = []
pols = []
antpol_pairs = []

if use_auto_metrics:
    ants = sorted(set(bl[0] for bl in auto_metrics['modzs']['r2_shape_modzs']))
    pols = sorted(set(bl[2] for bl in auto_metrics['modzs']['r2_shape_modzs']))
if use_ant_metrics:
    antpol_pairs = sorted(set([antpol for dms in ant_metrics_dead_metrics.values() for antpol in dms.keys()]))
    antpols = sorted(set(antpol[1] for antpol in antpol_pairs))
    ants = sorted(set(antpol[0] for antpol in antpol_pairs) | set(ants))
    pols = sorted(set(utils.join_pol(ap, ap) for ap in antpols) | set(pols))
if use_redcal:
    antpol_pairs = sorted(set([ant for cspa in cspa_med_dict.values() for ant in cspa.keys()]) | set(antpol_pairs))
    antpols = sorted(set(antpol[1] for antpol in antpol_pairs))
    ants = sorted(set(antpol[0] for antpol in antpol_pairs) | set(ants))
    pols = sorted(set(utils.join_pol(ap, ap) for ap in antpols) | set(pols))

# Figure out remaining antennas not in data
hd = io.HERAData(sorted(glob.glob(os.path.join(data_path, 'zen.*.sum.uvh5')))[0])
unused_ants = [ant for ant in hd.antpos if ant not in ants]    

Load a priori antenna statuses and node numbers¶

In [10]:
# try to load a priori antenna statusesm but fail gracefully if this doesn't work.
a_priori_statuses = {ant: 'Not Found' for ant in ants}
nodes = {ant: np.nan for ant in ants + unused_ants}
try:
    from hera_mc import cm_hookup

    # get node numbers
    hookup = cm_hookup.get_hookup('default')
    for ant_name in hookup:
        ant = int("".join(filter(str.isdigit, ant_name)))
        if ant in nodes:
            if hookup[ant_name].get_part_from_type('node')['E<ground'] is not None:
                nodes[ant] = int(hookup[ant_name].get_part_from_type('node')['E<ground'][1:])
    
    # get apriori antenna status
    for ant_name, data in hookup.items():
        ant = int("".join(filter(str.isdigit, ant_name)))
        if ant in a_priori_statuses:
            a_priori_statuses[ant] = data.apriori

except Exception as err:
    print(f'Could not load node numbers and a priori antenna statuses.\nEncountered {type(err)} with message: {err}')

Summarize auto metrics¶

In [11]:
if use_auto_metrics:
    # Parse modzs
    modzs_to_check = {'Shape': 'r2_shape_modzs', 'Power': 'r2_power_modzs', 
                      'Temporal Variability': 'r2_temp_var_modzs', 'Temporal Discontinuties': 'r2_temp_diff_modzs'}
    worst_metrics = []
    worst_zs = []
    all_modzs = {}
    binary_flags = {rationale: [] for rationale in modzs_to_check}

    for ant in ants:
        # parse modzs and figure out flag counts
        modzs = {f'{pol} {rationale}': auto_metrics['modzs'][dict_name][(ant, ant, pol)] 
                 for rationale, dict_name in modzs_to_check.items() for pol in pols}
        for pol in pols:
            for rationale, dict_name in modzs_to_check.items():
                binary_flags[rationale].append(auto_metrics['modzs'][dict_name][(ant, ant, pol)] > mean_round_modz_cut)

        # parse out all metrics for dataframe
        for k in modzs:
            col_label = k + ' Modified Z-Score'
            if col_label in all_modzs:
                all_modzs[col_label].append(modzs[k])
            else:
                all_modzs[col_label] = [modzs[k]]
                
    mean_round_modz_cut = auto_metrics['parameters']['mean_round_modz_cut']
else:
    mean_round_modz_cut = 0

Summarize ant metrics¶

In [12]:
if use_ant_metrics:
    a_priori_flag_frac = {ant: np.mean([ant in apxa for apxa in ant_metrics_apriori_exants.values()]) for ant in ants}
    dead_ant_frac = {ap: {ant: np.mean([(ant, ap) in das for das in ant_metrics_dead_ants_dict.values()])
                                 for ant in ants} for ap in antpols}
    crossed_ant_frac = {ant: np.mean([np.any([(ant, ap) in cas for ap in antpols])
                                      for cas in ant_metrics_crossed_ants_dict.values()]) for ant in ants}
    ant_metrics_xants_frac_by_antpol = {antpol: np.mean([antpol in amx for amx in ant_metrics_xants_dict.values()]) for antpol in antpol_pairs}
    ant_metrics_xants_frac_by_ant = {ant: np.mean([np.any([(ant, ap) in amx for ap in antpols])
                                     for amx in ant_metrics_xants_dict.values()]) for ant in ants}
    average_dead_metrics = {ap: {ant: np.nanmean([dm.get((ant, ap), np.nan) for dm in ant_metrics_dead_metrics.values()]) 
                                 for ant in ants} for ap in antpols}
    average_crossed_metrics = {ant: np.nanmean([cm.get((ant, ap), np.nan) for ap in antpols 
                                                for cm in ant_metrics_crossed_metrics.values()]) for ant in ants}
else:
    dead_cut = 0.4
    crossed_cut = 0.0

Summarize redcal chi^2 metrics¶

In [13]:
if use_redcal:
    cspa = {ant: np.nanmedian(np.hstack([cspa_med_dict[cal][ant] for cal in redcal_files])) for ant in antpol_pairs}
    redcal_prior_flag_frac = {ant: np.mean([np.any([afd[ant, ap] and not ant in flagged_by_redcal_dict[cal] for ap in antpols])
                                            for cal, afd in post_redcal_ant_flags_dict.items()]) for ant in ants}
    redcal_flagged_frac = {ant: np.mean([ant in fbr for fbr in flagged_by_redcal_dict.values()]) for ant in ants}

Build DataFrame¶

In [14]:
# build dataframe
to_show = {'Ant': [f'<a href="{ant_to_report_url(ant)}" target="_blank">{ant}</a>' for ant in ants],
           'Node': [nodes[ant] for ant in ants], 
           'A Priori Status': [a_priori_statuses[ant] for ant in ants]}
           #'Worst Metric': worst_metrics, 'Worst Modified Z-Score': worst_zs}
df = pd.DataFrame(to_show)

# create bar chart columns for flagging percentages:
bar_cols = {}
if use_auto_metrics:
    bar_cols['Auto Metrics Flags'] = [float(ant in auto_ex_ants) for ant in ants]
if use_ant_metrics:
    if np.sum(list(a_priori_flag_frac.values())) > 0:  # only include this col if there are any a priori flags
        bar_cols['A Priori Flag Fraction in Ant Metrics'] = [a_priori_flag_frac[ant] for ant in ants]
    for ap in antpols:
        bar_cols[f'Dead Fraction in Ant Metrics ({ap})'] = [dead_ant_frac[ap][ant] for ant in ants]
    bar_cols['Crossed Fraction in Ant Metrics'] = [crossed_ant_frac[ant] for ant in ants]
if use_redcal:
    bar_cols['Flag Fraction Before Redcal'] = [redcal_prior_flag_frac[ant] for ant in ants]
    bar_cols['Flagged By Redcal chi^2 Fraction'] = [redcal_flagged_frac[ant] for ant in ants]  
for col in bar_cols:
    df[col] = bar_cols[col]

# add auto_metrics
if use_auto_metrics:
    for label, modz in all_modzs.items():
        df[label] = modz
z_score_cols = [col for col in df.columns if 'Modified Z-Score' in col]        
        
# add ant_metrics
ant_metrics_cols = {}
if use_ant_metrics:
    for ap in antpols:
        ant_metrics_cols[f'Average Dead Ant Metric ({ap})'] = [average_dead_metrics[ap][ant] for ant in ants]
    ant_metrics_cols['Average Crossed Ant Metric'] = [average_crossed_metrics[ant] for ant in ants]
    for col in ant_metrics_cols:
        df[col] = ant_metrics_cols[col]   

# add redcal chisq
redcal_cols = []
if use_redcal:
    for ap in antpols:
        col_title = f'Median chi^2 Per Antenna ({ap})'
        df[col_title] = [cspa[ant, ap] for ant in ants]
        redcal_cols.append(col_title)

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

# style dataframe
table = df.style.hide_index()\
          .applymap(lambda val: f'background-color: {status_colors[val]}' if val in status_colors else '', subset=['A Priori Status']) \
          .background_gradient(cmap='viridis', vmax=mean_round_modz_cut * 3, vmin=0, axis=None, subset=z_score_cols) \
          .background_gradient(cmap='bwr_r', vmin=dead_cut-.25, vmax=dead_cut+.25, axis=0, subset=list([col for col in ant_metrics_cols if 'dead' in col.lower()])) \
          .background_gradient(cmap='bwr_r', vmin=crossed_cut-.25, vmax=crossed_cut+.25, axis=0, subset=list([col for col in ant_metrics_cols if 'crossed' in col.lower()])) \
          .background_gradient(cmap='plasma', vmax=4, vmin=1, axis=None, subset=redcal_cols) \
          .applymap(lambda val: 'font-weight: bold' if val < dead_cut else '', subset=list([col for col in ant_metrics_cols if 'dead' in col.lower()])) \
          .applymap(lambda val: 'font-weight: bold' if val < crossed_cut else '', subset=list([col for col in ant_metrics_cols if 'crossed' in col.lower()])) \
          .applymap(lambda val: 'font-weight: bold' if val > mean_round_modz_cut else '', subset=z_score_cols) \
          .applymap(lambda val: 'color: red' if val > mean_round_modz_cut else '', subset=z_score_cols) \
          .bar(subset=list(bar_cols.keys()), vmin=0, vmax=1) \
          .format({col: '{:,.4f}'.format for col in z_score_cols}) \
          .format({col: '{:,.4f}'.format for col in ant_metrics_cols}) \
          .format({col: '{:,.2%}'.format for col in bar_cols}) \
          .applymap(lambda val: 'font-weight: bold', subset=['Ant']) \
          .set_table_styles([dict(selector="th",props=[('max-width', f'70pt')])]) \

Table 1: RTP Per-Antenna Metrics Summary Table¶

This admittedly very busy table incorporates summary information about all antennas in the array. Its columns depend on what information is available when the notebook is run (i.e. whether auto_metrics, ant_metrics, and/or redcal is done). These can be divided into 5 sections:

Basic Antenna Info: antenna number, node, and its a priori status.

Flag Fractions: Fraction of the night that an antenna was flagged for various reasons. Note that auto_metrics flags antennas for the whole night, so it'll be 0% or 100%.

auto_metrics Details: If auto_metrics is included, this section shows the modified Z-score signifying how much of an outlier each antenna and polarization is in each of four categories: bandpass shape, overall power, temporal variability, and temporal discontinuities. Bold red text indicates that this is a reason for flagging the antenna. It is reproduced from the auto_metrics_inspect.ipynb nightly notebook, so check that out for more details on the precise metrics.

ant_metrics Details: If ant_metrics is included, this section shows the average correlation-based metrics for antennas over the whole night. Low "dead ant" metrics (nominally below 0.4) indicate antennas not correlating with the rest of the array. Negative "crossed ant" metrics indicate antennas that show stronger correlations in their cross-pols than their same-pols, indicating that the two polarizations are probably swapped. Bold text indicates that the average is below the threshold for flagging.

redcal chi^2 Details: If redcal is included, this shows the median chi^2 per antenna. This would be 1 in an ideal array. Antennas are thrown out when they they are outliers in their median chi^2, usually greater than 4-sigma outliers in modified Z-score.

In [15]:
HTML(table.render())
Out[15]:
Ant Node A Priori Status Auto Metrics Flags Dead Fraction in Ant Metrics (Jee) Dead Fraction in Ant Metrics (Jnn) Crossed Fraction in Ant Metrics Flag Fraction Before Redcal Flagged By Redcal chi^2 Fraction ee Shape Modified Z-Score nn Shape Modified Z-Score ee Power Modified Z-Score nn Power Modified Z-Score ee Temporal Variability Modified Z-Score nn Temporal Variability Modified Z-Score ee Temporal Discontinuties Modified Z-Score nn Temporal Discontinuties Modified Z-Score Average Dead Ant Metric (Jee) Average Dead Ant Metric (Jnn) Average Crossed Ant Metric Median chi^2 Per Antenna (Jee) Median chi^2 Per Antenna (Jnn)
0 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 24.330925 13.144378 144.295097 145.530956 1941.357491 2899.421177 6633.981751 8285.695897 0.017021 0.016102 0.001138 1.216621 1.196756
1 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 87.611372 112.092116 185.724740 188.794887 39.640267 53.014804 544.243642 1029.647324 0.016171 0.016380 0.000382 0.777948 0.782817
2 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 71.464447 103.102339 182.054816 182.472646 56.750465 33.650130 888.575577 589.802951 0.016389 0.016451 0.000433 1.098196 1.098679
3 1 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.430426 1.102570 -0.350561 -0.051744 -0.143059 -0.507710 -0.279316 0.800517 0.646917 0.545422 0.383428 8.344441 7.777331
4 1 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.096075 3.011208 0.219320 0.351720 -0.362163 0.090103 2.757128 0.559925 0.658691 0.542900 0.392350 10.820375 12.632182
5 1 digital_ok 0.00% 0.00% 0.00% 0.00% 3.24% 3.78% -0.220969 0.759265 0.046767 2.686930 -0.378705 2.895643 1.825457 -1.617233 0.660017 0.539869 0.389835 1.768161 1.532545
7 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.727161 -1.134326 -0.373313 -0.163168 -0.791400 -0.035121 -0.285592 11.527086 0.071792 0.058675 0.009616 1.284884 1.273068
8 2 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 4.075345 4.785960 8.301925 9.904866 11.232865 12.800574 0.822246 -1.772029 0.080391 0.071906 0.010381 1.189684 1.186974
9 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.093698 -1.068054 -0.200927 -0.158689 -0.512495 0.042896 -0.611662 -0.635251 0.057190 0.051904 0.005039 1.130739 1.129683
10 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
11 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
12 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
13 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
14 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
15 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.54% 6.49% -0.615915 0.246480 0.908668 -0.364778 0.681797 0.188531 -0.516554 0.786342 0.670223 0.560127 0.380991 2.274552 1.842980
16 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.54% 9.73% -1.030444 -0.206069 -0.712897 0.762449 -1.354882 0.174721 2.753373 1.397209 0.671183 0.562519 0.384371 2.118162 1.487210
17 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.54% 10.27% -0.842779 0.020521 -0.285435 -0.077543 -0.209804 0.270770 2.062272 2.196850 0.662793 0.553408 0.386911 2.268183 1.903687
18 1 RF_maintenance 100.00% 9.19% 79.99% 0.00% 100.00% 0.00% 2.769980 11.632924 1.437988 2.057043 14.030592 12.682436 123.708726 83.301481 0.629021 0.345852 0.451544 5.344106 2.878181
19 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
20 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
21 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.629557 4.762932 0.945344 10.771851 1.633566 11.971291 0.025130 6.623971 0.056348 0.053049 0.005615 1.195032 1.198458
23 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
24 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
25 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 428.484549 431.935361 inf inf 34.810290 115.684262 510.073764 1745.730647 nan nan nan 0.000000 0.000000
26 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 426.940686 390.736913 361.094049 287.582493 40.400670 39.396180 792.320636 594.714433 0.020973 0.016541 0.006682 1.060740 1.122398
27 1 RF_maintenance 100.00% 100.00% 77.83% 0.00% 100.00% 0.00% 45.458809 33.714694 81.494655 25.884272 22.631495 18.070962 26.661982 133.032905 0.100660 0.368429 0.231335 1.274766 3.211696
28 1 RF_maintenance 100.00% 90.27% 70.85% 9.73% 100.00% 0.00% 32.164118 2.104976 20.701883 3.161621 11.207426 6.666072 58.899520 0.543193 0.176237 0.324122 -0.058051 2.399035 6.994140
29 1 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
30 1 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
31 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.635543 0.708246 0.079103 2.017180 -0.042896 1.996688 0.777785 0.541163 0.069108 0.063656 0.011001 1.160406 1.156848
32 2 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 37.546014 19.492583 3.182827 1.171389 4.533510 9.484262 41.247781 217.404998 0.071363 0.070229 0.007199 1.274914 1.272841
33 2 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.177685 5.679422 -0.205503 -0.159840 -0.439812 3.213823 0.507043 15.334222 0.056790 0.084950 0.027548 1.170198 1.163588
36 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 8.455302 8.603454 0.810866 7.117959 1.208559 9.235612 -0.017883 1.880978 0.726602 0.629704 0.408741 3.627677 3.246236
37 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.855320 3.922940 5.368304 7.453685 7.728443 9.436186 0.927015 3.396550 0.736513 0.636596 0.401962 4.699288 4.557595
38 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.563310 5.136491 5.385427 8.590309 7.111173 10.899723 5.192612 -1.436940 0.740821 0.644140 0.406698 6.650979 5.989064
39 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 410.914592 439.454110 320.286142 inf 50.104923 165.855164 892.469586 2872.725148 0.017103 nan nan 1.123099 0.000000
40 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.16% 1.422118 1.410255 2.076630 1.540990 1.953112 1.595838 -0.455378 -0.669009 0.742676 0.660966 0.402493 2.090275 1.731694
41 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.54% 8.11% -0.020521 -0.960287 1.050272 -0.791782 0.548886 -0.982360 -0.775990 0.041923 0.743754 0.656645 0.406432 2.206024 1.644289
42 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 5.95% -0.643066 0.534863 0.182104 -0.436390 -0.328846 -0.163975 -0.153498 -0.228662 0.741924 0.650352 0.411180 2.372903 1.874067
45 5 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 0.379253 27.930986 0.046397 91.760492 0.586631 219.489984 7.395053 719.459298 0.719079 0.088108 0.472602 4.932532 1.597223
46 5 digital_ok 0.00% 0.00% 0.00% 0.00% 7.03% 4.32% -0.868910 -1.240055 -0.916212 -0.655060 -0.695657 -0.876823 2.935373 1.357407 0.706450 0.588792 0.440322 1.296146 1.227770
50 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.041872 4.596898 3.858851 -0.113180 3.994943 2.421775 23.546625 64.773950 0.724393 0.620174 0.391408 3.771399 3.378748
51 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.577626 4.718806 -0.786434 6.639322 -1.241357 7.543969 2.289227 -0.775675 0.736850 0.646069 0.395483 4.919210 4.836161
52 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.425814 5.215846 1.322873 1.598674 6.021430 5.345035 89.085035 135.552631 0.717400 0.625267 0.357066 9.074276 12.402840
53 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.70% 1.505982 1.863447 2.735656 1.578244 2.719863 1.034655 0.573610 1.994391 0.743151 0.668362 0.397102 1.721029 1.436820
54 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.037936 1.140105 0.289453 0.165181 0.153203 2.677005 0.316988 11.868236 0.741098 0.660946 0.393900 9.627400 9.569376
55 4 digital_ok 100.00% 0.00% 0.00% 100.00% 100.00% 0.00% 2.060499 2.813083 1.496717 2.351009 1.765690 4.507677 2.815153 17.007243 0.331327 0.348724 -0.269308 4.714455 5.440997
56 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.405819 1.648777 -0.618687 1.197919 -0.881598 0.887242 -0.054853 17.649543 0.743670 0.658579 0.406991 9.480375 8.413784
57 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 11.093329 1.353673 21.622724 5.133751 21.255339 7.379754 6.584807 -0.482632 0.739264 0.640180 0.417153 8.288735 7.340044
65 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.820027 3.439167 5.012135 5.140044 6.999357 6.841910 -1.278142 -1.136835 0.721139 0.623011 0.408389 4.789294 4.051010
66 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.013924 2.619156 8.446693 2.706082 10.510171 3.117619 -1.734688 0.425302 0.729054 0.649023 0.393911 4.697885 4.707729
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.555602 6.963502 5.398278 17.480267 6.859731 19.972174 1.265302 5.449478 0.747002 0.670694 0.394586 4.955872 5.216558
68 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.033360 0.401385 3.286007 2.397932 4.649979 3.311418 -1.272979 1.191782 0.740049 0.670981 0.396328 7.867163 7.752052
69 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 7.03% -1.033566 -0.859390 0.104903 -0.954486 0.156632 0.724946 -0.679973 -0.450967 0.746413 0.670730 0.405479 1.838026 1.573700
70 4 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 12.981718 11.280504 18.298557 21.380657 20.586773 22.013785 7.288171 9.753956 0.747946 0.657867 0.414232 19.468544 13.024214
71 4 digital_ok 100.00% 0.00% 0.00% 100.00% 100.00% 0.00% 2.360018 0.919281 4.137602 4.665114 7.048551 5.541222 0.374445 -0.614958 0.330059 0.339311 -0.274247 3.802980 3.691763
72 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.973869 -0.779067 1.195652 -0.250541 0.897760 0.267770 11.168649 4.187331 0.741106 0.650703 0.407822 7.481354 5.922064
73 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.259687 8.138569 2.106796 16.825169 1.990076 17.895086 1.378647 3.163942 0.735511 0.631036 0.423463 6.453809 5.484391
81 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.250443 1.109723 0.861044 -0.674844 0.217846 -0.404620 6.666492 3.590628 0.721348 0.621065 0.408281 4.826739 4.017713
82 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.945001 2.558106 -0.161725 1.133666 2.603709 1.491963 15.679774 3.222332 0.729090 0.648089 0.404775 3.956059 3.829401
83 7 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 28.565125 29.987919 83.226832 85.283834 27.786783 25.872421 5.357854 4.519367 0.048762 0.055283 0.002210 1.204487 1.194014
84 8 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 8.431654 9.756695 0.183210 1.602230 -0.095118 1.400191 2.216508 8.436914 0.079471 0.078702 0.013442 1.259594 1.251812
85 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
86 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
87 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 3.692963 6.620912 7.451517 12.310065 11.953931 15.820147 4.396183 -2.407403 0.096544 0.093830 0.023149 1.175655 1.166952
88 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
89 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
90 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
91 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
92 10 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 23.499254 27.839595 91.163878 93.903607 28.062827 26.175865 4.279085 4.979412 0.035216 0.051213 0.006995 1.352992 1.401510
93 10 RF_maintenance 100.00% 42.67% 100.00% 0.00% 100.00% 0.00% 8.793984 31.562241 0.279739 95.357104 14.093061 26.071235 2.004686 8.010449 0.425062 0.051463 0.223557 6.290700 1.360660
94 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.366870 3.166823 1.208025 8.307180 1.026330 11.139349 2.938371 6.212112 0.709329 0.587390 0.420764 6.873846 6.349170
98 7 digital_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 26.645017 28.423007 80.870430 82.758310 27.929871 25.977123 5.398100 4.494255 0.042690 0.048311 0.007409 1.047800 1.048788
99 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.042188 2.787794 4.838083 6.739218 4.708550 6.614680 2.708531 8.334574 0.727678 0.633136 0.411205 6.183439 4.947020
100 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 27.730129 29.715317 82.191537 86.950322 27.866401 25.913456 7.353978 6.230735 0.046703 0.055208 0.008935 1.408302 1.569559
101 8 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 7.826511 10.055258 -0.011331 3.092271 -0.498991 3.986093 4.610781 3.487067 0.088116 0.071215 0.015693 1.217956 1.216496
102 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
103 8 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 4.059749 9.559676 2.009307 3.216961 1.496885 3.201021 0.568291 0.778605 0.053802 0.056122 0.004813 1.199964 1.200070
104 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 7.547879 101.683007 1.366083 92.022302 1.010012 28.639774 0.316696 5.889417 0.065066 0.090288 0.022844 1.178553 1.149473
105 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
106 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
107 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
108 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
109 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.907133 -1.067990 -0.236145 0.222576 -0.759178 -0.396354 -0.062819 1.145725 0.730888 0.624963 0.412597 1.621132 1.471971
110 10 RF_maintenance 100.00% 7.03% 2.16% 0.00% 100.00% 0.00% 48.348558 12.391334 7.599232 0.492679 5.183451 9.238168 56.893298 139.694015 0.643111 0.573749 0.307976 8.213346 9.349024
111 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.144605 0.824307 -0.680344 -0.268804 -0.938931 0.124506 0.016139 3.206751 0.714683 0.596697 0.412457 1.731601 1.526662
112 10 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% -0.890092 32.265641 0.659948 94.782436 1.014962 26.003905 2.739562 4.435156 0.702871 0.064695 0.433142 5.926471 1.703800
116 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 28.914201 31.337149 83.353881 85.561425 27.774072 25.863532 4.592374 5.780747 0.046895 0.045425 0.001584 0.000000 0.000000
119 7 RF_maintenance 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 28.010026 0.353331 81.900368 -0.634862 27.616325 -0.762721 4.977119 2.326488 0.049075 0.644638 0.403246 1.552318 10.237214
120 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 18.323904 47.190058 11.996966 101.727199 15.452143 25.994364 2.509432 7.989191 0.090351 0.038835 0.049593 1.338268 1.291514
121 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 2.468509 10.570611 1.557661 14.867072 1.715174 16.413887 28.259475 22.862736 0.059810 0.041240 0.004041 1.149924 1.149985
122 8 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 10.711737 7.599422 4.636740 1.014688 4.766936 0.802016 2.366264 3.654901 0.055214 0.059239 0.005607 1.303728 1.297432
123 8 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 6.719586 6.974903 2.287293 4.153611 2.595440 5.482818 0.386726 -0.277099 0.084637 0.079784 0.014255 1.091563 1.087894
124 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
125 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
126 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
127 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.367711 0.596968 2.537947 1.949586 4.245738 3.761945 0.868191 3.775882 0.730848 0.634391 0.406565 9.454918 10.575989
128 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.705916 2.530895 -0.809837 0.278042 -1.157308 0.663670 -0.692831 -1.063237 0.726025 0.614363 0.403981 1.661951 1.494666
129 10 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.310060 -0.372706 10.344190 1.543747 12.466504 1.757005 1.074369 0.051620 0.721727 0.611616 0.405971 10.399667 11.872525
130 10 digital_maintenance 100.00% 100.00% 87.02% 0.00% 100.00% 0.00% 25.413221 9.654677 91.822871 12.088305 27.804725 20.078143 3.815818 -1.222140 0.056090 0.344845 0.177902 1.360115 6.785634
135 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.569257 -0.183097 -0.344480 -0.290834 -0.422190 -0.471709 2.147456 4.989381 0.705437 0.599970 0.416737 5.964329 5.335141
136 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.149777 12.300833 -0.581973 0.898089 0.781489 1.913158 6.479062 11.266112 0.717495 0.599357 0.409848 8.123939 7.267022
138 7 digital_ok 0.00% 0.00% 0.00% 0.00% 7.57% 0.54% 0.613580 2.485081 -0.715537 -0.382346 -1.010487 -0.523587 -0.750173 0.273483 0.733244 0.639521 0.418450 1.478996 1.283778
140 13 digital_ok 0.00% 0.00% 0.00% 0.00% 7.57% 0.54% 2.128058 1.764596 -0.017901 0.638244 0.717277 1.695078 1.233168 2.545701 0.733097 0.643653 0.410463 1.609920 1.370561
141 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.232694 7.986795 1.324258 23.918848 0.920609 22.594883 2.125673 30.432947 0.735447 0.630875 0.418223 7.247628 6.972264
142 13 digital_ok 100.00% 78.96% 100.00% 0.00% 100.00% 0.00% 2.049180 32.579757 7.041403 94.200011 7.541777 25.982429 3.187930 4.163664 0.340560 0.062345 0.081986 3.461837 1.606636
143 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
144 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.607366 5.056356 9.927666 9.889365 12.300361 20.786784 5.674190 4.491876 0.736331 0.643420 0.426183 4.421249 3.863437
145 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.521017 -0.080778 3.503301 -0.244537 4.944208 -0.091548 4.902399 4.575449 0.730991 0.635128 0.418369 10.168457 6.961601
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 27.617195 31.905142 92.460832 96.502990 27.976108 26.053109 6.347840 6.942123 0.052808 0.053484 0.001816 1.150390 1.145021
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 25.344374 27.047231 90.940906 93.606390 28.054413 26.101257 6.277474 6.771522 0.053413 0.050733 0.001607 1.360881 1.339261
156 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.105326 0.439901 -0.781681 -0.736927 -1.168039 -0.533595 -0.166879 1.818561 0.720452 0.605397 0.413403 9.672255 7.827075
157 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.796490 -0.148122 5.401699 -0.659621 7.168219 -0.321509 -0.584133 2.212802 0.719171 0.626773 0.405828 6.780271 6.551476
158 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.587143 -1.389246 0.449397 0.899956 -0.242644 0.612282 -0.027813 -0.016139 0.730871 0.636852 0.404412 9.666454 8.208520
160 13 digital_ok 100.00% 29.15% 42.67% 0.00% 100.00% 0.00% 17.544728 36.631577 1.013155 4.048390 16.817827 15.949579 2.548527 49.198808 0.451008 0.410098 0.199177 4.425415 4.259264
161 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.072714 55.124007 1.904561 11.227642 2.457931 4.106843 0.665243 7.923702 0.739742 0.546895 0.398205 5.357338 5.362962
162 13 digital_ok 0.00% 0.00% 0.00% 0.00% 3.78% 3.78% 0.301074 -0.124496 0.479389 0.505746 1.966300 1.760033 0.160291 -0.060071 0.735420 0.646212 0.407871 1.290829 1.124006
163 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
164 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
165 14 digital_ok 0.00% 0.00% 0.00% 0.00% 4.32% 0.00% -0.484690 0.141610 -0.920541 -0.431535 -0.794934 -0.667184 2.527649 -0.289560 0.723112 0.626886 0.421791 1.395766 1.208855
166 14 RF_maintenance 100.00% 15.14% 15.68% 0.00% 100.00% 0.00% 33.203533 29.215278 8.269786 7.556102 6.671165 6.925169 26.106023 21.731634 0.618243 0.518025 0.239264 3.974764 3.155387
167 15 digital_ok 100.00% 17.31% 19.47% 0.00% 100.00% 0.00% 18.194239 21.435991 7.909117 8.496646 18.508055 16.887419 91.468388 57.180665 0.590070 0.492915 0.235984 4.360398 2.988450
168 15 RF_maintenance 100.00% 0.00% 2.70% 0.00% 100.00% 0.00% 6.002212 8.386379 9.512792 13.717511 12.187882 17.548695 -1.237171 -2.279443 0.701145 0.580438 0.407589 5.780494 4.858226
169 15 digital_ok 100.00% 0.00% 2.70% 0.00% 100.00% 0.00% 8.299999 7.176487 13.108323 11.479759 17.686825 15.235591 -2.354858 -1.486558 0.683412 0.559891 0.414165 4.629015 3.416555
170 15 digital_ok 100.00% 2.70% 2.70% 0.00% 100.00% 0.00% 8.657105 5.147799 13.536606 9.796709 18.489078 12.384616 -0.970480 -0.362838 0.669946 0.561795 0.409117 0.000000 0.000000
176 12 digital_ok 0.00% 0.00% 0.00% 0.00% 9.19% 2.16% 0.580180 -0.443375 2.695695 -0.783323 3.074430 -0.257367 -1.461668 0.725201 0.705298 0.597286 0.418129 1.395506 1.233689
177 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.515222 2.545945 -0.707775 4.436525 -1.061301 6.580640 3.298991 5.100327 0.716365 0.598242 0.414621 7.140548 9.985717
178 12 digital_ok 0.00% 0.00% 0.00% 0.00% 9.19% 2.16% 0.252948 -0.911561 3.728646 -0.980688 3.259755 -0.987999 0.539131 -0.603047 0.725543 0.623244 0.411640 1.414502 1.282647
179 12 digital_ok 0.00% 0.00% 0.00% 0.00% 4.32% 3.24% 0.346352 1.035110 1.892002 -0.668637 2.088188 -0.608702 -0.168984 -1.029445 0.730362 0.633116 0.413156 1.385415 1.245198
180 13 RF_maintenance 100.00% 31.86% 100.00% 0.00% 100.00% 0.00% 20.831723 30.080198 2.433464 94.784077 16.897578 25.939100 10.712802 4.531693 0.429112 0.057427 0.224418 7.309068 1.282978
181 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.906637 1.958751 13.242193 3.301367 16.068948 3.760914 1.696398 1.258030 0.735256 0.636624 0.424170 5.975023 6.333149
182 13 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.607025 5.041383 9.214221 32.958941 12.328407 84.204617 -1.740879 82.880930 0.721819 0.624380 0.419623 6.884813 7.715318
183 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.684297 0.945673 2.255272 4.803347 2.917540 4.321000 3.998581 13.498739 0.730972 0.626013 0.423263 7.458009 7.714710
184 14 digital_ok 0.00% 0.00% 0.00% 0.00% 4.32% 0.00% 0.138709 -0.394004 -0.689481 0.017901 0.153139 -0.510002 -0.202977 -0.493834 0.727750 0.621729 0.426968 1.306439 1.206165
185 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
186 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
187 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
189 15 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
190 15 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
191 15 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
220 18 RF_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
221 18 RF_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
222 18 RF_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
320 3 dish_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 34.417097 32.716316 72.438223 73.221851 28.041396 25.938434 6.494025 4.633777 0.071717 0.088336 0.008954 0.000000 0.000000
321 2 not_connected 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 4.060532 3.316467 7.015537 7.302048 9.476212 9.330275 0.730883 -0.710624 0.082658 0.070977 0.030005 0.000000 0.000000
323 2 not_connected 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 26.696728 5.874227 6.925747 10.781425 6.772794 14.086617 13.808372 -0.698803 0.081832 0.073810 0.029375 0.000000 0.000000
324 4 not_connected 100.00% 20.01% 44.89% 0.00% 100.00% 0.00% 9.255032 9.488525 14.950810 15.197547 20.313650 19.558874 -0.616682 -2.004505 0.593103 0.434307 0.388558 0.000000 0.000000
329 12 dish_maintenance 100.00% 16.22% 39.48% 0.00% 100.00% 0.00% 0.644182 5.402991 -0.503875 10.044405 0.289501 12.990837 1.207209 -1.894035 0.615532 0.451421 0.399155 0.000000 0.000000
333 12 dish_maintenance 100.00% 25.42% 41.64% 0.00% 100.00% 0.00% 15.709283 5.109798 38.269231 9.046683 13.925917 11.824714 45.486232 -0.716963 0.512989 0.443720 0.351868 0.000000 0.000000
In [16]:
# print ex_ants for easy copy-pasting to YAML file
proposed_ex_ants = [ant for i, ant in enumerate(ants) if np.any([col[i] > .1 for col in bar_cols.values()])]
print('ex_ants: [' + ", ".join(str(ant) for ant in proposed_ex_ants) + ']')
ex_ants: [0, 1, 2, 3, 4, 7, 8, 9, 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 36, 37, 38, 39, 45, 50, 51, 52, 54, 55, 56, 57, 65, 66, 67, 68, 70, 71, 72, 73, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 110, 112, 116, 119, 120, 121, 122, 123, 124, 125, 126, 127, 129, 130, 135, 136, 141, 142, 143, 144, 145, 150, 155, 156, 157, 158, 160, 161, 163, 164, 166, 167, 168, 169, 170, 177, 180, 181, 182, 183, 185, 186, 187, 189, 190, 191, 220, 221, 222, 320, 321, 323, 324, 329, 333]
In [17]:
# write to csv
outpath = os.path.join(nb_outdir, f'rtp_summary_table_{JD}.csv')
print(f'Now saving Table 1 to a csv at {outpath}')
df.to_csv(outpath)
Now saving Table 1 to a csv at /home/obs/src/H5C_Notebooks/_rtp_summary_/rtp_summary_table_2459750.csv
In [18]:
# Load antenna positions
data_list = sorted(glob.glob(os.path.join(data_path, f'zen.{JD}.?????.sum.uvh5')))
hd = io.HERAData(data_list[len(data_list) // 2])

# Figure out where to draw the nodes
node_centers = {}
for node in sorted(set(list(nodes.values()))):
    if np.isfinite(node):
        this_node_ants = [ant for ant in ants + unused_ants if nodes[ant] == node]
        if len(this_node_ants) == 1:
            # put the node label just to the west of the lone antenna 
            node_centers[node] = hd.antpos[ant][node] + np.array([-14.6 / 2, 0, 0])
        else:
            # put the node label between the two antennas closest to the node center
            node_centers[node] = np.mean([hd.antpos[ant] for ant in this_node_ants], axis=0)
            closest_two_pos = sorted([hd.antpos[ant] for ant in this_node_ants], 
                                     key=lambda pos: np.linalg.norm(pos - node_centers[node]))[0:2]
            node_centers[node] = np.mean(closest_two_pos, axis=0)
In [19]:
def Plot_Array(ants, unused_ants, outriggers):
    plt.figure(figsize=(16,16))
    
    plt.scatter(np.array([hd.antpos[ant][0] for ant in hd.data_ants if ant in ants]), 
                np.array([hd.antpos[ant][1] for ant in hd.data_ants if ant in ants]), c='w', s=0)

    # connect every antenna to their node
    for ant in ants:
        if nodes[ant] in node_centers:
            plt.plot([hd.antpos[ant][0], node_centers[nodes[ant]][0]], 
                     [hd.antpos[ant][1], node_centers[nodes[ant]][1]], 'k', zorder=0)

    rc_color = '#0000ff'
    antm_color = '#ffa500'
    autom_color = '#ff1493'

    # Plot 
    unflagged_ants = []
    for i, ant in enumerate(ants):
        ant_has_flag = False
        # plot large blue annuli for redcal flags
        if use_redcal:
            if redcal_flagged_frac[ant] > 0:
                ant_has_flag = True
                plt.gca().add_artist(plt.Circle(tuple(hd.antpos[ant][0:2]), radius=7 * (2 - 1 * float(not outriggers)), fill=True, lw=0,
                                                color=rc_color, alpha=redcal_flagged_frac[ant]))
                plt.gca().add_artist(plt.Circle(tuple(hd.antpos[ant][0:2]), radius=6 * (2 - 1 * float(not outriggers)), fill=True, color='w'))
        
        # plot medium green annuli for ant_metrics flags
        if use_ant_metrics: 
            if ant_metrics_xants_frac_by_ant[ant] > 0:
                ant_has_flag = True
                plt.gca().add_artist(plt.Circle(tuple(hd.antpos[ant][0:2]), radius=6 * (2 - 1 * float(not outriggers)), fill=True, lw=0,
                                                color=antm_color, alpha=ant_metrics_xants_frac_by_ant[ant]))
                plt.gca().add_artist(plt.Circle(tuple(hd.antpos[ant][0:2]), radius=5 * (2 - 1 * float(not outriggers)), fill=True, color='w'))
        
        # plot small red annuli for auto_metrics
        if use_auto_metrics:
            if ant in auto_ex_ants:
                ant_has_flag = True                
                plt.gca().add_artist(plt.Circle(tuple(hd.antpos[ant][0:2]), radius=5 * (2 - 1 * float(not outriggers)), fill=True, lw=0, color=autom_color)) 
        
        # plot black/white circles with black outlines for antennas
        plt.gca().add_artist(plt.Circle(tuple(hd.antpos[ant][0:2]), radius=4 * (2 - 1 * float(not outriggers)), fill=True, color=['w', 'k'][ant_has_flag], ec='k'))
        if not ant_has_flag:
            unflagged_ants.append(ant)

        # label antennas, using apriori statuses if available
        try:
            bgc = matplotlib.colors.to_rgb(status_colors[a_priori_statuses[ant]])
            c = 'black' if (bgc[0]*0.299 + bgc[1]*0.587 + bgc[2]*0.114) > 186 / 256 else 'white'
        except:
            c = 'k'
            bgc='white'
        plt.text(hd.antpos[ant][0], hd.antpos[ant][1], str(ant), va='center', ha='center', color=c, backgroundcolor=bgc)

    # label nodes
    for node in sorted(set(list(nodes.values()))):
        if not np.isnan(node) and not np.all(np.isnan(node_centers[node])):
            plt.text(node_centers[node][0], node_centers[node][1], str(node), va='center', ha='center', bbox={'color': 'w', 'ec': 'k'})
    
    # build legend 
    legend_objs = []
    legend_labels = []
    
    # use circles for annuli 
    legend_objs.append(matplotlib.lines.Line2D([0], [0], marker='o', color='w', markeredgecolor='k', markerfacecolor='w', markersize=13))
    legend_labels.append(f'{len(unflagged_ants)} / {len(ants)} Total {["Core", "Outrigger"][outriggers]} Antennas Never Flagged')
    legend_objs.append(matplotlib.lines.Line2D([0], [0], marker='o', color='w', markerfacecolor='k', markersize=15))
    legend_labels.append(f'{len(ants) - len(unflagged_ants)} Antennas {["Core", "Outrigger"][outriggers]} Flagged for Any Reason')

    if use_auto_metrics:
        legend_objs.append(matplotlib.lines.Line2D([0], [0], marker='o', color='w', markeredgewidth=2, markeredgecolor=autom_color, markersize=15))
        legend_labels.append(f'{len([ant for ant in auto_ex_ants if ant in ants])} {["Core", "Outrigger"][outriggers]} Antennas Flagged by Auto Metrics')
    if use_ant_metrics: 
        legend_objs.append(matplotlib.lines.Line2D([0], [0], marker='o', color='w', markeredgewidth=2, markeredgecolor=antm_color, markersize=15))
        legend_labels.append(f'{np.round(np.sum([frac for ant, frac in ant_metrics_xants_frac_by_ant.items() if ant in ants]), 2)} Antenna-Nights on' 
                             f'\n{np.sum([frac > 0 for ant, frac in ant_metrics_xants_frac_by_ant.items() if ant in ants])} {["Core", "Outrigger"][outriggers]} Antennas '
                             'Flagged by Ant Metrics\n(alpha indicates fraction of time)')        
    if use_redcal:
        legend_objs.append(matplotlib.lines.Line2D([0], [0], marker='o', color='w', markeredgewidth=2, markeredgecolor=rc_color, markersize=15))
        legend_labels.append(f'{np.round(np.sum(list(redcal_flagged_frac.values())), 2)} Antenna-Nights on' 
                             f'\n{np.sum([frac > 0 for ant, frac in redcal_flagged_frac.items() if ant in ants])} {["Core", "Outrigger"][outriggers]} Antennas '
                             'Flagged by Redcal\n(alpha indicates fraction of time)')

    # use rectangular patches for a priori statuses that appear in the array
    for aps in sorted(list(set(list(a_priori_statuses.values())))):
        if aps != 'Not Found':
            legend_objs.append(plt.Circle((0, 0), radius=7, fill=True, color=status_colors[aps]))
            legend_labels.append(f'A Priori Status:\n{aps} ({[status for ant, status in a_priori_statuses.items() if ant in ants].count(aps)} {["Core", "Outrigger"][outriggers]} Antennas)')

    # label nodes as a white box with black outline
    if len(node_centers) > 0:
        legend_objs.append(matplotlib.patches.Patch(facecolor='w', edgecolor='k'))
        legend_labels.append('Node Number')

    if len(unused_ants) > 0:
        legend_objs.append(matplotlib.lines.Line2D([0], [0], marker='o', color='w', markerfacecolor='grey', markersize=15, alpha=.2))
        legend_labels.append(f'Anntenna Not In Data')
        
    
    plt.legend(legend_objs, legend_labels, ncol=2, fontsize='large', framealpha=1)
    
    if outriggers:
        pass
    else:
        plt.xlim([-200, 150])
        plt.ylim([-150, 150])        
       
    # set axis equal and label everything
    plt.axis('equal')
    plt.tight_layout()
    plt.title(f'Summary of {["Core", "Outrigger"][outriggers]} Antenna Statuses and Metrics on {JD}', size=20)    
    plt.xlabel("Antenna East-West Position (meters)", size=12)
    plt.ylabel("Antenna North-South Position (meters)", size=12)
    plt.xticks(fontsize=12)
    plt.yticks(fontsize=12)
    xlim = plt.gca().get_xlim()
    ylim = plt.gca().get_ylim()    
        
    # plot unused antennas
    plt.autoscale(False)    
    for ant in unused_ants:
        if nodes[ant] in node_centers:
            plt.plot([hd.antpos[ant][0], node_centers[nodes[ant]][0]], 
                     [hd.antpos[ant][1], node_centers[nodes[ant]][1]], 'k', alpha=.2, zorder=0)
        
        plt.gca().add_artist(plt.Circle(tuple(hd.antpos[ant][0:2]), radius=4, fill=True, color='w', ec=None, alpha=1, zorder=0))
        plt.gca().add_artist(plt.Circle(tuple(hd.antpos[ant][0:2]), radius=4, fill=True, color='grey', ec=None, alpha=.2, zorder=0))
        if hd.antpos[ant][0] < xlim[1] and hd.antpos[ant][0] > xlim[0]:
            if hd.antpos[ant][1] < ylim[1] and hd.antpos[ant][1] > ylim[0]:
                plt.text(hd.antpos[ant][0], hd.antpos[ant][1], str(ant), va='center', ha='center', color='k', alpha=.2) 

Figure 1: Array Plot of Flags and A Priori Statuses¶

This plot shows all antennas, which nodes they are connected to, and their a priori statuses (as the highlight text of their antenna numbers). It may also show (depending on what is finished running):

  • Whether they were flagged by auto_metrics (red circle) for bandpass shape, overall power, temporal variability, or temporal discontinuities. This is done in a binary fashion for the whole night.
  • Whether they were flagged by ant_metrics (green circle) as either dead (on either polarization) or crossed, with the transparency indicating the fraction of the night (i.e. number of files) that were flagged.
  • Whether they were flagged by redcal (blue circle) for high chi^2, with the transparency indicating the fraction of the night (i.e. number of files) that were flagged.

Note that the last fraction does not include antennas that were flagged before going into redcal due to their a priori status, for example.

In [20]:
core_ants = [ant for ant in ants if ant < 320]
outrigger_ants = [ant for ant in ants if ant >= 320]
Plot_Array(ants=core_ants, unused_ants=unused_ants, outriggers=False)
if len(outrigger_ants) > 0:
    Plot_Array(ants=outrigger_ants, unused_ants=sorted(set(unused_ants + core_ants)), outriggers=True)

Metadata¶

In [21]:
from hera_qm import __version__
print(__version__)
from hera_cal import __version__
print(__version__)
2.0.2
3.1.1.dev2+g1b5039f
In [ ]: