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 = "2459766"
data_path = "/mnt/sn1/2459766"
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-5-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/2459766/zen.2459766.25313.sum.auto_metrics.h5.

Load Ant Metrics¶

In [7]:
use_ant_metrics = False

# get a list of all ant_metrics files
glob_str = os.path.join(data_path, f'zen.{JD}.?????.sum{ant_metrics_ext}')
ant_metrics_files = sorted(glob.glob(glob_str))

# if they exist, load as many of them as possible
if len(ant_metrics_files) > 0:
    print(f'Found {len(ant_metrics_files)} ant_metrics files matching glob {glob_str}')
    ant_metrics_apriori_exants = {}
    ant_metrics_xants_dict = {}
    ant_metrics_dead_ants_dict = {}
    ant_metrics_crossed_ants_dict = {}
    ant_metrics_dead_metrics = {}
    ant_metrics_crossed_metrics = {}
    dead_cuts = {}
    crossed_cuts = {}
    for amf in ant_metrics_files:
        with h5py.File(amf, "r") as infile: # use h5py directly since it's much faster than load_metric_file
            # get out results for this file
            dead_cuts[amf] = infile['Metrics']['dead_ant_cut'][()]
            crossed_cuts[amf] = infile['Metrics']['cross_pol_cut'][()]
            xants = infile['Metrics']['xants'][:]
            dead_ants = infile['Metrics']['dead_ants'][:]
            crossed_ants = infile['Metrics']['crossed_ants'][:]        
            try:
                # look for ex_ants in history
                ex_ants_string = infile['Header']['history'][()].decode()
                ex_ants_string = ex_ants_string.split('--apriori_xants')[1]
                ex_ants_string = ex_ants_string.split('--')[0].strip()
            except:
                ex_ants_string = ''
                    
            # This only works for the new correlation-matrix-based ant_metrics
            if 'corr' in infile['Metrics']['final_metrics'] and 'corrXPol' in infile['Metrics']['final_metrics']:
                ant_metrics_dead_metrics[amf] = {eval(ant): infile['Metrics']['final_metrics']['corr'][ant][()]
                                                 for ant in infile['Metrics']['final_metrics']['corr']}
                ant_metrics_crossed_metrics[amf] = {eval(ant): infile['Metrics']['final_metrics']['corrXPol'][ant][()]
                                                    for ant in infile['Metrics']['final_metrics']['corrXPol']}                       
            else:
                raise(KeywordError)
        
        # organize results by file
        ant_metrics_xants_dict[amf] = [(int(ant[0]), ant[1].decode()) for ant in xants]
        ant_metrics_dead_ants_dict[amf] = [(int(ant[0]), ant[1].decode()) for ant in dead_ants]
        ant_metrics_crossed_ants_dict[amf] = [(int(ant[0]), ant[1].decode()) for ant in crossed_ants]
        ant_metrics_apriori_exants[amf] = [int(ant) for ant in ex_ants_string.split()]
    
    dead_cut = np.median(list(dead_cuts.values()))
    crossed_cut = np.median(list(crossed_cuts.values()))
        
    use_ant_metrics = True
else:
    print(f'No files found matching glob {glob_str}. Skipping ant_metrics.')
Found 372 ant_metrics files matching glob /mnt/sn1/2459766/zen.2459766.?????.sum.ant_metrics.hdf5

Load chi^2 info from redcal¶

In [8]:
use_redcal = False
glob_str = os.path.join(data_path, f'zen.{JD}.?????.sum{redcal_ext}')

redcal_files = sorted(glob.glob(glob_str))
if len(redcal_files) > 0:
    print(f'Found {len(redcal_files)} ant_metrics files matching glob {glob_str}')
    post_redcal_ant_flags_dict = {}
    flagged_by_redcal_dict = {}
    cspa_med_dict = {}
    for cal in redcal_files:
        hc = io.HERACal(cal)
        _, flags, cspa, chisq = hc.read()
        cspa_med_dict[cal] = {ant: np.nanmedian(cspa[ant], axis=1) for ant in cspa}

        post_redcal_ant_flags_dict[cal] = {ant: np.all(flags[ant]) for ant in flags}
        # check history to distinguish antennas flagged going into redcal from ones flagged during redcal
        tossed_antenna_lines =  hc.history.replace('\n','').split('Throwing out antenna ')[1:]
        flagged_by_redcal_dict[cal] = sorted([int(line.split(' ')[0]) for line in tossed_antenna_lines])
        
    use_redcal = True
else:
    print(f'No files found matching glob {glob_str}. Skipping redcal chisq.')
Found 38 ant_metrics files matching glob /mnt/sn1/2459766/zen.2459766.?????.sum.known_good.omni.calfits

Figure out some general properties¶

In [9]:
# Parse some general array properties, taking into account the fact that we might be missing some of the metrics
ants = []
pols = []
antpol_pairs = []

if use_auto_metrics:
    ants = sorted(set(bl[0] for bl in auto_metrics['modzs']['r2_shape_modzs']))
    pols = sorted(set(bl[2] for bl in auto_metrics['modzs']['r2_shape_modzs']))
if use_ant_metrics:
    antpol_pairs = sorted(set([antpol for dms in ant_metrics_dead_metrics.values() for antpol in dms.keys()]))
    antpols = sorted(set(antpol[1] for antpol in antpol_pairs))
    ants = sorted(set(antpol[0] for antpol in antpol_pairs) | set(ants))
    pols = sorted(set(utils.join_pol(ap, ap) for ap in antpols) | set(pols))
if use_redcal:
    antpol_pairs = sorted(set([ant for cspa in cspa_med_dict.values() for ant in cspa.keys()]) | set(antpol_pairs))
    antpols = sorted(set(antpol[1] for antpol in antpol_pairs))
    ants = sorted(set(antpol[0] for antpol in antpol_pairs) | set(ants))
    pols = sorted(set(utils.join_pol(ap, ap) for ap in antpols) | set(pols))

# Figure out remaining antennas not in data
hd = io.HERAData(sorted(glob.glob(os.path.join(data_path, 'zen.*.sum.uvh5')))[0])
unused_ants = [ant for ant in hd.antpos if ant not in ants]    

Load a priori antenna statuses and node numbers¶

In [10]:
# try to load a priori antenna statusesm but fail gracefully if this doesn't work.
a_priori_statuses = {ant: 'Not Found' for ant in ants}
nodes = {ant: np.nan for ant in ants + unused_ants}
try:
    from hera_mc import cm_hookup

    # get node numbers
    hookup = cm_hookup.get_hookup('default')
    for ant_name in hookup:
        ant = int("".join(filter(str.isdigit, ant_name)))
        if ant in nodes:
            if hookup[ant_name].get_part_from_type('node')['E<ground'] is not None:
                nodes[ant] = int(hookup[ant_name].get_part_from_type('node')['E<ground'][1:])
    
    # get apriori antenna status
    for ant_name, data in hookup.items():
        ant = int("".join(filter(str.isdigit, ant_name)))
        if ant in a_priori_statuses:
            a_priori_statuses[ant] = data.apriori

except Exception as err:
    print(f'Could not load node numbers and a priori antenna statuses.\nEncountered {type(err)} with message: {err}')

Summarize auto metrics¶

In [11]:
if use_auto_metrics:
    # Parse modzs
    modzs_to_check = {'Shape': 'r2_shape_modzs', 'Power': 'r2_power_modzs', 
                      'Temporal Variability': 'r2_temp_var_modzs', 'Temporal Discontinuties': 'r2_temp_diff_modzs'}
    worst_metrics = []
    worst_zs = []
    all_modzs = {}
    binary_flags = {rationale: [] for rationale in modzs_to_check}

    for ant in ants:
        # parse modzs and figure out flag counts
        modzs = {f'{pol} {rationale}': auto_metrics['modzs'][dict_name][(ant, ant, pol)] 
                 for rationale, dict_name in modzs_to_check.items() for pol in pols}
        for pol in pols:
            for rationale, dict_name in modzs_to_check.items():
                binary_flags[rationale].append(auto_metrics['modzs'][dict_name][(ant, ant, pol)] > mean_round_modz_cut)

        # parse out all metrics for dataframe
        for k in modzs:
            col_label = k + ' Modified Z-Score'
            if col_label in all_modzs:
                all_modzs[col_label].append(modzs[k])
            else:
                all_modzs[col_label] = [modzs[k]]
                
    mean_round_modz_cut = auto_metrics['parameters']['mean_round_modz_cut']
else:
    mean_round_modz_cut = 0

Summarize ant metrics¶

In [12]:
if use_ant_metrics:
    a_priori_flag_frac = {ant: np.mean([ant in apxa for apxa in ant_metrics_apriori_exants.values()]) for ant in ants}
    dead_ant_frac = {ap: {ant: np.mean([(ant, ap) in das for das in ant_metrics_dead_ants_dict.values()])
                                 for ant in ants} for ap in antpols}
    crossed_ant_frac = {ant: np.mean([np.any([(ant, ap) in cas for ap in antpols])
                                      for cas in ant_metrics_crossed_ants_dict.values()]) for ant in ants}
    ant_metrics_xants_frac_by_antpol = {antpol: np.mean([antpol in amx for amx in ant_metrics_xants_dict.values()]) for antpol in antpol_pairs}
    ant_metrics_xants_frac_by_ant = {ant: np.mean([np.any([(ant, ap) in amx for ap in antpols])
                                     for amx in ant_metrics_xants_dict.values()]) for ant in ants}
    average_dead_metrics = {ap: {ant: np.nanmean([dm.get((ant, ap), np.nan) for dm in ant_metrics_dead_metrics.values()]) 
                                 for ant in ants} for ap in antpols}
    average_crossed_metrics = {ant: np.nanmean([cm.get((ant, ap), np.nan) for ap in antpols 
                                                for cm in ant_metrics_crossed_metrics.values()]) for ant in ants}
else:
    dead_cut = 0.4
    crossed_cut = 0.0

Summarize redcal chi^2 metrics¶

In [13]:
if use_redcal:
    cspa = {ant: np.nanmedian(np.hstack([cspa_med_dict[cal][ant] for cal in redcal_files])) for ant in antpol_pairs}
    redcal_prior_flag_frac = {ant: np.mean([np.any([afd[ant, ap] and not ant in flagged_by_redcal_dict[cal] for ap in antpols])
                                            for cal, afd in post_redcal_ant_flags_dict.items()]) for ant in ants}
    redcal_flagged_frac = {ant: np.mean([ant in fbr for fbr in flagged_by_redcal_dict.values()]) for ant in ants}

Build DataFrame¶

In [14]:
# build dataframe
to_show = {'Ant': [f'<a href="{ant_to_report_url(ant)}" target="_blank">{ant}</a>' for ant in ants],
           'Node': [nodes[ant] for ant in ants], 
           'A Priori Status': [a_priori_statuses[ant] for ant in ants]}
           #'Worst Metric': worst_metrics, 'Worst Modified Z-Score': worst_zs}
df = pd.DataFrame(to_show)

# create bar chart columns for flagging percentages:
bar_cols = {}
if use_auto_metrics:
    bar_cols['Auto Metrics Flags'] = [float(ant in auto_ex_ants) for ant in ants]
if use_ant_metrics:
    if np.sum(list(a_priori_flag_frac.values())) > 0:  # only include this col if there are any a priori flags
        bar_cols['A Priori Flag Fraction in Ant Metrics'] = [a_priori_flag_frac[ant] for ant in ants]
    for ap in antpols:
        bar_cols[f'Dead Fraction in Ant Metrics ({ap})'] = [dead_ant_frac[ap][ant] for ant in ants]
    bar_cols['Crossed Fraction in Ant Metrics'] = [crossed_ant_frac[ant] for ant in ants]
if use_redcal:
    bar_cols['Flag Fraction Before Redcal'] = [redcal_prior_flag_frac[ant] for ant in ants]
    bar_cols['Flagged By Redcal chi^2 Fraction'] = [redcal_flagged_frac[ant] for ant in ants]  
for col in bar_cols:
    df[col] = bar_cols[col]

# add auto_metrics
if use_auto_metrics:
    for label, modz in all_modzs.items():
        df[label] = modz
z_score_cols = [col for col in df.columns if 'Modified Z-Score' in col]        
        
# add ant_metrics
ant_metrics_cols = {}
if use_ant_metrics:
    for ap in antpols:
        ant_metrics_cols[f'Average Dead Ant Metric ({ap})'] = [average_dead_metrics[ap][ant] for ant in ants]
    ant_metrics_cols['Average Crossed Ant Metric'] = [average_crossed_metrics[ant] for ant in ants]
    for col in ant_metrics_cols:
        df[col] = ant_metrics_cols[col]   

# add redcal chisq
redcal_cols = []
if use_redcal:
    for ap in antpols:
        col_title = f'Median chi^2 Per Antenna ({ap})'
        df[col_title] = [cspa[ant, ap] for ant in ants]
        redcal_cols.append(col_title)

# sort by node number and then by antenna number within nodes
df.sort_values(['Node', 'Ant'], ascending=True)

# style dataframe
table = df.style.hide_index()\
          .applymap(lambda val: f'background-color: {status_colors[val]}' if val in status_colors else '', subset=['A Priori Status']) \
          .background_gradient(cmap='viridis', vmax=mean_round_modz_cut * 3, vmin=0, axis=None, subset=z_score_cols) \
          .background_gradient(cmap='bwr_r', vmin=dead_cut-.25, vmax=dead_cut+.25, axis=0, subset=list([col for col in ant_metrics_cols if 'dead' in col.lower()])) \
          .background_gradient(cmap='bwr_r', vmin=crossed_cut-.25, vmax=crossed_cut+.25, axis=0, subset=list([col for col in ant_metrics_cols if 'crossed' in col.lower()])) \
          .background_gradient(cmap='plasma', vmax=4, vmin=1, axis=None, subset=redcal_cols) \
          .applymap(lambda val: 'font-weight: bold' if val < dead_cut else '', subset=list([col for col in ant_metrics_cols if 'dead' in col.lower()])) \
          .applymap(lambda val: 'font-weight: bold' if val < crossed_cut else '', subset=list([col for col in ant_metrics_cols if 'crossed' in col.lower()])) \
          .applymap(lambda val: 'font-weight: bold' if val > mean_round_modz_cut else '', subset=z_score_cols) \
          .applymap(lambda val: 'color: red' if val > mean_round_modz_cut else '', subset=z_score_cols) \
          .bar(subset=list(bar_cols.keys()), vmin=0, vmax=1) \
          .format({col: '{:,.4f}'.format for col in z_score_cols}) \
          .format({col: '{:,.4f}'.format for col in ant_metrics_cols}) \
          .format({col: '{:,.2%}'.format for col in bar_cols}) \
          .applymap(lambda val: 'font-weight: bold', subset=['Ant']) \
          .set_table_styles([dict(selector="th",props=[('max-width', f'70pt')])]) \

Table 1: RTP Per-Antenna Metrics Summary Table¶

This admittedly very busy table incorporates summary information about all antennas in the array. Its columns depend on what information is available when the notebook is run (i.e. whether auto_metrics, ant_metrics, and/or redcal is done). These can be divided into 5 sections:

Basic Antenna Info: antenna number, node, and its a priori status.

Flag Fractions: Fraction of the night that an antenna was flagged for various reasons. Note that auto_metrics flags antennas for the whole night, so it'll be 0% or 100%.

auto_metrics Details: If auto_metrics is included, this section shows the modified Z-score signifying how much of an outlier each antenna and polarization is in each of four categories: bandpass shape, overall power, temporal variability, and temporal discontinuities. Bold red text indicates that this is a reason for flagging the antenna. It is reproduced from the auto_metrics_inspect.ipynb nightly notebook, so check that out for more details on the precise metrics.

ant_metrics Details: If ant_metrics is included, this section shows the average correlation-based metrics for antennas over the whole night. Low "dead ant" metrics (nominally below 0.4) indicate antennas not correlating with the rest of the array. Negative "crossed ant" metrics indicate antennas that show stronger correlations in their cross-pols than their same-pols, indicating that the two polarizations are probably swapped. Bold text indicates that the average is below the threshold for flagging.

redcal chi^2 Details: If redcal is included, this shows the median chi^2 per antenna. This would be 1 in an ideal array. Antennas are thrown out when they they are outliers in their median chi^2, usually greater than 4-sigma outliers in modified Z-score.

In [15]:
HTML(table.render())
Out[15]:
Ant Node A Priori Status Auto Metrics Flags Dead Fraction in Ant Metrics (Jee) Dead Fraction in Ant Metrics (Jnn) Crossed Fraction in Ant Metrics Flag Fraction Before Redcal Flagged By Redcal chi^2 Fraction ee Shape Modified Z-Score nn Shape Modified Z-Score ee Power Modified Z-Score nn Power Modified Z-Score ee Temporal Variability Modified Z-Score nn Temporal Variability Modified Z-Score ee Temporal Discontinuties Modified Z-Score nn Temporal Discontinuties Modified Z-Score Average Dead Ant Metric (Jee) Average Dead Ant Metric (Jnn) Average Crossed Ant Metric Median chi^2 Per Antenna (Jee) Median chi^2 Per Antenna (Jnn)
3 1 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.736379 0.675408 0.775442 0.892150 0.538324 1.009501 0.082131 1.030066 0.487218 0.486879 0.319620 2.541954 2.616575
4 1 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.467670 1.514343 -0.588004 -0.278362 -0.778789 -0.916591 1.001181 0.165867 0.498511 0.489000 0.319978 2.812243 2.855123
5 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.017787 -1.090297 0.274172 -1.187014 0.167852 -1.233765 0.504890 -1.074290 0.506081 0.491620 0.322242 1.361839 1.399295
7 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.697567 -0.717455 0.033163 -0.101568 0.051778 1.174675 1.032288 6.560786 0.513487 0.506137 0.319261 2.773586 2.902901
8 2 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.381998 1.126779 1.102443 1.509899 0.499798 0.542629 -0.007777 -1.817376 0.493558 0.476837 0.301615 3.123553 3.013169
9 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.006543 -0.057953 0.235595 0.241096 -0.167886 0.025496 -0.066409 0.158622 0.498815 0.489888 0.306512 1.461538 1.405290
10 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.658946 -0.673573 -1.255403 -0.056490 -1.588036 1.063784 -0.316789 0.309044 0.477771 0.474402 0.304008 1.450850 1.488129
15 1 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
16 1 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
17 1 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
18 1 RF_maintenance 100.00% 0.00% 97.31% 0.00% 100.00% 0.00% 4.145478 10.306439 2.234507 5.341865 10.401447 6.245857 155.307447 76.894138 0.464232 0.288876 0.286648 2.313497 1.734053
19 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.289705 0.737690 -0.657861 1.082020 -1.638392 0.454556 -0.981377 -1.788924 0.520783 0.505153 0.304011 1.486527 1.576731
20 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.412179 -0.309263 1.011832 -0.685029 1.637102 -1.355225 0.288382 -0.574579 0.514234 0.492785 0.304983 1.496716 1.537515
21 2 digital_ok 100.00% 0.00% 2.69% 0.00% 100.00% 0.00% 0.765536 2.029472 0.481558 5.868475 2.447975 70.480894 2.266094 25.144259 0.502324 0.485778 0.308287 3.529157 3.352762
27 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 15.757702 18.640961 33.459717 34.153168 5.830840 5.265011 6.608319 5.225420 0.050192 0.052570 0.002703 1.234798 1.240333
28 1 RF_maintenance 100.00% 94.62% 100.00% 0.00% 100.00% 0.00% 4.427328 24.187743 2.401746 19.277191 3.558402 6.290145 -1.227440 74.215292 0.335477 0.173966 0.192035 5.954709 3.111456
29 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.710796 -0.420220 -0.074634 -0.165706 0.329400 -0.638630 -0.148516 -0.062607 0.528253 0.528722 0.315777 1.398483 1.546825
30 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -1.223430 0.038751 -0.957098 -0.068500 -0.386204 -0.658824 11.996012 0.223226 0.527915 0.528831 0.311323 2.489180 2.864220
31 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.203134 0.169291 0.403456 0.680265 0.155802 -0.933124 2.580695 0.889196 0.540694 0.531779 0.316541 1.402171 1.402665
32 2 RF_maintenance 100.00% 18.82% 0.00% 0.00% 100.00% 0.00% 22.587259 8.327710 2.657997 0.797907 1.695134 16.249785 22.989729 127.401502 0.433180 0.472405 0.228662 5.735397 3.588166
33 2 RF_maintenance 100.00% 0.00% 86.56% 0.00% 100.00% 0.00% 0.072302 3.039968 -0.043591 -0.224791 -0.434197 -0.583348 1.741881 7.854151 0.516149 0.338232 0.360226 3.348225 2.006666
36 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.979200 5.561868 0.598531 2.610656 0.288207 2.412506 0.464221 1.376765 0.525977 0.506353 0.324573 2.790738 2.749538
37 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.291706 0.295528 1.780898 0.548501 2.937897 -0.223497 0.831112 2.184534 0.532886 0.511034 0.317596 1.330733 1.396401
38 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.773235 1.098637 2.177224 1.033362 2.029880 0.297687 6.366410 -1.187724 0.538179 0.520531 0.324020 2.662336 2.672233
40 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.006327 1.172343 1.040577 0.949796 0.805000 0.150496 0.565498 0.428703 0.533702 0.541338 0.319926 1.482798 1.686062
41 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.934787 -0.600425 -1.058797 -0.116088 -0.278631 -0.680418 -0.515141 0.430003 0.532468 0.543148 0.317482 1.504442 1.559430
42 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.819905 0.654882 -0.667023 0.136163 -0.269708 0.159078 -0.335831 -0.316012 0.542700 0.546335 0.320429 1.444421 1.510735
45 5 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 15.735927 18.171744 32.801897 33.872255 5.679359 4.692746 3.721974 4.679585 0.031911 0.041418 0.008018 1.370788 1.942366
46 5 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.916982 -0.433752 -0.741805 -0.245846 -1.111625 -0.128143 -0.084741 1.965113 0.519389 0.511523 0.320580 1.417539 1.448538
50 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 8.569146 0.121230 2.568922 -0.105053 9.090176 0.360481 110.987790 4.684966 0.491469 0.508627 0.298727 3.005300 3.037707
51 3 digital_ok 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 0.389192 31.497340 -0.073177 40.861846 -0.125594 4.710396 0.619326 11.237436 0.548293 0.051062 0.360186 2.975850 1.234762
52 3 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 5.282110 33.263929 0.723517 41.234454 1.523525 4.956613 7.844121 10.228429 0.524004 0.050438 0.340557 3.735523 1.215221
53 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.549412 -0.392690 -1.144163 -1.145974 -1.070908 -0.604362 0.871783 5.492223 0.540406 0.549098 0.322891 2.897550 3.157640
54 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.63% -0.774079 0.175456 -0.881686 0.221419 0.228018 1.008466 -0.310946 -0.230430 0.524065 0.538671 0.304193 1.531004 1.747028
55 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.051179 2.771169 14.064318 2.586111 2.781761 2.054530 8.678416 -2.393439 0.524841 0.512499 0.304922 2.778894 2.899894
56 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.319431 0.856054 -0.351516 0.780607 -0.362382 -0.187338 0.159409 4.955413 0.543259 0.550857 0.320021 2.679833 2.686324
57 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.408346 -0.747822 5.720168 -0.225414 4.566475 -0.370033 2.829727 -0.588596 0.543719 0.535185 0.318536 2.716550 2.576247
65 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.269469 0.029968 -0.302646 -0.210304 -1.192258 -0.880086 -1.191263 -0.916411 0.523516 0.514014 0.308083 1.390296 1.437391
66 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.378357 -0.641392 0.990959 -1.285523 -0.279097 -1.224656 -1.839549 0.339873 0.542454 0.544226 0.319506 1.429852 1.449008
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.041456 3.602398 2.483251 7.146817 1.966875 4.164593 1.634650 4.288403 0.559878 0.564620 0.324774 2.874345 3.281213
68 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.090465 0.127894 -1.000608 1.219708 -1.269918 -0.079372 -0.886859 0.398584 0.537766 0.558172 0.323823 1.493257 1.595573
69 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.771986 -0.643887 -0.628226 -0.083395 -1.502204 1.133679 0.073282 0.467483 0.534674 0.548893 0.318688 1.537044 1.580585
70 4 RF_maintenance 100.00% 0.00% 0.00% 100.00% 100.00% 0.00% 2.394529 7.162630 -0.213709 8.966665 0.399735 1.907593 -0.505003 4.341562 0.222911 0.226599 -0.281053 1.974439 1.896988
71 4 digital_ok 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% -0.509865 -0.233926 -0.584642 -0.393138 -1.090799 -0.934742 0.592186 -0.620592 0.224603 0.219011 -0.281103 2.109439 2.066255
72 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.180925 -0.164065 0.843491 -0.441614 0.924383 -1.066386 6.059648 -0.012802 0.542684 0.546861 0.317684 2.765870 2.698220
73 5 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.708173 0.806668 0.798552 1.540352 1.701445 1.932289 1.053432 1.169847 0.546148 0.537522 0.322792 2.533227 2.478088
81 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.460082 1.066650 3.326357 -0.293181 3.287170 -0.118492 5.192674 0.712577 0.524235 0.522157 0.303460 3.083833 3.197648
82 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.389951 0.168443 -1.110626 0.704022 -1.417404 0.147341 -0.771054 -0.129958 0.542084 0.551296 0.313723 3.849063 3.568570
83 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.381548 3.213022 -0.554462 3.154712 2.465083 2.476630 -0.819779 -2.579544 0.545773 0.521650 0.320246 1.426106 1.562944
88 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 18.311319 19.659174 30.007703 30.898749 5.098553 4.170202 9.364652 5.514489 0.044171 0.046449 0.000490 1.205736 1.206261
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% 2.169298 -0.130547 2.457762 -0.172042 2.703692 -0.373407 3.364871 3.500181 0.539483 0.538081 0.326202 3.029352 3.188465
91 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 15.751794 17.905228 29.988018 31.310591 5.400509 4.398307 6.324512 5.715875 0.041377 0.045620 -0.000204 1.271987 1.558437
92 10 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 5.869765 9.389870 0.178103 0.264522 2.605238 0.714737 -0.751517 7.906306 0.322603 0.331277 0.138052 4.457928 7.912300
93 10 RF_maintenance 100.00% 91.94% 100.00% 0.00% 100.00% 0.00% 5.643282 20.258196 -0.750690 34.698968 0.819042 4.566312 1.522568 7.332606 0.327910 0.055674 0.195681 3.511208 1.314501
94 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.430253 2.251297 0.680989 3.617545 0.140053 2.123584 1.737017 3.205701 0.484540 0.485144 0.315020 3.002390 2.923532
98 7 digital_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.129354 1.728530 2.085035 0.953142 2.155827 1.529204 -2.219995 2.797626 0.494588 0.518906 0.303432 2.735466 3.156641
99 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.683918 -0.882755 -0.880763 -0.658991 -1.403465 -0.901788 0.305243 0.128612 0.532977 0.545028 0.306888 1.402894 1.458900
100 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.105923 1.744409 2.916917 1.947634 2.299697 1.133331 -2.484128 -2.414787 0.522006 0.534087 0.308457 2.935976 3.010554
105 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 17.501434 22.234347 28.725641 30.027683 5.221512 4.232121 4.359234 4.331103 0.040061 0.044782 0.006782 1.305938 1.611790
106 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.564164 1.718255 2.818234 1.913329 -0.010882 0.033349 2.050497 1.002519 0.533207 0.533089 0.331424 1.377663 1.353275
107 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 16.379198 16.688330 28.843645 29.754429 5.303145 4.355947 3.626975 4.312194 0.046098 0.048164 0.003977 1.288873 1.290382
108 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.017327 1.488341 0.889377 -0.904807 0.232815 -1.090705 0.270324 -0.701518 0.532494 0.532271 0.324068 1.340613 1.333320
109 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.473217 -0.724011 0.268636 -0.584504 0.140541 -0.275139 0.147780 -0.382976 0.522648 0.520824 0.318002 1.279517 1.346471
110 10 RF_maintenance 100.00% 48.39% 0.00% 0.00% 100.00% 0.00% 27.114148 3.432928 2.083186 3.197099 -0.530714 2.402036 0.387422 -2.144881 0.425499 0.476463 0.265763 3.684055 3.428055
111 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.162209 -0.516297 -0.055790 -0.366850 0.098354 0.453800 0.159214 0.411231 0.492455 0.490248 0.308829 1.401610 1.397241
112 10 RF_maintenance 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% -1.054953 -0.247807 0.193360 0.040275 0.176892 1.081824 0.083494 0.153182 0.181579 0.185698 -0.279001 1.986316 1.802699
116 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.068021 2.458361 -0.012067 2.475582 0.006261 1.564735 -0.948844 -2.488671 0.493790 0.480430 0.289763 3.117095 3.554909
117 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.190889 -0.535132 -0.158816 -0.875718 -1.363568 -1.009100 -1.359508 -0.792614 0.526266 0.539187 0.308667 1.480628 1.520371
118 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.218601 0.597369 -1.258498 0.256356 -1.534574 0.153239 0.329838 1.492886 0.540377 0.545963 0.318989 1.522090 1.506454
119 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.059817 -0.699618 0.012067 -1.047840 -1.317424 -1.489993 -1.443251 -1.154285 0.529833 0.539756 0.326620 2.659455 2.836816
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% 16.073484 17.886345 30.289179 31.422437 5.321693 4.381222 3.677972 6.203895 0.030661 0.034593 0.002846 1.260634 1.317637
126 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 16.544655 18.499582 30.031975 31.611061 5.362871 4.386720 5.340468 6.116540 0.034770 0.034640 -0.001385 1.295854 1.348282
127 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.780988 1.005011 1.204280 1.168190 1.993538 1.471675 0.770195 1.668218 0.530406 0.533065 0.323037 3.314032 3.495727
128 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.421966 0.948078 0.035216 -0.647370 -0.270648 -0.035629 0.121741 -0.451707 0.518063 0.509028 0.310621 1.439669 1.484058
129 10 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.508128 -0.032498 4.359033 0.881476 3.480342 0.316923 1.718378 0.548252 0.508067 0.509333 0.312981 3.720963 3.724173
130 10 digital_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 15.117778 4.282027 33.332597 1.568981 5.477003 1.369036 3.713524 -0.668959 0.053927 0.307896 0.172009 1.270160 3.862562
135 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.133350 -0.695487 -0.396391 -0.489861 -0.546349 -0.677027 1.060111 0.907649 0.485420 0.492946 0.294035 1.434865 1.540594
136 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.267483 6.436807 -0.318490 0.606622 -0.867619 0.639694 -0.013481 2.656403 0.521543 0.512835 0.299049 3.576578 4.514589
137 7 RF_maintenance 100.00% 94.62% 100.00% 0.00% 100.00% 0.00% 6.787890 18.004522 16.389633 30.391898 18.402994 4.493630 6.367703 4.553127 0.334846 0.056631 0.216281 5.652375 1.789832
138 7 digital_ok 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 18.086644 2.170658 29.399567 2.103076 5.307960 0.798089 3.250632 1.163697 0.047904 0.540245 0.367239 1.240944 2.892579
140 13 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.531327 0.682240 0.268577 0.619270 0.425643 -0.280981 0.357351 1.308306 0.080321 0.079532 0.017095 1.263768 1.263990
141 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.314487 2.501650 -0.723052 21.225105 -0.193860 3.960721 0.329764 16.228667 0.063604 0.074421 0.018121 1.286886 1.280949
142 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 19.359459 19.845875 18.620401 34.279798 4.428875 4.579578 5.313719 3.943561 0.086852 0.038490 0.034388 1.300159 1.260716
143 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.664195 -0.338064 -0.598694 -0.218406 -0.081202 0.051401 -0.432857 -0.339635 0.517402 0.526153 0.322300 1.345574 1.348284
144 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.239005 2.970405 4.091243 3.657299 3.079108 4.086024 1.877067 2.152154 0.530552 0.531363 0.331855 3.441901 3.684219
145 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 15.427401 17.691511 33.639321 34.493944 5.636623 4.690524 4.881780 5.613202 0.039839 0.042091 0.000193 1.419162 1.394224
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 16.910384 19.943650 33.529201 35.100023 5.448662 4.508713 6.128976 6.677875 0.050952 0.052325 0.001055 1.342889 1.329883
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 15.125870 16.810215 32.989096 34.069171 5.717619 4.715085 5.863589 5.793321 0.052424 0.050151 0.000166 1.407689 1.579827
156 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.490075 0.178078 -0.358255 1.243032 -0.061463 6.694504 0.371547 11.131756 0.506932 0.499848 0.309066 3.797635 3.705347
157 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.873464 -0.548584 -0.208447 0.040980 -0.671954 -0.456586 -1.165017 0.044416 0.508126 0.515555 0.311306 3.676795 3.715509
158 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.513333 -1.049351 -0.822071 -0.937076 0.337093 -0.131936 1.336330 0.173340 0.506434 0.512265 0.310433 3.584548 3.466271
160 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 14.490030 15.689485 33.171448 34.119162 5.618967 4.633093 3.441194 3.984484 0.039127 0.038800 0.002101 1.245567 1.239617
161 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 2.133589 34.262006 1.980195 9.155952 2.148617 2.167246 1.264186 2.174503 0.044675 0.047211 0.002771 1.305317 1.299610
162 13 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.405093 -0.736086 0.059222 -0.522769 1.617211 0.338534 0.635114 0.883552 0.058611 0.051469 0.004173 1.258815 1.242402
163 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.150717 -0.409813 0.172839 -0.360031 -0.245335 -0.424975 -0.028755 -0.030608 0.505251 0.509287 0.318502 1.420597 1.520157
164 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.687178 -0.544406 -0.447390 -0.251501 -0.622160 6.126003 -0.162971 1.021636 0.507729 0.511814 0.312766 3.643970 3.794771
165 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 7.89% -0.426288 -0.270150 -0.137555 -0.419952 -0.992450 -0.439554 -0.097661 -0.347323 0.505392 0.510436 0.306738 1.502584 1.736216
166 14 RF_maintenance 100.00% 59.14% 21.51% 0.00% 100.00% 0.00% 19.432844 17.225525 3.285287 3.016755 0.944438 1.429299 5.175904 11.187286 0.409062 0.429657 0.159756 3.836808 4.380368
167 15 digital_ok 100.00% 67.74% 77.96% 0.00% 100.00% 0.00% 15.798772 11.607444 0.598856 0.915264 9.164127 3.151238 167.051130 53.353634 0.387505 0.382488 0.177288 2.588023 3.011889
168 15 RF_maintenance 0.00% 0.00% 8.06% 0.00% 100.00% 0.00% 1.680603 3.134628 1.421460 2.850108 0.184233 1.970989 -1.261674 -2.336981 0.480933 0.466575 0.286317 3.843092 4.500829
169 15 digital_ok 0.00% 5.38% 10.75% 0.00% 10.53% 0.00% 3.025804 2.371788 2.731285 2.059402 2.253711 1.329025 -2.537083 -2.006715 0.463911 0.454912 0.285334 1.604257 1.679321
170 15 digital_ok 0.00% 16.13% 13.44% 0.00% 15.79% 0.00% 3.264279 1.445181 2.841894 1.433157 2.363845 0.713813 -2.149240 -1.596803 0.444675 0.452271 0.285444 1.631104 1.625622
176 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.190868 -1.010909 -1.167904 -0.055804 -1.547925 -0.231885 -0.852165 0.080581 0.480735 0.482929 0.309229 1.421801 1.472035
177 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.075305 2.396953 -0.085059 2.066162 -0.107449 1.192529 -0.132185 -2.394193 0.493438 0.459575 0.318244 1.381887 1.518591
178 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.260152 -0.890932 1.674419 -0.231262 1.139526 -0.172941 0.647463 3.356690 0.497671 0.494600 0.314038 1.327494 1.330293
179 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.259328 1.638814 -1.197133 0.226185 0.542195 -0.153783 0.218525 -0.370366 0.488113 0.489031 0.314295 1.343107 1.381074
180 13 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 26.275051 18.845248 4.499354 34.518680 24.772983 4.516215 294.770230 4.355139 0.082935 0.038891 0.033209 1.282552 1.239817
181 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 3.692977 1.359862 5.384684 1.592562 5.791136 1.122311 2.280107 1.254091 0.052327 0.052816 0.004920 1.290804 1.280677
182 13 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.937374 1.492470 1.310498 1.707134 0.748875 0.956802 -1.859837 -2.219534 0.066429 0.068656 0.007854 1.278274 1.268448
183 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.154649 0.684688 1.164707 2.535083 1.621372 -0.191598 0.380336 8.891483 0.067226 0.055641 0.006313 1.264991 1.263066
184 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.317335 -0.081429 -0.036259 0.342574 0.327978 -0.220747 0.175727 0.007777 0.503755 0.497416 0.319527 1.456797 1.699662
185 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.720973 3.376506 -0.832967 -0.039656 -0.682960 -0.651107 -0.051019 -0.288341 0.500166 0.491869 0.311252 1.446332 1.561082
186 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.63% -0.458917 -0.261701 -0.876359 -0.317371 0.234573 -0.006261 1.749665 -0.510322 0.495295 0.495472 0.309463 1.545549 1.729258
187 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.001706 -0.657016 0.028287 -1.177821 0.322547 -0.669767 1.513750 -0.560193 0.493603 0.496761 0.301627 1.362571 1.503252
189 15 digital_ok 0.00% 0.00% 8.06% 0.00% 7.89% 0.00% 0.134899 -0.001706 -0.692672 -1.269367 -0.813011 -0.324304 -0.220405 -0.877087 0.477194 0.468510 0.304750 1.558042 1.704216
190 15 digital_ok 100.00% 83.87% 89.25% 0.00% 100.00% 0.00% 33.678006 45.746734 4.617566 7.650447 8.478342 6.529695 48.959282 84.277493 0.344320 0.335083 0.156555 4.021628 4.058372
191 15 digital_ok 0.00% 16.13% 13.44% 0.00% 15.79% 0.00% -0.834185 -0.569877 -0.668716 -0.510563 -1.443815 -0.138553 0.508645 3.425935 0.447290 0.446831 0.299122 1.455738 1.527451
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% 20.405741 19.760788 26.294950 26.710201 5.635667 4.406354 6.369799 4.403928 0.067060 0.062541 0.003695 0.000000 0.000000
321 2 not_connected 0.00% 81.18% 83.87% 0.00% 100.00% 0.00% 0.590189 0.112944 0.497527 0.497725 -0.327158 -0.158160 1.029228 0.448664 0.362754 0.342864 0.258917 0.000000 0.000000
323 2 not_connected 100.00% 97.31% 83.87% 0.00% 100.00% 0.00% 16.432949 2.585504 2.826897 2.559878 0.856639 1.821600 5.484827 -1.889975 0.261454 0.329555 0.221577 0.000000 0.000000
324 4 not_connected 0.00% 86.56% 89.25% 0.00% 100.00% 0.00% 3.689702 3.830229 3.367797 3.374992 2.911071 2.541947 -1.594039 -2.983605 0.330225 0.311334 0.234605 0.000000 0.000000
329 12 dish_maintenance 0.00% 81.18% 86.56% 0.00% 100.00% 0.00% 0.168582 1.387089 -0.431080 1.492416 0.935226 0.611055 0.627922 -1.915874 0.364440 0.340681 0.257544 0.000000 0.000000
333 12 dish_maintenance 100.00% 81.18% 83.87% 0.00% 100.00% 0.00% 3.039888 0.217558 4.792013 -0.082652 2.480939 -0.252316 3.556345 -0.770926 0.362531 0.352930 0.252077 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, 7, 8, 15, 16, 17, 18, 21, 27, 28, 30, 32, 33, 36, 38, 45, 50, 51, 52, 53, 55, 56, 57, 67, 70, 71, 72, 73, 81, 82, 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, 144, 145, 150, 155, 156, 157, 158, 160, 161, 162, 164, 166, 167, 168, 169, 170, 180, 181, 182, 183, 190, 191, 220, 221, 222, 320, 321, 323, 324, 329, 333]
In [17]:
# write to csv
outpath = os.path.join(nb_outdir, f'rtp_summary_table_{JD}.csv')
print(f'Now saving Table 1 to a csv at {outpath}')
df.to_csv(outpath)
Now saving Table 1 to a csv at /home/obs/src/H5C_Notebooks/_rtp_summary_/rtp_summary_table_2459766.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 [ ]: