Skip to content

Commit

Permalink
Fix docstring of EventSource
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnoe committed Oct 23, 2023
1 parent a987cc8 commit 703e466
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ctapipe/io/eventsource.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 703e466

Please sign in to comment.