Skip to content

Commit 33109bd

Browse files
committed
Cleaned imports
1 parent b249e95 commit 33109bd

9 files changed

Lines changed: 7 additions & 15 deletions

File tree

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ project_urls =
1111
Documentation = https://fable-3dxrd.github.io/xrd_simulator/
1212
classifiers =
1313
Programming Language :: Python :: 3.10
14-
Programming Language :: Python :: 3.11
14+
Programming Language :: Python :: 3.13
1515
License :: OSI Approved :: MIT License
1616
Operating System :: OS Independent
1717

1818
[options]
1919
packages = find:
20-
python_requires = >=3.10
20+
python_requires = >=3.13

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"Operating System :: OS Independent",
2222
],
2323
packages=setuptools.find_packages(),
24-
python_requires=">=3.9",
24+
python_requires=">=3.13",
2525
install_requires=[
2626
# Core numeric/scientific
2727
"numpy>=1.24.0",
@@ -37,6 +37,8 @@
3737

3838
# Visualization
3939
"matplotlib",
40+
"Pillow>=9.0.0",
41+
"scikit-image",
4042

4143
# Scientific computing
4244
"numba",

xrd_simulator/beam.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from scipy.spatial import ConvexHull, HalfspaceIntersection
1414
from scipy.optimize import linprog
1515
import torch
16-
from xrd_simulator import cuda
1716

1817
torch.set_default_dtype(torch.float64)
1918
from xrd_simulator.utils import ensure_torch, ensure_numpy

xrd_simulator/detector.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@
1919
import numpy as np
2020
import torch
2121
import torch.nn.functional as F
22-
from scipy.spatial import ConvexHull
23-
from skimage.draw import polygon
2422

2523
from xrd_simulator import utils
2624
from xrd_simulator.utils import ensure_torch, ensure_numpy
27-
from xrd_simulator import cuda
25+
2826

2927
torch.set_default_dtype(torch.float64)
3028

xrd_simulator/laue.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55
import numpy as np
66
import torch
7-
from xrd_simulator import utils,cuda
7+
88
torch.set_default_dtype(torch.float64)
99

1010
def get_G(U, B, G_hkl):
@@ -30,8 +30,6 @@ def get_G(U, B, G_hkl):
3030

3131
return torch.matmul(torch.matmul(U, B), G_hkl.T)
3232

33-
34-
3533
def get_bragg_angle(G, wavelength):
3634
"""Compute a Bragg angle given a diffraction (scattering) vector.
3735
@@ -45,7 +43,6 @@ def get_bragg_angle(G, wavelength):
4543
"""
4644
return np.arcsin(np.linalg.norm(G, axis=0) * wavelength / (4 * np.pi))
4745

48-
4946
def get_sin_theta_and_norm_G(G, wavelength):
5047
"""Compute a Bragg angle given a diffraction (scattering) vector.
5148

xrd_simulator/mesh.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import meshio
2222
import torch
2323
from xrd_simulator import utils, motion
24-
from xrd_simulator.utils import ensure_torch, ensure_numpy
2524

2625

2726
class TetraMesh(object):

xrd_simulator/motion.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import dill
1717
import torch
1818
from xrd_simulator.utils import ensure_torch
19-
from xrd_simulator import cuda
2019

2120
torch.set_default_dtype(torch.float64)
2221

xrd_simulator/polycrystal.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
from xrd_simulator.motion import RigidBodyMotion
2525
from xrd_simulator.mesh import TetraMesh
2626
from xrd_simulator.phase import Phase
27-
from xrd_simulator import cuda
2827

2928
torch.set_default_dtype(torch.float64)
3029

xrd_simulator/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
)
6969

7070
import pandas as pd
71-
from xrd_simulator.cuda import device
7271

7372

7473
def set_device(use_gpu=None, verbose=True):

0 commit comments

Comments
 (0)