Skip to content

Commit

Permalink
💬 Update type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
arafune committed Jan 22, 2024
1 parent 586573d commit f598a8f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
21 changes: 18 additions & 3 deletions arpes/endstations/plugin/ANTARES.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import h5py
import numpy as np
from numpy._typing import NDArray
import xarray as xr

from arpes.endstations import (
Expand All @@ -25,6 +24,7 @@

if TYPE_CHECKING:
from _typeshed import Incomplete
from numpy.typing import NDArray

__all__ = ("ANTARESEndstation",)

Expand Down Expand Up @@ -115,7 +115,20 @@ def load_top_level_scan(
scan_desc: SCANDESC | None = None,
spectrum_index=None,
) -> xr.Dataset:
"""Reads a spectrum from the top level group in a NeXuS scan format."""
"""Reads a spectrum from the top level group in a NeXuS scan format.
[TODO:description]
Args:
group ([TODO:type]): [TODO:description]
scan_desc: [TODO:description]
spectrum_index ([TODO:type]): [TODO:description]
Returns:
[TODO:description]
"""
if scan_desc:
warnings.warn("scan_desc is not supported", stacklevel=2)
dr = self.read_scan_data(group)
bindings = read_data_attributes_from_tree(group, READ_TREE)

Expand Down Expand Up @@ -181,7 +194,9 @@ def take_last(vs):

return vs

for dim_order, name, values in zip(actuator_dim_order, actuator_names, actuator_list):
for dim_order, name, values in zip(
actuator_dim_order, actuator_names, actuator_list, strict=False
):
name = self.RENAME_KEYS.get(name, name)
dims[dim_order] = name
coords[name] = take_last(values)
Expand Down
1 change: 0 additions & 1 deletion arpes/xarray_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ def transpose_to_front(self, dim: str) -> xr.DataArray | xr.Dataset:
def transpose_to_back(self, dim: str) -> xr.DataArray | xr.Dataset:
"""Transpose the dimensions (to back).
[TODO:description]
Args:
dim: dimension to back
Expand Down

0 comments on commit f598a8f

Please sign in to comment.