56 KiB
56 KiB
In [11]:
import matplotlib.pyplot as plt
import numpy as np
import pandas
data = pandas.read_csv('20250212_EC_decays.txt')
data.describe()
Out[11]:
In [20]:
cropped_data = data[data['Decay Times in Microseconds'] >= 0.3]
cropped_data = cropped_data[cropped_data['Decay Times in Microseconds'] <= 20]
cropped_data.describe()
hist = cropped_data.hist(range=data_range, bins=bins)
In [15]:
data_range = (0.3, max(data['Decay Times in Microseconds']))
bins = np.arange(0.3, max(data['Decay Times in Microseconds']) + 0.5, 0.5)
hist = cropped_data.hist(range=data_range, bins=bins)
hist[0][0].set_yscale('log')
In [4]:
cropped_data_2 = cropped_data[cropped_data['Decay Times in Microseconds'] <= 7]
data_range = (0.3, max(cropped_data_2['Decay Times in Microseconds']))
bins = np.arange(0.3, max(cropped_data_2['Decay Times in Microseconds']) + 0.5, 0.5)
hist = cropped_data_2.hist(range=data_range, bins=bins)
hist[0][0].set_yscale('log')
times, bins = np.histogram(cropped_data_2, bins=bins, range=data_range)
times = np.log(times)
bins = bins[:-1]
In [ ]:
line = np.polynomial.polynomial.Polynomial.fit(bins, times, deg=1)
line=line.convert()
Out[ ]:
In [30]:
gamma=line.convert().coef[1]
tau = -1/gamma
tau
Out[30]:
In [22]:
cropped_data_2.describe()
Out[22]: