.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples\micro-examples\coincidence.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_micro-examples_coincidence.py: Changing Coincidence Example ============================ This is a small example demonstrating how to configure coincidences in skutils .. GENERATED FROM PYTHON SOURCE LINES 8-14 .. code-block:: Python from skutils import FemtoDAQController from skutils.helpers import HitPatternCoincidenceBuilder controller = FemtoDAQController("Vireo-000019.tek", skip_version_check=True) .. GENERATED FROM PYTHON SOURCE LINES 15-16 Multiplicity .. GENERATED FROM PYTHON SOURCE LINES 16-20 .. code-block:: Python # Configure a simple multiplicity coincidence setup controller.configureCoincidence("multiplicity", 2) .. rst-class:: sphx-glr-script-out .. code-block:: pytb Traceback (most recent call last): File "C:\Users\Jeff\Documents\projects\skutils\examples\micro-examples\coincidence.py", line 18, in controller.configureCoincidence("multiplicity", 2) File "C:\Users\Jeff\Documents\projects\skutils\src\skutils\FemtoDAQController.py", line 943, in configureCoincidence self.__post(self.__config_url("global", "Coincidence"), t, print_failure=False) File "C:\Users\Jeff\Documents\projects\skutils\src\skutils\FemtoDAQController.py", line 197, in __post raise BusyError(f"FemtoDAQ device responded busy! {resp_json['message']}") skutils.FemtoDAQController.BusyError: FemtoDAQ device responded busy! Capture is currently running and force option was not requested .. GENERATED FROM PYTHON SOURCE LINES 21-22 Hit Pattern .. GENERATED FROM PYTHON SOURCE LINES 22-32 .. code-block:: Python # Helper for easily creating hit pattern coincidences, as the API demands are fairly rigid and less knowable builder = HitPatternCoincidenceBuilder(controller.num_channels) builder.addChannel(0, "Coincidence") builder.addChannel(1, "Anticoincidence") # Configure with the built string controller.configureCoincidence( "hit_pattern", trigger_hit_pattern=builder.buildForSend() ) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.202 seconds) .. _sphx_glr_download_auto_examples_micro-examples_coincidence.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: coincidence.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: coincidence.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: coincidence.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_