Skip to content

Commit

Permalink
Add code example to main docstring of simulations.base
Browse files Browse the repository at this point in the history
  • Loading branch information
Arne de Laat committed Feb 10, 2014
1 parent c29a16c commit 92d98a7
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions sapphire/simulations/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
"""Perform simulations of air showers on a cluster of stations
This base sclass can be subclassed to provide various kinds of
simulations. These simulations will inherit the base functionallity from
this class, including the creation of event and coincidence tables to
store the results, which will look similar to regular HiSPARC data, such
that the same reconstruction analysis can be applied to both.
Example usage::
import tables
from sapphire.simulations.base import BaseSimulation
from sapphire.clusters import ScienceParkCluster
datafile = tables.openFile('/tmp/test_base_simulation.h5', 'w')
cluster = ScienceParkCluster()
sim = BaseSimulation(cluster, datafile, '/simulations/this_run', 10)
sim.run()
"""
import warnings

import tables
Expand Down

0 comments on commit 92d98a7

Please sign in to comment.