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 = "2459768"
data_path = "/mnt/sn1/2459768"
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-7-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/2459768/zen.2459768.25303.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/2459768/zen.2459768.?????.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/2459768/zen.2459768.?????.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.766062 0.250619 1.184163 1.311554 0.185118 0.962138 -0.028558 1.518059 0.486939 0.486422 0.310805 3.115039 3.157996
4 1 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.332695 3.163684 -0.107156 0.000451 -1.176729 -0.387030 -0.744497 -1.024498 0.504062 0.493530 0.311938 3.528829 3.619969
5 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.025500 0.670470 0.172161 2.414763 -0.640290 1.600258 -0.363436 -1.982078 0.511501 0.498115 0.313265 1.640021 1.572679
7 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.480820 -0.780674 -0.328393 -0.320708 -0.677100 -0.360806 -0.033499 21.004188 0.504724 0.504228 0.316160 2.733475 3.005467
8 2 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.588130 4.718188 8.253814 9.318088 7.264392 7.298124 4.421422 -2.805148 0.480763 0.471208 0.299021 2.919257 3.033359
9 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.529857 -0.896343 -0.481746 -0.378353 -0.570098 -0.502312 -0.340854 2.212519 0.478712 0.476328 0.304475 1.434656 1.451100
10 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.604897 -0.670471 2.140902 -0.774501 2.770388 1.780513 -0.042113 0.911164 0.458321 0.459307 0.299897 1.546949 1.571662
15 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.128977 0.507307 0.741443 -0.600351 0.954073 0.420404 0.931864 1.187275 0.519775 0.507296 0.311308 1.681055 1.683785
16 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.815729 -0.179000 -0.931845 0.811999 0.064777 -0.297867 6.013157 2.217397 0.529262 0.518062 0.310367 4.003060 4.040500
17 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.639347 0.246778 -0.523417 0.052750 0.161451 0.795702 1.864773 0.473703 0.523139 0.522164 0.309368 1.744122 1.957904
18 1 RF_maintenance 100.00% 2.69% 100.00% 0.00% 100.00% 0.00% 10.095617 19.165087 8.877946 16.124710 5.115195 9.457981 87.591694 136.832204 0.434388 0.290834 0.262960 2.351938 1.858170
19 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.584906 3.117469 -0.378040 7.088674 -0.927230 2.174900 9.273679 -2.127917 0.517048 0.504721 0.308571 2.605317 2.727742
20 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.561142 1.500473 1.953766 0.184343 2.242504 0.701447 0.385346 -1.099998 0.498654 0.484125 0.301336 1.612745 1.683347
21 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.926978 -0.636321 0.609727 0.966152 1.569371 0.299402 2.232698 0.739244 0.482382 0.479992 0.302033 1.487250 1.539392
27 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 25.142675 29.732494 82.582762 83.998437 19.312853 15.925273 14.098881 11.608724 0.053877 0.058743 0.004952 1.229029 1.240346
28 1 RF_maintenance 100.00% 94.62% 100.00% 0.00% 100.00% 0.00% 9.167740 38.140842 11.517687 48.688981 15.742750 14.265167 -2.897748 69.887672 0.355001 0.184747 0.197104 7.891621 3.657655
29 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.839583 -0.549866 -0.636558 -0.885577 -0.624229 -1.061446 -0.402074 0.184420 0.535451 0.536564 0.305617 1.792269 1.915783
30 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.238781 -0.563762 -0.000451 -0.910148 0.471571 0.444129 0.193776 -0.024344 0.526577 0.533853 0.302701 1.586432 1.658915
31 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.758733 0.474677 0.306414 1.673751 -0.256858 0.029188 6.653193 3.719584 0.534188 0.529636 0.309276 2.839525 2.868888
32 2 RF_maintenance 100.00% 45.70% 0.00% 0.00% 100.00% 0.00% 29.816097 33.786151 5.838589 4.765097 1.122481 0.871919 3.886001 1.336226 0.419065 0.432924 0.157407 4.386267 3.742508
33 2 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
36 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.742910 8.773959 0.754903 5.775503 0.134114 2.987594 0.714738 3.321535 0.514099 0.494086 0.319250 2.749363 2.874357
37 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.996811 3.507453 5.153151 6.976451 4.509045 5.066846 1.898044 7.771115 0.524378 0.501504 0.313397 2.471285 2.649572
38 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.270955 4.628285 4.573961 7.904782 4.604330 5.574388 13.144030 -2.249613 0.531035 0.513728 0.318858 2.653850 2.541012
40 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.034081 0.903719 1.806225 1.503867 1.089784 0.784807 0.655471 0.346784 0.539349 0.545441 0.316752 1.736956 2.021540
41 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.300773 -0.678511 0.772112 -0.234998 0.001294 -0.672020 -0.976689 -0.969243 0.542345 0.549309 0.314237 1.692961 1.874718
42 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.938103 0.207281 0.028782 -0.503632 -1.106005 -0.649216 -0.759508 -0.368955 0.551105 0.553649 0.316445 1.728858 1.774035
45 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.578794 0.303257 16.575076 2.410214 11.407577 2.648703 4.812541 3.496629 0.524463 0.510084 0.316562 3.045340 3.174672
46 5 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.667737 -0.731128 0.363327 -0.739187 -0.002218 -0.486148 -0.661023 0.346850 0.503214 0.503575 0.315673 1.437102 1.427026
50 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.797475 0.961241 3.393455 -0.749116 2.762871 -0.123380 3.659506 0.654574 0.507580 0.496573 0.297653 1.259364 1.302484
51 3 digital_ok 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 0.760781 48.911902 -0.766604 100.830513 -1.248969 15.700298 1.042516 24.161898 0.535915 0.051983 0.371663 2.479762 1.190393
52 3 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 8.233398 52.239194 1.116964 101.618912 1.818287 15.497994 7.266646 21.009305 0.512936 0.051859 0.349438 3.326720 1.218524
53 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.132379 1.448774 2.476459 1.511323 1.209373 0.685308 1.979906 8.623341 0.537177 0.545536 0.320248 3.219626 3.457931
54 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.334610 -0.269912 0.491758 -0.304991 -0.486235 1.418199 0.539066 0.199759 0.519361 0.537203 0.298945 1.684723 1.926628
55 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.946383 7.172590 34.807143 11.960375 9.296047 10.155334 12.201971 -4.378187 0.530470 0.519450 0.302042 3.066896 3.239906
56 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.045165 0.458816 -0.440375 0.919982 -0.838339 0.249484 -0.653337 2.520033 0.548174 0.554546 0.315279 1.635353 1.755912
57 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.201730 1.906996 13.704636 6.185641 7.677907 4.905830 4.253565 -1.214392 0.544460 0.534304 0.316218 2.999488 2.997054
65 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.298439 3.108924 4.828752 5.002566 3.689974 3.099445 -2.483603 -1.077697 0.507973 0.498259 0.302131 2.994154 2.825586
66 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.101349 2.055056 7.664977 2.593965 6.806067 3.423251 -2.789202 1.094751 0.530082 0.529356 0.313923 2.802050 2.725333
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.272357 4.703216 5.425830 17.022668 4.030892 8.162136 3.510508 10.008305 0.550936 0.554210 0.323931 2.851997 3.103231
68 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.530911 0.469927 2.937849 2.081913 3.327580 -0.363815 -1.859096 0.280997 0.531405 0.551619 0.326345 1.451016 1.530374
69 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.993385 -0.710383 0.228375 -0.918276 0.095875 3.192741 -0.493062 0.203456 0.535383 0.548248 0.319230 1.626509 1.686023
70 4 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.481897 6.543316 -0.087313 12.044845 0.955191 9.899852 0.399281 -4.219695 0.546352 0.522756 0.327181 14.479675 9.853409
71 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.094412 5.673222 -0.754378 10.412491 0.043437 7.977224 0.386793 -3.689281 0.530581 0.524172 0.308609 12.202445 15.559974
72 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.890528 -1.093733 1.191127 -0.068869 1.578740 -0.179850 3.584007 -0.914561 0.541780 0.545009 0.318987 3.623739 3.316763
73 5 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.318586 0.898424 1.398194 3.633829 1.365573 1.113115 1.979813 1.172096 0.539159 0.533402 0.320065 2.904423 2.813101
81 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.761992 0.488065 7.396738 -0.382731 5.994226 -0.566938 2.950832 -0.593536 0.512037 0.505761 0.296640 3.042576 2.738477
82 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.435694 0.971784 2.258873 0.514684 1.970997 -0.407178 -1.584800 -0.061896 0.530683 0.535413 0.307623 3.301379 2.855923
83 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.826519 8.061565 1.188915 13.622728 5.818009 11.234308 -0.591476 -4.182260 0.538536 0.510321 0.319331 2.611687 2.537066
88 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 29.515950 31.493144 73.838766 75.834443 19.832141 16.305973 19.440693 11.376924 0.044723 0.045489 -0.000509 1.206978 1.205177
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.029441 1.051820 5.169294 -0.620657 2.733126 -0.472810 5.591569 2.232929 0.529283 0.527263 0.320806 4.417781 4.327292
91 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 24.588921 27.777589 73.832998 76.880824 18.999009 15.698420 13.624827 12.333735 0.041527 0.044208 0.000735 1.298794 1.633923
92 10 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 10.376573 14.565911 6.184889 0.820153 13.316206 5.845562 -1.837233 15.392149 0.313020 0.324568 0.137309 5.445089 9.570416
93 10 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 9.494910 31.304203 1.044064 85.369897 9.261146 15.961770 2.687017 15.429516 0.317382 0.058603 0.206408 4.011822 1.332604
94 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.631617 2.946342 1.122625 8.633970 -0.833423 6.546012 4.065911 5.981817 0.467652 0.468026 0.307241 3.172500 3.209444
98 7 digital_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.071008 7.337001 10.755989 1.383835 10.749287 1.168578 -3.523960 3.107836 0.482556 0.501079 0.292140 2.932175 3.018177
99 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 3.556800 0.138617 3.240750 0.653839 3.631037 1.465325 -0.817545 -1.213658 0.515737 0.527048 0.299327 1.252308 1.242473
100 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.571851 5.835339 12.764271 10.593021 11.856532 8.408739 -4.256872 -4.166155 0.509262 0.518927 0.302461 2.750362 2.841671
105 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 27.798166 35.470621 70.606377 73.585156 18.823483 15.573358 9.423242 9.411400 0.040157 0.044993 0.005598 1.302813 1.469933
106 9 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.809979 2.450442 5.514122 3.228426 2.941407 1.720905 2.265758 1.602570 0.526660 0.524422 0.328017 3.554422 3.397202
107 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 24.781994 25.569323 74.004169 76.001263 18.894938 15.632118 7.716591 9.253786 0.044955 0.047126 0.004395 1.312084 1.301286
108 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.321358 2.780099 0.965287 0.872756 -0.633313 0.171699 -0.118814 -1.469175 0.519246 0.518149 0.319397 1.223143 1.221197
109 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.332401 -0.712223 -0.010643 0.224581 -1.102577 -0.537528 0.078865 -0.819131 0.506894 0.506850 0.314438 1.222958 1.284221
110 10 RF_maintenance 100.00% 53.76% 0.00% 0.00% 100.00% 0.00% 44.600140 7.862076 7.824468 12.995369 0.827519 10.342918 1.822471 -4.425064 0.410640 0.463013 0.262532 4.046147 3.896567
111 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.197096 0.732614 -0.823609 -0.409717 -1.237247 1.983374 -0.694185 1.393930 0.474301 0.472142 0.301429 1.356428 1.364165
112 10 RF_maintenance 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% -0.853195 -0.069859 0.026020 -0.821176 0.558780 1.887308 0.407178 -0.052614 0.172141 0.176576 -0.282196 2.191100 1.937376
116 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.944081 7.104918 5.596075 12.095353 7.386311 9.371580 -2.432546 -3.237807 0.482525 0.463062 0.284507 3.816176 3.750290
117 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.983904 6.476786 12.977948 10.921546 12.718322 8.954015 -4.675239 -4.413766 0.489793 0.498876 0.289750 3.398618 3.481603
118 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.059928 5.531814 11.837305 9.632527 11.811262 7.780067 -4.035068 -4.037021 0.502181 0.507668 0.301212 3.376799 3.309867
119 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.502682 2.945873 7.025365 4.774386 5.786115 3.121118 -2.994188 -2.547629 0.512876 0.519683 0.318424 2.908321 2.956993
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.936670 27.579920 74.572759 77.148668 18.962072 15.738943 7.543759 12.908083 0.030895 0.036611 0.003687 1.341394 1.344425
126 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 25.885065 29.015892 73.938712 77.615587 19.042678 15.868471 10.389981 14.085105 0.035523 0.036480 -0.000872 1.275074 1.271076
127 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.334582 1.014391 2.678641 2.133149 1.776702 2.489450 1.252300 1.790477 0.514239 0.516069 0.317922 4.019303 4.223868
128 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.683205 1.942131 -0.500532 -0.149002 -0.825545 -0.145837 -0.023090 0.265686 0.500540 0.491283 0.305756 1.277357 1.318785
129 10 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.853205 0.010505 10.664609 1.314551 7.272849 0.043883 2.948829 0.905565 0.491223 0.490469 0.307740 4.165347 4.281710
130 10 digital_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 24.359074 9.091154 82.325763 9.626688 19.110131 10.350880 8.264498 0.403813 0.054749 0.297707 0.179195 1.318581 3.924653
135 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.861995 -0.233910 -0.463427 -0.165173 -0.980229 -0.574826 0.023090 -0.374830 0.472318 0.475386 0.284817 1.226903 1.245282
136 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.707297 10.517696 -0.752711 0.924299 -0.349999 0.642998 0.209663 4.944455 0.504348 0.494048 0.291777 4.092952 4.720723
137 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 15.016710 32.282850 33.577574 48.750419 13.925663 15.836910 10.785044 11.162352 0.269288 0.064178 0.179925 2.059888 1.320728
138 7 digital_ok 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 29.041765 2.472159 69.224004 1.560816 18.833120 0.025451 7.079883 0.520574 0.049982 0.522161 0.379726 1.253178 2.838121
140 13 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 2.011820 1.752171 -0.139529 0.576023 0.063624 -0.001294 0.435201 0.166741 0.055775 0.042622 0.002646 1.305888 1.304936
141 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.815208 3.401053 0.346065 51.297366 -0.383128 9.586176 0.068755 52.154403 0.051700 0.042398 0.002580 1.334710 1.330406
142 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 27.793931 30.990187 45.230489 84.380886 8.901622 15.890979 9.908857 8.745211 0.064757 0.035291 0.020338 1.354633 1.305934
143 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.702985 -0.427673 -0.082466 -0.858117 -0.312575 -0.509845 -0.941776 -0.582088 0.506866 0.508902 0.316818 1.255128 1.247902
144 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.848193 2.964245 9.495707 7.336529 5.254605 6.006940 3.431859 2.598564 0.519163 0.518322 0.328712 5.427158 6.032219
145 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 23.943357 28.011569 83.026934 84.980905 19.247395 16.153852 11.045449 11.594075 0.041180 0.044692 0.000136 1.457713 1.423014
150 15 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
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 23.912693 26.590929 81.444116 83.870950 19.356260 16.018159 12.837283 13.086237 0.053205 0.049784 0.001945 1.374649 1.438618
156 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.863106 0.778140 -0.716037 -0.094145 0.184845 -0.021131 11.936342 19.046437 0.493318 0.481872 0.299747 4.786294 4.640373
157 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.450621 0.482968 4.803925 -0.569094 4.761674 -0.530862 -1.994426 0.192993 0.493111 0.493780 0.300310 3.454000 3.514955
158 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.038022 -1.384759 -0.721039 0.634987 0.162306 -0.616074 0.840837 -0.165918 0.494603 0.494365 0.305106 3.365707 3.254973
160 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 22.857232 24.698306 81.881953 83.993791 19.264129 15.977689 7.457368 8.824603 0.035481 0.034675 0.002343 1.211400 1.207067
161 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
162 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
163 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.454258 -0.077550 -0.217378 -0.464242 -0.971936 -0.184179 0.735315 -0.091103 0.494661 0.492027 0.311936 1.585560 1.587429
164 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.128624 -0.817215 -0.502352 -0.426217 -0.711246 0.391099 -0.676102 0.755575 0.496615 0.494861 0.308727 1.522526 1.565557
165 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.822818 -0.321305 -0.898707 -0.268608 -0.599222 -0.474368 0.700586 -0.516020 0.493653 0.492618 0.298416 1.685791 1.817000
166 14 RF_maintenance 100.00% 59.14% 13.44% 0.00% 100.00% 0.00% 29.893241 24.114934 7.235388 5.421680 4.006438 4.382616 8.440166 5.893535 0.406599 0.431809 0.191327 2.563569 2.851565
167 15 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
168 15 RF_maintenance 100.00% 2.69% 13.44% 0.00% 100.00% 0.00% 5.017831 7.802830 8.982859 12.808668 7.970962 10.437947 -3.665326 -4.810854 0.460621 0.445841 0.284429 4.597659 4.324922
169 15 digital_ok 100.00% 13.44% 16.13% 0.00% 100.00% 0.00% 7.218427 6.585349 12.251614 10.692855 11.816129 8.671614 -4.061328 -3.427091 0.446484 0.435982 0.281256 4.768235 4.081840
170 15 digital_ok 100.00% 21.51% 18.82% 0.00% 100.00% 0.00% 7.915520 5.169614 12.659009 9.288241 12.478762 7.323153 -2.735114 -2.468199 0.425383 0.434233 0.278694 3.326200 3.410191
176 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.405337 -0.790560 2.432183 -0.842417 1.331663 -0.487534 -1.964862 -0.656254 0.468508 0.469100 0.296123 1.355479 1.404678
177 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.520289 1.992326 -0.771370 2.882416 -1.075936 3.561574 -0.219254 1.245926 0.478402 0.460520 0.303812 1.345804 1.451431
178 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.125839 -0.909132 3.504150 -0.862636 2.095865 -0.976607 0.676567 -0.893425 0.482715 0.477619 0.306911 1.325753 1.325466
179 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.025500 0.880702 1.379503 -0.700548 3.117118 -1.191858 0.659551 -0.833579 0.474091 0.472284 0.307759 1.332591 1.353404
180 13 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 95.593404 29.642451 16.873234 84.933932 35.057044 15.800688 314.272452 9.611923 0.049568 0.034649 0.020755 1.250278 1.216095
181 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 5.630944 1.671368 12.749160 2.963706 10.941028 1.866322 4.150202 4.075603 0.040139 0.050449 0.008838 1.251940 1.246222
182 13 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
183 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.594576 -0.007497 2.043477 4.162042 1.777778 1.625324 0.533670 13.903187 0.066688 0.055797 0.010607 1.222010 1.221177
184 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.349410 -0.153692 -0.616968 -0.061987 -0.816894 -0.369886 -0.160970 -0.405494 0.491715 0.479708 0.315386 1.483536 1.678671
185 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.217136 5.761543 0.332415 -0.225384 0.307357 0.031055 -0.364655 -0.501931 0.488924 0.481118 0.305383 4.485709 5.621074
186 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.448648 -0.095619 0.377313 -0.695142 0.248193 -0.672188 2.695369 -0.716126 0.480789 0.477325 0.303702 1.533115 1.676668
187 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.177917 0.888270 -0.615279 1.468772 -0.368382 -0.044799 2.374957 6.280147 0.480790 0.480181 0.297419 3.821773 4.127028
189 15 digital_ok 0.00% 2.69% 13.44% 0.00% 13.16% 0.00% 1.185432 2.477087 0.326399 1.838549 -0.676793 -0.129685 -0.672880 3.022711 0.459462 0.450450 0.301597 1.240343 1.138835
190 15 digital_ok 100.00% 91.94% 89.25% 0.00% 100.00% 0.00% 45.481475 38.402336 9.004867 10.955100 6.742043 4.217257 16.233193 6.373005 0.346975 0.360821 0.176380 3.325544 3.313413
191 15 digital_ok 100.00% 21.51% 18.82% 0.00% 100.00% 0.00% 1.289759 -0.034521 3.926674 -0.860892 2.404366 -0.545255 -1.964469 12.569944 0.430122 0.429830 0.291868 3.355204 3.472447
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% 31.928478 31.310629 64.761879 65.488529 19.304186 15.867770 12.721372 9.482373 0.070069 0.066253 0.004698 0.000000 0.000000
321 2 not_connected 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
323 2 not_connected 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
324 4 not_connected 100.00% 91.94% 94.62% 0.00% 100.00% 0.00% 8.201356 8.692819 13.787505 13.797587 13.350503 11.329436 -4.960773 -5.678485 0.319092 0.300511 0.227687 0.000000 0.000000
329 12 dish_maintenance 100.00% 86.02% 91.94% 0.00% 100.00% 0.00% 1.956805 4.965116 2.495626 9.159740 1.031394 7.774089 3.737974 -3.752930 0.353132 0.329312 0.249296 0.000000 0.000000
333 12 dish_maintenance 100.00% 86.56% 89.25% 0.00% 100.00% 0.00% 4.629132 3.062965 11.301337 5.262523 3.852272 3.973196 8.904273 -1.370632 0.346782 0.337230 0.241284 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, 16, 18, 19, 27, 28, 31, 32, 33, 36, 37, 38, 45, 51, 52, 53, 55, 57, 65, 66, 67, 70, 71, 72, 73, 81, 82, 83, 88, 89, 90, 91, 92, 93, 94, 98, 100, 105, 106, 107, 110, 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, 180, 181, 182, 183, 185, 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_2459768.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 [ ]: