pysrw.configuration.CONFIG#
- class pysrw.configuration.CONFIG(PART_TYPE: Literal['electron', 'proton', 'custom'] = 'electron', PART_MASS: float = 0.0005109989499961642, PART_CHARGE: int = -1, B_SCALING: float = -1.0, REL_PREC: float = 0.001, SR_APPROX: str = 'auto-undulator')[source]#
Bases:
object
A dataclass to store the simulation parameters.
- __init__(PART_TYPE: Literal['electron', 'proton', 'custom'] = 'electron', PART_MASS: float = 0.0005109989499961642, PART_CHARGE: int = -1, B_SCALING: float = -1.0, REL_PREC: float = 0.001, SR_APPROX: str = 'auto-undulator') None #
Methods
__init__
([PART_TYPE, PART_MASS, ...])initParticleType
([particleType, charge, mass])Initialize type of particle.
Attributes
B_SCALING
PART_CHARGE
PART_MASS
PART_TYPE
REL_PREC
SR_APPROX
- classmethod initParticleType(particleType='electron', charge=None, mass=None)[source]#
Initialize type of particle.
- Parameters:
particleType (optional) – ‘electron’, ‘proton’ or ‘custom’.
charge (optional) – charge of custom particle in elementary units.
mass (optional) – mass of custom particle in GeV.