Photon stream#

A photon stream is the format that connects the modules of obdeect. It is a binary stream of records: one run, its events, the telescopes of each event, and the photons that reach each telescope in chunks of columns (position, direction, time, weight and wavelength). The stream also records which efficiency factors each module has applied, so that the next module knows what is left to do. Streams are written and read in sequence, so modules can run side by side in a pipe.

The component provides the format with readers and writers in C++, Python and C, and the converters at both ends of the chain. obdeect stream from-corsika reads CORSIKA IACT output, and obdeect stream to-simtel writes input for sim_telarray, the camera simulation. For the GrISU chain, obdeect stream to-grisu writes the photon text read by GrOptics, which feeds GrISUDet. Two tools, cat and tee, join and copy streams.

Every other component builds on this one: all use the same frames, units, random-number rules and efficiency records, which are defined here once.

Command line

Join, copy and convert streams; connect to sim_telarray.

Command line
Format

Records, metadata, photon columns and frames.

Photon-stream format
Efficiency status

How modules record which efficiencies they have applied.

Efficiency status
Random numbers

One generator, reproducible results, independent modules.

Random numbers
Programming interfaces

Read and write streams from C++, Python and C.

Programming interfaces
GrOptics and GrISU

Export photons as GrISU photon text.

GrOptics and GrISU