openlifu.io.LIFUTXDevice.calc_pulse_pattern¶
- openlifu.io.LIFUTXDevice.calc_pulse_pattern(frequency: float, duty_cycle: float = 0.66, bf_clk: float = 10000000.0)[source]¶
Calculates the pattern for a given frequency and duty cycle
The pattern is calculated to represent a single cycle of a pulse with the specified frequency and duty cycle. If the pattern requires more than 16 periods, the clock divider is increased to reduce the period length.
- Parameters:
frequency – Frequency of the pattern in Hz
duty_cycle – Duty cycle of the pattern
bf_clk – Clock frequency of the BF system in Hz
- Returns:
Tuple of lists of levels and lengths, and the clock divider setting