Exemplo n.º 1
0
from analyze import *
from spicy_process import load_spice

import numpy as np
import pandas as pd

## Load and Sanitize Data
data = load_spice("data/Exp1pt2.txt")
data = data.rename(columns={"level_0": "V1-V2", "level_1": "I1", "v2": "I2"})
del data["I(I1)"]
del data["I(I2)"]

data["I1+I2"] = data["I1"] + data["I2"]
data["I1-I2"] = data["I1"] - data["I2"]

v2_vals = [2.5, 3.5, 4.5]

## Plot
fig, ax = plt.subplots(figsize=(10, 8))

for run, df in data.groupby("Run"):
    print(run)
    for yaxis in ("I1", "I2", "I1+I2", "I1-I2"):
        ax.plot(df.loc[df.index % 3 == run - 1, "V1-V2"],
                df.loc[df.index % 3 == run - 1, yaxis],
                ".",
                label=f"{yaxis}, V2={v2_vals[run-1]}V",
                alpha=0.6)

ax.set_title(
    "Currents Across a Differential Pair of Transistors as a Function of Voltage Difference"
Exemplo n.º 2
0
from analyze import *
from spicy_process import load_spice

import numpy as np
import pandas as pd

## Load and Sanitize Data
data = load_spice("data/Exp1.txt")
data = data.rename(columns={"level_0": "V1-V2", "level_1": "I1", "v2": "I2"})
del data["I(I1)"]
del data["I(I2)"]

data["I1+I2"] = data["I1"] + data["I2"]
data["I1-I2"] = data["I1"] - data["I2"]

v2_vals = [2.5, 3.5, 4.5]

## Filter Data
data = data[data["V1-V2"].abs() < 0.15]

## Plot
fig, ax = plt.subplots(figsize=(10, 8))

for i, (run, df) in enumerate(data.groupby("Run")):
    print(run)
    plot_theoretical(df["V1-V2"],
                     df["I1-I2"],
                     ax=ax,
                     label=f"{v2_vals[run-1]}V")
    plot_experimental(df.loc[df.index % 3 == i, "V1-V2"],
                      df.loc[df.index % 3 == i, "I1-I2"],
Exemplo n.º 3
0
from analyze import *
from spicy_process import load_spice

import numpy as np
import pandas as pd

## Load and Sanitize Data
data = load_spice("data/Exp1V_vb1pt5.txt")
data = data.rename(columns={"level_0": "V1-V2", "level_1": "Vb"})
del data["level_2"]
del data["v2"]
del data["V(v)"]

v2_vals = [2.5, 3.5, 4.5]

## Plot
csfont = {'fontname': 'Comic Sans MS'}

fig, ax = plt.subplots(figsize=(10, 8))

for run, df in data.groupby("Run"):
    plot_experimental(df["V1-V2"],
                      df["Vb"],
                      ax=ax,
                      label=f"V2={v2_vals[run-1]}V")

ax.set_title(
    "Source Node Voltage as a function of the Differences of Voltages in a Differenital Pair of Transistors"
)
ax.set_xlabel("V1-V2 (V)")
ax.set_ylabel("Source Node Voltage (V)")
Exemplo n.º 4
0
from analyze import *
from spicy_process import load_spice

import numpy as np
import pandas as pd

## Load and Sanitize Data
data = load_spice("data/Exp1V_vb1V.txt")
data = data.rename(columns={"level_0": "V1-V2", "level_1": "Vb"})
del data["level_2"]
del data["v2"]
del data["V(v)"]

v2_vals = [2.5, 3.5, 4.5]

## Plot
csfont = {'fontname': 'Comic Sans MS'}

fig, ax = plt.subplots(figsize=(10, 8))

for run, df in data.groupby("Run"):
    plot_experimental(df["V1-V2"],
                      df["Vb"],
                      ax=ax,
                      label=f"V2={v2_vals[run-1]}V")

ax.set_title(
    "Source Node Voltage as a function of the Differences of Voltages in a Differenital Pair of Transistors"
)
ax.set_xlabel("V1-V2 (V)")
ax.set_ylabel("Source Node Voltage (V)")
Exemplo n.º 5
0
from analyze import *
from spicy_process import load_spice

import numpy as np
import pandas as pd

## Load and Sanitize Data
data = load_spice("data/part1.txt")
data = data.rename(columns={"level_0": "V1-V2", "level_1": "I1", "v2": "I2"})
del data["I(I1)"]
del data["I(I2)"]

data["I1+I2"] = data["I1"] + data["I2"]
data["I1-I2"] = data["I1"] - data["I2"]

v2_vals = [2.5, 3.5, 4.5]

## Plot
fig, ax = plt.subplots(figsize=(10, 8))

for run, df in data.groupby("Run"):
    print(run)
    for yaxis in ("I1", "I2", "I1+I2", "I1-I2"):
        ax.plot(df.loc[df.index % 3 == run - 1, "V1-V2"],
                df.loc[df.index % 3 == run - 1, yaxis],
                ".",
                label=f"{yaxis}, V2={v2_vals[run-1]}V")

ax.set_title(
    "Currents Across a Differential Pair of Transistors as a Function of Voltage Difference"
)