Changing Coincidence Example

This is a small example demonstrating how to configure coincidences in skutils

from skutils import FemtoDAQController
from skutils.helpers import HitPatternCoincidenceBuilder

controller = FemtoDAQController("Vireo-000019.tek", skip_version_check=True)

Multiplicity

# Configure a simple multiplicity coincidence setup
controller.configureCoincidence("multiplicity", 2)
Traceback (most recent call last):
  File "C:\Users\Jeff\Documents\projects\skutils\examples\micro-examples\coincidence.py", line 18, in <module>
    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

Hit Pattern

# 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()
)

Total running time of the script: (0 minutes 0.202 seconds)

Gallery generated by Sphinx-Gallery