diff --git a/arpes/analysis/band_analysis.py b/arpes/analysis/band_analysis.py index c95759cf..ea4a25ca 100644 --- a/arpes/analysis/band_analysis.py +++ b/arpes/analysis/band_analysis.py @@ -187,14 +187,13 @@ def as_vector(model_fit: lf.ModelResult, prefix: str = "") -> NDArray[np.float_] as_vector(closest_fit, closest_prefixes[j]), ) - best_arrangement = None + best_arrangement: tuple[int, ...] = tuple(range(len(prefixes))) best_trace = float("inf") for p in itertools.permutations(range(len(prefixes))): trace = sum(dist_mat[i, p_i] for i, p_i in enumerate(p)) if trace < best_trace: best_trace = trace best_arrangement = p - ordered_prefixes = [closest_prefixes[p_i] for p_i in best_arrangement] identified_by_coordinate[frozen_coord] = ordered_prefixes, fit_result identified_band_results.loc[coordinate] = ordered_prefixes diff --git a/arpes/utilities/normalize.py b/arpes/utilities/normalize.py index 4c3421e8..b66565cd 100644 --- a/arpes/utilities/normalize.py +++ b/arpes/utilities/normalize.py @@ -2,6 +2,7 @@ from __future__ import annotations +import warnings from typing import TYPE_CHECKING import xarray as xr @@ -20,6 +21,13 @@ def normalize_to_spectrum(data: XrTypes | str) -> xr.DataArray: import arpes.xarray_extensions # noqa: F401 from arpes.io import load_data + msg = "Remember to use a DataArray not a Dataset, " + msg += "attempting to extract spectrum and copy attributes." + warnings.warn( + msg, + stacklevel=2, + ) + if isinstance(data, xr.Dataset): if "up" in data.data_vars: assert isinstance(data.up, xr.DataArray)