pathsim.blocks.mixed.sources module
- class pathsim.blocks.mixed.sources.Pulse(amplitude=1.0, T=1.0, t_rise=0.0, t_fall=0.0, tau=0.0, duty=0.5)[source]
Bases:
BlockGenerates a periodic pulse waveform with defined rise and fall times using a hybrid approach with scheduled events and continuous updates.
Scheduled events trigger phase changes (low, rising, high, falling), and the update method calculates the output value based on the current phase, performing linear interpolation during rise and fall.
- Parameters:
amplitude (float, optional) – Peak amplitude of the pulse. Default is 1.0.
T (float, optional) – Period of the pulse train. Must be positive. Default is 1.0.
t_rise (float, optional) – Duration of the rising edge. Default is 0.0.
t_fall (float, optional) – Duration of the falling edge. Default is 0.0.
tau (float, optional) – Initial delay before the first pulse cycle begins. Default is 0.0.
duty (float, optional) – Duty cycle, ratio of the pulse ON duration (plateau time only) to the total period T (must be between 0 and 1). Default is 0.5. The high plateau duration is T * duty.
- class pathsim.blocks.mixed.sources.Clock(T=1, tau=0)[source]
Bases:
BlockDiscrete time clock source block.
Utilizes scheduled events to periodically set the block output to 0 or 1 at discrete times.
- class pathsim.blocks.mixed.sources.SquareWave(amplitude=1, frequency=1, phase=0)[source]
Bases:
BlockDiscrete time square wave source.
Utilizes scheduled events to periodically set the block output at discrete times.
- Parameters: