Skip to content

Commit

Permalink
🔥 fix bug
Browse files Browse the repository at this point in the history
🔥  Replace image in curve-fitting.ipynb

exceptig converting-to-kspace.ipynb, all ipynob works well
arafune committed Oct 11, 2023
1 parent 2cce0ee commit a4d2ab8
Showing 5 changed files with 868 additions and 224 deletions.
4 changes: 2 additions & 2 deletions arpes/fits/utilities.py
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
from __future__ import annotations

import os
from typing import TYPE_CHECKING, Any
from typing import TYPE_CHECKING, Any, reveal_type

import dill
import numpy as np
@@ -247,7 +247,7 @@ def unwrap(result_data) -> object:
"results": template,
"data": data_array,
"residual": residual,
"norm_residual": residual / data,
"norm_residual": residual / data_array,
},
residual.coords,
)
22 changes: 19 additions & 3 deletions arpes/utilities/conversion/kx_ky_conversion.py
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
"""
from __future__ import annotations

from logging import DEBUG, INFO, Formatter, StreamHandler, getLogger
import warnings
from typing import TYPE_CHECKING

@@ -28,6 +29,18 @@
__all__ = ["ConvertKp", "ConvertKxKy"]


LOGLEVEL = (DEBUG, INFO)[1]
logger = getLogger(__name__)
fmt = "%(asctime)s %(levelname)s %(name)s :%(message)s"
formatter = Formatter(fmt)
handler = StreamHandler()
handler.setLevel(LOGLEVEL)
logger.setLevel(LOGLEVEL)
handler.setFormatter(formatter)
logger.addHandler(handler)
logger.propagate = False


@numba.njit(parallel=True)
def _exact_arcsin( # noqa: PLR0913
k_par: NDArray[np.float_],
@@ -186,11 +199,11 @@ def compute_k_tot(self, binding_energy: NDArray[np.float_]) -> None:
)

def kspace_to_phi(
self,
binding_energy: NDArray[np.float_],
kp: NDArray[np.float_],
self, binding_energy: NDArray[np.float_], kp: NDArray[np.float_], *args: Incomplete
) -> NDArray[np.float_]:
"""Converts from momentum back to the analyzer angular axis."""
logger.debug("the following args are not used in kspace_to_phi")
logger.debug(args)
if self.phi is not None:
return self.phi
if self.is_slit_vertical:
@@ -389,8 +402,11 @@ def kspace_to_phi(
binding_energy: NDArray[np.float_],
kx: NDArray[np.float_],
ky: NDArray[np.float_],
*args: Incomplete,
) -> NDArray[np.float_]:
"""Converts from momentum back to the analyzer angular axis."""
logger.debug("the following args are not used in kspace_to_phi")
logger.debug(args)
if self.phi is not None:
return self.phi
if self.k_tot is None:
494 changes: 355 additions & 139 deletions docs/source/notebooks/converting-to-kspace.ipynb

Large diffs are not rendered by default.

18 changes: 13 additions & 5 deletions docs/source/notebooks/curve-fitting.ipynb

Large diffs are not rendered by default.

554 changes: 479 additions & 75 deletions docs/source/notebooks/fermi-edge-correction.ipynb

Large diffs are not rendered by default.

0 comments on commit a4d2ab8

Please sign in to comment.