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 = "2459770"
data_path = "/mnt/sn1/2459770"
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: 7-9-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/2459770/zen.2459770.25314.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/2459770/zen.2459770.?????.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/2459770/zen.2459770.?????.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)
3 1 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.385525 0.406509 1.028800 1.083547 0.005685 1.035150 0.193888 0.440535 0.477667 0.476717 0.301350 3.796208 3.904482
4 1 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.644126 2.625943 -0.219814 -0.175746 -0.646541 -0.505233 5.697874 1.711041 0.497017 0.485881 0.303360 4.725593 4.962926
5 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 10.53% 0.026285 -0.016322 0.170556 0.949313 -0.005685 0.988687 2.082835 -1.217350 0.502565 0.490402 0.304338 1.839353 1.835407
7 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.645059 -0.601150 -0.272986 -0.109947 -0.983921 -0.188692 0.270427 12.428335 0.489266 0.486633 0.309409 2.978532 3.590206
8 2 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.280346 3.667581 5.742811 6.524346 5.803651 5.651661 1.820351 -2.296258 0.463060 0.449725 0.291415 3.026430 3.427929
9 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.63% -0.503823 -0.890704 -0.856830 -0.526816 -0.102883 0.039947 -0.584043 0.267592 0.461519 0.453702 0.300384 1.209140 1.253372
10 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
15 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.63% -0.240498 0.085265 0.376202 -0.473025 0.807880 -0.031694 -0.053294 1.414041 0.513810 0.499964 0.303105 1.740522 1.816783
16 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 10.53% -0.878855 -0.714065 -0.412355 -0.377089 -0.514095 -0.743214 2.423266 1.280090 0.521484 0.513232 0.301266 1.794368 1.746282
17 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 13.16% -0.670838 -0.065082 0.259100 0.320145 0.536197 0.586209 0.621922 0.330113 0.515050 0.510993 0.297088 1.825659 1.997675
18 1 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 4.246672 9.212005 1.524929 6.227527 0.040849 3.654852 8.162713 38.817614 0.482042 0.297531 0.304044 2.868986 1.989256
19 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
20 2 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
21 2 digital_ok 0.00% 0.00% 0.00% 0.00% 2.63% 2.63% 0.696861 -0.463775 0.198065 0.889487 0.495416 0.449618 0.262630 -0.062153 0.465208 0.453332 0.294637 1.231730 1.294074
27 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 20.995991 24.563536 58.483050 59.554154 15.459394 13.024945 7.952577 6.493312 0.050865 0.052974 0.004151 1.214560 1.228129
28 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 7.768208 28.843665 7.979860 33.036997 13.139898 10.720501 -1.768849 45.729633 0.350888 0.190934 0.190001 11.565536 4.274763
29 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 13.16% -0.932843 -0.727853 -0.298455 -0.878567 -0.295177 -0.778560 -0.567203 1.010462 0.529274 0.528530 0.295105 1.838140 2.078923
30 1 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.222368 -0.153729 -0.787810 -0.748493 -0.941943 -0.641507 7.207013 0.022234 0.525383 0.523519 0.293415 3.753529 4.403952
31 2 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.469598 -0.157555 0.253080 -0.813011 -0.407037 -0.501709 5.899857 2.648444 0.522057 0.510681 0.304629 3.173938 3.432002
32 2 RF_maintenance 100.00% 59.14% 21.51% 0.00% 100.00% 0.00% 27.437022 29.366602 4.848338 3.611552 0.934602 0.571129 7.312233 11.326955 0.406334 0.417029 0.166814 2.733723 3.047944
33 2 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 0.537379 4.975290 0.255209 -0.421282 0.133362 2.064160 1.655193 7.824526 0.483298 0.311319 0.343960 3.300580 2.058518
36 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 7.109603 6.980195 0.398085 4.359325 -0.374373 2.852349 2.573302 2.463850 0.493612 0.475427 0.309125 2.944073 3.032652
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
40 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 18.42% 0.808403 0.816722 0.823143 0.971625 0.786899 0.533343 -0.178582 -0.208353 0.527277 0.534480 0.305503 1.876045 2.075749
41 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 23.68% -0.867489 -0.656677 -0.569800 -0.547303 -0.786857 -0.450565 -0.790587 -0.389936 0.536573 0.540713 0.302754 1.858916 1.987006
42 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.63% -0.678143 0.339838 -0.821416 -0.313681 -1.135844 0.119107 0.037213 0.585398 0.547766 0.548204 0.306703 1.750094 1.878400
45 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.910895 0.214565 11.477502 0.852120 8.820804 0.906993 2.627750 2.721827 0.510711 0.495678 0.308246 2.941973 3.034785
46 5 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.289821 -0.892807 0.240048 -0.943789 -0.287260 -0.334295 -0.738253 6.728045 0.493127 0.487643 0.308273 2.763066 2.781127
50 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.094610 1.002974 1.860082 -0.671124 2.527840 0.705048 15.665300 12.540722 0.498002 0.482604 0.293004 3.142704 3.354324
51 3 digital_ok 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 0.252683 39.565383 -0.541768 71.426246 -0.883849 12.698658 0.450285 14.028583 0.520393 0.042012 0.334421 2.825461 1.324633
52 3 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 6.460647 38.710073 -0.070210 68.990050 0.424050 12.790730 6.198231 10.803283 0.491265 0.043443 0.308718 3.441630 1.251089
53 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.63% 0.506769 0.737202 1.224673 0.524425 0.386267 0.308156 1.028714 2.188702 0.520896 0.530169 0.319777 1.574813 1.637667
54 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 5.26% -0.473216 -0.286499 -0.300342 -0.538486 -0.548997 1.120070 0.714241 -0.428087 0.516962 0.529917 0.297913 1.685080 1.807508
55 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.139517 6.025392 23.949117 8.478592 7.427562 8.405484 23.130282 -2.917728 0.524926 0.513982 0.294852 3.815107 4.407259
56 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.903718 0.239550 -0.699576 0.188402 -1.206094 0.597139 -0.050474 12.882322 0.543667 0.547263 0.302044 4.850106 4.737772
57 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.388572 1.684365 0.122892 4.575644 1.722582 3.616649 0.487447 -1.927114 0.539088 0.528984 0.309273 4.385721 4.172712
65 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.63% 1.949189 2.287729 3.650859 3.305956 2.711874 2.303326 -1.907606 -1.606942 0.496262 0.487227 0.293287 1.384222 1.406165
66 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.959729 1.249130 4.757005 1.557177 4.966540 1.501039 -2.077033 0.363737 0.518569 0.516635 0.305522 2.821711 2.997788
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.174643 3.317083 1.754251 10.621408 1.314636 7.029729 1.604559 4.719671 0.533720 0.540749 0.318111 2.655807 3.050686
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% 10.53% -0.698373 -0.306114 0.156619 -0.359107 -0.930437 1.080611 -0.685504 -0.654329 0.523172 0.539538 0.313297 1.758259 1.886489
70 4 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.624418 5.588737 0.522566 8.710868 0.705438 8.314971 0.708372 -2.887506 0.537523 0.519274 0.315153 10.539880 10.533928
71 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.242373 4.635174 -0.634670 7.437169 -0.629559 6.920437 0.509850 -2.584630 0.526141 0.519491 0.302429 10.897757 12.599314
72 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.63% 3.180411 -0.701681 0.735521 -0.333179 -0.073327 -0.153301 1.226527 -1.065836 0.538873 0.541653 0.304286 1.455134 1.470156
73 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.257152 1.103063 1.305931 3.230382 0.862803 2.607448 1.894350 1.475667 0.531822 0.528608 0.307522 3.568641 3.626829
81 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.017393 -0.174223 5.838515 -0.877670 4.610605 -0.536469 6.172173 0.496338 0.500817 0.498380 0.284615 3.690970 3.573494
82 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.525038 0.404589 1.394638 0.681189 1.548898 -0.276479 -0.799165 -0.331707 0.522366 0.528479 0.298742 3.644358 3.205944
83 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.694966 6.809600 1.271914 9.759257 1.001447 9.167456 -0.960663 -3.405247 0.527386 0.503310 0.310736 2.543428 2.664867
88 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 26.305717 27.932948 52.348002 53.831638 15.404221 13.007025 11.665740 6.606678 0.042845 0.043438 -0.000270 1.216664 1.222093
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.171342 0.240293 4.693794 -0.830530 2.909840 -0.701720 3.083541 -0.484017 0.525317 0.523337 0.311520 4.548233 4.906620
91 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 20.879661 23.243510 52.398147 54.628471 15.407365 13.000838 7.769296 7.514857 0.038498 0.042205 0.001917 1.309402 1.627182
92 10 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 8.529257 12.129150 3.949526 0.619293 11.954200 6.755883 -0.920584 4.511005 0.310968 0.322835 0.137047 4.825475 9.040197
93 10 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 8.523799 25.744148 -0.073716 60.494547 8.370671 13.158997 1.213487 9.325187 0.315261 0.051933 0.196266 4.227559 1.315237
94 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.715264 2.265784 0.533715 5.470973 0.989559 7.730265 4.617163 5.436667 0.461671 0.461974 0.299148 3.278449 3.318196
98 7 digital_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.114147 11.949571 7.872583 1.374359 8.549945 0.778596 -2.326340 2.822483 0.476096 0.492747 0.269002 3.530375 4.160006
99 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.63% 0.879788 0.102375 1.988970 0.831740 2.189094 0.843987 0.373316 -0.925770 0.515121 0.522820 0.291798 1.324199 1.375663
100 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 6.244892 4.696864 8.997799 7.427943 10.028362 7.262953 -2.539490 -2.979876 0.501419 0.513951 0.291018 2.727415 3.062433
105 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 22.831231 28.868470 50.250421 52.409942 15.336695 12.929357 5.781631 5.825034 0.038638 0.042473 0.004525 1.367367 1.430028
106 9 digital_ok 0.00% 0.00% 0.00% 0.00% 2.63% 0.00% 1.456347 1.218501 2.585542 1.475335 1.762209 1.221187 3.655705 0.149539 0.525226 0.521755 0.320851 1.400362 1.418726
107 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 21.452523 22.001346 50.445434 51.905414 15.371904 12.977811 4.400438 5.297358 0.043598 0.046515 0.004974 1.357083 1.360482
108 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.63% 0.097622 1.985617 0.374990 0.217825 -0.463623 0.141509 -0.233694 -1.249625 0.516356 0.516567 0.310412 1.387523 1.370675
109 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.63% -0.843273 -0.437424 -0.348057 -0.619120 -1.045150 -0.306472 -0.037213 -0.406378 0.504716 0.505602 0.304626 1.220416 1.340878
110 10 RF_maintenance 100.00% 48.39% 0.00% 0.00% 100.00% 0.00% 35.819296 6.471030 6.006885 9.221277 0.637869 8.757698 1.065031 -3.319636 0.412237 0.463750 0.259287 4.357760 4.419667
111 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.63% 0.386407 -0.066226 -0.821073 -0.869610 -0.701063 -0.187545 -0.663477 0.929117 0.469566 0.470872 0.292445 1.349797 1.396133
112 10 RF_maintenance 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% -0.977559 0.016322 0.640034 -0.767567 0.372707 1.614527 0.376330 1.311583 0.174969 0.176962 -0.271479 2.239841 1.980037
116 7 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.490689 5.824316 4.139295 8.527912 4.356479 8.277961 -1.994967 -3.266409 0.476640 0.462780 0.271035 4.627033 5.287908
117 7 digital_ok 0.00% 0.00% 0.00% 0.00% 2.63% 2.63% 1.819008 -0.028295 3.209023 -0.063069 2.991209 0.189947 -1.965047 -1.246493 0.507753 0.519643 0.291289 1.306103 1.320753
118 7 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.043616 1.081766 1.725896 0.145474 1.480561 -0.229381 0.149500 7.138536 0.515173 0.524618 0.302544 3.972154 4.405609
119 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.820995 1.427718 3.521042 1.841723 2.964443 1.338479 -2.114922 -1.733745 0.509557 0.521039 0.311255 2.868306 3.166237
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% 21.294444 23.433593 53.010392 54.850248 15.367271 13.047549 4.674053 7.787471 0.029973 0.033234 0.001989 1.302946 1.374714
126 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 21.742836 24.210816 52.503020 55.170518 15.397377 13.036928 6.183700 8.064637 0.034651 0.034756 -0.000268 1.382439 1.502846
127 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.776492 0.976216 2.565456 1.778080 1.507283 2.037618 0.392128 0.611851 0.513957 0.515564 0.307097 4.400707 4.923482
128 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 2.63% -0.455911 1.500273 -0.461575 -0.667793 -0.904751 -0.498581 -0.270127 0.361652 0.499123 0.493480 0.295879 1.226291 1.308902
129 10 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.107384 -0.429166 5.451675 -0.746652 4.198138 -0.649677 1.216533 1.254568 0.484693 0.486116 0.296318 4.499114 5.169790
130 10 digital_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 20.501498 7.526994 58.340947 6.513754 15.367332 9.396147 4.861968 -0.583303 0.048056 0.293566 0.166437 1.312482 4.510858
135 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 5.26% -0.878430 -0.410529 -0.775383 -0.779227 -0.825778 -0.352638 3.300847 1.433824 0.467327 0.473664 0.274504 1.448542 1.468452
136 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.652419 11.069523 -0.776132 1.484033 -0.579263 0.568557 2.765170 4.281740 0.495765 0.486236 0.276706 5.010553 6.142955
137 7 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 8.585994 24.372233 34.956516 52.930028 10.981400 13.008543 3.955434 5.706936 0.298719 0.054935 0.193902 2.928092 1.369806
138 7 digital_ok 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 23.946470 2.296668 51.402253 2.806755 15.325703 1.801671 4.043322 0.943884 0.045239 0.521259 0.361800 1.206359 3.230538
140 13 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.719340 1.439046 -0.148294 0.120077 0.093109 0.125323 0.721907 0.550740 0.080079 0.077228 0.015462 1.255806 1.257849
141 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.475962 5.589000 -0.680470 38.496128 -0.426531 3.588409 1.321521 23.423040 0.065112 0.069526 0.017340 1.249345 1.246347
142 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 23.496573 26.022821 34.552894 59.842751 6.498111 13.018428 4.113732 4.779879 0.088999 0.036867 0.035712 1.275987 1.245618
143 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 4.561119 5.651962 6.242625 8.963993 7.127561 8.657099 -2.571175 -3.407090 0.489151 0.479240 0.302321 3.574201 3.109315
144 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.778480 4.124564 3.218663 7.836302 2.325987 4.592728 3.467659 28.933816 0.517369 0.516830 0.321033 3.888208 3.658905
145 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 20.967577 24.142622 58.818004 60.283508 15.333827 12.969657 6.666647 6.943755 0.039092 0.041900 -0.000333 1.345681 1.347293
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 22.323798 25.911426 58.682477 61.338507 15.522714 13.139755 7.606440 8.415823 0.043870 0.045689 0.001604 1.254896 1.250468
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 20.091077 22.311061 57.569365 59.371443 15.432911 13.022408 7.402001 8.296597 0.051498 0.050402 -0.000031 1.355278 1.420725
156 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.086707 4.934778 -0.841975 0.936347 -0.171766 10.134326 5.817758 103.036124 0.488324 0.462524 0.288384 5.380515 4.707740
157 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.956188 -0.191743 3.274585 -0.356831 3.584174 -0.193551 -1.362465 0.926399 0.488091 0.492619 0.289779 5.024226 4.858690
158 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.270317 -0.987915 -0.270930 -0.549664 -0.221048 -0.583883 -0.430292 2.430246 0.489419 0.494113 0.294458 4.816585 4.499569
160 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 19.536897 21.450889 58.001007 59.580489 15.422471 13.014453 4.255094 4.934639 0.035535 0.036240 0.002233 1.240329 1.235408
161 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.799177 42.720132 2.628049 15.810412 2.714343 4.660665 1.869912 10.513132 0.045574 0.052058 0.003623 1.223330 1.220415
162 13 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.403778 -0.530928 0.306516 -0.865866 1.405225 -0.311290 0.274557 2.342471 0.057758 0.052285 0.004419 1.214045 1.213878
163 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.813289 0.886634 5.806610 3.653870 6.102102 3.408228 -2.298944 -1.415943 0.478014 0.485389 0.298783 3.761353 3.716057
164 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.867193 1.484916 7.227455 4.282108 7.759253 3.820511 -2.402661 -2.047430 0.475682 0.485064 0.293051 4.639082 4.581723
165 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.861534 -0.362179 -0.643114 -0.872238 -0.721731 -0.271276 5.629335 0.136177 0.493039 0.495637 0.291770 5.102008 5.765051
166 14 RF_maintenance 100.00% 8.06% 0.00% 0.00% 100.00% 0.00% 17.367896 6.109255 3.928448 1.761716 12.394326 15.881028 226.679104 160.011961 0.429889 0.469584 0.249297 2.444420 2.758237
167 15 digital_ok 100.00% 97.31% 96.77% 0.00% 100.00% 0.00% 39.685260 16.493206 4.223198 5.948898 11.359751 8.883014 104.053018 45.678406 0.339594 0.360208 0.123440 2.601074 2.468938
168 15 RF_maintenance 100.00% 0.00% 2.69% 0.00% 100.00% 0.00% 3.951501 6.458919 5.957236 9.034367 5.909976 8.471124 -1.985103 -3.135676 0.462550 0.448020 0.278227 4.921814 4.519438
169 15 digital_ok 100.00% 8.06% 13.44% 0.00% 100.00% 0.00% 6.165336 5.466771 8.782152 7.513008 9.308483 7.259290 -3.113829 -1.725027 0.442167 0.434771 0.275568 4.349750 4.083648
170 15 digital_ok 100.00% 18.82% 13.44% 0.00% 100.00% 0.00% 6.606163 4.287033 9.016765 6.282834 9.870564 6.074191 -2.737763 -2.023642 0.421191 0.430163 0.275129 3.158417 3.489508
176 12 digital_ok 0.00% 0.00% 0.00% 0.00% 2.63% 0.00% -0.039804 -0.985847 1.123116 -0.642686 0.805490 -0.302499 -1.323520 -0.412297 0.464772 0.467019 0.288938 1.384491 1.445970
177 12 digital_ok 0.00% 0.00% 0.00% 0.00% 2.63% 0.00% 0.351462 1.357734 -0.814868 1.857678 -0.899006 1.732596 -0.176689 -0.247788 0.475601 0.459734 0.297141 1.336119 1.401159
178 12 digital_ok 0.00% 0.00% 0.00% 0.00% 2.63% 0.00% -0.486605 -1.347712 2.306282 -0.892661 1.778405 -0.880334 0.541117 -0.815931 0.476874 0.475141 0.297610 1.284851 1.302136
179 12 digital_ok 0.00% 0.00% 0.00% 0.00% 2.63% 0.00% -0.291300 0.356363 0.664376 -0.382959 -0.036578 -0.530666 -0.557589 -0.736224 0.468905 0.470180 0.300595 1.381322 1.386240
180 13 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 77.180378 24.671620 12.109103 60.327717 14.703714 13.023393 72.871098 5.215222 0.084397 0.035051 0.035815 1.301263 1.253163
181 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 4.934111 0.998975 9.783731 2.188292 8.228699 2.149039 2.099429 1.454991 0.056130 0.056425 0.006387 1.304716 1.298880
182 13 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 3.577688 11.532788 6.169067 51.260872 6.508901 2.379873 -2.421094 33.875190 0.068006 0.073385 0.011827 1.284406 1.272069
183 13 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.573027 0.103579 1.950756 3.012814 1.329057 1.551154 0.959422 1.158849 0.063753 0.052625 0.005687 1.281111 1.264106
184 14 digital_ok 0.00% 0.00% 0.00% 0.00% 5.26% 0.00% -0.808952 -0.369471 -0.076243 0.063069 -1.007427 -0.386760 0.485426 0.080301 0.488721 0.480675 0.308938 1.332698 1.384728
185 14 digital_ok 0.00% 0.00% 0.00% 0.00% 5.26% 0.00% -0.274525 -0.576626 -0.687524 -0.485774 -0.881849 -0.181497 -0.469131 -0.982237 0.490991 0.487319 0.301862 1.261403 1.208099
186 14 digital_ok 0.00% 0.00% 0.00% 0.00% 2.63% 2.63% 0.305250 -0.047118 -0.776170 -0.782438 -0.973499 -0.677637 0.860587 -0.736058 0.481611 0.478149 0.296620 1.399707 1.386939
187 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.560560 0.137028 -0.356658 0.336461 -0.629650 -0.062719 5.027121 6.976487 0.480251 0.482428 0.287967 3.697981 4.050537
189 15 digital_ok 0.00% 0.00% 2.69% 0.00% 5.26% 2.63% 0.960562 1.202052 -0.070029 -0.439108 -0.671345 -0.274010 -0.794865 2.510163 0.455042 0.450099 0.293194 1.099866 1.113617
190 15 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 52.765288 25.719402 9.595665 60.217659 19.090501 13.024449 107.395863 6.026788 0.303544 0.047802 0.214615 2.887772 1.675502
191 15 digital_ok 100.00% 18.82% 13.44% 0.00% 100.00% 0.00% 0.837673 -0.083339 2.412105 -0.308365 1.817877 0.372875 -1.116381 10.306181 0.424785 0.425790 0.283471 3.049670 3.245019
220 18 RF_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
221 18 RF_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
222 18 RF_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% nan nan inf inf nan nan nan nan nan nan nan 0.000000 0.000000
320 3 dish_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 26.366639 25.906382 45.563730 46.165149 15.405709 12.961905 7.866348 5.549171 0.060789 0.053447 0.001216 0.000000 0.000000
321 2 not_connected 100.00% 91.40% 97.31% 0.00% 100.00% 0.00% 3.017633 2.304171 4.362408 4.534282 4.293794 3.737995 3.019793 1.910960 0.343639 0.326241 0.241006 0.000000 0.000000
323 2 not_connected 100.00% 96.77% 97.31% 0.00% 100.00% 0.00% 21.098625 5.680077 4.179177 8.474576 4.012900 8.354923 25.486888 -1.325071 0.249888 0.311341 0.210756 0.000000 0.000000
324 4 not_connected 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 6.981352 7.348340 9.962228 9.922432 10.641139 9.126548 -2.211435 -3.616855 0.313421 0.297815 0.218120 0.000000 0.000000
329 12 dish_maintenance 100.00% 83.33% 97.31% 0.00% 100.00% 0.00% 1.251181 3.932818 0.812786 6.452929 0.551811 5.550780 2.321033 -2.663803 0.349382 0.327120 0.240097 0.000000 0.000000
333 12 dish_maintenance 100.00% 91.40% 97.31% 0.00% 100.00% 0.00% 4.100181 2.266857 8.564462 3.474226 3.431352 3.375970 3.149314 -1.671425 0.337321 0.330525 0.228725 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: [3, 4, 5, 7, 8, 10, 16, 17, 18, 19, 20, 27, 28, 29, 30, 31, 32, 33, 36, 37, 38, 40, 41, 45, 46, 50, 51, 52, 55, 56, 57, 66, 67, 68, 69, 70, 71, 73, 81, 82, 83, 88, 89, 90, 91, 92, 93, 94, 98, 100, 105, 107, 110, 112, 116, 118, 119, 124, 125, 126, 127, 129, 130, 136, 137, 138, 140, 141, 142, 143, 144, 145, 150, 155, 156, 157, 158, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 180, 181, 182, 183, 187, 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_2459770.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 [ ]: