Skip to content

Commit

Permalink
💬 Update type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
arafune committed Mar 20, 2024
1 parent 0419ce7 commit 2db5eef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/arpes/plotting/bz.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
from matplotlib.typing import ColorType
from numpy.typing import ArrayLike, NDArray

from arpes._typing import DataType

__all__ = (
"annotate_special_paths",
"bz2d_plot",
Expand Down
4 changes: 2 additions & 2 deletions src/arpes/plotting/dispersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def plot_dispersion(
out: str | Path = "",
) -> Axes | Path:
"""Plots an ARPES cut with bands over it."""
ax = spectrum.plot()
ax = spectrum.S.plot()

for band in bands:
plt.scatter(band.center.values, band.coords[band.dims[0]].values)
Expand All @@ -70,7 +70,7 @@ class CutDispersionPlotParam(TypedDict, total=False):
def cut_dispersion_plot( # noqa: PLR0913
data: xr.DataArray,
e_floor: float | None = None,
ax: Axes | None = None,
ax: Axes3D | None = None,
*,
include_symmetry_points: bool = True,
out: str | Path = "",
Expand Down
6 changes: 3 additions & 3 deletions src/arpes/plotting/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@


@save_plot_provenance
def plot_spatial_reference(
def plot_spatial_reference( # noqa: PLR0913
reference_map: xr.DataArray,
data_list: list[DataType],
offset_list: list[dict[str, Any] | None] | None = None,
Expand Down Expand Up @@ -246,7 +246,7 @@ def reference_scan_spatial(
if offset > 0:
offset = 0

if rng > 3:
if rng > 3: # noqa: PLR2004
mul = rng / 5.0

for i in range(5):
Expand All @@ -265,7 +265,7 @@ def reference_scan_spatial(

# idea here is to collect points by those that are close together, then
# only plot one annotation
condensed = []
condensed: list[tuple[float, float, list[int]]] = []
cutoff = 3 # 3 percent
for index, _ in referenced.iterrows():
ff = load_data(index)
Expand Down

0 comments on commit 2db5eef

Please sign in to comment.