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 = "2459758"
data_path = "/mnt/sn1/2459758"
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-27-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/2459758/zen.2459758.25312.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/2459758/zen.2459758.?????.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/2459758/zen.2459758.?????.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% 14.051352 6.570218 61.161566 61.404268 3414.214854 4983.626975 7107.222674 9050.656798 0.018099 0.016233 0.002167 1.121724 1.109732
1 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 41.493811 70.697974 75.589361 81.675113 55.098217 51.804416 707.764030 842.331056 0.016806 0.016341 0.000434 1.078019 1.074940
2 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 36.591983 56.791603 72.455957 76.068729 41.004734 46.082122 663.508279 726.189884 0.017104 0.016635 0.000471 1.075423 1.071485
3 1 RF_maintenance 100.00% 70.43% 83.87% 0.00% 100.00% 0.00% 9.041234 7.935870 -0.300665 0.656739 4.080330 5.340726 -0.399422 1.447628 0.371906 0.359511 0.157533 4.198939 4.352735
4 1 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.037496 1.897481 0.011666 0.424584 0.111905 0.434425 6.899093 0.545890 0.568752 0.547403 0.356816 4.000570 4.713878
5 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.186372 -0.604086 -0.072135 -0.233443 -0.651669 -0.394318 -0.376038 -1.083324 0.570530 0.544865 0.357799 1.846439 2.006434
7 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.626557 -0.609688 -0.274585 0.144879 -0.681300 0.426265 0.347327 11.453727 0.102954 0.095217 0.022078 1.184934 1.176700
8 2 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.903615 1.684028 3.360106 3.402380 2.056687 1.330589 2.260725 -1.296558 0.089135 0.091918 0.016983 1.144435 1.142909
9 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.898901 -0.365382 -0.332463 0.195769 -0.138960 0.050061 -0.391977 0.489386 0.069057 0.075153 0.011983 1.155702 1.152419
10 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.675376 -0.795475 0.341134 -0.104339 0.202835 1.246169 -0.795830 0.880404 0.121875 0.096224 0.024538 1.145729 1.144325
11 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 119.079220 76.428783 85.113645 87.554304 55.369408 52.929425 686.672360 848.353049 0.018042 0.016545 0.002200 1.099846 1.095742
12 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 106.315825 95.575305 90.865860 97.440752 90.407692 126.731020 1215.534103 1561.647905 0.018144 0.016895 0.000752 1.075193 1.068980
13 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 59.751895 56.819721 84.598409 87.570198 69.607224 52.249600 926.668744 936.226379 0.018157 0.016832 0.000601 1.083556 1.083795
14 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 66.637613 80.088496 78.357845 82.822949 48.908212 77.741342 687.018064 1011.244195 0.018072 0.017078 0.000762 1.077002 1.074347
15 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.597254 -0.255861 0.253322 0.085975 0.501501 0.422994 -0.124549 0.762508 0.592695 0.575128 0.350084 1.811675 1.958152
16 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.973854 -1.219100 -0.597699 -1.083542 -0.628613 -0.745436 3.180128 1.058322 0.601573 0.583092 0.363515 1.818977 1.804539
17 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.987627 -0.395939 -0.270462 0.335720 0.013242 -0.013242 1.997848 1.692339 0.577590 0.562930 0.349622 1.880684 2.119597
18 1 RF_maintenance 100.00% 0.00% 70.43% 0.00% 100.00% 0.00% 0.526487 6.908466 -0.372760 0.313389 9.340161 11.084113 61.236127 64.767327 0.548107 0.336310 0.388669 2.897008 1.829795
19 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.601402 4.097352 0.969232 11.969372 -0.390491 6.640643 -1.079513 19.867534 0.087093 0.055505 0.007855 1.171295 1.173372
20 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.003334 0.268270 0.779005 -0.914591 0.737843 -0.944291 -0.040910 -0.616594 0.057595 0.067139 0.007860 1.161182 1.162253
21 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.523639 3.124466 0.354550 6.918389 10.009268 13.437591 25.145887 29.368982 0.092344 0.086330 0.018360 1.181338 1.180309
23 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 62.761622 53.382508 98.646046 84.173057 114.528014 52.091348 1699.824758 858.589817 0.016717 0.016447 0.000381 1.066573 1.071111
24 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 35.794968 69.283045 75.154804 87.373728 51.305911 95.620798 661.173922 1153.074884 0.016754 0.016226 0.000525 1.050926 1.046230
25 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 277.632964 273.590039 inf 148.918525 47.304545 53.859239 636.566688 759.929266 nan 0.018204 nan 0.000000 1.055223
26 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 277.745424 256.183075 163.586112 136.124063 55.402237 49.934656 983.642332 774.924440 0.026255 0.017278 0.008687 1.018243 1.045949
27 1 RF_maintenance 100.00% 100.00% 70.43% 0.00% 100.00% 0.00% 29.760805 19.742195 35.525003 10.231133 13.311143 25.498952 48.083373 162.517623 0.073011 0.372066 0.167356 1.172801 1.969083
28 1 RF_maintenance 100.00% 97.31% 97.31% 2.69% 100.00% 0.00% 20.768407 9.902812 11.904627 35.331325 7.323698 0.046519 57.673443 4.374333 0.157599 0.217589 -0.156451 1.996245 3.161986
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.227782 0.061100 0.029271 0.747889 -0.037433 0.834937 3.488475 2.041652 0.100243 0.083036 0.016006 1.138826 1.136173
32 2 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 28.677380 -0.568895 3.043009 -0.548947 4.260552 3.248476 14.576380 9.332254 0.073633 0.077003 0.012048 1.157689 1.154369
33 2 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.534736 4.129955 -0.610728 -0.324107 9.827121 10.941261 22.936833 45.336433 0.075595 0.112981 0.045804 1.221663 1.221717
36 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.694540 6.625710 0.235318 3.689106 -0.462337 1.334239 0.062543 2.012244 0.585577 0.574018 0.335334 3.755091 3.926532
37 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.311127 0.809351 2.521917 2.148947 1.549033 0.633735 0.583234 3.894084 0.598285 0.583599 0.330792 1.588438 1.916741
38 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.485554 1.898343 2.461542 2.809267 3.050602 1.551217 7.989753 -1.219871 0.605662 0.591930 0.337690 2.862923 3.255461
39 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 282.608553 285.409544 189.752490 inf 64.479264 66.882563 1049.905249 941.144548 0.007830 nan nan 0.000000 0.000000
40 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.729486 0.873759 0.880161 1.126751 0.597612 -0.062684 0.186253 0.116363 0.618507 0.628475 0.341834 1.821247 2.051641
41 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.515530 -1.010294 -0.680109 -0.323783 -0.744433 -0.660994 -0.840091 -0.372878 0.623989 0.627622 0.344880 1.998016 2.273881
42 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.901978 0.562246 -0.939192 0.102429 -0.782295 1.155293 -0.673886 -0.174682 0.625063 0.619460 0.345814 1.854499 2.046560
45 5 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 0.241277 19.643839 -0.049545 41.172017 -0.493879 5.240773 -0.200985 5.185565 0.563684 0.061231 0.249698 2.526493 1.414449
46 5 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.060172 -0.624135 -1.057815 -0.352429 -0.265274 0.015247 -0.469752 2.504629 0.541411 0.533076 0.354237 1.290030 1.366323
50 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.273527 0.689227 1.581817 -0.143011 1.256770 -0.136718 1.075093 -0.106123 0.561925 0.560944 0.313226 1.731507 2.161877
51 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.161959 1.260875 -0.537838 1.705500 -0.546396 0.835277 0.666222 -1.072980 0.600868 0.589684 0.326504 1.636108 2.182440
52 3 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 5.795036 36.036852 0.447535 50.341952 1.994386 5.439460 6.316008 11.810443 0.598547 0.045511 0.287969 5.459539 1.198241
53 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.040999 0.203802 0.250378 -0.691295 -1.013910 -0.669363 1.051043 6.257681 0.618807 0.628179 0.328366 3.445416 4.079690
54 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.434631 -0.003334 -0.926951 0.401812 -0.743483 3.826076 -0.268624 0.948045 0.623879 0.634037 0.322971 1.758069 2.186726
55 4 digital_ok 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% 0.124416 1.501115 0.500305 0.913062 0.498274 2.374092 0.504034 1.019371 0.301812 0.299813 -0.279582 4.397620 4.933158
56 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.200274 -0.173176 -0.924338 0.670236 -0.826519 0.873767 -0.126005 3.060656 0.626431 0.631250 0.332089 1.802084 1.988877
57 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.853434 -0.289292 7.209617 1.133967 5.244291 0.178317 2.430776 -0.325108 0.616782 0.609459 0.339672 3.318003 3.942825
65 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.848010 0.842903 1.571857 1.128802 -0.494098 0.026971 -1.816881 -0.732822 0.546371 0.548595 0.325655 1.654466 1.972028
66 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.315694 0.222350 3.027210 -0.190051 2.069619 0.027251 -2.183018 0.939884 0.578135 0.583780 0.326131 1.667160 1.975081
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.652155 3.145577 2.686776 9.188290 1.356862 3.558680 2.091109 6.170629 0.617631 0.618517 0.331647 3.224410 4.251397
68 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.397578 0.149420 0.587482 1.513093 0.399475 -0.232998 -1.268164 0.270299 0.627495 0.640703 0.330088 1.679927 1.914234
69 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.262484 -0.673606 -0.935311 -0.029271 -0.798248 2.669479 -0.258290 0.487815 0.637990 0.642995 0.335897 1.703971 1.878874
70 4 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.362379 5.438636 1.065978 10.735668 -0.513995 4.176743 0.209632 5.364959 0.640613 0.645267 0.339942 20.712061 23.089134
71 4 digital_ok 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% 0.890600 0.275106 1.090434 0.842862 1.864297 0.065138 0.888723 -1.117393 0.313418 0.297985 -0.278947 2.971460 2.778920
72 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 2.919635 -0.201350 0.360883 -0.755018 2.721769 -0.116263 1.755671 -0.475156 0.620908 0.630216 0.328455 1.709946 1.879884
73 5 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.823179 0.978769 0.676086 2.503967 1.151179 0.687541 0.652662 1.436093 0.608138 0.600002 0.336079 2.933949 3.352261
81 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
82 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
83 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
84 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.878221 6.593686 -0.145166 0.919359 -0.618617 0.107760 -0.346386 0.110032 0.624029 0.619849 0.323984 3.385180 3.732396
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% 2.387383 2.729421 0.899211 3.389393 15.893180 1.985201 5.846318 -2.362794 0.622422 0.628357 0.329687 2.922888 3.224164
88 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 21.187593 22.896571 35.918549 37.549388 7.823847 5.238238 8.655181 6.232081 0.040838 0.041261 -0.000625 1.158452 1.158091
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 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.566628 -0.306800 2.817077 -0.454161 1.540666 -0.402737 3.128962 0.070258 0.592989 0.596599 0.342184 3.112959 3.359785
91 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 16.934731 19.097588 35.922250 38.085913 7.992721 5.385754 6.754579 6.554936 0.038014 0.040420 0.002304 1.240774 1.548321
92 10 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 15.315864 19.061187 39.732098 41.600119 8.067421 5.420877 4.316075 5.455733 0.033398 0.043414 0.003651 1.324972 1.371347
93 10 RF_maintenance 100.00% 59.68% 100.00% 0.00% 100.00% 0.00% 6.612696 21.446790 -0.099478 42.291801 3.050001 5.368481 2.232270 8.747801 0.395231 0.043924 0.157216 3.876444 1.342738
94 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.225960 1.617099 0.406989 4.341925 0.035729 6.651295 2.735264 4.145246 0.546124 0.540029 0.353025 3.504174 3.871015
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% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
101 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.225583 7.248088 -0.492631 2.033491 -0.672510 1.413710 4.891485 1.973737 0.604880 0.601553 0.346337 2.659629 2.715343
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% 2.271656 6.217442 0.717924 1.802438 1.392518 1.497143 0.286940 0.948032 0.628489 0.623187 0.340615 2.907351 2.789926
104 8 RF_maintenance 100.00% 0.00% 0.00% 100.00% 100.00% 0.00% 6.393576 63.181575 2.552004 37.319749 0.417329 6.758242 1.591200 3.173652 0.286752 0.229995 -0.263176 1.960074 1.758802
105 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 19.034997 24.636679 34.366611 36.486909 7.988575 5.439537 4.697617 5.182511 0.037538 0.040988 0.003268 1.251892 1.293102
106 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.228542 1.369175 2.601198 1.842304 2.176318 1.025758 1.629712 0.675956 0.601026 0.603493 0.346043 1.473268 1.481730
107 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 17.504205 17.998104 34.514687 36.179311 7.915158 5.385846 3.735824 4.739032 0.043791 0.043587 0.003658 1.213228 1.213137
108 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.266068 2.014266 0.448438 -0.804185 -0.346519 -1.032631 -0.242111 -0.778170 0.579569 0.580191 0.346164 1.417605 1.450979
109 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.686289 -1.013877 -0.122547 -0.816770 -0.615021 -0.565000 0.321321 -0.143290 0.574454 0.573406 0.349299 1.183977 1.220551
110 10 RF_maintenance 100.00% 27.42% 0.00% 0.00% 100.00% 0.00% 34.919478 -0.474389 4.804638 -0.558952 0.678378 -0.487017 1.889502 0.409585 0.483416 0.567088 0.323605 3.836854 4.293304
111 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.185140 0.170702 -0.705430 -0.422083 -0.428937 0.491355 -0.573616 0.974839 0.559880 0.551223 0.348063 1.162843 1.217385
112 10 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
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% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
120 8 RF_maintenance 100.00% 56.99% 100.00% 0.00% 100.00% 0.00% 10.494593 30.977280 3.970103 45.176365 4.188642 5.197692 1.383386 8.714770 0.406371 0.040320 0.216115 3.411450 1.143290
121 8 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.216208 7.141604 0.547311 7.689021 2.064249 4.225195 39.189067 26.828249 0.592167 0.616896 0.353751 3.616508 3.431413
122 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.634876 4.540454 2.052017 0.799625 1.656687 -0.016930 1.027938 0.999924 0.624701 0.615387 0.347633 2.636536 2.960327
123 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.381002 3.553138 0.080192 0.636642 -1.142685 -0.499543 -0.986643 -1.273443 0.609753 0.604999 0.347092 2.621742 2.792423
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% 17.145862 19.329163 36.363854 38.234207 7.925277 5.407610 3.748798 7.580134 0.029250 0.032438 0.001993 1.207179 1.245822
126 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 17.884443 20.287130 35.994840 38.448566 7.877925 5.255759 5.266030 7.371002 0.032756 0.031716 0.000025 1.289424 1.371537
127 10 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
128 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
129 10 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.348672 -0.443998 5.160288 1.021193 3.292107 0.497210 1.230183 0.533660 0.563486 0.560898 0.338335 4.147300 3.989444
130 10 digital_maintenance 100.00% 100.00% 86.56% 0.00% 100.00% 0.00% 16.109788 5.355289 40.076923 3.531241 7.886902 1.763041 3.827736 -0.565954 0.045253 0.357437 0.142560 1.244705 3.799763
135 12 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -1.059051 -0.904510 -1.036596 -0.672895 -0.533168 -0.283647 -0.429925 -0.162215 0.097949 0.101402 0.024573 1.200328 1.198391
136 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.058435 8.366448 -0.831948 0.859641 0.090438 -0.269730 -0.019956 2.595909 0.082784 0.097537 0.019187 1.233269 1.241401
138 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
140 13 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.957551 1.109738 -0.132766 0.620529 0.120487 -0.153506 0.459973 0.014444 0.587925 0.579242 0.344354 1.418772 1.430379
141 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.004410 0.649665 -0.537763 2.628950 -0.880400 0.392978 -0.104371 12.355406 0.596488 0.575755 0.340879 3.067054 3.101528
142 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.608044 21.836210 3.314099 41.765967 0.756337 5.258095 1.608671 4.623068 0.217326 0.048805 -0.017703 1.869960 1.387924
143 14 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.227719 -0.670233 -1.015606 -0.254563 -1.173213 -0.668155 -0.711900 -0.262353 0.102895 0.131187 0.025936 1.200073 1.200775
144 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.549384 3.924496 4.051339 8.442440 3.676072 2.690462 5.138493 2.885064 0.069967 0.109006 0.013754 1.207697 1.206523
145 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 16.362714 19.230861 40.451060 42.031775 7.989325 5.376085 5.568490 6.351129 0.034675 0.036080 -0.000915 1.246276 1.241019
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 17.838263 21.511943 40.338117 42.796403 8.087402 5.483377 6.367484 7.907269 0.046514 0.046888 0.001855 1.282935 1.269551
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 16.052922 18.183116 39.646984 41.497504 7.938741 5.507531 6.557359 6.960472 0.041424 0.044390 0.001076 0.965536 0.956700
156 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.373176 0.160576 -0.805583 0.443099 0.411801 0.591450 4.162967 14.414798 0.058714 0.059239 0.006631 1.280251 1.287264
157 12 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.135140 -0.096507 1.573164 0.094041 0.832450 0.036560 -1.309878 1.042440 0.067502 0.055039 0.008190 1.212351 1.209475
158 12 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.366375 -1.281883 -0.881043 -1.061436 -0.563064 -0.731895 -0.309282 0.120602 0.079369 0.070991 0.014545 1.397029 1.378623
160 13 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
161 13 digital_ok 100.00% 0.00% 24.19% 0.00% 100.00% 0.00% 1.072183 39.724977 1.405060 14.456446 2.089858 2.486913 2.721855 10.920842 0.573586 0.458327 0.331775 3.362825 3.074786
162 13 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.635138 -0.278042 0.239299 0.474466 1.368543 0.758291 0.321976 0.216516 0.573519 0.563594 0.348278 -0.047343 -0.059127
163 14 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.211004 -0.284478 -0.191162 -0.360787 -0.262954 0.414566 0.240278 0.245578 0.073043 0.095851 0.011690 1.438367 1.400066
164 14 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -1.043305 -0.804521 -1.027970 -0.296102 -0.891263 0.019485 -0.306133 1.828690 0.057555 0.069197 0.006555 1.589472 1.557186
165 14 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.720731 -0.408909 -0.791596 -0.591624 -0.669556 -0.470144 0.944308 -0.178704 0.075951 0.068967 0.011309 1.458210 1.435457
166 14 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 4.221266 -0.015302 0.802087 0.857196 1.118231 3.051180 10.910580 18.369991 0.108679 0.106984 0.028487 1.235002 1.230515
167 15 digital_ok 100.00% 48.92% 24.19% 0.00% 100.00% 0.00% 16.098409 9.368236 2.854974 3.493213 10.346749 10.157890 75.368314 10.433587 0.443832 0.435465 0.232866 2.320045 2.377751
168 15 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.861395 4.071562 3.685536 5.171920 2.440509 2.942940 -2.123687 -2.033706 0.540522 0.520823 0.334855 3.473972 3.166878
169 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.563943 3.431664 5.501682 4.166394 4.237013 2.208446 -2.988236 -1.459308 0.527417 0.511617 0.326595 3.622731 3.372102
170 15 digital_ok 100.00% 2.69% 0.00% 0.00% 100.00% 0.00% 4.866117 2.220873 5.688945 3.340927 4.556662 1.597168 -2.481416 -1.520512 0.510816 0.514634 0.320254 2.884030 2.991990
176 12 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.431486 -0.751033 0.288370 -0.047281 -0.679425 -0.248194 -1.310874 1.143783 0.072545 0.071361 0.012939 1.224646 1.224739
177 12 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.644508 2.478761 -0.619605 3.366034 -0.495831 1.117924 -0.469621 -1.118127 0.054604 0.081528 0.006292 1.204910 1.188078
178 12 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.378754 -1.079570 1.678205 -0.385663 0.808019 -0.707649 0.316019 -0.057337 0.059407 0.065646 0.006612 1.286193 1.284267
179 12 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.862524 0.094447 -0.245318 0.046178 3.128846 -0.749674 0.397733 -0.389181 0.088036 0.081124 0.018736 1.191949 1.191799
180 13 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
181 13 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
182 13 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.048497 2.291368 3.622356 3.699437 2.373116 1.743617 -2.594420 -2.558859 0.548767 0.525075 0.361393 3.114008 3.167506
183 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.815094 0.176619 1.019999 2.563705 0.569918 1.090735 0.279025 6.621297 0.560669 0.534897 0.368588 3.012215 3.071867
184 14 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.396131 -0.029914 -0.392241 0.373327 -0.684852 -0.423480 -0.014444 -0.118008 0.060567 0.074548 0.007113 1.100976 1.087439
185 14 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.044849 -0.312715 -0.828674 -0.634424 -0.961655 -0.713391 -0.675095 -0.559828 0.072537 0.066092 0.010581 1.294349 1.276683
186 14 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.203381 -0.156913 -0.880821 -0.394108 -0.480684 -0.417818 1.971160 -0.393946 0.092306 0.087137 0.020127 0.880032 0.876475
187 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.025493 2.187965 -0.364684 3.487085 0.105335 3.817960 4.771765 94.705916 0.098599 0.100045 0.022608 1.317928 1.315161
189 15 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.242202 0.613411 -0.839530 -0.611415 -0.716196 -0.729548 -0.532486 -0.892360 0.536853 0.521290 0.342798 1.201423 1.195677
190 15 digital_ok 100.00% 56.99% 56.99% 0.00% 100.00% 0.00% 36.674304 35.649238 4.833764 6.546120 6.224228 21.655551 38.296734 112.081264 0.405847 0.419246 0.195505 2.911677 2.757804
191 15 digital_ok 100.00% 2.69% 0.00% 0.00% 100.00% 0.00% 0.121375 -0.542750 0.967555 -0.638316 -0.858262 0.161687 -0.552914 4.975295 0.511104 0.505689 0.338065 2.760845 2.852513
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% 22.009747 21.904911 31.330861 32.323521 7.993864 5.262610 6.713530 4.985840 0.062787 0.070251 0.008065 0.000000 0.000000
321 2 not_connected 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 2.041353 0.858022 2.490266 2.075544 2.639027 2.030795 3.640643 2.686797 0.079358 0.079387 0.031550 0.000000 0.000000
323 2 not_connected 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 19.854225 3.345301 2.823515 4.809362 1.734440 3.249432 5.781860 -1.488175 0.074673 0.081696 0.030050 0.000000 0.000000
324 4 not_connected 100.00% 59.68% 62.37% 0.00% 100.00% 0.00% 5.391954 4.338842 6.355608 5.308313 5.179580 2.945755 -3.186361 -2.888857 0.373169 0.357809 0.278868 0.000000 0.000000
329 12 dish_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.438219 2.121547 0.336950 3.434290 0.339315 1.678610 1.934346 -2.529168 0.083271 0.080746 0.034085 0.000000 0.000000
333 12 dish_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 3.481589 0.676837 5.548649 1.323595 1.276096 0.305834 2.997472 -0.590639 0.082469 0.079225 0.031494 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, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 36, 38, 39, 45, 52, 53, 55, 57, 67, 70, 71, 73, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 98, 99, 100, 101, 102, 103, 104, 105, 107, 110, 112, 116, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 135, 136, 138, 141, 142, 143, 144, 145, 150, 155, 156, 157, 158, 160, 161, 163, 164, 165, 166, 167, 168, 169, 170, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 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_2459758.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 [ ]: