Ejemplo n.º 1
0
                           constrained_layout=True)
    l = len(gate)
    for ax, index in zip(axes, [0, l // 4, l // 2, 3 * l // 4, -1]):
        ax.plot(field[index] * 1e3, res['original'][index], '+')
        ax.plot(field[index] * 1e3, res['xx'][index])
        ax.axvline(0)
        ax.set_xlabel('Field (mT)')
        ax.set_ylabel('Resistance (Ω)')
    plt.show()

# Extract the density and mobility and compute useful quantities.
density = extract_density(field, res['xy'], FIELD_BOUNDS, PLOT_DENSITY_FIT)
if PLOT_DENSITY_FIT:
    plt.show()

mobility, std_mob = extract_mobility(field, res['xx'], res['yy'], density,
                                     GEOMETRIC_FACTORS[GEOMETRY])
density, std_density = density

mass = EFFECTIVE_MASS * cs.electron_mass
htr = htr_from_mobility_density(mobility, density, mass)
diff = diffusion_constant_from_mobility_density(mobility, density, mass)

# If requested plot the Htr that tells us in what range the WAL can be valid.
if PLOT_HTR:
    f, axes = plt.subplots(1, 3, figsize=(10, 5), constrained_layout=True)
    for ax, x, y, x_lab, y_lab in zip(
            axes, (gate, density / 1e4, density / 1e4),
        (density / 1e4, mobility * 1e4, htr * 1e3),
        ('Gate voltage (V)', 'Density (cm$^{-2}$)', 'Density (cm$^{-2}$)'),
        ('Density (cm$^{-2}$)', 'Mobility (cm$^{-2}$V${^-1}$s$^{-1}$)',
         'Htr (mT)')):
        val = val

        res[k] = convert_lock_in_meas_to_diff_res(val, PROBE_CURRENT)

if GATE_COLUMN is not None:
    gate = gate[:, 0]

if "xy" in res:
    density, std_density = extract_density(field, res["xy"], FIELD_BOUNDS,
                                           PLOT_DENSITY_FIT)
    print(f"{density / 1e4:g}")
if PLOT_DENSITY_FIT:
    plt.show()

if "xx" in res and "yy" in res:
    mobility = extract_mobility(field, res["xx"], res["yy"], density,
                                GEOMETRIC_FACTORS[GEOMETRY])

if len(res) == 3:
    mass = EFFECTIVE_MASS * cs.electron_mass
    vf = fermi_velocity_from_density(density, mass)
    mft = mean_free_time_from_mobility(mobility, mass)
    diff = diffusion_constant_from_mobility_density(mobility, density, mass)

if RESULT_PATH:
    df = pd.DataFrame({
        "Gate voltage (V)": gate,
        "Density (m^-2)": density,
        "Stderr density (m^-2)": std_density,
        "Mobility xx (m^2V^-1s^-1)": mobility[0],
        "Mobility yy (m^2V^-1s^-1)": mobility[1],
        "Mean free time xx (s)": mft[0],