broadbean
raw JSON → 0.14.0 verified Fri May 01 auth: no python
A Python package for easily generating and manipulating signal pulses. Version 0.14.0 supports Python >=3.9, uses src layout, and has been modernized with ruff pre-commits. Release cadence is irregular.
pip install broadbean Common errors
error ModuleNotFoundError: No module named 'broadbean' ↓
cause Library not installed.
fix
Run 'pip install broadbean'
error ImportError: cannot import name 'BluePrint' from 'broadbean' ↓
cause BluePrint was not a top-level import in older versions (pre-0.10).
fix
Upgrade to broadbean >=0.10.0 and use 'from broadbean import BluePrint'
error AttributeError: 'BluePrint' object has no attribute 'plot' ↓
cause BluePrint.plot was removed in broadbean 0.11.0.
fix
Use external plotting libraries such as matplotlib to visualize the signal.
Warnings
breaking BluePrint.plot was removed in v0.11.0. Use external plotting libraries like matplotlib instead. ↓
fix Use matplotlib or another plotting library to visualize your signals.
breaking Element.plotElement and Sequence.plotSequence were removed in v0.11.0. ↓
fix Use matplotlib to plot your own data.
breaking Sequence.plotAWGOutput was removed in v0.11.0. ↓
fix Use sequence.build() to get the waveform and plot externally.
gotcha In v0.10.0, BluePrint was renamed and moved; ensure imports are from broadbean directly. ↓
fix Use 'from broadbean import BluePrint' instead of submodule imports.
gotcha The package does not install with pip on Python 3.13+ due to lack of support; Python 3.9-3.12 are supported. ↓
fix Use Python 3.9-3.12 for installation.
Imports
- BluePrint wrong
from broadbean.blueprint import BluePrintcorrectfrom broadbean import BluePrint - Element wrong
from broadbean.element import Elementcorrectfrom broadbean import Element - Sequence wrong
from broadbean.sequence import Sequencecorrectfrom broadbean import Sequence
Quickstart
import numpy as np
from broadbean import BluePrint, Element, Sequence
# Create a simple Gaussian pulse
bp = BluePrint()
pulse = bp.setSRAmp('gaussian', amp=1, mu=0, sigma=1)
# Add to element
elem = Element()
elem.addBluePrint(0, bp)
# Build sequence
seq = Sequence()
seq.addElement(0, elem)
# Get waveform
waveform = seq.build()
print(waveform)