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 = "2459772"
data_path = "/mnt/sn1/2459772"
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: 7-11-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/2459772/zen.2459772.25304.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/2459772/zen.2459772.?????.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/2459772/zen.2459772.?????.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)
3 1 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.188785 0.560018 0.482394 0.855037 0.181387 0.962891 0.175011 1.028653 0.463708 0.467506 0.282360 2.654717 2.688063
4 1 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.630237 1.123972 -0.816519 -0.253110 -0.758922 -0.300970 0.066884 -0.132169 0.476371 0.471894 0.280418 3.602549 3.815060
5 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.167584 -0.901739 0.014260 -1.048211 0.011592 -1.250209 -0.041871 -1.040446 0.483226 0.473472 0.281505 1.542550 1.733260
7 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.816505 -0.652570 -0.205802 -0.104409 -0.955081 0.005747 -0.005893 2.997039 0.489874 0.483318 0.286129 1.520258 1.672368
8 2 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.969000 1.027473 1.475551 1.594517 0.678335 0.665559 -0.357899 -1.915194 0.477893 0.459370 0.275594 3.314412 3.353152
9 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.123282 0.021622 -0.016403 0.271120 0.263248 0.363787 0.082923 1.251682 0.483781 0.471539 0.278456 1.491094 1.497207
10 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.232106 -0.564334 -0.942281 -0.055103 -1.496856 0.391394 -0.457334 0.897397 0.461869 0.454249 0.274850 1.407371 1.463787
15 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.486986 -0.109691 0.295588 0.022446 0.620718 0.318732 0.611051 0.747622 0.484517 0.475554 0.286050 1.397382 1.539705
16 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.164820 -1.408531 -0.875848 -1.005475 -0.619025 -0.620816 0.956892 -0.192871 0.488119 0.480800 0.284013 1.444645 1.563172
17 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.261713 0.685639 -0.259466 0.441808 -0.190949 0.109577 -0.084284 0.121891 0.489326 0.482821 0.280256 1.492116 1.725032
18 1 RF_maintenance 100.00% 13.44% 100.00% 0.00% 100.00% 0.00% 4.432948 11.069511 3.554219 7.321545 2.634012 1.954459 25.822699 67.747733 0.421813 0.269842 0.250790 2.377531 1.813675
19 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.917682 0.671639 -0.228775 1.203081 -0.974375 1.277351 -1.191285 -1.704338 0.504931 0.483623 0.281838 1.469096 1.555149
20 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.365190 -0.463046 0.613201 -0.471929 0.582524 -0.659166 0.379115 -0.286692 0.500354 0.475929 0.275499 1.592473 1.674259
21 2 digital_ok 100.00% 45.70% 64.52% 0.00% 100.00% 0.00% 4.352921 3.944215 24.052145 22.754536 105.527944 142.888790 91.627083 99.568086 0.414275 0.272001 0.266993 3.499298 2.561516
27 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.688962 16.014083 35.435787 36.353514 5.208949 4.283309 8.897407 7.658372 0.056001 0.057230 0.002769 1.233012 1.254241
28 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 3.924264 20.815315 2.642030 21.132283 4.226278 4.569511 -1.796683 31.357883 0.303805 0.150954 0.163005 5.181319 2.061920
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% 0.00% 0.00% 0.00% 0.00% 0.00% 0.364015 1.145341 0.582282 1.651193 0.308576 0.794895 1.880347 1.698117 0.521330 0.506561 0.284224 1.571676 1.552916
32 2 RF_maintenance 100.00% 8.06% 0.00% 0.00% 100.00% 0.00% 18.254866 18.707492 2.571245 2.251254 -0.117334 2.007710 7.792841 22.536760 0.427997 0.432043 0.151747 6.623206 5.069226
33 2 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% -0.291423 2.520863 -0.365869 -0.041883 -0.732191 -0.360523 0.679729 11.245451 0.498434 0.318056 0.328981 3.954106 2.129003
36 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.764146 4.153525 0.339801 2.419348 0.302522 1.309195 0.489411 2.218287 0.501948 0.480551 0.294761 3.453509 3.364642
37 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.961939 0.345990 1.460116 0.681252 1.782912 -0.003209 0.862142 2.264809 0.512030 0.484152 0.293197 1.265493 1.307742
38 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.332161 0.876543 1.884944 0.981014 1.705479 0.377696 6.609813 -0.987004 0.512275 0.490155 0.301368 3.120560 3.102627
40 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.733877 0.798920 0.749967 0.894103 0.672260 0.887265 0.795091 0.516866 0.086837 0.057949 0.017609 1.199629 1.199581
41 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.876014 -1.017610 -1.218852 -0.535558 -1.303272 -0.817933 -0.687238 -0.314116 0.071234 0.060420 0.009674 1.189085 1.187967
42 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.970855 0.601694 -1.024759 0.157749 -1.032981 0.430709 -0.421019 0.050742 0.083014 0.078704 0.014293 1.190720 1.192352
45 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.008916 -0.648650 6.718080 -1.082364 4.378255 -1.077719 3.439270 9.708501 0.519136 0.491380 0.298115 3.663605 3.503691
46 5 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.121489 -0.464483 -1.147658 -0.318207 -1.266906 -0.306232 -0.438253 0.181512 0.505141 0.490069 0.293706 1.506630 1.463326
50 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 13.031578 0.110608 3.218114 -0.144654 0.860351 -0.229277 5.326876 0.103844 0.454279 0.484457 0.259614 5.248668 4.049829
51 3 digital_ok 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% -0.147987 26.554778 -0.431057 43.510847 -0.527175 4.085812 0.453693 15.203716 0.524648 0.054668 0.311666 3.580243 1.247524
52 3 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 3.784795 28.163085 0.269540 43.849743 -0.029049 4.379117 1.368365 13.368016 0.493019 0.052005 0.288628 4.408187 1.230725
53 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.466035 -0.461538 -0.749493 -1.129480 -1.501655 -1.029151 0.956081 10.475733 0.509010 0.508376 0.295885 3.114604 3.116632
54 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.847626 0.235478 -1.233816 0.154115 -0.427994 1.126476 -0.306908 0.002460 0.103522 0.067041 0.018400 1.240567 1.242159
55 4 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 4.530779 2.395735 14.705505 2.597689 6.239162 1.905555 7.398785 -2.548240 0.064812 0.084673 0.009751 1.217282 1.198006
56 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.706791 0.255720 -0.652769 0.854118 -0.282940 0.355460 -0.232162 0.529530 0.069425 0.063881 0.008109 1.215647 1.219796
57 4 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 4.877254 -0.435792 7.403496 0.174404 4.983034 -0.572304 3.689122 -0.101021 0.090932 0.119965 0.021055 1.214157 1.203538
65 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.052429 0.064648 0.032547 -0.166270 -0.983233 -0.678633 -1.440265 -0.769257 0.498154 0.487485 0.272756 1.402064 1.465157
66 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.746457 -0.573945 1.389740 -1.195387 0.461775 -1.310315 -2.096399 0.873274 0.519177 0.517482 0.281110 1.427698 1.488351
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.626039 3.468532 2.216175 7.118626 1.269001 4.324514 2.375153 7.108174 0.539933 0.537024 0.293059 2.949086 3.637614
68 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.328152 -0.012379 -0.651152 1.229661 -0.846151 0.392764 -0.914046 0.492889 0.511749 0.521246 0.295630 1.337409 1.403403
69 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.705526 -0.604657 -0.781128 -0.184674 -0.864910 0.526286 0.276988 0.454977 0.112219 0.085410 0.027824 1.268808 1.250796
70 4 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 3.049128 1.998365 -0.044509 2.574892 -0.921270 1.786708 0.199999 -2.427398 0.070500 0.105948 0.012739 1.258360 1.238848
71 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.501609 1.539586 -0.821035 1.904214 -1.244048 1.237385 -0.219971 -2.257637 0.086069 0.098095 0.016932 1.214201 1.203692
72 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.473052 -0.375520 0.486360 -0.424188 0.163954 -0.676721 2.687658 -0.373270 0.080905 0.108862 0.014314 1.213876 1.208663
73 5 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.718809 0.871961 0.384058 1.659591 1.111453 0.816932 1.762161 1.816401 0.507674 0.499377 0.300614 2.910724 2.799969
81 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.825777 -0.590062 2.877597 -0.474710 2.545850 -0.653735 2.071303 -0.181026 0.496552 0.490507 0.265951 1.399757 1.484627
82 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.738301 0.012379 -0.684547 0.495447 -1.138978 0.256051 -1.017307 0.062252 0.515034 0.524277 0.279432 4.725707 4.412348
83 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.135496 2.898532 13.354338 3.216965 1.979542 2.287075 4.653409 -1.738482 0.520136 0.500257 0.287538 2.918707 3.067817
88 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 15.271553 16.344246 31.746756 32.919286 5.089011 4.047390 11.640891 6.939756 0.048193 0.049296 0.000592 1.243820 1.237938
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.656589 -0.398172 2.361273 -0.199396 2.008915 -0.293781 3.231929 -0.184007 0.517069 0.516372 0.302894 3.641898 3.782327
91 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.468304 15.084314 31.720478 33.313937 5.076204 4.053079 8.304334 8.170861 0.044439 0.046738 0.001197 1.332572 1.643910
92 10 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 4.639827 6.832204 0.357975 0.353269 3.895887 1.268558 -0.454228 6.378242 0.315652 0.328330 0.132375 5.163450 8.290913
93 10 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 4.311079 16.957117 -0.756891 36.901283 2.547687 4.109414 0.847202 10.337418 0.316417 0.061789 0.182562 4.253842 1.305738
94 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.607703 2.238627 0.640816 3.732437 0.752765 2.672296 3.097318 5.880210 0.467927 0.467828 0.276582 4.265811 3.830950
98 7 digital_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.067471 3.007181 2.360569 0.397383 1.888848 0.518714 -2.325263 1.193208 0.465864 0.483999 0.265156 3.366640 3.966818
99 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.338425 -0.864440 -0.546855 -0.486568 -0.937023 -0.988969 -1.054152 -0.313487 0.503372 0.513559 0.277944 1.422695 1.421036
100 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.999621 1.623954 3.273712 2.026057 2.601886 1.257389 -2.338224 -2.570475 0.498768 0.504703 0.277847 2.953997 3.132798
105 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 14.653192 18.583083 31.682669 33.242073 5.025240 4.020580 6.360935 6.273379 0.040872 0.047582 0.007421 1.335364 1.551412
106 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.274385 1.190209 2.761896 1.953424 1.546437 1.131768 2.018882 2.303136 0.513511 0.515867 0.304115 1.406104 1.443569
107 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.424485 13.803455 31.777650 32.915208 5.069730 4.040929 5.141637 6.240160 0.049182 0.051524 0.004955 1.314374 1.316192
108 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.187929 0.842993 0.561305 -1.004228 0.162259 -1.004687 0.279494 -0.670450 0.525444 0.525019 0.307771 1.341358 1.387894
109 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.534074 -0.677342 0.048367 -0.754372 -0.047808 -0.842677 0.074153 -0.368342 0.515369 0.514887 0.295011 1.402736 1.523720
110 10 RF_maintenance 100.00% 10.75% 0.00% 0.00% 100.00% 0.00% 24.541974 2.805493 3.185106 3.007883 -0.266080 2.032920 1.131322 -1.846947 0.422088 0.471338 0.242396 4.627903 3.689819
111 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.371819 -0.200792 -0.418400 -0.362167 -0.039544 0.552736 -0.195403 1.447602 0.479316 0.478273 0.275787 1.495769 1.617525
112 10 RF_maintenance 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% -1.044686 -0.507939 -0.168426 -0.014260 -1.145888 0.840922 0.100021 -0.002460 0.193464 0.199128 -0.257608 2.257472 2.108203
116 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.376980 2.304094 0.248214 2.593063 -0.029844 1.705663 -0.626155 -2.410875 0.463067 0.447882 0.266502 3.292166 3.528399
117 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
118 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
119 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.713692 0.119511 1.015560 -0.251271 0.058422 -0.920210 -1.941773 -1.464479 0.505291 0.512051 0.289052 3.002876 2.965663
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% 13.690787 15.036602 32.060103 33.424701 5.035954 4.063248 5.011156 8.951804 0.031296 0.036926 0.003765 1.267165 1.333850
126 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.958416 15.333199 31.761566 33.633639 5.057137 4.047538 6.710871 8.876673 0.037843 0.036860 -0.000972 1.350435 1.395300
127 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.400491 0.945928 0.864851 1.046862 0.975652 0.697059 1.020058 1.780332 0.524430 0.529837 0.298040 3.719127 3.990758
128 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.340543 0.376424 -0.073205 -0.623886 -0.028555 -0.594938 0.659413 0.014403 0.511156 0.505590 0.279485 1.483250 1.533244
129 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.410545 -0.597368 3.092810 0.021435 2.715082 -0.153722 1.595051 0.153263 0.496672 0.497725 0.281791 1.488830 1.499600
130 10 digital_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.204077 3.450142 35.310228 1.537020 5.095409 2.879095 5.380678 1.159495 0.060335 0.300320 0.156485 1.399389 7.902183
135 12 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
136 12 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
137 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
138 7 digital_ok 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 15.833284 1.133834 29.754095 1.007275 4.977097 0.371889 4.738199 0.626012 0.054209 0.517642 0.329667 1.308632 3.628721
140 13 digital_ok 0.00% 10.75% 16.13% 0.00% 15.79% 0.00% 0.437152 0.644286 -0.058002 0.667730 0.003209 0.162213 0.506272 0.678532 0.424737 0.428142 0.237696 1.600681 1.686355
141 13 digital_ok 100.00% 10.75% 48.39% 0.00% 100.00% 0.00% -0.248279 2.933711 -1.209004 21.622556 -1.063669 4.734448 0.093884 31.388976 0.426716 0.404783 0.238596 3.565985 4.329942
142 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 15.677841 16.690888 19.059798 36.503488 0.691165 4.098103 6.075351 5.649053 0.296950 0.050067 0.164131 4.211248 1.400853
143 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.359552 0.826995 -0.870090 -0.070192 -1.085067 -0.529659 -0.383901 0.052035 0.518873 0.521694 0.286710 1.520323 1.625192
144 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.445732 1.678067 2.902789 2.383226 2.803648 0.915427 1.498355 1.660628 0.534079 0.531596 0.304022 1.495688 1.574587
145 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.098533 14.840272 35.611810 36.719955 5.132053 4.115374 7.313806 7.745144 0.045472 0.048140 0.000016 1.466378 1.778906
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 14.265000 16.892440 35.508321 37.359058 5.135530 4.115700 8.103178 9.148358 0.056520 0.058294 0.001194 1.410377 1.398728
155 12 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
156 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.282156 3.616890 -0.626218 7.590219 0.056531 18.187705 0.187356 27.454594 0.479057 0.476484 0.280300 3.924584 3.636641
157 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.439160 -0.423427 0.104924 0.087203 -0.281799 -0.481824 -1.299488 0.298119 0.486204 0.494882 0.281733 3.604913 3.554313
158 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.531868 -0.682084 -0.796272 -0.905235 -0.495657 -0.509796 -0.238325 0.238703 0.493792 0.500694 0.285965 3.699785 3.713873
160 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.735620 16.373490 35.126595 36.402522 5.126423 4.096079 4.936448 5.699863 0.049780 0.053345 0.004223 1.282197 1.295211
161 13 digital_ok 100.00% 10.75% 88.71% 0.00% 100.00% 0.00% 1.471817 30.258390 1.511869 9.409997 1.604114 2.987373 1.136181 3.198565 0.433669 0.376632 0.219627 3.507309 4.961841
162 13 digital_ok 0.00% 10.75% 10.75% 0.00% 13.16% 0.00% -0.244182 -0.851234 -0.346296 -0.820586 0.552017 -0.277436 0.852053 -0.129737 0.429864 0.436475 0.234306 1.687335 1.753201
163 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.033124 -0.526829 -0.057983 -0.429490 -0.080081 -0.707543 -0.088462 0.104982 0.518928 0.527588 0.290922 1.531618 1.587945
164 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.794649 -0.576452 -0.713729 -0.304141 -0.697239 -0.570828 -0.171150 0.223355 0.511975 0.523338 0.289413 1.535844 1.624806
165 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 76.32% -0.477186 -0.154703 -0.315855 -0.441226 -0.637134 -0.536977 0.059285 0.343051 0.510431 0.518337 0.278407 4.386338 5.652155
166 14 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 12.430637 15.126818 2.469726 3.088996 0.109057 0.496487 3.212981 1.959185 0.451582 0.451246 0.186840 3.824528 4.694849
167 15 digital_ok 100.00% 34.95% 16.13% 0.00% 100.00% 0.00% 7.450015 6.585344 1.450884 1.596596 2.988521 1.586508 7.604159 1.243583 0.412886 0.418759 0.208459 3.008563 3.014757
168 15 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.830384 2.672018 1.806829 2.915709 0.868129 1.940326 -2.245047 -2.424742 0.473159 0.466800 0.256350 4.648107 5.188517
169 15 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.63% 2.809330 1.941553 3.032990 2.073178 2.227604 1.224785 -2.515336 -2.110335 0.447011 0.442833 0.263615 1.566854 1.523461
170 15 digital_ok 0.00% 10.75% 5.38% 0.00% 10.53% 0.00% 3.114200 1.422996 3.183558 1.544169 2.526933 0.848331 -2.506157 -2.359802 0.423972 0.433425 0.259913 1.440800 1.377665
176 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.863888 -0.971531 -0.795682 -0.099428 -1.371960 -0.216473 -1.018304 -0.204302 0.456342 0.460840 0.274530 1.362976 1.430631
177 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.278177 1.983728 -0.377010 1.877543 -0.327770 0.172904 -0.123283 -2.310679 0.471862 0.442914 0.285938 1.329473 1.461622
178 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.049336 -0.876321 1.400312 -0.262459 1.263100 -0.118092 0.736243 3.779991 0.484050 0.485555 0.287481 1.283856 1.286442
179 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.063632 -0.142583 -1.088982 0.036887 -0.144988 -0.262870 0.044686 -0.218347 0.480501 0.484586 0.289827 1.304274 1.354698
180 13 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 56.347469 16.039274 8.062655 36.723601 2.115242 4.069475 6.199655 6.306366 0.271527 0.057537 0.129217 3.085601 1.284127
181 13 digital_ok 100.00% 10.75% 24.19% 0.00% 100.00% 0.00% 3.501744 1.068628 4.992834 1.677801 5.215104 1.402316 2.864844 1.856099 0.425964 0.422921 0.247642 2.422220 2.760018
182 13 RF_maintenance 0.00% 10.75% 26.88% 0.00% 100.00% 0.00% 1.076442 1.341416 1.598918 1.777013 0.996523 0.965068 -2.146558 -2.484448 0.419179 0.414338 0.233638 3.495251 3.312827
183 13 digital_ok 100.00% 10.75% 10.75% 0.00% 100.00% 0.00% -0.789311 0.470566 0.702200 2.391483 0.827599 0.337622 0.426888 10.278518 0.440294 0.438675 0.247661 3.471137 3.455055
184 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.047561 0.165929 -0.373012 0.396482 -0.468409 -0.074505 0.090418 0.269431 0.513110 0.514582 0.290235 1.478255 1.588163
185 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.543854 -0.276578 -1.133468 -0.375211 -0.883577 -0.552495 -0.198809 -0.388755 0.505538 0.513263 0.286010 1.514169 1.519445
186 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.664737 -0.191837 -1.203905 -0.351727 -0.849135 -0.144570 0.247772 -0.324034 0.494601 0.499200 0.280750 1.508885 1.571287
187 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.249788 -0.642013 -0.295692 -1.140780 0.090019 -0.746752 3.579066 2.162102 0.492423 0.498707 0.274822 1.350938 1.392300
189 15 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
190 15 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
191 15 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
220 18 RF_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
221 18 RF_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
222 18 RF_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
320 3 dish_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 17.613134 16.932981 27.938015 28.562743 5.168236 4.111434 8.653297 6.259231 0.072160 0.068425 0.005076 0.000000 0.000000
321 2 not_connected 0.00% 88.71% 96.77% 0.00% 100.00% 0.00% 0.915399 0.245579 0.937446 0.602131 0.399742 0.091155 2.976331 2.629683 0.357503 0.328519 0.226045 0.000000 0.000000
323 2 not_connected 100.00% 91.40% 100.00% 0.00% 100.00% 0.00% 12.562005 2.334924 2.755928 2.629654 0.292746 1.977713 2.577124 -2.316821 0.273785 0.311049 0.189255 0.000000 0.000000
324 4 not_connected 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 3.478124 3.361924 3.659861 3.308100 2.968407 2.297513 -3.106051 -3.217654 0.073611 0.070207 0.026082 0.000000 0.000000
329 12 dish_maintenance 0.00% 86.02% 100.00% 0.00% 100.00% 0.00% 0.310637 1.201840 -0.150276 1.506995 -0.167185 0.793665 -0.682011 -2.307781 0.360409 0.330263 0.227826 0.000000 0.000000
333 12 dish_maintenance 100.00% 86.02% 100.00% 0.00% 100.00% 0.00% 2.412251 0.140580 4.493165 -0.009776 2.083435 -0.312814 5.230895 -0.617373 0.354506 0.333697 0.218320 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: [3, 4, 8, 18, 21, 27, 28, 29, 30, 32, 33, 36, 38, 40, 41, 42, 45, 50, 51, 52, 53, 54, 55, 56, 57, 67, 69, 70, 71, 72, 73, 82, 83, 88, 89, 90, 91, 92, 93, 94, 98, 100, 105, 107, 110, 112, 116, 117, 118, 119, 124, 125, 126, 127, 130, 135, 136, 137, 138, 140, 141, 142, 145, 150, 155, 156, 157, 158, 160, 161, 162, 165, 166, 167, 168, 170, 180, 181, 182, 183, 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_2459772.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 [ ]: