Skip to content

Commit

Permalink
💬 Update type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
arafune committed Feb 27, 2024
2 parents e0d6485 + ab44486 commit 33c2dd0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/arpes/xarray_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,9 @@ def is_slit_vertical(self) -> bool:
angle_tolerance = 1.0
if self.angle_unit.startswith("Deg") or self.angle_unit.startswith("deg"):
return float(np.abs(self.lookup_offset_coord("alpha") - 90.0)) < angle_tolerance
return float(np.abs(self.lookup_offset_coord("alpha") - np.pi / 2)) < np.pi / 180
return float(np.abs(self.lookup_offset_coord("alpha") - np.pi / 2)) < np.deg2rad(
angle_tolerance,
)

@property
def endstation(self) -> str:
Expand Down Expand Up @@ -1730,9 +1732,9 @@ def _experimentalinfo_to_dict(conditions: EXPERIMENTINFO) -> dict[str, str]:
if isinstance(v, xr.DataArray):
min_hv = float(v.min())
max_hv = float(v.max())
transformed_dict[k] = (
f"<strong> from </strong> {min_hv} <strong> to </strong> {max_hv} eV"
)
transformed_dict[
k
] = f"<strong> from </strong> {min_hv} <strong> to </strong> {max_hv} eV"
elif isinstance(v, float) and not np.isnan(v):
transformed_dict[k] = f"{v} eV"
return transformed_dict
Expand Down

0 comments on commit 33c2dd0

Please sign in to comment.