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 = "2459752"
data_path = "/mnt/sn1/2459752"
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-21-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/2459752/zen.2459752.25299.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 372 ant_metrics files matching glob /mnt/sn1/2459752/zen.2459752.?????.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 38 ant_metrics files matching glob /mnt/sn1/2459752/zen.2459752.?????.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% 17.985319 8.599103 136.069257 135.991841 12905.564147 18416.832508 9415.815979 11255.611179 0.018374 0.016458 0.001697 0.000000 0.000000
1 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 51.576740 98.022592 161.434673 189.194076 136.534428 265.342167 744.245623 1254.205785 0.017500 0.016230 0.000845 0.000000 0.000000
2 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 42.750645 76.004141 152.659986 168.912520 115.183688 120.622221 580.961438 680.803961 0.017768 0.016598 0.000639 0.000000 0.000000
3 1 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
4 1 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
5 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
7 2 digital_ok 100.00% 51.61% 51.61% 0.00% 100.00% 0.00% 0.110777 -0.577842 0.375825 -0.767888 -1.220901 0.069217 0.384195 5.065968 0.375075 0.363615 0.224551 0.000000 0.000000
8 2 RF_maintenance 100.00% 51.61% 51.61% 0.00% 100.00% 0.00% 3.580494 3.832037 8.847196 11.038484 6.665898 8.510308 1.111211 -0.377618 0.381433 0.368638 0.222894 0.000000 0.000000
9 2 digital_ok 0.00% 51.61% 51.61% 0.00% 92.11% 0.00% -0.330151 -0.919765 0.720463 0.042426 0.603940 0.394538 -0.253783 2.297756 0.386495 0.371420 0.224918 0.000000 0.000000
10 2 digital_ok 0.00% 51.61% 51.61% 0.00% 92.11% 0.00% -0.633171 -0.383503 2.340846 -0.345752 0.367253 1.477175 -0.358670 0.705802 0.393729 0.385012 0.226248 0.000000 0.000000
11 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 217.536212 101.279662 216.984000 208.739595 198.679293 246.961306 969.502695 1181.769697 0.018552 0.016969 0.001282 1.237518 1.259965
12 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 62.375436 67.405829 161.162953 160.347695 116.524497 163.660724 661.360935 636.544224 0.019025 0.017830 0.000503 0.791181 0.779827
13 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 56.539564 69.699292 161.662483 189.432860 134.732520 188.987659 682.412838 989.480244 0.018960 0.017110 0.001623 1.062164 1.044992
14 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 66.450924 94.313521 156.894594 174.649795 104.028201 166.719792 564.913252 850.701049 0.019454 0.017241 0.001266 0.000000 0.000000
15 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.013833 0.098340 1.931962 0.103109 1.656612 1.156891 0.537234 9.060197 0.610809 0.593082 0.391056 -0.000000 -0.000000
16 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.669900 -0.561410 -0.756360 1.008198 8.263798 0.047904 7.676023 0.397970 0.615829 0.600987 0.390842 3.504504 4.166765
17 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.086848 6.480269 0.716909 1.346790 0.842620 -0.224062 4.337218 2.651572 0.606594 0.585866 0.380383 4.421449 5.021483
18 1 RF_maintenance 100.00% 0.00% 54.30% 0.00% 100.00% 0.00% 0.626118 9.411457 0.144719 0.381486 34.886680 40.985086 62.155876 60.358026 0.597248 0.378119 0.425615 2.945221 1.897833
19 2 digital_ok 100.00% 51.61% 51.61% 0.00% 100.00% 0.00% -0.051334 3.114748 4.014308 9.621191 1.578101 9.827179 -0.905082 -2.389585 0.388489 0.377145 0.222048 1.102019 1.143033
20 2 digital_ok 0.00% 51.61% 51.61% 0.00% 52.63% 0.00% 0.634899 1.906123 2.772737 0.608978 1.628023 -0.736071 0.988026 -0.264975 0.388320 0.377687 0.222787 0.612426 0.668833
21 2 digital_ok 0.00% 51.61% 51.61% 0.00% 52.63% 0.00% 0.515157 -0.548628 -0.215429 -0.664398 -0.218250 -0.009992 -0.263449 -0.855372 0.395776 0.385586 0.224510 11.265688 15.226579
23 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 52.649398 74.250549 167.438387 171.258763 205.446013 144.109670 831.186923 708.818613 0.018225 0.016733 0.000698 0.000000 0.000000
24 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 84.239837 97.924048 214.912203 189.861532 373.019091 287.065847 1639.357365 1249.184208 0.016315 0.016433 0.000288 0.000000 0.000000
25 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 364.773222 367.565888 inf inf 154.587526 359.769468 675.199323 1667.810413 nan nan nan 0.000000 0.000000
26 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 353.854653 373.116338 299.016209 inf 260.202524 398.197116 1050.731569 1860.911199 0.019162 nan nan 0.000000 0.000000
27 1 RF_maintenance 100.00% 100.00% 67.74% 0.00% 100.00% 0.00% 43.686857 20.691773 79.398804 17.067494 36.518292 84.508953 41.036608 163.753870 0.086110 0.362588 0.252461 0.000000 0.000000
28 1 RF_maintenance 100.00% 86.56% 86.56% 13.44% 100.00% 0.00% 26.288848 4.234973 20.563457 14.520964 30.886967 740.511969 58.972072 98.349867 0.140504 0.246599 -0.147613 0.000000 0.000000
29 1 digital_ok 0.00% 0.00% 0.00% 0.00% 92.11% 0.00% -0.845653 -0.621985 -0.629007 0.611164 -1.097643 -0.545628 -0.748335 -1.073566 0.620560 0.599656 0.372853 0.000000 0.000000
30 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.092013 -0.100430 0.209879 -0.739871 1.101874 -0.654662 17.376883 -0.227356 0.618857 0.606499 0.376269 0.000000 0.000000
31 2 digital_ok 100.00% 51.61% 51.61% 0.00% 100.00% 0.00% 0.724179 0.880099 0.463664 2.343186 40.741941 0.906686 18.614550 5.345145 0.389776 0.372861 0.218876 0.000000 0.000000
32 2 RF_maintenance 100.00% 51.61% 51.61% 0.00% 100.00% 0.00% 29.923979 34.988717 3.107242 4.242851 6.535279 21.022089 4.532163 10.203092 0.359347 0.344920 0.113519 0.000000 0.000000
33 2 RF_maintenance 100.00% 51.61% 54.30% 0.00% 100.00% 0.00% 0.060823 7.376043 -0.058812 0.418808 42.618990 45.397477 33.550258 55.713192 0.395401 0.311190 0.280281 0.000000 0.000000
36 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 8.466155 9.075471 2.199739 8.215994 2.337171 3.384091 0.540276 2.020041 0.619919 0.609388 0.393416 0.000000 0.000000
37 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.534169 2.465234 4.103644 8.465195 3.115741 5.983132 1.222366 1.139876 0.622931 0.605560 0.389452 2.386779 2.443505
38 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.049431 3.708685 6.393012 9.634162 6.583660 6.802314 11.147786 -2.124072 0.626595 0.607702 0.391609 3.730694 3.866827
39 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 374.918048 nan inf inf 1789.366632 nan 7682.329352 nan nan nan nan 0.000000 0.000000
40 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 15.79% 1.086923 1.227696 3.072159 2.336945 3.041677 0.653832 0.530249 -0.266656 0.628577 0.624585 0.383391 1.627586 1.801700
41 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.011243 -1.053397 0.571192 -0.853527 -0.118427 0.464406 -0.845714 2.428964 0.636551 0.631926 0.383223 1.397360 1.486368
42 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.652972 0.710817 -0.110666 -0.720374 -0.214672 -0.459779 -0.143109 -0.021242 0.639044 0.632672 0.381635 1.545827 1.638654
45 5 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 0.769232 27.364551 0.987901 90.337888 -1.036096 18.101999 0.212870 5.652405 0.612962 0.081439 0.470288 2.868364 1.083892
46 5 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.267152 -0.389903 -0.144650 -0.697081 -0.837579 0.894735 0.358408 5.055896 0.590441 0.576325 0.387582 3.452412 6.242430
50 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.526481 2.172913 4.997098 -0.415049 6.005249 1.992555 18.882950 16.757719 0.602637 0.597492 0.368188 0.000000 0.000000
51 3 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
52 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 9.653583 6.911380 4.887333 1.721845 33.506257 25.288887 93.968066 38.110026 0.594450 0.607757 0.317905 0.000000 0.000000
53 3 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
54 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.186515 5.646126 0.084287 1.221310 -0.823660 1.866710 0.256043 4.195279 0.623170 0.624815 0.360277 0.000000 0.000000
55 4 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
56 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.271957 1.347572 -0.758829 1.092031 -1.085898 2.507078 0.396292 19.823132 0.636462 0.632641 0.377541 0.000000 0.000000
57 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.128559 1.735417 16.015048 7.982880 11.616412 5.447940 4.367942 -1.433703 0.638958 0.619739 0.387225 0.000000 0.000000
65 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.218536 3.284193 5.412869 8.323613 3.928762 6.146719 -1.377446 -1.665204 0.599350 0.590250 0.375469 3.013877 3.159584
66 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.929717 1.449433 8.785603 2.783092 8.902418 1.122067 -1.531834 1.448985 0.611273 0.614941 0.370170 3.862943 4.388125
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.630273 3.700093 7.379604 19.622927 5.894214 8.767663 2.903458 11.095228 0.631928 0.634845 0.372688 4.335741 5.317794
68 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.851351 0.852197 3.336772 2.758514 3.937335 0.558420 -1.523414 2.189255 0.628764 0.642311 0.368910 1.460521 1.490529
69 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.745016 -0.311907 -0.362196 -0.711030 0.128064 2.405979 -0.094385 0.036424 0.643761 0.644487 0.383314 1.303156 1.471326
70 4 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
71 4 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
72 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.877288 -0.251597 2.704596 0.239542 3.567394 1.312550 19.206178 3.588168 0.634325 0.628215 0.370011 3.076605 3.014815
73 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.781938 3.738003 2.942782 18.735297 1.116514 8.477829 2.553757 3.637239 0.632954 0.608272 0.389791 0.000000 0.000000
81 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.238849 0.674798 2.161897 -0.720093 2.481627 0.783877 6.482110 3.464265 0.598161 0.597264 0.372652 0.000000 0.000000
82 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.516955 2.614117 1.404482 2.106875 2.433098 0.434560 8.427649 1.783376 0.610204 0.616223 0.377223 0.000000 0.000000
83 7 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 24.267013 28.477183 80.919111 83.072698 26.021345 18.993886 6.819179 5.635185 0.044839 0.052649 0.003504 0.000000 0.000000
84 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 8.635521 9.224646 1.046595 1.935437 -0.385529 0.848839 0.053275 -0.045563 0.648095 0.642672 0.372245 0.000000 0.000000
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% 0.00% 0.00% 0.00% 100.00% 0.00% 19.120745 8.292848 3.531474 13.194873 6.943751 10.703412 8.823356 -2.821249 0.548930 0.616168 0.350363 0.000000 0.000000
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% 20.892850 26.122699 88.588023 91.355905 25.844891 18.706262 5.568251 6.238155 0.034323 0.047235 0.006063 0.000000 0.000000
93 10 RF_maintenance 100.00% 43.55% 100.00% 0.00% 100.00% 0.00% 11.755572 29.447173 1.338132 92.916897 18.156691 19.121504 0.712654 10.094337 0.426916 0.047367 0.267286 3.258022 1.058700
94 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.285841 2.116680 1.790640 9.579067 0.495026 11.573068 7.563927 2.856900 0.592636 0.575144 0.394933 3.664799 3.511977
98 7 digital_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
99 7 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
100 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 23.821139 27.330069 79.994221 84.762421 25.978245 19.277090 9.341771 7.655384 0.044412 0.051546 0.007546 0.913431 0.905448
101 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.549390 10.177557 0.462088 3.936721 1.008763 1.833269 7.594257 3.306864 0.646866 0.647637 0.381097 3.398817 4.445117
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% 0.00% 0.00% 0.00% 100.00% 0.00% 3.960378 9.774005 2.857754 3.884974 1.675863 1.537640 1.407971 2.190718 0.655063 0.645806 0.376747 0.000000 0.000000
104 8 RF_maintenance 100.00% 0.00% 0.00% 100.00% 100.00% 0.00% 10.510368 6.770438 6.930712 0.309043 6.855562 114.967869 2.879405 54.756088 0.273155 0.266147 -0.326954 0.000000 0.000000
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% 97.37% 0.00% -0.173828 -0.632393 0.813023 -0.035488 -0.666569 -0.682413 3.122865 1.278899 0.623527 0.608109 0.390309 0.000000 0.000000
110 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.240715 18.094226 1.038771 1.437362 83.396164 72.283551 209.179073 262.758036 0.603980 0.531965 0.377686 0.000000 0.000000
111 10 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.292112 1.339348 -0.226880 -0.401025 0.093912 7.035499 2.493108 2.795221 0.604954 0.583761 0.390375 0.000000 0.000000
112 10 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% -0.653002 29.449993 2.262691 92.308904 1.621821 18.461460 1.738743 5.562094 0.583040 0.057366 0.424993 0.000000 0.000000
116 7 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
119 7 RF_maintenance 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 24.144743 1.653205 79.726289 -0.078408 25.917507 -0.522462 6.239488 0.970808 0.047594 0.632309 0.444589 0.000000 0.000000
120 8 RF_maintenance 100.00% 27.42% 100.00% 0.00% 100.00% 0.00% 17.705046 41.670803 10.419751 99.426238 18.889657 18.325879 2.807511 9.881487 0.443126 0.048352 0.352379 0.000000 0.000000
121 8 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.912549 9.706860 0.551392 23.683539 -0.261002 36.897105 7.256119 44.754444 0.654851 0.653049 0.371752 0.000000 0.000000
122 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 9.545529 7.945817 5.816380 1.659000 3.092065 0.547272 2.817260 3.581924 0.665731 0.655693 0.378186 0.000000 0.000000
123 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.541858 5.615226 1.935367 4.854426 0.620245 3.065773 2.631985 0.188542 0.662209 0.652318 0.383108 0.000000 0.000000
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.542923 0.818787 4.058443 2.298012 1.526895 4.052433 1.947099 6.296002 0.622482 0.618569 0.385276 5.229022 5.460705
128 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 5.26% -0.581654 3.351549 0.053803 0.402051 -0.844300 -0.498471 -0.047506 -0.851678 0.617019 0.597387 0.384908 0.001798 0.001497
129 10 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
130 10 digital_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
135 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.441134 -0.186926 -0.704733 -0.327169 0.927432 1.456271 14.537468 10.473730 0.579094 0.570888 0.372070 0.000000 0.000000
136 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.053106 11.505585 -0.660661 1.433941 1.577691 2.325185 3.751915 7.982594 0.612133 0.591959 0.371234 0.000000 0.000000
138 7 digital_ok 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.195025 2.224844 -0.336513 0.052574 0.087980 0.451769 0.475778 3.438260 0.624105 0.625991 0.376957 0.000000 0.000000
140 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.770092 8.685900 1.444552 2.200108 2.984076 4.126102 2.699781 6.785457 0.636042 0.626884 0.359846 0.000000 0.000000
141 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.199387 4.028671 1.055265 28.047782 0.510118 11.230586 0.500151 18.467585 0.650249 0.629437 0.367079 0.000000 0.000000
142 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.833410 29.661922 8.234682 91.753242 7.031602 18.575400 3.279550 5.094439 0.273928 0.054690 0.037988 0.000000 0.000000
143 14 digital_ok 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.014259 -0.103786 -0.684584 -0.799384 -0.777310 -0.976301 0.021242 -0.586864 0.650008 0.655756 0.375176 0.000000 0.000000
144 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.692137 3.331889 9.361455 12.870211 6.861050 90.697505 11.440540 7.591582 0.642752 0.644742 0.373573 0.000000 0.000000
145 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.041500 0.248754 6.143714 -0.752094 4.403347 129.478780 3.336235 16.736711 0.628259 0.628552 0.368259 0.000000 0.000000
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 24.151763 29.454583 89.965898 94.019127 25.782637 18.728775 8.313875 8.572415 0.051810 0.052585 0.001997 0.000000 0.000000
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 22.030412 25.019740 88.397285 91.110640 25.454913 19.919618 8.256474 9.067986 0.052080 0.049782 0.001111 1.527271 1.478150
156 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.516589 1.657604 -0.744459 -0.017733 -0.042686 0.118447 1.699866 -0.743754 0.601331 0.578624 0.374770 14.677191 24.602473
157 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.658093 -0.265169 4.520069 -0.293983 6.557766 1.285798 0.286603 1.002690 0.600274 0.605424 0.372281 2.980798 2.424566
158 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.614021 -1.391834 -0.439597 0.657039 -1.552239 -0.832889 0.340655 0.602295 0.614698 0.618217 0.371357 5.059110 4.624896
160 13 digital_ok 100.00% 22.04% 62.37% 0.00% 100.00% 0.00% 16.386373 32.497383 1.334654 3.803281 11.861550 22.987142 2.514371 16.489816 0.460455 0.409191 0.180259 10.367620 7.628740
161 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.248635 46.349986 3.261108 11.829598 3.526520 8.891406 0.745454 31.451442 0.632889 0.538309 0.347274 4.833768 6.844213
162 13 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.63% 0.915052 0.247429 1.674192 1.687505 3.284145 3.244982 0.827100 0.115734 0.642761 0.643158 0.363349 1.425315 1.734468
163 14 digital_ok 0.00% 0.00% 0.00% 0.00% 2.63% 0.00% 0.479317 0.132721 0.749354 -0.694362 -0.859202 0.776169 -0.271946 0.058667 0.633690 0.636928 0.363789 1.380009 1.537848
164 14 digital_ok 0.00% 0.00% 0.00% 0.00% 2.63% 0.00% -0.765081 -1.073413 -0.878819 -0.205176 -0.929905 -1.199979 -0.406642 -0.643179 0.633153 0.637438 0.365611 1.353914 1.406309
165 14 digital_ok 0.00% 0.00% 0.00% 0.00% 2.63% 0.00% -0.696009 -0.011243 -0.768172 -0.382174 -0.888856 0.066411 3.862755 0.518342 0.621670 0.628826 0.369124 1.425901 1.507482
166 14 RF_maintenance 100.00% 19.35% 0.00% 0.00% 100.00% 0.00% 33.371942 24.264457 9.967019 6.498853 11.301495 54.037471 47.576413 286.016291 0.510983 0.547507 0.213774 2.897808 2.969394
167 15 digital_ok 100.00% 27.42% 30.11% 0.00% 100.00% 0.00% 16.426601 19.235148 9.241149 10.225707 28.130099 51.510971 100.836304 177.697575 0.494154 0.484269 0.200147 2.345904 1.912966
168 15 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.031121 6.494326 10.148384 15.164836 10.338728 12.311572 -1.818238 -2.685817 0.599935 0.579043 0.366839 0.000000 0.000000
169 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.237476 5.718039 14.443845 12.848573 15.945295 10.524566 -2.880706 -2.948149 0.576726 0.561907 0.367368 0.000000 0.000000
170 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.707472 4.290192 14.820424 10.885550 18.433649 7.728460 -0.809232 -0.129680 0.557574 0.556868 0.367231 2.554663 2.888630
176 12 digital_ok 0.00% 0.00% 0.00% 0.00% 94.74% 5.26% 0.348494 -0.186380 2.430611 -0.661967 0.934078 0.009992 2.235900 1.331587 0.581805 0.580421 0.376951 0.000000 0.000000
177 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.648359 5.465724 -0.227027 12.857683 -0.488095 9.742933 0.727155 -2.918766 0.598267 0.558838 0.380702 0.000000 0.000000
178 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.032912 -0.824903 4.947815 0.853906 2.421072 -0.350058 2.497707 -0.210856 0.613522 0.604586 0.384592 0.000000 0.000000
179 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.160198 0.654596 2.069887 -0.088017 7.675124 -0.847395 -0.037288 -0.329528 0.613018 0.612332 0.377516 0.000000 0.000000
180 13 RF_maintenance 100.00% 43.55% 100.00% 0.00% 100.00% 0.00% 22.567830 27.931692 7.640655 92.383789 27.736203 18.569842 20.935912 5.702611 0.415619 0.056920 0.262552 0.000000 0.000000
181 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.898072 1.227057 16.292985 4.064559 10.551015 2.347050 4.140424 2.062175 0.631301 0.622711 0.385668 0.000000 0.000000
182 13 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.831081 4.574659 10.095605 11.806923 9.763100 8.796400 -2.257487 -2.769198 0.613832 0.608781 0.375807 0.000000 0.000000
183 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.847938 0.898907 3.668251 1.326573 1.827318 0.937131 1.092641 8.394428 0.634399 0.623883 0.381648 0.000000 0.000000
184 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.257330 0.293778 -0.765505 0.445185 8.603784 -0.598665 2.247706 0.039743 0.635745 0.620032 0.384742 0.000000 0.000000
185 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 8.884468 18.773386 0.263518 2.100596 -0.199122 0.496955 0.538558 2.547154 0.616189 0.605511 0.372840 0.000000 0.000000
186 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.539292 0.087193 0.115413 -0.732570 2.357677 -0.021401 8.702278 0.044941 0.618916 0.619251 0.382504 0.000000 0.000000
187 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.139658 0.756200 0.140724 1.158717 1.619184 36.668045 13.941745 2.407757 0.613986 0.609543 0.367121 0.000000 0.000000
189 15 digital_ok 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.389739 2.141580 0.017733 1.725998 -0.220258 0.901581 -0.753770 -1.300987 0.591530 0.576527 0.380538 0.000000 0.000000
190 15 digital_ok 100.00% 35.48% 32.80% 0.00% 100.00% 0.00% 47.091807 27.439716 10.959256 10.164293 21.148129 71.390568 118.262086 398.835038 0.455118 0.507708 0.280754 0.000000 0.000000
191 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.092656 -0.301776 4.309306 -0.355885 2.657346 0.244654 9.601175 6.693995 0.562155 0.556223 0.380292 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% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
321 2 not_connected 100.00% 54.30% 54.30% 0.00% 100.00% 0.00% 3.376615 2.543800 7.399605 7.960170 8.495105 8.071805 1.586790 -0.220639 0.313692 0.307919 0.221563 0.000000 0.000000
323 2 not_connected 100.00% 54.30% 54.30% 0.00% 100.00% 0.00% 27.906614 5.168459 7.486657 11.854276 8.141387 10.745207 10.713408 -0.049871 0.249282 0.299271 0.194060 0.000000 0.000000
324 4 not_connected 100.00% 40.86% 43.55% 0.00% 100.00% 0.00% 8.398706 7.484971 16.314090 16.371075 18.495404 14.342859 -1.521669 -3.574240 0.419551 0.411555 0.326209 0.000000 0.000000
329 12 dish_maintenance 100.00% 35.48% 40.86% 0.00% 100.00% 0.00% 2.775184 7.514704 1.587345 10.602235 47.502448 8.710248 18.182810 -1.909996 0.443332 0.428351 0.335282 0.000000 0.000000
333 12 dish_maintenance 100.00% 73.12% 38.17% 0.00% 100.00% 0.00% 14.345836 5.407431 40.289098 11.668827 121.557376 10.117345 104.090003 -1.884273 0.339629 0.442240 0.329913 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, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 36, 37, 38, 39, 40, 45, 46, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 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, 109, 110, 111, 112, 116, 119, 120, 121, 122, 123, 124, 125, 126, 127, 129, 130, 135, 136, 138, 140, 141, 142, 143, 144, 145, 150, 155, 156, 157, 158, 160, 161, 166, 167, 168, 169, 170, 176, 177, 178, 179, 180, 181, 182, 183, 184, 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_2459752.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 [ ]: