diff --git a/src/arpes/deep_learning/transforms.py b/src/arpes/deep_learning/transforms.py index c96313d1..2f286526 100644 --- a/src/arpes/deep_learning/transforms.py +++ b/src/arpes/deep_learning/transforms.py @@ -15,15 +15,44 @@ class Identity: """Represents a reversible identity transform.""" def encodes(self, x: Incomplete) -> Incomplete: + """[TODO:summary]. + + Args: + x: [TODO:description] + + Returns: + [TODO:description] + """ return x def __call__(self, x: Incomplete) -> Incomplete: + """[TODO:summary]. + + Args: + x: [TODO:description] + + Returns: + [TODO:description] + """ return x def decodes(self, x: Incomplete) -> Incomplete: + """[TODO:summary]. + + Args: + x: [TODO:description] + + Returns: + [TODO:description] + """ return x def __repr__(self) -> str: + """[TODO:summary]. + + Returns: + [TODO:description] + """ return "Identity()" @@ -54,9 +83,9 @@ def __post_init__(self) -> None: for t in self.transforms: if isinstance(t, tuple | list): xt, yt = t - t = [xt or _identity, yt or _identity] - - safe_transforms.append(t) + safe_transforms.append([xt or _identity, yt or _identity]) + else: + safe_transforms.append(t) self.original_transforms = self.transforms self.transforms = safe_transforms diff --git a/src/arpes/plotting/spin.py b/src/arpes/plotting/spin.py index f2f77291..f372b15a 100644 --- a/src/arpes/plotting/spin.py +++ b/src/arpes/plotting/spin.py @@ -163,11 +163,9 @@ def spin_polarized_spectrum( # noqa: PLR0913 counts = spin_dr pol = to_intensity_polarization(counts) - ax_left = ax[0] - ax_right = ax[1] + ax_left, ax_right = ax[0], ax[1] - up = counts.down.data - down = counts.up.data + down, up = counts.down.data, counts.up.data energies = spin_dr.coords["eV"].values min_e, max_e = np.min(energies), np.max(energies) @@ -194,8 +192,7 @@ def spin_polarized_spectrum( # noqa: PLR0913 ax_left.set_xlabel(r"\textbf{Kinetic energy} (eV)") ax_left.set_xlim(min_e, max_e) - max_up = np.max(up) - max_down = np.max(down) + max_up, max_down = np.max(up), np.max(down) ax_left.set_ylim(0, max(max_down, max_up) * 1.2) # Plot the polarization and associated statistical error bars @@ -296,7 +293,7 @@ def hue_brightness_plot( assert isinstance(ax, Axes) assert isinstance(fig, Figure) x, y = data.coords[data.intensity.dims[0]].values, data.coords[data.intensity.dims[1]].values - extent = [y[0], y[-1], x[0], x[-1]] + extent = (y[0], y[-1], x[0], x[-1]) ax.imshow( polarization_intensity_to_color(data, **kwargs), extent=extent, diff --git a/src/arpes/utilities/qt/app.py b/src/arpes/utilities/qt/app.py index dc06d009..1cfffb36 100644 --- a/src/arpes/utilities/qt/app.py +++ b/src/arpes/utilities/qt/app.py @@ -143,7 +143,7 @@ def set_colormap(self, colormap: Colormap | str) -> None: if isinstance(view, DataArrayImageView): view.setColorMap(cmap) - def generate_marginal_for( + def generate_marginal_for( # noqa: PLR0913 self, dimensions: tuple[int, ...], column: int,