Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 3, 2025
1 parent a885d76 commit 99673d7
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 57 deletions.
2 changes: 1 addition & 1 deletion diffsims/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def add_reciprocal_lattice_vector_al(doctest_namespace):
doctest_namespace["rlv"] = rlv


@pytest.fixture(params=[("file_01")])
@pytest.fixture(params=["file_01"])
def pickle_temp_file(tmpdir, request):
name = request.param
fname = tmpdir.join(name + ".pickle")
Expand Down
3 changes: 1 addition & 2 deletions diffsims/generators/library_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with diffsims. If not, see <http://www.gnu.org/licenses/>.

"""Diffraction pattern library generator and associated tools.
"""
"""Diffraction pattern library generator and associated tools."""

import numpy as np
from tqdm import tqdm
Expand Down
2 changes: 1 addition & 1 deletion diffsims/tests/generators/test_diffraction_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from diffsims.utils.shape_factor_models import linear, binary, sin2c, atanc, lorentzian


@pytest.fixture(params=[(300)])
@pytest.fixture(params=[300])
def diffraction_calculator(request):
return DiffractionGenerator(request.param)

Expand Down
2 changes: 1 addition & 1 deletion diffsims/tests/generators/test_simulation_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
FILE1 = TEST_DATA_DIR / "old_simulation.npy"


@pytest.fixture(params=[(300)])
@pytest.fixture(params=[300])
def diffraction_calculator(request):
return SimulationGenerator(request.param)

Expand Down
96 changes: 46 additions & 50 deletions diffsims/tests/utils/test_ring_pattern_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,62 +35,58 @@ def input_parameters():
@pytest.mark.parametrize(
"known_values",
[
(
np.array(
[
124.05909278,
25.85258647,
39.09906246,
173.75469207,
79.48046629,
533.72925614,
36.23521052,
29.58603406,
21.83270633,
75.89239623,
40.04732689,
14.52041808,
35.82637996,
75.33666451,
21.21751965,
38.97731538,
19.64631964,
161.72783637,
23.6894442,
282.3126376,
]
)
np.array(
[
124.05909278,
25.85258647,
39.09906246,
173.75469207,
79.48046629,
533.72925614,
36.23521052,
29.58603406,
21.83270633,
75.89239623,
40.04732689,
14.52041808,
35.82637996,
75.33666451,
21.21751965,
38.97731538,
19.64631964,
161.72783637,
23.6894442,
282.3126376,
]
)
],
)
@pytest.mark.parametrize(
"reference_indices",
[
(
np.array(
[
[205, 158],
[197, 1],
[105, 239],
[64, 148],
[61, 84],
[136, 155],
[37, 85],
[21, 94],
[247, 31],
[171, 195],
[202, 39],
[225, 255],
[233, 128],
[56, 107],
[22, 51],
[28, 119],
[20, 45],
[164, 65],
[235, 188],
[75, 186],
]
)
np.array(
[
[205, 158],
[197, 1],
[105, 239],
[64, 148],
[61, 84],
[136, 155],
[37, 85],
[21, 94],
[247, 31],
[171, 195],
[202, 39],
[225, 255],
[233, 128],
[56, 107],
[22, 51],
[28, 119],
[20, 45],
[164, 65],
[235, 188],
[75, 186],
]
)
],
)
Expand Down
3 changes: 1 addition & 2 deletions diffsims/utils/atomic_diffraction_generator_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with diffsims. If not, see <http://www.gnu.org/licenses/>.

"""Back-end for computing diffraction patterns with a kinematic model.
"""
"""Back-end for computing diffraction patterns with a kinematic model."""

from numpy import array, pi, sin, cos, empty
from scipy.interpolate import interpn
Expand Down

0 comments on commit 99673d7

Please sign in to comment.