<jupyter_start><jupyter_text><jupyter_code>import pylab as pl
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from datetime import datetime, timedelta
  
from pymongo import MongoClient
df = pd.read_csv('Clearwater2Ms_speed-50000_rxcore-b52_txcore-b52.csv')
df = df[df['skefDeGen'].notna()]
coldDf = df[df['chamber_temperature']==0]
roomDf = df[df['chamber_temperature']==25]
hotDf = df[df['chamber_temperature']==50]
berBins = np.arange(-12,-4,1)
# Let's look at all the lanes that have a BER greater than 1E-7 at ESS
# We will look at the failure distribution per rx_lane
berThreshold = -7
tarDf = coldDf[coldDf['ber']>berThreshold]
tarDf.loc[:, 'Count'] = 1
tarDf.groupby(['rxlane_serdes']).count()['Count']
tarLane = 'dies/0/lanes/2'
def plotHistByLane(df, tarLane, temp, column, bins):
  df.loc[(df['rxlane_serdes']==tarLane)&(df['chamber_temperature']==temp), column].hist(bins=bins)
  plt.title(f'{tarLane} {column} Histogram at {temp}C')
  plt.xlabel(column)
  plt.ylabel('Count')
plotHistByLane(df, tarLane, 50, 'ber', bins=berBins)
plotHistByLane(df, tarLane, 25, 'ber', bins=berBins)
plotHistByLane(df, tarLane, 0, 'ber', bins=berBins)
plotHistByLane(df, 'dies/0/lanes/1', 50, 'ber', bins=berBins)
plotHistByLane(df, 'dies/0/lanes/1', 25, 'ber', bins=berBins)
plotHistByLane(df, 'dies/0/lanes/1', 0, 'ber', bins=berBins)
df.loc[:, 'skefDeGen'].unique()
# On this lane, the skefDeGen pararmeter is really scattered.
skefDeGenBin = np.arange(0, 8, 1)
plotHistByLane(df, tarLane, 0, 'skefDeGen', bins=skefDeGenBin)
plotHistByLane(df, tarLane, 25, 'skefDeGen', bins=skefDeGenBin)
plotHistByLane(df, tarLane, 50, 'skefDeGen', bins=skefDeGenBin)
plotHistByLane(df, 'dies/0/lanes/1', 50, 'skefDeGen', bins=skefDeGenBin)
plotHistByLane(df, 'dies/0/lanes/1', 25, 'skefDeGen', bins=skefDeGenBin)
plotHistByLane(df, 'dies/0/lanes/1', 0, 'skefDeGen', bins=skefDeGenBin)
rxColumns = ['ber',	'ctle',	'dcGains_agcGain1',	'dcGains_agcGain2',
             'dcGains_ffeGain1', 'dcGains_ffeGain2',	'deltaPh',
             'dfeTaps_f0',	'dfeTaps_f1',	'dfeTaps_f13',	'eyeScore0',
             'eyeScore1',	'eyeScore2',	'ffeTaps_k1',
             'ffeTaps_k2',	'ffeTaps_k3',	'ffeTaps_k4',	'ffeTaps_s1',
             'ffeTaps_s2',	'fwChannelEstimate',	'fwOf',	'hwHf',
             'rxPllVcoCap',	'rxPpm',	'skefDeGen']
coldDf.loc[coldDf['rxlane_serdes']=='dies/0/lanes/2', rxColumns].describe()
coldDf.loc[coldDf['rxlane_serdes']=='dies/0/lanes/1', rxColumns].describe()
coldDf.loc[coldDf['rxlane_serdes']=='dies/0/lanes/3', rxColumns].describe()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17324052590873937, 'fraction_numerical': 0.03209590100541377, 'mean_word_length': 6.246498599439776, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '119213', 'license': 'MIT', 'n_tokens_mistral': 1203, 'n_tokens_neox': 1110, 'n_words': 193, 'path': 'seaside.ipynb', 'repo_name': 'haroldw-arista/Artemis', 'size': '2586'}