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 = "2459773"
data_path = "/mnt/sn1/2459773"
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-12-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/2459773/zen.2459773.25320.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/2459773/zen.2459773.?????.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/2459773/zen.2459773.?????.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.251394 0.224837 1.669462 1.261253 0.653043 0.866287 0.107832 1.424094 0.457590 0.463295 0.292226 3.531006 3.689690
4 1 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.299608 2.624924 -0.708231 -0.218484 -1.304417 -0.421960 -0.059833 -0.760527 0.470856 0.466855 0.288478 5.422488 6.300550
5 1 digital_ok 0.00% 0.00% 0.00% 0.00% 28.95% 0.00% 0.333243 0.664404 0.609465 2.423728 -0.267332 2.936364 -0.185683 -1.889390 0.477188 0.467460 0.290946 1.941774 2.211606
7 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.404872 -0.898366 0.004204 -0.555298 -0.870849 0.786401 0.159226 25.023518 0.467813 0.466506 0.295392 5.318950 7.291529
8 2 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.145642 4.291212 7.686341 9.252026 8.850232 9.428915 0.312320 -2.551098 0.449089 0.434798 0.283632 5.166845 5.716605
9 2 digital_ok 0.00% 0.00% 0.00% 0.00% 36.84% 0.00% -0.203957 -0.874399 0.046672 -0.347639 0.311765 -0.221559 -0.137673 1.575635 0.453074 0.445010 0.291913 1.121246 1.183262
10 2 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
15 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 28.95% 0.166261 0.748419 1.139317 -0.716004 1.967908 -0.466334 0.426748 0.310768 0.479223 0.472440 0.290648 1.831490 2.276238
16 1 digital_ok 0.00% 0.00% 0.00% 0.00% 5.26% 7.89% -1.072026 -0.226368 -0.856647 0.827651 -0.915036 -0.048945 2.119081 -1.135070 0.483961 0.481145 0.287952 1.772665 1.917431
17 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 7.89% -0.262271 1.669255 0.088749 0.393362 0.988115 0.709306 2.059873 1.118976 0.479450 0.475917 0.282108 1.728501 2.058859
18 1 RF_maintenance 100.00% 67.20% 100.00% 0.00% 100.00% 0.00% 7.727021 16.155975 10.143490 16.787599 9.456786 7.476296 41.711220 98.471583 0.397941 0.259583 0.241440 3.634376 2.743404
19 2 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
20 2 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
21 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.876612 5.388680 0.503208 15.776101 1.911283 36.260508 2.704297 31.905982 0.455630 0.450316 0.287061 4.472808 4.230255
27 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 22.620340 26.186050 89.383527 90.414090 22.354435 19.656202 14.028069 11.245351 0.052434 0.054427 0.003551 1.324577 1.337143
28 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 8.097947 33.604244 10.604263 52.673156 19.491399 15.694819 -1.947902 46.981330 0.294932 0.147622 0.161928 8.764183 4.284167
29 1 digital_ok 0.00% 0.00% 0.00% 0.00% 34.21% 0.00% -1.007184 -0.657245 -0.299774 -0.979885 -0.170866 -0.944841 -0.235396 -0.531626 0.489947 0.488183 0.293434 1.789697 2.092029
30 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.337538 -0.722702 -0.065863 -0.962815 0.978646 -0.157719 6.078512 0.755171 0.492866 0.492186 0.291331 4.523112 5.399972
31 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 36.84% 0.924986 0.791624 1.748485 2.484202 1.349743 0.134303 2.207678 2.375843 0.501185 0.490540 0.297927 1.293129 1.369546
32 2 RF_maintenance 100.00% 69.89% 45.70% 0.00% 100.00% 0.00% 29.787886 31.702020 7.053998 5.204094 0.966041 0.622746 4.261315 1.138247 0.394431 0.406260 0.156460 5.996343 4.784826
33 2 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% -0.156698 4.183521 -0.498392 -0.358029 1.841024 2.941663 1.196897 13.866031 0.471893 0.294355 0.332718 9.789549 3.848086
36 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.546510 7.205667 1.244405 5.480439 -0.060972 3.679161 2.286610 3.412648 0.495100 0.476592 0.304554 3.777832 3.702869
37 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.315541 3.192676 4.680159 6.873394 5.197373 6.772939 1.801637 6.211073 0.509760 0.481870 0.305831 2.855671 2.598386
38 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.341937 4.111194 5.014355 7.785299 7.426456 8.269989 10.844428 -1.322053 0.507765 0.486756 0.312407 4.992109 4.726008
40 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.248194 0.798661 2.348468 1.567966 2.086853 1.584878 0.960910 0.232497 0.085399 0.057710 0.019094 1.184942 1.186733
41 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.564974 -0.714736 0.326436 -0.285875 0.208834 0.312978 -1.029052 -0.646246 0.068563 0.059694 0.009518 1.222409 1.220508
42 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.907396 0.286703 -0.385860 -0.427048 -1.506916 -0.313709 -0.773792 -0.391577 0.074308 0.076503 0.012442 1.208792 1.215153
45 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.526112 0.816394 17.268559 2.580234 17.046456 3.858450 5.013544 12.131437 0.495483 0.473354 0.304274 6.122242 6.099916
46 5 digital_ok 0.00% 0.00% 0.00% 0.00% 26.32% 10.53% -0.587587 -0.976843 -0.006702 -0.740119 -0.411414 -0.282803 -0.606687 -0.197493 0.480859 0.472230 0.297976 1.135115 1.166052
50 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.564522 1.581900 3.934823 -0.708223 4.228286 -0.128573 3.135720 0.459377 0.502485 0.485616 0.285464 4.012317 3.893714
51 3 digital_ok 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 0.222825 43.422560 -0.512165 108.193247 -1.414211 19.964093 0.999632 23.679284 0.524183 0.045950 0.311831 3.805525 1.297185
52 3 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 5.823499 42.438855 -0.107098 104.518344 1.132345 20.495235 7.812953 17.939777 0.487486 0.046103 0.284369 6.522415 1.273464
53 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.896039 1.033755 1.947277 1.325035 1.415109 1.067360 1.968680 10.484373 0.507495 0.509561 0.312112 7.744069 8.349155
54 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.298322 -0.159696 0.225624 -0.410016 -0.361399 1.796928 0.704611 0.335128 0.099460 0.061480 0.020317 1.269380 1.272667
55 4 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 5.904291 6.459756 38.083190 11.794028 15.826256 12.968024 10.995656 -3.692275 0.060154 0.082708 0.008894 1.212658 1.198388
56 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.671617 0.679491 -0.959492 1.164970 -0.663582 0.126404 -0.426305 0.366240 0.062164 0.061053 0.006913 1.255578 1.255308
57 4 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 8.050259 0.797989 19.700783 4.379611 10.021090 5.047012 6.305695 0.985084 0.082219 0.113648 0.019260 1.238942 1.233410
65 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.773373 2.683908 4.122028 4.839187 3.760421 5.503855 -2.028523 -1.272442 0.503475 0.493106 0.290862 6.137567 5.795729
66 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.922475 1.667158 7.217977 2.283492 8.470829 3.950450 -2.788157 0.604284 0.523006 0.521927 0.297426 4.014810 4.461687
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.132547 4.852522 6.029879 17.488327 5.598475 12.764155 3.976818 11.508234 0.542362 0.541387 0.308220 5.313961 6.797239
68 3 digital_ok 0.00% 0.00% 0.00% 0.00% 10.53% 0.00% 1.116007 0.307481 2.244226 2.425758 3.814528 0.195904 -1.379242 0.385647 0.510467 0.523527 0.311808 0.866644 0.914702
69 4 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.870100 -0.626997 -0.624968 -0.932193 -0.180187 2.271653 0.000379 1.928210 0.105286 0.075320 0.026093 1.298682 1.288753
70 4 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 4.946703 5.888213 -0.091750 11.830394 -0.291480 12.723522 0.225657 -3.496973 0.065343 0.101367 0.011107 1.320094 1.308678
71 4 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.118100 5.103292 -0.860409 10.235153 -0.230996 11.017283 0.044216 -3.247602 0.085667 0.093280 0.016572 1.229195 1.213936
72 4 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 3.541709 -0.531711 1.625201 -0.396612 2.892748 0.015208 7.181337 -0.557266 0.068125 0.099119 0.009498 1.232633 1.228930
73 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.772792 0.774783 1.536862 3.115565 3.501285 1.557450 4.786312 1.528234 0.502904 0.494821 0.314480 3.962091 3.673943
81 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.827525 0.481477 7.910330 -0.547268 8.212380 -0.197205 3.154625 0.170696 0.507467 0.502056 0.281658 5.065076 5.120958
82 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.359737 0.716234 1.252776 0.709664 2.331538 -0.117886 -1.062040 -0.005188 0.524217 0.533794 0.291309 8.015747 8.174215
83 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.838302 7.379694 30.544827 13.443826 7.239303 14.157155 6.718817 -3.331006 0.529927 0.508077 0.301381 3.970626 5.244126
88 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 25.177699 26.741204 80.151218 81.721715 22.870943 20.100895 18.348012 12.730672 0.043610 0.046411 0.000956 1.245750 1.255377
89 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
90 9 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.277040 0.423785 6.686635 -0.819663 5.563795 -0.422330 7.668397 3.241601 0.506605 0.504716 0.313071 7.644327 8.368504
91 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 22.629520 25.028009 80.057695 82.715417 22.022206 19.571344 14.034324 11.851538 0.039060 0.044129 0.001230 1.290232 1.666274
92 10 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 9.217859 11.646280 4.974547 0.928805 18.164682 12.449799 -1.037273 11.484942 0.296763 0.310840 0.132744 5.408757 7.749032
93 10 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 8.415401 27.809352 0.302648 91.699583 11.771589 19.865980 2.636397 15.468032 0.297951 0.053420 0.178135 3.744895 1.360658
94 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.010534 3.052056 1.892365 8.826854 1.967529 6.341323 3.344436 5.761990 0.460163 0.464499 0.293991 8.113784 10.663711
98 7 digital_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.075899 10.614731 9.947729 0.773600 12.395985 1.782242 -3.406687 2.900466 0.480094 0.498226 0.267465 3.551321 4.364611
99 7 digital_ok 0.00% 0.00% 0.00% 0.00% 28.95% 0.00% 0.863844 -0.049831 2.484157 0.006702 3.562660 1.247308 -1.714197 -1.033783 0.518980 0.529511 0.283069 1.143933 1.109559
100 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.545636 5.297798 12.103290 10.402134 14.163685 11.443990 -3.882959 -3.690037 0.507263 0.518778 0.285815 5.374926 6.050708
105 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 25.152778 31.450679 76.656051 79.273242 21.827676 19.486316 10.261235 9.267940 0.039649 0.042902 0.006005 1.376630 1.997373
106 9 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.079672 1.759282 6.696251 3.633042 4.897780 2.671404 2.984666 2.222610 0.504498 0.506789 0.316320 3.835290 4.036317
107 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 22.981404 23.104996 77.007516 78.612658 21.916639 19.379855 8.308270 9.426646 0.043869 0.046671 0.004832 1.293538 1.295480
108 9 digital_ok 0.00% 0.00% 0.00% 0.00% 36.84% 0.00% -0.001602 1.824297 1.531958 1.050071 0.364483 1.062471 0.175434 -1.339494 0.510980 0.511411 0.313390 1.053906 1.049672
109 10 digital_ok 0.00% 0.00% 0.00% 0.00% 21.05% 0.00% -0.443748 -0.709877 0.515673 0.292011 -0.290036 -0.026546 0.535303 -0.690011 0.500875 0.503881 0.302116 1.214762 1.347792
110 10 RF_maintenance 100.00% 53.76% 0.00% 0.00% 100.00% 0.00% 39.782219 7.167364 8.572413 12.872353 0.793191 13.374535 2.030919 -3.024159 0.408703 0.462020 0.252385 5.479649 6.254458
111 10 digital_ok 0.00% 0.00% 0.00% 0.00% 26.32% 0.00% 0.001602 0.284977 -0.706583 -0.413210 -0.295832 1.788204 -0.493530 1.083548 0.467172 0.470770 0.286623 1.455717 1.553757
112 10 RF_maintenance 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% -0.750163 -0.278479 0.262949 -0.851921 -0.256129 1.473175 0.232448 -0.536263 0.176218 0.180420 -0.262322 2.056918 2.019362
116 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.436075 6.419744 4.615868 11.909139 4.416144 12.496405 -1.176451 -3.728525 0.478961 0.468137 0.268059 7.395427 9.577624
117 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.296166 0.547373 4.554786 0.797298 4.694045 0.909322 -2.162583 -1.223881 0.515360 0.529343 0.291021 5.986921 8.511369
118 7 digital_ok 0.00% 0.00% 0.00% 0.00% 26.32% 2.63% 1.024432 1.037270 1.754474 -0.323187 1.844325 -0.684379 -0.575655 0.954175 0.522361 0.532617 0.296178 1.130926 1.160952
119 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.124388 1.852016 5.028481 3.073822 4.531492 2.082260 -2.296724 -1.866524 0.513135 0.525760 0.305062 3.314442 3.764465
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% 23.092794 24.828514 80.872896 83.008083 21.785158 19.508991 8.501250 13.599769 0.030312 0.033988 0.003012 1.300215 1.317924
126 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 23.454329 25.667374 80.180700 83.550409 22.013544 19.556421 11.038653 13.279372 0.033342 0.034002 -0.001575 1.231723 1.237210
127 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.987733 0.810089 2.943528 2.009570 2.964485 2.201283 1.392065 2.152823 0.512461 0.517681 0.305440 8.478649 10.115812
128 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.519866 1.522605 0.012129 -0.138120 0.275127 -0.377742 0.255920 -0.533830 0.498580 0.496542 0.288881 1.296462 1.368487
129 10 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.813983 -0.903285 8.225001 -0.874466 8.250083 -0.772054 2.568959 0.112445 0.485933 0.490460 0.291271 7.283435 7.812512
130 10 digital_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 22.320375 8.057133 89.058110 9.148097 22.212394 14.723578 8.522676 1.537028 0.051614 0.288432 0.148070 1.367014 3.757895
135 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 10.53% -0.789171 -0.102511 -0.977529 -0.299293 -1.027706 0.282129 1.416932 0.204417 0.469262 0.476511 0.275699 1.034022 1.078231
136 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.613988 8.652306 -0.790188 0.792888 -0.395947 0.402275 0.156851 4.599963 0.501271 0.497698 0.277456 5.762231 8.345747
137 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 21.305493 25.337733 76.857595 80.361804 20.024814 19.610479 7.801303 10.314406 0.145069 0.055866 0.073933 2.251751 2.041220
138 7 digital_ok 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 25.835791 2.609983 78.502640 4.240007 21.871316 2.148000 7.667734 1.226559 0.045903 0.529208 0.335186 1.346727 7.281194
140 13 digital_ok 0.00% 37.63% 26.88% 0.00% 36.84% 0.00% 1.821794 1.514876 0.398219 0.784231 0.200801 0.237337 0.693819 -0.000379 0.408802 0.415984 0.245830 1.584721 1.656627
141 13 digital_ok 100.00% 37.63% 64.52% 0.00% 100.00% 0.00% 0.719092 3.831498 0.310177 54.242728 0.143106 11.111600 0.572129 49.539634 0.410822 0.386625 0.244017 4.472047 5.137267
142 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 25.431086 27.760132 48.883389 90.694434 13.512229 19.814143 10.651410 8.888219 0.278608 0.042848 0.152588 5.770432 1.502118
143 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 36.84% 1.390483 1.674682 -0.655543 -0.693438 -0.752385 -0.434454 -0.683472 -0.590296 0.506649 0.510728 0.300271 1.127658 1.284411
144 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.439198 4.420748 8.743382 10.941991 10.501739 6.518076 3.252928 3.137549 0.522980 0.527696 0.319753 10.768582 13.709279
145 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 22.089723 24.746530 89.814004 91.248093 22.303150 19.871473 11.424370 11.791054 0.038616 0.040975 -0.000402 1.500904 1.512341
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 24.198949 27.802319 89.533138 92.844767 22.402964 19.919444 12.799686 14.049491 0.049680 0.051306 0.001621 1.350080 1.323058
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 21.983251 23.913109 88.155367 90.165454 22.455203 19.954719 12.923126 12.791175 0.049923 0.048292 0.000885 1.477589 1.600503
156 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.988121 0.755338 -0.734052 -0.201983 0.432427 0.119453 2.268505 18.870119 0.492953 0.488622 0.291189 7.597380 6.932617
157 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.145582 -0.265377 4.155396 -0.591256 4.984689 -0.284229 -1.676329 -0.074437 0.493785 0.503202 0.290943 3.180352 3.745135
158 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.087791 -1.137896 -0.903574 0.534686 -0.754877 -0.339114 -0.665509 3.820520 0.496726 0.504976 0.293181 7.127903 7.531603
160 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 21.913640 24.588975 88.616326 90.390156 22.213906 20.387932 8.745407 10.627958 0.053676 0.046420 0.007239 1.301399 1.331731
161 13 digital_ok 100.00% 37.63% 100.00% 0.00% 100.00% 0.00% 2.112153 47.892744 4.161619 22.805994 4.717277 8.095702 1.849250 4.325508 0.414921 0.353665 0.224931 5.049720 5.619174
162 13 digital_ok 0.00% 37.63% 26.88% 0.00% 36.84% 0.00% 0.419866 -0.448924 -0.062509 0.249571 2.010664 -0.664602 0.749419 -0.657252 0.409695 0.417409 0.244598 1.760935 1.941706
163 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.440559 -0.337395 0.283441 -0.610894 -0.801026 0.220860 1.081413 0.656784 0.502617 0.511392 0.301094 1.692041 1.856569
164 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 15.79% -1.044733 -0.875115 -0.964150 -0.734256 -1.391097 0.146400 -0.333545 0.994649 0.500989 0.509515 0.298182 1.745622 2.063167
165 14 digital_ok 0.00% 0.00% 0.00% 0.00% 5.26% 0.00% -0.316983 -0.134134 -0.553028 -0.620325 -1.013410 -0.009640 0.338900 0.113439 0.499026 0.506202 0.288999 1.874515 2.645073
166 14 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 20.656954 13.407366 6.949445 4.196032 3.285123 9.663544 4.948744 3.855573 0.436598 0.461973 0.229408 3.215212 4.035828
167 15 digital_ok 100.00% 72.58% 86.02% 0.00% 100.00% 0.00% 12.061270 19.332312 7.322389 7.216353 12.239461 11.110378 -0.450851 8.657109 0.385847 0.366476 0.135253 3.221205 3.135271
168 15 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.466967 6.973455 8.374727 12.612700 8.833684 12.946036 -2.647748 -3.660677 0.464050 0.458730 0.259248 9.305120 9.159750
169 15 digital_ok 100.00% 8.06% 10.75% 0.00% 100.00% 0.00% 6.366983 5.894684 11.620401 10.590660 13.322993 10.834542 -3.972936 -3.054687 0.438287 0.436329 0.268628 5.926363 5.777121
170 15 digital_ok 100.00% 16.13% 10.75% 0.00% 100.00% 0.00% 6.755453 4.711100 11.994085 9.151814 14.334173 9.537640 -4.017213 -3.464171 0.420309 0.431878 0.264919 5.673010 5.911197
176 12 digital_ok 0.00% 0.00% 0.00% 0.00% 26.32% 10.53% 0.017487 -0.743427 1.876762 -0.876987 2.127470 -0.622891 -1.611779 -0.644025 0.463765 0.468011 0.288927 1.165104 1.189282
177 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.392420 0.198244 -0.532034 -0.595901 -0.692852 6.923642 -0.249197 13.425187 0.480303 0.473026 0.297468 4.168664 4.846935
178 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.409138 -1.048647 4.105783 -1.029037 3.513950 -0.711277 2.118358 1.683655 0.486193 0.485787 0.299416 3.590674 4.358271
179 12 digital_ok 0.00% 0.00% 0.00% 0.00% 26.32% 10.53% -0.171105 0.677364 1.278475 -0.694614 1.810990 -1.153686 0.890019 -0.827283 0.476043 0.480882 0.298910 1.053206 1.073379
180 13 RF_maintenance 100.00% 59.14% 100.00% 0.00% 100.00% 0.00% 4.417594 25.828040 9.315256 90.013915 10.380486 17.440479 -3.352757 8.916419 0.393729 0.106936 0.239941 4.536124 1.588926
181 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 16.339752 52.924719 2.623694 63.009291 13.107962 7.498597 1.597834 8.095982 0.253406 0.174377 0.111663 2.586220 2.030301
182 13 RF_maintenance 100.00% 40.32% 48.39% 0.00% 100.00% 0.00% 3.409661 4.108717 7.991482 8.424276 9.321715 23.399088 -2.743660 5.305050 0.402660 0.397682 0.241796 7.245047 7.832152
183 13 digital_ok 100.00% 32.26% 26.88% 0.00% 100.00% 0.00% -0.554515 0.060316 2.290977 4.564487 2.966170 2.559703 0.633996 13.721391 0.418357 0.418828 0.252748 5.844058 6.568921
184 14 digital_ok 0.00% 0.00% 0.00% 0.00% 21.05% 0.00% 0.188620 0.446688 -0.267812 0.171189 -1.025605 0.009640 0.236418 0.392232 0.498861 0.497929 0.298523 1.668107 2.097994
185 14 digital_ok 0.00% 0.00% 0.00% 0.00% 15.79% 21.05% -0.727332 -0.533682 -0.047029 -0.490270 -0.791173 -0.294545 -0.877164 -0.966696 0.494042 0.500755 0.295830 1.868461 2.153378
186 14 digital_ok 0.00% 0.00% 0.00% 0.00% 26.32% 0.00% 0.069109 -0.147390 0.102843 -0.731810 -0.144120 -0.925437 1.665765 -0.880747 0.482313 0.485967 0.290869 1.802043 2.150839
187 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.175570 0.799334 -0.271028 1.414849 0.066608 0.113351 2.788445 8.515939 0.482567 0.488953 0.286503 5.897645 6.940920
189 15 digital_ok 0.00% 0.00% 0.00% 0.00% 36.84% 0.00% 1.200806 2.241104 -0.240516 2.113443 -0.726062 0.336617 -0.297036 -1.384674 0.453668 0.449462 0.285752 1.118997 1.190997
190 15 digital_ok 100.00% 91.40% 100.00% 0.00% 100.00% 0.00% 46.831340 27.508827 12.454956 91.122974 8.617943 19.826860 65.485054 10.158782 0.333828 0.051516 0.222853 4.185439 3.505325
191 15 digital_ok 0.00% 16.13% 10.75% 0.00% 15.79% 21.05% 1.022165 0.039308 3.327899 -0.307706 3.294785 3.078733 -1.824325 -0.447869 0.422380 0.425837 0.278498 1.043150 1.061445
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% 29.180080 28.094393 70.488967 70.720928 22.373823 19.839878 13.256050 9.785997 0.063741 0.059823 0.004161 0.000000 0.000000
321 2 not_connected 100.00% 86.02% 100.00% 0.00% 100.00% 0.00% 3.320224 2.915590 6.077742 6.695047 7.232963 7.363257 7.339773 6.093161 0.341645 0.314507 0.231596 0.000000 0.000000
323 2 not_connected 100.00% 91.40% 100.00% 0.00% 100.00% 0.00% 21.108000 6.344684 7.447249 11.819804 4.312127 12.985641 4.236529 -3.351574 0.261145 0.294664 0.199338 0.000000 0.000000
324 4 not_connected 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 7.258477 7.902713 13.162458 13.690204 15.652455 14.367866 -3.556833 -4.628434 0.066565 0.064544 0.024583 0.000000 0.000000
329 12 dish_maintenance 100.00% 83.33% 100.00% 0.00% 100.00% 0.00% 2.460059 4.412461 4.183290 9.083540 6.014865 9.799118 0.833190 -3.545742 0.344268 0.315866 0.231518 0.000000 0.000000
333 12 dish_maintenance 100.00% 86.02% 100.00% 0.00% 100.00% 0.00% 4.342950 2.798261 11.956968 5.217228 6.722767 5.741232 10.329441 -1.115921 0.339029 0.319698 0.222056 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, 5, 7, 8, 9, 10, 15, 18, 19, 20, 21, 27, 28, 29, 30, 31, 32, 33, 36, 37, 38, 40, 41, 42, 45, 46, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70, 71, 72, 73, 81, 82, 83, 88, 89, 90, 91, 92, 93, 94, 98, 99, 100, 105, 106, 107, 108, 109, 110, 111, 112, 116, 117, 118, 119, 124, 125, 126, 127, 129, 130, 135, 136, 137, 138, 140, 141, 142, 143, 144, 145, 150, 155, 156, 157, 158, 160, 161, 162, 164, 166, 167, 168, 169, 170, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 220, 221, 222, 320, 321, 323, 324, 329, 333]
In [17]:
# write to csv
outpath = os.path.join(nb_outdir, f'rtp_summary_table_{JD}.csv')
print(f'Now saving Table 1 to a csv at {outpath}')
df.to_csv(outpath)
Now saving Table 1 to a csv at /home/obs/src/H5C_Notebooks/_rtp_summary_/rtp_summary_table_2459773.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 [ ]: