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 = "2459771"
data_path = "/mnt/sn1/2459771"
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-10-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/2459771/zen.2459771.25308.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 1862 ant_metrics files matching glob /mnt/sn1/2459771/zen.2459771.?????.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 187 ant_metrics files matching glob /mnt/sn1/2459771/zen.2459771.?????.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% 1.034732 0.494354 0.489732 0.884724 0.014793 0.686081 -0.068819 0.860622 0.703235 0.608534 0.408016 3.997804 3.702643
4 1 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.595716 1.151414 -0.811887 -0.305025 -0.813717 -0.446699 2.160065 0.645350 0.720787 0.612158 0.410647 4.908388 4.583088
5 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.53% 0.107497 -0.787106 0.025943 -1.157491 -0.004926 -1.361251 0.181611 -1.002942 0.727909 0.617423 0.409488 2.003778 1.931335
7 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.544873 -0.562070 -0.175716 -0.164011 -0.211154 -0.259457 -0.246877 0.618097 0.722430 0.620691 0.408889 2.024042 1.947370
8 2 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.508022 0.672517 1.278730 1.563907 0.796946 0.803511 0.131386 -0.637112 0.711728 0.595486 0.410136 4.171475 4.275294
9 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.200310 -0.166735 0.055640 0.287470 0.197370 0.247896 -0.274395 0.034645 0.714840 0.606419 0.411403 1.883381 1.662618
10 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 3.74% -1.424823 -0.550484 -1.326681 -0.061547 2.162846 -0.157693 2.021295 0.636170 0.699687 0.591454 0.419144 1.946957 1.820949
15 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 5.35% -0.417381 0.041151 0.408205 0.208331 0.579627 0.098842 0.301594 1.607866 0.724700 0.615362 0.410229 1.915293 1.883247
16 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.67% -0.944525 -1.224290 -0.786002 -0.885896 -0.605443 -0.830124 0.920190 -0.609320 0.731317 0.631538 0.403475 2.065094 1.858890
17 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.313300 0.508029 -0.101151 0.480353 0.004926 0.314004 -0.129187 0.003223 0.729829 0.629725 0.396164 2.062229 2.072905
18 1 RF_maintenance 100.00% 0.00% 61.87% 0.00% 100.00% 0.00% 5.688895 11.245406 3.611236 6.160151 2.512555 2.141037 27.441359 54.148290 0.658126 0.391204 0.423330 2.838880 2.104542
19 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 1.07% -1.037528 0.484629 -0.434383 1.042742 -0.910085 0.039780 -1.035021 -1.757819 0.729248 0.620785 0.402466 1.858182 1.858661
20 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 5.35% 0.209807 -0.050157 0.725797 -0.590825 1.018223 -0.744240 0.290651 -0.425512 0.724002 0.609654 0.403080 2.125608 1.900106
21 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.003033 -0.810495 -0.099624 -0.102266 6.803842 -0.214943 1.716860 -0.276101 0.707262 0.605145 0.411571 4.388252 4.177821
27 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.216663 15.580412 33.672176 34.510309 4.683263 3.896710 6.597099 5.496363 0.054349 0.057454 0.004424 1.262800 1.268258
28 1 RF_maintenance 100.00% 51.13% 100.00% 0.00% 100.00% 0.00% 3.843482 23.040194 2.307783 20.817974 2.897275 2.405788 -0.542306 26.077681 0.389202 0.163341 0.229465 6.943787 2.595967
29 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 4.28% -0.796784 -0.284692 -0.267379 -0.152918 -0.069821 -0.148566 -0.246005 0.122908 0.734313 0.636486 0.404055 1.914657 1.832498
30 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.994092 -0.003805 -1.134167 -0.091066 -0.970661 -0.149209 7.041366 0.504705 0.732723 0.639175 0.395968 4.443317 4.295797
31 2 digital_ok 100.00% 1.07% 0.00% 0.00% 100.00% 0.00% 0.817543 0.542124 2.536318 0.658310 12.321968 0.700743 15.553084 1.433184 0.728000 0.640718 0.392820 4.418925 4.022553
32 2 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 21.598707 12.493343 2.646340 1.407885 0.403814 2.096567 19.982526 104.006654 0.641404 0.593166 0.275004 6.021355 4.655614
33 2 RF_maintenance 100.00% 0.00% 42.43% 0.00% 100.00% 0.00% -0.027179 2.959564 -0.168949 -0.129190 -0.042883 -0.737129 2.176515 7.015474 0.721941 0.437797 0.502711 4.645431 2.288038
36 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.078551 3.750487 0.370299 2.450632 0.378971 1.943860 0.303298 1.544496 0.722017 0.608764 0.412443 4.737952 4.223071
37 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.605659 0.309234 1.168970 0.598847 1.367670 -0.105146 0.309622 -0.170195 0.727102 0.608570 0.411197 1.698619 1.582968
38 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.753519 0.749904 1.956912 0.935304 2.205185 0.117448 5.898363 -1.317957 0.729488 0.613754 0.419195 4.231516 4.075035
40 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.828177 1.088251 0.881896 1.028354 1.018980 0.746824 0.755560 1.090720 0.085404 0.056217 0.010501 1.217336 1.215463
41 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.688956 -1.119899 -1.231142 -0.479708 -1.063455 -0.480384 -0.693058 0.240541 0.080175 0.055935 0.007084 1.200401 1.200021
42 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.824074 0.619091 -0.910812 0.146870 -0.793963 0.186277 -0.247113 0.105880 0.090308 0.066485 0.010578 1.191177 1.192071
45 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.214938 -0.483707 6.227480 -1.207123 5.180658 -1.369260 2.263288 4.453970 0.736894 0.618106 0.406284 4.241332 3.247611
46 5 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.942967 -0.213105 -1.055151 -0.265861 -0.651984 -0.166590 -0.245307 4.565517 0.727032 0.618456 0.409057 3.840746 3.334559
50 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.612373 0.180417 1.520966 -0.069786 1.085782 -0.229300 20.919520 4.478789 0.718222 0.611583 0.389166 4.829883 4.196762
51 3 digital_ok 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 0.049107 27.059250 -0.318427 41.313755 -0.222568 3.597282 0.222356 11.428436 0.732347 0.052052 0.438643 3.965296 1.295944
52 3 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 4.293425 28.461063 0.471836 41.664536 0.702743 3.725327 13.988489 10.098994 0.709297 0.050249 0.419643 7.901383 1.265227
53 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.408121 -0.211390 -0.960837 -0.937704 -1.276074 0.082516 0.775062 0.634908 0.731115 0.633575 0.413117 1.649085 1.619717
54 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.600095 0.097372 -0.929427 0.391140 -0.558035 0.492175 -0.323332 0.243960 0.108880 0.076845 0.015398 1.251498 1.242659
55 4 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 6.206111 2.241089 12.739574 2.627089 7.464992 1.695020 13.638962 -2.188521 0.066864 0.096463 0.011202 1.236564 1.220420
56 4 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.569906 0.988767 -0.522248 0.809826 -0.404332 0.608127 -0.406156 5.740726 0.067682 0.064422 0.005681 1.206329 1.208530
57 4 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 3.314385 -0.588017 4.114899 0.254812 4.780185 -0.410040 1.935619 -0.269696 0.070682 0.101473 0.017905 1.201049 1.194420
65 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.054035 0.123693 -0.114134 -0.198492 -0.554015 -0.574078 -1.180824 -0.712088 0.720938 0.614734 0.399488 1.735053 1.585931
66 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.462383 -0.581392 1.190271 -1.293971 0.665540 -1.299482 -1.746576 1.004705 0.727054 0.635119 0.391682 1.770958 1.566748
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.608551 3.907097 2.068055 6.782655 2.081793 5.387199 1.876637 4.919790 0.742130 0.650258 0.395710 4.170950 4.758543
68 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.044369 -0.071041 -0.697325 1.151977 -0.932313 1.130137 -0.917172 0.655923 0.727234 0.642617 0.404256 1.764521 1.638070
69 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.779699 -0.455964 -0.709264 0.091297 -0.368064 0.270335 0.117033 0.347157 0.116827 0.099296 0.025594 1.224914 1.220375
70 4 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 2.847433 1.794882 -0.473829 2.587903 -0.049643 1.596833 0.434369 -1.861463 0.086312 0.114398 0.017606 1.222996 1.211112
71 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.349587 1.448266 -0.606088 1.883631 -0.689574 1.017496 -0.304556 -1.763095 0.097968 0.114305 0.020462 1.200953 1.192162
72 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.015079 -0.353591 0.516440 -0.404924 0.081210 -0.421204 1.551380 -0.479044 0.073462 0.102938 0.014080 1.200532 1.202626
73 5 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.615727 1.242386 0.505715 1.506281 0.444142 0.949782 2.229208 1.232533 0.730947 0.623562 0.419884 3.815165 3.167949
81 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.580839 -0.179699 2.906319 -0.355019 2.216341 -0.625817 8.826227 1.254144 0.721122 0.620472 0.390559 4.689593 4.364534
82 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.391474 0.511794 -1.000596 0.656419 -1.086724 0.485596 -0.369809 0.155211 0.722255 0.640889 0.390904 4.501845 4.409684
83 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.133922 2.610014 12.733742 3.198087 9.024368 2.143023 5.862129 -2.359279 0.720486 0.619512 0.397131 3.648963 3.459658
88 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 16.115177 17.059705 30.122432 31.210291 4.756217 3.949649 8.681350 5.311124 0.043101 0.044693 0.000219 1.250083 1.249500
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.633053 0.106664 1.894191 -0.129410 1.416950 -0.316349 1.602370 -0.205568 0.730796 0.629521 0.414732 4.696060 4.298774
91 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.103317 14.670651 30.129415 31.622242 4.720527 3.924186 6.061733 6.013382 0.040404 0.043082 0.000879 1.327351 1.749744
92 10 digital_ok 100.00% 57.57% 88.18% 0.00% 100.00% 0.00% 5.036405 7.292010 -0.136168 0.851046 2.408345 2.271817 0.013949 8.712002 0.375376 0.355852 0.166961 4.916047 6.157487
93 10 RF_maintenance 100.00% 57.57% 100.00% 0.00% 100.00% 0.00% 3.699434 16.688581 -0.109363 35.039852 1.972250 3.893599 2.420224 7.544573 0.389290 0.056914 0.235879 4.205284 1.305894
94 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.694319 2.446955 0.661730 3.557079 0.888194 2.891024 2.046360 2.009575 0.711603 0.600463 0.413831 4.555957 3.985713
98 7 digital_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.790716 6.929102 2.315120 0.275168 1.785754 -0.212474 -1.952531 1.429471 0.703837 0.612789 0.383720 4.350715 4.993547
99 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.288724 -0.838024 -0.691370 -0.615903 -1.009553 -0.567573 -0.747876 -0.250560 0.727048 0.637035 0.386194 1.945798 1.762286
100 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.666341 1.395471 3.158863 1.991302 2.456165 1.147940 -2.318475 -2.176889 0.717087 0.629907 0.391063 4.254185 4.230943
105 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 14.260518 18.312073 30.109656 31.560082 4.726801 3.927060 4.583899 4.546310 0.038222 0.044060 0.006199 1.353434 1.536939
106 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.700747 0.765228 2.328638 1.892958 2.338761 1.589375 2.827778 1.297132 0.725346 0.630763 0.429548 1.557752 1.482710
107 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.029696 13.103525 30.189714 31.261137 4.722077 3.908770 3.688025 4.381280 0.046242 0.049698 0.006378 1.327409 1.317949
108 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.040718 1.143702 0.615699 -0.977997 0.674755 -0.992485 0.342239 -0.454571 0.731159 0.629850 0.418130 1.564825 1.447531
109 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.531880 -0.562836 0.047854 -0.615045 0.259664 -0.527108 -0.197411 -0.280354 0.730842 0.626935 0.406913 1.723852 1.583930
110 10 RF_maintenance 100.00% 7.52% 0.00% 0.00% 100.00% 0.00% 26.340547 2.478793 3.193786 2.997409 0.405103 1.953186 0.711377 -2.366176 0.637322 0.593561 0.328632 6.167702 5.461400
111 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.046861 -0.677109 -0.209162 -0.267391 0.060508 -0.226653 -0.343101 2.547621 0.712309 0.603753 0.407024 1.979953 1.646784
112 10 RF_maintenance 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% -0.912705 -0.245760 0.037073 -0.104596 -0.210317 0.550619 0.146492 0.976489 0.292853 0.291962 -0.286036 2.782685 2.753562
116 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.040718 2.082100 0.163242 2.544548 -0.120360 1.673486 -0.524303 -2.248786 0.709269 0.599567 0.392593 5.276309 5.434126
117 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.570646 -0.755834 0.031425 -0.936100 -0.395591 -1.026262 -1.371480 -0.642298 0.723492 0.634882 0.394679 1.960744 1.602154
118 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.259660 0.252336 -1.164331 0.029843 -1.171780 -0.064553 0.730347 3.175964 0.730139 0.644124 0.395717 1.965594 1.786247
119 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.218246 -0.426428 0.172484 -1.074427 -0.347035 -1.412178 -1.478357 -1.077474 0.728679 0.641488 0.405495 3.790633 3.785379
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.342887 14.664674 30.435719 31.728927 4.729797 3.927588 3.670213 6.491905 0.030965 0.035954 0.003716 1.277517 1.348991
126 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 14.006527 15.779501 30.165128 31.902619 4.720947 3.922340 5.030043 6.431903 0.034895 0.037618 0.000587 1.360899 1.468932
127 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.792453 0.934314 0.994658 1.145966 1.128778 1.037774 1.231362 1.363775 0.728801 0.635028 0.400879 6.019122 5.973584
128 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.14% -0.333335 0.745275 -0.025943 -0.499156 0.079733 -0.837082 0.081267 -0.199099 0.728034 0.618616 0.397293 2.185515 1.845072
129 10 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.330497 0.200143 4.119159 0.869138 3.694068 0.792171 1.521512 0.687776 0.723062 0.619955 0.401265 6.723854 5.685633
130 10 digital_maintenance 100.00% 100.00% 90.87% 0.00% 100.00% 0.00% 12.805755 3.372588 33.566588 1.190159 4.664263 2.178655 3.702644 1.520166 0.054937 0.334711 0.177966 1.321977 4.391734
135 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.990573 -0.734066 -0.603418 -0.383028 -0.500586 -0.562732 1.760005 0.767788 0.704142 0.607886 0.397517 1.886575 1.701384
136 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.129568 5.622652 -0.599903 0.640097 -0.237017 0.079003 -0.240253 4.537803 0.712625 0.600191 0.393768 6.116310 6.893026
137 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 11.253106 15.142841 27.739521 30.706836 3.288611 3.911758 3.248270 4.798867 0.222385 0.059000 0.128001 2.758267 1.908852
138 7 digital_ok 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 15.074684 1.420661 29.536321 1.969247 4.700785 1.516252 3.308929 2.816618 0.049047 0.637967 0.419512 1.279449 4.759748
140 13 digital_ok 0.00% 15.04% 11.82% 0.00% 14.97% 0.00% 0.719294 0.853629 0.054750 0.671478 0.363778 0.706350 0.462458 1.828141 0.640952 0.551201 0.374385 1.955631 1.847256
141 13 digital_ok 100.00% 15.57% 19.87% 0.00% 100.00% 0.00% -0.422135 5.231799 -1.172239 20.643518 -0.823686 5.454257 1.504456 18.147944 0.637213 0.503037 0.390697 4.719007 5.907157
142 13 digital_ok 100.00% 85.50% 100.00% 0.00% 100.00% 0.00% 17.310778 16.368199 19.320640 34.656441 1.955311 3.890372 4.655143 4.174981 0.328837 0.040995 0.182633 2.911146 1.395339
143 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
144 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.493120 0.686899 2.411950 1.686256 2.198666 1.815857 1.014327 1.478481 0.720561 0.621710 0.421283 1.608553 1.466430
145 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.108575 14.749498 33.844922 34.860086 4.688423 3.894611 5.135663 5.636235 0.037545 0.037544 -0.000436 1.568393 1.780465
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.905972 16.480218 33.749118 35.490435 4.681957 3.889819 5.895333 6.526497 0.052691 0.054825 0.001800 1.393552 1.380693
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 12.564682 13.793949 33.206037 34.451158 4.665548 3.869910 6.064440 5.840856 0.053008 0.052274 -0.000089 1.343986 1.393878
156 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.342380 -0.910255 -0.525290 -0.629095 -0.341046 -0.938868 -0.103299 0.034718 0.713275 0.599137 0.408866 6.131809 4.571304
157 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -1.016219 -0.298364 -0.389293 0.123230 -0.851756 0.082266 -0.998670 0.031376 0.713241 0.619062 0.403105 6.464095 5.815096
158 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.270571 -0.741050 -0.525945 -0.707636 -0.455365 -0.762191 -0.186939 0.878468 0.720555 0.627103 0.402976 5.530535 4.510667
160 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
161 13 digital_ok 100.00% 15.57% 36.52% 0.00% 100.00% 0.00% 1.247180 32.322182 1.563729 8.687435 1.533905 2.867449 1.425241 3.384643 0.643925 0.452985 0.367766 4.518601 5.702088
162 13 digital_ok 0.00% 16.11% 17.72% 0.00% 17.65% 0.00% -0.083532 -0.569195 -0.074042 -0.504823 0.091483 -0.512942 0.006534 0.566019 0.638184 0.540418 0.378578 1.791644 1.765845
163 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
164 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
165 14 digital_ok 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
166 14 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
167 15 digital_ok 100.00% 19.87% 18.26% 0.00% 100.00% 0.00% 16.877291 10.345130 0.640896 0.926785 4.136701 1.672636 143.871954 47.988483 0.560340 0.490831 0.236635 3.061409 3.315808
168 15 RF_maintenance 0.00% 0.00% 1.07% 0.00% 100.00% 0.00% 1.592183 2.534130 1.569765 2.871749 0.906275 1.839023 -1.552210 -2.115391 0.702441 0.587195 0.389407 6.377418 5.980286
169 15 digital_ok 0.00% 0.00% 1.61% 0.00% 1.60% 1.07% 2.721366 1.789517 2.924427 2.006918 2.170834 1.205354 -2.369985 -1.483726 0.690722 0.573716 0.396481 2.197450 1.900476
170 15 digital_ok 0.00% 3.22% 2.69% 0.00% 3.21% 0.00% 2.868808 1.089983 3.065051 1.432835 2.358009 0.674226 -2.312922 -1.508923 0.678919 0.575014 0.397858 2.316913 1.798192
176 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.798863 -0.804358 -0.958854 -0.053476 -1.219182 -0.133521 -0.798594 0.315021 0.697606 0.591147 0.413077 2.002219 1.772874
177 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.144277 1.808021 -0.298354 2.117114 -0.087876 1.307235 0.337930 -1.710305 0.706757 0.574923 0.421338 1.906752 1.749801
178 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.287408 -1.172340 1.416129 -0.739405 1.342801 -0.638914 0.927412 -0.429934 0.714683 0.610740 0.413170 1.740962 1.538447
179 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.068603 -0.138958 -1.242581 0.086393 -0.810354 0.052666 -0.593088 -0.003223 0.713649 0.615362 0.413028 1.644145 1.638069
180 13 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
181 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
182 13 RF_maintenance 0.00% 17.19% 18.26% 0.00% 100.00% 0.00% 1.046264 1.177608 1.445387 1.717740 0.801918 0.823368 -1.634213 -1.561343 0.627845 0.516016 0.385089 4.296431 3.898100
183 13 digital_ok 100.00% 16.11% 17.72% 0.00% 100.00% 0.00% -0.365695 0.064712 0.952526 0.930402 0.962714 4.178886 0.483241 6.594583 0.635896 0.523684 0.387621 4.286978 3.610295
184 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
185 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.100080 0.466463 -0.969923 -0.331881 -0.753041 -0.282321 -0.498400 0.503711 0.710311 0.610409 0.423160 1.600451 1.443685
186 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.676465 -0.139768 -1.106454 -0.249709 -1.017648 -0.321791 0.828242 -0.364351 0.705860 0.603904 0.417099 1.636844 1.415010
187 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.088017 0.686592 -0.134529 0.915138 0.009319 0.597112 6.650392 10.056006 0.705887 0.610022 0.410547 3.821595 3.659355
189 15 digital_ok 0.00% 0.00% 1.07% 0.00% 1.07% 0.00% 0.178417 0.291101 -0.889639 -1.204726 -0.520877 -1.121699 -0.225344 -0.477494 0.699708 0.587026 0.409773 2.235831 1.808344
190 15 digital_ok 100.00% 21.48% 100.00% 0.00% 100.00% 0.00% 33.031694 16.320050 5.206841 34.824308 2.050083 3.890334 114.745699 4.727050 0.530298 0.054377 0.367031 5.850785 2.447425
191 15 digital_ok 0.00% 3.22% 2.69% 0.00% 3.21% 0.00% -0.806719 -0.836528 -0.501393 -0.426688 -1.029970 -0.378421 -0.846339 -0.300078 0.687489 0.576760 0.411541 1.930060 1.805233
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.278200 16.620290 26.426965 26.981640 4.658482 3.831704 6.266609 4.692996 0.071311 0.066217 -0.000345 0.000000 0.000000
321 2 not_connected 0.00% 17.72% 37.59% 0.00% 100.00% 0.00% 1.259104 0.793929 0.677504 0.428213 0.478329 0.047916 3.912059 3.346600 0.616195 0.454724 0.399804 0.000000 0.000000
323 2 not_connected 100.00% 28.03% 48.34% 0.00% 100.00% 0.00% 13.500875 2.149908 2.399425 2.665952 0.377978 1.870515 9.769073 -1.155829 0.501090 0.423315 0.321592 0.000000 0.000000
324 4 not_connected 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 3.304759 3.166500 3.602841 3.328378 2.905447 2.303384 -0.783664 -1.683543 0.101804 0.083860 0.046167 0.000000 0.000000
329 12 dish_maintenance 100.00% 16.65% 38.67% 0.00% 100.00% 0.00% -0.272449 1.289196 -0.925712 1.490477 -0.188422 0.855482 8.505804 -0.700159 0.619106 0.457143 0.395657 0.000000 0.000000
333 12 dish_maintenance 100.00% 17.19% 42.43% 0.00% 100.00% 0.00% 2.839522 0.502712 4.203815 0.394015 2.314860 4.154560 2.327699 2.425382 0.597638 0.442599 0.382454 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, 30, 31, 32, 33, 36, 38, 40, 41, 42, 45, 46, 50, 51, 52, 54, 55, 56, 57, 67, 69, 70, 71, 72, 73, 81, 82, 83, 88, 89, 90, 91, 92, 93, 94, 98, 100, 105, 107, 110, 112, 116, 119, 124, 125, 126, 127, 129, 130, 136, 137, 138, 140, 141, 142, 143, 145, 150, 155, 156, 157, 158, 160, 161, 162, 163, 164, 165, 166, 167, 168, 180, 181, 182, 183, 184, 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_2459771.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 [ ]: