Skip to content

Commit

Permalink
📝 update documents (replace π with pi)
Browse files Browse the repository at this point in the history
  • Loading branch information
arafune committed Oct 11, 2023
1 parent e3e5ac5 commit 2cce0ee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
5 changes: 2 additions & 3 deletions arpes/fits/fit_models/x_model_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
__all__ = ["XModelMixin", "gaussian_convolve"]


LOGLEVEL = (DEBUG, INFO)[0]
LOGLEVEL = (DEBUG, INFO)[1]
logger = getLogger(__name__)
fmt = "%(asctime)s %(levelname)s %(name)s :%(message)s"
formatter = Formatter(fmt)
Expand Down Expand Up @@ -112,8 +112,7 @@ def guess_fit(
"""
if params is not None and not isinstance(params, lf.Parameters):
params = dict_to_parameters(params)
param_type_ = f"params type : {reveal_type(params)}"
logger.debug(param_type_)
logger.debug(f"param_type_ {type(params).__name__!r}")
coord_values = {}
if "x" in kwargs:
coord_values["x"] = kwargs.pop("x")
Expand Down
5 changes: 1 addition & 4 deletions arpes/xarray_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

ANGLE_VARS = ("alpha", "beta", "chi", "psi", "phi", "theta")

LOGLEVEL = (DEBUG, INFO)[0]
LOGLEVEL = (DEBUG, INFO)[1]
logger = getLogger(__name__)
fmt = "%(asctime)s %(levelname)s %(name)s :%(message)s"
formatter = Formatter(fmt)
Expand Down Expand Up @@ -938,7 +938,6 @@ def lookup_offset(self, attr_name: str) -> float:

offset_name = attr_name + "_offset"
if offset_name in self._obj.attrs:
assert isinstance(self._obj.attrs[offset_name], float)
return unwrap_xarray_item(self._obj.attrs[offset_name])

return unwrap_xarray_item(self._obj.attrs.get("data_preparation", {}).get(offset_name, 0))
Expand Down Expand Up @@ -3189,8 +3188,6 @@ def mean_square_error(self) -> xr.DataArray:
def safe_error(model_result_instance: lmfit.model.ModelResult | None) -> float:
if model_result_instance is None:
return np.nan
model_result_instance_residual_type_ = f"model_result_instance_residual_type: {reveal_type(model_result_instance.residual)}"
logger.debug(model_result_instance_residual_type_)
assert isinstance(model_result_instance.residual, np.ndarray)
return (model_result_instance.residual**2).mean()

Expand Down
4 changes: 2 additions & 2 deletions docs/source/notebooks/converting-to-kspace.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@
" {\"ky\": np.linspace(-1, 1, 400)}, \n",
" {\"kx\": np.linspace(-0.02, 0.02, 10)},\n",
" ).S.plot(vmax=11000, ax=ax.ravel()[inc])\n",
" ax.ravel()[inc].set_title(f\"-{inc}π/8\")\n",
" ax.ravel()[inc].set_title(f\"-{inc}pi/8\")\n",
" \n",
"plt.tight_layout()"
]
Expand All @@ -647,7 +647,7 @@
"metadata": {},
"source": [
"\n",
"Note that the first and last plots are merely reflections of one another, because a rotation by π is equivalent to inverting the `ky` axis of the cut."
"Note that the first and last plots are merely reflections of one another, because a rotation by pi is equivalent to inverting the `ky` axis of the cut."
]
},
{
Expand Down

0 comments on commit 2cce0ee

Please sign in to comment.