rizer.electric_circuit.generator#
Classes#
A generator with a purely resistive impedance. |
|
Trapezoidal generator. |
|
Gaussian generator. |
|
Generator defined from a measurement function. |
|
Constant generator. |
Module Contents#
- class rizer.electric_circuit.generator.PurelyResistiveBaseGenerator(R_g: float)#
A generator with a purely resistive impedance.
- Parameters:
R_g (
float) – Resistance in Ohm.
- R_g: float#
Generator impedance, here a constant resistance.
- generator_impedance() float#
Impedance of the generator.
This function should be implemented in the derived class.
- Returns:
Generator impedance in Ohm.
- Return type:
float
Notes
For a constant resistance, the impedance is the same for all frequencies, therefore:
\[Z_g(f) = R_g\]where:
\(R_g\) is the generator resistance in Ohm.
- abstractmethod generator_voltage(t: float) float#
Voltage of the generator.
The generator voltage can depend on the time. This function should be implemented in the derived class.
- Parameters:
t (
float) – Time in seconds.- Returns:
Generator voltage in Volts.
- Return type:
float
- class rizer.electric_circuit.generator.TrapezoidalGenerator(R_g: float = 1.0, U_off: float = 0.0, U_on: float = 10000.0, t_rise: float = 3e-09, t_on: float = 1e-08, t_fall: float = 3e-09)#
Bases:
PurelyResistiveBaseGeneratorTrapezoidal generator.
The generator impedance is a constant resistance. The generator voltage is a trapezoidal pulse.
- Parameters:
R_g (
float, optional) – Generator resistance, by default 1.0 Ohm.U_off (
float, optional) – Voltage when the pulser is turned off, by default 0.0 V.U_on (
float, optional) – Voltage when the pulser is turned on, by default 5e3 V.t_rise (
float, optional) – Time to go from U_off to U_on, by default 3e-9 s.t_on (
float, optional) – Time to stay at U_on, by default 10e-9 s.t_fall (
float, optional) – Time to go from U_on to U_off, by default 3e-9 s.
- generator_voltage(t: float) float#
Trapezoidal voltage pulse.
First, the voltage is at U_off. Then, it rises to U_on in t_rise seconds. Next, it stays at U_on for t_on second. Finally, it falls to U_off in t_fall seconds.
- Parameters:
t (
float) – Time in seconds.- Returns:
Generator voltage in Volts.
- Return type:
float
- class rizer.electric_circuit.generator.GaussianGenerator(height: float, mean: float, FWHM: float, R_g: float = 0.0)#
Bases:
PurelyResistiveBaseGeneratorGaussian generator.
The generator impedance is a constant resistance. The generator voltage is a Gaussian pulse.
- Parameters:
height (
float) – Height of the Gaussian pulse [V].mean (
float) – Mean (center) of the Gaussian pulse [s].FWHM (
float) – Full width at half maximum of the Gaussian pulse [s].R_g (
float, optional) – Generator resistance [Ohm], by default 0.0 Ohm.
- generator_voltage(t: float) float#
Return the generator voltage as a Gaussian pulse.
- Parameters:
t (
float) – Time in seconds.- Returns:
Generator voltage in Volts.
- Return type:
float
- static gaussian(t: float, height: float, mean: float, FWHM: float) float#
Return a Gaussian pulse.
- Parameters:
t (
float) – Time in seconds.height (
float) – Height of the Gaussian pulse [V].mean (
float) – Mean of the Gaussian pulse [s].FWHM (
float) – Full width at half maximum of the Gaussian pulse [s].
- Returns:
Value of the Gaussian pulse at time t [V].
- Return type:
float
- class rizer.electric_circuit.generator.FromMeasurementGenerator(R_g: float, V_meas: Callable[[float], float])#
Bases:
PurelyResistiveBaseGeneratorGenerator defined from a measurement function.
- Parameters:
R_g (
float) – Resistance of the generator [Ohm].V_meas (
Callable) – Function that returns the generator voltage at a given time.
- generator_voltage(t: float) float#
Return the generator voltage from a measurement function.
- Parameters:
t (
float) – Time in seconds.- Returns:
Generator voltage in Volts.
- Return type:
float
- class rizer.electric_circuit.generator.ConstantGenerator(R_g: float, U_g: float)#
Bases:
PurelyResistiveBaseGeneratorConstant generator.
- Parameters:
R_g (
float) – Resistance of the generator [Ohm].U_g (
float) – Voltage of the generator [V].
- U_g#
- generator_voltage(t: float) float#
Return the generator voltage.
- Parameters:
t (
float) – Time in seconds.- Returns:
Generator voltage in Volts.
- Return type:
float