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

Figure out some general properties¶

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

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

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

Load a priori antenna statuses and node numbers¶

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

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

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

Summarize auto metrics¶

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

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

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

Summarize ant metrics¶

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

Summarize redcal chi^2 metrics¶

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

Build DataFrame¶

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

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

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

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

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

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

Table 1: RTP Per-Antenna Metrics Summary Table¶

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

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

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

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

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

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

In [15]:
HTML(table.render())
Out[15]:
Ant Node A Priori Status Auto Metrics Flags Dead Fraction in Ant Metrics (Jee) Dead Fraction in Ant Metrics (Jnn) Crossed Fraction in Ant Metrics Flag Fraction Before Redcal Flagged By Redcal chi^2 Fraction ee Shape Modified Z-Score nn Shape Modified Z-Score ee Power Modified Z-Score nn Power Modified Z-Score ee Temporal Variability Modified Z-Score nn Temporal Variability Modified Z-Score ee Temporal Discontinuties Modified Z-Score nn Temporal Discontinuties Modified Z-Score Average Dead Ant Metric (Jee) Average Dead Ant Metric (Jnn) Average Crossed Ant Metric Median chi^2 Per Antenna (Jee) Median chi^2 Per Antenna (Jnn)
0 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 14.773030 4.612073 59.101958 59.713499 5292.844316 7646.520826 7868.535571 9472.113260 0.018056 0.016114 0.001618 1.151192 1.137011
1 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 116.638714 85.333349 98.989381 84.474039 119.698642 105.376359 1134.298620 1298.083475 0.016329 0.016134 0.000370 1.086971 1.089490
2 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 51.002834 60.571518 77.403570 65.739727 73.256084 30.599818 584.159250 341.761829 0.016761 0.016827 0.000487 1.070709 1.078961
3 1 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
4 1 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
5 1 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
7 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.276894 -0.913703 -0.015140 -0.098662 -0.625691 0.168367 -0.011588 1.703271 0.104399 0.089226 0.019617 1.173270 1.163934
8 2 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 3.121098 1.478034 3.758963 2.874136 3.956334 2.032416 -2.292368 -1.607359 0.097454 0.082544 0.014869 1.200143 1.196254
9 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.360712 -0.687304 0.237556 0.379137 0.471986 0.699069 0.044368 2.444864 0.070341 0.056113 0.007830 1.154162 1.155405
10 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.088797 -0.805780 10.808801 0.199770 483.918369 2.232723 75.788677 0.212690 0.086008 0.079896 0.031590 1.159898 1.168771
11 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 233.838364 95.016905 99.260574 81.449805 80.599037 61.650973 935.668058 742.178056 0.018404 0.016763 0.001585 1.109358 1.105850
12 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 59.982314 58.706191 71.476252 69.504265 55.934920 49.685661 645.358238 560.247969 0.018558 0.017934 0.000509 1.146930 1.151107
13 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 59.965915 51.129249 77.420684 76.788540 72.872800 74.811122 829.902514 615.680526 0.018455 0.017365 0.000710 1.172287 1.163383
14 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 91.606312 77.293643 82.438065 76.819527 96.450800 71.545267 923.827242 818.623303 0.018439 0.017105 0.000792 1.129911 1.119054
15 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.496824 -0.380851 0.725496 0.432607 1.044262 1.541557 0.345128 1.634046 0.608073 0.592238 0.388239 1.690949 1.896711
16 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.816206 -1.808095 -0.542302 -1.068802 -0.484262 -0.309868 2.177933 -0.128188 0.612699 0.598629 0.390343 1.577445 1.617045
17 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.448923 10.104135 0.133255 1.323860 -0.387524 0.658115 0.626429 0.587545 0.600278 0.576000 0.378588 3.955991 5.743884
18 1 RF_maintenance 100.00% 0.00% 56.99% 0.00% 100.00% 0.00% 1.071406 8.828951 -0.013056 0.289005 22.598121 15.288637 107.413157 68.403125 0.579243 0.361298 0.425432 2.707427 1.891102
19 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -1.199536 1.155569 0.500922 2.397317 -0.633457 15.240452 -0.985188 -2.052565 0.082849 0.085827 0.012254 1.241192 1.231098
20 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.175023 0.310674 1.013758 -0.808027 0.780266 -0.504292 0.518564 -0.476047 0.059291 0.062076 0.006021 1.170229 1.164124
21 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.186426 -0.984332 -0.236354 0.012932 -0.475647 0.907166 0.027785 -0.465029 0.066684 0.078972 0.006234 1.195313 1.191174
23 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 57.607564 76.397799 83.602770 76.228604 96.852755 60.884242 1060.191798 726.187161 0.017160 0.016579 0.000491 1.117209 1.116694
24 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 36.744692 31.246890 68.734505 72.272061 68.314944 126.983326 623.839518 1236.326001 0.017081 0.016036 0.000669 1.074421 1.127724
25 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 326.818144 330.007670 inf inf 69.807910 150.102166 711.547605 1524.067773 nan nan nan 0.000000 0.000000
26 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 329.481965 324.337430 178.278336 151.207343 50.707234 51.510633 645.305565 574.326117 0.013130 0.020484 0.010728 0.000000 1.076773
27 1 RF_maintenance 100.00% 100.00% 67.74% 0.00% 100.00% 0.00% 38.546087 17.819772 34.546106 8.082451 12.406245 32.077560 35.168064 171.539947 0.077050 0.362592 0.202055 1.252979 2.615385
28 1 RF_maintenance 100.00% 91.94% 91.94% 8.06% 100.00% 0.00% 23.851648 2.328384 8.707382 0.787333 11.559345 4.120425 64.732004 0.097791 0.149007 0.265757 -0.127903 2.070382 5.369251
29 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.438248 -0.870839 -0.924815 -0.890936 -1.129173 -0.755530 -0.520965 -0.985041 0.617186 0.600411 0.364810 1.427378 1.575363
30 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.370611 -0.044086 -1.010746 -0.131339 0.209038 -0.253298 11.931851 0.060989 0.613187 0.603811 0.377398 3.423133 4.125639
31 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.008485 0.792351 -0.083578 1.226500 -0.635090 -0.252243 1.424624 2.349321 0.099768 0.098002 0.022605 1.229386 1.229440
32 2 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 26.556039 28.523889 1.037787 1.801873 4.401092 9.860303 12.307192 15.268915 0.089604 0.101733 0.009518 1.292222 1.289586
33 2 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.088992 5.718896 -0.050692 -0.396169 -0.898942 3.342760 0.279336 18.483264 0.065332 0.115511 0.032409 1.227740 1.216935
36 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.241978 7.929109 0.823238 3.680550 -0.214195 2.960117 0.384895 1.750279 0.620237 0.612781 0.377868 3.995800 4.603983
37 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.144184 0.705050 1.490649 1.880965 2.376211 1.086665 0.361272 0.105118 0.626029 0.613688 0.367425 1.485870 1.757768
38 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.415149 1.696879 2.668698 2.384631 4.032465 1.293224 9.305491 -2.048808 0.629169 0.618483 0.370085 3.267833 3.706178
39 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 336.258522 336.822148 inf inf 720.783223 1224.502740 4831.611161 8262.505054 nan nan nan 0.000000 0.000000
40 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.925494 1.474749 1.264538 1.289657 1.109708 0.995990 0.570829 -0.071861 0.631752 0.638018 0.367091 1.594669 1.938535
41 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.631976 -0.954593 -0.882007 -0.012932 -1.240870 -0.026015 -0.752169 1.300507 0.637503 0.644159 0.369497 1.624977 1.689647
42 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.756987 0.900614 -1.028892 0.098620 -0.200156 0.230875 -0.351435 -0.034500 0.640684 0.639100 0.365920 1.565417 1.763086
45 5 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 0.464657 23.882430 0.365590 39.550004 -0.730145 6.899206 0.042692 5.074990 0.598538 0.072570 0.342175 3.565277 2.355176
46 5 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.002848 0.119492 -0.901500 -0.238494 -0.867190 0.053132 -0.129432 3.687283 0.578112 0.564223 0.386112 1.218632 1.286714
50 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.658039 1.189348 2.030114 0.119779 1.504924 0.930347 3.323950 0.962767 0.593611 0.598817 0.348389 1.478001 1.670864
51 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.778382 4.494725 -0.149884 1.310435 -0.203992 -0.192885 0.494499 -1.273874 0.622392 0.610665 0.353227 4.172805 6.192477
52 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.405780 6.881700 1.821990 1.111579 8.672307 2.503756 52.143371 6.099175 0.596024 0.621684 0.301333 5.691282 8.603629
53 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.116763 1.833256 -0.147509 0.197339 -1.230776 -0.405533 0.767276 -0.963518 0.636653 0.640745 0.351592 1.530676 1.766380
54 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.181455 8.367626 -0.912208 1.215875 -0.989025 1.264151 -0.183748 0.651683 0.632031 0.637087 0.344329 4.551574 6.065727
55 4 digital_ok 100.00% 0.00% 0.00% 100.00% 100.00% 0.00% 0.447540 3.177012 0.626211 1.214199 1.534982 4.055286 6.972828 9.030902 0.279497 0.272907 -0.295913 3.435966 3.816244
56 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.655004 1.211762 -0.442539 0.902008 -1.126711 0.813597 -0.264292 10.729943 0.638946 0.645155 0.358945 4.154926 4.277286
57 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.178412 -0.647560 8.035636 0.905846 2.014539 -0.064909 2.928441 -0.924763 0.634357 0.625677 0.367075 3.946757 3.935067
65 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.582642 1.201145 0.957022 1.747141 0.045980 0.089103 -1.580482 -1.851024 0.589588 0.586644 0.360075 1.567520 1.760159
66 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.462427 -0.189257 2.564795 -0.550220 1.684445 -0.547030 -2.064730 0.453274 0.609816 0.618018 0.358239 1.549127 1.783761
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.158798 10.554476 3.085392 9.277210 3.248373 3.888891 4.307545 4.781814 0.635116 0.637695 0.354581 3.534240 6.144019
68 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.552339 0.186070 0.170220 1.523463 -0.452914 0.545318 -1.217697 1.273984 0.640717 0.658797 0.353280 1.614818 1.775713
69 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.862203 -0.941777 -0.827959 -0.092327 -0.989450 1.828302 -0.058607 -0.363508 0.653667 0.661603 0.366467 1.547203 1.715828
70 4 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 10.965846 6.869117 9.002523 10.432563 2.182565 5.718065 3.221636 5.563492 0.653700 0.651821 0.369519 14.145403 12.140812
71 4 digital_ok 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% 1.150405 0.573434 0.660708 0.399902 1.482752 1.032849 0.756161 0.147636 0.291062 0.275761 -0.294493 2.740949 2.712480
72 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.953500 -0.216864 0.966807 -0.637253 3.784940 0.020984 5.237801 1.453532 0.632692 0.635630 0.356814 3.365224 3.408118
73 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.405548 3.768955 0.884916 7.965869 1.134669 4.226825 0.594570 2.910163 0.629277 0.611542 0.377417 3.574847 3.588069
81 7 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
82 7 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
83 7 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
84 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.802948 7.817335 0.221149 1.298323 -0.125664 1.089646 -0.108556 -0.055289 0.649270 0.649216 0.358958 4.713230 4.911585
85 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
86 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
87 8 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.508430 8.502096 1.288131 3.623096 6.010771 3.381710 4.375797 -2.699350 0.600385 0.617741 0.338913 3.181354 3.350548
88 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
89 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
90 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
91 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
92 10 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 18.318564 22.745267 38.333974 39.996482 9.910802 7.120324 4.751831 5.514995 0.034237 0.048335 0.005691 1.269492 1.286286
93 10 RF_maintenance 100.00% 43.55% 100.00% 0.00% 100.00% 0.00% 9.319044 25.981676 -0.421365 40.665391 7.057654 7.126107 1.493999 9.040253 0.430270 0.049078 0.210015 6.021279 1.293017
94 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.364300 2.236552 0.702950 4.235637 0.702209 9.449256 3.331788 9.092469 0.587278 0.569573 0.381976 3.265428 3.657494
98 7 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
99 7 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
100 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 21.593129 24.317706 34.608309 37.129069 9.775153 7.125456 7.906860 7.063788 0.040548 0.044007 0.006110 1.295582 1.369189
101 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.134460 8.822143 -0.075790 1.973491 -0.214979 2.508904 5.884317 1.126493 0.645366 0.646520 0.377255 3.165633 3.315745
102 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
103 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.903213 7.745638 1.122714 2.111720 1.151187 1.498058 0.964440 1.909360 0.652084 0.646592 0.369807 3.769459 3.477480
104 8 RF_maintenance 100.00% 0.00% 0.00% 100.00% 100.00% 0.00% 8.046741 6.284301 2.730902 3.286084 1.491294 116.641119 1.426962 16.173871 0.283653 0.267024 -0.294133 1.893514 1.893590
105 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
106 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
107 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
108 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
109 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.464592 -0.751327 0.262749 -0.580358 0.081436 -0.083324 2.462833 0.785507 0.617369 0.602708 0.382300 1.267519 1.293769
110 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.005420 25.633766 1.022853 1.971810 1.919946 3.407453 3.759973 5.504096 0.618045 0.509989 0.374911 4.591379 7.284512
111 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.076945 0.192244 -0.264063 -0.370230 -0.137968 1.194185 -0.338753 1.070918 0.604145 0.582963 0.377885 1.351526 1.439288
112 10 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 0.079581 25.674483 0.723500 40.406901 0.426131 7.018776 0.401336 4.915102 0.565684 0.060203 0.329965 3.389064 1.612054
116 7 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
119 7 RF_maintenance 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 21.872973 -0.226218 33.003984 -0.800729 9.677356 -0.744874 5.586942 -0.524911 0.044800 0.622564 0.351134 1.441468 4.672062
120 8 RF_maintenance 100.00% 30.11% 100.00% 0.00% 100.00% 0.00% 13.549190 36.845435 4.260268 43.479459 8.755736 6.796315 1.976552 8.579785 0.443093 0.044052 0.284996 3.224526 1.250724
121 8 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.199896 9.232513 -0.870771 11.168706 -1.226286 6.848168 4.023364 39.454189 0.652080 0.649727 0.372296 3.371410 3.532225
122 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.994227 8.089158 2.381120 1.053770 1.899619 1.139033 1.175414 0.763470 0.657807 0.645856 0.379179 3.378509 3.144897
123 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.119145 4.405247 -0.331057 0.337024 -1.344740 0.005857 -0.574995 -1.430813 0.646979 0.636982 0.387586 3.828201 3.585632
124 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
125 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
126 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
127 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.447238 1.247388 1.475969 1.393041 2.036649 2.622460 2.190755 4.944691 0.608429 0.602252 0.379431 4.607474 5.569782
128 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.517326 1.877050 -0.077398 -0.833053 -0.335221 -0.425307 0.053942 -0.548628 0.611295 0.588617 0.376284 1.270237 1.382541
129 10 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.946242 -0.014466 5.431573 1.148591 4.511825 0.738599 1.569281 0.353082 0.607612 0.593691 0.373155 4.808279 5.807616
130 10 digital_maintenance 100.00% 100.00% 73.12% 0.00% 100.00% 0.00% 19.497097 6.284176 38.672476 4.115823 9.645871 1.791041 4.194732 -1.758448 0.051211 0.369399 0.183411 1.285414 4.997306
135 12 digital_ok 0.00% 16.67% 16.67% 0.00% 18.42% 0.00% -1.453218 -0.882413 -0.739527 -0.417779 -0.792992 0.171355 0.735767 2.204174 0.526600 0.518858 0.328505 1.450698 1.524220
136 12 RF_maintenance 100.00% 16.67% 16.67% 0.00% 100.00% 0.00% -0.032308 8.990586 -0.488357 0.873933 -0.385597 0.673202 1.320204 4.885109 0.552322 0.535068 0.326221 5.187612 6.710441
138 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.335364 0.980766 -0.785042 -0.683531 -0.980865 -0.347102 -0.282780 0.742696 0.607048 0.611193 0.368435 1.314873 1.379102
140 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.810224 4.720489 0.396447 1.030628 1.190700 2.308052 1.101784 3.548558 0.629477 0.624039 0.355845 3.688996 4.515035
141 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.002064 3.277737 -0.504270 12.128390 -0.170693 4.243040 0.020181 36.884552 0.640095 0.616547 0.367974 3.482856 3.450917
142 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.008913 25.919050 3.320322 40.163397 1.982008 7.009826 2.288766 4.471309 0.266793 0.053665 0.013241 2.172260 1.254950
143 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
144 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 2.995548 0.169043 3.658584 1.115000 0.962709 5.538606 7.431587 2.649989 0.081235 0.098054 0.014756 1.282448 1.287514
145 14 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.711986 -0.475493 2.631180 -0.665451 3.385750 -0.709134 2.330580 -0.674549 0.074228 0.093026 0.012943 1.479787 1.485897
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 21.447206 25.974855 38.917075 41.127334 9.700580 6.997544 7.141112 7.751922 0.050989 0.051311 0.001263 1.235063 1.231065
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 19.419930 21.656510 38.251541 39.885859 9.840194 7.084722 6.946992 7.656225 0.051803 0.051248 -0.000026 1.326259 1.391327
156 12 RF_maintenance 0.00% 16.67% 16.67% 0.00% 100.00% 0.00% -0.136047 0.902239 -0.597455 -0.568016 -0.633163 0.026015 -0.078147 -0.820216 0.542321 0.523022 0.327169 5.030334 4.876661
157 12 RF_maintenance 0.00% 16.67% 16.67% 0.00% 100.00% 0.00% -0.845844 0.014369 0.418790 0.191841 -0.043189 -0.455382 -0.773144 -0.212717 0.539473 0.541830 0.321295 4.235933 4.231400
158 12 RF_maintenance 0.00% 16.67% 16.67% 0.00% 100.00% 0.00% -0.493081 -1.111796 -0.936549 -0.884547 -0.438389 -0.040457 -0.080878 0.534714 0.545048 0.548713 0.316624 4.106035 4.180193
160 13 digital_ok 100.00% 30.11% 67.74% 0.00% 100.00% 0.00% 14.119367 27.700917 -0.125992 1.557144 3.524807 9.393879 0.780114 12.041777 0.443045 0.387344 0.172870 5.036883 3.411240
161 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.996844 41.404696 1.216699 5.530487 2.165276 1.725247 0.466256 2.091108 0.622806 0.518413 0.351815 3.383714 4.224881
162 13 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.498062 0.074291 0.466429 0.812730 1.897374 2.231323 0.011588 0.116074 0.619604 0.612478 0.372019 1.343876 1.375445
163 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
164 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
165 14 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -1.019028 -0.003762 -0.413914 -0.432884 -0.891124 -0.640057 1.830035 -0.260194 0.061712 0.062713 0.005149 1.352074 1.342206
166 14 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 28.639672 -0.201169 3.997109 1.099922 3.898178 1.287331 24.588123 1.784497 0.095324 0.072697 0.015487 1.217197 1.217075
167 15 digital_ok 100.00% 40.86% 38.17% 0.00% 100.00% 0.00% 30.843733 9.852424 1.792425 3.121711 33.136006 15.799799 184.796833 30.215319 0.435858 0.484960 0.240280 2.806039 2.992111
168 15 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.177063 4.057430 3.091225 4.701868 2.449124 3.961906 -1.350894 -2.701589 0.592621 0.565258 0.364142 6.898753 6.538991
169 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.127574 3.290519 4.869474 3.638264 5.261658 3.180715 -3.102448 -2.351299 0.570337 0.548171 0.360657 5.280505 5.235103
170 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.458619 2.076840 5.028888 2.881567 5.338070 2.068890 -2.612064 -1.839908 0.552500 0.547462 0.354441 4.401556 4.586971
176 12 digital_ok 0.00% 16.67% 16.67% 0.00% 18.42% 0.00% -0.663535 -0.641291 -0.218752 0.083066 -1.042200 0.033528 0.076121 0.733868 0.525247 0.522105 0.327758 1.471448 1.651943
177 12 digital_ok 0.00% 16.67% 16.67% 0.00% 18.42% 0.00% 0.452020 3.284801 -0.147944 3.665616 0.510244 2.342975 -0.026461 -3.064900 0.536810 0.503029 0.329682 1.534836 1.818789
178 12 digital_ok 0.00% 16.67% 16.67% 0.00% 18.42% 0.00% -0.002848 -1.457002 2.002784 -0.887017 1.434037 -0.840771 0.984436 -0.505604 0.544212 0.535218 0.331747 1.413853 1.474181
179 12 digital_ok 0.00% 16.67% 16.67% 0.00% 18.42% 0.00% -0.868651 -0.073712 -0.345464 0.298040 3.491301 -0.493001 -0.674432 -0.552892 0.544901 0.539812 0.325999 1.466276 1.688082
180 13 RF_maintenance 100.00% 51.61% 100.00% 0.00% 100.00% 0.00% 19.643926 24.284140 3.265420 40.431410 5.823776 6.981751 18.841188 4.957448 0.406134 0.056219 0.187789 4.433517 1.312901
181 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.184291 1.411236 6.610357 2.139132 6.814865 2.147814 2.410919 2.175236 0.618718 0.604967 0.389594 3.324119 3.904742
182 13 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.999768 2.223608 3.002560 3.270620 2.750619 2.434579 -2.464292 -2.875071 0.596330 0.581699 0.378428 4.064430 4.858213
183 13 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.111293 -0.361944 1.355290 0.837493 1.219338 -0.401182 0.550868 0.706653 0.600124 0.584508 0.388359 1.257120 1.322443
184 14 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.685447 -0.062359 -0.773240 0.488478 -0.649913 0.127727 -0.343683 -0.324222 0.085702 0.093825 0.015483 1.284859 1.271881
185 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 7.929206 16.513899 -0.376930 1.194221 -0.918952 0.410978 -0.118554 0.393391 0.061372 0.060260 0.005406 1.387018 1.375807
186 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.502170 -0.060037 -1.007993 -0.286045 -0.472973 -0.050993 6.012906 -0.433104 0.070930 0.064332 0.008987 1.422152 1.414197
187 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.381038 0.615052 -0.107819 0.046211 1.489329 3.851969 11.363973 2.257132 0.080265 0.078454 0.010371 1.345405 1.334846
189 15 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.307852 0.268683 -0.967344 -0.838732 -0.932339 -0.084694 -0.023005 1.098165 0.581428 0.557672 0.381960 1.160752 1.238008
190 15 digital_ok 100.00% 40.86% 43.55% 0.00% 100.00% 0.00% 40.247105 38.144653 4.651096 6.763581 4.749061 10.295205 27.450908 50.738408 0.442007 0.437130 0.175866 4.344444 5.430325
191 15 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.346365 -1.300282 0.535114 -0.416070 -0.331274 -0.135632 0.013373 -0.245076 0.553490 0.542737 0.373490 1.192409 1.170930
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% 26.088670 25.813331 30.328683 31.165276 9.789870 6.905129 7.059596 5.141790 0.066224 0.075745 0.009024 0.000000 0.000000
321 2 not_connected 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.959258 0.506555 1.957673 1.723011 1.548945 1.989773 0.953602 -0.768708 0.084424 0.084979 0.035041 0.000000 0.000000
323 2 not_connected 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 24.024383 2.546864 3.099097 3.351071 5.866733 2.395471 34.643393 0.555932 0.079340 0.085794 0.031100 0.000000 0.000000
324 4 not_connected 100.00% 43.55% 46.24% 0.00% 100.00% 0.00% 6.084410 4.891052 5.658804 5.095582 6.152045 4.654323 -1.360748 -3.057075 0.409850 0.396112 0.318232 0.000000 0.000000
329 12 dish_maintenance 100.00% 38.17% 46.24% 0.00% 100.00% 0.00% 3.992701 9.554661 1.122622 2.398030 2.008507 2.434525 16.391785 -1.453731 0.404657 0.377288 0.300519 0.000000 0.000000
333 12 dish_maintenance 100.00% 67.74% 40.86% 0.00% 100.00% 0.00% 12.592230 2.658653 17.304272 3.305149 31.157274 3.285832 57.584313 -1.502539 0.317987 0.402922 0.295378 0.000000 0.000000
In [16]:
# print ex_ants for easy copy-pasting to YAML file
proposed_ex_ants = [ant for i, ant in enumerate(ants) if np.any([col[i] > .1 for col in bar_cols.values()])]
print('ex_ants: [' + ", ".join(str(ant) for ant in proposed_ex_ants) + ']')
ex_ants: [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 36, 38, 39, 45, 51, 52, 54, 55, 56, 57, 67, 70, 71, 72, 73, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 110, 112, 116, 119, 120, 121, 122, 123, 124, 125, 126, 127, 129, 130, 135, 136, 140, 141, 142, 143, 144, 145, 150, 155, 156, 157, 158, 160, 161, 163, 164, 165, 166, 167, 168, 169, 170, 176, 177, 178, 179, 180, 181, 182, 184, 185, 186, 187, 190, 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_2459753.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 [ ]: