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 = "2459743"
data_path = "/mnt/sn1/2459743"
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-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/2459743/zen.2459743.25303.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 1849 ant_metrics files matching glob /mnt/sn1/2459743/zen.2459743.?????.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 185 ant_metrics files matching glob /mnt/sn1/2459743/zen.2459743.?????.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% 5.897165 5.342482 232.858277 219.695775 3274.876822 3107.483731 18760.108744 15085.656062 nan nan nan 0.000000 0.000000
1 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
2 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
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 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.152968 -0.444829 -0.545302 -0.597284 -0.366999 -0.134718 2.620450 15.731957 0.713023 0.607827 0.422447 5.606118 5.107874
8 2 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.720410 4.416227 13.682108 16.035736 11.126776 12.384721 6.324113 -2.113584 0.711330 0.593599 0.415786 5.421397 5.441039
9 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.581242 -1.145553 -0.775761 -0.310416 -0.089676 0.013534 -0.495414 -0.291338 0.717496 0.608835 0.414381 1.959220 1.465995
10 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.116586 -0.508037 11.151542 -0.580337 9.521796 0.063848 2.504394 0.895230 0.707195 0.595684 0.419292 6.080198 6.461855
11 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
12 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
13 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
14 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
15 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
16 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
17 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
18 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
19 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -1.119688 3.469446 -1.047885 12.708278 -1.259677 10.432914 5.142202 -0.580686 0.730356 0.616312 0.415618 5.672456 6.013928
20 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.004081 1.385768 2.234978 2.010209 1.727526 1.837728 0.648685 -0.617839 0.725468 0.609516 0.406084 2.045034 1.665406
21 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.926160 -0.501039 1.166179 1.327571 2.082431 1.281167 2.645332 16.038299 0.716226 0.606249 0.410114 5.982212 5.911673
23 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
24 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
25 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
26 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
27 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
28 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
29 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
30 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
31 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.466957 -0.143091 -0.077356 -0.406638 0.161223 0.825952 0.238962 0.753663 0.737539 0.635528 0.414868 1.997028 1.804700
32 2 RF_maintenance 100.00% 0.00% 1.08% 0.00% 100.00% 0.00% 30.326562 34.688552 5.273502 6.675475 4.740120 4.599340 25.424804 28.001051 0.645034 0.570344 0.238739 9.571040 7.052820
33 2 RF_maintenance 100.00% 0.00% 39.48% 0.00% 100.00% 0.00% 0.108414 4.752965 0.113061 0.258509 -0.407203 2.120993 0.377758 12.433325 0.727701 0.454895 0.506573 5.492693 2.598325
36 3 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
37 3 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
38 3 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
39 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
40 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.894178 1.041270 2.884484 2.646841 1.858559 0.801088 0.121046 0.041448 0.725808 0.623461 0.426135 2.254468 2.322773
41 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.198534 -0.581859 1.770663 -0.809299 0.979566 -0.939639 -1.329372 -0.906486 0.729574 0.634391 0.412265 2.452931 2.241113
42 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.162028 -0.105829 0.723654 -0.587983 -0.269608 -0.123535 -0.919682 -0.255229 0.734469 0.640842 0.413561 2.364583 2.303278
45 5 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 0.147495 24.892197 -0.218860 137.003383 0.647423 218.481815 12.301941 1208.695304 0.736930 0.119480 0.565070 5.699333 1.709483
46 5 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.733777 -1.228453 1.064027 -0.438984 -0.056724 -0.993408 -0.909120 0.656590 0.726938 0.619053 0.425916 1.876569 1.823258
50 3 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
51 3 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
52 3 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
53 3 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
54 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.018188 -0.373537 1.085044 -0.016378 0.447061 -0.347239 -0.413558 -0.292378 0.722595 0.631644 0.413447 2.245608 2.269108
55 4 digital_ok 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% 1.669047 0.805194 2.797935 -0.262599 1.839239 2.483041 1.131915 2.630128 0.329547 0.331784 -0.278553 5.065593 5.530418
56 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.876968 0.311580 0.120429 1.663153 -0.649410 1.022993 -1.012262 0.786873 0.739632 0.647878 0.407102 2.385614 2.571960
57 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.885603 1.362690 8.427738 9.110453 8.949385 6.985712 2.024274 -0.343322 0.743487 0.640321 0.418130 5.525945 6.081581
65 3 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
66 3 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
67 3 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
68 3 digital_ok 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
69 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.965419 -0.876243 1.544650 -0.980056 0.416632 0.669922 -0.806577 1.001918 0.726084 0.634777 0.425085 2.090190 1.999073
70 4 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 10.381220 9.057196 23.122857 31.300323 19.346379 21.639293 4.008729 12.418238 0.746570 0.643911 0.419412 34.191483 32.698893
71 4 digital_ok 100.00% 0.00% 0.00% 100.00% 100.00% 0.00% 1.851012 1.108574 6.620869 8.739349 7.083864 5.634545 2.311756 -1.188059 0.330322 0.326177 -0.283576 3.701467 4.016052
72 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 3.159168 -0.816129 1.907014 0.506824 0.958952 0.387240 2.979373 -1.070204 0.744008 0.647920 0.409132 2.255297 2.064047
73 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.317427 6.554878 2.673598 25.150294 1.791721 16.903163 1.696893 5.359066 0.742546 0.634157 0.431462 6.172518 6.209685
81 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.257671 0.890699 1.535957 -0.566612 0.206243 -0.139063 0.681439 -0.133210 0.695896 0.580194 0.428667 1.410411 1.386930
82 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.630593 2.024147 1.629315 -0.387018 0.749170 -0.899108 -0.866964 -0.363538 0.703571 0.604374 0.428263 4.922823 5.295144
83 7 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 24.436774 26.041500 124.693350 127.687855 27.073059 24.849144 10.648125 9.693190 0.059244 0.064757 0.003232 1.525431 1.748918
84 8 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
85 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
86 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
87 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
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% 125.142158 84.260182 328.849414 228.839935 50.985602 37.343128 1992.197456 639.854537 0.017303 0.017110 0.000460 0.810332 0.814558
93 10 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 65.535682 102.024444 282.132968 333.836442 33.134495 93.490803 1376.694516 2645.299458 0.016535 0.016359 0.000402 0.877051 0.878090
94 10 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 56.813927 74.296764 250.763802 266.965859 30.439452 44.880698 827.099353 1306.686504 0.016645 0.016434 0.000318 1.110241 1.107614
98 7 digital_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 23.291160 25.115996 121.134574 123.743033 27.109506 25.024077 19.578288 9.303524 0.049368 0.055104 0.009085 1.296761 1.321567
99 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.504015 1.286276 7.453541 9.220032 4.881994 6.731172 2.052251 1.946114 0.708180 0.605762 0.423724 6.449851 5.961356
100 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 24.093285 26.010747 122.985610 130.174028 27.319023 25.073727 13.699692 12.316928 0.053929 0.062196 0.009733 1.352494 1.443802
101 8 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
102 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
103 8 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
104 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
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 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 89.176498 154.910035 291.323558 326.065076 42.833802 73.541119 1707.455155 2585.301641 0.017552 0.016342 0.001308 1.123284 1.112435
110 10 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 58.141767 61.800237 257.594296 265.742294 43.036501 36.629080 1178.311444 1223.952348 0.017103 0.016455 0.000553 0.000000 0.000000
111 10 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 143.621912 85.020883 348.431361 257.707479 56.306259 43.989115 2066.754958 1251.431310 0.016417 0.016494 0.000338 1.134061 1.142481
112 10 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 63.661521 99.867450 263.002505 268.141532 42.579983 37.522073 1250.554559 1067.274844 0.017519 0.016597 0.000791 1.062737 1.060843
116 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 26.242712 28.355193 124.713116 128.134967 27.233750 25.092686 9.535021 11.729698 0.053247 0.053941 0.000185 1.403368 1.425339
119 7 RF_maintenance 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 24.385110 -0.117925 122.571991 -0.063813 27.080580 -0.151681 9.839164 1.935332 0.053022 0.632001 0.494517 1.438439 6.128697
120 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
121 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
122 8 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
123 8 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
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% 100.00% 100.00% 0.00% 100.00% 0.00% 54.139764 118.191697 254.528802 257.350576 39.887523 40.082001 1107.142620 896.382751 0.016821 0.016601 0.000466 1.189282 1.191446
128 10 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 82.850683 185.744029 280.592998 356.824263 30.539464 64.776259 1150.048338 2351.334375 0.016438 0.016386 0.000330 0.908769 0.907915
129 10 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 80.319260 79.733485 271.791884 273.942653 46.087513 55.867466 1248.683908 1479.577012 0.017658 0.016558 0.001088 1.109834 1.105442
130 10 digital_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 62.149329 61.529716 272.607010 239.875606 42.442219 33.502148 1280.334502 805.120424 0.016595 0.016693 0.000335 1.086664 1.100516
135 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.903636 -0.494633 0.101156 0.016378 -0.635819 -0.466543 0.737760 0.129741 0.686723 0.580769 0.423711 1.520241 1.529131
136 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.732504 12.146805 -0.324008 2.571988 1.265881 2.598923 5.827938 10.686208 0.701709 0.574664 0.420647 6.852103 8.415491
138 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.804700 1.808425 -0.688388 -0.523090 -0.921813 -0.679060 -0.706797 -0.647133 0.724785 0.633387 0.431217 1.580056 1.641187
140 13 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.853073 1.214427 0.044794 0.660594 0.938360 1.396209 0.776404 -0.306193 0.733793 0.647772 0.415858 1.903310 1.806451
141 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.050100 7.167082 2.247610 37.742040 1.180590 22.804563 0.069393 18.416464 0.741128 0.643474 0.413529 6.985996 7.905339
142 13 digital_ok 100.00% 82.75% 100.00% 0.00% 100.00% 0.00% 1.674486 29.142188 11.532410 140.903223 7.585934 24.957386 3.597877 8.490997 0.346478 0.067944 0.080214 2.924270 1.405859
143 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.586123 -0.615205 -0.048368 -0.999793 -0.477552 -0.013534 -1.087190 -0.667542 0.748731 0.673117 0.395819 1.813190 1.750589
144 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.499307 2.118484 12.308071 8.352840 9.125486 13.433722 3.505278 2.441470 0.750860 0.668663 0.403033 9.324218 11.647295
145 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.047119 -0.244891 7.570140 0.776267 6.234297 -0.097998 2.779607 0.326251 0.744220 0.660144 0.401128 7.325325 7.828419
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 24.612041 28.400202 138.194153 144.313957 27.209812 25.076451 12.465123 13.717902 0.056966 0.058110 0.002301 1.360774 1.326536
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 20.966261 20.522161 135.888339 139.984558 27.199325 25.018148 12.106464 13.831947 0.061079 0.059397 0.001915 1.163457 1.247156
156 12 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
157 12 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
158 12 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
160 13 digital_ok 100.00% 18.39% 21.09% 0.00% 100.00% 0.00% 14.238911 20.427475 1.828335 5.182250 17.653099 15.410342 2.195144 14.606494 0.482346 0.458987 0.202643 6.896698 6.970190
161 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.064689 48.722782 3.013613 17.040469 1.947992 3.396742 1.340613 2.779746 0.743080 0.570095 0.383056 5.762511 6.922014
162 13 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 3.444882 0.487226 1.566532 1.276075 1.589050 0.972569 1.648845 0.769516 0.745340 0.667696 0.388755 2.508088 2.883152
163 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.104022 -0.288589 -0.318563 -0.586255 -0.723568 -0.610018 0.053418 0.641318 0.748211 0.673917 0.383553 2.771543 2.781076
164 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.144600 -1.370181 -0.058191 -0.727778 -0.987758 -0.744396 -0.041448 1.289017 0.744972 0.669715 0.391143 2.936478 3.090718
165 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.477235 0.207143 -0.211425 -0.059210 -0.263159 -0.508266 0.176176 -0.266692 0.743143 0.667547 0.388336 3.014097 3.316361
166 14 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 9.190835 26.244913 5.077045 19.411423 5.551389 6.896264 6.509345 8.949896 0.705556 0.570660 0.333185 11.421504 12.159570
167 15 digital_ok 100.00% 14.60% 16.22% 0.00% 100.00% 0.00% 25.560913 18.709283 10.402718 14.237222 21.708831 16.064869 12.247153 24.611395 0.587864 0.522438 0.203903 5.821997 6.784019
168 15 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.410164 7.713620 15.288628 21.771676 12.358866 17.101146 -2.726176 -3.646964 0.709383 0.604026 0.417933 7.486840 6.229255
169 15 digital_ok 100.00% 1.08% 0.00% 0.00% 100.00% 0.00% 7.581321 6.712967 21.004754 18.568609 17.431465 14.948466 -3.418532 -2.682416 0.695113 0.587389 0.418448 5.614828 4.964320
170 15 digital_ok 100.00% 2.70% 0.00% 0.00% 100.00% 0.00% 7.913640 4.526074 21.689542 15.673352 18.180316 12.277817 -3.306108 -0.531725 0.682439 0.588970 0.416062 5.441038 4.953564
176 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.302476 -0.886423 4.683668 -0.910434 3.183937 -0.527712 -1.289900 0.342825 0.699809 0.588946 0.431863 4.134285 3.357354
177 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.958411 2.629463 -0.623721 7.533748 -0.900386 5.325483 -0.191547 4.892895 0.711672 0.588683 0.432594 3.857757 3.167251
178 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.205555 -1.128957 5.375364 -0.734331 3.702246 -1.241106 0.782076 -0.376777 0.721872 0.618383 0.428115 3.493318 3.097204
179 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.246255 0.393010 3.245492 -0.738956 2.671072 -0.955281 5.518270 0.521172 0.723987 0.632260 0.420938 3.515417 3.278561
180 13 RF_maintenance 100.00% 25.37% 100.00% 0.00% 100.00% 0.00% 15.478438 26.643397 3.190859 141.833270 17.843908 25.012866 19.304197 9.271336 0.444653 0.065838 0.286269 2.734484 1.204807
181 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.866119 1.822705 20.419981 4.401255 15.836021 3.164462 3.947279 4.582622 0.738420 0.649239 0.420567 4.362350 4.082434
182 13 RF_maintenance 100.00% 0.00% 3.79% 0.00% 100.00% 0.00% 4.489852 8.706778 13.582993 97.294247 13.768272 58.745417 -1.880398 44.985833 0.713105 0.580826 0.414365 5.046061 4.392786
183 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.825821 0.951040 3.844862 7.552636 2.770617 4.339806 0.362942 9.804313 0.744106 0.655610 0.406297 5.529736 5.465992
184 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.001454 0.001454 -0.324695 0.248136 -0.666604 -0.620044 0.375693 -0.258716 0.745294 0.657377 0.395945 2.886919 3.001259
185 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.136548 -0.477264 -0.822430 0.345868 0.853141 -0.337843 -0.139078 -1.179591 0.740908 0.659216 0.395646 2.841582 2.890468
186 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.932968 -0.278449 0.976742 -0.735840 0.348916 -0.871553 1.598606 -0.758653 0.732135 0.648136 0.403470 2.712613 3.040967
187 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.282054 0.433158 -0.524374 2.796565 -0.715963 1.037327 2.466939 3.823848 0.728902 0.648346 0.395752 1.728196 1.948493
189 15 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.075512 1.299072 1.232871 -0.651110 0.018739 1.832093 -0.611029 0.290879 0.708609 0.617630 0.413361 1.959700 2.094039
190 15 digital_ok 100.00% 20.01% 19.47% 0.00% 100.00% 0.00% 59.949244 57.006348 22.446440 25.293245 10.486478 17.220279 42.725531 43.769109 0.557623 0.506592 0.242072 4.078570 4.957178
191 15 digital_ok 100.00% 2.70% 0.00% 0.00% 100.00% 0.00% 1.198007 1.899377 7.000882 9.147463 4.787251 7.085831 -1.513086 26.222629 0.689307 0.591940 0.422592 5.002091 4.833966
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% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
321 2 not_connected 100.00% 17.31% 38.40% 0.00% 100.00% 0.00% 3.701549 3.184724 11.650936 12.113866 9.640591 9.385815 -0.947627 -1.387075 0.607368 0.457192 0.404888 0.000000 0.000000
323 2 not_connected 100.00% 21.63% 47.05% 0.00% 100.00% 0.00% 24.077587 5.323178 10.351185 16.988235 6.943521 13.380181 4.828025 -1.652853 0.498600 0.436484 0.332452 0.000000 0.000000
324 4 not_connected 100.00% 19.47% 43.81% 0.00% 100.00% 0.00% 8.363737 8.688832 23.728959 24.012370 19.935275 18.838718 -3.509260 -3.980422 0.585442 0.433929 0.390265 0.000000 0.000000
325 9 dish_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
329 12 dish_maintenance 100.00% 16.77% 38.40% 0.00% 100.00% 0.00% 4.484895 4.707996 10.176706 15.653657 5.533345 12.348741 6.897096 -2.361629 0.603406 0.450441 0.400071 0.000000 0.000000
333 12 dish_maintenance 100.00% 32.45% 42.73% 0.00% 100.00% 0.00% 13.489864 4.668403 58.167917 14.497086 10.146671 11.654872 54.088454 -0.921767 0.496721 0.439346 0.353625 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, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 36, 37, 38, 39, 45, 50, 51, 52, 53, 55, 57, 65, 66, 67, 68, 70, 71, 73, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 116, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 136, 141, 142, 144, 145, 150, 155, 156, 157, 158, 160, 161, 166, 167, 168, 169, 170, 176, 177, 178, 179, 180, 181, 182, 183, 190, 191, 220, 221, 222, 320, 321, 323, 324, 325, 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_2459743.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 [ ]: