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 = "2459761"
data_path = "/mnt/sn1/2459761"
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-30-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/2459761/zen.2459761.25318.sum.auto_metrics.h5.

Load Ant Metrics¶

In [7]:
use_ant_metrics = False

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

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

Load chi^2 info from redcal¶

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

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

        post_redcal_ant_flags_dict[cal] = {ant: np.all(flags[ant]) for ant in flags}
        # check history to distinguish antennas flagged going into redcal from ones flagged during redcal
        tossed_antenna_lines =  hc.history.replace('\n','').split('Throwing out antenna ')[1:]
        flagged_by_redcal_dict[cal] = sorted([int(line.split(' ')[0]) for line in tossed_antenna_lines])
        
    use_redcal = True
else:
    print(f'No files found matching glob {glob_str}. Skipping redcal chisq.')
Found 38 ant_metrics files matching glob /mnt/sn1/2459761/zen.2459761.?????.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% 6.149538 5.632591 inf inf 7337.400653 7021.575132 20928.648647 17944.348462 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 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.153967 0.561869 1.410642 1.450516 0.078035 0.793498 0.234258 3.527080 0.533039 0.532338 0.336994 2.985004 3.154558
4 1 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.314081 3.109654 -0.352455 -0.226031 -0.682677 0.914805 -0.687823 -0.932157 0.547915 0.534551 0.335608 3.854115 4.293167
5 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.065248 0.408801 0.637492 1.704583 -0.367232 0.590353 0.010971 -1.913584 0.558779 0.540441 0.337230 2.012772 2.018621
7 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.363530 -0.437145 0.324148 -0.191553 -0.801936 0.480545 1.734457 33.767309 0.556839 0.546673 0.337737 2.935001 3.439083
8 2 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.827623 4.035278 6.097652 7.339531 5.058155 5.323540 2.881725 -2.661749 0.534155 0.516240 0.322786 3.248891 3.410009
9 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.743181 -0.566601 0.189154 -0.101293 -0.827598 -0.517519 -0.181198 -0.360312 0.537203 0.525745 0.330997 1.348852 1.324725
10 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.206103 -0.821467 1.479235 -0.302605 1.783983 1.461908 -1.212757 0.528072 0.512152 0.507392 0.327239 1.446908 1.443303
11 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 296.138304 100.184738 156.480125 126.286316 53.012437 43.128636 1153.173779 1006.744662 0.018670 0.016906 0.001352 1.136719 1.136102
12 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 84.253177 75.065637 116.837702 121.313236 59.731777 62.643535 1145.653183 1356.398442 0.018598 0.017226 0.000890 1.109582 1.106788
13 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 61.161284 73.290951 115.988782 130.517721 79.291994 116.861851 1062.257069 1623.590136 0.018850 0.017058 0.001326 1.116489 1.106612
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 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.385458 0.747546 1.129585 -0.423446 0.966546 -0.177159 1.117516 2.095560 0.563954 0.547463 0.334308 1.842520 1.974541
16 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.235285 -0.109114 -0.330995 0.392110 0.090189 -0.400982 1.925599 -0.661159 0.576515 0.562532 0.335730 1.915102 1.892245
17 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.867349 -0.334723 0.128375 0.097395 0.510284 0.106708 0.125035 -0.096354 0.566114 0.556695 0.324607 1.990413 2.208303
18 1 RF_maintenance 100.00% 0.00% 81.18% 0.00% 100.00% 0.00% 3.208253 15.330646 2.100628 11.422635 18.426431 22.130003 145.260951 169.965632 0.551490 0.336294 0.345853 2.867977 1.897473
19 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.109328 -0.677544 -0.128219 0.440813 -0.401622 54.385880 14.039661 17.735007 0.569311 0.560061 0.332167 3.168886 3.489036
20 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.489503 1.464336 2.010620 0.174062 0.456671 0.329963 0.970346 -0.727376 0.555995 0.530400 0.328436 1.425878 1.576643
21 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.006188 5.917577 1.134342 20.252860 13.371763 111.462061 45.473621 60.393795 0.539112 0.522101 0.328874 3.488062 3.490136
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% 375.192609 374.198334 325.700157 310.546456 60.142254 40.905346 1051.913435 793.889457 nan nan nan 0.000000 0.000000
26 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 377.393524 370.877717 256.866161 238.453957 45.719404 95.101238 924.762038 1671.513587 0.024295 0.018427 0.007046 1.084450 1.093002
27 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 23.098761 27.549050 64.348458 65.419471 15.491085 12.974892 14.174079 11.733703 0.054324 0.057522 0.004915 1.220088 1.228023
28 1 RF_maintenance 100.00% 62.37% 100.00% 0.00% 100.00% 0.00% 8.703665 35.305547 8.870638 35.475657 11.067516 15.212402 -1.485644 127.942789 0.391385 0.208463 0.206954 13.677226 4.907038
29 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.657342 -0.574628 0.031398 -0.680382 -0.583324 -0.003624 0.180421 0.533884 0.580502 0.574625 0.328905 2.085924 2.306430
30 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.565357 -0.444569 0.583595 -0.750762 9.761693 0.007663 12.825318 0.069507 0.578745 0.573413 0.323246 3.658874 4.222340
31 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.635881 0.396898 0.718391 0.765263 -0.124353 -0.006308 6.251914 2.932790 0.585927 0.571131 0.336040 2.751660 3.098820
32 2 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 38.475979 -0.782822 5.378851 -0.695560 5.397532 4.574310 26.531593 16.482017 0.478659 0.551493 0.319017 5.258150 3.386514
33 2 RF_maintenance 100.00% 0.00% 70.43% 0.00% 100.00% 0.00% -0.154621 6.130758 -0.182895 -0.243324 12.957428 14.947513 44.909088 78.098986 0.555987 0.371668 0.389190 3.578862 2.022401
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% 0.00% 0.00% 0.00% 100.00% 0.00% 2.572881 2.828985 4.763247 5.402646 4.403642 4.779488 2.007304 10.673728 0.552697 0.534197 0.340029 2.728844 2.967480
38 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.482521 4.172840 4.225358 6.372716 4.955263 5.825562 16.113855 -1.716785 0.563256 0.549105 0.343360 3.071420 2.915575
39 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 387.505698 386.051943 inf inf 216.345541 95.481160 4461.358369 2202.091404 nan nan nan 0.000000 0.000000
40 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.307099 0.874273 2.018764 1.227452 0.424469 -0.563365 1.584571 0.168565 0.576897 0.582237 0.336837 1.800104 2.045626
41 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.128231 -1.038161 -0.072499 -0.831619 -1.083066 0.190402 -0.737179 -0.010971 0.582355 0.586505 0.333882 1.822304 1.972688
42 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.034092 0.350483 -0.668599 -0.247362 -1.393589 -0.097800 -0.601879 -0.572415 0.592425 0.591414 0.339571 1.712711 1.784390
45 5 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 1.137733 27.904899 1.045735 64.600034 -0.770456 13.309161 0.562421 9.669893 0.565967 0.085391 0.423412 3.125866 1.576841
46 5 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.987511 -0.310992 -0.825783 -0.710590 -0.581145 -0.129360 -0.379115 0.698929 0.554860 0.539697 0.340028 1.349964 1.349463
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% 0.00% 100.00% 0.00% 100.00% 0.00% 0.905504 47.591996 -0.127282 78.311342 -0.992287 12.666432 2.415743 24.022705 0.560392 0.054049 0.424866 2.571082 1.192978
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% 0.00% 0.00% 0.00% 100.00% 0.00% 0.748044 1.364988 1.316180 0.971105 -0.235729 0.645570 3.084263 9.729177 0.573060 0.580329 0.336086 3.535332 3.602542
54 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.582300 -0.450546 -0.334390 -0.031398 -0.579045 0.826647 0.587119 -0.313667 0.572833 0.584794 0.323904 1.655000 1.882927
55 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.761612 6.591092 28.018714 9.604605 3.753565 8.229197 6.838091 -4.786394 0.567710 0.555251 0.321407 3.406779 3.682165
56 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.915812 0.226631 -0.744650 0.743977 -0.624339 1.979979 0.747356 11.699886 0.591027 0.592753 0.334529 3.399804 3.457714
57 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.328738 1.680950 10.042149 4.820335 2.167602 4.820130 3.963763 -1.480105 0.587930 0.574095 0.341214 3.232072 3.150603
65 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.910523 2.633622 3.424072 3.727496 2.336514 1.937349 -2.221649 -1.493281 0.526195 0.524378 0.330258 1.300720 1.337772
66 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.534557 1.621468 5.644785 1.433087 4.316229 1.716838 -2.561009 2.352046 0.548213 0.554151 0.331589 2.947227 3.236037
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.451592 4.160800 4.846954 14.003244 2.998190 5.912735 5.194644 9.168725 0.576200 0.582588 0.337814 3.189332 3.517984
68 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.323667 0.749772 1.773273 2.062093 2.262099 -0.141283 -1.523060 0.604768 0.570902 0.590950 0.332425 1.499804 1.572224
69 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.060726 -0.648751 -0.411054 -0.595681 -0.601850 3.235422 0.480105 0.967042 0.581148 0.592688 0.332122 1.570416 1.618925
70 4 RF_maintenance 100.00% 0.00% 0.00% 100.00% 100.00% 0.00% 5.832750 9.401280 3.578044 16.588399 5.236658 8.217568 -0.856826 5.933841 0.260753 0.262482 -0.291744 2.173515 2.146496
71 4 digital_ok 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% 1.639885 1.119959 2.633230 3.481834 2.144439 1.472699 1.928534 -2.289937 0.258131 0.251906 -0.291844 2.859980 2.602871
72 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.381126 -0.507234 1.474440 -0.300658 2.102580 0.694255 2.121835 -0.780078 0.580446 0.581293 0.330094 3.598287 3.456429
73 5 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.967816 1.264815 1.879312 3.568826 0.972728 1.432370 1.691617 1.708588 0.582844 0.565704 0.345414 3.109285 2.987531
81 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.256861 0.939824 6.586013 -0.582568 5.334066 -0.364318 3.612153 -0.407354 0.526726 0.528271 0.331034 3.240931 3.144435
82 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.100405 1.869884 0.696593 1.727533 -0.978251 0.925128 -0.019275 0.314381 0.536477 0.555636 0.335094 3.061204 3.330581
83 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.103790 7.360863 6.398173 10.816858 8.196608 9.030857 -3.192967 -4.930643 0.550790 0.539076 0.328672 2.595225 2.722686
84 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 8.530373 9.257087 0.520347 1.087320 -0.322685 0.113084 0.199594 0.368722 0.578981 0.589060 0.329377 3.716013 4.062580
85 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
86 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
87 8 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.584975 4.460922 2.609184 7.298176 2.450216 6.746026 -1.780436 -4.097569 0.582618 0.576940 0.339120 3.126719 2.946752
88 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 26.972397 29.605423 57.578644 58.912820 13.930879 11.672953 19.030363 11.710990 0.045352 0.047674 0.000128 1.157506 1.161794
89 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
90 9 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.574243 0.701703 5.102755 -0.666910 3.616978 0.851831 6.578393 1.123373 0.567823 0.562087 0.348068 3.981501 3.853366
91 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 23.448319 27.207311 57.510235 59.682544 15.022503 12.476194 13.504682 13.086656 0.040458 0.043563 0.001390 1.260301 1.618838
92 10 digital_ok 100.00% 86.56% 100.00% 0.00% 100.00% 0.00% 10.145776 16.059453 4.614056 0.694615 6.796480 6.202437 -1.531497 17.850371 0.332779 0.327054 0.144881 2.682214 2.887700
93 10 RF_maintenance 100.00% 78.49% 100.00% 0.00% 100.00% 0.00% 9.739146 30.680409 0.705305 66.317973 4.030943 12.785493 3.705403 15.381947 0.343164 0.050728 0.210594 3.047490 1.276323
94 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.469588 2.113744 1.572272 6.629134 -0.124811 8.635943 6.794120 14.483966 0.512879 0.504230 0.350693 2.513956 2.562170
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% 29.483498 32.994006 56.915102 59.877944 14.836189 12.398368 13.992534 13.338365 0.046430 0.054484 0.003450 1.185169 1.185800
101 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.656355 10.072838 0.042324 2.686090 -0.766803 2.916058 12.738375 7.428126 0.570672 0.585041 0.341572 3.236488 3.207926
102 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
103 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.825370 8.955560 1.970686 2.434922 0.657274 0.570738 0.972541 1.066417 0.579543 0.586330 0.340056 3.277458 2.979475
104 8 RF_maintenance 100.00% 0.00% 0.00% 100.00% 100.00% 0.00% 9.094996 86.132249 4.649206 57.552990 0.808645 12.187619 2.480025 6.188916 0.241022 0.196207 -0.268108 1.938145 1.748559
105 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 26.530350 34.392310 55.029400 57.158297 14.682246 12.157089 9.275799 9.375077 0.040546 0.043473 0.003458 1.358963 1.483897
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% 24.142204 25.506350 55.299646 56.663837 14.834992 12.525562 7.902577 9.216276 0.046058 0.049155 0.004771 1.284636 1.272759
108 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.544694 3.099724 1.368924 0.413099 -0.709575 0.339948 0.304760 -1.336558 0.564517 0.554059 0.348023 1.180204 1.185107
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 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% -0.494624 0.302871 0.354829 -0.427789 0.666305 0.952172 0.791828 -0.356623 0.184387 0.176284 -0.292534 2.065407 1.990326
116 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
119 7 RF_maintenance 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 24.434113 0.904942 56.854983 -0.612542 14.724325 -0.423816 10.302806 -0.455241 0.046079 0.567845 0.390944 1.238160 3.092667
120 8 RF_maintenance 100.00% 70.43% 100.00% 0.00% 100.00% 0.00% 14.033147 42.904990 6.699666 70.844539 4.555782 12.333409 3.276726 16.604540 0.373327 0.046560 0.285629 2.372342 1.203069
121 8 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.789084 9.612077 1.535485 11.279262 2.949618 9.397958 68.946755 47.433765 0.551528 0.579718 0.341824 3.182483 3.264287
122 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 9.910339 6.410625 4.001027 0.916016 1.694650 -0.172030 1.770321 0.619733 0.569123 0.569635 0.338027 3.154049 3.218717
123 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.458491 5.740705 0.978119 2.976981 -0.912373 2.086723 -1.165262 -2.202474 0.569723 0.566546 0.339370 4.708067 4.121797
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 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.079943 0.454453 2.525662 1.681727 1.966953 3.091307 1.991913 2.422659 0.558222 0.551987 0.349839 3.696276 3.807582
128 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 28.95% -0.687447 2.720553 -0.046576 -0.092389 -0.722024 -0.419169 0.660989 -0.660623 0.541054 0.523283 0.340903 0.000000 0.000000
129 10 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
130 10 digital_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
135 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.868323 -0.410825 -0.794312 -0.474133 -0.943405 -0.637578 -0.253998 -0.176639 0.500708 0.501961 0.322652 1.216964 1.247414
136 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.048146 12.379719 -0.570389 0.997642 -0.287109 0.461166 0.082737 5.106106 0.523242 0.514047 0.319882 4.229795 5.021537
138 7 digital_ok 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 27.369791 6.214202 56.378129 12.643297 14.901054 5.161758 7.111064 4.246481 0.049182 0.549564 0.392219 1.227203 2.795312
140 13 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
141 13 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
142 13 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
143 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.458076 -0.333150 -0.700653 -0.753408 -1.188370 -0.878575 -0.744628 -0.289743 0.557773 0.563797 0.333754 1.232782 1.212233
144 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.365566 5.345686 8.858226 12.698318 8.084205 3.167267 4.342490 4.329712 0.564489 0.565704 0.342547 6.005167 6.863330
145 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 23.068744 26.920203 64.659993 65.929659 15.436854 12.818286 11.136722 12.174539 0.040968 0.042967 -0.000715 1.492210 1.434758
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 25.262617 30.337730 64.470350 67.124553 15.068261 12.760909 12.963230 14.479785 0.053840 0.056068 0.001792 0.937149 0.950426
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 22.824335 25.908405 63.397792 65.091451 15.608633 12.980799 12.951002 13.576101 0.055008 0.050737 0.001396 1.369917 1.484767
156 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.626333 1.219138 -0.494736 0.376898 0.935154 0.318663 2.014927 19.012394 0.520834 0.515527 0.322345 4.720034 5.014098
157 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.821646 0.260678 3.329319 -0.345521 2.882575 0.299169 -1.996188 0.628612 0.517101 0.527004 0.322439 3.346298 3.685947
158 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.702916 -1.411131 -0.315314 0.375985 -0.486850 -0.901978 -0.793835 -0.096242 0.527694 0.537942 0.329240 4.176880 4.016366
160 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 21.947610 24.347258 63.789248 65.244611 15.381434 12.840334 7.472943 8.856659 0.035422 0.033050 0.004831 1.184498 1.177056
161 13 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
162 13 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
163 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.135828 0.014388 0.352627 -0.736962 -0.474090 1.250828 0.153633 0.593623 0.542408 0.542217 0.331625 1.624518 1.718533
164 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.835576 -1.247574 -0.798816 -0.798625 -0.884255 0.118053 0.299707 1.051329 0.546837 0.545108 0.327771 1.666733 1.803362
165 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.419359 -0.466878 -0.487179 -0.489419 -0.145108 0.004301 2.071567 1.154763 0.541140 0.541308 0.319600 1.874618 2.196127
166 14 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.125381 5.037227 2.455152 1.593705 2.025564 21.251451 3.685551 5.224108 0.518035 0.523108 0.300389 2.454598 2.853857
167 15 digital_ok 100.00% 37.63% 0.00% 0.00% 100.00% 0.00% 14.658568 9.142020 6.571115 8.724242 18.578077 8.557964 28.899941 2.051940 0.462570 0.482735 0.271918 2.490792 2.752469
168 15 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.445868 7.099142 6.659567 10.064376 5.278006 8.234368 -3.601778 -5.159291 0.510843 0.495507 0.313100 3.722963 3.849826
169 15 digital_ok 100.00% 8.06% 10.75% 0.00% 100.00% 0.00% 6.777851 6.230396 9.412752 8.505512 9.162135 7.201919 -4.838099 -3.764085 0.490917 0.480835 0.312190 2.118771 2.026004
170 15 digital_ok 100.00% 18.82% 10.75% 0.00% 100.00% 0.00% 7.256874 4.585520 9.701237 7.231246 9.281991 5.607174 -3.823052 -2.902987 0.473015 0.480346 0.309344 0.000000 0.000000
176 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.029492 -0.915423 1.351382 -0.466659 -0.125323 -0.287710 -1.683706 1.199629 0.500696 0.506193 0.323305 1.179151 1.166020
177 12 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.771844 1.654042 -0.170506 2.377352 -0.881438 11.614158 0.270981 4.100728 0.515831 0.503540 0.329917 3.479158 4.156567
178 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.014388 -0.860876 3.364920 -0.811024 1.293882 -0.819349 1.070643 0.041142 0.523127 0.524825 0.333809 1.258734 1.234917
179 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.247305 0.472167 0.965747 -0.353959 3.675156 -0.826999 -0.084481 -0.594797 0.518742 0.523606 0.334661 1.243475 1.240361
180 13 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 18.137056 28.763146 1.378789 65.980441 3.844350 13.644791 25.018336 9.665633 0.049847 0.033244 0.009169 1.238553 1.202115
181 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 6.210523 0.805749 11.062736 2.649002 7.951671 0.933490 4.088204 4.190514 0.042637 0.044413 0.003445 1.210856 1.207015
182 13 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
183 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.558812 0.370177 2.284940 3.785978 1.186734 0.365236 0.917315 13.670454 0.045562 0.041684 0.002170 1.218054 1.217662
184 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.764750 -0.122631 0.055004 0.180551 -0.508149 -0.014939 0.439172 -0.186041 0.544664 0.531336 0.339166 1.687873 1.926912
185 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.477318 -0.773730 -0.738496 -0.395460 3.830460 -0.184228 -0.019552 -1.127636 0.538863 0.535139 0.333292 1.699036 1.838630
186 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.208971 -0.205126 -0.367106 -0.749390 0.945137 -0.553598 2.076478 -0.833994 0.530374 0.529786 0.326956 1.805799 2.062261
187 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.492075 2.891535 0.212416 4.845039 -0.631606 5.785297 3.569003 166.244301 0.531085 0.535573 0.317499 3.170798 3.053984
189 15 digital_ok 0.00% 0.00% 0.00% 0.00% 71.05% 0.00% 1.041721 2.009690 -0.412417 1.073520 -0.647742 0.778379 -0.255856 -0.957084 0.507075 0.498863 0.322879 0.000000 0.000000
190 15 digital_ok 100.00% 70.43% 62.37% 0.00% 100.00% 0.00% 52.768526 34.569997 8.480600 7.993473 4.722895 2.955014 46.326114 29.423970 0.372360 0.413591 0.206100 0.000000 0.000000
191 15 digital_ok 0.00% 16.13% 10.75% 0.00% 78.95% 0.00% 0.661534 -0.315151 2.496536 -0.655822 0.003624 -0.718813 -2.053476 2.995693 0.482182 0.481753 0.324559 0.000000 0.000000
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% 30.636021 30.437362 50.331940 50.705315 15.524946 12.797951 13.950336 9.551966 0.069558 0.065710 0.004761 0.000000 0.000000
321 2 not_connected 100.00% 65.05% 67.74% 0.00% 100.00% 0.00% 2.677185 2.688354 4.720272 5.242013 4.581310 5.093174 13.810181 10.757236 0.397495 0.378509 0.291454 0.000000 0.000000
323 2 not_connected 100.00% 78.49% 67.74% 0.00% 100.00% 0.00% 26.602215 6.294017 5.269654 9.505246 5.351843 8.061107 11.346599 -1.738215 0.289679 0.366546 0.252215 0.000000 0.000000
324 4 not_connected 100.00% 70.43% 70.43% 0.00% 100.00% 0.00% 7.756173 8.196913 10.677424 11.161047 10.464161 9.141332 -4.939966 -5.586403 0.365132 0.345375 0.268304 0.000000 0.000000
329 12 dish_maintenance 100.00% 65.05% 67.74% 0.00% 100.00% 0.00% 3.175159 4.535603 2.563536 7.249261 2.244725 5.976680 5.303103 -4.011385 0.397989 0.377074 0.286279 0.000000 0.000000
333 12 dish_maintenance 100.00% 65.05% 67.74% 0.00% 100.00% 0.00% 5.014098 2.617131 9.778303 4.095043 4.014663 2.629388 7.257836 -0.765995 0.395481 0.389320 0.281422 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, 11, 12, 13, 14, 18, 19, 21, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 36, 37, 38, 39, 45, 50, 51, 52, 53, 55, 56, 57, 66, 67, 70, 71, 72, 73, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 109, 110, 111, 112, 116, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 136, 138, 140, 141, 142, 144, 145, 150, 155, 156, 157, 158, 160, 161, 162, 166, 167, 168, 169, 170, 177, 180, 181, 182, 183, 187, 189, 190, 191, 220, 221, 222, 320, 321, 323, 324, 329, 333]
In [17]:
# write to csv
outpath = os.path.join(nb_outdir, f'rtp_summary_table_{JD}.csv')
print(f'Now saving Table 1 to a csv at {outpath}')
df.to_csv(outpath)
Now saving Table 1 to a csv at /home/obs/src/H5C_Notebooks/_rtp_summary_/rtp_summary_table_2459761.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 [ ]: