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 = "2459769"
data_path = "/mnt/sn1/2459769"
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-8-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/2459769/zen.2459769.25320.sum.auto_metrics.h5.

Load Ant Metrics¶

In [7]:
use_ant_metrics = False

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

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

Figure out some general properties¶

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

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

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

Load a priori antenna statuses and node numbers¶

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

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

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

Summarize auto metrics¶

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

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

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

Summarize ant metrics¶

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

Summarize redcal chi^2 metrics¶

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

Build DataFrame¶

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

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

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

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

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

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

Table 1: RTP Per-Antenna Metrics Summary Table¶

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

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

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

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

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

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

In [15]:
HTML(table.render())
Out[15]:
Ant Node A Priori Status Auto Metrics Flags Dead Fraction in Ant Metrics (Jee) Dead Fraction in Ant Metrics (Jnn) Crossed Fraction in Ant Metrics Flag Fraction Before Redcal Flagged By Redcal chi^2 Fraction ee Shape Modified Z-Score nn Shape Modified Z-Score ee Power Modified Z-Score nn Power Modified Z-Score ee Temporal Variability Modified Z-Score nn Temporal Variability Modified Z-Score ee Temporal Discontinuties Modified Z-Score nn Temporal Discontinuties Modified Z-Score Average Dead Ant Metric (Jee) Average Dead Ant Metric (Jnn) Average Crossed Ant Metric Median chi^2 Per Antenna (Jee) Median chi^2 Per Antenna (Jnn)
3 1 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.594485 0.204919 0.873986 1.180278 -0.238197 0.822299 -0.326911 1.066403 0.480512 0.480930 0.307174 2.882825 2.755032
4 1 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.776628 2.867226 -0.016974 0.019370 -0.912251 -0.070158 -0.511624 -0.914061 0.498692 0.488288 0.309108 3.303962 3.312278
5 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.255589 0.162490 -0.066263 1.832523 -0.448195 0.372418 -0.350716 -1.458740 0.505109 0.493656 0.309911 1.718477 1.683779
7 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.699283 -0.829103 -0.429624 -0.278847 -1.257113 1.534895 -0.279767 11.007181 0.500025 0.498185 0.312300 2.542640 2.706708
8 2 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.583911 4.373458 7.694080 8.464320 7.748719 7.353666 0.498971 -1.827401 0.478101 0.465906 0.293994 2.956608 2.828143
9 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.560214 -0.982379 -0.900832 -0.561906 -0.946176 -0.793045 -0.496061 0.746419 0.476824 0.470058 0.300185 1.487344 1.471690
10 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.064317 -0.782260 2.001020 -0.826556 1.641430 0.489381 -0.569865 0.026168 0.454730 0.451923 0.295822 1.571848 1.563770
15 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.341544 0.167655 0.332321 -0.423235 0.171959 0.561318 -0.156774 -0.019590 0.513642 0.502444 0.307770 1.652407 1.690731
16 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.038885 -0.444734 -0.828741 0.246285 0.099334 -0.915695 2.898822 -0.000960 0.523087 0.513791 0.307575 1.766577 1.736005
17 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.462243 -0.036508 -0.426843 -0.214279 0.273726 0.823053 1.525066 1.872032 0.514760 0.513890 0.302708 1.738873 1.890677
18 1 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 5.458116 13.303319 2.097321 9.949253 4.600802 5.315012 76.811299 56.418071 0.479478 0.297792 0.301335 2.343195 1.691491
19 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.899447 3.099310 -0.426419 6.514858 -0.639580 5.949606 3.927254 -1.223781 0.512204 0.497674 0.306211 2.628591 2.587910
20 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.011272 1.360437 1.345787 0.388430 -0.517125 0.638011 0.277457 -0.678359 0.496650 0.477113 0.297682 1.643994 1.642197
21 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.629914 -0.817401 0.213025 0.900195 -0.454464 1.242869 0.993136 0.441958 0.480971 0.472577 0.298069 1.649387 1.629831
27 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 24.114889 28.324275 74.362982 75.777539 19.581062 16.735465 7.399110 5.738390 0.050378 0.052649 0.003969 1.214164 1.223063
28 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 8.894395 33.342922 10.641993 41.851120 16.264960 13.376417 -1.109198 59.286246 0.348102 0.188322 0.191465 9.023552 3.543104
29 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.001146 -0.813459 -0.609487 -0.914500 0.271043 -1.049448 -0.313651 0.192127 0.529525 0.531895 0.302484 1.736796 1.874915
30 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.622870 -0.316887 -0.854846 -0.863106 -0.562042 -1.043843 4.522033 -0.192604 0.528152 0.529620 0.298963 2.700724 2.951607
31 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.364198 -0.161867 0.030183 0.031028 0.733502 0.772010 1.932332 0.956083 0.530284 0.522905 0.304671 1.504910 1.505429
32 2 RF_maintenance 100.00% 40.32% 2.69% 0.00% 100.00% 0.00% 28.079654 32.309386 5.196383 4.430010 2.191818 0.940633 2.662972 1.562925 0.418445 0.429014 0.159083 5.051920 4.031367
33 2 RF_maintenance 100.00% 0.00% 97.31% 0.00% 100.00% 0.00% 0.309223 5.442598 0.206422 -0.356061 -0.672869 3.618566 -0.079108 9.768524 0.496565 0.321815 0.351134 3.266729 1.942166
36 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.470549 8.274005 0.438044 5.532248 -0.034916 3.865660 0.057908 1.548642 0.504619 0.487076 0.314848 2.469793 2.647206
37 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.844302 3.193173 5.247801 6.324452 6.871016 5.686695 1.352454 4.090336 0.516441 0.496422 0.309138 2.300278 2.463216
38 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.662802 4.348176 3.748622 7.321139 5.018598 6.224742 7.343192 -1.310699 0.523852 0.508828 0.315421 2.621976 2.445029
40 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.923996 0.800724 1.249768 1.253367 0.223683 -0.345152 -0.086407 -0.163449 0.532108 0.540977 0.313971 1.685994 1.852522
41 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.468891 -0.851225 0.139361 -0.281766 -0.657825 -0.341552 -0.729072 -0.844980 0.535718 0.543153 0.310175 1.698194 1.730780
42 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.878519 0.115869 -0.378824 -0.427862 -1.146566 -0.625429 -0.440691 -0.447389 0.544638 0.548580 0.314286 1.707353 1.659208
45 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.712454 0.356025 14.852509 1.912268 9.987650 2.404148 2.212425 2.209597 0.519799 0.504233 0.312745 2.655879 2.626000
46 5 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.465786 -0.962551 0.420432 -0.907882 -0.179116 -0.282356 -0.602246 0.063070 0.502536 0.497375 0.312904 1.428766 1.410350
50 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 2.122930 1.108726 2.602050 -0.762473 2.359559 0.753039 2.089448 0.043944 0.499136 0.491256 0.292211 1.302792 1.348190
51 3 digital_ok 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 0.352444 46.078866 -0.807181 90.969938 -0.640740 16.495010 0.345387 12.674007 0.528308 0.045652 0.347118 2.545318 1.265616
52 3 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 7.784405 48.749973 1.281613 91.864824 2.057630 16.858076 3.487807 11.464512 0.504912 0.041550 0.324518 3.377589 1.206905
53 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.863784 1.139890 2.002443 1.075197 0.222106 0.004611 0.430015 3.856787 0.531841 0.541496 0.317500 1.598967 1.700866
54 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.201852 -0.207382 0.112095 -0.382524 -0.132928 1.281444 0.457678 -0.224776 0.511788 0.532064 0.296794 1.793059 1.983993
55 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.035630 6.894489 29.781191 10.931189 6.085310 10.668606 7.212836 -2.601184 0.525745 0.515060 0.298994 2.605217 2.866735
56 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -1.287318 0.118727 -0.422471 0.463992 -1.161604 0.752005 0.110232 5.260862 0.542130 0.548087 0.308898 3.119457 2.963845
57 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.943288 1.768450 5.545279 5.833831 5.706273 5.727974 2.800141 -1.219292 0.539461 0.529688 0.314306 2.963226 2.670772
65 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.099786 2.817873 4.704465 4.492742 4.470965 3.775050 -1.583075 -1.141817 0.499251 0.492878 0.297449 2.806073 2.699905
66 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.556742 1.676962 6.642558 2.344669 4.921222 1.587820 -2.016826 0.005603 0.523447 0.523892 0.309056 2.638285 2.513683
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.810985 4.418581 4.562604 15.741162 3.038517 10.603691 1.588372 6.418806 0.543901 0.549378 0.319653 2.493852 2.672982
68 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.298827 0.157256 2.665616 2.041454 3.229072 -0.004611 -1.197665 -0.092765 0.524998 0.546737 0.323129 1.547965 1.634922
69 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.247922 -0.653599 0.438636 -0.775138 0.191636 2.951338 -0.564705 0.680744 0.529743 0.544655 0.315671 1.669310 1.693414
70 4 RF_maintenance 100.00% 0.00% 5.38% 0.00% 100.00% 0.00% 5.522982 6.322401 0.699672 11.066542 3.514616 10.681611 0.157287 0.028917 0.537915 0.494718 0.327034 8.592754 8.029715
71 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.194660 5.415335 -0.849984 9.610199 -0.270228 8.697235 0.625581 -2.162057 0.524845 0.520041 0.304829 9.152608 11.424649
72 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 2.282964 -1.375477 0.815188 -0.073370 1.349748 0.443669 2.705121 -0.949461 0.534138 0.538660 0.314488 1.489913 1.499267
73 5 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.001754 0.989411 1.389292 3.649136 1.904809 2.281988 2.367221 1.141057 0.531758 0.527901 0.315688 2.780031 2.729691
81 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.694450 0.322720 6.894828 -0.699674 6.683481 -0.353474 1.512586 -0.284898 0.502938 0.499512 0.291182 2.923453 2.679762
82 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.805716 0.620360 1.970150 0.662783 1.965915 -0.014160 -1.111104 -0.379348 0.520892 0.530341 0.303153 2.790449 2.531504
83 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.258479 7.790531 4.720903 12.509893 8.875347 12.061643 -1.307039 -1.454496 0.526959 0.506825 0.309674 2.460352 2.309802
88 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 27.314376 29.298732 66.569589 68.486202 19.026570 16.323537 9.911040 5.698265 0.042210 0.044133 0.000385 1.194425 1.197078
89 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
90 9 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.224961 1.285916 5.467849 -0.700243 4.499284 -0.101170 4.012466 -0.199850 0.524287 0.521851 0.316849 3.009415 3.106622
91 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 23.933235 26.120185 66.506274 69.423729 19.352056 16.531738 6.718298 6.339709 0.038567 0.042583 0.001504 1.260803 1.521557
92 10 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 9.787861 13.705923 5.695902 0.623847 14.818226 7.783119 -0.560555 9.002114 0.307440 0.319872 0.138810 4.440390 8.115228
93 10 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 9.396240 29.679530 0.617444 77.007506 8.074548 16.820431 2.410536 8.135426 0.312827 0.050447 0.194476 3.498673 1.305033
94 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.067044 2.192223 0.834325 7.259899 -1.039766 4.665365 1.203858 4.818234 0.461414 0.460197 0.302459 2.966932 2.965595
98 7 digital_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.547607 20.408807 10.024752 2.094958 10.983054 2.227880 -1.748530 4.276464 0.477950 0.490268 0.268082 2.646571 3.292604
99 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.229429 0.011730 2.921112 1.059103 3.616613 3.275281 -0.892811 -1.211705 0.510761 0.520926 0.296100 1.300513 1.290547
100 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.164740 5.519092 11.632599 9.662024 12.715513 9.303408 -2.055666 -2.572715 0.502639 0.514477 0.297430 2.615113 2.611029
105 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 26.315972 33.420496 63.673658 66.510546 19.178588 16.513380 4.727727 4.930569 0.039066 0.042722 0.005044 1.296270 1.354117
106 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.865659 1.496543 3.653683 2.176556 0.058652 -0.196697 1.016703 0.085179 0.521364 0.518223 0.324142 1.434329 1.383619
107 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 24.332369 24.939163 63.968726 65.929720 19.250253 16.514637 3.951172 4.509932 0.042972 0.044853 0.003940 1.291793 1.288844
108 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.040653 2.228474 0.451446 0.486077 -1.338186 0.194828 -0.303636 -1.133119 0.514622 0.511515 0.315638 1.411961 1.383581
109 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.873440 -0.596468 -0.067004 1.470379 -0.229795 0.309948 -0.782203 -1.178375 0.500970 0.498734 0.308929 1.284250 1.352513
110 10 RF_maintenance 100.00% 51.08% 0.00% 0.00% 100.00% 0.00% 41.999875 7.515260 7.186852 11.852656 0.974506 11.440748 0.926473 -1.810319 0.409257 0.458155 0.260931 3.525188 3.350155
111 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.175431 0.427529 -0.852499 -0.786094 -1.410460 2.376410 -0.670623 3.114223 0.468311 0.466555 0.296311 1.358995 1.397709
112 10 RF_maintenance 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% -1.042103 -0.134612 0.300738 -0.822240 0.575962 0.442000 0.000960 -0.461535 0.169072 0.171786 -0.276170 1.984360 1.799860
116 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.182079 6.774074 5.518588 10.962771 5.864945 10.348793 -1.703778 -2.459632 0.472352 0.458909 0.276362 3.491193 3.349332
117 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.990498 0.350779 4.627752 0.469437 3.424894 0.112716 -1.623658 -1.116040 0.503936 0.515417 0.296022 3.000839 3.290617
118 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.474971 1.133086 2.528788 0.016974 2.741047 -0.420812 -0.217731 1.204813 0.515025 0.522664 0.308723 1.403020 1.368479
119 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.246450 2.799566 6.373962 4.418996 5.771200 4.313169 -1.948373 -1.824161 0.505465 0.515739 0.313777 2.601291 2.637763
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% 24.248994 26.431136 67.203621 69.669131 19.150230 16.582126 4.099582 7.075907 0.030639 0.033492 0.002607 1.272942 1.318380
126 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 24.810718 27.769532 66.634543 70.102493 19.297368 16.507882 5.455039 7.042460 0.034245 0.034375 -0.000529 1.291418 1.352789
127 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.432795 0.974783 2.829281 2.238717 2.910573 2.860627 0.487809 1.035581 0.510770 0.510055 0.312929 3.541980 3.657468
128 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.665821 1.809396 -0.755023 -0.697021 -1.036137 -0.747987 -0.445019 0.043760 0.495577 0.486418 0.299587 1.304144 1.343457
129 10 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.405640 -0.212682 9.484941 1.112185 6.291577 -0.296341 1.242566 -0.108788 0.483675 0.483620 0.301713 3.351935 3.437462
130 10 digital_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 23.432920 8.750657 74.153590 8.741441 19.440627 12.252995 4.144190 -0.552624 0.048703 0.289180 0.163994 1.295217 3.609963
135 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.993184 -0.456621 -0.392333 -0.531146 -0.832948 -0.598180 0.950731 -0.395773 0.464121 0.470569 0.280314 1.417317 1.405608
136 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.594518 10.880773 -0.822745 1.324914 -0.280982 1.116065 0.788360 1.812729 0.494920 0.483380 0.285772 3.303920 3.933046
137 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 12.174089 27.335882 53.849485 67.321593 22.433915 16.645103 6.931968 5.242840 0.257170 0.055507 0.162795 4.107775 1.665689
138 7 digital_ok 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 27.875847 2.157899 62.363041 1.381950 19.141125 -0.155751 3.630366 0.562401 0.045186 0.517088 0.360022 1.279641 2.922053
140 13 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.822388 1.592682 -0.356444 0.340753 0.327082 -0.465887 0.298849 -0.094889 0.075596 0.075736 0.016398 1.268772 1.265235
141 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.222120 5.375566 -0.314140 48.077857 -0.536302 8.702706 0.007009 23.914632 0.060910 0.070781 0.018969 1.277696 1.278786
142 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 26.836743 29.599091 41.519158 76.151506 10.693955 16.766697 6.400506 4.409346 0.082472 0.035829 0.033719 1.323505 1.281034
143 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.463273 -0.595817 -0.621919 -0.805072 -0.948120 -0.918178 -0.706332 -0.804975 0.499700 0.502567 0.313965 1.390937 1.360696
144 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.543015 4.011750 5.970181 8.558582 2.647515 10.848958 6.635241 5.263626 0.512437 0.510861 0.324309 4.203084 4.407511
145 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 23.827862 26.744699 74.786846 76.593864 19.514943 16.789464 5.676320 6.211413 0.037904 0.040061 -0.000884 1.397446 1.391855
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 25.763326 30.127006 74.532066 77.973693 19.711120 17.022071 6.930935 7.557738 0.049203 0.049298 0.001509 1.283008 1.273730
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 22.855268 25.334070 73.273636 75.621372 19.603510 16.815111 6.555979 6.660151 0.049161 0.047476 0.001282 1.366990 1.418513
156 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.978981 0.859705 -0.720129 0.170030 -0.627788 0.265876 2.067603 6.528316 0.484091 0.476940 0.294006 3.815419 3.877564
157 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.378794 0.559545 4.440535 -0.507265 4.747301 0.037419 -1.105983 0.357289 0.485170 0.488325 0.295475 3.170287 3.159790
158 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.359805 -1.509722 -0.423575 -0.073489 0.953454 -0.989688 -0.089424 2.073474 0.486278 0.489642 0.299467 3.357582 3.199728
160 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 22.100803 23.892748 73.746718 75.780888 19.536701 16.759657 3.871658 4.415842 0.035512 0.035193 0.001424 1.198529 1.195482
161 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.799881 49.846850 3.356235 19.903392 2.738014 5.011952 0.702877 2.084913 0.042003 0.050082 0.003374 1.237551 1.233197
162 13 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.502855 -0.643903 0.050611 -0.546797 3.145217 -0.404764 -0.069452 0.389544 0.053258 0.047110 0.003647 1.232930 1.224083
163 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.154109 -0.331167 -0.444566 -0.889255 -1.258534 0.142957 0.070164 -0.024327 0.487669 0.486546 0.307949 1.622360 1.658286
164 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.152953 -0.657535 -0.651961 -0.088365 -1.023324 0.782676 0.301239 0.740381 0.489529 0.489426 0.304057 1.649427 1.736493
165 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.798713 0.130131 -0.556251 -0.494554 0.220221 -0.074649 2.403637 1.861007 0.488724 0.486679 0.294409 1.900560 2.234675
166 14 RF_maintenance 100.00% 29.57% 0.00% 0.00% 100.00% 0.00% 26.696761 3.450002 5.694398 1.398063 5.887556 9.062017 20.673839 9.274105 0.418013 0.472403 0.261730 4.452745 4.497775
167 15 digital_ok 100.00% 64.52% 94.62% 0.00% 100.00% 0.00% 18.811587 20.217467 6.623169 7.669581 29.476330 11.684551 30.351033 16.187944 0.386530 0.363096 0.188528 3.140817 3.073702
168 15 RF_maintenance 100.00% 5.38% 13.44% 0.00% 100.00% 0.00% 5.000803 7.414593 8.095516 11.672210 7.828146 11.162909 -1.715716 -2.390768 0.458966 0.442339 0.276256 3.965096 4.021093
169 15 digital_ok 100.00% 16.13% 18.82% 0.00% 100.00% 0.00% 7.036424 6.308116 11.323728 9.698603 12.085242 9.195254 -2.102027 -2.492329 0.438903 0.428389 0.277681 3.592396 3.470532
170 15 digital_ok 100.00% 24.19% 18.82% 0.00% 100.00% 0.00% 7.567490 4.748612 11.629333 8.314535 12.583027 8.289910 -1.655590 -1.724227 0.419816 0.427481 0.273856 2.841945 2.938776
176 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.153037 -0.996592 2.007446 -0.731144 0.679315 -0.511617 -1.246761 -0.722602 0.460735 0.462593 0.292621 1.388615 1.422929
177 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.146380 2.028456 -0.867855 2.577591 -1.346828 3.168090 0.123210 0.746372 0.470775 0.454194 0.299867 1.376508 1.430555
178 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.417927 -1.267034 2.976294 -0.894191 1.574120 -1.005690 0.117342 -0.902449 0.474606 0.471756 0.301878 1.352859 1.308706
179 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.176730 0.683161 1.566289 -0.553797 2.873492 -1.099960 2.231297 -0.841457 0.466705 0.467396 0.304374 1.328438 1.350681
180 13 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 95.488858 28.339983 16.407869 76.699457 13.705956 16.655670 63.313138 4.715644 0.077034 0.035173 0.033069 1.262927 1.226236
181 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 5.179070 1.935979 11.984699 2.753514 11.279663 2.396346 2.452081 1.907985 0.054874 0.052870 0.006001 1.270557 1.264523
182 13 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 4.105743 7.825575 8.064587 59.349510 8.410318 13.328716 -2.237820 63.865381 0.064040 0.061031 0.006081 1.230001 1.226155
183 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.799181 -0.096280 2.098762 3.672307 2.207743 1.377204 0.156626 4.380841 0.060408 0.049056 0.005007 1.225503 1.219511
184 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.384710 0.011272 -0.466463 0.048947 -1.168808 -0.217310 0.270115 -0.263626 0.485584 0.475086 0.310035 1.727364 1.893103
185 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.719152 -0.521249 -0.934748 -0.158508 -0.669667 0.399625 0.500606 -0.856380 0.483366 0.479009 0.307582 1.627521 1.713600
186 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.275219 -0.142046 -0.225677 -0.896871 -0.226915 -0.900449 0.885033 -0.729393 0.477159 0.471955 0.300718 1.661694 1.827880
187 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.185266 0.478339 -0.455797 0.932370 -0.894389 -0.137554 0.954507 3.829635 0.476308 0.474531 0.292647 1.248479 1.328222
189 15 digital_ok 0.00% 8.06% 13.44% 0.00% 13.16% 0.00% 1.093077 1.832630 0.260922 0.754042 -0.504696 -0.447317 -0.501522 3.220969 0.452544 0.444222 0.296132 1.467940 1.614942
190 15 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 53.488474 29.348718 10.004652 76.558039 17.977166 16.622066 32.218623 5.146134 0.324526 0.049784 0.231010 2.735066 1.655764
191 15 digital_ok 100.00% 24.19% 18.82% 0.00% 100.00% 0.00% 1.061128 -0.043195 3.397464 -0.750479 2.595398 -0.535152 -1.120238 12.080790 0.424097 0.423511 0.287392 2.730119 2.839066
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% 30.529308 29.701052 58.087547 58.915777 19.701449 16.739479 6.620250 4.785279 0.061864 0.058660 0.003627 0.000000 0.000000
321 2 not_connected 100.00% 86.02% 94.62% 0.00% 100.00% 0.00% 3.134839 3.009293 6.061533 6.236641 6.278592 6.366287 3.444394 2.479286 0.343961 0.321835 0.246423 0.000000 0.000000
323 2 not_connected 100.00% 100.00% 94.62% 0.00% 100.00% 0.00% 24.695817 6.522098 5.540740 10.819092 4.200167 11.036379 3.158256 -1.988378 0.248536 0.307192 0.210155 0.000000 0.000000
324 4 not_connected 100.00% 97.31% 100.00% 0.00% 100.00% 0.00% 8.027651 8.415307 12.781835 12.654880 13.482149 11.847155 -2.899731 -3.245423 0.313400 0.292283 0.223734 0.000000 0.000000
329 12 dish_maintenance 100.00% 86.02% 97.31% 0.00% 100.00% 0.00% 1.672625 4.603257 1.395487 8.266268 1.379866 7.786351 0.812029 -2.318136 0.348378 0.323076 0.246035 0.000000 0.000000
333 12 dish_maintenance 100.00% 86.02% 91.94% 0.00% 100.00% 0.00% 4.554075 2.679011 10.585860 4.578643 3.690722 4.248112 6.173979 -1.372718 0.337976 0.329540 0.234534 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, 18, 19, 27, 28, 30, 32, 33, 36, 37, 38, 45, 51, 52, 55, 56, 57, 65, 66, 67, 70, 71, 73, 81, 82, 83, 88, 89, 90, 91, 92, 93, 94, 98, 100, 105, 107, 110, 112, 116, 117, 119, 124, 125, 126, 127, 129, 130, 136, 137, 138, 140, 141, 142, 144, 145, 150, 155, 156, 157, 158, 160, 161, 162, 166, 167, 168, 169, 170, 180, 181, 182, 183, 189, 190, 191, 220, 221, 222, 320, 321, 323, 324, 329, 333]
In [17]:
# write to csv
outpath = os.path.join(nb_outdir, f'rtp_summary_table_{JD}.csv')
print(f'Now saving Table 1 to a csv at {outpath}')
df.to_csv(outpath)
Now saving Table 1 to a csv at /home/obs/src/H5C_Notebooks/_rtp_summary_/rtp_summary_table_2459769.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 [ ]: