NumPyHandler#

class orbit.bunch_utils.NumPyHandler(dir_name)[source]#

Bases: object

Handler implementing the FileHandler protocol for NumPy binary files. This handler will create two files in the directory passed to the constructor:

  • coords.npy: A memory-mapped NumPy array containing the bunch coordinates.

  • attributes.npz: A NumPy archive containing data related to the synchronous particle and other bunch attributes.

Methods Summary

read()

rtype

BunchDict

write(bunch)

rtype

None

Methods Documentation

Parameters

dir_name (str | pathlib._local.Path) –

read()[source]#
Return type

BunchDict

write(bunch)[source]#
Return type

None

Parameters

bunch (orbit.bunch_utils.serialize.BunchDict) –