def test_celcius_to_kelvin(): assert_equal(sc.C2K([0, 0]), [273.15, 273.15])
def test_celsius_to_kelvin(): with suppress_warnings() as sup: sup.filter(DeprecationWarning, "`C2K` is deprecated!") assert_equal(sc.C2K([0, 0]), [273.15, 273.15])
def test_celcius_to_kelvin(): with warnings.catch_warnings(): warnings.simplefilter("ignore", DeprecationWarning) assert_equal(sc.C2K([0, 0]), [273.15, 273.15])
from matplotlib import pyplot as plt from matplotlib.patches import Rectangle from scipy import constants from scipy.optimize import curve_fit from scipy.integrate import quad, trapz from textable import table from uncertainties import ufloat from uncertainties import unumpy as unp from uncertainties.unumpy import exp T1, I1 = np.genfromtxt('set1.txt', unpack=True) T2, I2 = np.genfromtxt('set2.txt', unpack=True) T1 = constants.C2K(T1) T2 = constants.C2K(T2) I1_cleaned, I2_cleaned = [], [] min1, max1 = 260, 285 min2, max2 = 250, 267 Ws = {'integrated': {}, 'approx': {}} plotdir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../build/plots/') texdir = os.path.join(plotdir, '../tex/') # clear data def linear_fit(T, A, B):