Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@

nbsphinx_allow_errors = True

# https://github.com/astral-sh/ty/issues/860
assert broadbean.__file__ is not None
apidoc_module_dir = os.path.dirname(broadbean.__file__)
apidoc_output_dir = "reference"
apidoc_separate_modules = True
Expand Down
6,488 changes: 24 additions & 6,464 deletions docs/examples/Example_Write_Read_JSON.ipynb

Large diffs are not rendered by default.

783 changes: 8 additions & 775 deletions docs/examples/Making_output_for_Tektronix_AWG70000A.ipynb

Large diffs are not rendered by default.

31 changes: 18 additions & 13 deletions docs/examples/Pulse_Building_Tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -123,6 +123,8 @@
"sine = bb.PulseAtoms.sine # args: freq, ampl, off, phase\n",
"arb_func = bb.PulseAtoms.arb_func # args provided in a dict\n",
"\n",
"SR = int(1e9) # Sample rate\n",
"\n",
"# make a blueprint\n",
"\n",
"# The blueprint takes no arguments\n",
Expand All @@ -133,7 +135,7 @@
"bp1.insertSegment(0, ramp, (0, 1e-3), name=\"\", dur=3e-6)\n",
"\n",
"# A sample rate can be set (Sa/S). Without a sample rate, we can not plot the blueprint.\n",
"bp1.setSR(1e9)\n",
"bp1.setSR(SR)\n",
"\n",
"# The blueprint can be inspected. Note that the segment was auto-named 'ramp'\n",
"bp1.showPrint()\n",
Expand Down Expand Up @@ -567,7 +569,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -595,17 +597,18 @@
],
"source": [
"# Example 1\n",
"SR = int(1e9)\n",
"\n",
"# Create the blueprints\n",
"bp_square = bb.BluePrint()\n",
"bp_square.setSR(1e9)\n",
"bp_square.setSR(SR)\n",
"bp_square.insertSegment(0, ramp, (0, 0), dur=0.1e-6)\n",
"bp_square.insertSegment(1, ramp, (10e-3, 10e-3), name=\"top\", dur=0.1e-6)\n",
"bp_square.insertSegment(2, ramp, (0, 0), dur=0.1e-6)\n",
"bp_boxes = bp_square + bp_square\n",
"#\n",
"bp_sine = bb.BluePrint()\n",
"bp_sine.setSR(1e9)\n",
"bp_sine.setSR(SR)\n",
"bp_sine.insertSegment(0, sine, (3.333e6, 25e-3, 0, 0), dur=0.3e-6)\n",
"bp_sineandboxes = bp_sine + bp_square\n",
"\n",
Expand Down Expand Up @@ -700,12 +703,14 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"seq1 = bb.Sequence()\n",
"\n",
"SR = int(1e9)\n",
"\n",
"# We fill up the sequence by adding elements at different sequence positions.\n",
"# A valid sequence is filled from 1 to N with NO HOLES, i.e. if position 4 is filled, so must be position 1, 2, and 3\n",
"\n",
Expand All @@ -714,14 +719,14 @@
"\n",
"# Create the blueprints\n",
"bp_square = bb.BluePrint()\n",
"bp_square.setSR(1e9)\n",
"bp_square.setSR(SR)\n",
"bp_square.insertSegment(0, ramp, (0, 0), dur=100e-9)\n",
"bp_square.insertSegment(1, ramp, (1e-3, 1e-3), name=\"top\", dur=100e-9)\n",
"bp_square.insertSegment(2, ramp, (0, 0), dur=100e-9)\n",
"bp_boxes = bp_square + bp_square\n",
"#\n",
"bp_sine = bb.BluePrint()\n",
"bp_sine.setSR(1e9)\n",
"bp_sine.setSR(SR)\n",
"bp_sine.insertSegment(0, sine, (3.333e6, 1.5e-3, 0, 0), dur=300e-9)\n",
"bp_sineandboxes = bp_sine + bp_square\n",
"\n",
Expand Down Expand Up @@ -1146,7 +1151,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1212,18 +1217,18 @@
],
"source": [
"# Example 3: Modify the high level of a square pulse inside a sequence\n",
"\n",
"SR = int(1e6)\n",
"#\n",
"\n",
"pulsebp = bb.BluePrint()\n",
"pulsebp.insertSegment(0, ramp, (0, 0), dur=5e-4)\n",
"pulsebp.insertSegment(1, ramp, (1, 1), dur=1e-3, name=\"varyme\")\n",
"pulsebp.insertSegment(2, \"waituntil\", 2e-3)\n",
"pulsebp.setSR(1e6)\n",
"pulsebp.setSR(SR)\n",
"\n",
"sinebp = bb.BluePrint()\n",
"sinebp.insertSegment(0, sine, (0.2e3, 0.5, 0.5, 0), dur=10e-3)\n",
"sinebp.setSR(1e6)\n",
"sinebp.setSR(SR)\n",
"\n",
"elem1 = bb.Element()\n",
"elem1.addBluePrint(1, pulsebp)\n",
Expand All @@ -1232,7 +1237,7 @@
"elem2.addBluePrint(1, sinebp)\n",
"\n",
"baseseq = bb.Sequence()\n",
"baseseq.setSR(1e6)\n",
"baseseq.setSR(SR)\n",
"baseseq.addElement(1, elem1)\n",
"baseseq.addElement(2, elem2)\n",
"\n",
Expand Down
Loading