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 = "2459754"
data_path = "/mnt/sn1/2459754"
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-23-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/2459754/zen.2459754.25311.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/2459754/zen.2459754.?????.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/2459754/zen.2459754.?????.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% 8.795658 5.074631 49.361808 48.005525 5662.065099 6386.607093 8578.597934 8207.070246 0.017716 0.016406 0.001173 1.106732 1.097189
1 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 65.545654 52.958383 72.441544 55.819507 67.430942 55.410670 910.333486 580.504158 0.016158 0.016624 0.000391 1.056004 1.064190
2 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 57.722794 55.816021 70.387105 63.120866 87.792977 65.389447 1000.744976 754.127977 0.016373 0.016411 0.000373 1.085300 1.085122
3 1 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.760477 -0.592814 -0.443519 -0.537957 1.267630 -0.159891 0.160307 0.768050 0.593534 0.591091 0.379382 3.976708 4.285861
4 1 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.141727 1.587600 0.115924 0.500050 0.318144 -0.167976 7.167680 1.183221 0.605509 0.586938 0.378845 5.089265 5.939230
5 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.336735 -0.921556 0.003890 -0.409357 -0.343347 -0.646230 1.546573 -1.110404 0.606152 0.578881 0.381045 1.495026 1.385866
7 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.395282 -0.770706 -0.224472 -0.106194 -0.738851 -0.116240 1.164387 7.297602 0.088337 0.088377 0.018105 1.256231 1.245012
8 2 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.590280 1.154172 2.106497 2.252078 1.834914 1.711605 0.662068 -1.329317 0.086817 0.081357 0.014689 1.160069 1.159369
9 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.479921 -0.620673 -0.003890 0.218276 -0.354720 -0.020767 -0.627923 -0.381392 0.074626 0.049838 0.008431 1.195344 1.193807
10 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -1.308298 -0.548433 -0.348283 -0.062973 -0.459630 1.908350 -0.433640 1.507753 0.107047 0.089703 0.020380 1.105892 1.108684
11 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 98.973411 75.143214 64.213701 72.189978 58.307470 92.896778 683.406372 970.970044 0.018605 0.017091 0.001817 1.098852 1.095863
12 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 52.204267 42.434206 61.187068 56.318690 70.461622 46.923048 690.860809 536.629980 0.018359 0.018044 0.000435 1.102416 1.107265
13 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 41.365087 46.617092 59.567261 63.772793 59.157240 67.762350 605.008400 834.441111 0.018664 0.017343 0.000971 1.080175 1.076150
14 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 156.951638 58.748532 81.285518 61.654097 95.731105 99.101458 1099.333266 729.807179 0.018143 0.017331 0.000551 1.110758 1.114233
15 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.421049 -0.189177 0.385624 0.224041 1.651032 4.352547 1.422239 10.298603 0.627393 0.612374 0.369072 4.582469 5.062237
16 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.839032 -1.269894 -0.454243 -0.935306 -0.436995 -1.104160 0.802808 -0.533637 0.632547 0.618711 0.373967 1.446104 1.444040
17 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.739851 6.615019 -0.036581 1.038193 0.672914 0.619358 3.042482 8.500155 0.613466 0.589831 0.362449 5.606060 7.601434
18 1 RF_maintenance 100.00% 0.00% 56.99% 0.00% 100.00% 0.00% 0.872744 6.431662 -0.163404 0.286253 21.075813 13.230684 113.479922 72.552011 0.582458 0.374730 0.406579 2.713360 1.977894
19 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.781155 0.789954 0.399443 1.751279 -0.093836 0.677388 -1.051195 -2.071342 0.076693 0.084772 0.011685 1.156396 1.148224
20 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.062705 0.113097 0.728627 -0.717636 2.090891 -1.012470 0.196006 -0.672325 0.064619 0.061316 0.006903 1.144321 1.142155
21 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.106855 -0.742066 -0.317584 -0.069894 -0.292248 -0.025064 -0.276831 -0.357465 0.091339 0.085959 0.014584 1.137521 1.138049
23 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 37.152473 45.305916 61.329655 57.785013 38.700875 45.522193 590.226727 552.638166 0.017312 0.016913 0.000456 1.068502 1.070142
24 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 28.006110 91.118361 54.645415 86.175829 43.587920 147.625160 484.652341 1859.295395 0.017078 0.016337 0.000724 1.091508 1.082068
25 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 239.215241 240.706835 inf inf 46.558008 98.791503 471.068144 1187.732058 nan nan nan 0.000000 0.000000
26 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 239.200135 243.814174 119.193234 inf 57.948889 215.465507 676.364603 2111.840631 0.020168 nan nan 1.072740 0.000000
27 1 RF_maintenance 100.00% 100.00% 56.99% 0.00% 100.00% 0.00% 26.513409 12.492074 27.519628 6.564204 10.366390 26.278398 29.342978 160.181829 0.076088 0.394846 0.188926 1.235890 2.432453
28 1 RF_maintenance 100.00% 91.94% 91.94% 8.06% 100.00% 0.00% 16.857361 1.668584 6.895706 0.708381 9.146451 11.727542 61.977787 0.861000 0.166644 0.291739 -0.134610 2.174299 6.087991
29 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.218801 -1.061970 -0.922544 -0.770718 -0.022465 -0.604206 -1.105905 -0.896348 0.631198 0.615446 0.355787 1.559092 1.727428
30 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.412765 -0.367191 -0.841569 -0.186838 -0.361630 -0.709198 11.123086 0.242312 0.621920 0.612728 0.366519 3.790154 4.881007
31 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.564875 0.469389 4.681597 1.078584 207.847373 6.821101 91.193027 13.232016 0.086365 0.098003 0.025574 1.193948 1.194390
32 2 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 19.076293 21.468729 0.615383 1.425494 4.674198 7.858039 29.656986 31.667011 0.092838 0.105583 0.010859 1.204749 1.200529
33 2 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.268361 3.624476 -0.285610 -0.278568 -0.394685 2.923954 1.414312 17.685448 0.082119 0.118543 0.036958 1.099198 1.101876
36 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.935034 5.401082 0.424332 2.865700 1.000662 1.797194 0.111713 1.403854 0.624683 0.616475 0.363473 4.789699 5.257597
37 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.638961 0.443511 1.070080 1.329648 2.275088 0.560136 0.776623 0.318782 0.631865 0.620285 0.355776 1.378933 1.672796
38 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.465178 1.111462 2.013017 1.777984 1.378387 1.587126 6.398670 -1.924638 0.637284 0.630477 0.361047 3.682094 4.523813
39 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 245.358590 245.903130 inf inf 386.579211 658.077125 4132.465701 5640.730128 nan nan nan 0.000000 0.000000
40 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.494611 0.899899 0.817568 0.933992 1.005817 0.222995 -0.007483 -0.005627 0.642892 0.650774 0.360776 1.608544 1.822002
41 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.652360 -0.880506 -0.694616 -0.192016 -1.390334 -0.788566 -1.212056 0.002144 0.649261 0.654010 0.363841 1.679511 1.885387
42 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.829032 0.474068 -0.930442 0.027114 -0.777440 1.997864 -0.563846 0.174426 0.652258 0.647250 0.360481 1.630710 1.645474
45 5 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 0.102474 17.570151 0.144557 31.738294 -0.576692 5.862453 -0.315830 4.681651 0.599001 0.066920 0.294327 2.853059 1.175711
46 5 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.329375 -0.274861 -0.757359 -0.203598 -0.390854 0.348488 -0.130773 5.263548 0.575915 0.561148 0.378167 1.665950 1.936085
50 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.136763 7.784041 1.415413 0.880437 2.249464 9.664734 10.164594 73.355532 0.609082 0.587834 0.326340 4.194476 5.722426
51 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.131688 2.831575 -0.331079 0.906653 -0.744446 -0.277093 0.700525 -1.057114 0.634650 0.622470 0.345099 1.304123 1.597720
52 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.363683 5.081724 0.445850 1.606100 1.940485 25.948747 20.721967 229.048483 0.633535 0.604956 0.311626 6.837143 8.900366
53 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.145500 -0.153605 -0.098629 -0.815351 -0.911407 12.127364 0.623147 6.074748 0.643639 0.654325 0.347038 4.963355 5.861892
54 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.062705 1.225219 -0.850812 0.544545 -0.671594 -0.091490 0.285840 1.038188 0.641268 0.654693 0.342397 1.574081 1.837826
55 4 digital_ok 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% 0.179135 1.894077 0.451379 0.878364 1.431779 2.258319 2.222946 0.794390 0.295985 0.295372 -0.286820 4.552616 4.556856
56 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.741899 1.078280 -0.556537 0.810666 0.519112 1.080897 -0.441452 9.858760 0.650734 0.653468 0.355560 4.606962 4.891030
57 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.504891 0.073009 5.602328 1.153789 5.538468 0.826882 2.403856 -0.871233 0.641553 0.627603 0.362944 4.500146 4.519694
65 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.260152 0.494652 0.680718 0.741008 0.358995 36.554997 -1.271642 6.084586 0.601781 0.600442 0.344162 3.581693 4.373559
66 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.023258 -0.300451 2.019573 -0.590123 1.804302 -0.995994 -2.544325 0.006630 0.619910 0.629074 0.339556 1.440231 1.629522
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.101663 7.477905 2.299305 7.310106 1.345491 4.698993 1.711170 7.254318 0.643827 0.649473 0.339704 4.506943 7.191352
68 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.277707 0.117959 0.112200 1.103402 -0.210422 0.020767 -1.583142 0.012979 0.646415 0.666506 0.345346 1.517024 1.729258
69 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.739331 -0.583087 -0.772274 0.036959 -0.930472 2.907792 -0.452308 0.468222 0.660290 0.667778 0.358978 1.554055 1.683016
70 4 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.613230 4.655730 7.234832 8.246091 5.486624 3.389229 2.599703 5.541388 0.659392 0.656945 0.363698 15.547146 14.600922
71 4 digital_ok 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% 0.909652 0.290606 0.552573 0.159342 1.697812 0.508473 -0.236095 -1.090622 0.305687 0.296168 -0.287357 3.261620 3.087022
72 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.582885 -0.203504 0.486527 -0.538549 3.073677 -0.243990 7.877481 2.018269 0.636711 0.635797 0.349962 4.127405 4.068267
73 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.297437 2.645350 0.476238 6.244829 3.888771 4.926483 7.712390 14.491185 0.628078 0.610089 0.367699 3.400408 3.341927
81 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.134823 -0.006738 0.366131 -0.216395 0.456479 -0.248149 5.479927 2.093971 0.591189 0.598541 0.346404 3.632846 4.118017
82 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.392179 1.130903 0.745720 0.927150 0.373137 -0.200888 3.689502 0.705787 0.609454 0.619723 0.349360 4.878240 4.733168
83 7 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 15.961164 18.231231 27.977978 29.200645 8.630260 5.815538 5.082328 4.600771 0.043078 0.047813 0.002580 1.193542 1.192307
84 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.792361 5.338882 -0.074064 0.922046 -0.493796 1.039870 -0.458329 -0.096338 0.654540 0.656741 0.343416 4.891448 5.607379
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% 0.00% 0.00% 0.00% 100.00% 0.00% 0.994809 5.877469 1.136039 2.754063 22.601568 2.626184 40.806815 -2.497883 0.606517 0.621818 0.337683 3.976308 3.672568
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% 14.777109 16.719988 27.207709 28.324382 8.837338 5.876954 4.581587 4.291875 0.040851 0.044041 0.005435 1.260069 1.648018
99 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.636799 1.003775 1.932226 2.218861 2.249511 1.533647 1.899525 3.112932 0.606415 0.607250 0.370091 1.457396 1.671226
100 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 16.561462 18.207855 27.629548 29.736977 8.637566 5.883863 6.494226 6.382225 0.042459 0.048159 0.006356 1.298571 1.422475
101 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.347798 5.857135 -0.254045 1.490751 -0.582140 0.684176 5.992713 3.583443 0.646445 0.646247 0.361881 3.957399 4.326782
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% 0.00% 0.00% 0.00% 100.00% 0.00% 1.927478 4.925378 0.710924 1.651195 1.539971 1.179170 1.760005 2.237552 0.652804 0.644737 0.361078 3.990289 4.100486
104 8 RF_maintenance 100.00% 0.00% 0.00% 100.00% 100.00% 0.00% 5.414568 54.665223 1.999048 29.305969 1.460055 7.807333 1.958188 4.733404 0.282868 0.229828 -0.267820 2.534115 2.236352
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.703332 -0.705225 -0.006441 -0.529140 -0.647719 -0.646864 0.828799 0.221658 0.611611 0.595561 0.376324 1.204430 1.254823
110 10 RF_maintenance 100.00% 2.69% 0.00% 0.00% 100.00% 0.00% 9.465575 2.786861 1.675566 -0.052761 42.989342 20.626648 271.450965 79.942709 0.572553 0.570323 0.357207 5.078132 6.931286
111 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.256014 -0.128779 -0.332463 -0.369137 0.143520 2.703176 0.079932 2.576343 0.592976 0.573006 0.373430 1.329876 1.398018
112 10 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% -0.324217 18.847661 0.443735 32.483820 1.339566 5.998638 2.109823 4.433514 0.558742 0.055350 0.286796 3.528602 1.636736
116 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 16.601452 18.756177 28.043001 29.298839 8.641892 5.816524 3.982542 5.953095 0.042909 0.042960 0.001605 1.661783 1.762854
119 7 RF_maintenance 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 15.855656 -0.500074 26.358059 -0.750833 8.564441 -0.910272 4.500768 -0.041635 0.043981 0.610569 0.302873 1.397806 6.086020
120 8 RF_maintenance 100.00% 38.17% 100.00% 0.00% 100.00% 0.00% 10.339056 26.916215 3.231864 34.870861 6.509329 5.726203 1.187047 7.986306 0.436983 0.041443 0.244230 4.228236 1.205270
121 8 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.888341 5.729151 -0.764343 6.479134 -0.809692 2.121311 4.913281 29.396746 0.647562 0.643263 0.362544 5.351176 6.054590
122 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.720166 4.557018 1.739044 0.700207 1.199417 1.116979 0.810574 1.341604 0.654781 0.641396 0.368245 4.285328 5.475175
123 8 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 3.418539 2.819810 -0.271638 0.069747 -1.277944 -0.243742 -0.584906 -1.271279 0.645761 0.634579 0.379328 1.386351 1.519454
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% 0.724770 0.635180 1.021951 1.079603 0.509788 0.989008 1.151988 2.197375 0.602164 0.595027 0.371663 5.366234 6.134655
128 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.696622 1.377777 -0.281137 -0.725053 0.280670 -1.147135 -0.574584 -0.676657 0.601580 0.579107 0.365041 1.268458 1.369709
129 10 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.072274 -0.179708 4.168361 0.908846 3.674958 -0.110391 1.145976 0.455773 0.597883 0.584894 0.364626 6.012109 6.665003
130 10 digital_maintenance 100.00% 100.00% 75.81% 0.00% 100.00% 0.00% 14.168407 4.504716 30.918163 3.148309 8.638110 1.211099 3.253611 -1.601024 0.048715 0.362245 0.157720 1.286906 4.859057
135 12 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -1.284048 -0.718290 -0.746952 -0.432958 -0.598957 -0.159382 0.168778 0.622064 0.103153 0.105831 0.026257 1.190320 1.189227
136 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.208575 6.864065 -0.563877 0.613252 -0.122137 0.487588 3.369371 8.425300 0.088471 0.101625 0.021093 1.275022 1.265066
138 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.080509 0.450522 -0.703427 -0.651975 0.100255 0.289523 0.397956 1.489016 0.591716 0.586044 0.368697 1.398393 1.661820
140 13 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.342299 0.912793 0.075964 0.635428 1.563281 0.489232 0.195343 2.309374 0.623572 0.611321 0.356788 1.369627 1.433318
141 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.227548 2.408411 -0.595232 9.802663 -0.719059 4.773931 1.584496 21.220586 0.636984 0.608983 0.365737 3.897672 4.812152
142 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.507164 18.891153 2.461578 32.231359 1.706884 5.942339 3.505643 4.007248 0.254497 0.050205 -0.015165 2.285414 1.412431
143 14 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
144 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 2.028769 3.090317 2.800709 6.005255 -0.043921 4.616126 1.247110 3.896673 0.076538 0.093931 0.014814 1.096188 1.092529
145 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.621922 0.383802 1.460244 1.713084 2.999597 3.078154 6.669673 2.035929 0.065362 0.086203 0.010407 1.196681 1.193977
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 15.574368 19.201088 31.113226 32.988325 8.771559 5.876540 5.660648 6.822846 0.049072 0.050589 0.001363 1.277873 1.281194
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.961029 15.596175 30.600091 32.020425 8.910004 6.078921 5.593747 6.618868 0.043802 0.045352 0.000645 1.019363 1.025526
156 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.132099 0.286477 -0.666605 -0.588466 -0.382694 -0.690491 5.180868 0.662625 0.065074 0.068838 0.008334 0.000000 0.000000
157 12 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.340191 -0.309729 0.654366 0.141316 0.160071 -0.191339 -1.175388 -0.002144 0.070919 0.058204 0.008545 0.912857 0.906969
158 12 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.432549 -0.966544 -0.900698 -0.822439 0.108827 -0.436863 -0.584203 1.382541 0.080817 0.064118 0.010082 0.892446 0.896375
160 13 digital_ok 100.00% 38.17% 73.12% 0.00% 100.00% 0.00% 9.797572 19.587489 -0.237729 1.111963 3.315858 7.788847 0.455737 22.573931 0.435739 0.381353 0.163852 8.229889 6.110867
161 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.455232 30.473980 0.755837 4.316211 1.415599 2.414405 1.794583 10.241907 0.614151 0.500630 0.347469 3.761091 3.291196
162 13 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.090094 -0.368248 0.166777 0.457988 1.379728 1.396003 -0.426277 0.154719 0.612253 0.598943 0.370024 0.035516 0.035338
163 14 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
164 14 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
165 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.820488 -0.372916 -0.442772 -0.366058 -0.733556 -0.528095 5.223836 0.984759 0.055707 0.055898 0.004993 1.381356 1.381512
166 14 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 21.682299 4.812324 2.874421 1.169737 4.789952 1.046014 28.170762 8.427824 0.089684 0.076451 0.014583 1.213939 1.211572
167 15 digital_ok 100.00% 43.55% 0.00% 0.00% 100.00% 0.00% 36.205122 3.188008 2.041121 2.966443 10.485621 3.375087 111.217139 10.281300 0.449770 0.542947 0.334603 2.985894 3.351208
168 15 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.362635 2.922804 2.456394 3.597238 2.535782 3.002460 -0.306856 -2.488905 0.588713 0.561608 0.360575 6.962623 6.396553
169 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.661847 2.435839 3.835255 2.806800 4.869853 2.319704 -3.283326 0.381864 0.566681 0.544371 0.355699 5.503079 4.884232
170 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.934114 1.547878 3.958467 2.154695 5.386604 2.007533 -2.042768 -0.806451 0.548947 0.543789 0.349502 4.030725 3.888193
176 12 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.512660 -0.843541 -0.140856 -0.050057 -0.807599 -0.523744 -1.375234 0.421683 0.073922 0.074723 0.013349 0.000000 0.000000
177 12 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.247783 2.333664 -0.312787 2.837353 0.159783 2.823963 -0.462993 -2.654055 0.060936 0.088175 0.008479 1.176043 1.172528
178 12 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.242801 -1.251884 1.443555 -0.732610 0.627530 -1.200629 0.141470 -0.247352 0.060323 0.065150 0.006854 1.253535 1.250180
179 12 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.759605 -0.058350 -0.606502 0.136658 3.030744 -0.645943 -0.585252 -0.417652 0.090006 0.079194 0.016375 1.196215 1.201588
180 13 RF_maintenance 100.00% 59.68% 100.00% 0.00% 100.00% 0.00% 12.626265 17.865008 0.923892 32.440287 4.463596 5.893091 14.449857 4.323749 0.379058 0.052934 0.161481 4.278079 1.472531
181 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.706276 0.673619 5.147852 1.638453 3.322628 1.928669 1.898804 1.587750 0.608034 0.584508 0.392083 3.510865 3.872160
182 13 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.479170 1.552138 2.390645 2.467847 2.763425 1.816107 -2.707461 -2.575246 0.588239 0.566630 0.377643 4.078977 4.064694
183 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.774604 0.016808 0.902135 0.745262 1.290549 9.767984 1.458452 2.890270 0.595402 0.572487 0.388464 3.967568 3.795752
184 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.210299 0.221290 -0.702953 0.342600 14.723758 0.045944 1.949332 0.227591 0.078110 0.086043 0.013623 0.925091 0.923340
185 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 6.222815 11.936999 -0.466295 0.825856 0.150864 0.626541 0.949457 5.734907 0.055957 0.057698 0.005365 1.196644 1.199097
186 14 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.539461 -0.351731 -0.882928 -0.352301 -0.318107 -0.706104 3.948254 -0.316925 0.068979 0.058941 0.009488 0.000000 0.000000
187 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.468226 0.372953 -0.249251 0.962914 0.170349 2.397065 7.915625 22.078703 0.078622 0.066704 0.011869 1.261701 1.259244
189 15 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.094131 0.207312 -0.888845 -0.751925 -0.869219 -0.876094 -0.568743 -0.847486 0.574860 0.551729 0.373968 1.082073 1.160035
190 15 digital_ok 100.00% 54.30% 46.24% 0.00% 100.00% 0.00% 42.953871 35.491775 5.013441 6.346223 21.916868 30.235160 168.607495 308.351872 0.390834 0.420743 0.170961 2.786706 2.958351
191 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.259508 -0.669514 0.458096 -0.419985 0.743022 -0.043840 5.311606 5.315252 0.551099 0.539198 0.368788 3.466080 3.654980
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% 18.963178 18.880914 24.230446 25.006822 8.892868 5.965725 6.206926 4.507965 0.062210 0.071621 0.008247 0.000000 0.000000
321 2 not_connected 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.206505 0.259251 1.512480 1.179700 1.763601 1.588231 0.172722 -0.714891 0.081968 0.081470 0.033218 0.000000 0.000000
323 2 not_connected 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 17.504452 1.817897 2.422090 2.558366 2.992113 3.056679 14.830945 -0.286343 0.077496 0.082115 0.029825 0.000000 0.000000
324 4 not_connected 100.00% 46.24% 48.92% 0.00% 100.00% 0.00% 4.361900 3.406366 4.489101 3.838029 5.725861 3.717676 0.605375 -1.797369 0.410504 0.392028 0.311566 0.000000 0.000000
329 12 dish_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 2.623516 6.714313 -0.717588 1.754742 11.749285 1.975806 11.110882 -0.733739 0.083186 0.082412 0.032251 0.000000 0.000000
333 12 dish_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 8.960686 1.928293 13.686794 2.520036 33.989454 2.493799 63.675224 -0.695056 0.080038 0.081056 0.029861 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, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 36, 38, 39, 45, 46, 50, 52, 53, 55, 56, 57, 65, 67, 70, 71, 72, 73, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 98, 100, 101, 102, 103, 104, 105, 106, 107, 108, 110, 112, 116, 119, 120, 121, 122, 124, 125, 126, 127, 129, 130, 135, 136, 141, 142, 143, 144, 145, 150, 155, 156, 157, 158, 160, 161, 163, 164, 165, 166, 167, 168, 169, 170, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 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_2459754.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 [ ]: