Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
13c5a0e
Start documentation + typing
ZackAttack614 Jan 28, 2026
74bfa9f
Continue typing
ZackAttack614 Jan 28, 2026
4baf9f1
Continue typing effort
ZackAttack614 Jan 30, 2026
50d9382
Continued typing updates
ZackAttack614 Feb 2, 2026
64ff0a4
Continue typing
ZackAttack614 Feb 2, 2026
f70845d
Type Registry
ZackAttack614 Feb 2, 2026
8705bd3
Merge branch 'master' into documentation
ZackAttack614 Feb 2, 2026
239e417
_new_transforms_capi.pyi creation
ZackAttack614 Feb 2, 2026
e188aff
Use Sequence where appropriate.
ZackAttack614 Feb 2, 2026
9f85485
Revert accidental change to compatibility.py
ZackAttack614 Feb 2, 2026
7b757b5
Revert filter_maps_if_requested
ZackAttack614 Feb 2, 2026
2b20a72
Continue typing - finished extensions, NDArray additions
ZackAttack614 Feb 2, 2026
ea46213
Continue typing...
ZackAttack614 Feb 2, 2026
72b2663
Continue typing in hexrd/core
ZackAttack614 Feb 2, 2026
809b8a7
Down to 33 errors
ZackAttack614 Feb 3, 2026
ec69225
33 -> 19 mypy errors
ZackAttack614 Feb 3, 2026
4270ab1
Resolve dangling mangling
ZackAttack614 Feb 3, 2026
338532d
Coerce data to np.str_
ZackAttack614 Feb 3, 2026
cb15932
Merge branch 'master' into documentation
ZackAttack614 Feb 3, 2026
0f9adad
Begin transforms cleanup
ZackAttack614 Feb 3, 2026
472bb6b
Remove all old transforms C code
ZackAttack614 Feb 3, 2026
640ad50
Wipe out the old transforms CAPI info
ZackAttack614 Feb 3, 2026
26ddb98
Remove functions already in cpp_transforms
ZackAttack614 Feb 3, 2026
cd922ae
Cut very old xf.py
ZackAttack614 Feb 3, 2026
ad17714
use simple "static" keyword, remove stray calls to deleted funcs
ZackAttack614 Feb 3, 2026
28fb5ac
Undo XRD_PYTHON_WRAPPER alias
ZackAttack614 Feb 3, 2026
ef68e8e
Resolve importlib typing issues
ZackAttack614 Feb 4, 2026
796d882
Revert "Resolve importlib typing issues"
ZackAttack614 Feb 4, 2026
46fd547
Delete a lot of useless transforms stuff
ZackAttack614 Feb 4, 2026
1452865
Black
ZackAttack614 Feb 4, 2026
185538d
Simplify transforms architecture
ZackAttack614 Feb 6, 2026
7ac473c
Merge branch 'master' into transforms-cleanup
ZackAttack614 Feb 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions hexrd/core/extensions/__init__.py

This file was deleted.

174 changes: 0 additions & 174 deletions hexrd/core/extensions/_transforms_CAPI.pyi

This file was deleted.

12 changes: 2 additions & 10 deletions hexrd/core/fitting/calibration/lmfit_param_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# First is the axes_order, second is extrinsic
DEFAULT_EULER_CONVENTION = ('zxz', False)

EULER_CONVENTION_TYPES = dict | tuple | None
EULER_CONVENTION_TYPES = dict | tuple


def create_instr_params(
Expand Down Expand Up @@ -177,9 +177,6 @@ def _add_constrained_detector_parameters(
if euler_convention is not None:
# Convert the tilt to the specified Euler convention
normalized = normalize_euler_convention(euler_convention)
if normalized is None:
raise ValueError('euler_convention cannot be None in this context.')

rme = RotMatEuler(
np.zeros(
3,
Expand Down Expand Up @@ -509,9 +506,6 @@ def _tilt_to_rmat(
return rotMatOfExpMap(tilt)

normalized = normalize_euler_convention(euler_convention)
if normalized is None:
raise ValueError('euler_convention cannot be None in this context.')

return make_rmat_euler(
np.radians(tilt),
axes_order=normalized[0],
Expand Down Expand Up @@ -735,9 +729,7 @@ def validate_params_list(params_list):
}


def normalize_euler_convention(
euler_convention: EULER_CONVENTION_TYPES,
) -> tuple | None:
def normalize_euler_convention(euler_convention: EULER_CONVENTION_TYPES) -> tuple:
if isinstance(euler_convention, dict):
return (
euler_convention['axes_order'],
Expand Down
1 change: 1 addition & 0 deletions hexrd/core/instrument/hedm_instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ def _parse_imgser_dict(
elif isinstance(images_in, np.ndarray):
# 2- or 3-d array of images
ndim = images_in.ndim
images_in = np.asarray(images_in)
if ndim == 2:
ims = images_in[roi[0][0] : roi[0][1], roi[1][0] : roi[1][1]]
elif ndim == 3:
Expand Down
20 changes: 15 additions & 5 deletions hexrd/core/material/crystallography.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,18 @@
import csv
import os
from math import pi
from typing import Literal, Sequence, Optional, Union, List, Tuple, TypedDict, overload
from typing import (
Any,
Literal,
Mapping,
Optional,
Union,
Dict,
List,
Tuple,
TypedDict,
overload,
)

import numpy as np
from numpy.typing import NDArray
Expand Down Expand Up @@ -1471,7 +1482,7 @@ def getMultiplicity(self, allHKLs: Optional[bool] = False) -> np.ndarray:

def getHKLID(
self,
hkl: int | Sequence[int, int, int] | NDArray[np.int_],
hkl: int | tuple[int, int, int] | NDArray[np.int_],
master: bool = False,
) -> List[int] | int:
"""
Expand Down Expand Up @@ -1507,10 +1518,9 @@ def getHKLID(
if isinstance(hkl, np.ndarray):
# if is ndarray, assume is 3xN
return [self._getHKLID(x, master=master) for x in hkl.T]
elif isinstance(hkl, list):
elif isinstance(hkl, tuple) or isinstance(hkl, list):
return [self._getHKLID(x, master=master) for x in hkl]
else:
assert isinstance(hkl, (int, tuple))
return self._getHKLID(hkl, master=master)

def _getHKLID(
Expand Down Expand Up @@ -2232,8 +2242,8 @@ def lorentz_factor(tth: np.ndarray) -> np.ndarray:

def polarization_factor(
tth: NDArray[np.float64],
unpolarized: Optional[bool] = True,
eta: Optional[NDArray[np.float64]] = None,
unpolarized: Optional[bool] = True,
f_hor: Optional[float] = None,
f_vert: Optional[float] = None,
) -> NDArray[np.float64]:
Expand Down
47 changes: 0 additions & 47 deletions hexrd/core/transforms/Makefile

This file was deleted.

28 changes: 0 additions & 28 deletions hexrd/core/transforms/__init__.py

This file was deleted.

Loading
Loading