diff --git a/src/arpes/constants.py b/src/arpes/constants.py index a043c06e..e37097fd 100644 --- a/src/arpes/constants.py +++ b/src/arpes/constants.py @@ -7,7 +7,7 @@ """ from __future__ import annotations - +import numpy as np from typing import TYPE_CHECKING from numpy import pi @@ -54,7 +54,7 @@ SPECTROMETER_MC: Spectrometer = { "name": "MC", - "rad_per_pixel": (1 / 10) * (pi / 180), + "rad_per_pixel": np.deg2rad(1 / 10), "type": "hemisphere", "is_slit_vertical": False, } @@ -62,7 +62,7 @@ SPECTROMETER_MC_OLD: Spectrometer = { "name": "MC_OLD", "type": "hemisphere", - "rad_per_pixel": 0.125 * (pi / 180), + "rad_per_pixel": np.deg2rad(0.125), "is_slit_vertical": False, } diff --git a/src/arpes/plotting/false_color.py b/src/arpes/plotting/false_color.py index 5b600b99..2f9d171c 100644 --- a/src/arpes/plotting/false_color.py +++ b/src/arpes/plotting/false_color.py @@ -23,7 +23,7 @@ @save_plot_provenance -def false_color_plot( +def false_color_plot( # noqa: PLR0913 data_rgb: tuple[xr.Dataset, xr.Dataset, xr.Dataset], ax: Axes | None = None, out: str | Path = "", diff --git a/src/arpes/utilities/jupyter.py b/src/arpes/utilities/jupyter.py index 6a9fb59a..fee9bca5 100644 --- a/src/arpes/utilities/jupyter.py +++ b/src/arpes/utilities/jupyter.py @@ -13,6 +13,7 @@ from typing import TYPE_CHECKING, TypedDict from tqdm.notebook import tqdm +from traitlets.config import MultipleInstanceError if TYPE_CHECKING: from collections.abc import Iterable @@ -98,7 +99,7 @@ def get_full_notebook_information() -> NoteBookInfomation | None: return None try: connection_file = Path(ipykernel.get_connection_file()).stem - except RuntimeError: + except MultipleInstanceError: return None logger.debug(f"connection_file: {connection_file}")