denspp.offline.analog.pyspice_load
#
Module Contents#
Classes#
Individual data class to configure the electrical device Attributes: type: Type of electrical device [‘R’: resistor, ‘C’: capacitor, ‘L’: inductor, ‘RDs’: Resistive diode] fs_ana: Sampling frequency of input [Hz] noise_en: Enable noise on output [True / False] dev_value: Value of the selected electrical device temp: Temperature [K] |
|
Data#
API#
- class denspp.offline.analog.pyspice_load.SettingsPySpice[source]#
Individual data class to configure the electrical device Attributes: type: Type of electrical device [‘R’: resistor, ‘C’: capacitor, ‘L’: inductor, ‘RDs’: Resistive diode] fs_ana: Sampling frequency of input [Hz] noise_en: Enable noise on output [True / False] dev_value: Value of the selected electrical device temp: Temperature [K]
- type: str#
None
- fs_ana: float#
None
- noise_en: bool#
None
- dev_value: float#
None
- temp: float#
None
- denspp.offline.analog.pyspice_load.RecommendedSettingsDEV#
‘SettingsPySpice(…)’
- class denspp.offline.analog.pyspice_load.PySpiceLoad(settings_pyspice: denspp.offline.analog.pyspice_load.SettingsPySpice)[source]#
Bases:
denspp.offline.analog.pyspice_handler.PySpiceHandler
Initialization
Rewritten API for using PySPICE in simulation (Git Tutorial: benedictjones/engineeringthings-pyspice, YouTube: https://www.youtube.com/watch?v=62BOYx1UCfs&list=PL97KTNA1aBe1QXCcVIbZZ76B2f0Sx2Snh) Args: temperature: Given temperature for simulation in [K] [Default: 300.0 K] input_voltage: Defining if input is a voltage (True) or current (False) Returns: None
- set_simulation_duration(sim_time: float) None [source]#
Defining the simulation duration for SPICE simulation
- get_current(u_top: numpy.ndarray | float, u_bot: numpy.ndarray | float) numpy.ndarray [source]#
Getting the current response from electrical device Args: u_top: Applied voltage on top electrode [V] u_bot: Applied voltage on bottom electrode [V] Returns: Corresponding current response
- get_voltage(i_in: numpy.ndarray, u_inn: numpy.ndarray | float) numpy.ndarray [source]#
Getting the voltage response from electrical device Args: i_in: Applied current input [A] u_inn: Negative input | bottom electrode | reference voltage [V] Returns: Corresponding voltage response
- plot_fit_curve(start_value: float = -5.0, stop_value: float = +5.0, step_size: float = 0.1, do_logy: bool = False, path2save: str = '', show_plot: bool = False) None [source]#
Plotting the output of the polynom fit function Args: start_value: Starting point of DC Sweep stop_value: End point of DC Sweep step_size: Step size of DC Sweep do_logy: Do logarithmic plotting on y-scale path2save: Path for saving the plot show_plot: Showing and blocking the plot Returns: None