diff --git a/cheetah/particles.py b/cheetah/particles.py index ef08f469..d312f733 100644 --- a/cheetah/particles.py +++ b/cheetah/particles.py @@ -497,12 +497,16 @@ def from_twiss( ), "Arguments must have the same shape." # Set default values without function call in function signature - beta_x = beta_x if beta_x is not None else torch.full(shape, 0.0) + beta_x = beta_x if beta_x is not None else torch.full(shape, 1.0) alpha_x = alpha_x if alpha_x is not None else torch.full(shape, 0.0) - emittance_x = emittance_x if emittance_x is not None else torch.full(shape, 0.0) - beta_y = beta_y if beta_y is not None else torch.full(shape, 0.0) + emittance_x = ( + emittance_x if emittance_x is not None else torch.full(shape, 7.1971891e-13) + ) + beta_y = beta_y if beta_y is not None else torch.full(shape, 1.0) alpha_y = alpha_y if alpha_y is not None else torch.full(shape, 0.0) - emittance_y = emittance_y if emittance_y is not None else torch.full(shape, 0.0) + emittance_y = ( + emittance_y if emittance_y is not None else torch.full(shape, 7.1971891e-13) + ) sigma_s = sigma_s if sigma_s is not None else torch.full(shape, 1e-6) sigma_p = sigma_p if sigma_p is not None else torch.full(shape, 1e-6) cor_s = cor_s if cor_s is not None else torch.full(shape, 0.0)