Commit 1bcdc458 authored by Mario's avatar Mario
Browse files

exp2 for ngspice (special case only for DMT internal :/ )

parent b362e1c4
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -490,15 +490,11 @@ class DutNgspice(DutCircuit):
                )
            elif swd_tran.sweep_type == "SMOOTH_RAMP":
                tstop = 10 / swd_tran.value_def[0]  # make sure that this does not impact anything
                tau = (
                    np.sqrt(2)
                    * np.exp(-0.5)
                    / (2 * np.pi * sweepdefs[-1].value_def[0])
                )
                tau = np.sqrt(2) * np.exp(-0.5) / (2 * np.pi * sweepdefs[-1].value_def[0])
                sources_new = (
                    "V_V_{0} n_{0}_DC 0\n".format(swd_tran.contact)
                    + "V_V_{0}_tr n_{0}X n_{0}_DC ".format(swd_tran.contact)
                    + f"EXP(0 {swd_tran.amp*1e3:.6e}m 0 {tau*1e9:.6e}ns {tstop*1e9:.6e}ns {tau*1e9:.6e}ns)"
                    + f"EXP2(0 {swd_tran.amp*1e3:.6e}m 0 {tau*1e9:.12f}ns {tstop*1e9:.6e}ns {tau*1e9:.6e}ns)"
                )
            else:
                sources_new = (
+3 −0
Original line number Diff line number Diff line
import logging
import numpy as np
from pathlib import Path
from DMT.core import DutMeas, DutType, Plot, DutLib

@@ -223,6 +224,8 @@ if __name__ == "__main__":
    ic, ft, vbc, ic_ftmax = [], [], [], []
    for df in ft_dfs:
        df = df.calc_ft("B", "C")
        if any(np.isnan(df["F_T"])):
            continue
        df = df[df["FREQ"] == 10e9]
        ic.append(df["I_C"])
        ft.append(df["F_T"])