Models

Particle Beam Models

Module with pydantic models to validate and store data structures relative to particle beams.

class pyhdtoolkit.models.beam.BeamParameters(*, pc_GeV: Optional[float] = None, E_0_GeV: Optional[float] = 0.9382720813, charge: Optional[float] = 1, en_x_m: Optional[float] = None, en_y_m: Optional[float] = None, deltap_p: Optional[float] = None)[source]

New in version 0.12.0.

Class to encompass, validate and manipulate properties of a particle beam. One can find a usage example in the beam enveloppe demo.

property B_rho_Tm: float

Beam rigidity [T/m]

property E_kin_GeV: float

Total beam energy [GeV]

property E_tot_GeV: float

Total beam energy [GeV]

property beta_r: float

Relativistic beta

property eg_x_m: float

Horizontal geometrical emittance

property eg_y_m: float

Vertical geometrical emittance

property gamma_r: float

Relativistic gamma

HTCondor Models

Module with pydantic models to validate and store data obtained by querying the HTCondor queue.

class pyhdtoolkit.models.htc.BaseSummary(*, jobs: int, completed: int, removed: int, idle: int, running: int, held: int, suspended: int)[source]

New in version 0.12.0.

Class to encompass and validate the cluster’s summary line in the condor_q output.

class pyhdtoolkit.models.htc.ClusterSummary(*, scheduler_id: str, query: pyhdtoolkit.models.htc.BaseSummary, user: pyhdtoolkit.models.htc.BaseSummary, cluster: pyhdtoolkit.models.htc.BaseSummary)[source]

New in version 0.12.0.

Class to encompass and validate the cluster’s info line in the condor_q output.

class pyhdtoolkit.models.htc.HTCTaskSummary(*, owner: str, batch_name: int, submitted: pendulum.datetime.DateTime, done: Union[int, str], run: Union[int, str], idle: Union[int, str], total: int, job_ids: str)[source]

New in version 0.12.0.

Class to encompass and validate a specific job’s line in the condor_q output.

MAD-X Models

Module with pydantic models to validate and store data obtained by interacting with the MAD-X process through cpymad.

class pyhdtoolkit.models.madx.MADXBeam(*, particle: pyhdtoolkit.models.madx.ParticleEnum, mass: float, charge: float, energy: float, pc: float, gamma: float, beta: float, brho: float, ex: float, ey: float, et: float, exn: float, eyn: float, sigt: float, sige: float, kbunch: int, npart: int, bcurrent: float, bunched: bool, radiate: bool, bv: int)[source]

New in version 0.12.0.

Class to encompass and validate BEAM attributes from the MAD-X process.

class pyhdtoolkit.models.madx.ParticleEnum(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

New in version 0.12.0.

Validator Enum defining the accepted particle names in MAD-X beams.