.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples\General\inspecting_events.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_General_inspecting_events.py: Inspecting and Plotting Events ============================== .. GENERATED FROM PYTHON SOURCE LINES 7-12 .. code-block:: Python import skutils import matplotlib.pyplot as plt import numpy as np .. GENERATED FROM PYTHON SOURCE LINES 13-14 Connect to your FemtoDAQ .. GENERATED FROM PYTHON SOURCE LINES 14-23 .. code-block:: Python url = "vireo-000019.tek" # skutils.FEMTODAQ_USB # for digitizers connected via USB, other replace with URL or IP digitizer = skutils.FemtoDAQController(url, skip_version_check=True) digitizer.stop() print(digitizer.summary()) .. rst-class:: sphx-glr-script-out .. code-block:: none Vireo-000019 (http://vireo-000019.tek) Product Revision : VIREO100_REV_B Number of Channels : 2 Sampling Frequency : 100.0 MHz ADC Bitdepth : 14 bits Maximum Wave Length : 81.92us Firmware Version : 5.5.0-0 Software Version : 5.4.0 Linux Image Version : 5.1.1 .. GENERATED FROM PYTHON SOURCE LINES 24-26 Configure data collection for a -0.8V pulse on channel 0 and a identical pulse 50ns later on channel 1 .. GENERATED FROM PYTHON SOURCE LINES 26-52 .. code-block:: Python # Reset settings to known values # digitizer.loadDefaultConfig() digitizer.setTriggerXPosition(8) digitizer.setTriggerActiveWindow(10) digitizer.setPulseHeightWindow(16) digitizer.setPulseHeightAveragingWindow(1) # set trigger and pulse height windows for chan in digitizer.channels: digitizer.setInvertADCSignal(chan, True) digitizer.setEnableTrigger(chan, True) digitizer.setDigitalOffset(chan, 700) digitizer.setTriggerSensitivity(chan, 200) digitizer.setTriggerEdge(chan, "rising") # Save 512 samples per waveform digitizer.configureRecording(digitizer.channels, 128, "inspection_example", waveform_display_enabled=True, display_channels=[0,1], ) # require both channels to fire digitizer.configureCoincidence("multiplicity", 2) .. GENERATED FROM PYTHON SOURCE LINES 53-64 .. code-block:: Python digitizer.start("continuous") print("grabbing event to inspect") inspection_event = digitizer.inspectNextEvent(2) skutils.quickPlotEvent(digitizer, inspection_event, fig_title="Inspected Event for Pocket Pulser with 50ns delay on Ch1", channel_titles={0:"Pocket Pulser", 1:"Delayed by 50ns"}) digitizer.stop() .. rst-class:: sphx-glr-script-out .. code-block:: pytb Traceback (most recent call last): File "C:\Users\Jeff\Documents\projects\skutils\examples\General\inspecting_events.py", line 56, in inspection_event = digitizer.inspectNextEvent(2) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Jeff\Documents\projects\skutils\src\skutils\FemtoDAQController.py", line 1455, in inspectNextEvent raise TimeoutError("maximum timeout was reached") TimeoutError: maximum timeout was reached .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 3.496 seconds) .. _sphx_glr_download_auto_examples_General_inspecting_events.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: inspecting_events.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: inspecting_events.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: inspecting_events.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_