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 = "2459767"
data_path = "/mnt/sn1/2459767"
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-6-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/2459767/zen.2459767.25308.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/2459767/zen.2459767.?????.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/2459767/zen.2459767.?????.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 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 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.623221 -0.706431 -0.058984 -0.157456 -0.413132 0.743611 0.106461 0.814233 0.543672 0.535180 0.296874 1.564294 1.601791
8 2 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.141264 1.424690 1.539725 1.857321 0.548970 1.024882 -0.315218 -2.172307 0.526532 0.508200 0.286459 2.661175 2.707084
9 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.257606 -0.373497 0.107364 0.243228 -0.191520 0.105377 0.175776 0.500209 0.528016 0.515035 0.291499 1.435981 1.451397
10 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.537084 -0.639327 -0.978846 -0.024830 -1.586710 0.142180 -0.381501 1.172645 0.510438 0.502472 0.287235 1.485771 1.493994
15 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.362300 -0.212362 0.555976 0.082140 0.666828 0.513844 0.400429 0.132675 0.539195 0.525714 0.301538 1.656924 1.684169
16 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.572204 -1.589436 -0.373159 -1.050376 0.322737 -0.512723 3.278842 0.646624 0.550058 0.536310 0.301418 1.692470 1.792834
17 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 15.79% -0.684581 2.366119 -0.095454 0.591283 0.431412 0.776123 0.678620 1.766607 0.547156 0.539837 0.292220 1.741554 2.080234
18 1 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 9.916008 19.737370 3.827366 6.992274 4.218003 5.426098 45.845437 62.512810 0.472593 0.312990 0.263475 2.282837 1.769357
19 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.190322 1.012822 -0.363306 1.406075 -1.041856 0.416020 -0.995162 -1.563088 0.552720 0.533485 0.295764 1.503784 1.608791
20 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.594503 -0.288532 0.988924 -0.599350 1.774201 -1.080130 0.630172 -0.464142 0.546345 0.522201 0.288328 1.540381 1.587955
21 2 digital_ok 100.00% 0.00% 40.32% 0.00% 100.00% 0.00% 0.718710 1.443410 0.224892 9.685742 1.448598 137.939275 1.830610 39.467803 0.531313 0.468236 0.303061 3.151565 2.871967
27 1 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 16.801939 19.756932 36.357193 37.247608 6.007634 5.133406 8.893185 7.245976 0.065681 0.068256 0.002022 1.208953 1.216407
28 1 RF_maintenance 100.00% 73.12% 100.00% 0.00% 100.00% 0.00% 4.821702 28.339652 2.912306 21.237243 4.177221 7.423544 -2.101695 45.597519 0.378842 0.201021 0.198223 8.339666 3.214917
29 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.672486 -0.329455 -0.170948 -0.137110 0.519573 -0.388342 -0.036103 -0.145776 0.559932 0.559707 0.288442 1.653101 1.856608
30 1 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.987773 -0.069978 -1.134443 -0.106724 -1.260522 -1.013891 0.636363 0.142250 0.558632 0.560931 0.289094 1.619861 1.666781
31 2 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.342883 1.066987 0.317984 1.314886 0.058342 -0.416901 1.722046 1.512993 0.573286 0.564472 0.293298 1.489417 1.494200
32 2 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 21.415203 23.289740 2.670264 2.363251 0.283731 0.438666 2.662878 1.082937 0.470321 0.470438 0.154398 5.293620 3.960090
33 2 RF_maintenance 100.00% 0.00% 83.87% 0.00% 100.00% 0.00% -0.164089 6.335532 -0.163728 -0.188056 -0.355888 0.231003 0.298544 9.845061 0.545757 0.368543 0.348879 2.978759 1.845619
36 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.353804 6.136214 0.599141 2.813268 0.370377 2.364378 0.621816 2.213266 0.546825 0.527950 0.303543 2.593034 2.593303
37 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.497495 0.509946 1.904153 0.813360 3.072394 -0.148713 0.969330 1.518904 0.550985 0.533364 0.294308 1.372285 1.408815
38 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.834959 1.309205 2.231010 1.238172 2.386494 0.228394 7.278847 -1.432514 0.555261 0.541970 0.301546 2.450418 2.410985
40 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.082195 1.325580 1.034111 1.055395 1.105712 0.698323 0.670361 0.691826 0.555651 0.566381 0.293705 1.658700 1.864148
41 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.872171 -0.527607 -1.240385 -0.072796 -0.671403 -0.357276 -0.610977 -0.241179 0.562405 0.571502 0.292998 1.647392 1.759706
42 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.899210 0.826084 -0.852757 0.185481 -0.392244 0.105458 -0.214208 0.109070 0.571714 0.575968 0.296915 1.644807 1.742921
45 5 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.111960 1.850449 7.476291 2.108117 5.323595 1.302650 3.751231 -2.273650 0.565416 0.529306 0.304083 2.588399 2.516477
46 5 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.119112 -0.320252 -0.992818 -0.226918 -1.111143 -0.182489 -0.305376 0.551718 0.551125 0.540262 0.301862 1.456381 1.446636
50 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 11.647814 0.434030 2.895250 -0.056250 9.060129 0.353044 9.730753 0.213834 0.506881 0.529035 0.275071 3.087970 2.794167
51 3 digital_ok 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 0.487351 34.603419 -0.168123 44.493137 -0.332546 5.003803 0.216750 15.026291 0.564862 0.073768 0.354770 2.633652 1.225052
52 3 RF_maintenance 100.00% 0.00% 100.00% 0.00% 100.00% 0.00% 5.353231 36.812831 0.570864 44.871333 0.485983 4.758873 2.695669 13.396888 0.537962 0.074926 0.332962 3.622759 1.205884
53 3 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.305845 -0.271303 -0.902883 -1.170251 -1.716857 -1.080697 0.207212 5.889117 0.559591 0.570276 0.299052 2.594349 2.800625
54 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.555395 0.366196 -1.021696 0.271187 0.226615 0.838701 0.944886 0.573816 0.541434 0.559340 0.280424 1.633532 1.792819
55 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.728217 3.164398 15.271552 3.010098 3.671263 2.311802 8.890699 -2.498351 0.549072 0.541198 0.284217 2.522598 2.746685
56 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.401105 1.010227 -0.432994 0.866704 -0.575666 -0.040055 0.090829 1.446207 0.569542 0.577141 0.299026 1.582531 1.627411
57 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 5.094156 -0.204791 6.546864 0.462845 1.980298 0.178775 3.658218 -0.155628 0.571385 0.562977 0.299026 2.522082 2.473080
65 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.038482 0.314323 -0.027593 -0.043797 -1.156097 -0.464671 -1.469748 -1.229509 0.538828 0.529989 0.286906 1.441632 1.498622
66 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.705869 -0.425485 1.378675 -1.167127 0.132670 -1.189000 -2.135501 0.171772 0.556881 0.559289 0.294269 1.461853 1.501088
67 3 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.241767 4.078558 2.631947 7.729945 2.083090 4.916773 2.068514 6.813766 0.577211 0.581265 0.303049 2.589019 2.919854
68 3 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.139087 0.234765 -0.761292 1.369173 -1.020184 -0.055508 -1.030325 0.477203 0.558498 0.577235 0.301866 1.473556 1.622977
69 4 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.537473 -0.626614 -0.692141 -0.099609 -1.560532 1.514407 -0.045031 1.028617 0.557587 0.573169 0.298808 1.587395 1.605791
70 4 RF_maintenance 100.00% 16.13% 16.13% 83.87% 100.00% 0.00% 2.674131 8.153942 0.119511 10.472135 0.517556 4.377146 3.864518 5.728204 0.254136 0.273258 -0.230623 2.603184 2.622714
71 4 digital_ok 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% -0.247322 -0.258196 -0.262226 -0.256098 -0.866098 -0.766401 -0.098624 -1.099550 0.270064 0.267691 -0.263494 2.224427 2.237988
72 4 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.367098 -0.130750 0.691231 -0.437288 0.855867 -0.808477 4.449172 -0.260768 0.567638 0.573293 0.298395 2.823234 2.628425
73 5 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.431830 0.878037 0.746268 1.773898 0.766603 0.557179 1.371747 1.678969 0.568462 0.563745 0.302156 2.345787 2.284973
81 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.437655 -0.337476 3.405001 -0.415147 3.174369 -0.389091 2.268664 -0.062092 0.536814 0.533101 0.280981 1.411287 1.554288
82 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.697749 0.295217 -0.818153 0.693119 -1.502480 0.026923 -1.013085 0.081984 0.555463 0.562584 0.290875 3.408530 3.204532
83 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.589859 3.707116 -1.268929 3.634917 3.548241 2.754654 -0.264910 -2.185155 0.562889 0.537524 0.304605 1.393899 1.552618
88 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 22.447815 23.615629 32.487393 33.563982 5.862980 4.831118 11.400522 6.761802 0.057123 0.057747 -0.000602 1.197183 1.199448
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.157757 0.670509 2.410511 -0.313779 1.973534 1.148794 10.470816 19.456685 0.556414 0.559756 0.302874 2.907019 3.041586
91 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 17.189375 19.369277 32.527124 34.046500 5.740497 4.738847 8.313584 7.783361 0.052970 0.054061 -0.000191 1.285439 1.568826
92 10 digital_ok 100.00% 78.49% 100.00% 0.00% 100.00% 0.00% 6.359859 10.027931 0.583086 0.249351 3.042088 1.627700 -0.938764 8.820092 0.354217 0.360159 0.132226 4.330382 6.587952
93 10 RF_maintenance 100.00% 78.49% 100.00% 0.00% 100.00% 0.00% 5.889173 21.995438 -0.776425 37.730780 0.914281 4.915326 1.069269 9.814870 0.359162 0.073597 0.192139 3.362455 1.287271
94 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.025218 2.779273 0.714597 4.036234 0.255566 2.635615 1.824396 5.476501 0.519021 0.510372 0.294994 3.030423 2.837200
98 7 digital_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.561285 1.563739 2.549030 0.877909 1.980884 1.457459 -2.442507 3.172955 0.505143 0.530558 0.288581 2.833830 3.094746
99 7 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.788337 -0.784438 -0.626209 -0.656840 -0.853340 -0.754285 -0.346714 -0.442328 0.538720 0.553630 0.288789 1.448490 1.409539
100 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 3.617372 2.141349 3.439270 2.331617 2.527941 1.650875 -1.639475 -2.657346 0.532485 0.545685 0.295762 2.542736 2.543366
105 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 18.654790 23.888639 32.502753 33.978061 5.629741 4.636128 6.069181 6.306840 0.045216 0.054873 0.010079 1.285775 1.379947
106 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.848740 1.977834 2.982957 2.086493 1.000123 0.677579 1.806874 1.479212 0.553865 0.554781 0.311291 1.379366 1.327201
107 9 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 17.853119 18.376966 31.279900 32.302786 5.667271 4.714990 4.999452 5.927507 0.056827 0.061373 0.006538 1.281812 1.282134
108 9 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.179990 1.625239 0.805195 -0.939878 0.049063 -1.128120 0.365957 -0.737634 0.555310 0.554429 0.304851 1.311835 1.313101
109 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.291661 -0.587151 0.234387 -0.655659 -0.175044 -0.301472 0.823184 -0.060677 0.553443 0.543929 0.298222 1.397420 1.454741
110 10 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 31.804306 3.569375 3.565618 3.381535 -0.104545 2.393377 1.279459 -1.588900 0.459340 0.504146 0.248188 4.069184 3.092468
111 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.134675 -0.182575 -0.257199 -0.342336 -0.026923 0.259964 -0.205821 1.933682 0.522887 0.512400 0.288605 1.474624 1.519528
112 10 RF_maintenance 0.00% 0.00% 0.00% 100.00% 100.00% 0.00% -0.946044 -0.257196 0.081113 -0.029626 -0.714139 1.735889 0.298685 0.405505 0.228752 0.233820 -0.258819 2.091376 1.959241
116 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.363800 2.987116 0.254310 2.999332 0.564711 1.979369 -1.257278 -2.411261 0.507855 0.490435 0.273979 3.560431 3.176216
117 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
118 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
119 7 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.192104 -0.521765 0.382335 -0.885058 -0.764122 -1.051514 -1.709392 -1.221833 0.539717 0.549364 0.305158 2.579538 2.435381
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% 17.505714 19.324701 32.895896 34.174775 5.528066 4.752742 5.344258 9.119810 0.034388 0.038269 0.002175 1.250636 1.303404
126 9 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 17.786012 19.778034 32.572842 34.378164 5.710026 4.735890 6.624838 8.472179 0.045003 0.042147 0.000050 1.329018 1.375744
127 10 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 1.031695 1.323653 1.192275 1.211925 1.498129 1.674336 1.042286 1.725578 0.554551 0.553010 0.298679 3.219146 3.336532
128 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.015287 0.636693 0.098211 -0.623398 -0.256725 -0.423973 0.271745 0.064455 0.546009 0.529268 0.290649 1.510037 1.520686
129 10 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 1.874509 -0.542229 3.580331 0.027372 2.894120 -0.466159 2.449945 0.352787 0.534038 0.527826 0.289756 1.610456 1.546434
130 10 digital_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 16.794055 4.631485 36.211569 1.920134 5.827098 1.754023 5.234597 0.550207 0.076651 0.331834 0.174627 1.324640 6.538471
135 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.103971 -0.716065 -0.519033 -0.484955 -0.368355 -0.296133 0.047269 -0.087373 0.500974 0.502460 0.276936 1.384656 1.351586
136 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.219031 1.520036 -0.398044 0.395986 -0.495254 2.603517 0.126592 15.287236 0.531143 0.521493 0.292684 3.303358 3.435230
137 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
138 7 digital_ok 100.00% 100.00% 0.00% 0.00% 100.00% 0.00% 19.591450 2.594626 31.882891 2.229613 5.681821 1.021493 4.578413 1.074157 0.063538 0.550321 0.364806 1.224320 2.348097
140 13 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 0.813020 0.917948 0.183533 0.703797 0.153024 -0.195171 0.421429 0.200891 0.089611 0.088590 0.017127 1.271184 1.269168
141 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.307026 2.888064 -0.984228 22.612668 -0.697344 4.011895 0.011174 16.551711 0.074093 0.077035 0.016707 1.295310 1.290628
142 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 20.388658 21.447817 19.976291 37.314546 2.064931 4.863130 6.864345 5.619679 0.096673 0.040455 0.036601 1.327060 1.283733
143 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.501391 -0.404649 -0.797379 -0.249456 -0.933655 -0.386875 -0.450477 -0.322922 0.530341 0.536944 0.301492 1.373540 1.313233
144 14 digital_ok 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.889012 2.837189 4.127409 3.236744 4.435138 3.314976 2.794521 1.897969 0.544382 0.545118 0.313072 4.185788 4.220436
145 14 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 16.636654 19.403333 36.528295 37.567486 5.901614 5.091903 6.845664 7.748383 0.050722 0.052845 -0.000187 1.415382 1.406062
150 15 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 18.302008 21.601064 36.410608 38.198946 5.819334 4.830686 8.012620 8.944810 0.067522 0.070338 0.001692 1.322625 1.312257
155 12 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 16.541940 18.288958 35.838593 37.094811 6.084760 5.101229 7.945915 8.020620 0.066408 0.060924 0.003157 1.378202 1.431879
156 12 RF_maintenance 100.00% 0.00% 0.00% 0.00% 100.00% 0.00% 0.301777 1.062152 -0.360087 1.929591 0.413012 13.976329 2.135841 14.301467 0.521376 0.517250 0.286731 3.882751 3.639565
157 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.579644 -0.314814 0.084843 0.125310 -0.536917 -0.138980 -1.337887 0.388628 0.522835 0.526455 0.285981 3.320749 3.165759
158 12 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% -0.676496 -0.951035 -1.015248 -1.017297 0.158702 -0.374317 -0.073261 -0.407431 0.522856 0.526439 0.288421 3.332030 3.092445
160 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 17.002296 19.926141 36.025441 37.195985 5.840039 5.348061 5.151414 6.367368 0.040567 0.039763 0.001558 1.218359 1.210799
161 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 2.116974 38.358084 2.004559 9.940437 2.244930 2.595886 1.271519 4.123976 0.051432 0.051522 0.003115 1.264897 1.259140
162 13 digital_ok 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.252499 -0.727857 -0.040263 -0.591448 1.278880 0.118541 0.404485 0.434241 0.068844 0.059069 0.004709 1.251335 1.242805
163 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.300212 -0.256360 0.111189 -0.369648 -0.408075 0.316408 -0.027127 0.027127 0.521599 0.519415 0.299965 1.451556 1.461099
164 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.630895 -0.219129 -0.605017 0.003016 -1.083297 -0.064510 -0.276440 0.480991 0.521829 0.520644 0.297276 1.375703 1.395431
165 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.508188 -0.252458 -0.186813 -0.471128 -0.693326 -0.423702 1.837287 -0.049525 0.521209 0.519409 0.290590 1.526706 1.617393
166 14 RF_maintenance 100.00% 2.69% 0.00% 0.00% 100.00% 0.00% 20.472063 17.663483 3.485958 3.011992 1.276910 1.027000 6.772799 5.499902 0.427432 0.450485 0.168301 2.134322 2.280486
167 15 digital_ok 100.00% 53.76% 78.49% 0.00% 100.00% 0.00% 11.255097 14.569457 1.327069 1.088374 4.980689 3.169660 9.968726 12.959683 0.414239 0.387001 0.151073 2.420878 2.193602
168 15 RF_maintenance 0.00% 0.00% 0.00% 0.00% 100.00% 0.00% 2.134793 3.532929 1.892837 3.301877 0.682775 2.369428 -2.198180 -2.409710 0.508278 0.486175 0.275123 3.600733 3.741780
169 15 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 3.428421 2.636277 3.244961 2.382764 2.454465 1.522155 -2.664208 -2.514671 0.492657 0.478830 0.268318 1.763159 1.714878
170 15 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 3.770789 1.745169 3.382623 1.769801 2.722607 1.203136 -2.556918 -2.036552 0.470486 0.473518 0.265301 1.642939 1.604131
176 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -1.058702 -0.865772 -0.943158 -0.003016 -1.574331 -0.063059 -1.033084 -0.208076 0.502102 0.501732 0.285883 1.380984 1.414863
177 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.049895 2.470974 -0.194035 2.242083 -0.295368 0.238247 -0.074634 -2.564190 0.509997 0.475947 0.296318 1.342201 1.468688
178 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.375487 -0.803963 1.781864 -0.220879 1.242588 0.206774 0.849957 3.312449 0.516702 0.512717 0.293233 1.305206 1.295555
179 12 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.980485 0.039278 -1.273831 0.090652 0.219781 -0.332389 0.823332 -0.253279 0.507464 0.506002 0.294472 1.331717 1.345640
180 13 RF_maintenance 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 35.831234 20.437019 4.736456 37.552860 30.048893 4.829194 592.866709 6.202990 0.092740 0.040868 0.035681 1.258851 1.219587
181 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% 4.732271 1.448285 5.666187 1.767238 5.002091 1.129028 3.034269 1.739617 0.056900 0.062777 0.006436 1.269937 1.262540
182 13 RF_maintenance 0.00% 100.00% 100.00% 0.00% 100.00% 0.00% 1.285359 1.793135 1.723218 2.068152 1.005790 1.248121 -2.223741 -2.623114 0.072725 0.076416 0.009628 1.253220 1.241579
183 13 digital_ok 100.00% 100.00% 100.00% 0.00% 100.00% 0.00% -0.414332 0.642114 1.038040 2.580526 1.231145 0.025244 0.542226 5.865464 0.078393 0.065389 0.007910 1.238505 1.238595
184 14 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.221637 0.581368 -0.145112 0.410431 -0.041733 -0.406314 0.378354 0.465968 0.519817 0.505640 0.304155 1.449926 1.580844
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.015287 0.207806 -0.865766 -1.167981 -0.936104 -0.738310 -0.245041 -1.024902 0.499735 0.487750 0.290034 1.573897 1.575412
190 15 digital_ok 100.00% 83.87% 83.87% 0.00% 100.00% 0.00% 38.390152 42.251015 5.145311 7.128419 8.265707 2.127157 24.336392 7.832869 0.374118 0.373628 0.156436 3.956902 3.333513
191 15 digital_ok 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% -0.785465 -0.959596 -0.317739 -0.627639 -1.295968 -0.407004 -1.055206 -0.510333 0.474287 0.468246 0.279549 1.472026 1.465800
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% 22.363094 21.816202 28.575521 29.094585 5.959694 4.943774 8.311152 6.182259 0.085288 0.080823 0.003432 0.000000 0.000000
321 2 not_connected 0.00% 69.89% 83.87% 0.00% 100.00% 0.00% 0.928698 0.332743 0.889255 0.776767 0.513262 0.688299 3.554791 2.500836 0.397831 0.374157 0.240161 0.000000 0.000000
323 2 not_connected 100.00% 94.62% 83.87% 0.00% 100.00% 0.00% 17.508880 2.964173 3.082019 2.965045 0.874706 2.300100 3.661673 -2.397486 0.295112 0.359705 0.201566 0.000000 0.000000
324 4 not_connected 100.00% 83.87% 89.25% 0.00% 100.00% 0.00% 4.211049 4.269320 3.920502 3.837649 3.219636 2.928718 -3.142276 -3.431629 0.366211 0.343930 0.220103 0.000000 0.000000
329 12 dish_maintenance 0.00% 64.52% 81.18% 0.00% 100.00% 0.00% 0.454978 1.545119 -0.193542 1.740324 0.884227 1.265946 -0.721785 -2.392506 0.399853 0.372136 0.240839 0.000000 0.000000
333 12 dish_maintenance 100.00% 72.58% 78.49% 0.00% 100.00% 0.00% 3.262389 0.364184 5.088481 0.098168 2.149921 -0.495131 8.107097 -1.187678 0.395151 0.380016 0.233938 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, 8, 17, 18, 21, 27, 28, 32, 33, 36, 38, 45, 50, 51, 52, 53, 55, 57, 67, 70, 71, 72, 73, 82, 88, 89, 90, 91, 92, 93, 94, 98, 100, 105, 107, 110, 112, 116, 117, 118, 119, 124, 125, 126, 127, 130, 136, 137, 138, 140, 141, 142, 144, 145, 150, 155, 156, 157, 158, 160, 161, 162, 166, 167, 168, 180, 181, 182, 183, 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_2459767.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 [ ]: