km3modules

A collection of commonly used modules.

Package Contents

Classes

Dump() Print the content of the blob.
Keep() Keep only specified keys in the blob.
Delete() Remove specific keys from the blob.
StatusBar() Displays the current blob number.
GlobalRandomState() Sets the global random seed of the numpy random generator
class km3modules.Dump[source]

Bases:km3pipe.Module

Print the content of the blob.

Parameters:
keys: collection(string), optional [default=None]

Keys to print. If None, print all keys.

full: bool, default=False

Print blob values too, not just the keys?

configure(self)
process(self, blob)
class km3modules.Keep[source]

Bases:km3pipe.Module

Keep only specified keys in the blob.

Parameters:
keys: collection(string), optional

Keys to keep. Everything else is removed.

configure(self)
process(self, blob)
class km3modules.Delete[source]

Bases:km3pipe.Module

Remove specific keys from the blob.

Parameters:
keys: collection(string), optional

Keys to remove.

configure(self)
process(self, blob)
class km3modules.StatusBar[source]

Bases:km3pipe.Module

Displays the current blob number.

configure(self)
process(self, blob)
finish(self)
class km3modules.GlobalRandomState[source]

Bases:km3pipe.Module

Sets the global random seed of the numpy random generator

KM3Pipe uses numpy routines exclusively to generate randomness. Setting a seed to a specific value will create a fully reproducible pipeline as long as your own modules also utilise numpy for random numbers.

Parameters:
seed: int, default=42
random_state
configure(self)