Demos

Setting Up with Python

  1. See Getting Started to install vortex and its dependencies, if not done so already.

  2. 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
    
  3. 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
    
  4. 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 the BaseEngine class in demo/_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.

    from vortex.engine import Source
    my_source = Source(
        triggers_per_second=30000,
        clock_rising_edges_per_trigger=1234,
        duty_cycle=0.4,
        imaging_depth_meters=0.05
    )
    
  5. 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, and cmap arguments to axes.imshow in demo/_common/widget.py.

Setting Up with C++

See the Build Guide for compiling vortex with ENABLE_DEMOS=ON during the configuration process.

List of Demos