rizer.electric_circuit.pulser#
Simple file for now, but will evolve later on.
Attributes#
Functions#
|
Plateau voltage function. |
|
Plateau electric field function. |
|
Electric field function based on experimental data. |
|
Zero electric field function. |
Module Contents#
- rizer.electric_circuit.pulser.plateau_voltage(t: float, U_off: float = 0.0, U_on: float = 10000.0, t_rise: float = 3e-09, t_on: float = 4e-09, t_fall: float = 3e-09) float#
Plateau voltage function.
First, the voltage is at U_off, then it rises to U_on in t_rise seconds, stays at U_on for t_on seconds, and finally falls to U_off in t_fall seconds.
- Parameters:
t (
float) – Time in seconds.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 10e3 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 4e-9 s.t_fall (
float, optional) – Time to go from U_on to U_off, by default 3e-9 s.
- Returns:
Voltage in V.
- Return type:
float
- rizer.electric_circuit.pulser.plateau_electric_field(t: float, U_off: float = 0.0, U_on: float = 10000.0, d: float = 0.003, t_rise: float = 3e-09, t_on: float = 1e-10, t_fall: float = 1e-09) float#
Plateau electric field function.
First, the voltage is at U_off, then it rises to U_on in t_rise seconds, stays at U_on for t_on seconds, and finally falls to U_off in t_fall seconds. The electric field is calculated as E = U / d.
- Parameters:
t (
float) – Time in seconds.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 10e3 V.d (
float, optional) – Interelectrode distance, by default 3.0e-3 m.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 0.1e-9 s.t_fall (
float, optional) – Time to go from U_on to U_off, by default 1e-9 s.
- Returns:
Electric field in V/m.
- Return type:
float
- rizer.electric_circuit.pulser.DATA_FILE#
- rizer.electric_circuit.pulser.experimental_electric_field(t: float, d: float = 0.003) float#
Electric field function based on experimental data.
The electric field is calculated as E = U / d.
- Parameters:
t (
float) – Time in seconds.d (
float, optional) – Interelectrode distance, by default 3.0e-3 m.
- Returns:
Electric field in V/m.
- Return type:
float- Raises:
ValueError – If the voltage is not a float.
Notes
The datafile is defined outside the function to avoid reading it at each call.
- rizer.electric_circuit.pulser.no_electric_field(t: float) float#
Zero electric field function.
- Parameters:
t (
float) – Time in seconds.- Returns:
Electric field in V/m, always 0.0 V/m.
- Return type:
float