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 = "2459748"
data_path = "/mnt/sn1/2459748"
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-17-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/2459748/zen.2459748.25320.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/2459748/zen.2459748.?????.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/2459748/zen.2459748.?????.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% 15.105398 11.287286 76.129610 74.924608 5575.718253 6974.010725 9724.438546 10168.207000 0.017855 0.016557 0.001381 1.219070 1.210308
1 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 45.097350 84.980874 91.189701 102.468416 50.978601 97.655284 804.654327 1205.741356 0.016705 0.016353 0.000500 1.174744 1.170257
2 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 46.198178 69.577737 93.177838 97.233930 48.670888 62.018264 556.311378 790.350394 0.016773 0.016447 0.000394 1.187249 1.183341
3 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 4.374767 0.190570 -0.313194 -0.841928 -0.738768 -0.905490 -0.136393 -0.390999 0.070088 0.065665 0.008545 1.268709 1.265864
4 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.411758 2.002707 0.265485 0.329563 -0.213020 0.355254 6.168285 -0.041589 0.051144 0.047225 0.003457 1.263209 1.261416
5 1 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.093919 -0.563919 0.317440 0.623357 -0.670400 -0.337022 0.053539 -1.659358 0.052935 0.064860 0.005484 1.280203 1.281624
7 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.594261 -0.669135 -0.107169 -0.077860 -0.789490 0.324119 0.222052 12.894790 0.626299 0.608486 0.418815 3.549425 3.762785
8 2 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.002699 1.888245 4.395308 5.147345 3.780783 4.391289 4.930655 -2.038039 0.619339 0.592081 0.408192 3.990793 4.241987
9 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.332620 -1.067804 -0.144269 0.099102 -0.495989 -0.416579 0.342400 -0.471568 0.624759 0.609741 0.412182 1.413511 1.367993
10 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.086000 -0.563205 -0.799296 -0.016989 1.894058 3.207298 0.738177 0.928351 0.616040 0.603318 0.406204 1.504968 1.625946
11 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 85.538127 83.628795 92.201229 97.704272 39.706371 60.172590 575.750602 635.590423 0.018497 0.017357 0.000633 1.134196 1.131888
12 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 65.728568 114.829677 95.065457 124.069474 66.228080 179.179103 803.559871 2250.174684 0.018487 0.017146 0.001625 1.130949 1.121981
13 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 74.815824 79.130377 106.289721 109.435806 89.779341 112.524898 1166.184731 1379.706175 0.018145 0.017049 0.000661 1.135598 1.134258
14 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 88.585088 75.547612 102.655054 99.104035 94.418597 75.436094 963.858935 1025.780353 0.018236 0.017115 0.000727 1.100035 1.096284
15 1 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.824395 -0.433477 0.647053 -0.122239 -0.158982 -0.027883 0.466667 0.756751 0.054404 0.047807 0.004922 1.251368 1.249545
16 1 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.820710 -1.057030 -0.566878 -0.518100 0.979299 -0.623735 1.574729 -0.203827 0.054300 0.058246 0.004967 1.158634 1.155084
17 1 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.778985 -0.423644 0.095583 0.293038 1.823080 0.159614 0.871631 1.431943 0.072343 0.078320 0.010764 1.220564 1.215078
18 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.085724 7.398608 -0.245447 0.157983 19.745968 15.069291 86.825687 76.297241 0.080617 0.078355 0.028590 1.330825 1.321509
19 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -1.000612 0.090704 -0.839077 1.942958 -0.106651 9.790632 10.774707 22.581828 0.646911 0.629112 0.412873 3.709750 4.359082
20 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.267296 0.516376 1.071499 -0.675343 -0.030606 1.770676 0.401597 -0.907731 0.640978 0.615146 0.407143 1.520856 1.711594
21 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.870355 2.373291 0.629267 6.793680 2.947878 1.915896 2.194488 5.379552 0.633252 0.616703 0.402689 5.052563 5.529704
23 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 69.999949 47.048410 125.667119 92.240877 235.135647 68.128264 2622.885413 775.704873 0.016409 0.016870 0.000313 1.113278 1.120304
24 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 64.023283 74.956821 112.385049 102.148732 91.761960 109.358123 1414.053010 1304.953761 0.016358 0.016388 0.000316 1.088163 1.089784
25 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 308.274939 302.403742 inf inf 231.777977 150.534033 2997.759445 1579.449504 nan nan nan 0.000000 0.000000
26 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 303.260987 308.397480 187.256318 inf 45.305717 205.028247 576.147142 2540.474395 0.019659 nan nan 1.130152 0.000000
27 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 35.209816 22.213340 43.419570 18.148850 18.671738 28.608887 46.108138 174.489443 0.047059 0.080557 0.039182 1.193822 1.208377
28 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 21.248872 3.408119 10.941480 2.644459 15.132450 2.483068 74.041461 1.048206 0.058465 0.080813 -0.007888 1.196912 1.195485
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 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.216726 -0.026123 0.224413 0.643309 -0.644947 4.616492 1.530438 1.455757 0.654752 0.629358 0.415734 3.205441 3.373279
32 2 RF_maintenance 100.00% 5.38% 0.00% 0.00% 100.00% 0.00% 25.226149 10.518532 1.321728 0.104903 7.711701 39.817020 16.559586 24.703645 0.551613 0.573437 0.300183 5.767741 4.399124
33 2 RF_maintenance 100.00% 0.00% 30.11% 0.00% 100.00% 0.00% -0.192127 4.681323 -0.424013 -0.512302 15.511282 17.346814 30.742730 55.730974 0.648079 0.453940 0.478390 5.391132 2.646338
36 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.905419 6.614717 0.624666 4.631649 1.032388 2.658566 0.998915 4.625563 0.644166 0.636688 0.411576 3.952779 4.058257
37 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.942525 0.951191 4.088202 3.548173 4.912706 2.503994 1.787431 6.957288 0.649744 0.634372 0.407014 3.375769 3.789196
38 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.789409 2.216703 3.429810 4.421796 1.602312 3.596704 8.978085 -1.229786 0.648607 0.631714 0.409643 3.944007 3.852270
39 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 310.439413 310.955593 inf inf 768.269838 3028.378219 6083.021365 16249.710718 nan nan nan 0.000000 0.000000
40 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.711569 0.814434 1.407317 1.250169 -0.719531 1.460208 0.676585 -0.005199 0.640452 0.634786 0.413648 1.475589 1.628819
41 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.685623 -1.149392 -0.411578 -0.771217 -0.713164 -1.133811 -0.672397 -0.917405 0.644382 0.640601 0.416886 1.376313 1.549474
42 4 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
45 5 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 0.111024 20.464507 0.145277 50.064194 -1.272965 9.859932 0.237091 6.327631 0.650159 0.084346 0.487660 3.259183 1.514721
46 5 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.905003 -1.127277 -0.805713 -0.617770 -0.194419 -0.002382 0.009803 -0.142782 0.634601 0.617440 0.414731 1.406869 1.430608
50 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.788798 1.128665 2.539250 -0.214876 3.919642 -0.403327 9.555459 0.215894 0.625253 0.628582 0.381491 3.623668 4.523521
51 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.080707 1.668341 -0.373200 3.049276 -0.291578 0.002382 0.561226 -1.915256 0.644928 0.636281 0.395311 1.446502 1.574133
52 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.697738 3.997023 0.796784 1.510888 3.741126 22.047239 5.235795 76.300504 0.636656 0.616754 0.350250 6.241534 12.010724
53 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.159754 0.496942 0.805688 0.016989 -1.255304 -0.179766 1.190423 3.678104 0.644204 0.646306 0.394812 1.427785 1.522006
54 4 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
55 4 digital_ok 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% 0.974726 2.377778 0.751888 1.388807 1.595295 3.210713 0.941525 3.437110 0.230729 0.222569 -0.323891 2.936336 3.182398
56 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.221660 0.754688 -0.906997 0.830371 -0.212030 0.402893 -0.224890 -0.238419 0.638850 0.638466 0.408022 1.537073 1.635090
57 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.679744 -0.101481 10.680864 2.245960 24.533540 4.682097 4.213547 0.665437 0.644479 0.634828 0.412912 3.177053 3.331129
65 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.915210 1.012973 2.380804 2.132469 3.201231 2.029686 -1.779868 -0.650465 0.626091 0.621555 0.398929 1.436141 1.488016
66 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.682076 0.757568 4.399943 0.748399 1.963797 0.776643 -2.253053 1.025815 0.636488 0.637123 0.390082 3.572637 4.492142
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.060861 2.310464 1.951168 9.445268 2.027697 8.211136 2.777815 9.038903 0.645522 0.649764 0.389382 3.729715 5.137630
68 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.361033 0.100549 1.176466 1.648390 0.900191 0.323719 -1.087499 0.035119 0.639054 0.654166 0.392311 1.612550 1.657576
69 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.743026 -0.782947 -0.708918 -0.224580 1.680671 4.398356 0.274283 1.281282 0.646098 0.651644 0.406702 3.992905 4.662457
70 4 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 8.119333 4.663658 10.901882 13.326488 1.963558 2.253839 3.748731 9.150097 0.655600 0.642389 0.414726 21.831535 25.393549
71 4 digital_ok 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% 1.802966 0.610933 1.984184 1.879597 2.235509 1.240047 0.968562 -1.618452 0.237884 0.221134 -0.323660 2.333309 2.435424
72 4 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
73 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.675551 2.904629 1.335518 10.673775 3.442218 8.243262 2.970477 4.516256 0.646355 0.623167 0.414540 2.964466 2.890222
81 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.073190 0.434106 0.632854 -0.730224 0.967012 0.211085 0.532054 -0.348202 0.622051 0.620655 0.394955 1.333708 1.501453
82 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.148718 1.694867 0.078584 0.433866 0.164354 -0.932510 -0.907462 -0.499800 0.639184 0.636284 0.399027 4.520871 4.998834
83 7 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 18.661148 21.125003 44.205567 45.823771 10.814622 9.053899 7.749323 6.334030 0.045800 0.050705 0.001396 1.438333 1.634975
84 8 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 6.436807 7.370062 -0.078898 0.998241 -0.247548 -0.037417 -0.034446 1.511638 0.080579 0.065378 0.013433 1.214287 1.212550
85 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
86 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
87 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 4.145955 3.166666 4.322753 6.574171 6.619773 6.472194 -2.181852 -3.304569 0.081291 0.086372 0.019925 1.187282 1.178642
88 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
89 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
90 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
91 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
92 10 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 15.429307 19.619824 48.584056 50.573389 12.478354 9.818834 5.729142 6.640040 0.034326 0.047624 0.005434 1.389086 1.411781
93 10 RF_maintenance 100.00% 30.11% 100.00% 0.00% 100.00% 0.00% 8.606348 22.342103 0.454878 51.384320 7.173122 9.421457 0.776610 10.670774 0.464607 0.047256 0.263171 5.229353 1.327449
94 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.181344 1.081302 0.778888 5.088565 0.013954 6.827254 3.782090 7.671635 0.629930 0.606575 0.417193 3.977349 4.540695
98 7 digital_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 17.574780 19.964076 42.899928 44.421459 11.811985 9.113844 6.881932 6.063259 0.041542 0.045940 0.006609 1.237066 1.236256
99 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.815633 1.948089 3.261595 4.168274 7.473767 1.368044 8.108340 1.321632 0.633128 0.632682 0.396756 4.917164 4.437521
100 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 17.975679 20.837130 43.636802 46.744309 11.200496 8.763201 9.493222 8.182183 0.044644 0.049771 0.007150 1.388574 1.505549
101 8 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 5.683420 7.708316 -0.312825 2.213554 -0.763628 1.358454 5.072068 1.158890 0.087744 0.063655 0.016021 1.155531 1.151209
102 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
103 8 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 2.677325 6.935386 1.197012 2.106585 -0.296186 -0.153034 0.660723 0.342576 0.048710 0.052528 0.004622 1.181859 1.181591
104 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 5.328083 71.600915 0.833391 53.093201 -0.746649 31.764956 0.605066 62.407534 0.054924 0.090402 0.021997 1.153364 1.121910
105 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
106 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
107 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
108 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
109 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.958044 -1.069642 0.060389 -0.673638 -1.102072 -0.219548 0.005199 -0.889086 0.653383 0.635781 0.408587 1.424154 1.598895
110 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 36.184066 16.446247 6.108266 1.184611 4.223421 24.593750 5.107801 28.480752 0.561900 0.561325 0.270676 5.332678 5.491464
111 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.253518 0.036979 -0.379164 -0.807263 -0.810128 2.734559 -0.198310 2.457884 0.642914 0.618665 0.410498 1.452648 1.615809
112 10 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% -0.558966 22.720032 0.747284 51.058696 2.192876 9.693834 0.443477 5.942777 0.619221 0.058796 0.400361 3.804023 1.621923
116 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 19.523094 22.200334 44.263023 45.971371 11.149726 8.557029 6.367719 7.710297 0.045289 0.044014 0.001306 1.374562 1.389241
119 7 RF_maintenance 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 18.893906 -0.246281 41.573064 -0.707293 10.972785 -0.362513 6.867039 1.010318 0.046988 0.641080 0.443345 1.407305 4.523406
120 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.708509 33.266839 4.774352 54.880596 8.879920 8.693980 3.118329 10.479421 0.094487 0.032067 0.049629 1.265770 1.223167
121 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.341940 6.682534 0.917318 8.952305 3.224912 3.803028 29.330329 29.551348 0.060485 0.045204 0.009251 1.196767 1.205116
122 8 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 7.448869 4.936861 2.917234 0.829827 -0.005042 -0.060828 1.400590 0.102063 0.046513 0.059322 0.005546 1.221797 1.223356
123 8 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 4.806682 4.236715 0.673710 1.731736 -0.397711 1.192310 -0.942523 -1.827818 0.069827 0.076857 0.013349 1.214250 1.213545
124 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
125 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
126 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
127 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.706394 0.281804 1.922808 1.381516 3.760340 3.232070 1.075290 1.300594 0.653104 0.648703 0.403816 5.418937 6.595101
128 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.829219 1.498247 -0.476694 -0.739327 -0.054795 0.286234 0.205851 -0.930415 0.652510 0.631623 0.404958 1.660690 2.007865
129 10 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.844759 -0.440737 6.619398 1.152689 3.351555 -0.637536 1.996657 0.281464 0.648950 0.633974 0.408483 5.380359 5.599678
130 10 digital_maintenance 100.00% 100.00% 56.99% 0.00% 100.00% 0.00% 16.627900 6.023596 48.951918 6.755358 11.753838 2.720127 5.234329 -2.147392 0.052941 0.398355 0.212219 1.356840 5.085204
135 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.152693 -0.954092 -0.951059 -0.851151 -0.233990 -0.633895 -0.094137 -0.472840 0.604454 0.600749 0.395150 1.520294 1.682024
136 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.121715 10.213426 -0.781843 1.032588 -0.033648 1.527284 0.598935 4.235463 0.639936 0.617875 0.390137 5.547712 6.787453
138 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.036979 1.032748 0.045593 -0.550970 -1.351585 -0.449875 -0.927772 -0.814736 0.646221 0.645710 0.404204 1.515588 1.741168
140 13 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.740243 1.223041 0.113108 0.656827 1.684483 0.053827 0.933588 -0.350677 0.645141 0.640953 0.386105 1.598018 1.938704
141 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.072546 2.600775 -0.013915 14.827756 1.371354 8.932147 0.387685 17.269074 0.655596 0.635931 0.392637 4.444896 5.072700
142 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.761586 23.006300 4.409785 50.756492 2.683175 9.372795 2.567324 5.521823 0.271578 0.049683 0.069342 2.445284 1.385730
143 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.327897 -0.827122 -0.856712 -0.443753 0.036632 -0.141508 -0.457016 -0.656527 0.657135 0.663688 0.399332 1.638636 1.976668
144 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.390432 3.028996 6.807783 8.379235 9.337027 2.152168 6.853514 3.835422 0.658565 0.659779 0.395938 5.721275 7.480261
145 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.258685 -0.475154 3.694478 -0.912098 2.928806 -0.862773 2.504830 -0.406916 0.647679 0.648831 0.386794 1.772510 2.172038
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 18.297017 22.442789 49.309934 52.017124 12.066676 9.787616 8.813849 9.542854 0.045639 0.046808 0.002117 1.319415 1.287411
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 16.593989 18.870064 48.458254 50.412662 12.604297 9.925286 8.233442 8.597354 0.048540 0.044946 0.001578 1.303209 1.330204
156 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.408464 2.144377 -0.649190 0.142937 0.686965 10.896852 0.958472 40.200837 0.629802 0.597123 0.398068 5.162411 4.829131
157 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.273147 -0.455856 2.653389 -0.102862 2.145553 -0.121391 -1.499170 0.254779 0.626729 0.633300 0.399202 4.232843 4.486666
158 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.712517 -1.716948 -0.593147 -0.499067 1.410894 0.250760 -0.291360 6.889489 0.634917 0.643562 0.398510 4.592603 4.952963
160 13 digital_ok 100.00% 30.11% 54.30% 0.00% 100.00% 0.00% 11.489120 28.192451 0.255711 1.791109 2.342127 10.464206 0.277969 16.651136 0.467270 0.399967 0.208007 8.622602 7.542029
161 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.469720 38.997395 1.353453 6.742837 1.367887 1.784946 0.795067 1.629208 0.642796 0.555495 0.367775 3.713116 4.539587
162 13 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.050978 -0.618674 0.506479 0.610880 2.890079 1.250733 0.719818 0.253649 0.656641 0.661028 0.380046 1.668072 2.143511
163 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.372080 -0.312691 -0.063319 -0.795229 -0.585093 2.105756 0.439255 0.731546 0.648520 0.659324 0.383813 1.712217 2.008194
164 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.969309 -1.125797 -0.927637 -0.629860 -0.392282 0.052617 -0.077780 0.295293 0.649662 0.656506 0.382278 1.676524 1.962553
165 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.096279 -0.300367 -0.702774 -0.814975 0.333950 -0.501457 -0.041501 -0.555121 0.649054 0.657374 0.389200 1.744233 2.147538
166 14 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 27.041163 19.259155 4.188832 3.145425 9.678834 24.903944 5.392702 13.537503 0.544429 0.579718 0.255665 3.386280 3.819334
167 15 digital_ok 100.00% 24.73% 22.04% 0.00% 100.00% 0.00% 40.189265 18.792461 3.828305 4.170233 8.620160 7.197389 31.339520 13.036737 0.485865 0.508245 0.171592 2.922057 3.039677
168 15 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.430657 4.363265 5.145837 7.401133 3.147018 5.279460 -2.408807 -3.261642 0.636307 0.615157 0.388641 7.598679 7.081677
169 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.244019 3.648002 7.419830 6.077255 6.954370 4.726682 -2.847609 -2.861777 0.614953 0.600799 0.394635 4.579772 4.364849
170 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.554322 2.249910 7.661878 5.058887 6.988533 3.403835 -1.920575 -1.806382 0.598319 0.598402 0.392869 4.046558 4.373785
176 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.266357 -0.906439 0.795191 -0.163464 -0.189474 -0.036376 -1.087434 0.216981 0.611816 0.609154 0.408403 1.585157 1.630275
177 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.663359 0.820958 -0.537740 2.009045 -0.362472 1.595266 -0.180252 2.364665 0.629969 0.604280 0.404392 1.536389 1.741680
178 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.113114 -1.090674 2.441385 -0.511053 -0.312181 -0.834656 0.708370 -0.432364 0.635851 0.628723 0.405841 1.444825 1.558733
179 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.819496 0.412234 0.269959 -0.172959 6.925254 -0.796331 2.708994 -0.561091 0.637795 0.638443 0.402032 3.161150 3.943693
180 13 RF_maintenance 100.00% 35.48% 100.00% 0.00% 100.00% 0.00% 13.827441 20.795905 0.332404 51.093116 6.042070 9.351941 16.400194 6.138513 0.437353 0.051478 0.257142 4.355150 1.268127
181 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.311785 0.538517 8.479047 2.284064 4.790248 0.194582 2.978914 3.037022 0.646238 0.645890 0.402787 2.896853 3.204588
182 13 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.375446 3.537377 4.996486 33.866077 4.324526 2.233663 -2.531770 62.408165 0.632082 0.601177 0.394698 3.358484 3.908381
183 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -1.070638 0.317922 1.530212 3.048259 1.743183 -0.579503 0.575648 9.001857 0.652435 0.646550 0.397326 3.958177 4.242310
184 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.295240 -0.537532 -0.082729 0.229565 1.957288 -0.479768 0.640423 -0.477243 0.656845 0.644364 0.401722 1.697830 1.962755
185 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.415670 -0.675751 -0.733923 -0.930669 0.071515 -0.390327 8.670375 -0.846089 0.647922 0.650950 0.398798 4.930554 6.208381
186 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.052250 -0.217550 -0.629021 -0.618612 1.551465 -0.371959 1.411086 -0.683471 0.646508 0.648874 0.403096 1.673034 1.991253
187 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.092514 1.183337 -0.157732 1.729564 1.093897 3.460098 2.766749 25.383467 0.644191 0.643627 0.388536 5.043109 6.130817
189 15 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.363408 0.250808 -0.645680 -0.423405 -0.678582 1.607305 0.219015 3.107514 0.628781 0.618407 0.405251 1.312517 1.382741
190 15 digital_ok 100.00% 24.73% 22.04% 0.00% 100.00% 0.00% 50.210700 29.693899 7.430348 7.056505 33.688793 27.934478 16.526124 10.125294 0.465047 0.521694 0.249431 4.363773 5.926406
191 15 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.128682 -1.188910 1.801347 -0.946322 -0.762064 0.259944 -1.411162 3.407193 0.601180 0.595794 0.407691 1.354602 1.373832
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% 23.105804 22.754044 38.258252 39.206978 12.417363 9.629616 9.085554 6.009641 0.063650 0.070398 0.008525 0.000000 0.000000
321 2 not_connected 0.00% 22.04% 24.73% 0.00% 100.00% 0.00% 1.942177 1.209722 3.699343 3.658386 2.723923 3.306087 -0.098181 -0.962800 0.496050 0.485410 0.382600 0.000000 0.000000
323 2 not_connected 100.00% 38.17% 24.73% 0.00% 100.00% 0.00% 22.696531 2.517174 3.765110 5.559883 3.487207 3.590206 3.130025 -2.103158 0.382299 0.482439 0.349408 0.000000 0.000000
324 4 not_connected 100.00% 27.42% 30.11% 0.00% 100.00% 0.00% 6.012236 5.119914 8.495080 8.277617 7.520429 6.353914 -3.751314 -4.425461 0.457987 0.454554 0.363664 0.000000 0.000000
329 12 dish_maintenance 100.00% 22.04% 27.42% 0.00% 100.00% 0.00% 3.625482 2.158983 3.784302 4.947908 2.896645 4.161404 3.746657 -3.146341 0.475207 0.472795 0.369241 0.000000 0.000000
333 12 dish_maintenance 100.00% 54.30% 24.73% 0.00% 100.00% 0.00% 10.294354 2.105025 21.817610 4.574425 23.045975 4.064511 52.173110 -1.145738 0.368316 0.482316 0.371527 0.000000 0.000000
In [16]:
# print ex_ants for easy copy-pasting to YAML file
proposed_ex_ants = [ant for i, ant in enumerate(ants) if np.any([col[i] > .1 for col in bar_cols.values()])]
print('ex_ants: [' + ", ".join(str(ant) for ant in proposed_ex_ants) + ']')
ex_ants: [0, 1, 2, 3, 4, 5, 7, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 36, 37, 38, 39, 42, 45, 50, 52, 54, 55, 57, 66, 67, 69, 70, 71, 72, 73, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 110, 112, 116, 119, 120, 121, 122, 123, 124, 125, 126, 127, 129, 130, 136, 141, 142, 144, 150, 155, 156, 157, 158, 160, 161, 166, 167, 168, 169, 170, 179, 180, 181, 182, 183, 185, 187, 190, 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_2459748.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 [ ]: