wire = wire.load(top_dir + "0.02mbar_air_em_{}\\".format(emissivity) +
                         "results\\" + run_name)
        #l_beam = wire.l_beam

        U_beam_off = wire.U_wire(0)
        U_beam_on = wire.U_wire(-1)

        U_delta = U_arr[n_i] = U_beam_on - U_beam_off
        signal = signal_arr[n_i] = U_delta / U_beam_off

        T_max = T_max_arr[n_i] = np.amax(
            wire.record_dict["T_distribution"][-1])
        T_avg = T_avg_arr[n_i] = np.average(
            wire.record_dict["T_distribution"][-1])

        R_arr[n_i] = wire.resistance_total()
    U_arr_full[n_lw] = U_arr
    signal_arr_full[n_lw] = signal_arr

# Integrated power graph
if True:
    # Populate arrays
    func_list = [
        "f_el",
        "f_conduction",
        "f_rad"
        #, "f_beam", "f_beam_gas", "f_bb"
        ,
        "f_background_gas"
        #, "f_laser"
    ]
plt.figure(0, figsize=(8, 6.5))
ax1 = plt.gca()
ax1.set_aspect(0.1)

x_lst = [
    1000 * ((i + 0.5) * wire.l_segment - (wire.l_wire / 2))
    for i in range(wire.n_wire_elements)
]
T_beam_off = wire.record_dict["T_distribution"][0]
T_beam_on = wire.record_dict["T_distribution"][-1]
T_lst = [T_beam_off, T_beam_on]

R_arr = np.zeros(2)
for i, T_dist in enumerate(T_lst):
    wire.T_distribution = T_dist
    R_arr[i] = wire.resistance_total()

U_delta = (R_arr[1] - R_arr[0]) * wire.i_current
signal = (R_arr[1] - R_arr[0]) / R_arr[0]

ax1.plot(x_lst,
         T_lst[0] - 273.15,
         "-",
         label=r"Beam Off, " + "R = {:.3f}".format(R_arr[0]) + r"$\Omega$")
ax1.plot(x_lst,
         T_lst[1] - 273.15,
         "-",
         label=r"Beam On, " + "R = {:.3f}".format(R_arr[1]) + r"$\Omega$")

ax1.set_ylabel("Temperature [°C]")
ax1.set_xlabel(r"wire positon [mm]")