Demos¶
Setting Up with Python¶
See Getting Started to install vortex and its dependencies, if not done so already.
Clone the repository or download the source. The demos are located in the
demo
directory.git clone https://gitlab.oit.duke.edu/izatt-lab/oct/vortex.git
Install dependencies common to most demos. Make sure that you choose the version of
cupy
that corresponds to your CUDA version.pip install numpy cupy-cuda112 PyQt5 matplotlib rainbow-logging-handler
Most demos retrieve their settings from the shared file
demo/_common/engine.py
. Edit this file as necessary for your OCT system. Note that these settings represent only a fraction of those available in vortex. You may need to edit theBaseEngine
class indemo/_common/engine.py
to configure additional options (e.g., trigger delay).DEFAULT_ENGINE_PARAMS = StandardEngineParams( scan_dimension=5, bidirectional=False, ascans_per_bscan=500, bscans_per_volume=500, galvo_delay=95e-6, clock_samples_per_second=int(800e6), # zero blocks to acquire means infinite acquisition blocks_to_acquire=0, ascans_per_block=500, samples_per_ascan=2752, blocks_to_allocate=128, preload_count=32, swept_source=source.Axsun200k, internal_clock=True, clock_channel=Channel.A, input_channel=Channel.B, process_slots=2, dispersion=(2.8e-5, 0), log_level=1, )
You can adjust the source settings to match your own as follows.
my_source = Axsun200k.copy() my_source.triggers_per_second = 30000 my_source.clock_rising_edges_per_trigger = 1234 my_source.duty_cycle = 0.4
Note
The above is a workaround due to an incorrect constructor for
Source
. This will be fixed in a future release.You may now run a demo, such as ref:demo/live-view.
python path/to/demo/live_view.py
If you need to adjust the default widget colormaps, modify the
vmin
,vmax
, andcmap
arguments toaxes.imshow
indemo/_common/widget.py
. `
Setting Up with C++¶
See the Build Guide for compiling vortex with ENABLE_DEMOS=ON
during the configuration process.