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 = "2459759"
data_path = "/mnt/sn1/2459759"
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-28-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/2459759/zen.2459759.29366.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/2459759/zen.2459759.?????.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/2459759/zen.2459759.?????.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% 39.342404 63.124386 58.156136 66.348912 20.264442 22.582547 777.727943 833.581066 0.016846 0.016323 0.000630 1.107839 1.107013
1 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 56.103775 38.179951 64.676625 48.622176 28.531599 14.143633 891.200812 403.240108 0.016244 0.016592 0.000690 1.089587 1.096669
2 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 46.247041 36.175469 61.860426 47.595593 28.540768 16.019058 772.066054 417.393612 0.016212 0.016670 0.000593 1.089019 1.100447
3 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
4 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
5 1 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
7 2 digital_ok 100.00% 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
8 2 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
9 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
10 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.499628 -0.610274 0.821729 -0.529658 0.372114 -0.958676 -1.434661 -0.992130 0.093971 0.104176 0.020715 1.162511 1.163578
11 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
12 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
13 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
14 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 45.517416 40.941818 50.479705 50.196030 12.406108 16.605088 402.979911 493.745682 0.018279 0.017350 0.000790 1.091899 1.090676
15 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.806369 -0.354375 0.011018 -0.011018 0.388850 0.415832 0.155226 0.799038 0.520990 0.510446 0.318672 1.722682 1.689121
16 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.806653 -1.573615 -0.509783 -0.839993 -0.145792 -0.364109 2.071726 1.013808 0.522841 0.513746 0.316649 1.715664 1.560955
17 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.607464 -0.477405 -0.347706 0.018256 -0.195948 0.378817 0.894458 1.722726 0.508018 0.505229 0.312334 1.628780 1.757216
18 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 4.555693 24.204112 0.983004 6.096509 3.518648 5.381659 19.952404 57.727288 0.272265 0.169545 0.134731 2.616871 2.369070
19 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.887752 3.178641 1.042208 3.897089 0.612855 3.234095 2.326572 12.960852 0.064510 0.037354 0.012107 1.174813 1.186266
20 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.100260 0.900069 0.269077 0.592553 0.836101 0.261566 0.196772 -1.585743 0.039234 0.082647 0.004391 1.202161 1.189279
21 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.182798 -1.089868 0.029325 -1.268476 0.429762 0.852855 0.402022 1.684797 0.086765 0.093512 0.021445 1.198423 1.195364
23 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 37.916530 30.999428 61.493252 50.468105 26.520533 12.880589 995.566589 434.382193 0.016617 0.016627 0.000375 1.095482 1.103220
24 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 43.652135 49.580288 64.728173 56.412603 28.559008 20.073621 1058.498797 641.961025 0.016325 0.016284 0.000376 1.064874 1.070468
25 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
26 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
27 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 10.467881 12.032776 26.797446 27.537660 3.455074 2.938486 5.638547 4.718191 0.054898 0.053008 0.003017 1.175955 1.191983
28 1 RF_maintenance 100.00% 94.09% 100.00% 0.00% 100.00% 0.00% 2.657644 15.499160 0.984176 8.170270 2.660346 4.085986 -0.513988 58.530084 0.362581 0.219743 0.200648 10.630738 3.767647
29 1 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
30 1 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
31 2 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.018886 -0.410551 -0.107071 -0.444789 -0.086851 -0.719511 1.877471 1.066606 0.068284 0.053613 0.008682 1.182379 1.175498
32 2 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 7.447051 0.326305 -0.422887 0.442148 -0.054368 0.181344 -0.730660 -1.476028 0.054253 0.067835 0.004341 1.184855 1.184102
33 2 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
36 3 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
37 3 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
38 3 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
39 0 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
40 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.492413 0.893863 0.363357 0.532494 0.715352 0.631210 0.420946 0.293616 0.548586 0.567601 0.301597 1.710409 1.787834
41 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.668024 0.591872 1.767781 0.704254 1.448220 0.396531 -1.649211 -1.445857 0.534232 0.554704 0.296944 1.978357 1.939104
42 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.814470 0.413569 -0.914228 -0.131166 -0.441424 0.314729 -0.295549 0.003303 0.570053 0.577895 0.310930 1.682333 1.758278
45 5 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 1.666306 13.312887 1.708625 27.127278 1.458913 2.673603 -1.556217 3.838038 0.475289 0.073868 0.245745 2.499379 2.061266
46 5 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.471710 0.217318 1.428622 0.425971 1.211747 0.274818 -1.557658 -0.995146 0.465351 0.464789 0.304148 1.257542 1.272692
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 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.061258 1.161989 -0.762950 0.855790 -1.818761 0.479967 -0.594143 -1.527003 0.484572 0.484312 0.284743 1.455264 1.586419
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 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.893887 0.950888 0.836940 0.745143 0.132407 0.382468 -1.206197 -0.494796 0.515815 0.533040 0.300481 1.567789 1.603028
54 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.737531 -0.009475 -0.941035 0.031472 -0.982974 0.660016 0.047792 0.098536 0.557069 0.583031 0.311890 1.540815 1.559156
55 4 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
56 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.728370 -0.108688 -0.657021 0.341990 -0.674411 0.285918 0.651379 4.598487 0.572339 0.587763 0.309373 3.586851 3.805582
57 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.054955 1.309659 -1.146997 1.386858 -1.264047 0.903097 -0.768145 -1.684308 0.564396 0.550707 0.308970 1.559055 1.605444
65 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.698473 -0.617520 -0.898005 -1.111875 -2.074996 -1.544261 -1.004922 -0.410518 0.450290 0.464501 0.285436 1.382038 1.384427
66 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.288668 -1.062505 -0.028482 -1.320812 -1.021426 -1.434250 -1.280852 0.579543 0.480618 0.502520 0.285230 1.395395 1.430853
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.450268 2.928942 1.461453 5.394887 1.666211 3.971808 1.441694 3.307515 0.525142 0.549283 0.306153 2.860773 3.548436
68 3 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
69 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.881698 -0.559553 -0.822065 -0.154259 -1.307080 -1.080028 0.040427 0.129016 0.562214 0.584482 0.314265 1.588608 1.660836
70 4 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
71 4 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
72 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.181935 -0.136407 0.132049 -0.582032 1.437829 -0.331928 1.238967 -0.187843 0.570560 0.592376 0.306504 1.568335 1.599285
73 5 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.298857 -0.500292 0.310946 -0.343803 -0.778662 -0.464085 -1.362365 0.212303 0.545845 0.563650 0.304975 2.999926 3.117819
81 7 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
82 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
83 7 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
84 8 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.717444 6.142125 -0.209549 4.733942 -0.200213 4.293153 -0.017708 2.011924 0.532615 0.559364 0.295902 2.882737 3.229131
85 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
86 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
87 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
88 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 13.026138 13.622079 23.989438 24.839939 3.415760 2.890453 7.365251 4.752712 0.042604 0.043433 -0.000731 1.143153 1.148157
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.686100 -0.941057 1.517963 -0.353357 1.520619 -0.269218 1.977451 -0.109521 0.543573 0.560169 0.309125 2.683028 2.839698
91 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
92 10 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 9.676278 12.004474 26.593251 27.612906 3.468008 2.970578 4.360712 5.390960 0.040975 0.061893 0.007390 1.239173 1.261821
93 10 RF_maintenance 100.00% 94.62% 100.00% 0.00% 100.00% 0.00% 3.002614 13.373135 -1.028731 27.917562 1.081017 2.894228 1.102191 6.349162 0.360386 0.061462 0.163411 3.653910 1.235466
94 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.512637 0.256683 0.778384 0.373810 0.227202 0.035900 -0.910405 -1.404544 0.495349 0.484194 0.288388 3.026793 2.655998
98 7 digital_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 11.179558 12.887787 23.551044 24.249522 3.390163 2.882941 4.175460 3.858644 0.035957 0.042199 0.007201 1.397084 1.890679
99 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.179993 0.621299 0.910690 1.372681 0.726737 1.042835 0.645321 0.664011 0.459023 0.478552 0.298572 1.441829 1.424387
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 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
102 8 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
103 8 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.783983 3.411272 0.331005 0.986143 0.662441 1.106016 0.237595 0.577996 0.550080 0.564358 0.313663 1.528982 1.517364
104 8 RF_maintenance 100.00% 0.00% 0.00% 100.00% 100.00% 0.00% 3.097737 38.418598 1.542885 23.200889 0.144592 6.995082 0.743596 3.081964 0.262283 0.219518 -0.244133 2.273912 2.064554
105 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
106 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.381347 0.437408 1.497152 1.010082 1.105164 0.970158 0.877323 0.684970 0.539929 0.560891 0.324187 1.480340 1.466982
107 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 10.603735 10.522695 24.211691 25.013317 3.357979 2.880365 4.219686 4.629844 0.046368 0.046795 0.002207 1.182365 1.185050
108 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
109 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.624069 -0.774870 -0.169603 -0.659189 -0.141038 -0.686541 0.096273 -0.106330 0.548542 0.554111 0.303511 1.469717 1.512644
110 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 21.029314 -0.789735 2.991073 -0.469138 0.198526 0.012650 1.233966 0.228770 0.474240 0.547202 0.272825 5.308504 3.793113
111 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.445601 -0.429016 -0.560001 -0.445354 -0.182344 0.251836 -0.215537 0.321460 0.529365 0.525408 0.289962 1.552550 1.590063
112 10 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% -0.961884 13.251300 0.196478 27.761513 -0.210110 2.929038 0.593893 3.827411 0.496142 0.071656 0.253724 2.605011 1.375457
116 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 11.854685 13.384221 24.146992 24.990234 3.272283 2.766912 3.694946 4.716598 0.045677 0.043041 0.002326 2.153608 2.401855
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% 100.00% 100.00% 0.00% 100.00% 0.00% 5.534413 19.229935 2.762362 29.785212 0.732389 2.873723 1.454087 6.489972 0.343272 0.046785 0.203994 2.909939 1.232631
121 8 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.268894 4.790303 0.189707 4.396413 0.431194 4.003610 17.698762 15.619432 0.523211 0.559686 0.317942 4.751072 4.152008
122 8 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
123 8 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.590273 1.135395 -1.318233 -1.228014 -1.570615 -1.499562 -0.648596 -0.788821 0.534361 0.550631 0.312715 1.512032 1.419293
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% 10.708103 11.569916 24.269231 25.283502 3.348747 2.880035 3.001834 5.486646 0.028495 0.032425 0.002873 1.180829 1.216245
126 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 11.251311 12.464517 24.029226 25.435262 3.357474 2.876274 4.297476 5.381670 0.032741 0.031525 -0.000411 1.248185 1.325430
127 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.244557 0.579177 0.566329 0.628838 0.694964 0.538447 0.536903 1.022717 0.552658 0.562210 0.310250 3.454646 3.631150
128 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.685651 0.009475 -0.421519 -0.645066 -0.048846 -0.720298 0.026177 -0.096555 0.553746 0.550810 0.274987 1.655199 1.636647
129 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.769048 -0.035647 2.885578 0.485173 3.001522 0.494435 1.141354 0.408596 0.547593 0.549182 0.287476 1.691816 1.590834
130 10 digital_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 10.128785 2.315015 26.683083 0.269718 3.387200 2.019197 3.156648 0.096261 0.057574 0.356561 0.146356 1.289134 7.485486
135 12 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.995260 -0.828205 -0.697756 -0.511098 -0.742742 -0.399664 -0.186115 0.035133 0.062612 0.083134 0.011363 1.165226 1.162219
136 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.446444 4.034260 -0.571295 0.448469 -1.423051 0.237454 -0.017353 1.861692 0.045736 0.060535 0.004765 1.196539 1.199167
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.165959 0.113739 -0.207798 0.286445 -0.558948 0.107428 0.217671 0.175634 0.506806 0.513355 0.304637 1.561740 1.601835
141 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.750647 0.423752 -1.179386 1.517434 -1.285823 1.052332 -0.189394 5.231800 0.514287 0.516015 0.299849 3.237712 3.587163
142 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.769236 13.318816 2.034210 27.589918 0.792411 2.906395 1.292304 3.615752 0.214046 0.056461 -0.024853 1.730031 1.307260
143 14 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.980592 -0.372199 -0.777282 -0.265939 -0.900616 -0.304583 -0.256635 -0.006752 0.064244 0.059848 0.010084 1.182889 1.183772
144 14 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.819215 2.584509 1.584458 2.714457 1.567465 2.659179 0.925876 1.277246 0.045970 0.042731 0.003504 1.205263 1.205329
145 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 10.235266 12.028024 26.931774 27.854801 3.435796 2.931350 4.339912 6.000756 0.034478 0.038716 0.000116 1.175640 1.177895
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 11.313311 13.324362 26.856001 28.254204 3.412493 2.923188 5.064780 5.638028 0.055025 0.055608 0.001399 1.271998 1.243788
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 10.133588 11.074770 26.417159 27.419399 3.447922 2.959850 5.028642 5.126228 0.043432 0.045656 0.002008 0.951247 0.952973
156 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.259389 -0.208344 -0.615827 0.175191 -0.067384 0.411231 1.909532 6.763280 0.047806 0.049256 0.005639 0.000000 0.000000
157 12 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -1.094290 -0.335027 -0.921437 -0.083486 -1.552546 -0.292065 -0.760342 1.023523 0.067361 0.054442 0.012971 1.148626 1.157119
158 12 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -1.006947 -1.038195 -0.962104 -0.854131 -0.798070 -0.217884 -0.124699 0.035752 0.075630 0.074477 0.017420 0.000000 0.000000
160 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 3.487990 5.978495 0.747343 -0.134325 2.485750 1.659806 -1.178751 2.397705 0.341392 0.332668 0.120885 2.661264 2.491468
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% 100.00% 100.00% 0.00% 100.00% 0.00% -0.120640 -0.360888 -0.244070 -0.396113 -0.266811 -0.384350 -0.003303 0.194093 0.053163 0.067634 0.005294 1.254703 1.258374
164 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.783847 -0.296453 -0.709885 -0.289556 -0.679837 0.237102 -0.092513 5.550902 0.061155 0.062111 0.008976 1.423940 1.397856
165 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
166 14 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
167 15 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.117850 3.263970 0.020523 0.520622 4.617881 2.975408 12.960050 8.652254 0.440674 0.460972 0.248846 2.227997 2.508890
168 15 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.618456 1.555434 0.365644 1.271777 -0.477567 0.892180 -1.380347 -1.832299 0.524749 0.512028 0.267142 4.286037 4.434406
169 15 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.616636 1.015715 1.368654 0.689792 0.783379 0.313113 -1.860608 -1.318149 0.506035 0.493829 0.266719 1.784996 1.754921
170 15 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.902607 0.438233 1.474814 0.217345 1.120947 -0.098369 -1.731432 -1.263723 0.477093 0.484027 0.262847 1.788532 1.736909
176 12 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
177 12 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
178 12 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
179 12 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -1.280132 -0.222828 -1.463053 -0.082129 -1.311822 -0.035900 0.052452 -0.040468 0.083740 0.086767 0.023869 1.355344 1.358011
180 13 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 7.064456 12.626016 0.130830 27.762604 0.990664 2.874556 8.296638 3.841650 0.290827 0.063634 0.126559 2.448077 1.426515
181 13 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.105131 0.714596 3.797643 1.021953 4.599739 1.375086 1.831729 1.617161 0.474627 0.468883 0.319430 3.068475 3.108157
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 0.00% 0.00% 2.69% 0.00% 2.63% 0.00% 1.048922 0.228537 0.981971 0.043357 0.318551 -0.139645 -1.717371 0.009943 0.456431 0.451766 0.308207 0.082984 0.074656
184 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
185 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
186 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
187 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
189 15 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.407488 -0.594295 -0.954192 -1.197954 -0.975609 -0.524977 -0.260937 -0.399502 0.502778 0.495646 0.289448 1.657928 1.656965
190 15 digital_ok 100.00% 67.20% 61.83% 0.00% 100.00% 0.00% 19.807993 17.705965 2.910620 3.914836 0.119814 4.159596 13.514424 14.000158 0.403121 0.406006 0.162336 4.814905 4.084311
191 15 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.114790 -0.786146 -1.165840 -0.513508 -2.143980 0.171687 -0.654308 1.930068 0.461309 0.463739 0.276935 1.572456 1.515705
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% 13.978567 14.568247 21.041506 21.437786 3.429707 2.725323 7.408680 5.687504 0.079402 0.088743 0.004036 0.000000 0.000000
321 2 not_connected 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
323 2 not_connected 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
324 4 not_connected 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 3.184000 2.976133 2.892643 2.633334 2.738327 2.308625 -2.101472 -2.193921 0.291824 0.283386 0.186470 0.000000 0.000000
329 12 dish_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.569204 0.205127 0.533942 0.203195 0.939114 -0.213793 1.755277 -1.409817 0.069674 0.070073 0.024402 0.000000 0.000000
333 12 dish_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.679825 -0.663331 3.339831 -0.975159 2.114128 -1.456620 3.357961 -0.443057 0.072606 0.068906 0.022389 0.000000 0.000000
In [16]:
# print ex_ants for easy copy-pasting to YAML file
proposed_ex_ants = [ant for i, ant in enumerate(ants) if np.any([col[i] > .1 for col in bar_cols.values()])]
print('ex_ants: [' + ", ".join(str(ant) for ant in proposed_ex_ants) + ']')
ex_ants: [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 36, 37, 38, 39, 45, 50, 52, 55, 56, 67, 68, 70, 71, 73, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 98, 100, 101, 102, 104, 105, 107, 108, 110, 112, 116, 119, 120, 121, 122, 124, 125, 126, 127, 130, 135, 136, 138, 141, 142, 143, 144, 145, 150, 155, 156, 157, 158, 160, 161, 162, 163, 164, 165, 166, 167, 168, 176, 177, 178, 179, 180, 181, 182, 184, 185, 186, 187, 190, 220, 221, 222, 320, 321, 323, 324, 329, 333]
In [17]:
# write to csv
outpath = os.path.join(nb_outdir, f'rtp_summary_table_{JD}.csv')
print(f'Now saving Table 1 to a csv at {outpath}')
df.to_csv(outpath)
Now saving Table 1 to a csv at /home/obs/src/H5C_Notebooks/_rtp_summary_/rtp_summary_table_2459759.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 [ ]: