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 = "2459765"
data_path = "/mnt/sn1/2459765"
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-4-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/2459765/zen.2459765.25319.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/2459765/zen.2459765.?????.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/2459765/zen.2459765.?????.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% 2.745063 0.682829 1.709504 2.070621 -0.331926 0.066573 -0.085589 3.996716 0.504407 0.503087 0.320838 3.517991 3.657835
4 1 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.436518 3.761763 0.176349 0.164020 -0.752945 0.091374 -0.851558 -1.145456 0.521358 0.508852 0.321086 4.480567 4.832791
5 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.177780 0.778545 0.326366 2.643292 -1.224715 3.086634 -0.245248 -1.854315 0.528099 0.513642 0.321945 2.124806 2.084350
7 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.286738 -0.561736 -0.134940 -0.183316 -1.004275 1.362037 0.383044 27.626857 0.525974 0.521501 0.325493 3.271993 4.035470
8 2 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.614660 5.308626 10.125889 11.295840 7.165266 7.532413 1.909368 -2.791388 0.503682 0.488659 0.307402 4.020884 4.187158
9 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.182565 -0.590886 -0.613756 -0.295388 0.787526 0.040877 -0.267355 1.260542 0.505734 0.496074 0.316143 1.372703 1.329147
10 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.474062 -0.666152 3.465365 -0.756373 1.769366 2.178316 -1.131263 1.970950 0.481849 0.478737 0.313792 1.524738 1.524479
15 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.002829 0.491526 0.929975 -0.470827 1.591411 -0.415886 0.361957 0.522288 0.534098 0.522035 0.317274 2.134611 2.252720
16 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.068520 -0.308427 -0.834697 0.673812 -1.094069 0.611020 2.162083 0.034582 0.546180 0.532680 0.319328 2.116563 2.059917
17 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.759687 -0.433307 0.050920 -0.041274 0.320923 -0.160133 1.209391 1.616115 0.536524 0.533867 0.314319 2.217451 2.444393
18 1 RF_maintenance 100.00% 0.00% 94.62% 0.00% 100.00% 0.00% 6.283384 17.395513 2.963915 13.846562 13.314979 8.611149 147.351102 117.637550 0.505764 0.307550 0.315397 3.194350 2.139964
19 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -1.783467 4.458861 1.023331 9.724296 -1.172516 6.763634 6.013337 -1.819937 0.536424 0.520126 0.314964 3.825571 4.221848
20 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.330742 2.129268 2.410678 0.711053 0.024171 -0.924791 0.758280 -1.100836 0.523406 0.501465 0.314118 1.448922 1.598627
21 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.183687 6.601962 0.676324 40.427798 1.108708 75.068608 4.058936 53.951910 0.510032 0.488643 0.316891 4.157621 3.902851
27 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 29.244441 34.449823 95.661221 97.460420 21.459909 16.809690 12.596281 10.469387 0.051070 0.053004 0.004844 1.250338 1.266847
28 1 RF_maintenance 100.00% 86.56% 100.00% 0.00% 100.00% 0.00% 11.260375 42.277433 14.103055 53.954386 18.003107 17.563054 -1.339538 108.834649 0.361855 0.191570 0.191896 14.810467 5.541449
29 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.921577 -0.504865 -0.442774 -1.012436 -0.827947 -1.196459 0.014587 0.018484 0.550103 0.549010 0.315526 2.134630 2.362125
30 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.374794 -0.257138 -0.250307 -0.979280 2.908639 -1.104118 9.675270 0.702555 0.546969 0.547542 0.310340 4.268862 4.718863
31 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.859531 0.320640 0.407394 0.488062 1.679631 2.086242 6.259406 4.833077 0.554394 0.544988 0.320566 3.098446 3.482091
32 2 RF_maintenance 100.00% 13.44% 0.00% 0.00% 100.00% 0.00% 38.151019 40.579468 7.514697 5.972799 5.527130 1.738654 3.470394 1.469308 0.440204 0.448901 0.167848 5.635770 4.358263
33 2 RF_maintenance 100.00% 0.00% 83.87% 0.00% 100.00% 0.00% 0.508322 7.048823 0.387047 -0.177023 0.952868 3.244227 2.693544 13.823446 0.526849 0.347360 0.372815 4.399459 2.305557
36 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 9.290009 10.458820 1.027904 7.622429 0.167253 4.732125 1.421891 5.330055 0.523801 0.502653 0.326170 2.744836 2.831696
37 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.247958 4.057787 6.779514 8.453620 6.594845 5.161610 2.805869 7.325488 0.532617 0.510282 0.320682 3.614844 3.884369
38 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.456667 5.457557 5.486460 9.855927 6.398785 5.390549 12.361275 -2.035463 0.538944 0.521772 0.324469 3.948745 3.752744
40 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.375785 1.148447 2.178821 1.799796 2.394598 -0.488682 0.512374 0.448775 0.544582 0.551388 0.320611 2.129303 2.424269
41 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.097326 -0.856684 0.442819 -1.018581 0.634519 -1.091180 -0.789745 -0.590016 0.550541 0.557835 0.321703 2.024793 2.125898
42 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.984522 0.367237 -0.278672 -0.451739 -0.789162 0.043340 -0.743362 -0.081142 0.562600 0.563488 0.325906 1.848865 1.898162
45 5 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 28.275511 32.733372 93.784608 96.743018 21.755274 17.131950 7.407925 9.233465 0.029826 0.038961 0.008392 1.257396 1.639217
46 5 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.649979 -0.767589 0.253917 -0.794639 -0.241503 -0.702788 -0.704243 0.002933 0.527569 0.518842 0.328182 1.424595 1.405214
50 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.135441 1.612007 3.948023 -0.772047 5.633714 1.562785 6.115471 2.346078 0.511469 0.501193 0.301813 2.350222 2.430566
51 3 digital_ok 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 0.942016 56.059342 -0.630338 117.076115 0.397380 16.399171 2.695371 22.742309 0.541769 0.046422 0.350309 3.233414 1.185963
52 3 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 9.821628 55.195264 0.155927 113.005311 2.933940 16.045815 9.925543 17.654481 0.520935 0.048034 0.327593 4.595736 1.209079
53 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.525066 2.026641 2.682811 1.628860 0.896315 0.631101 2.084913 8.204855 0.544374 0.550339 0.325210 4.823327 4.914299
54 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.517295 -0.435535 0.259873 -0.239344 0.000754 2.113649 0.034625 0.018820 0.532085 0.543927 0.307032 1.765093 2.131216
55 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 8.695113 8.500515 40.307620 14.724004 13.716274 10.839007 21.178493 -4.341600 0.534652 0.522512 0.311435 4.252997 4.607564
56 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -1.108375 0.358518 -0.644738 0.740735 -0.880418 1.779405 0.875720 5.877041 0.557690 0.560176 0.324522 4.323724 4.461400
57 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.267750 2.222922 8.969576 7.943094 13.391700 4.026181 4.679953 -2.092166 0.556865 0.543084 0.328406 4.001991 3.855383
65 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.059544 3.711075 6.074483 6.019112 3.535966 2.671779 -2.335487 -1.325293 0.505715 0.497085 0.309749 2.851553 2.905964
66 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.446889 2.609355 8.873828 3.157399 7.181864 0.860278 -3.148752 -0.101588 0.531297 0.527103 0.320849 2.958633 3.119459
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.463331 5.167880 6.529897 20.654088 4.067436 10.032028 3.292363 12.126031 0.554446 0.552746 0.327573 3.624645 3.965555
68 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 2.163885 1.029385 3.582629 2.728120 2.780907 -0.236281 -1.562207 0.390190 0.539026 0.553829 0.326845 1.570516 1.651678
69 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.138495 -0.398189 0.424328 -0.870983 -0.160392 3.155708 -0.298281 3.121349 0.540225 0.550389 0.321289 1.741890 1.790134
70 4 RF_maintenance 100.00% 2.69% 2.69% 97.31% 100.00% 0.00% 6.635225 11.670326 6.324779 24.384291 7.377028 15.615933 -0.399373 7.292962 0.219906 0.225922 -0.281481 2.289567 2.295932
71 4 digital_ok 100.00% 0.00% 0.00% 100.00% 100.00% 0.00% 2.140241 2.055105 4.598169 5.751570 6.298372 1.826666 2.627556 -0.474017 0.225958 0.218439 -0.284333 3.029072 2.926497
72 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.330138 -1.025896 1.663514 0.030329 2.763496 0.248118 5.099174 -0.757520 0.549930 0.551011 0.323599 4.303294 4.220869
73 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.524176 1.372738 2.481521 5.046306 1.302770 1.581942 2.156375 2.969486 0.553434 0.541045 0.328199 3.808330 3.583739
81 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.404351 1.144175 9.741863 -0.715742 6.903328 -0.387743 3.704040 -0.095066 0.500136 0.495235 0.307751 2.803291 2.798362
82 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.009816 1.552793 2.983660 1.119480 1.566043 -0.983669 -1.556601 0.081806 0.523100 0.526691 0.320740 2.732813 2.998690
83 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.833970 9.438578 9.178413 16.593372 13.281787 11.343274 -2.559359 -4.060516 0.529578 0.504197 0.324684 2.889637 3.006806
88 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 31.420726 34.144743 85.674656 87.952456 21.341790 16.827620 17.715108 11.097384 0.039735 0.041539 -0.000696 1.197288 1.199325
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% 2.905112 0.626198 7.320129 -0.800850 1.411687 -0.092899 9.583962 3.751655 0.546852 0.540290 0.332188 5.178925 5.526292
91 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 28.786685 32.621917 85.575136 89.287014 21.499646 16.807974 13.217562 12.196718 0.037715 0.040751 0.001850 1.326221 1.679832
92 10 digital_ok 100.00% 97.31% 100.00% 0.00% 100.00% 0.00% 12.606316 18.678253 7.554560 1.104074 15.124143 7.180606 -1.441428 18.054526 0.325875 0.332911 0.139486 5.594353 9.598369
93 10 RF_maintenance 100.00% 89.25% 100.00% 0.00% 100.00% 0.00% 12.402840 36.415945 1.345707 99.140398 11.745163 16.831904 4.667493 14.995154 0.333532 0.053328 0.202591 3.607722 1.393091
94 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.053725 2.290989 1.129004 9.230432 0.667575 9.135524 3.371404 19.947941 0.490890 0.487932 0.322251 2.846153 3.086787
98 7 digital_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
99 7 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
100 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 8.863337 6.773722 15.374079 12.847597 13.430902 8.876673 -4.369774 -4.146243 0.504075 0.507812 0.315162 2.826871 3.185830
105 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 32.129809 40.897575 81.867104 85.491910 21.295343 16.962024 9.069499 8.569495 0.038407 0.042013 0.004898 1.398963 1.683736
106 9 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.682503 2.757678 5.852581 3.334132 6.542561 3.271191 1.784178 1.380417 0.540815 0.535553 0.339166 3.897275 3.686666
107 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 29.443593 30.376204 82.267352 84.747455 21.227231 16.782523 7.002300 8.298022 0.043056 0.041910 0.003743 1.324050 1.305991
108 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.660637 3.674456 1.243122 1.035978 -0.134609 -0.022051 -0.002933 -1.441040 0.540303 0.535859 0.332095 1.161161 1.142548
109 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.085897 -0.863305 -0.012158 0.012158 -0.892704 -0.670516 -0.370126 -0.849453 0.530765 0.525368 0.325101 1.175307 1.124477
110 10 RF_maintenance 100.00% 37.63% 0.00% 0.00% 100.00% 0.00% 38.478554 9.739332 4.033541 16.625946 52.888796 11.411075 40.711400 -2.925561 0.446293 0.481324 0.284158 4.041680 4.013672
111 10 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.063692 1.133624 -0.970131 -0.720379 -1.244242 1.647359 -0.363568 4.945845 0.499553 0.494627 0.316449 2.999194 3.380181
112 10 RF_maintenance 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% -0.617921 0.440858 0.493979 -0.766411 1.792097 3.474073 0.210566 -0.458255 0.180631 0.184198 -0.281516 1.891997 1.915984
116 7 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
117 7 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
118 7 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
119 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.087257 3.371623 8.347610 5.904005 5.420255 2.687729 -3.050448 -2.516794 0.512921 0.514734 0.329494 3.551310 3.751656
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% 29.492094 32.711945 86.481896 89.578949 21.112994 17.067517 6.898817 12.669816 0.029267 0.032112 0.002422 1.327973 1.334154
126 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 29.919474 33.546322 85.703477 90.157416 21.305499 16.805290 9.983760 12.868921 0.032780 0.031924 -0.000694 1.318922 1.321986
127 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.453346 0.623009 3.723497 2.665809 0.629319 2.695504 1.425604 2.524488 0.537505 0.536510 0.328732 4.786634 5.190500
128 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.916981 3.406685 -0.775821 -0.248835 -0.437989 0.155131 0.160714 -0.616787 0.524802 0.512322 0.317715 1.206872 1.218256
129 10 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.178736 -0.671466 12.216355 1.493574 7.923817 0.120857 2.651317 0.788730 0.514137 0.511203 0.320205 3.456293 3.950254
130 10 digital_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 27.702796 10.851201 95.329043 11.792572 21.204528 10.070643 7.426088 -1.187728 0.049103 0.308168 0.168929 1.332559 3.652043
135 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.803256 -0.276853 -0.779510 -0.499185 -0.311968 -0.945561 -0.021576 -0.478822 0.469147 0.468799 0.301942 0.599797 0.585549
136 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.154947 13.762540 -0.866168 1.837220 -0.011926 1.484672 1.786566 4.086788 0.497316 0.483973 0.310150 4.150450 4.451394
137 7 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
138 7 digital_ok 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 33.757405 3.169823 80.196393 2.270826 21.272469 1.160136 6.350582 0.903619 0.042771 0.514906 0.351334 1.313631 3.360358
140 13 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 2.136536 2.345804 0.031204 0.719909 0.769741 0.421234 1.203101 0.502335 0.082241 0.077404 0.017212 1.397980 1.400078
141 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.100370 4.794323 -0.193243 62.105947 1.001818 4.245360 1.091872 38.422665 0.059621 0.072968 0.019714 1.316478 1.320968
142 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 33.294260 36.023412 54.305469 97.929156 18.387412 16.713662 9.869359 7.975524 0.087563 0.036641 0.035132 1.438525 1.384840
143 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.839134 -0.057579 -0.614563 -0.876378 0.233834 -0.892503 -0.585325 -0.720143 0.521875 0.524732 0.323623 1.153207 1.088569
144 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.970545 6.593454 13.422868 18.271850 14.783330 4.623266 3.874459 4.137944 0.534875 0.534605 0.335806 7.330680 8.656943
145 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 28.606004 32.632659 96.187230 98.521018 21.430696 17.063999 9.941216 11.169110 0.038350 0.039202 -0.000966 1.478093 1.422479
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 31.707924 37.094997 95.836009 100.247519 21.503843 17.150173 12.204853 13.710481 0.048850 0.048630 0.001817 1.172570 1.167470
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 27.775498 30.872177 94.262694 97.254005 21.559466 17.035356 11.809240 12.829377 0.048985 0.048817 0.000332 1.519109 1.613078
156 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.419422 1.020138 -0.928904 0.623674 1.138008 1.277118 6.099660 24.348763 0.491115 0.480544 0.307913 8.148298 7.822566
157 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.907616 0.491941 5.960562 -0.568866 4.359778 0.546697 -1.444329 1.725848 0.491411 0.494888 0.307147 3.415444 4.238071
158 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.476433 -1.526633 -0.359762 0.488780 1.401423 -0.000754 -0.117437 0.261898 0.495312 0.497417 0.313499 3.369533 3.830864
160 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 26.600254 28.663359 94.843058 97.424544 21.355570 16.779989 6.872349 7.990140 0.036650 0.035786 0.001668 1.220278 1.216128
161 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 2.504241 61.021368 5.179982 26.016610 5.272939 4.490493 2.100928 4.257317 0.042847 0.057125 0.004151 1.230254 1.232893
162 13 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.701809 -0.493925 0.318837 -1.006657 2.280278 -0.753275 1.106514 -0.080285 0.057338 0.052460 0.004259 1.274312 1.257206
163 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.387176 0.279912 -0.187356 -0.901741 -1.130092 0.103936 0.812326 1.582390 0.507691 0.507597 0.319004 1.899955 2.009898
164 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.993633 -1.248464 -0.787920 -1.028071 -0.822596 0.153716 0.986747 0.840057 0.511884 0.511324 0.315187 1.851666 1.974844
165 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.590774 -0.002829 -0.820647 -0.495629 0.043954 -0.572214 0.949455 -0.636438 0.511711 0.513386 0.307401 2.051098 2.418216
166 14 RF_maintenance 100.00% 53.76% 13.44% 0.00% 100.00% 0.00% 36.854189 30.967176 8.741691 7.025822 7.021751 12.676551 13.066171 10.652066 0.421862 0.441761 0.187097 2.627945 2.712678
167 15 digital_ok 100.00% 72.58% 81.18% 0.00% 100.00% 0.00% 19.857246 24.516452 9.149606 9.924685 14.200864 11.104387 7.616438 12.445524 0.390363 0.369782 0.127922 2.982263 2.327165
168 15 RF_maintenance 100.00% 0.00% 10.75% 0.00% 100.00% 0.00% 5.971819 9.091542 10.701216 15.507298 8.943461 11.002103 -3.420198 -4.431008 0.489411 0.471829 0.292563 3.660267 3.832123
169 15 digital_ok 100.00% 8.06% 13.44% 0.00% 100.00% 0.00% 8.844803 7.765688 14.989931 12.925431 12.730309 8.826856 -4.452658 -3.704841 0.468884 0.457762 0.297793 2.230874 2.101420
170 15 digital_ok 100.00% 16.13% 13.44% 0.00% 100.00% 0.00% 9.223438 5.962984 15.319749 11.201675 13.844572 7.544866 -4.090824 -3.115506 0.450587 0.455839 0.292293 0.000000 0.000000
176 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.624176 -0.650178 2.562443 -0.675169 0.648456 -0.181595 -1.678579 -0.644738 0.469607 0.471534 0.304109 0.502287 0.495262
177 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.515800 3.609573 -0.825843 5.302025 -0.669404 7.041119 0.887143 3.335754 0.482093 0.462734 0.311580 4.306604 4.474550
178 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.119489 -0.782158 4.431046 -0.956163 2.708941 -1.466655 1.003950 -0.566704 0.488299 0.485173 0.315204 3.351379 3.718792
179 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.173842 1.322186 2.342350 -0.460742 5.511127 -1.623273 6.929514 -0.379946 0.478864 0.481318 0.316546 3.074538 3.411356
180 13 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 101.657811 34.302072 18.296970 98.614021 98.495925 16.735570 265.885372 8.960647 0.074760 0.035518 0.037000 1.265806 1.236624
181 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 6.375270 2.395651 16.218837 3.849290 9.928111 2.096809 4.934551 4.048053 0.050640 0.056652 0.007429 1.249582 1.250422
182 13 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 4.715030 5.501293 10.635279 51.087733 8.625248 298.972557 -3.555639 151.211041 0.066652 0.050718 0.006070 1.227504 1.235071
183 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.445077 0.340317 3.189056 5.067102 1.142372 2.120561 0.828766 11.068344 0.066340 0.048702 0.005014 1.234500 1.233298
184 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.688916 0.082828 -0.325030 0.295183 -1.029481 0.181654 2.176488 0.930858 0.509076 0.497388 0.324714 1.877148 2.160163
185 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.738021 -0.384103 0.058650 -0.050223 -0.253118 -0.136562 -1.065089 -1.120342 0.507137 0.504501 0.315886 1.876903 1.997568
186 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.071179 0.116181 -0.042237 -0.955906 1.460724 -1.471401 3.581431 -0.480401 0.501703 0.497163 0.315198 1.983982 2.310761
187 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.587123 3.907745 -0.205191 7.413163 -1.004576 6.872575 3.327906 184.206106 0.500908 0.504785 0.306760 2.891556 2.811708
189 15 digital_ok 0.00% 0.00% 10.75% 0.00% 100.00% 0.00% 1.540656 2.757562 0.379409 1.881830 -0.678466 0.740215 -0.012967 -0.611942 0.482773 0.471885 0.313446 0.000000 0.000000
190 15 digital_ok 100.00% 83.87% 86.56% 0.00% 100.00% 0.00% 55.140329 86.482438 12.472231 21.823132 6.028529 6.835644 6.810252 15.054063 0.346290 0.334713 0.154630 2.247154 2.063831
191 15 digital_ok 100.00% 16.13% 13.44% 0.00% 100.00% 0.00% 1.588233 0.157662 4.605848 -0.783886 1.073731 0.081613 -1.545675 25.664247 0.453499 0.450251 0.307091 2.477580 2.460029
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% 36.931967 36.114250 74.748193 75.754169 21.416328 16.679905 12.053166 8.591575 0.062777 0.059546 0.004260 0.000000 0.000000
321 2 not_connected 100.00% 78.49% 81.18% 0.00% 100.00% 0.00% 3.840208 3.637332 7.811298 8.158343 6.939786 6.318001 6.830496 4.746415 0.364404 0.342381 0.266427 0.000000 0.000000
323 2 not_connected 100.00% 94.62% 81.18% 0.00% 100.00% 0.00% 31.917353 7.961865 7.516676 14.377130 4.834188 9.486768 5.521978 -3.274695 0.259622 0.329857 0.227569 0.000000 0.000000
324 4 not_connected 100.00% 81.18% 86.56% 0.00% 100.00% 0.00% 9.854822 10.352483 16.776305 17.046785 14.015738 11.606692 -5.151066 -5.423205 0.331435 0.307482 0.242558 0.000000 0.000000
329 12 dish_maintenance 100.00% 78.49% 81.18% 0.00% 100.00% 0.00% 3.673213 5.706879 1.648872 11.043337 5.203752 6.012728 2.405532 -3.795388 0.365268 0.338994 0.263125 0.000000 0.000000
333 12 dish_maintenance 100.00% 78.49% 81.18% 0.00% 100.00% 0.00% 6.504800 3.387259 14.881576 6.048693 5.423979 3.561114 12.218023 -1.474555 0.356296 0.349259 0.253096 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, 21, 27, 28, 30, 31, 32, 33, 36, 37, 38, 45, 50, 51, 52, 53, 55, 56, 57, 65, 66, 67, 70, 71, 72, 73, 81, 82, 83, 88, 89, 90, 91, 92, 93, 94, 98, 99, 100, 105, 106, 107, 110, 111, 112, 116, 117, 118, 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, 177, 178, 179, 180, 181, 182, 183, 187, 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_2459765.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 [ ]: