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 Oct 27, 2024
1 parent cf93e57 commit 7646b1f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/pyFAI/integrator/fiber.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def integrate_fiber(self, data,
raise RuntimeError("npt_oop (out-of-plane bins) is needed to do the integration")
elif not vertical_integration and npt_ip is None:
raise RuntimeError("npt_ip (in-plane bins) is needed to do the integration")

npt_oop = npt_oop or 500
npt_ip = npt_ip or 500

Expand Down
14 changes: 7 additions & 7 deletions src/pyFAI/test/test_fiber_integrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,24 +207,24 @@ def res1d_ref():

self.assertRaises(RuntimeError, res1d_ref)
correct = self.fi.integrate1d_grazing_incidence(data=self.data, npt_ip=100, vertical_integration=False)

def test_integrate1d_defaults(self):
res1d_vertical_ref = self.fi.integrate1d_grazing_incidence(data=self.data, npt_oop=100, vertical_integration=True)
res1d_vertical = self.fi.integrate1d_grazing_incidence(data=self.data,
res1d_vertical = self.fi.integrate1d_grazing_incidence(data=self.data,
npt_oop=100, npt_ip=500,
vertical_integration=True)

self.assertEqual(abs(res1d_vertical_ref.radial - res1d_vertical.radial).max(), 0)
self.assertEqual(abs(res1d_vertical_ref.intensity - res1d_vertical.intensity).max(), 0)

res1d_horizontal_ref = self.fi.integrate1d_grazing_incidence(data=self.data, npt_ip=100, vertical_integration=False)
res1d_horizontal = self.fi.integrate1d_grazing_incidence(data=self.data,
res1d_horizontal = self.fi.integrate1d_grazing_incidence(data=self.data,
npt_oop=500, npt_ip=100,
vertical_integration=False)

self.assertEqual(abs(res1d_horizontal_ref.radial - res1d_horizontal.radial).max(), 0)
self.assertEqual(abs(res1d_horizontal_ref.intensity - res1d_horizontal.intensity).max(), 0)

def test_integrate1d_equivalences(self):
npt_ip = 200
npt_oop = 100
Expand Down

0 comments on commit 7646b1f

Please sign in to comment.