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 = "2459776"
data_path = "/mnt/sn1/2459776"
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-15-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/2459776/zen.2459776.41746.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 1477 ant_metrics files matching glob /mnt/sn1/2459776/zen.2459776.?????.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 148 ant_metrics files matching glob /mnt/sn1/2459776/zen.2459776.?????.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 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
4 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
5 1 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 557.660830 701.124949 inf inf 23067.719722 33686.209415 48147.537989 71734.376825 nan nan nan 0.000000 0.000000
7 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.803262 -1.328745 -0.527104 -0.935416 1.282875 -0.206565 -0.049337 39.144844 0.739491 0.618916 0.418219 3.415514 3.424380
8 2 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.932964 5.734487 6.682837 7.421118 22.303688 23.382743 1.008138 -5.083229 0.741899 0.606500 0.423287 3.643564 3.478207
9 2 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.68% -0.889081 -0.885023 1.278334 0.017320 0.525759 -0.250505 -0.080260 2.429083 0.727991 0.617202 0.421325 1.622137 1.392697
10 2 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.68% -0.687676 -0.334840 -0.243718 1.430292 1.919019 3.526809 0.910583 0.480448 0.722942 0.586894 0.437089 1.661051 1.493835
15 1 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 2.03% 0.399610 1.261577 1.648859 -0.154383 -0.133850 -0.682126 0.084663 3.378878 0.741296 0.616999 0.416841 1.904785 1.697582
16 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -1.022538 -0.396148 -1.048565 0.071867 0.208212 -0.100798 6.286563 6.854295 0.757884 0.635900 0.418096 4.344150 4.123502
17 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.319105 0.630790 -0.535215 -0.852777 0.664161 0.202153 5.666398 5.169819 0.746495 0.633338 0.411433 3.359479 3.747267
18 1 RF_maintenance 100.00% 0.00% 95.46% 0.00% 100.00% 0.00% 27.837265 27.194538 -0.504433 6.013288 7.543655 25.155250 66.314840 75.459867 0.652321 0.278674 0.455512 2.372049 1.618050
19 2 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.00% -0.810721 -1.854377 -0.080693 -1.050446 0.815684 3.160187 0.476642 0.620635 0.752976 0.629865 0.417986 1.618434 1.555541
20 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.593704 3.258480 6.274689 -0.770092 5.980846 0.115324 0.440898 0.396454 0.701647 0.606093 0.413715 3.355428 3.436745
21 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.357940 -0.336325 5.364088 3.065641 53.377620 29.815252 183.496912 138.615138 0.672890 0.584009 0.420191 3.215707 3.309580
27 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 19.645470 23.182339 10.002824 9.903109 36.288914 37.452114 2.630526 2.137228 0.038636 0.041062 0.001227 1.189098 1.199252
28 1 RF_maintenance 100.00% 56.19% 100.00% 0.00% 100.00% 0.00% 21.205831 28.564978 -0.711221 8.100792 20.545671 31.013060 7.665261 17.262707 0.370486 0.094543 0.250116 7.343645 1.448054
29 1 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.00% -0.431354 -0.203733 -0.342641 -1.280866 -0.569500 -0.848232 -0.836954 0.263418 0.758230 0.640688 0.404655 1.760797 1.687249
30 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.217127 -1.296848 2.199696 2.957954 1.049620 1.758122 9.487123 -0.034498 0.731397 0.612966 0.403843 3.093488 3.205763
31 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.207457 2.771970 6.441780 4.468245 1.075923 4.502620 0.958625 1.262796 0.730149 0.587972 0.420261 3.071256 2.861413
32 2 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 36.234760 35.020154 1.939905 1.035645 46.046589 12.888073 151.921114 47.559084 0.610344 0.552271 0.254493 4.576998 3.842288
33 2 RF_maintenance 100.00% 0.00% 53.49% 0.00% 100.00% 0.00% 0.361155 26.759190 0.111514 2.186599 -0.359935 11.339574 3.908046 39.182657 0.735541 0.403538 0.521112 3.391654 1.873049
36 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 13.876943 10.565337 -0.690403 -0.011238 1.685936 2.314743 0.148737 1.267228 0.762852 0.641952 0.414078 4.202825 3.363694
37 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.943123 1.120339 1.405146 -0.783539 0.175424 0.987394 -0.201360 27.463908 0.757487 0.659275 0.404628 3.444173 3.716365
38 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.836330 0.405004 2.197312 -0.354491 0.100196 3.353538 13.451585 4.271201 0.758228 0.666598 0.405381 3.686109 3.670115
40 4 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.68% 0.012869 0.836773 1.089723 2.977433 -0.651641 3.169375 0.044048 -0.985017 0.751726 0.626259 0.405662 2.113446 1.986484
41 4 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.00% 1.883318 -0.534803 0.493381 -1.078352 0.189816 -0.646959 -1.297855 -0.829243 0.766933 0.653734 0.401132 1.975903 1.760312
42 4 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.00% -0.186564 0.422608 0.266674 -0.051596 -0.042865 -1.070375 -0.997853 -1.196555 0.766461 0.654887 0.407024 1.944039 1.664505
45 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.758773 3.441389 1.028593 3.420423 -0.619303 4.184781 0.293615 30.146313 0.743961 0.589751 0.424461 3.380615 3.109184
46 5 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.00% -0.720119 -0.717912 -0.478873 -0.570174 -0.474939 -1.166650 -0.469536 0.799612 0.747652 0.628151 0.415577 1.554228 1.509224
50 3 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.00% 2.016484 3.596160 -1.052720 0.258279 0.860218 3.281600 0.470766 -1.209928 0.753968 0.649475 0.397268 1.689649 1.564964
51 3 digital_ok 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 1.233297 41.678712 4.026316 13.595768 7.477896 36.295676 -1.361292 15.855837 0.767145 0.046139 0.549037 4.165679 1.168275
52 3 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 11.016037 44.951552 1.933860 13.805152 7.251743 36.909527 12.898669 31.050749 0.730888 0.037672 0.499331 5.469985 1.125512
53 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.626697 3.646656 4.972471 5.153257 11.392857 8.592183 0.140160 7.724938 0.773463 0.680392 0.391548 4.704019 4.626465
54 4 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 5.41% -0.146804 -0.950582 -0.248057 0.122695 0.767607 -0.258269 1.759347 -0.499350 0.756177 0.653931 0.381301 2.281865 2.067164
55 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.688248 1.639556 4.750126 0.480207 5.758847 -0.741294 8.555849 0.506269 0.716761 0.665278 0.395331 3.057439 4.041664
56 4 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 5.41% -0.231800 0.578691 0.007644 0.601793 -0.480772 -0.737537 -1.008080 1.196897 0.767203 0.671164 0.386918 2.103921 1.857101
57 4 digital_ok 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 20.509989 0.041771 9.219381 -1.240093 36.438721 7.992932 1.197962 3.185217 0.048429 0.661247 0.470718 1.345345 4.099018
65 3 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.00% 2.003258 0.661306 -0.316144 0.109950 0.815580 1.209339 -0.572680 2.563847 0.755999 0.654510 0.412497 1.793221 1.617700
66 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.823919 1.741174 -0.984548 1.211770 1.655912 -0.779600 0.205884 5.704266 0.764718 0.665064 0.401995 4.620176 4.595582
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.114665 5.896342 -0.602986 8.634719 1.229438 12.312359 1.959623 0.885478 0.765221 0.574980 0.421204 3.981997 3.060051
68 3 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.00% 2.181861 1.862856 -0.459637 1.791147 1.353826 0.380504 0.544427 -0.239191 0.760834 0.669719 0.391283 1.745132 1.641402
69 4 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.00% -0.410472 0.344336 -0.661634 -0.672267 0.623917 1.586458 0.501967 0.823456 0.767244 0.676722 0.388210 1.832735 1.689380
70 4 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 9.430901 -1.625441 2.866450 -0.340678 -0.009237 -0.022987 0.225167 1.690178 0.758482 0.676411 0.394497 17.073042 11.822460
71 4 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 94.59% 0.767640 -0.012869 -0.840283 -0.007644 0.764206 0.462932 -0.627002 -0.025148 0.759414 0.678071 0.385826 17.620891 19.968645
72 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.555154 -0.539109 -0.181835 0.628794 3.778508 -0.278836 3.977906 -1.163571 0.756847 0.675133 0.396169 4.355426 3.783867
73 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.471300 3.498330 0.918664 4.074996 0.446237 7.642346 2.817177 -0.562264 0.744686 0.602968 0.412525 3.139969 2.506068
81 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.571892 1.801087 1.317058 1.614209 4.553784 2.749408 0.935003 -0.552410 0.720118 0.652113 0.410469 4.056491 3.743782
82 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 8.187332 -0.290484 0.396589 0.730080 2.575614 1.935620 -0.279475 -0.805653 0.729576 0.643971 0.401065 4.114144 3.307608
83 7 digital_ok 100.00% 97.49% 0.00% 0.00% 100.00% 0.00% 19.799359 0.321113 7.966140 1.487763 33.935097 -0.442237 1.196204 -1.410240 0.266629 0.678662 0.513462 1.289465 3.260729
84 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 11.490076 12.165970 3.754565 4.073598 7.295353 5.485532 -2.693744 -2.921580 0.681041 0.589965 0.360009 2.443604 2.381356
85 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 20.002572 23.242258 8.370385 8.228371 36.321645 37.466184 2.513419 3.665644 0.031415 0.029184 0.001619 1.163871 1.163891
86 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 20.918290 23.909655 8.185351 8.022807 36.296163 37.489931 1.175534 5.151760 0.031873 0.029203 0.000939 1.150448 1.149496
87 8 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 9.014639 8.474151 5.427946 7.384258 16.136128 23.386973 -2.503149 -6.125171 0.685868 0.577684 0.367046 2.699913 2.494094
88 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 22.235510 24.645249 8.096052 8.045456 36.269791 37.450698 2.394707 0.899106 0.040002 0.040866 -0.000401 1.197416 1.194244
90 9 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 8.076661 2.109657 5.531341 1.527531 17.215540 0.349761 1.265943 0.707781 0.646300 0.658151 0.430847 2.597196 3.586322
91 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 21.028878 23.308979 8.064928 8.273885 36.405865 37.635900 1.719369 1.196874 0.037506 0.039441 0.000253 1.199538 1.207473
92 10 digital_ok 100.00% 67.70% 95.46% 0.00% 100.00% 0.00% 22.825905 23.701625 -0.060756 2.388368 16.510953 17.061814 2.043161 11.664695 0.360837 0.321147 0.159060 2.842327 2.754499
93 10 RF_maintenance 100.00% 71.09% 100.00% 0.00% 100.00% 0.00% 11.573554 22.037812 4.682149 10.145078 11.771587 37.518246 2.945264 3.161994 0.335815 0.038554 0.208258 2.279656 1.274994
94 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.792459 -1.849219 0.159318 -0.382171 0.107546 2.849407 4.098449 11.093188 0.735571 0.620663 0.422554 4.831461 3.959158
98 7 digital_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.140174 6.558533 -0.854093 4.018662 3.526905 14.834597 -0.097530 0.612856 0.726994 0.550347 0.430573 3.948865 3.207802
99 7 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.00% 2.458594 0.078048 0.758190 0.459342 1.546434 2.096966 0.113323 -0.745558 0.742773 0.632241 0.405200 1.925246 1.704197
100 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.283289 -0.513468 -0.316106 -1.221333 0.510594 -0.704992 -0.399261 0.063734 0.753632 0.661290 0.400662 3.630266 3.305054
101 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 10.635733 12.351649 4.033110 3.476718 8.245513 3.528214 4.206443 -1.508350 0.678705 0.587047 0.367709 2.328905 2.443463
102 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 20.322284 23.215774 7.883813 8.439257 187.326279 82.985682 560.960759 235.920094 0.030378 0.029465 0.001528 1.155920 1.152637
103 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.113063 12.477244 3.310448 3.546755 5.092656 3.489352 -1.883222 -1.976235 0.684188 0.586873 0.368768 2.839357 2.617305
104 8 RF_maintenance 100.00% 9.48% 9.48% 90.52% 100.00% 0.00% 10.740457 84.145112 2.424688 8.878618 9.104680 8.759690 -0.688060 0.728691 0.329535 0.272449 -0.202380 2.155406 1.897277
105 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 22.231621 27.099598 8.063350 8.266540 36.363925 37.450282 1.075080 0.681304 0.035406 0.039674 0.005141 1.210141 1.202190
106 9 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.00% 0.694667 0.811331 -0.833680 -0.892272 0.134682 -0.367141 0.663512 -0.372566 0.754126 0.659630 0.401298 1.840296 1.548731
107 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 20.550336 21.542718 8.215067 8.183547 36.449810 37.721531 1.240879 1.382777 0.039635 0.042665 0.004147 1.225596 1.203355
108 9 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.367139 5.787129 -0.658468 1.267981 -1.196604 -0.830300 -0.530382 -1.290933 0.759680 0.661922 0.406286 3.838334 3.862069
109 10 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -1.095496 -0.837888 -0.484050 -0.930556 -0.327291 -1.032689 7.798509 6.223255 0.758878 0.649984 0.406851 5.839213 4.398944
110 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 47.345570 2.514840 -0.076825 0.616014 6.004987 -0.039831 -0.154363 -1.331154 0.643187 0.657109 0.346034 7.523063 6.722835
111 10 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.502238 0.504166 -0.705280 0.504342 -0.023248 0.730937 -0.191846 7.245989 0.739127 0.636588 0.414456 5.763365 4.683725
112 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -1.054520 0.460453 -1.098703 0.398579 0.080444 -0.749170 -0.470774 -1.452825 0.735154 0.634966 0.425024 5.278501 4.595883
116 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.539180 1.868210 2.243333 -0.281093 8.064483 1.169626 1.715349 -0.891559 0.698332 0.639042 0.418608 4.057661 5.153797
117 7 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.00% 0.619416 0.467278 1.558647 2.139623 1.270757 0.643189 -1.782338 -2.658929 0.745529 0.656154 0.412935 2.003421 1.644375
118 7 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.00% 1.942734 1.488058 0.421715 -0.704494 -0.657607 -0.695761 1.947524 1.786886 0.748479 0.653336 0.404544 2.108973 1.785036
119 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.991160 1.450184 3.228158 -0.656038 5.250041 -0.108695 -2.469267 -0.891749 0.760108 0.655728 0.404706 4.205878 4.430940
120 8 RF_maintenance 100.00% 92.08% 100.00% 0.00% 100.00% 0.00% 22.271847 38.088552 1.729970 11.469203 18.478052 36.863726 -0.353941 9.682143 0.330618 0.049739 0.273369 2.280762 1.151622
121 8 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.412421 8.635266 3.461017 0.775235 4.789436 1.171505 38.823496 44.901956 0.681805 0.585625 0.369874 3.246177 2.986783
122 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 11.074688 7.448137 2.623459 4.026664 2.755923 6.314389 -1.753378 -2.699928 0.680741 0.577490 0.371589 2.899866 2.782367
123 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 9.183398 9.302299 4.848088 5.907448 11.497956 14.231155 -3.639274 -4.558927 0.687260 0.582856 0.372394 3.375172 3.010296
125 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 20.433859 22.327872 8.249291 8.334258 36.401448 37.661418 0.919926 1.464391 0.028645 0.030690 0.001556 1.215905 1.233580
126 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 20.135785 23.552716 8.098713 8.450674 36.402503 37.603141 1.230279 1.237854 0.033498 0.033600 0.000034 1.328669 1.414842
127 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.021663 -0.141740 2.121588 -0.303682 0.367628 0.104714 0.037663 1.448334 0.742446 0.656573 0.398178 4.437068 4.635097
128 10 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.836212 5.079262 -1.283781 0.803653 0.124577 0.323365 0.984345 1.268422 0.757408 0.647423 0.399837 6.299232 5.602038
129 10 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.68% 0.085534 0.054897 -0.225666 -0.709443 -1.327113 -1.196643 -0.662073 -0.696155 0.744472 0.645658 0.407487 1.520516 1.081454
130 10 digital_maintenance 100.00% 100.00% 94.79% 0.00% 100.00% 0.00% 19.867807 20.583489 10.054442 -0.590475 36.319028 24.686047 2.185057 16.737798 0.046969 0.336350 0.215560 1.646363 6.478600
135 12 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.00% -1.232140 -0.558825 -0.113974 -0.212579 0.665169 0.042865 1.332747 0.006503 0.723127 0.632835 0.414466 1.867623 1.820764
136 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.373194 13.846490 -0.897087 -0.008836 1.461460 0.954090 1.505761 5.243881 0.732255 0.609110 0.406941 5.418178 6.080166
137 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 21.343091 23.894450 7.913494 7.897085 36.298492 37.573030 1.241990 1.484427 0.035234 0.043978 0.003555 1.277605 1.414032
138 7 digital_ok 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 24.194086 1.523191 7.191100 -0.719988 36.279020 -0.220167 1.414102 -0.605663 0.048398 0.631451 0.493006 1.212672 4.129050
140 13 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.00% 3.715009 2.567562 -1.230619 -1.109037 0.964363 1.233887 1.316736 1.199420 0.747874 0.652873 0.404005 1.802946 1.679256
141 13 digital_ok 100.00% 0.00% 83.95% 0.00% 100.00% 0.00% 2.056961 18.747137 1.323144 9.117416 1.222763 29.583879 0.471010 5.918137 0.739179 0.350892 0.488942 4.533000 2.687089
142 13 digital_ok 100.00% 95.46% 100.00% 0.00% 100.00% 0.00% 23.543639 25.647935 7.215611 10.016577 16.550292 37.398956 1.705543 1.988022 0.301436 0.040154 0.189579 3.922717 1.305773
143 14 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 6.76% 1.818688 -0.487258 0.663071 0.438817 -0.110297 -0.233327 -0.581263 -1.129667 0.749475 0.677201 0.397560 1.812387 1.587792
144 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.676067 3.661695 6.287502 5.627293 13.462345 10.812252 0.597941 0.420249 0.681970 0.588452 0.393759 4.226931 4.926148
145 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 19.271610 21.557419 10.082636 10.098429 36.282306 37.520417 2.298637 2.852991 0.030803 0.033418 0.002679 1.164515 1.210601
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 22.201062 26.228053 10.117503 10.438305 36.153860 37.277225 7.371650 7.911147 0.052666 0.053947 0.001110 1.284736 1.277682
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 20.011237 21.716090 9.754483 9.811703 36.136583 37.414313 2.251210 2.160480 0.041892 0.039296 0.000614 1.245634 1.311859
156 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.801388 1.186275 0.047665 -0.743947 0.470071 0.150411 5.020290 30.589945 0.731686 0.615270 0.413760 6.910389 5.361079
157 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.730175 -0.080432 0.330073 1.159791 -0.592942 -0.708673 0.386379 -1.209509 0.733150 0.633704 0.410354 7.829510 5.473871
158 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.853019 -1.048926 3.436884 0.931447 3.676423 -1.091652 0.074128 0.685470 0.716503 0.629817 0.409452 4.747208 4.113419
160 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 18.795057 19.809571 9.937609 9.920053 36.277605 37.454050 2.240737 2.660666 0.040613 0.044826 0.004860 1.305464 1.311307
161 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
162 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
163 14 digital_ok 0.00% 0.00% 0.00% 0.00% 6.08% 0.00% -0.386133 -1.162053 1.282610 2.060121 -0.206351 2.158564 -0.014718 -0.032454 0.751605 0.641919 0.399024 2.014136 1.837155
164 14 digital_ok 0.00% 0.00% 0.00% 0.00% 6.08% 0.00% -0.534524 -0.918119 -0.133063 1.297899 -0.492817 -0.341069 0.234538 0.448042 0.756465 0.647686 0.398652 2.122415 1.692559
165 14 digital_ok 0.00% 0.00% 0.00% 0.00% 6.08% 0.68% -0.486841 -0.211705 1.737816 1.103263 0.712943 -0.637884 -0.892226 0.142315 0.769001 0.646947 0.399878 2.393663 2.104409
166 14 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 12.902635 -0.041592 -0.084955 0.580307 5.222928 -0.287136 10.165311 0.356718 0.737168 0.659867 0.383666 4.681434 4.202927
167 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 13.060881 21.212580 7.039973 7.499548 26.364239 28.961544 55.938799 11.313412 0.680910 0.514159 0.338910 5.036881 3.570787
168 15 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.797435 9.155446 6.797118 8.375117 21.203733 28.487382 -4.968538 -7.197997 0.748832 0.628226 0.408313 7.444420 5.773115
169 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 8.762391 7.751395 7.716861 7.806654 26.608753 25.360405 -5.622914 -5.219404 0.740668 0.619679 0.413796 7.078434 5.196771
170 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 8.917269 5.904680 7.843514 7.396436 27.706286 22.354325 -5.850481 -6.361437 0.724646 0.631396 0.423031 5.709839 5.113263
176 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.994399 -0.163615 -0.687686 0.265156 -0.378617 1.220234 -0.083359 5.782554 0.731191 0.616860 0.423328 5.019313 4.375031
177 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.228963 4.492732 -0.235888 3.005561 -0.535857 9.097938 1.183972 6.800140 0.734663 0.573460 0.430424 5.143550 4.334859
178 12 digital_ok 0.00% 0.00% 0.00% 0.00% 6.08% 0.00% -0.363375 -0.336169 -1.206834 -0.492981 -1.427387 -0.666856 -0.485456 -1.179421 0.739786 0.632533 0.419004 1.548968 1.318268
179 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.095216 1.608033 0.814560 -0.232219 5.870941 -1.136431 2.492120 -1.047243 0.738937 0.630744 0.420282 3.473211 3.343660
180 13 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 0.554716 23.775373 -0.224149 10.103349 0.845996 37.194338 -0.520193 2.334555 0.753474 0.082102 0.573656 10.182513 1.250352
181 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 19.442352 46.312537 10.114351 6.552807 36.295910 22.521534 2.183696 1.277042 0.036890 0.184417 0.101903 1.221246 1.662609
182 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
183 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -1.816224 3.177929 -0.610877 0.340509 -0.381446 -0.244905 -0.402660 11.098812 0.752273 0.626000 0.420780 3.717165 3.658827
184 14 digital_ok 0.00% 0.00% 0.00% 0.00% 6.08% 0.00% 0.110708 2.157635 2.036304 1.767994 -0.250781 1.188141 0.636707 -0.006503 0.745505 0.625675 0.403406 2.292585 1.931687
185 14 digital_ok 0.00% 0.00% 0.00% 0.00% 6.08% 0.00% 1.730750 0.594594 0.431843 -0.676714 -0.647532 -1.360550 -1.383583 -1.306611 0.770752 0.654840 0.400048 2.350286 1.886993
186 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.307737 0.420225 3.707327 3.640857 4.532236 3.239302 3.233121 -0.885198 0.730539 0.614125 0.391921 4.367910 4.613822
187 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.410913 1.262903 2.827168 0.295891 2.090696 -0.604078 3.196582 8.203247 0.733221 0.661399 0.400909 4.959658 5.951072
189 15 digital_ok 0.00% 0.00% 0.00% 0.00% 5.41% 0.00% 2.191140 2.872407 0.459399 -1.242389 -0.120297 0.547219 2.508693 -1.079870 0.734533 0.633499 0.414815 1.670701 1.222955
190 15 digital_ok 100.00% 10.16% 100.00% 0.00% 100.00% 0.00% 67.981310 25.534850 1.022020 10.105285 23.418579 37.400874 16.564131 2.618322 0.579418 0.046700 0.465162 3.905894 1.509124
191 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.788659 -0.152416 0.044230 -1.187812 -0.830934 -0.533373 1.835627 5.193812 0.733826 0.630824 0.432963 5.265269 5.876255
203 18 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 8.537884 7.167067 22.392565 21.543375 6369.925213 7079.381060 26108.807340 26131.623787 nan nan nan 0.000000 0.000000
205 19 RF_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 8.386725 3.268936 7.387582 3.205815 24.938400 7.993919 14.203351 37.573274 0.744283 0.625117 0.404505 5.522374 4.425233
206 19 RF_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.254614 6.603379 -0.512258 6.990708 12.622675 20.827367 20.652030 17.520064 0.670096 0.625096 0.421091 3.125689 3.492019
207 19 RF_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 9.512394 6.423398 7.927208 6.892906 28.797349 18.705239 20.296968 22.855083 0.717460 0.619308 0.394124 10.115597 8.022342
220 18 RF_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 8.984621 7.555610 17.247005 16.719482 3696.103522 3696.600198 17986.995309 21425.295400 nan nan nan 0.000000 0.000000
221 18 RF_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 8.428700 5.624991 19.990357 20.137807 5289.738034 6199.054503 23136.704558 24773.505348 nan nan nan 0.000000 0.000000
222 18 RF_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 9.964058 9.716645 22.254404 21.028988 6476.364765 5616.875968 24447.165815 21054.357242 nan nan nan 0.000000 0.000000
223 19 RF_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.027237 3.417068 6.123575 4.796983 18.054501 41.516143 21.554546 54.820456 0.740777 0.613388 0.419789 4.293267 3.202986
224 19 RF_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 11.018695 10.168238 9.090749 9.278186 34.596892 34.631250 31.405470 24.314033 0.704963 0.582762 0.407370 3.462163 2.751149
241 19 RF_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 8.637688 7.403547 22.426098 21.548118 6380.435611 7059.245426 26184.623129 26176.680789 nan nan nan 0.000000 0.000000
242 19 RF_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 9.809377 9.155681 20.676950 21.140033 5299.680259 5601.965962 19902.263102 20812.630149 nan nan nan 0.000000 0.000000
243 19 RF_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 25.339161 7.299739 34.189464 26.738228 8874.822911 8863.344602 26222.785144 26203.024328 nan nan nan 0.000000 0.000000
320 3 dish_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 27.329844 26.294151 6.220430 5.905937 35.898590 37.264673 7.427313 3.891782 0.065688 0.059578 0.000538 0.000000 0.000000
321 2 not_connected 100.00% 0.00% 2.71% 0.00% 100.00% 0.00% 2.713213 1.462988 4.641672 4.640089 16.380334 14.191606 32.934515 29.697448 0.684943 0.533047 0.450443 0.000000 0.000000
323 2 not_connected 100.00% 39.27% 10.16% 0.00% 100.00% 0.00% 32.102022 3.472733 -0.524732 6.004230 42.815452 20.190445 147.248503 56.467731 0.462631 0.513379 0.350233 0.000000 0.000000
324 4 not_connected 100.00% 0.00% 6.77% 0.00% 100.00% 0.00% 5.560533 6.797960 6.402177 7.006745 22.021167 22.035286 -4.600687 -6.012441 0.685174 0.533017 0.426961 0.000000 0.000000
329 12 dish_maintenance 100.00% 14.90% 2.71% 0.00% 100.00% 0.00% 8.550630 0.703746 -0.439772 4.305188 14.023285 10.647386 5.978054 -2.391320 0.604948 0.552117 0.423431 0.000000 0.000000
333 12 dish_maintenance 100.00% 48.54% 6.77% 0.00% 100.00% 0.00% 19.809951 0.988038 2.317954 4.059409 30.525465 9.496363 0.860132 -0.704012 0.366833 0.528886 0.372958 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, 5, 7, 8, 16, 17, 18, 20, 21, 27, 28, 30, 31, 32, 33, 36, 37, 38, 45, 51, 52, 53, 55, 57, 66, 67, 70, 71, 72, 73, 81, 82, 83, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 98, 100, 101, 102, 103, 104, 105, 107, 108, 109, 110, 111, 112, 116, 119, 120, 121, 122, 123, 125, 126, 127, 128, 130, 136, 137, 138, 141, 142, 144, 145, 150, 155, 156, 157, 158, 160, 161, 162, 166, 167, 168, 169, 170, 176, 177, 179, 180, 181, 182, 183, 186, 187, 190, 191, 203, 205, 206, 207, 220, 221, 222, 223, 224, 241, 242, 243, 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_2459776.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 [ ]: