Skip to content

Commit

Permalink
Remove leftover float conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
jank324 committed Sep 3, 2023
1 parent 3f1e6be commit afbe4ce
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions cheetah/particles.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,11 @@ def emittance_x(self) -> torch.Tensor:

@property
def beta_x(self) -> torch.Tensor:
return float(self.sigma_x**2 / self.emittance_x)
return self.sigma_x**2 / self.emittance_x

@property
def alpha_x(self) -> torch.Tensor:
return float(
self.sigma_xp**2 / self.emittance_x
) # TODO: Does this make sense?
return self.sigma_xp**2 / self.emittance_x # TODO: Does this make sense?

@property
def emittance_y(self) -> torch.Tensor:
Expand All @@ -199,13 +197,11 @@ def emittance_y(self) -> torch.Tensor:

@property
def beta_y(self) -> torch.Tensor:
return float(self.sigma_y**2 / self.emittance_y)
return self.sigma_y**2 / self.emittance_y

@property
def alpha_y(self) -> torch.Tensor:
return float(
self.sigma_yp**2 / self.emittance_y
) # TODO: Does this make sense?
return self.sigma_yp**2 / self.emittance_y # TODO: Does this make sense?

def __repr__(self) -> str:
return (
Expand Down

0 comments on commit afbe4ce

Please sign in to comment.