From 703e4660c53a2d291a10b26224f42c3e01ef21c9 Mon Sep 17 00:00:00 2001 From: Maximilian Linhoff Date: Mon, 23 Oct 2023 12:02:28 +0200 Subject: [PATCH] Fix docstring of EventSource --- ctapipe/io/eventsource.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ctapipe/io/eventsource.py b/ctapipe/io/eventsource.py index 8fa293c8bb0..0922f36f168 100644 --- a/ctapipe/io/eventsource.py +++ b/ctapipe/io/eventsource.py @@ -50,9 +50,11 @@ class EventSource(Component): An ``EventSource`` can also be created through the configuration system, by passing ``config`` or ``parent`` as appropriate. E.g. if using ``EventSource`` inside of a ``Tool``, you would do: + >>> self.source = EventSource(parent=self) # doctest: +SKIP To loop through the events in a file: + >>> source = EventSource(input_url="dataset://gamma_prod5.simtel.zst", max_events=2) >>> for event in source: ... print(event.count)