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 = "2459757"
data_path = "/mnt/sn1/2459757"
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-26-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/2459757/zen.2459757.25294.sum.auto_metrics.h5.

Load Ant Metrics¶

In [7]:
use_ant_metrics = False

# get a list of all ant_metrics files
glob_str = os.path.join(data_path, f'zen.{JD}.?????.sum{ant_metrics_ext}')
ant_metrics_files = sorted(glob.glob(glob_str))

# if they exist, load as many of them as possible
if len(ant_metrics_files) > 0:
    print(f'Found {len(ant_metrics_files)} ant_metrics files matching glob {glob_str}')
    ant_metrics_apriori_exants = {}
    ant_metrics_xants_dict = {}
    ant_metrics_dead_ants_dict = {}
    ant_metrics_crossed_ants_dict = {}
    ant_metrics_dead_metrics = {}
    ant_metrics_crossed_metrics = {}
    dead_cuts = {}
    crossed_cuts = {}
    for amf in ant_metrics_files:
        with h5py.File(amf, "r") as infile: # use h5py directly since it's much faster than load_metric_file
            # get out results for this file
            dead_cuts[amf] = infile['Metrics']['dead_ant_cut'][()]
            crossed_cuts[amf] = infile['Metrics']['cross_pol_cut'][()]
            xants = infile['Metrics']['xants'][:]
            dead_ants = infile['Metrics']['dead_ants'][:]
            crossed_ants = infile['Metrics']['crossed_ants'][:]        
            try:
                # look for ex_ants in history
                ex_ants_string = infile['Header']['history'][()].decode()
                ex_ants_string = ex_ants_string.split('--apriori_xants')[1]
                ex_ants_string = ex_ants_string.split('--')[0].strip()
            except:
                ex_ants_string = ''
                    
            # This only works for the new correlation-matrix-based ant_metrics
            if 'corr' in infile['Metrics']['final_metrics'] and 'corrXPol' in infile['Metrics']['final_metrics']:
                ant_metrics_dead_metrics[amf] = {eval(ant): infile['Metrics']['final_metrics']['corr'][ant][()]
                                                 for ant in infile['Metrics']['final_metrics']['corr']}
                ant_metrics_crossed_metrics[amf] = {eval(ant): infile['Metrics']['final_metrics']['corrXPol'][ant][()]
                                                    for ant in infile['Metrics']['final_metrics']['corrXPol']}                       
            else:
                raise(KeywordError)
        
        # organize results by file
        ant_metrics_xants_dict[amf] = [(int(ant[0]), ant[1].decode()) for ant in xants]
        ant_metrics_dead_ants_dict[amf] = [(int(ant[0]), ant[1].decode()) for ant in dead_ants]
        ant_metrics_crossed_ants_dict[amf] = [(int(ant[0]), ant[1].decode()) for ant in crossed_ants]
        ant_metrics_apriori_exants[amf] = [int(ant) for ant in ex_ants_string.split()]
    
    dead_cut = np.median(list(dead_cuts.values()))
    crossed_cut = np.median(list(crossed_cuts.values()))
        
    use_ant_metrics = True
else:
    print(f'No files found matching glob {glob_str}. Skipping ant_metrics.')
Found 1862 ant_metrics files matching glob /mnt/sn1/2459757/zen.2459757.?????.sum.ant_metrics.hdf5

Load chi^2 info from redcal¶

In [8]:
use_redcal = False
glob_str = os.path.join(data_path, f'zen.{JD}.?????.sum{redcal_ext}')

redcal_files = sorted(glob.glob(glob_str))
if len(redcal_files) > 0:
    print(f'Found {len(redcal_files)} ant_metrics files matching glob {glob_str}')
    post_redcal_ant_flags_dict = {}
    flagged_by_redcal_dict = {}
    cspa_med_dict = {}
    for cal in redcal_files:
        hc = io.HERACal(cal)
        _, flags, cspa, chisq = hc.read()
        cspa_med_dict[cal] = {ant: np.nanmedian(cspa[ant], axis=1) for ant in cspa}

        post_redcal_ant_flags_dict[cal] = {ant: np.all(flags[ant]) for ant in flags}
        # check history to distinguish antennas flagged going into redcal from ones flagged during redcal
        tossed_antenna_lines =  hc.history.replace('\n','').split('Throwing out antenna ')[1:]
        flagged_by_redcal_dict[cal] = sorted([int(line.split(' ')[0]) for line in tossed_antenna_lines])
        
    use_redcal = True
else:
    print(f'No files found matching glob {glob_str}. Skipping redcal chisq.')
Found 187 ant_metrics files matching glob /mnt/sn1/2459757/zen.2459757.?????.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.600012 6.915464 63.011155 58.795512 816.133523 758.028026 9885.772731 8165.883030 0.017395 0.016468 0.000839 1.098199 1.098841
1 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 34.516153 48.527429 76.457597 78.182906 10.361206 9.925505 832.521802 895.098952 0.016478 0.016345 0.000348 1.072124 1.074056
2 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 32.943146 43.287226 76.314070 73.898630 11.608429 7.456711 815.654243 763.593364 0.016549 0.016446 0.000296 1.068813 1.070790
3 1 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.358292 -0.169678 -0.504366 -0.819611 -0.592317 -0.783965 -0.522880 -0.324204 0.719080 0.628500 0.408867 3.521329 2.731794
4 1 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.326777 1.217645 -0.043802 0.160868 -0.134251 -0.061704 6.706718 0.379367 0.731275 0.627821 0.413534 4.495603 3.869538
5 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.025595 -0.467347 -0.113528 0.009164 -0.170349 -0.571037 -0.332050 -0.987838 0.735100 0.628400 0.413879 2.339542 1.911100
7 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.309414 -0.539045 -0.277214 -0.166519 -0.302457 0.015887 0.163805 8.267536 0.073124 0.062826 0.011948 1.198414 1.194396
8 2 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.831608 1.381365 2.722956 3.113885 2.314415 2.179044 0.347789 -1.500466 0.078018 0.073405 0.011358 1.170029 1.166012
9 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.265729 -0.582255 -0.213519 -0.009164 -0.092218 -0.013548 -0.299191 1.029241 0.056901 0.052744 0.005481 1.135444 1.136538
10 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
11 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 103.012389 74.050647 79.574381 90.161486 9.717336 13.893978 607.662806 849.190627 0.018368 0.016740 0.002250 1.088326 1.084171
12 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 61.140861 47.978706 75.802224 76.090412 9.527026 9.587855 765.436169 639.386792 0.018336 0.017436 0.000583 1.064564 1.065143
13 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 60.578807 53.810610 82.828412 88.371318 9.915477 12.561150 860.303707 1074.957790 0.018324 0.016998 0.000752 1.092084 1.090392
14 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 71.050068 57.324183 86.477514 82.505404 14.570671 15.919042 1207.279978 1325.707839 0.018207 0.016911 0.000791 1.070338 1.069478
15 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.813442 -0.196178 0.283358 -0.134542 0.308557 -0.257258 -0.096763 1.023367 0.743992 0.648168 0.394706 2.679985 2.171623
16 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.691044 -0.910069 -0.596620 -0.766713 -0.560685 -1.053285 2.013235 0.768000 0.749215 0.656716 0.398846 2.673176 2.049153
17 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.14% -0.820082 -0.094254 -0.295837 -0.020400 -0.166978 -0.124368 0.359077 0.776024 0.739888 0.647132 0.403148 2.723461 2.379981
18 1 RF_maintenance 100.00% 0.00% 49.95% 0.00% 100.00% 0.00% 1.400591 5.290667 0.464961 0.499758 4.247404 1.950352 142.322091 88.434825 0.702519 0.417626 0.480905 2.739054 1.806489
19 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
20 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
21 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.647277 2.211956 0.346889 4.947727 0.470769 5.035807 0.603702 3.235317 0.052739 0.050001 0.004442 1.154663 1.157160
23 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 44.771324 44.529056 91.788105 80.099898 26.627033 11.185339 1580.582678 831.422969 0.016726 0.016498 0.000358 1.072597 1.075947
24 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 27.721052 59.186414 72.416107 83.807113 11.292013 12.989259 748.346920 1103.354180 0.016839 0.016349 0.000513 1.062602 1.057813
25 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 195.779704 197.415081 212.004455 215.540977 9.863879 14.700517 579.778780 1175.185914 nan nan nan 0.000000 0.000000
26 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 192.087110 199.143281 133.803636 inf 16.764902 31.747868 1183.333030 2510.317880 0.018699 nan nan 1.046865 0.000000
27 1 RF_maintenance 100.00% 99.46% 42.96% 0.00% 100.00% 0.00% 21.769036 13.887708 33.629951 7.828766 5.224984 7.620348 31.249029 162.103227 0.115588 0.443951 0.242711 1.195592 1.831089
28 1 RF_maintenance 100.00% 87.65% 54.78% 12.35% 100.00% 0.00% 14.688849 0.739628 8.364255 1.272554 2.745963 1.880050 67.932866 0.812688 0.207709 0.391935 -0.082924 2.350806 5.866751
29 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 3.21% -1.228368 -1.188818 -0.970115 -0.853484 -0.933880 -1.109031 -0.551094 -0.607063 0.751706 0.666260 0.388270 2.432259 2.272049
30 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.195082 -0.681417 -0.711030 -0.475651 -0.683128 -0.640198 2.399663 0.013306 0.742008 0.656374 0.402097 2.120068 1.930542
31 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.172675 0.159142 0.024708 0.629461 0.261345 0.895679 2.757051 2.396299 0.066142 0.064151 0.010030 1.154379 1.151002
32 2 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 21.236499 -0.276660 2.908793 -0.735444 0.447697 -0.523668 9.596774 5.159369 0.065208 0.061919 0.005791 1.159331 1.155818
33 2 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.182868 2.885420 -0.538827 -0.437046 0.371096 0.574991 18.020493 35.080575 0.053308 0.082200 0.024250 1.190145 1.187701
36 3 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.031791 3.093088 0.160698 2.920714 0.323153 2.357444 0.017225 1.860953 0.729941 0.636251 0.399307 3.474504 2.949869
37 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.578325 0.893864 1.870113 2.038136 2.033501 1.209467 0.622509 4.988456 0.742750 0.647511 0.395272 3.191635 2.812107
38 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.362198 1.466845 2.160852 2.510476 2.257424 1.473648 7.042811 -0.752435 0.750350 0.659461 0.400102 2.807826 2.446176
39 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 201.488185 201.405072 inf inf 38.372543 55.347049 2516.419546 4304.142956 nan nan nan 0.000000 0.000000
40 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.431214 0.419302 0.774802 0.778575 0.796818 0.557181 0.254684 0.169239 0.758961 0.692717 0.387350 2.165890 2.065312
41 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.983050 -0.725809 -0.610734 -0.520685 -0.882298 -0.668469 -0.758007 -0.218688 0.761617 0.692092 0.385125 2.363697 2.140354
42 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.712985 0.065257 -0.878688 -0.158446 -0.846768 -0.225648 -0.611342 -0.225775 0.761906 0.688063 0.382759 2.589487 2.201880
45 5 RF_maintenance 100.00% 0.00% 99.46% 0.00% 100.00% 0.00% -0.367676 13.054775 -0.052541 38.174707 0.153607 60.103713 7.948908 715.953365 0.733649 0.093625 0.380019 2.644742 1.364995
46 5 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.797683 -0.744315 -0.920450 -0.608281 -0.871653 -0.696136 -0.417198 1.423230 0.718172 0.614717 0.435085 1.425733 1.398444
50 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.081909 0.185834 1.413606 -0.313546 1.046699 -0.452541 0.951427 -0.013306 0.721078 0.629526 0.385087 2.314029 1.944720
51 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.216473 1.227876 -0.476602 1.682957 -0.396035 0.826640 0.634289 -0.820633 0.742574 0.655164 0.388883 2.048474 1.856260
52 3 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 2.906800 25.441650 0.498800 47.161203 1.882013 5.751042 7.362815 11.843915 0.727297 0.049905 0.359785 6.139464 1.168523
53 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.292770 -0.261556 0.153306 -0.474577 -0.370918 -0.998026 0.734711 5.267479 0.757677 0.689566 0.382174 3.547798 3.251237
54 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.275450 0.305819 -0.856463 0.179436 -0.874362 0.164178 -0.058652 0.205394 0.759185 0.693317 0.375459 2.203833 2.097620
55 4 digital_ok 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% 0.685557 0.434827 0.470208 0.487289 0.065004 1.068442 0.648515 1.161156 0.376996 0.389394 -0.259066 4.560407 5.055911
56 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.051556 0.285786 -0.756774 0.416091 -0.645616 0.083241 -0.509451 1.144647 0.765655 0.695823 0.378505 2.198443 2.014903
57 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.539403 -0.203016 5.996541 1.086462 5.924220 0.278213 2.437393 -0.287649 0.763387 0.681264 0.392388 3.053409 2.909206
65 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.253962 0.727079 1.133484 1.114076 0.647729 0.401898 -1.475661 -0.481391 0.713926 0.619903 0.407756 2.243690 1.956333
66 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.770433 0.078898 2.500200 -0.067134 1.919168 -0.700457 -1.828241 0.580136 0.729628 0.653367 0.393005 2.170807 1.911001
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.294835 2.883908 2.197852 7.401747 2.267282 6.088830 1.847032 5.314481 0.755299 0.682288 0.384483 3.823372 4.122688
68 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.076127 -0.225635 0.433011 0.878243 0.110990 0.814036 -1.111110 0.194669 0.756478 0.691511 0.375210 2.100685 2.045144
69 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.623017 -0.325700 -0.879343 -0.343444 -0.778906 -0.465707 -0.174063 0.403438 0.766060 0.696462 0.382471 2.394724 2.183803
70 4 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.790502 4.895803 1.008732 8.805885 1.020869 6.264044 0.440546 5.469278 0.770002 0.696546 0.382917 27.856745 25.676621
71 4 digital_ok 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% 0.111105 0.021074 0.712990 0.979605 0.921911 0.224456 0.720153 -0.843692 0.382435 0.381272 -0.260962 3.635429 3.876533
72 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.632228 -0.779614 0.327528 -0.854958 0.366548 -0.826906 0.943520 -0.522245 0.763955 0.691045 0.379907 2.272534 1.943557
73 5 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.636176 0.887240 0.556449 1.857098 0.647733 1.320891 0.780060 1.252559 0.756610 0.670383 0.398188 2.922035 2.658136
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 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 2.820984 3.301467 -0.182898 0.597480 -0.122504 0.350481 -0.361946 0.125213 0.760298 0.679848 0.375806 2.266129 2.135282
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 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.096017 1.953064 0.808341 3.014516 0.363366 2.145719 -1.304447 -1.970445 0.764250 0.681483 0.385557 3.102941 2.629526
88 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.783087 14.598374 34.192538 35.243582 6.909079 5.954057 9.777145 6.299659 0.040363 0.041813 0.000028 1.131544 1.129853
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 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.905040 -0.713049 2.208034 -0.647588 1.803709 -0.843405 2.636084 -0.448441 0.750045 0.666580 0.401895 3.083346 2.647279
91 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 12.144409 13.137148 34.194506 35.736307 6.901547 5.948952 7.482364 7.117580 0.037632 0.040775 0.002352 1.203956 1.449423
92 10 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 10.914565 13.163209 37.770313 39.042051 6.852052 5.900163 4.835756 6.042641 0.032956 0.044787 0.004283 1.297219 1.318874
93 10 RF_maintenance 100.00% 45.22% 100.00% 0.00% 100.00% 0.00% 3.423527 14.864325 -0.522369 39.660920 3.310746 5.918323 2.409962 8.940942 0.415113 0.045148 0.190837 2.450946 1.238540
94 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.245587 1.270134 0.359974 3.599276 0.336109 2.913452 2.244814 3.546329 0.709033 0.594287 0.432047 2.839756 2.559589
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% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
101 8 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 2.618206 3.600296 -0.480395 1.377777 -0.438464 1.054129 3.597374 1.191546 0.750678 0.661258 0.399624 2.165881 1.762201
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 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.678157 2.985841 0.648162 1.309463 0.629818 0.944075 0.111735 0.640519 0.765079 0.680426 0.390347 2.099864 1.813073
104 8 RF_maintenance 100.00% 0.00% 0.00% 100.00% 100.00% 0.00% 2.809331 46.044739 2.311465 32.711927 1.654322 9.284935 1.863006 5.194495 0.369795 0.323568 -0.247995 3.832998 3.151375
105 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.735957 17.436263 32.716808 34.213324 6.915798 5.969334 5.204168 5.396236 0.038205 0.041030 0.004207 1.198601 1.228083
106 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.011687 -0.063784 2.284210 1.429822 1.908395 1.026888 1.194240 0.802468 0.754563 0.671941 0.404351 1.857795 1.666202
107 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 12.281340 12.324181 32.896206 33.946194 6.897664 5.948568 4.288155 5.192687 0.043573 0.043700 0.003964 1.166148 1.164425
108 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.584551 0.686339 0.369521 -0.647419 0.269780 -1.012371 -0.083263 -0.678852 0.743889 0.652788 0.412330 1.550388 1.515249
109 10 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
110 10 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
111 10 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
112 10 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% -0.642721 14.972379 0.289179 39.417202 0.179435 5.869229 0.068082 5.276825 0.700616 0.055569 0.351561 3.426029 1.501962
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% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
120 8 RF_maintenance 100.00% 30.72% 100.00% 0.00% 100.00% 0.00% 7.820798 21.630938 4.869656 42.327353 3.821524 5.946796 2.173722 9.080610 0.449217 0.041372 0.256276 4.660476 1.170452
121 8 RF_maintenance 100.00% 0.54% 0.00% 0.00% 100.00% 0.00% 0.634486 4.384942 0.449063 6.188245 0.414596 5.039158 30.042041 23.089353 0.710510 0.674190 0.390175 3.954586 3.579607
122 8 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 3.548796 2.068368 1.790417 0.443074 1.720435 0.162283 0.721810 0.866005 0.764704 0.672383 0.393210 2.134338 1.761107
123 8 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.855354 1.760101 -0.017367 0.708659 -0.463850 0.027511 -1.004765 -1.185883 0.761284 0.671475 0.398790 1.824352 1.663585
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% 12.118630 13.112962 34.613814 35.867253 6.900340 5.944933 4.291927 7.851936 0.028755 0.031612 0.002113 1.165316 1.196306
126 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 12.642717 13.885490 34.265120 36.091938 6.906674 5.951220 5.906999 7.584500 0.033046 0.031127 0.000041 1.205533 1.243480
127 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.319199 0.135962 0.963377 0.838141 1.055200 0.691600 0.565015 1.007062 0.733738 0.647781 0.407072 4.215760 3.587729
128 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.654658 1.376386 -0.416828 -0.728411 -0.323158 -0.866349 -0.143306 -0.260710 0.728711 0.625372 0.405577 1.836964 1.424123
129 10 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.168837 -0.619885 4.254786 0.626498 3.759150 0.436096 1.391639 0.564492 0.723009 0.622078 0.410558 4.494830 3.560481
130 10 digital_maintenance 100.00% 100.00% 89.80% 0.00% 100.00% 0.00% 11.448778 3.808037 38.066640 2.949621 6.840546 4.078800 4.396916 0.549026 0.051108 0.347769 0.143342 1.275600 2.901524
135 12 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.736831 -0.406568 -0.853224 -0.801984 -0.811851 -0.829052 -0.499459 -0.163112 0.107417 0.107906 0.027899 1.172145 1.171800
136 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.016665 5.426930 -0.736339 0.381129 -0.240375 0.091022 2.788692 5.372148 0.091357 0.103880 0.022176 1.165941 1.166326
138 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
140 13 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.710626 0.173278 -0.155211 0.245100 0.101886 0.286362 0.247185 0.130370 0.741363 0.638763 0.399369 2.515527 1.959552
141 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.075420 0.395138 -0.419449 1.778445 -0.541808 1.080540 -0.261076 7.519867 0.747106 0.638183 0.392406 4.620695 3.901703
142 13 digital_ok 100.00% 79.05% 100.00% 0.00% 100.00% 0.00% 0.652025 15.114947 2.946410 39.174587 2.123231 5.886801 1.792629 4.972404 0.338514 0.061069 0.019303 2.071455 1.240733
143 14 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.016883 -0.926023 -0.854782 -0.494040 -0.785501 -0.474328 -0.670130 -0.203075 0.110360 0.127419 0.029701 1.158231 1.157515
144 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.300439 3.853950 3.353503 7.372613 3.340819 5.575046 3.311103 2.857530 0.077570 0.105351 0.016519 1.159936 1.158066
145 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 11.638562 13.340933 38.422669 39.430648 6.871583 5.935066 5.975816 6.576914 0.034859 0.036524 -0.000512 1.155504 1.152896
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 12.667495 14.884053 38.309905 40.130439 6.870627 5.921308 7.032462 7.923619 0.049856 0.050562 0.001308 1.271221 1.260400
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 11.574491 12.602044 37.679607 38.926132 6.850369 5.893318 6.879627 7.271927 0.042896 0.045889 0.001321 1.139088 1.136972
156 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.172442 0.141761 -0.684386 0.444861 -0.546335 -0.060135 1.142634 16.489991 0.056864 0.059091 0.006637 1.241818 1.238383
157 12 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.140398 -0.525110 1.255092 -0.212376 0.813091 -0.454069 -1.178640 0.448926 0.082631 0.057449 0.006981 1.302924 1.303519
158 12 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.678439 -0.816234 -0.787148 -0.786879 -0.891822 -1.021653 -0.751486 -0.048754 0.080564 0.065747 0.009636 1.292096 1.279751
160 13 digital_ok 100.00% 27.50% 38.24% 0.00% 100.00% 0.00% 8.353963 17.746263 0.034297 1.544108 3.968764 3.502190 0.707577 11.906603 0.465001 0.419778 0.179023 5.942031 4.922457
161 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.259902 25.517610 0.711330 4.683548 0.663174 0.629804 0.182145 1.422965 0.744689 0.532318 0.382558 5.958948 3.432152
162 13 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.281645 -0.109480 0.189993 0.205113 0.366217 0.208872 -0.023043 0.268445 0.737651 0.639238 0.404354 -0.058646 -0.055947
163 14 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.557890 -0.883880 -0.195503 -0.700819 -0.123343 -0.822588 -0.073125 0.106808 0.079983 0.097011 0.014671 1.379888 1.328879
164 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.748746 0.283208 -0.866270 1.170459 -0.675535 2.755189 -0.350515 11.463273 0.070151 0.062740 0.008643 1.457265 1.415535
165 14 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -1.001946 -0.594140 -0.615797 -0.780324 -0.594299 -0.903924 3.254224 1.268878 0.072099 0.069358 0.009518 1.360833 1.331347
166 14 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.924219 2.069001 0.726569 0.920088 0.373010 1.972157 6.756390 3.054074 0.102388 0.106111 0.022115 1.289760 1.278311
167 15 digital_ok 100.00% 19.33% 14.50% 0.00% 100.00% 0.00% 18.512216 6.578740 1.780668 3.171057 5.666844 2.751497 42.048537 15.913110 0.563322 0.519219 0.289577 2.840789 2.770824
168 15 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.805234 3.018285 3.045064 4.694885 2.443848 3.543530 -1.800816 -2.281817 0.707867 0.593968 0.402424 4.337663 3.620740
169 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.868167 2.450586 4.578532 3.779723 3.929768 2.877279 -2.282060 -1.620849 0.695202 0.581255 0.397161 4.067206 3.412873
170 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.045601 1.631290 4.756043 3.094558 4.168895 2.154146 -2.053549 -1.325280 0.680507 0.584864 0.396035 4.173061 3.669059
176 12 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.637636 -1.038775 0.125332 -0.266461 -0.285479 -0.292152 -1.111626 1.222790 0.078242 0.075581 0.012574 1.212682 1.214723
177 12 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.545572 2.310718 -0.487887 3.705299 -0.379243 2.775624 0.954130 -2.085866 0.059536 0.093653 0.010152 1.191528 1.177524
178 12 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.011687 -1.322276 1.484687 -0.518834 1.259651 -0.658589 0.396702 0.781134 0.054473 0.064061 0.006270 1.376386 1.362064
179 12 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.827456 -0.078432 -0.116301 -0.201351 0.013548 -0.314863 -0.113754 -0.306735 0.092615 0.080393 0.017066 1.297720 1.287881
180 13 RF_maintenance 100.00% 47.37% 100.00% 0.00% 100.00% 0.00% 9.954759 14.257118 0.807320 39.417520 4.213498 5.906764 13.325244 5.346064 0.396982 0.056920 0.175073 3.783370 1.411049
181 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.423693 0.745155 5.510219 1.463717 4.895814 1.203760 2.108038 2.140070 0.732096 0.615260 0.428828 5.995340 3.961671
182 13 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.167564 1.819679 2.932452 3.366115 2.338381 2.359659 -2.065695 -2.007327 0.720285 0.602265 0.423323 5.402845 3.272066
183 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.641900 0.710677 0.834292 2.226605 0.874195 1.366656 0.105762 7.609372 0.729436 0.614530 0.427013 5.053880 3.280132
184 14 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.019584 -0.073956 -0.411236 0.067264 -0.383495 -0.350571 -0.182424 -0.038373 0.069850 0.075389 0.009563 1.371899 1.350943
185 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.738358 4.215947 -0.674905 -0.259491 -0.791815 -0.649722 -0.373071 -0.200925 0.067577 0.068411 0.008999 1.393577 1.370336
186 14 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.556037 -0.666460 -0.746269 -0.605761 -0.808043 -0.680513 1.339108 -0.409397 0.089227 0.083445 0.017800 1.244287 1.234329
187 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.375642 1.214788 -0.347920 2.652951 -0.267360 2.356734 5.058739 86.722184 0.100998 0.093534 0.023001 1.314980 1.305123
189 15 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.172315 0.647505 -0.793672 -0.291454 -0.762181 -0.746327 -0.509919 -0.800637 0.705640 0.595099 0.408567 1.675184 1.360481
190 15 digital_ok 100.00% 18.26% 20.41% 0.00% 100.00% 0.00% 23.403051 26.193268 4.534940 6.348818 1.398477 3.436924 22.021161 34.510899 0.571706 0.493415 0.250128 4.628475 5.321281
191 15 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.013175 -0.053090 0.719689 -0.703188 0.192052 0.032213 -0.908469 2.500515 0.687702 0.582906 0.409447 1.521828 1.275671
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% 15.721819 15.224468 29.963736 30.414981 6.835536 5.798850 7.157368 5.393000 0.070874 0.085651 0.007730 0.000000 0.000000
321 2 not_connected 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.017553 0.680277 2.010618 2.000665 1.817749 1.355937 2.401904 1.819196 0.079056 0.068863 0.028270 0.000000 0.000000
323 2 not_connected 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 12.339413 2.540251 2.670629 4.403149 1.210400 3.367461 5.518042 -0.695261 0.077826 0.070699 0.027380 0.000000 0.000000
324 4 not_connected 100.00% 20.95% 39.74% 0.00% 100.00% 0.00% 3.339028 3.229264 5.329936 4.879697 4.732458 3.741887 -2.319540 -2.185661 0.593496 0.431891 0.380149 0.000000 0.000000
329 12 dish_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.670825 1.610798 1.294445 3.064534 1.495077 2.177484 -0.612342 -1.827483 0.105835 0.088489 0.044784 0.000000 0.000000
333 12 dish_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 2.511825 0.642219 4.702343 1.340601 2.655598 0.843111 3.519273 -0.410517 0.106127 0.086113 0.041066 0.000000 0.000000
In [16]:
# print ex_ants for easy copy-pasting to YAML file
proposed_ex_ants = [ant for i, ant in enumerate(ants) if np.any([col[i] > .1 for col in bar_cols.values()])]
print('ex_ants: [' + ", ".join(str(ant) for ant in proposed_ex_ants) + ']')
ex_ants: [0, 1, 2, 3, 4, 7, 8, 9, 10, 11, 12, 13, 14, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 31, 32, 33, 36, 37, 38, 39, 45, 52, 53, 55, 57, 67, 70, 71, 73, 81, 82, 83, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 98, 99, 100, 102, 104, 105, 107, 109, 110, 111, 112, 116, 119, 120, 121, 124, 125, 126, 127, 129, 130, 135, 136, 138, 141, 142, 143, 144, 145, 150, 155, 156, 157, 158, 160, 161, 163, 164, 165, 166, 167, 168, 169, 170, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 190, 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_2459757.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 [ ]: