Skip to content

Commit

Permalink
🐛 pyarpes should work on IPython
Browse files Browse the repository at this point in the history
  • Loading branch information
arafune committed Mar 14, 2024
1 parent c6b2d9c commit 14a8050
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/arpes/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"""

from __future__ import annotations

import numpy as np
from typing import TYPE_CHECKING

from numpy import pi
Expand Down Expand Up @@ -54,15 +54,15 @@

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,
}

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,
}

Expand Down
2 changes: 1 addition & 1 deletion src/arpes/plotting/false_color.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "",
Expand Down
3 changes: 2 additions & 1 deletion src/arpes/utilities/jupyter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}")
Expand Down

0 comments on commit 14a8050

Please sign in to comment.