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 = "2459778"
data_path = "/mnt/sn1/2459778"
ant_metrics_ext = ".ant_metrics.hdf5"
redcal_ext = ".known_good.omni.calfits"
nb_outdir = "/home/obs/src/H5C_Notebooks/_rtp_summary_"
In [4]:
from astropy.time import Time
utc = Time(JD, format='jd').datetime
print(f'Date: {utc.month}-{utc.day}-{utc.year}')
Date: 7-17-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/2459778/zen.2459778.25316.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 1862 ant_metrics files matching glob /mnt/sn1/2459778/zen.2459778.?????.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 187 ant_metrics files matching glob /mnt/sn1/2459778/zen.2459778.?????.sum.known_good.omni.calfits

Figure out some general properties¶

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

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

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

Load a priori antenna statuses and node numbers¶

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

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

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

Summarize auto metrics¶

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

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

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

Summarize ant metrics¶

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

Summarize redcal chi^2 metrics¶

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

Build DataFrame¶

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

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

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

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

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

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

Table 1: RTP Per-Antenna Metrics Summary Table¶

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

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

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

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

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

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

In [15]:
HTML(table.render())
Out[15]:
Ant Node A Priori Status Auto Metrics Flags Dead Fraction in Ant Metrics (Jee) Dead Fraction in Ant Metrics (Jnn) Crossed Fraction in Ant Metrics Flag Fraction Before Redcal Flagged By Redcal chi^2 Fraction ee Shape Modified Z-Score nn Shape Modified Z-Score ee Power Modified Z-Score nn Power Modified Z-Score ee Temporal Variability Modified Z-Score nn Temporal Variability Modified Z-Score ee Temporal Discontinuties Modified Z-Score nn Temporal Discontinuties Modified Z-Score Average Dead Ant Metric (Jee) Average Dead Ant Metric (Jnn) Average Crossed Ant Metric Median chi^2 Per Antenna (Jee) Median chi^2 Per Antenna (Jnn)
3 1 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.295376 -1.245704 -0.088374 -0.696223 -0.300828 -1.456800 -0.441608 2.019933 0.701476 0.607624 0.405974 4.162072 3.374514
4 1 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.669373 2.360206 0.617639 -0.936809 0.370758 -0.374975 0.780553 -0.490854 0.717388 0.608640 0.411464 4.518706 3.762980
5 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.083501 0.692530 -0.458476 1.277217 -0.000724 1.212258 -0.284117 -1.759935 0.723968 0.621697 0.409809 1.912612 1.775467
7 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.809654 -0.656882 -0.580354 -0.349234 -0.086839 0.808303 0.256866 30.151959 0.713375 0.613178 0.409432 3.166836 3.402888
8 2 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.534525 7.766646 6.139127 6.179239 15.824447 15.478217 1.024255 -2.995522 0.704535 0.591561 0.410040 3.426447 3.536827
9 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.359993 -1.229713 1.223930 -0.218864 1.315750 -0.760919 0.217379 -0.863568 0.697266 0.602438 0.413296 1.535587 1.434470
10 2 digital_ok 0.00% 3.22% 3.76% 0.00% 3.74% 0.00% -0.372645 0.482646 -0.251097 2.202219 0.107530 1.109056 3.059410 1.786457 0.687368 0.571759 0.423933 1.673178 1.554626
15 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.67% -0.351179 0.527538 1.655372 0.510701 0.547265 1.125057 0.053988 1.083461 0.718186 0.613470 0.404494 2.157282 2.002992
16 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 1.60% -1.004662 -0.753967 -1.113405 -0.206434 -0.855051 -1.567143 3.233218 2.873399 0.734203 0.634621 0.402644 2.075634 1.877462
17 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.67% -0.863192 -0.093738 -0.613271 -1.101726 -0.147988 -0.712208 0.139116 -0.453739 0.727919 0.634463 0.400037 2.004214 1.929014
18 1 RF_maintenance 100.00% 0.00% 85.50% 0.00% 100.00% 0.00% 8.735867 9.929230 -0.798113 7.740224 8.031890 6.630127 100.074203 53.364125 0.654320 0.335938 0.443995 2.518731 1.722487
19 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.312819 -1.408504 0.321424 -0.476979 -0.994329 1.260627 0.126228 3.650314 0.725378 0.626321 0.404282 1.664754 1.671610
20 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.751893 0.242228 6.824378 -0.131362 1.352958 -0.303523 0.369759 0.052279 0.680110 0.601050 0.400799 3.087911 3.292427
21 2 digital_ok 100.00% 5.37% 0.54% 0.00% 100.00% 0.00% 1.564234 0.055577 5.939931 3.951458 1.130927 1.703545 1.562235 16.532534 0.657098 0.577051 0.409219 2.984628 3.087802
27 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 14.408774 15.981739 12.466037 13.013440 23.563360 21.799858 2.697107 2.520662 0.038923 0.041694 0.002213 1.185477 1.193201
28 1 RF_maintenance 100.00% 44.68% 100.00% 0.00% 100.00% 0.00% 9.157252 15.920713 -0.230578 10.906269 13.718504 19.015801 6.551681 14.077782 0.407109 0.127213 0.254099 9.062087 1.866030
29 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 3.21% -0.520492 -0.715546 0.089088 -0.678495 -1.420396 -0.363806 -0.564840 -0.338271 0.739345 0.644007 0.393608 2.076548 2.123400
30 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.341247 -0.152248 2.310775 3.917833 0.838071 0.741254 4.552146 1.152480 0.718403 0.622043 0.392499 3.272310 3.372505
31 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.882670 0.909583 6.739982 5.385616 0.871083 0.288098 3.266241 3.422236 0.713712 0.603004 0.405420 2.897879 2.764476
32 2 RF_maintenance 100.00% 10.20% 6.44% 0.00% 100.00% 0.00% 25.830850 24.376855 2.473860 2.115540 10.506739 13.037668 119.658255 147.980810 0.608058 0.562533 0.243767 4.317257 3.845621
33 2 RF_maintenance 100.00% 0.00% 47.37% 0.00% 100.00% 0.00% 0.459109 8.619902 0.051135 3.220975 0.155115 2.776918 0.505735 22.995604 0.707662 0.421092 0.505821 3.259971 1.829942
36 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.223014 5.441447 -0.289075 0.597765 -0.356557 1.109929 0.563815 1.127534 0.714544 0.605215 0.409494 3.819449 3.424667
37 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.709127 0.027218 1.314331 -0.986186 1.211011 -0.802194 0.420672 21.907539 0.718786 0.627754 0.403897 3.247090 3.520579
38 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.315795 -0.224027 2.049169 -0.467297 3.147973 0.021052 8.463918 3.241908 0.726336 0.641999 0.405012 3.034976 3.239425
40 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 23.53% 0.477550 1.120820 1.065709 3.972565 0.670342 0.273296 0.065159 -0.086937 0.733168 0.627792 0.401253 2.162522 2.188436
41 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 4.81% 0.812149 -0.701658 0.828004 -1.055656 0.510143 -1.085879 -0.916883 -0.917370 0.747010 0.653418 0.393942 1.954036 1.867830
42 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 13.37% -0.599416 0.705328 0.642918 0.556815 -0.580929 0.961330 -1.102024 -0.427789 0.747354 0.657210 0.398616 2.033867 1.898867
45 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.431244 1.702544 0.966937 4.523476 0.480669 1.060553 0.388977 33.744417 0.722329 0.595450 0.413717 3.165789 2.817115
46 5 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 1.60% -0.969583 -0.509892 -0.056627 0.058457 -1.053605 0.268151 -0.065376 0.408187 0.720426 0.619264 0.410710 1.580463 1.502297
50 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 1.60% 0.205621 1.224955 -1.078753 -0.092001 0.458656 0.000724 2.546934 1.714938 0.706938 0.610663 0.395314 1.667905 1.644226
51 3 digital_ok 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 3.276920 27.779301 3.916647 16.891512 8.151313 21.343173 -0.812597 12.078620 0.724482 0.046089 0.463026 3.540625 1.173602
52 3 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 7.279255 27.438575 1.023629 16.134984 2.955392 21.667300 2.934347 7.851433 0.705506 0.037840 0.438823 4.989714 1.185193
53 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.531508 5.518740 4.734575 4.305393 10.606763 9.029370 -0.760673 5.760149 0.742002 0.657554 0.394255 4.014109 3.660388
54 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 46.52% -0.095485 -0.295708 -0.284574 0.744925 1.354280 2.930339 1.621107 0.532592 0.739191 0.648630 0.376606 2.618112 2.800785
55 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.553243 0.163673 5.270772 0.094579 0.088004 -0.577271 3.675417 -0.339097 0.711321 0.663233 0.390599 2.784003 3.828771
56 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 19.79% -0.745617 -0.176838 0.416688 0.227593 -0.665934 -0.354340 -1.025978 -0.789684 0.750610 0.667284 0.387471 2.255346 2.083723
57 4 digital_ok 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 14.508955 0.351881 11.661617 -0.274314 23.796771 8.801273 1.721287 2.252383 0.046961 0.656896 0.414900 1.332049 3.416631
65 3 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
66 3 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
67 3 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
68 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.67% 0.812126 0.278159 -0.500951 2.466993 0.726294 2.263045 0.036082 -0.068822 0.737498 0.653172 0.387573 1.668160 1.636211
69 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 40.11% -1.602981 0.045546 -0.193608 -0.915366 -0.443563 -1.062572 -0.111762 1.596738 0.746867 0.665679 0.384744 1.966249 1.857210
70 4 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.042553 -1.751732 2.754601 -0.653202 4.041239 -1.386704 1.026125 0.801958 0.744842 0.672769 0.394696 19.102750 17.529136
71 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 100.00% -0.585315 -0.845664 -0.496337 -0.353250 -1.003222 -0.662599 -0.289619 0.915883 0.744717 0.671044 0.386415 14.782099 16.384547
72 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 41.18% 2.626474 -1.068972 -0.090095 0.328108 -0.311250 -0.823968 2.400931 -1.468296 0.742657 0.670625 0.393661 2.272536 1.940520
73 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.820390 0.406211 0.968229 5.219612 0.471917 1.582536 1.459831 0.262022 0.733591 0.614748 0.415753 3.248713 2.707553
81 7 digital_ok 0.00% 0.00% 0.00% 0.00% 1.60% 0.00% -1.376966 1.844047 1.518822 1.137237 0.278804 1.847858 0.742764 -1.106368 0.682017 0.611311 0.404756 1.928306 1.717098
82 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.722525 -1.373475 0.088242 1.483895 -0.421671 0.167282 -0.430333 -0.309560 0.701682 0.617893 0.405324 3.611072 3.300083
83 7 digital_ok 100.00% 48.44% 0.00% 0.00% 100.00% 0.00% 12.018308 1.336838 10.027307 1.057475 20.897666 0.642725 1.408664 -1.275710 0.363771 0.652338 0.469694 1.386947 3.405432
84 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.952492 7.729233 3.676990 3.323930 7.441866 6.253083 -2.278671 -1.590056 0.656811 0.575567 0.362171 2.701960 2.697229
85 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.631497 14.721437 10.774805 11.296353 23.799106 22.121836 2.600901 3.631480 0.032191 0.032916 0.001014 1.151032 1.150155
86 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 14.495049 17.641330 10.551598 11.041345 23.762385 22.058431 1.659673 4.536869 0.034598 0.032853 0.001943 1.147054 1.145596
87 8 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.832052 8.043042 5.067151 6.141674 12.025429 15.038905 -1.811509 -3.541012 0.665104 0.571543 0.370566 2.555299 2.489303
88 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 14.714542 16.138192 10.487132 11.114774 23.812561 22.117769 2.542445 1.738265 0.037390 0.037598 -0.000318 1.175886 1.173195
90 9 RF_maintenance 100.00% 8.06% 0.00% 0.00% 100.00% 0.00% 4.113186 1.337015 6.649849 1.038179 8.118045 1.360548 2.386743 4.508478 0.644818 0.650622 0.424668 2.813824 3.974469
91 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 14.249166 15.195152 10.446439 11.337120 23.831973 22.123148 2.093448 1.914203 0.034829 0.037709 0.000927 1.215741 1.342585
92 10 digital_ok 100.00% 63.48% 87.65% 0.00% 100.00% 0.00% 11.593171 11.630566 0.841965 4.284127 13.740275 13.934146 2.689926 12.038813 0.368781 0.343611 0.172792 4.005597 4.349483
93 10 RF_maintenance 100.00% 69.39% 100.00% 0.00% 100.00% 0.00% 8.176889 14.076318 5.918966 13.296160 13.146533 22.015169 4.270820 3.179690 0.344677 0.039234 0.206194 3.255495 1.287343
94 10 RF_maintenance 100.00% 2.15% 0.00% 0.00% 100.00% 0.00% -0.076186 -0.915729 0.143115 0.326810 0.534394 0.431744 2.670580 4.520114 0.698246 0.596200 0.417037 3.724536 3.355178
98 7 digital_maintenance 100.00% 0.00% 13.43% 0.00% 100.00% 0.00% 0.264549 20.147416 -0.697822 5.229810 -0.621645 5.876180 -0.165814 5.049590 0.686488 0.519460 0.399944 4.541926 4.205926
99 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 1.60% 1.276146 -0.996642 0.961013 1.325902 0.866311 0.007157 -0.951187 -0.103055 0.705703 0.607507 0.403634 1.850446 1.725868
100 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.279495 -0.379270 -0.000258 -0.484019 -0.678640 -0.943276 0.353207 0.011855 0.720235 0.638559 0.399099 3.721211 3.756403
101 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.398642 7.598879 3.926836 2.793696 7.957829 4.965268 5.410943 0.102643 0.650935 0.570412 0.367878 2.448966 2.539157
102 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 12.226439 12.472507 9.792376 10.734563 145.082527 173.994240 1873.025784 2235.964511 0.034256 0.033401 0.001382 1.160933 1.155722
103 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.007361 7.954127 3.297659 2.905223 5.775051 4.745934 -1.964466 -2.052113 0.662828 0.577574 0.372505 2.514768 2.317076
104 8 RF_maintenance 100.00% 15.04% 15.04% 84.96% 100.00% 0.00% 7.058835 55.149017 2.523826 10.105468 5.475263 2.392565 -0.950665 0.791701 0.295994 0.254255 -0.225617 1.972929 1.865155
105 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 15.154245 17.742859 10.450418 11.336645 23.867395 22.119653 1.624228 1.566235 0.035663 0.037430 0.003874 1.207202 1.250543
106 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 1.60% 0.009829 0.201044 -0.876546 -1.113347 -0.247391 -0.643587 -0.148245 -0.121597 0.735834 0.651473 0.403591 1.720868 1.618419
107 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 14.264330 14.487448 9.920205 10.568292 23.891440 22.144918 1.719778 2.036609 0.038854 0.039897 0.003009 1.231621 1.218152
108 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 10.70% -0.079194 3.282161 -0.289923 0.839792 -1.818102 0.290568 -1.014904 -1.563764 0.734255 0.648716 0.407989 1.614084 1.570326
109 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.53% -0.786733 -0.454824 -0.050836 -0.301608 -1.403948 0.126979 -0.659606 0.018734 0.730083 0.635992 0.406662 1.813392 1.777497
110 10 RF_maintenance 100.00% 9.67% 0.00% 0.00% 100.00% 0.00% 31.456348 1.398662 0.241567 0.284239 2.995042 -1.298143 -0.355669 -1.230840 0.627381 0.634855 0.339995 5.089418 5.181383
111 10 digital_ok 0.00% 1.61% 0.00% 0.00% 1.60% 0.00% 0.319502 0.460861 -0.730411 0.186620 0.029714 -0.427460 -0.460036 2.185296 0.703883 0.610955 0.409636 1.814045 1.742013
112 10 RF_maintenance 0.00% 2.69% 0.00% 0.00% 100.00% 0.00% -0.992149 -0.193630 -0.647948 0.090025 -0.719258 -0.984711 -0.789747 -1.253059 0.696719 0.604215 0.415855 4.046387 4.286715
116 7 RF_maintenance 0.00% 10.74% 0.00% 0.00% 100.00% 0.00% 0.532000 1.095391 2.492944 -0.656980 0.664722 -0.714279 -0.011855 -0.913275 0.659492 0.593862 0.415705 3.623444 4.746405
117 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 1.60% 2.070087 1.757995 1.738500 1.600468 2.498335 2.076315 -1.799941 -2.012754 0.702665 0.616270 0.417802 1.896021 1.739439
118 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 1.60% 1.491992 0.347015 0.730303 -1.000884 -0.182969 -0.868178 0.135413 0.688903 0.711058 0.624616 0.409664 1.997669 1.805413
119 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.932190 0.011174 2.630464 -0.596811 4.483369 -1.237126 -1.725225 -0.589382 0.724857 0.635003 0.407720 3.558627 3.577764
120 8 RF_maintenance 100.00% 82.81% 100.00% 0.00% 100.00% 0.00% 12.261564 24.718382 1.395140 14.695431 14.487098 22.067293 0.423657 7.619264 0.344004 0.047369 0.262273 2.499448 1.185160
121 8 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.785338 4.788601 3.458394 0.503292 6.513508 -0.276802 30.626382 21.507531 0.657564 0.575032 0.367841 2.981133 2.738294
122 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.744048 6.177601 2.744784 3.296680 4.250870 6.692911 -1.463664 -1.066101 0.659622 0.566905 0.370381 2.909442 2.738079
123 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.181879 6.877565 4.600965 4.917500 10.553862 11.228436 -2.595201 -2.501014 0.662984 0.568524 0.372005 3.111500 2.897060
125 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.762110 14.302177 10.632671 11.401598 23.861368 22.149837 1.531468 2.181952 0.028404 0.030086 0.001784 1.247193 1.255490
126 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 14.205633 15.455333 10.493278 11.530187 23.866216 22.135420 1.718551 1.973844 0.031382 0.031144 -0.000219 1.228929 1.288641
127 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.392653 0.141934 2.211315 0.362435 1.039064 0.798022 0.497745 1.770676 0.717015 0.641082 0.394795 4.645259 4.799966
128 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.085581 1.318017 -0.840190 0.301993 -0.915117 0.534398 -0.254454 -0.108088 0.725557 0.629824 0.395666 1.784966 1.650789
129 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
130 10 digital_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
135 12 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -1.184051 -0.864676 -0.133489 -0.553900 0.090273 -1.378401 2.449165 0.496478 0.092508 0.096665 0.019502 1.308490 1.305875
136 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.231134 7.574081 -0.449947 -0.255138 0.375434 0.364539 0.104922 3.319751 0.085034 0.098206 0.016621 1.251774 1.251581
137 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 14.337225 15.311558 10.283551 10.939860 23.749857 22.088167 1.796926 2.164046 0.033441 0.042058 0.003509 1.269265 1.412589
138 7 digital_ok 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 16.103777 0.759940 10.249713 0.941746 23.817910 0.077710 1.810952 0.109204 0.043689 0.601846 0.410329 1.271621 3.923122
140 13 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 1.60% 2.295447 1.537863 -0.859729 -1.014611 0.010247 0.550621 0.586272 0.208752 0.720097 0.631675 0.403046 1.879834 1.793382
141 13 digital_ok 100.00% 0.00% 69.39% 0.00% 100.00% 0.00% 1.375780 10.368430 1.509886 11.728716 1.121397 15.786298 0.985466 5.260474 0.717507 0.389983 0.462633 4.180185 2.462518
142 13 digital_ok 100.00% 82.28% 100.00% 0.00% 100.00% 0.00% 15.123407 16.874650 8.990542 13.166010 17.183453 21.972955 2.272559 2.483217 0.337402 0.039545 0.192588 4.599249 1.319888
143 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 1.60% 0.415402 -1.144133 0.709375 0.112331 0.448707 -0.892510 -0.298176 -1.122814 0.730061 0.660766 0.390328 1.723887 1.607108
144 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.810445 0.832826 6.978203 7.034908 4.428615 2.126091 0.811374 0.702112 0.680273 0.593983 0.391587 3.814265 4.247052
145 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.600921 13.959275 12.557936 13.246639 23.660949 22.014156 2.436408 3.051177 0.029473 0.032200 0.002570 1.345184 1.361605
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 15.130718 17.213150 12.596824 13.604259 23.683568 21.994896 5.957858 6.830061 0.051478 0.053054 0.001467 1.316880 1.315126
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.975218 14.290130 12.217139 12.948379 23.542810 21.878927 2.461073 2.547868 0.031200 0.033270 0.001671 1.322561 1.314741
156 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.251861 -0.111209 -0.001759 -1.059088 0.604696 -1.096030 3.465114 21.307735 0.054027 0.061700 0.003997 1.205253 1.203749
157 12 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.211209 0.466249 0.311718 0.772078 0.501122 -0.109542 0.536813 -1.253383 0.071512 0.069728 0.006167 1.223694 1.226141
158 12 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.156376 -0.039124 3.738480 1.664809 1.039912 0.753783 1.337476 1.056455 0.091449 0.076672 0.012452 1.257437 1.264019
160 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.561062 14.184492 12.406034 13.073985 23.665251 21.823918 2.533034 3.136578 0.042195 0.045165 0.002421 1.309402 1.310089
161 13 digital_ok 100.00% 0.00% 16.11% 0.00% 100.00% 0.00% -0.323295 32.360653 -0.310310 4.354197 -0.031573 3.689637 0.281761 0.055264 0.723199 0.499144 0.390698 4.309031 4.993336
162 13 digital_ok 0.00% 0.00% 0.00% 0.00% 0.53% 0.53% 0.077913 -0.426881 -1.023145 -0.453337 -0.459768 -0.992519 0.599675 -0.485578 0.725767 0.638492 0.395085 2.032333 2.002516
163 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.53% 0.53% 0.244468 -0.406750 1.307383 2.961438 0.605221 0.668398 0.923240 0.660079 0.728727 0.632515 0.388880 2.042419 1.971932
164 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.53% 1.07% -0.445021 -0.272415 -0.190747 2.120971 -0.060237 0.855433 0.157607 1.586014 0.732316 0.637723 0.392108 2.167967 1.937056
165 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.53% 5.88% 0.865680 0.426974 1.913735 1.854867 2.136833 0.418882 -1.103269 0.395631 0.737872 0.637008 0.392395 2.310648 2.206321
166 14 RF_maintenance 100.00% 2.69% 0.00% 0.00% 100.00% 0.00% 14.402102 0.395382 -0.484213 0.180153 5.981800 2.796619 9.543694 0.469410 0.666388 0.627148 0.351858 3.350991 3.169922
167 15 digital_ok 100.00% 13.96% 12.35% 0.00% 100.00% 0.00% 15.154183 13.460318 5.618118 5.954006 22.354998 16.987666 28.664329 16.337907 0.579182 0.508878 0.226722 3.176235 2.943361
168 15 RF_maintenance 100.00% 2.15% 0.00% 0.00% 100.00% 0.00% 8.545584 9.881243 6.255708 6.984341 16.040957 17.726976 -3.316348 -4.010474 0.703123 0.598669 0.397193 4.461565 3.717711
169 15 digital_ok 100.00% 2.69% 0.00% 0.00% 100.00% 0.00% 9.648870 8.922885 7.024923 6.475806 18.468218 16.361036 -3.231959 -3.004829 0.692101 0.587783 0.397871 4.844898 3.840945
170 15 digital_ok 100.00% 5.91% 3.22% 0.00% 100.00% 0.00% 9.813615 7.894258 7.120849 6.136183 19.002990 15.327270 -3.253614 -3.330627 0.674649 0.588713 0.405377 4.362408 3.839626
176 12 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.009829 -0.332247 -0.301596 -0.036792 -1.091368 -0.803202 -0.611463 -1.206071 0.063039 0.072091 0.006434 1.316305 1.316881
177 12 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.393319 1.108312 0.162417 4.049076 -1.122919 4.832165 -0.467219 7.894013 0.076161 0.075997 0.007402 1.267158 1.266218
178 12 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.960907 -1.124039 -1.127315 -0.768713 -0.971708 -1.083331 -0.442587 -0.762248 0.078029 0.069365 0.008344 1.242502 1.243434
179 12 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.286057 0.478646 0.802408 0.399597 2.828717 0.733600 4.960708 -0.527952 0.072724 0.075492 0.013310 1.255948 1.253271
180 13 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% -0.445205 15.600377 0.155079 13.240072 -1.152609 21.753114 -0.644450 2.662037 0.715515 0.101318 0.493185 10.019646 1.293280
181 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.616990 30.858839 12.606657 9.059269 23.684369 18.121264 2.440152 2.980020 0.045316 0.193701 0.094570 1.208115 1.696739
182 13 RF_maintenance 100.00% 0.00% 15.04% 0.00% 100.00% 0.00% 7.567531 5.367529 6.177408 0.909002 15.545814 73.715789 -3.301856 13.778142 0.710753 0.582518 0.410403 3.996587 3.683420
183 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -1.586383 0.543872 -0.704932 1.051715 -0.595197 0.063157 -0.416049 11.549076 0.724149 0.612165 0.406869 3.797416 3.503790
184 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.53% 1.07% 0.679608 0.301412 2.124718 2.662108 0.777829 0.350606 1.638241 -0.028605 0.721761 0.617661 0.394630 2.425407 2.136854
185 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.53% 6.95% 0.712808 -0.026529 0.751834 -0.106088 -0.301205 0.327152 -1.040039 -0.418427 0.737778 0.639110 0.392627 2.307385 2.063809
186 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.255380 -0.339930 4.121897 4.749680 1.192710 0.507902 2.880688 -0.093756 0.703012 0.604909 0.386120 3.734707 3.658734
187 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.367571 0.526269 3.103526 -0.022155 0.649666 -1.577615 3.649197 6.157181 0.702921 0.640202 0.389463 3.634001 4.244475
189 15 digital_ok 0.00% 2.69% 0.00% 0.00% 3.21% 1.07% 1.635292 1.946108 0.441308 -0.669921 0.535337 -0.173427 0.567710 2.448541 0.696247 0.605342 0.402610 1.765146 1.510272
190 15 digital_ok 100.00% 22.13% 100.00% 0.00% 100.00% 0.00% 37.118481 16.754316 2.329699 13.258986 10.790326 22.025435 27.070289 2.899639 0.522483 0.045222 0.367475 3.530852 1.710410
191 15 digital_ok 0.00% 5.91% 4.30% 0.00% 7.49% 0.00% -0.812668 -0.506045 0.000258 -0.670487 0.350883 -0.463623 0.082748 2.515498 0.685288 0.588895 0.417881 1.496411 1.392695
203 18 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
205 19 RF_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 9.327330 3.637173 6.752754 2.511022 17.896919 5.601820 32.559296 46.615555 0.697401 0.601443 0.392945 4.669989 4.035061
206 19 RF_ok 100.00% 8.06% 0.00% 0.00% 100.00% 0.00% 2.467234 8.187259 -0.057536 5.797038 4.187600 14.313287 36.540679 34.193648 0.649012 0.593342 0.395075 2.914809 3.168783
207 19 RF_ok 100.00% 4.30% 0.00% 0.00% 100.00% 0.00% 10.109078 7.889864 7.183918 5.736839 19.395744 17.502236 12.230989 8.437075 0.671390 0.589846 0.382817 7.662634 6.450161
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% 8.754730 6.577538 19.865483 20.327689 1321.092415 1537.102781 10414.115151 15218.196718 nan nan nan 0.000000 0.000000
223 19 RF_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.581398 6.731779 5.679054 4.861504 13.897115 23.700925 -2.967968 9.116955 0.692524 0.579428 0.406881 3.767554 2.990866
224 19 RF_ok 100.00% 8.06% 4.30% 0.00% 100.00% 0.00% 11.270744 10.818618 8.204846 7.772461 22.515429 19.984843 -4.365221 -4.482497 0.656128 0.546848 0.391409 4.414827 3.277055
241 19 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
242 19 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
243 19 RF_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 7.652027 7.072381 24.779638 25.430327 1841.091668 1926.043721 18788.591220 18784.422529 nan nan nan 0.000000 0.000000
320 3 dish_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 18.365590 17.722227 8.499777 8.845491 23.491634 21.784320 6.167716 3.902780 0.065357 0.058461 -0.002808 0.000000 0.000000
321 2 not_connected 100.00% 13.96% 32.22% 0.00% 100.00% 0.00% 5.008286 3.999921 4.366363 3.765359 11.369613 9.435299 40.818207 40.041899 0.617424 0.460956 0.401298 0.000000 0.000000
323 2 not_connected 100.00% 33.94% 38.67% 0.00% 100.00% 0.00% 16.000362 5.785017 -0.207845 4.887328 10.881299 11.960487 2.188946 -0.728150 0.449174 0.441226 0.306142 0.000000 0.000000
324 4 not_connected 100.00% 14.50% 33.83% 0.00% 100.00% 0.00% 7.507927 8.099894 5.876167 5.796839 15.130416 14.425023 -2.920325 -3.500384 0.607463 0.450332 0.386742 0.000000 0.000000
329 12 dish_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 4.286782 3.406666 0.466721 3.498471 6.198445 7.704406 4.338254 -1.896189 0.089932 0.086128 0.033042 0.000000 0.000000
333 12 dish_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 11.899955 3.409875 4.024726 3.216013 18.172519 7.572994 1.307753 -0.277393 0.075357 0.086565 0.030884 0.000000 0.000000
In [16]:
# print ex_ants for easy copy-pasting to YAML file
proposed_ex_ants = [ant for i, ant in enumerate(ants) if np.any([col[i] > .1 for col in bar_cols.values()])]
print('ex_ants: [' + ", ".join(str(ant) for ant in proposed_ex_ants) + ']')
ex_ants: [3, 4, 7, 8, 18, 20, 21, 27, 28, 30, 31, 32, 33, 36, 37, 38, 40, 42, 45, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 69, 70, 71, 72, 73, 82, 83, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 98, 100, 101, 102, 103, 104, 105, 107, 108, 110, 112, 116, 119, 120, 121, 122, 123, 125, 126, 127, 129, 130, 135, 136, 137, 138, 141, 142, 144, 145, 150, 155, 156, 157, 158, 160, 161, 166, 167, 168, 169, 170, 176, 177, 178, 179, 180, 181, 182, 183, 186, 187, 190, 203, 205, 206, 207, 220, 221, 222, 223, 224, 241, 242, 243, 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_2459778.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 [ ]: