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 = "2459749"
data_path = "/mnt/sn1/2459749"
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: 6-18-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/2459749/zen.2459749.25315.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/2459749/zen.2459749.?????.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/2459749/zen.2459749.?????.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)
0 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 17.539225 9.349930 58.125608 59.235024 4031.909355 6213.106830 7871.415403 10123.062323 0.017727 0.016211 0.001845 1.213706 1.206011
1 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 75.616630 66.302898 84.908611 67.454572 94.594754 46.486710 1316.095437 658.970950 0.016313 0.016666 0.000506 1.081923 1.090827
2 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 43.153865 62.301030 68.348398 69.744879 42.188226 33.374924 557.350540 505.986642 0.017074 0.016568 0.000405 1.127563 1.131153
3 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 5.434857 3.612534 3.862827 4.528427 3.779318 3.064422 -3.314270 -2.888913 0.118367 0.115983 0.023422 1.131359 1.129254
4 1 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.373852 2.579680 2.253780 3.167824 1.934258 2.439938 -2.505860 -3.006799 0.108772 0.106335 0.019600 1.243173 1.238835
5 1 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 3.329499 4.098358 3.602535 4.983415 3.291226 3.294220 -1.839928 -1.367041 0.099661 0.107007 0.017961 1.157456 1.143906
7 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.554696 -0.831366 -0.108155 -0.161222 -0.199967 0.577793 0.728809 12.873039 0.104022 0.080129 0.013308 0.897735 0.901112
8 2 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.589402 1.548628 2.108705 2.641987 1.627993 1.268745 1.874798 -2.101283 0.100373 0.086366 0.011959 0.893166 0.885240
9 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.121341 -0.704369 0.117735 0.211476 -0.873341 -0.591142 -0.289563 0.147009 0.083797 0.061657 0.004993 0.000000 0.000000
10 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.768420 -0.695596 -0.778956 -0.036737 -1.103910 2.695272 -0.515674 0.146599 0.122782 0.079943 0.013298 0.000000 0.000000
11 0 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
12 0 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
13 0 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
14 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 73.210989 87.574747 75.527158 86.203389 73.220631 101.680739 900.189701 1467.806274 0.017916 0.016414 0.001515 1.057115 1.048404
15 1 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.620284 -0.350363 0.688728 0.153795 0.155907 0.036150 0.004583 1.512636 0.096547 0.089767 0.013967 1.157786 1.159089
16 1 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.872285 -1.679232 -0.437624 -1.197838 -0.540566 -1.323708 3.876368 -0.235995 0.078828 0.078385 0.007937 1.079738 1.075294
17 1 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.531258 -0.365828 0.220516 0.305788 -0.585864 -0.654055 1.714263 5.301726 0.067201 0.065967 0.005778 1.025406 1.037366
18 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.205331 7.597341 -0.148573 0.110669 13.666520 11.691334 77.298129 67.446892 0.092544 0.114831 0.039389 1.136151 1.132830
19 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -1.366196 1.245004 0.076046 2.065949 0.679120 0.534238 -1.457191 -2.544599 0.095779 0.103551 0.014229 1.050467 1.051091
20 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.004131 0.024372 0.894385 -1.004947 1.842784 -1.197891 0.585549 -0.600564 0.067311 0.078551 0.008024 0.941573 0.927467
21 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.012372 10.627659 0.449990 36.205019 13.165435 106.652374 28.551138 201.969376 0.101686 0.118799 0.045897 0.874085 0.865122
23 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 54.714649 48.003770 78.548643 67.344910 80.129171 43.604526 1044.483065 590.013463 0.016680 0.016745 0.000464 0.783618 0.787854
24 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 83.387087 77.931090 94.837922 73.899838 116.811960 65.486982 1706.892341 778.879076 0.016126 0.016394 0.000403 1.088725 1.097032
25 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 320.467877 316.796080 inf 148.924392 127.529277 48.669449 1483.303060 601.034987 nan 0.020890 nan 0.000000 1.133170
26 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 320.518290 326.157151 157.930138 inf 79.560537 148.544291 1243.201387 2388.736639 0.024500 nan nan 1.010118 0.000000
27 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 39.262001 21.475126 33.960284 7.317232 9.698375 22.100221 39.099716 154.911547 0.056554 0.116409 0.054280 1.179090 1.203939
28 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 22.746935 3.863498 8.767614 2.127012 8.878997 2.613833 63.535482 1.334045 0.076879 0.115235 -0.010296 1.251443 1.258984
29 1 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -1.349669 -1.123692 -0.840386 -1.023051 -0.298754 -1.034899 -0.705022 -0.850117 0.067564 0.071510 0.006113 1.211931 1.221909
30 1 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.486887 -0.217817 -1.191591 -0.383843 0.004271 -1.088429 13.099830 -0.148144 0.086331 0.075511 0.010130 1.263202 1.251516
31 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.343890 -0.080118 0.334831 0.624116 -0.260052 0.661950 6.254812 3.391161 0.109127 0.108896 0.024530 1.004049 1.007910
32 2 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 24.967441 29.260286 0.898045 1.905341 3.477931 8.650060 17.616808 39.341889 0.123154 0.120897 0.011796 1.171831 1.163206
33 2 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.138428 4.562739 -0.200091 -0.625519 12.880528 13.705154 32.288842 51.676418 0.090753 0.125163 0.050111 1.244699 1.236183
36 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.607266 6.953956 0.667693 3.573773 2.109381 2.253013 4.444191 17.003544 0.644741 0.638554 0.399092 5.042367 5.000638
37 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.915419 0.662670 2.472930 1.473477 1.835752 0.264120 0.909671 4.932174 0.649980 0.636212 0.387793 3.913030 3.949351
38 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.350261 1.872920 2.751295 2.130883 0.436329 0.803765 9.093163 -1.399350 0.648298 0.632337 0.391361 3.473293 3.591821
39 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 327.529243 328.302080 inf inf 860.863389 1198.651047 6406.136790 13100.777895 nan nan nan 0.000000 0.000000
40 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.178618 1.259090 1.222455 1.158802 0.254742 0.211871 0.724569 0.577135 0.638266 0.632444 0.401276 1.299798 1.294079
41 4 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
42 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.743394 0.633170 -1.052296 0.009900 -1.079577 -0.306740 -0.405767 0.095005 0.629732 0.625059 0.414649 1.430033 1.378350
45 5 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
46 5 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
50 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.311522 1.432730 2.034077 -0.128621 1.125740 -0.489075 6.412228 4.025595 0.629718 0.631142 0.371505 4.552956 5.374396
51 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.340613 1.277576 -0.170327 1.111280 0.151291 -0.286752 0.922907 -1.449472 0.650033 0.642858 0.377725 1.590147 2.013123
52 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.895812 6.542347 0.796143 1.421614 3.711487 8.673795 10.282730 157.433267 0.642895 0.616800 0.334684 6.450355 9.668833
53 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.011932 0.281227 -0.631419 -1.202627 -1.198900 -0.984194 1.358539 6.482884 0.647498 0.650555 0.375986 4.530089 5.058303
54 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.193314 -0.223213 -1.079621 0.330175 -0.563582 -0.352864 -0.145842 -0.215072 0.639205 0.643881 0.369710 1.462498 1.734185
55 4 digital_ok 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% 0.632602 2.604633 0.660855 1.223561 1.387148 1.520715 0.726864 0.719010 0.225275 0.230257 -0.297106 3.409552 3.416176
56 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.653580 1.238097 -0.553883 0.911257 0.306371 -0.333357 -0.425361 9.283776 0.633615 0.632085 0.399984 3.656728 3.954509
57 4 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
65 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.506555 0.735403 0.499644 0.427497 0.280010 0.645863 -1.722136 -1.239897 0.629130 0.627500 0.385314 1.531744 1.792798
66 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.261801 0.200813 2.180653 -0.887353 1.198098 -1.116671 -2.607635 1.476731 0.641504 0.647375 0.375320 1.522593 1.679365
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.484418 3.433098 2.958184 8.913101 1.210111 7.331207 3.282198 9.741545 0.653941 0.662164 0.375087 3.986603 6.277414
68 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.191255 0.242871 -0.372672 1.341933 -0.774046 0.038253 -1.133238 0.534635 0.646184 0.664690 0.378484 1.651612 1.732805
69 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.730529 -0.731336 -0.961333 -0.135683 -0.834498 3.176929 0.072705 0.338166 0.654619 0.661848 0.387836 1.434714 1.671771
70 4 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 9.112765 5.440242 8.553747 9.806963 2.650947 5.882236 2.665164 5.512073 0.654530 0.643341 0.401796 13.331111 12.733668
71 4 digital_ok 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% 1.330175 0.366672 0.226789 0.033579 0.928362 0.352898 0.390633 -1.423400 0.234941 0.232344 -0.298979 3.496844 3.312422
72 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.968897 -0.212539 0.860790 -0.755720 2.622735 -0.724210 4.470925 -0.209473 0.637300 0.631134 0.392478 3.652729 4.408112
73 5 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
81 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.500859 0.370427 0.658226 -0.444543 0.564311 -0.535499 7.719919 3.107915 0.625504 0.629829 0.383387 3.739679 4.324803
82 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.258746 1.904737 -1.242876 0.656405 -1.107012 -0.603605 -0.875372 -0.110571 0.637842 0.645736 0.383130 5.671084 5.632760
83 7 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 20.002692 23.065486 34.689215 35.974583 7.198014 4.968496 6.680335 6.119373 0.043388 0.048919 0.002426 1.188515 1.192518
84 8 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 6.641984 7.736323 0.000643 0.993151 -0.199911 -0.100965 0.103432 0.441970 0.078523 0.064404 0.010083 1.181655 1.181049
85 8 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
86 8 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
87 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 2.218769 2.769579 1.728449 3.678075 18.483904 2.695512 2.108097 -3.324040 0.079347 0.081206 0.019601 1.235285 1.220917
88 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
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% 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
91 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
92 10 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
93 10 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
94 10 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
98 7 digital_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 18.704388 21.166667 33.673602 34.871318 7.309319 4.950885 6.303411 5.837369 0.040921 0.044003 0.005705 1.120613 1.127420
99 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.749483 2.804992 2.584529 3.641821 1.353333 0.738053 2.291590 4.991424 0.644226 0.643874 0.394146 6.605460 7.697373
100 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 19.728083 22.622625 34.263193 36.684551 7.226433 5.036101 8.950854 8.186166 0.043253 0.046855 0.004929 1.060745 1.059620
101 8 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 6.219011 8.305174 -0.265289 1.787247 -0.934668 0.086049 6.929123 2.926690 0.086102 0.063257 0.011850 1.167069 1.171512
102 8 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
103 8 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 2.894573 7.311094 1.172698 1.897903 0.606955 0.196591 0.740468 0.991225 0.050866 0.050907 0.005010 1.169877 1.176609
104 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 5.413007 76.022913 1.033179 42.221734 -0.288296 2.930567 2.231367 6.940400 0.051000 0.087187 0.026896 1.176206 1.142393
105 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
106 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
107 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
108 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
109 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.555034 -0.945308 0.148764 -0.851818 -0.233596 -0.995521 -0.049149 -0.275695 0.644712 0.634462 0.399401 1.408434 1.527471
110 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 39.897582 13.270483 4.997928 0.581689 2.495458 19.273242 6.400276 26.335242 0.549192 0.570371 0.294371 5.257142 5.328194
111 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.147165 -0.349640 -0.099491 -0.548838 -0.245920 1.323636 -0.324713 1.408413 0.628756 0.610707 0.400582 1.487984 1.604876
112 10 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% -0.663928 23.982710 0.771627 39.986859 1.037511 5.168981 0.414254 5.739758 0.605479 0.056440 0.318272 4.211192 1.686757
116 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 20.626064 23.497428 34.762825 36.104524 7.187568 4.890274 5.738060 7.203678 0.043431 0.042677 0.000720 1.378925 1.401506
119 7 RF_maintenance 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 19.529364 0.097063 34.150464 -0.089084 7.170239 -1.004825 6.217026 -0.082143 0.043869 0.654806 0.374543 1.454032 5.286187
120 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 14.696712 35.139996 4.356384 43.016139 7.631155 4.841546 2.527326 9.957306 0.090865 0.033988 0.050031 1.261507 1.220742
121 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.342689 7.338884 0.784714 7.154964 0.989464 2.708919 29.069253 33.292957 0.064548 0.039561 0.005448 1.211691 1.214761
122 8 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 8.196079 6.171074 2.460790 0.825512 0.985240 0.294450 1.859396 3.547414 0.043011 0.054652 0.004965 1.224708 1.223932
123 8 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 4.932495 4.476289 -0.692504 -0.036145 -1.349661 -0.258996 -0.961263 -1.405860 0.064334 0.074651 0.012218 1.227676 1.223070
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% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
126 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
127 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.092100 0.774137 1.509506 1.141775 1.348101 1.029652 1.122988 1.754058 0.647760 0.650577 0.390448 5.309702 6.684197
128 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.455031 1.511066 -0.167926 -0.916479 0.624969 -1.336566 0.193902 -0.572102 0.645235 0.631279 0.387541 1.593652 1.774192
129 10 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.234287 -0.199940 5.302236 1.026103 3.362294 -0.419426 1.861986 0.956498 0.642077 0.633217 0.393785 4.572436 5.100789
130 10 digital_maintenance 100.00% 100.00% 56.99% 0.00% 100.00% 0.00% 17.734645 5.957437 38.354955 3.697409 7.268606 0.755272 4.791334 -1.487655 0.049987 0.406923 0.179414 1.322075 5.168307
135 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.396772 -1.049505 -0.720611 -0.661927 0.112663 -0.178105 1.052218 0.685731 0.606731 0.606042 0.385116 1.539440 1.668224
136 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.320273 10.204223 -0.575984 0.816505 -0.036222 0.378910 1.332078 7.410398 0.644514 0.628039 0.378757 5.530456 7.507874
138 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.529232 1.756362 -0.468119 0.147926 -0.423166 -0.536957 -0.004583 1.522654 0.656925 0.660418 0.392141 1.469214 1.714172
140 13 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.986977 1.526717 0.300163 0.702623 1.619059 0.417205 1.107982 1.558416 0.653929 0.655396 0.378026 1.558997 1.858669
141 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.239291 3.193851 -1.275647 12.039233 -0.151666 3.219825 0.241138 16.464672 0.668692 0.654362 0.385013 5.243929 6.744851
142 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.012874 24.187245 3.302890 39.751711 1.866107 5.079323 2.775623 5.405726 0.295878 0.050370 0.065908 2.709293 1.429371
143 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.403380 -0.110576 -0.857689 -0.277556 -0.391212 -0.198450 -0.718187 -0.218833 0.671061 0.681397 0.389401 1.585370 1.745546
144 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.209269 1.742078 5.605479 3.051913 7.184613 2.003205 2.529555 1.440074 0.669620 0.676786 0.391271 7.392325 11.437020
145 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.060003 -0.850298 1.954571 -0.371018 2.409218 -0.013788 4.706002 0.827148 0.651307 0.660577 0.377633 5.409911 7.322590
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 19.443969 23.866940 38.616023 40.737470 7.317026 5.234120 8.118302 8.784192 0.048150 0.047932 0.002310 1.339360 1.307619
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 17.696025 20.071510 37.945071 39.479154 7.547607 5.231613 7.761934 8.014136 0.047937 0.045942 0.001245 1.395113 1.445495
156 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.182891 -0.431829 -0.597935 -0.032224 0.032963 0.747361 0.177726 2.986815 0.633724 0.613079 0.384211 7.448833 6.967492
157 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.226847 -0.611431 0.703035 -0.009900 0.022144 -0.699449 -1.690363 0.041455 0.635317 0.643433 0.387844 5.080151 6.268597
158 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.393166 -1.597109 -1.088121 -1.215368 0.354907 -0.680955 0.142240 0.609728 0.646246 0.655944 0.384146 4.914136 5.781600
160 13 digital_ok 100.00% 16.67% 46.24% 0.00% 100.00% 0.00% 12.712350 28.027049 -0.438719 1.765105 4.299380 12.215687 0.533767 50.215357 0.477609 0.426426 0.198044 6.945962 4.652395
161 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.772355 40.580771 1.093539 5.357637 1.162050 0.937061 0.573293 15.616449 0.657292 0.575366 0.353186 4.089954 5.197105
162 13 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.061202 -0.384975 0.402272 0.582725 1.413767 0.876795 -0.096454 0.498885 0.672905 0.677446 0.376002 1.727018 2.176365
163 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.056088 -0.212421 0.105667 -0.529148 -0.464349 0.226349 -0.220197 0.663251 0.659848 0.674373 0.375590 1.847978 2.115434
164 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.622032 -0.950725 -0.687055 -0.437002 -0.531605 -0.399458 0.458526 1.058316 0.659355 0.670321 0.371569 1.852880 2.208470
165 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 10.53% -0.548281 -0.298846 -0.360031 -0.563692 -0.669862 -0.889934 1.099052 -0.168558 0.654322 0.669039 0.380824 1.878722 2.498399
166 14 RF_maintenance 100.00% 5.91% 0.00% 0.00% 100.00% 0.00% 27.780937 26.044239 4.037862 3.552411 2.930304 8.142115 16.896236 33.880987 0.540360 0.575523 0.195625 4.563488 5.387392
167 15 digital_ok 100.00% 27.42% 19.35% 0.00% 100.00% 0.00% 42.314312 15.479288 1.861377 1.893071 12.429689 8.258905 162.689385 80.416838 0.481429 0.517403 0.146817 4.721933 5.080792
168 15 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.060816 4.077969 2.650736 4.355216 1.843136 2.425059 -1.379813 -3.044718 0.638944 0.622409 0.372027 6.150003 6.037584
169 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.857130 3.376776 4.388102 3.344097 3.879416 1.871603 -3.615697 -2.476605 0.614236 0.603850 0.377611 4.187947 4.441663
170 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.199561 2.003089 4.630290 2.581663 4.289317 1.463785 -2.900634 -1.870764 0.597252 0.597229 0.378033 4.693922 4.452865
176 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.653386 -0.812777 -0.642876 -0.097395 -1.030112 -0.151210 -1.146397 2.096003 0.614082 0.614889 0.398526 1.484563 1.430210
177 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.784732 1.238758 -0.304769 1.380925 -0.022144 0.860142 -0.194445 1.231565 0.632335 0.605730 0.392105 1.445730 1.582744
178 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.135381 -0.943061 2.008949 -0.254911 0.390309 -0.831110 0.613558 7.596473 0.641639 0.638858 0.393675 3.747975 4.785658
179 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.955752 0.223837 -1.010040 0.033219 5.240255 -0.355306 -0.251674 -0.326862 0.647250 0.650061 0.392708 3.717636 4.418440
180 13 RF_maintenance 100.00% 30.11% 100.00% 0.00% 100.00% 0.00% 16.383206 22.568298 0.515109 40.007571 4.802771 5.197257 18.260053 5.997640 0.449983 0.053023 0.208260 3.773016 1.213103
181 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.256702 1.137805 6.769320 1.929384 3.914339 1.128844 2.490089 2.923496 0.660126 0.661394 0.398774 3.521241 3.847142
182 13 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.929652 2.282581 2.530723 2.901721 1.774660 1.210173 -1.348679 -1.661545 0.645849 0.647366 0.386266 3.879543 4.406141
183 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.514394 0.547792 1.373004 2.712638 1.389652 0.092713 0.611764 10.012145 0.664855 0.661368 0.387800 4.170529 4.789016
184 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 13.16% 0.566132 -0.319822 0.017528 0.358147 0.426297 -0.249193 0.317142 -0.131188 0.666418 0.657229 0.388679 1.893752 2.487455
185 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.648083 -0.644928 -1.176411 -0.643527 -0.852916 -1.034752 -0.564717 0.114995 0.654334 0.661670 0.388093 1.812963 2.071759
186 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 10.53% 0.137989 -0.004131 -1.152295 -0.380790 -0.616534 -0.643372 3.211732 -0.367882 0.652569 0.658696 0.394223 1.809822 2.452890
187 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.466195 0.969460 -0.056535 1.408332 0.218252 2.674260 6.707502 31.180495 0.648171 0.652615 0.376692 4.961406 6.196348
189 15 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.480989 0.165280 -1.001154 -1.110116 -0.533701 -0.542893 -0.338111 -0.910417 0.629493 0.620851 0.391801 1.267800 1.302048
190 15 digital_ok 100.00% 32.80% 38.17% 0.00% 100.00% 0.00% 54.493231 70.268560 6.954155 10.562563 11.608898 28.853356 137.824548 258.669872 0.443269 0.442299 0.133610 3.266934 3.818665
191 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.408298 -0.767902 0.084782 -0.671648 0.668184 -0.122372 1.860212 6.548191 0.594450 0.590140 0.393757 3.744738 4.042266
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% 24.528885 24.209356 30.016863 30.761877 7.453345 5.111253 8.051970 6.036246 0.062528 0.070785 0.008493 0.000000 0.000000
321 2 not_connected 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.481505 0.701363 1.452359 1.355487 1.306169 0.957908 0.556312 -0.584150 0.101536 0.099879 0.040922 0.000000 0.000000
323 2 not_connected 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 23.383474 2.214472 3.031985 2.990032 1.918876 1.578008 11.829856 -0.223040 0.096124 0.102363 0.038131 0.000000 0.000000
324 4 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
329 12 dish_maintenance 0.00% 27.42% 30.11% 0.00% 100.00% 0.00% 1.035432 2.048344 0.639540 2.691779 0.823603 1.889606 0.705686 -2.843884 0.468540 0.459271 0.363448 0.000000 0.000000
333 12 dish_maintenance 100.00% 51.61% 27.42% 0.00% 100.00% 0.00% 10.916580 1.814821 16.990672 2.244050 43.840609 1.074491 101.323349 -0.259872 0.366533 0.473612 0.362994 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: [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 36, 37, 38, 39, 41, 45, 46, 50, 52, 53, 55, 56, 57, 67, 70, 71, 72, 73, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 110, 112, 116, 119, 120, 121, 122, 123, 124, 125, 126, 127, 129, 130, 136, 141, 142, 144, 145, 150, 155, 156, 157, 158, 160, 161, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 186, 187, 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_2459749.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 [ ]: