Representation of a Fiber Diffraction / Grazing Incidence pattern

As with fibers, during a grazing-incidence scattering experiments (GIWAXS, GISAXS) on a thin film, a fiber symmetry is usually considered

Inside a fiber, there is a vertical axis with specific crystalline planes while the radial axis are equivalent

The same way, for a thin film, it is common to split the q vector in a vertical component (along the thickness axis) and an in-plane component

[1]:
from pyFAI.calibrant import get_calibrant
from pyFAI.detectors import RayonixLx255, Pilatus1M
from pyFAI.integrator.azimuthal import AzimuthalIntegrator
from pyFAI.gui import jupyter
from pyFAI.test.utilstest import UtilsTest
from pyFAI.units import get_unit_fiber
import fabio
import numpy as np
from PIL import Image
from pyFAI import load
import matplotlib.pyplot as plt
import time
t0 = time.perf_counter()

In pyFAI:

x is the horizontal axis of the lab

y is the vertical axis of the lab

z is the beam propagation axis

[2]:
Image.open(UtilsTest.getimage("giwaxs.png"))
[2]:
../../_images/usage_tutorial_FiberGrazingIncidence_4_0.png

We simulate data with the calibrant LaB6

[3]:
cal = get_calibrant("LaB6")
det = Pilatus1M()
ai = AzimuthalIntegrator(detector=det, poni1=0.05, poni2=0.01, dist=0.1, wavelength=1e-10)
fake_data = cal.fake_calibration_image(ai=ai)
[4]:
jupyter.display(fake_data)
pass
../../_images/usage_tutorial_FiberGrazingIncidence_7_0.png

To represent the image as a function of in-plane and out-of-plane components of the q vector

[5]:
unit_qx = "qxgi_nm^-1"
unit_qy = "qygi_nm^-1"
unit_qz = "qzgi_nm^-1"
[6]:
qx = ai.array_from_unit(unit=unit_qx)
qy = ai.array_from_unit(unit=unit_qy)
qz = ai.array_from_unit(unit=unit_qz)
[7]:
fig, axes = jupyter.subplots(ncols=3, figsize=(10,5))
jupyter.display(img=qx, ax=axes[0], label="q-horizontal component")
jupyter.display(img=qy, ax=axes[1], label="q-vertical component")
jupyter.display(img=qz, ax=axes[2], label="q-beam component")
pass
../../_images/usage_tutorial_FiberGrazingIncidence_11_0.png
[8]:
unit_qip = "qip_nm^-1"
unit_qoop = "qoop_nm^-1"
qip = ai.array_from_unit(unit=unit_qip)
qoop = ai.array_from_unit(unit=unit_qoop)
[9]:
fig, axes = jupyter.subplots(ncols=2)
jupyter.display(img=qip, ax=axes[0], label="In-plane q")
jupyter.display(img=qoop, ax=axes[1], label="Out-of-plane q")
pass
../../_images/usage_tutorial_FiberGrazingIncidence_13_0.png

Then, GIWAXS and GISAXS patterns are represented as a function of qip and qoop

So, the horizontal component multiplied by the beam component yields the characteristic “missing wedge” of the pattern

[10]:
res2d = ai.integrate2d(fake_data, 1000,1000, unit=(unit_qip, unit_qoop), method=("no", "csr", "cython"))
jupyter.plot2d(res2d)
pass
../../_images/usage_tutorial_FiberGrazingIncidence_15_0.png

Note: it is important to disable pixel splitting in the regrouping method, otherwise, the gap is filled

[11]:
res2d = ai.integrate2d(fake_data, 1000,1000, unit=(unit_qip, unit_qoop), method=("bbox", "csr", "cython"))
jupyter.plot2d(res2d)
pass
WARNING:pyFAI.geometry.core:No fast path for space: qip
WARNING:pyFAI.geometry.core:No fast path for space: qoop
../../_images/usage_tutorial_FiberGrazingIncidence_17_1.png

For the fiber/grazing-incidence units, pyFAI handles a special class of units called FiberUnits

FiberUnits can be retrieved with pyFAI.units.get_unit_fiber and they accept three input attributes: incident_angle, tilt_angle and sample_orientation

[12]:
unit_qip = get_unit_fiber(name="qip_nm^-1", incident_angle=0.2, tilt_angle=0.4, sample_orientation=1)
unit_qoop = get_unit_fiber(name="qoop_nm^-1", incident_angle=0.2, tilt_angle=0.4, sample_orientation=1)
ai.reset()
[13]:
res2d = ai.integrate2d(fake_data, 1000,1000, unit=(unit_qip, unit_qoop), method=("no", "csr", "cython"))
jupyter.plot2d(res2d)
pass
../../_images/usage_tutorial_FiberGrazingIncidence_20_0.png

Now the patterns looks tilted due to tilt_angle and the available region in the reciprocal space has been shifted

The attribute sample_orientation takes into account the n*90 degrees difference between the fiber axis and the vertical axis of the detector

The differences are better spotted with an elongated detector

[14]:
det = RayonixLx255()
ai = AzimuthalIntegrator(detector=det, poni1=0.05, poni2=0.01, dist=0.1, wavelength=1e-10)
fake_data = cal.fake_calibration_image(ai=ai)
ai.reset()
[15]:
unit_qip.set_sample_orientation(1)
unit_qip.set_incident_angle(0.0)
unit_qip.set_tilt_angle(0.0)
unit_qoop.set_sample_orientation(1)
unit_qoop.set_incident_angle(0.0)
unit_qoop.set_tilt_angle(0.0)
ai.reset()

In this case, the incident angle goes with the short side of the detector

[16]:
res2d = ai.integrate2d(fake_data, 1000,1000, unit=(unit_qip, unit_qoop), method=("no", "csr", "cython"))
jupyter.plot2d(res2d)
pass
../../_images/usage_tutorial_FiberGrazingIncidence_27_0.png

Now, if we rotate the fiber axis 90 degrees, (sample_orientation=2)

[17]:
unit_qip.set_sample_orientation(2)
unit_qoop.set_sample_orientation(2)
ai.reset()
[18]:
res2d = ai.integrate2d(fake_data, 1000,1000, unit=(unit_qip, unit_qoop), method=("no", "csr", "cython"))
jupyter.plot2d(res2d)
pass
../../_images/usage_tutorial_FiberGrazingIncidence_30_0.png

Example with real GIWAXS data

[19]:
data = fabio.open(UtilsTest.getimage("pm6.edf")).data
ai = load(UtilsTest.getimage("lab6_pm6.poni"))

We are still using sample_orientation=2

[20]:
unit_qip.sample_orientation, unit_qoop.sample_orientation
[20]:
(2, 2)
[21]:
res2d = ai.integrate2d(data, 1000,1000, unit=(unit_qip, unit_qoop), method=("no", "csr", "cython"))
jupyter.plot2d(res2d)
pass
../../_images/usage_tutorial_FiberGrazingIncidence_35_0.png

Tuning the incident and tilt angles:

[22]:
INCIDENT_ANGLE = 0.2
TILT_ANGLE = -0.3
unit_qip.set_incident_angle(INCIDENT_ANGLE)
unit_qip.set_tilt_angle(TILT_ANGLE)
unit_qoop.set_incident_angle(INCIDENT_ANGLE)
unit_qoop.set_tilt_angle(TILT_ANGLE)
ai.reset()
[23]:
res2d = ai.integrate2d(data, 1000,1000, unit=(unit_qip, unit_qoop), method=("no", "csr", "cython"))
jupyter.plot2d(res2d)
pass
../../_images/usage_tutorial_FiberGrazingIncidence_38_0.png
Integration along a specific fiber unit

For analysis of fiber/grazing-incidence data, sometimes we need to slice the pattern along the q-oop axis, to get a set of Bragg peaks, this cannot be done using the standard cake integration

Let’s take a GIWAXS pattern collected after illuminating a crystallized semiconducting organic thin film

[40]:
data = fabio.open(UtilsTest.getimage("Y6.edf")).data
fi = load(UtilsTest.getimage("LaB6_3.poni"), type_='pyFAI.integrator.fiber.FiberIntegrator')
INCIDENT_ANGLE = 0.0
TILT_ANGLE = 0.0
unit_qip.set_incident_angle(INCIDENT_ANGLE)
unit_qip.set_tilt_angle(TILT_ANGLE)
unit_qoop.set_incident_angle(INCIDENT_ANGLE)
unit_qoop.set_tilt_angle(TILT_ANGLE)
fi.reset()
[41]:
fig, ax = jupyter.subplots()
res2d = fi.integrate2d(data, 1000,1000, unit=(unit_qip, unit_qoop), method=("no", "csr", "cython"))
jupyter.plot2d(res2d, ax=ax)
ax.set_ylim((0,20))
pass
../../_images/usage_tutorial_FiberGrazingIncidence_43_0.png
[42]:
cax = ax.get_children()[0]
cbar = fig.colorbar(cax)
cbar.norm.vmin = 10
cbar.norm.vmax = 1e3
ax.get_figure()
[42]:
../../_images/usage_tutorial_FiberGrazingIncidence_44_0.png

In this case, a cake integration is not accurate to capture, for example, the Bragg peaks rods at qIP=7 and 10 nm-1

Now, pyFAI allows to do this with the method pyFAI.AzimuthalIntegrator.integrate_fiber

[57]:
res_q7 = fi.integrate_fiber(data=data,
                            npt_oop=500,
                            unit_oop=unit_qoop,
                            oop_range=[0,20],
                            ip_range=[7,7.2],
                            npt_ip=100,
                            unit_ip=unit_qip,
                            vertical_integration = True,
                            )

res_q10 = fi.integrate_fiber(data=data,
                             npt_oop=500,
                             unit_oop=unit_qoop,
                             oop_range=[0,20],
                             ip_range=[10,10.5],
                             npt_ip=100,
                             unit_ip=unit_qip,
                             vertical_integration = True,
                             )
[58]:
fig, ax = jupyter.subplots()
jupyter.plot1d(res_q7, label="qIP=7", ax=ax)
jupyter.plot1d(res_q10, label="qIP=10", ax=ax)
pass
../../_images/usage_tutorial_FiberGrazingIncidence_47_0.png

To have a clear idea of what we are integrating here, we can visualize directly the matrix

[59]:
arr_qip = ai.array_from_unit(shape=data.shape, unit=unit_qip)
arr_qoop = fi.array_from_unit(shape=data.shape, unit=unit_qoop)
arr_qip_7 = np.logical_and(arr_qip > 7.0, arr_qip < 7.2)
arr_qoop_0_20 = np.logical_and(arr_qip > 0.0, arr_qip < 20.0)
data_masked = data * arr_qip_7 * arr_qoop_0_20
[60]:
fig, ax = plt.subplots()
ax.imshow(data_masked, vmin=0, vmax=100)
ax.imshow(data, alpha=0.4, vmin=0, vmax=500, cmap="grey")
pass
../../_images/usage_tutorial_FiberGrazingIncidence_50_0.png
[61]:
fig, ax = jupyter.subplots()
res2d = fi.integrate2d(data_masked, 1000,1000, unit=(unit_qip, unit_qoop), method=("no", "csr", "cython"))
jupyter.plot2d(res2d, ax=ax)
ax.set_ylim((0,20))
pass
../../_images/usage_tutorial_FiberGrazingIncidence_51_0.png
[62]:
cax = ax.get_children()[0]
cbar = fig.colorbar(cax)
cbar.norm.vmin = 10
cbar.norm.vmax = 1e3
ax.get_figure()
[62]:
../../_images/usage_tutorial_FiberGrazingIncidence_52_0.png

We are capturing a rectangular slice from the qip-qoop pattern, or a straight section of the Q-space in the sample frame

The integration is generic, we can even extract the slice along the Qoop axis

[63]:
res_q2p5 = fi.integrate_fiber(data=data,
                         output_unit=unit_qip,
                         npt_output=1000,
                         output_unit_range=[-18,18],
                         integrated_unit=unit_qoop,
                         integrated_unit_range=[2,2.5],
                         npt_integrated=100,
                        )
WARNING:pyFAI.DEPRECATION:<class 'int'> npt_output is deprecated since pyFAI version 2024.11/12. Use 'npt_oop, npt_ip, vertical_integration instead' instead.
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel_launcher.py", line 18, in <module>
    app.launch_new_instance()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/traitlets/config/application.py", line 1075, in launch_instance
    app.start()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelapp.py", line 739, in start
    self.io_loop.start()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/tornado/platform/asyncio.py", line 205, in start
    self.asyncio_loop.run_forever()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
    handle._run()
  File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 545, in dispatch_queue
    await self.process_one()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 534, in process_one
    await dispatch(*args)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 437, in dispatch_shell
    await result
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/ipkernel.py", line 362, in execute_request
    await super().execute_request(stream, ident, parent)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 778, in execute_request
    reply_content = await reply_content
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/ipkernel.py", line 449, in do_execute
    res = shell.run_cell(
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/zmqshell.py", line 549, in run_cell
    return super().run_cell(*args, **kwargs)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3075, in run_cell
    result = self._run_cell(
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3130, in _run_cell
    result = runner(coro)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/async_helpers.py", line 129, in _pseudo_sync_runner
    coro.send(None)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3334, in run_cell_async
    has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3517, in run_ast_nodes
    if await self.run_code(code, result, async_=asy):
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3577, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "/tmp/ipykernel_2758186/1827151855.py", line 1, in <module>
    res_q2p5 = fi.integrate_fiber(data=data,
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/pyFAI/integrator/fiber.py", line 177, in integrate_fiber
    deprecated_params = get_deprecated_params_1d(**kwargs)
WARNING:pyFAI.DEPRECATION:<class 'int'> npt_integrated is deprecated since pyFAI version 2024.11/12. Use 'npt_oop, npt_ip, vertical_integration instead' instead.
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel_launcher.py", line 18, in <module>
    app.launch_new_instance()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/traitlets/config/application.py", line 1075, in launch_instance
    app.start()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelapp.py", line 739, in start
    self.io_loop.start()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/tornado/platform/asyncio.py", line 205, in start
    self.asyncio_loop.run_forever()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
    handle._run()
  File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 545, in dispatch_queue
    await self.process_one()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 534, in process_one
    await dispatch(*args)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 437, in dispatch_shell
    await result
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/ipkernel.py", line 362, in execute_request
    await super().execute_request(stream, ident, parent)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 778, in execute_request
    reply_content = await reply_content
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/ipkernel.py", line 449, in do_execute
    res = shell.run_cell(
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/zmqshell.py", line 549, in run_cell
    return super().run_cell(*args, **kwargs)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3075, in run_cell
    result = self._run_cell(
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3130, in _run_cell
    result = runner(coro)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/async_helpers.py", line 129, in _pseudo_sync_runner
    coro.send(None)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3334, in run_cell_async
    has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3517, in run_ast_nodes
    if await self.run_code(code, result, async_=asy):
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3577, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "/tmp/ipykernel_2758186/1827151855.py", line 1, in <module>
    res_q2p5 = fi.integrate_fiber(data=data,
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/pyFAI/integrator/fiber.py", line 177, in integrate_fiber
    deprecated_params = get_deprecated_params_1d(**kwargs)
WARNING:pyFAI.DEPRECATION:<class 'pyFAI.units.UnitFiber'> output_unit is deprecated since pyFAI version 2024.11/12. Use 'unit_oop, unit_ip, vertical_integration instead' instead.
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel_launcher.py", line 18, in <module>
    app.launch_new_instance()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/traitlets/config/application.py", line 1075, in launch_instance
    app.start()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelapp.py", line 739, in start
    self.io_loop.start()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/tornado/platform/asyncio.py", line 205, in start
    self.asyncio_loop.run_forever()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
    handle._run()
  File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 545, in dispatch_queue
    await self.process_one()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 534, in process_one
    await dispatch(*args)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 437, in dispatch_shell
    await result
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/ipkernel.py", line 362, in execute_request
    await super().execute_request(stream, ident, parent)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 778, in execute_request
    reply_content = await reply_content
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/ipkernel.py", line 449, in do_execute
    res = shell.run_cell(
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/zmqshell.py", line 549, in run_cell
    return super().run_cell(*args, **kwargs)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3075, in run_cell
    result = self._run_cell(
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3130, in _run_cell
    result = runner(coro)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/async_helpers.py", line 129, in _pseudo_sync_runner
    coro.send(None)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3334, in run_cell_async
    has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3517, in run_ast_nodes
    if await self.run_code(code, result, async_=asy):
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3577, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "/tmp/ipykernel_2758186/1827151855.py", line 1, in <module>
    res_q2p5 = fi.integrate_fiber(data=data,
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/pyFAI/integrator/fiber.py", line 177, in integrate_fiber
    deprecated_params = get_deprecated_params_1d(**kwargs)
WARNING:pyFAI.DEPRECATION:<class 'pyFAI.units.UnitFiber'> integrated_unit is deprecated since pyFAI version 2024.11/12. Use 'unit_oop, unit_ip, vertical_integration instead' instead.
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel_launcher.py", line 18, in <module>
    app.launch_new_instance()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/traitlets/config/application.py", line 1075, in launch_instance
    app.start()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelapp.py", line 739, in start
    self.io_loop.start()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/tornado/platform/asyncio.py", line 205, in start
    self.asyncio_loop.run_forever()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
    handle._run()
  File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 545, in dispatch_queue
    await self.process_one()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 534, in process_one
    await dispatch(*args)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 437, in dispatch_shell
    await result
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/ipkernel.py", line 362, in execute_request
    await super().execute_request(stream, ident, parent)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 778, in execute_request
    reply_content = await reply_content
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/ipkernel.py", line 449, in do_execute
    res = shell.run_cell(
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/zmqshell.py", line 549, in run_cell
    return super().run_cell(*args, **kwargs)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3075, in run_cell
    result = self._run_cell(
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3130, in _run_cell
    result = runner(coro)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/async_helpers.py", line 129, in _pseudo_sync_runner
    coro.send(None)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3334, in run_cell_async
    has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3517, in run_ast_nodes
    if await self.run_code(code, result, async_=asy):
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3577, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "/tmp/ipykernel_2758186/1827151855.py", line 1, in <module>
    res_q2p5 = fi.integrate_fiber(data=data,
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/pyFAI/integrator/fiber.py", line 177, in integrate_fiber
    deprecated_params = get_deprecated_params_1d(**kwargs)
WARNING:pyFAI.DEPRECATION:<class 'list'> output_unit_range is deprecated since pyFAI version 2024.11/12. Use 'oop_range, ip_range, vertical_integration instead' instead.
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel_launcher.py", line 18, in <module>
    app.launch_new_instance()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/traitlets/config/application.py", line 1075, in launch_instance
    app.start()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelapp.py", line 739, in start
    self.io_loop.start()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/tornado/platform/asyncio.py", line 205, in start
    self.asyncio_loop.run_forever()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
    handle._run()
  File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 545, in dispatch_queue
    await self.process_one()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 534, in process_one
    await dispatch(*args)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 437, in dispatch_shell
    await result
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/ipkernel.py", line 362, in execute_request
    await super().execute_request(stream, ident, parent)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 778, in execute_request
    reply_content = await reply_content
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/ipkernel.py", line 449, in do_execute
    res = shell.run_cell(
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/zmqshell.py", line 549, in run_cell
    return super().run_cell(*args, **kwargs)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3075, in run_cell
    result = self._run_cell(
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3130, in _run_cell
    result = runner(coro)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/async_helpers.py", line 129, in _pseudo_sync_runner
    coro.send(None)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3334, in run_cell_async
    has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3517, in run_ast_nodes
    if await self.run_code(code, result, async_=asy):
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3577, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "/tmp/ipykernel_2758186/1827151855.py", line 1, in <module>
    res_q2p5 = fi.integrate_fiber(data=data,
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/pyFAI/integrator/fiber.py", line 177, in integrate_fiber
    deprecated_params = get_deprecated_params_1d(**kwargs)
WARNING:pyFAI.DEPRECATION:<class 'list'> integrated_unit_range is deprecated since pyFAI version 2024.11/12. Use 'oop_range, ip_range, vertical_integration instead' instead.
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel_launcher.py", line 18, in <module>
    app.launch_new_instance()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/traitlets/config/application.py", line 1075, in launch_instance
    app.start()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelapp.py", line 739, in start
    self.io_loop.start()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/tornado/platform/asyncio.py", line 205, in start
    self.asyncio_loop.run_forever()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
    handle._run()
  File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 545, in dispatch_queue
    await self.process_one()
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 534, in process_one
    await dispatch(*args)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 437, in dispatch_shell
    await result
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/ipkernel.py", line 362, in execute_request
    await super().execute_request(stream, ident, parent)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 778, in execute_request
    reply_content = await reply_content
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/ipkernel.py", line 449, in do_execute
    res = shell.run_cell(
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/ipykernel/zmqshell.py", line 549, in run_cell
    return super().run_cell(*args, **kwargs)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3075, in run_cell
    result = self._run_cell(
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3130, in _run_cell
    result = runner(coro)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/async_helpers.py", line 129, in _pseudo_sync_runner
    coro.send(None)
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3334, in run_cell_async
    has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3517, in run_ast_nodes
    if await self.run_code(code, result, async_=asy):
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3577, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "/tmp/ipykernel_2758186/1827151855.py", line 1, in <module>
    res_q2p5 = fi.integrate_fiber(data=data,
  File "/nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/pyFAI/integrator/fiber.py", line 177, in integrate_fiber
    deprecated_params = get_deprecated_params_1d(**kwargs)
[64]:
fig, ax = jupyter.subplots()
jupyter.plot1d(res_q2p5, label="qOOP=2.5", ax=ax)
pass
../../_images/usage_tutorial_FiberGrazingIncidence_56_0.png
[65]:
arr_qoop_2p5 = np.logical_and(arr_qoop > 2.0, arr_qoop < 2.5)
arr_qip_m18_18 = np.logical_and(arr_qip > -18.0, arr_qip < 18.0)
data_masked_2 = data * arr_qip_m18_18 * arr_qoop_2p5

fig, ax = plt.subplots()
ax.imshow(data_masked_2, vmin=0, vmax=100)
ax.imshow(data, alpha=0.4, vmin=0, vmax=500, cmap="grey")
pass
../../_images/usage_tutorial_FiberGrazingIncidence_57_0.png

Finally, the method pyFAI.AzimuthalIntegrator.integrate_grazing_incidence allows to call the units directly with the incident_angles, tilt_angles and sample_orientation

This way, we don’t have to care about instantiating the UnitFiber and then changing the attributes

[67]:
res_1 = fi.integrate2d_grazing_incidence(data=data,
                                         incident_angle=0.0,
                                         tilt_angle=0.0,
                                         sample_orientation=2,
                                         output_unit="qoop_nm^-1",
                                         npt_output=500,
                                         output_unit_range=[0,20],
                                         integrated_unit="qip_nm^-1",
                                         integrated_unit_range=[-2.5,2.5],
                                         npt_integrated=100,
                                         )

res_2 = fi.integrate2d_grazing_incidence(data=data,
                                         incident_angle=np.deg2rad(0.2),
                                         tilt_angle=0.0,
                                         sample_orientation=2,
                                         output_unit="qoop_nm^-1",
                                         npt_output=500,
                                         output_unit_range=[0,20],
                                         integrated_unit="qip_nm^-1",
                                         integrated_unit_range=[-2.5,2.5],
                                         npt_integrated=100,
                                         )

res_3 = fi.integrate2d_grazing_incidence(data=data,
                                         incident_angle=np.deg2rad(0.2),
                                         tilt_angle=np.deg2rad(45),
                                         sample_orientation=2,
                                         output_unit="qoop_nm^-1",
                                         npt_output=500,
                                         output_unit_range=[0,20],
                                         integrated_unit="qip_nm^-1",
                                         integrated_unit_range=[-2.5,2.5],
                                         npt_integrated=100,
                                         )
[68]:
fig, ax = jupyter.subplots()
jupyter.plot1d(res_1, label="incident_angle=0.0", ax=ax)
jupyter.plot1d(res_2, label="incident_angle=0.2º", ax=ax)
jupyter.plot1d(res_3, label="tilt_angle=45º", ax=ax)
pass
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[68], line 2
      1 fig, ax = jupyter.subplots()
----> 2 jupyter.plot1d(res_1, label="incident_angle=0.0", ax=ax)
      3 jupyter.plot1d(res_2, label="incident_angle=0.2º", ax=ax)
      4 jupyter.plot1d(res_3, label="tilt_angle=45º", ax=ax)

File /nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/pyFAI/gui/jupyter/_plot.py:112, in plot1d(result, calibrant, label, ax)
    110     unit = None
    111 if len(result) == 3:
--> 112     ax.errorbar(*result, label=label)
    113 else:
    114     ax.plot(*result, label=label)

File /nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/matplotlib/_api/deprecation.py:453, in make_keyword_only.<locals>.wrapper(*args, **kwargs)
    447 if len(args) > name_idx:
    448     warn_deprecated(
    449         since, message="Passing the %(name)s %(obj_type)s "
    450         "positionally is deprecated since Matplotlib %(since)s; the "
    451         "parameter will become keyword-only in %(removal)s.",
    452         name=name, obj_type=f"parameter of {func.__name__}()")
--> 453 return func(*args, **kwargs)

File /nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/matplotlib/__init__.py:1521, in _preprocess_data.<locals>.inner(ax, data, *args, **kwargs)
   1518 @functools.wraps(func)
   1519 def inner(ax, *args, data=None, **kwargs):
   1520     if data is None:
-> 1521         return func(
   1522             ax,
   1523             *map(cbook.sanitize_sequence, args),
   1524             **{k: cbook.sanitize_sequence(v) for k, v in kwargs.items()})
   1526     bound = new_sig.bind(ax, *args, **kwargs)
   1527     auto_label = (bound.arguments.get(label_namer)
   1528                   or bound.kwargs.get(label_namer))

File /nobackup/scratch/kieffer/py310/lib/python3.10/site-packages/matplotlib/axes/_axes.py:3698, in Axes.errorbar(self, x, y, yerr, xerr, fmt, ecolor, elinewidth, capsize, barsabove, lolims, uplims, xlolims, xuplims, errorevery, capthick, **kwargs)
   3692 kwargs['label'] = '_nolegend_'
   3694 # Create the main line and determine overall kwargs for child artists.
   3695 # We avoid calling self.plot() directly, or self._get_lines(), because
   3696 # that would call self._process_unit_info again, and do other indirect
   3697 # data processing.
-> 3698 (data_line, base_style), = self._get_lines._plot_args(
   3699     self, (x, y) if fmt == '' else (x, y, fmt), kwargs, return_kwargs=True)
   3701 # Do this after creating `data_line` to avoid modifying `base_style`.
   3702 if barsabove:

ValueError: too many values to unpack (expected 1)
../../_images/usage_tutorial_FiberGrazingIncidence_61_1.png
[69]:
res_1
[69]:
(array([[0., 0., 0., ..., 0., 0., 0.],
        [0., 0., 0., ..., 0., 0., 0.],
        [0., 0., 0., ..., 0., 0., 0.],
        ...,
        [0., 0., 0., ..., 0., 0., 0.],
        [0., 0., 0., ..., 0., 0., 0.],
        [0., 0., 0., ..., 0., 0., 0.]], shape=(1000, 1000), dtype=float32),
 array([-2.30788619e+01, -2.30365106e+01, -2.29941592e+01, -2.29518079e+01,
        -2.29094566e+01, -2.28671052e+01, -2.28247539e+01, -2.27824026e+01,
        -2.27400512e+01, -2.26976999e+01, -2.26553485e+01, -2.26129972e+01,
        -2.25706459e+01, -2.25282945e+01, -2.24859432e+01, -2.24435918e+01,
        -2.24012405e+01, -2.23588892e+01, -2.23165378e+01, -2.22741865e+01,
        -2.22318351e+01, -2.21894838e+01, -2.21471325e+01, -2.21047811e+01,
        -2.20624298e+01, -2.20200784e+01, -2.19777271e+01, -2.19353758e+01,
        -2.18930244e+01, -2.18506731e+01, -2.18083217e+01, -2.17659704e+01,
        -2.17236191e+01, -2.16812677e+01, -2.16389164e+01, -2.15965650e+01,
        -2.15542137e+01, -2.15118624e+01, -2.14695110e+01, -2.14271597e+01,
        -2.13848084e+01, -2.13424570e+01, -2.13001057e+01, -2.12577543e+01,
        -2.12154030e+01, -2.11730517e+01, -2.11307003e+01, -2.10883490e+01,
        -2.10459976e+01, -2.10036463e+01, -2.09612950e+01, -2.09189436e+01,
        -2.08765923e+01, -2.08342409e+01, -2.07918896e+01, -2.07495383e+01,
        -2.07071869e+01, -2.06648356e+01, -2.06224842e+01, -2.05801329e+01,
        -2.05377816e+01, -2.04954302e+01, -2.04530789e+01, -2.04107275e+01,
        -2.03683762e+01, -2.03260249e+01, -2.02836735e+01, -2.02413222e+01,
        -2.01989708e+01, -2.01566195e+01, -2.01142682e+01, -2.00719168e+01,
        -2.00295655e+01, -1.99872142e+01, -1.99448628e+01, -1.99025115e+01,
        -1.98601601e+01, -1.98178088e+01, -1.97754575e+01, -1.97331061e+01,
        -1.96907548e+01, -1.96484034e+01, -1.96060521e+01, -1.95637008e+01,
        -1.95213494e+01, -1.94789981e+01, -1.94366467e+01, -1.93942954e+01,
        -1.93519441e+01, -1.93095927e+01, -1.92672414e+01, -1.92248900e+01,
        -1.91825387e+01, -1.91401874e+01, -1.90978360e+01, -1.90554847e+01,
        -1.90131333e+01, -1.89707820e+01, -1.89284307e+01, -1.88860793e+01,
        -1.88437280e+01, -1.88013767e+01, -1.87590253e+01, -1.87166740e+01,
        -1.86743226e+01, -1.86319713e+01, -1.85896200e+01, -1.85472686e+01,
        -1.85049173e+01, -1.84625659e+01, -1.84202146e+01, -1.83778633e+01,
        -1.83355119e+01, -1.82931606e+01, -1.82508092e+01, -1.82084579e+01,
        -1.81661066e+01, -1.81237552e+01, -1.80814039e+01, -1.80390525e+01,
        -1.79967012e+01, -1.79543499e+01, -1.79119985e+01, -1.78696472e+01,
        -1.78272958e+01, -1.77849445e+01, -1.77425932e+01, -1.77002418e+01,
        -1.76578905e+01, -1.76155391e+01, -1.75731878e+01, -1.75308365e+01,
        -1.74884851e+01, -1.74461338e+01, -1.74037825e+01, -1.73614311e+01,
        -1.73190798e+01, -1.72767284e+01, -1.72343771e+01, -1.71920258e+01,
        -1.71496744e+01, -1.71073231e+01, -1.70649717e+01, -1.70226204e+01,
        -1.69802691e+01, -1.69379177e+01, -1.68955664e+01, -1.68532150e+01,
        -1.68108637e+01, -1.67685124e+01, -1.67261610e+01, -1.66838097e+01,
        -1.66414583e+01, -1.65991070e+01, -1.65567557e+01, -1.65144043e+01,
        -1.64720530e+01, -1.64297016e+01, -1.63873503e+01, -1.63449990e+01,
        -1.63026476e+01, -1.62602963e+01, -1.62179449e+01, -1.61755936e+01,
        -1.61332423e+01, -1.60908909e+01, -1.60485396e+01, -1.60061883e+01,
        -1.59638369e+01, -1.59214856e+01, -1.58791342e+01, -1.58367829e+01,
        -1.57944316e+01, -1.57520802e+01, -1.57097289e+01, -1.56673775e+01,
        -1.56250262e+01, -1.55826749e+01, -1.55403235e+01, -1.54979722e+01,
        -1.54556208e+01, -1.54132695e+01, -1.53709182e+01, -1.53285668e+01,
        -1.52862155e+01, -1.52438641e+01, -1.52015128e+01, -1.51591615e+01,
        -1.51168101e+01, -1.50744588e+01, -1.50321074e+01, -1.49897561e+01,
        -1.49474048e+01, -1.49050534e+01, -1.48627021e+01, -1.48203507e+01,
        -1.47779994e+01, -1.47356481e+01, -1.46932967e+01, -1.46509454e+01,
        -1.46085941e+01, -1.45662427e+01, -1.45238914e+01, -1.44815400e+01,
        -1.44391887e+01, -1.43968374e+01, -1.43544860e+01, -1.43121347e+01,
        -1.42697833e+01, -1.42274320e+01, -1.41850807e+01, -1.41427293e+01,
        -1.41003780e+01, -1.40580266e+01, -1.40156753e+01, -1.39733240e+01,
        -1.39309726e+01, -1.38886213e+01, -1.38462699e+01, -1.38039186e+01,
        -1.37615673e+01, -1.37192159e+01, -1.36768646e+01, -1.36345132e+01,
        -1.35921619e+01, -1.35498106e+01, -1.35074592e+01, -1.34651079e+01,
        -1.34227565e+01, -1.33804052e+01, -1.33380539e+01, -1.32957025e+01,
        -1.32533512e+01, -1.32109999e+01, -1.31686485e+01, -1.31262972e+01,
        -1.30839458e+01, -1.30415945e+01, -1.29992432e+01, -1.29568918e+01,
        -1.29145405e+01, -1.28721891e+01, -1.28298378e+01, -1.27874865e+01,
        -1.27451351e+01, -1.27027838e+01, -1.26604324e+01, -1.26180811e+01,
        -1.25757298e+01, -1.25333784e+01, -1.24910271e+01, -1.24486757e+01,
        -1.24063244e+01, -1.23639731e+01, -1.23216217e+01, -1.22792704e+01,
        -1.22369190e+01, -1.21945677e+01, -1.21522164e+01, -1.21098650e+01,
        -1.20675137e+01, -1.20251623e+01, -1.19828110e+01, -1.19404597e+01,
        -1.18981083e+01, -1.18557570e+01, -1.18134057e+01, -1.17710543e+01,
        -1.17287030e+01, -1.16863516e+01, -1.16440003e+01, -1.16016490e+01,
        -1.15592976e+01, -1.15169463e+01, -1.14745949e+01, -1.14322436e+01,
        -1.13898923e+01, -1.13475409e+01, -1.13051896e+01, -1.12628382e+01,
        -1.12204869e+01, -1.11781356e+01, -1.11357842e+01, -1.10934329e+01,
        -1.10510815e+01, -1.10087302e+01, -1.09663789e+01, -1.09240275e+01,
        -1.08816762e+01, -1.08393248e+01, -1.07969735e+01, -1.07546222e+01,
        -1.07122708e+01, -1.06699195e+01, -1.06275682e+01, -1.05852168e+01,
        -1.05428655e+01, -1.05005141e+01, -1.04581628e+01, -1.04158115e+01,
        -1.03734601e+01, -1.03311088e+01, -1.02887574e+01, -1.02464061e+01,
        -1.02040548e+01, -1.01617034e+01, -1.01193521e+01, -1.00770007e+01,
        -1.00346494e+01, -9.99229806e+00, -9.94994672e+00, -9.90759538e+00,
        -9.86524404e+00, -9.82289270e+00, -9.78054136e+00, -9.73819002e+00,
        -9.69583868e+00, -9.65348734e+00, -9.61113601e+00, -9.56878467e+00,
        -9.52643333e+00, -9.48408199e+00, -9.44173065e+00, -9.39937931e+00,
        -9.35702797e+00, -9.31467663e+00, -9.27232529e+00, -9.22997395e+00,
        -9.18762261e+00, -9.14527127e+00, -9.10291993e+00, -9.06056859e+00,
        -9.01821725e+00, -8.97586591e+00, -8.93351458e+00, -8.89116324e+00,
        -8.84881190e+00, -8.80646056e+00, -8.76410922e+00, -8.72175788e+00,
        -8.67940654e+00, -8.63705520e+00, -8.59470386e+00, -8.55235252e+00,
        -8.51000118e+00, -8.46764984e+00, -8.42529850e+00, -8.38294716e+00,
        -8.34059582e+00, -8.29824448e+00, -8.25589315e+00, -8.21354181e+00,
        -8.17119047e+00, -8.12883913e+00, -8.08648779e+00, -8.04413645e+00,
        -8.00178511e+00, -7.95943377e+00, -7.91708243e+00, -7.87473109e+00,
        -7.83237975e+00, -7.79002841e+00, -7.74767707e+00, -7.70532573e+00,
        -7.66297439e+00, -7.62062305e+00, -7.57827172e+00, -7.53592038e+00,
        -7.49356904e+00, -7.45121770e+00, -7.40886636e+00, -7.36651502e+00,
        -7.32416368e+00, -7.28181234e+00, -7.23946100e+00, -7.19710966e+00,
        -7.15475832e+00, -7.11240698e+00, -7.07005564e+00, -7.02770430e+00,
        -6.98535296e+00, -6.94300162e+00, -6.90065029e+00, -6.85829895e+00,
        -6.81594761e+00, -6.77359627e+00, -6.73124493e+00, -6.68889359e+00,
        -6.64654225e+00, -6.60419091e+00, -6.56183957e+00, -6.51948823e+00,
        -6.47713689e+00, -6.43478555e+00, -6.39243421e+00, -6.35008287e+00,
        -6.30773153e+00, -6.26538019e+00, -6.22302886e+00, -6.18067752e+00,
        -6.13832618e+00, -6.09597484e+00, -6.05362350e+00, -6.01127216e+00,
        -5.96892082e+00, -5.92656948e+00, -5.88421814e+00, -5.84186680e+00,
        -5.79951546e+00, -5.75716412e+00, -5.71481278e+00, -5.67246144e+00,
        -5.63011010e+00, -5.58775876e+00, -5.54540743e+00, -5.50305609e+00,
        -5.46070475e+00, -5.41835341e+00, -5.37600207e+00, -5.33365073e+00,
        -5.29129939e+00, -5.24894805e+00, -5.20659671e+00, -5.16424537e+00,
        -5.12189403e+00, -5.07954269e+00, -5.03719135e+00, -4.99484001e+00,
        -4.95248867e+00, -4.91013733e+00, -4.86778600e+00, -4.82543466e+00,
        -4.78308332e+00, -4.74073198e+00, -4.69838064e+00, -4.65602930e+00,
        -4.61367796e+00, -4.57132662e+00, -4.52897528e+00, -4.48662394e+00,
        -4.44427260e+00, -4.40192126e+00, -4.35956992e+00, -4.31721858e+00,
        -4.27486724e+00, -4.23251590e+00, -4.19016457e+00, -4.14781323e+00,
        -4.10546189e+00, -4.06311055e+00, -4.02075921e+00, -3.97840787e+00,
        -3.93605653e+00, -3.89370519e+00, -3.85135385e+00, -3.80900251e+00,
        -3.76665117e+00, -3.72429983e+00, -3.68194849e+00, -3.63959715e+00,
        -3.59724581e+00, -3.55489447e+00, -3.51254314e+00, -3.47019180e+00,
        -3.42784046e+00, -3.38548912e+00, -3.34313778e+00, -3.30078644e+00,
        -3.25843510e+00, -3.21608376e+00, -3.17373242e+00, -3.13138108e+00,
        -3.08902974e+00, -3.04667840e+00, -3.00432706e+00, -2.96197572e+00,
        -2.91962438e+00, -2.87727304e+00, -2.83492171e+00, -2.79257037e+00,
        -2.75021903e+00, -2.70786769e+00, -2.66551635e+00, -2.62316501e+00,
        -2.58081367e+00, -2.53846233e+00, -2.49611099e+00, -2.45375965e+00,
        -2.41140831e+00, -2.36905697e+00, -2.32670563e+00, -2.28435429e+00,
        -2.24200295e+00, -2.19965161e+00, -2.15730028e+00, -2.11494894e+00,
        -2.07259760e+00, -2.03024626e+00, -1.98789492e+00, -1.94554358e+00,
        -1.90319224e+00, -1.86084090e+00, -1.81848956e+00, -1.77613822e+00,
        -1.73378688e+00, -1.69143554e+00, -1.64908420e+00, -1.60673286e+00,
        -1.56438152e+00, -1.52203018e+00, -1.47967884e+00, -1.43732751e+00,
        -1.39497617e+00, -1.35262483e+00, -1.31027349e+00, -1.26792215e+00,
        -1.22557081e+00, -1.18321947e+00, -1.14086813e+00, -1.09851679e+00,
        -1.05616545e+00, -1.01381411e+00, -9.71462772e-01, -9.29111433e-01,
        -8.86760094e-01, -8.44408754e-01, -8.02057415e-01, -7.59706076e-01,
        -7.17354736e-01, -6.75003397e-01, -6.32652057e-01, -5.90300718e-01,
        -5.47949379e-01, -5.05598039e-01, -4.63246700e-01, -4.20895361e-01,
        -3.78544021e-01, -3.36192682e-01, -2.93841342e-01, -2.51490003e-01,
        -2.09138664e-01, -1.66787324e-01, -1.24435985e-01, -8.20846455e-02,
        -3.97333062e-02,  2.61803323e-03,  4.49693726e-02,  8.73207120e-02,
         1.29672051e-01,  1.72023391e-01,  2.14374730e-01,  2.56726069e-01,
         2.99077409e-01,  3.41428748e-01,  3.83780088e-01,  4.26131427e-01,
         4.68482766e-01,  5.10834106e-01,  5.53185445e-01,  5.95536785e-01,
         6.37888124e-01,  6.80239463e-01,  7.22590803e-01,  7.64942142e-01,
         8.07293481e-01,  8.49644821e-01,  8.91996160e-01,  9.34347500e-01,
         9.76698839e-01,  1.01905018e+00,  1.06140152e+00,  1.10375286e+00,
         1.14610420e+00,  1.18845554e+00,  1.23080688e+00,  1.27315821e+00,
         1.31550955e+00,  1.35786089e+00,  1.40021223e+00,  1.44256357e+00,
         1.48491491e+00,  1.52726625e+00,  1.56961759e+00,  1.61196893e+00,
         1.65432027e+00,  1.69667161e+00,  1.73902295e+00,  1.78137429e+00,
         1.82372563e+00,  1.86607697e+00,  1.90842831e+00,  1.95077964e+00,
         1.99313098e+00,  2.03548232e+00,  2.07783366e+00,  2.12018500e+00,
         2.16253634e+00,  2.20488768e+00,  2.24723902e+00,  2.28959036e+00,
         2.33194170e+00,  2.37429304e+00,  2.41664438e+00,  2.45899572e+00,
         2.50134706e+00,  2.54369840e+00,  2.58604974e+00,  2.62840107e+00,
         2.67075241e+00,  2.71310375e+00,  2.75545509e+00,  2.79780643e+00,
         2.84015777e+00,  2.88250911e+00,  2.92486045e+00,  2.96721179e+00,
         3.00956313e+00,  3.05191447e+00,  3.09426581e+00,  3.13661715e+00,
         3.17896849e+00,  3.22131983e+00,  3.26367117e+00,  3.30602250e+00,
         3.34837384e+00,  3.39072518e+00,  3.43307652e+00,  3.47542786e+00,
         3.51777920e+00,  3.56013054e+00,  3.60248188e+00,  3.64483322e+00,
         3.68718456e+00,  3.72953590e+00,  3.77188724e+00,  3.81423858e+00,
         3.85658992e+00,  3.89894126e+00,  3.94129260e+00,  3.98364393e+00,
         4.02599527e+00,  4.06834661e+00,  4.11069795e+00,  4.15304929e+00,
         4.19540063e+00,  4.23775197e+00,  4.28010331e+00,  4.32245465e+00,
         4.36480599e+00,  4.40715733e+00,  4.44950867e+00,  4.49186001e+00,
         4.53421135e+00,  4.57656269e+00,  4.61891403e+00,  4.66126536e+00,
         4.70361670e+00,  4.74596804e+00,  4.78831938e+00,  4.83067072e+00,
         4.87302206e+00,  4.91537340e+00,  4.95772474e+00,  5.00007608e+00,
         5.04242742e+00,  5.08477876e+00,  5.12713010e+00,  5.16948144e+00,
         5.21183278e+00,  5.25418412e+00,  5.29653546e+00,  5.33888679e+00,
         5.38123813e+00,  5.42358947e+00,  5.46594081e+00,  5.50829215e+00,
         5.55064349e+00,  5.59299483e+00,  5.63534617e+00,  5.67769751e+00,
         5.72004885e+00,  5.76240019e+00,  5.80475153e+00,  5.84710287e+00,
         5.88945421e+00,  5.93180555e+00,  5.97415689e+00,  6.01650822e+00,
         6.05885956e+00,  6.10121090e+00,  6.14356224e+00,  6.18591358e+00,
         6.22826492e+00,  6.27061626e+00,  6.31296760e+00,  6.35531894e+00,
         6.39767028e+00,  6.44002162e+00,  6.48237296e+00,  6.52472430e+00,
         6.56707564e+00,  6.60942698e+00,  6.65177832e+00,  6.69412965e+00,
         6.73648099e+00,  6.77883233e+00,  6.82118367e+00,  6.86353501e+00,
         6.90588635e+00,  6.94823769e+00,  6.99058903e+00,  7.03294037e+00,
         7.07529171e+00,  7.11764305e+00,  7.15999439e+00,  7.20234573e+00,
         7.24469707e+00,  7.28704841e+00,  7.32939975e+00,  7.37175108e+00,
         7.41410242e+00,  7.45645376e+00,  7.49880510e+00,  7.54115644e+00,
         7.58350778e+00,  7.62585912e+00,  7.66821046e+00,  7.71056180e+00,
         7.75291314e+00,  7.79526448e+00,  7.83761582e+00,  7.87996716e+00,
         7.92231850e+00,  7.96466984e+00,  8.00702118e+00,  8.04937251e+00,
         8.09172385e+00,  8.13407519e+00,  8.17642653e+00,  8.21877787e+00,
         8.26112921e+00,  8.30348055e+00,  8.34583189e+00,  8.38818323e+00,
         8.43053457e+00,  8.47288591e+00,  8.51523725e+00,  8.55758859e+00,
         8.59993993e+00,  8.64229127e+00,  8.68464261e+00,  8.72699394e+00,
         8.76934528e+00,  8.81169662e+00,  8.85404796e+00,  8.89639930e+00,
         8.93875064e+00,  8.98110198e+00,  9.02345332e+00,  9.06580466e+00,
         9.10815600e+00,  9.15050734e+00,  9.19285868e+00,  9.23521002e+00,
         9.27756136e+00,  9.31991270e+00,  9.36226404e+00,  9.40461537e+00,
         9.44696671e+00,  9.48931805e+00,  9.53166939e+00,  9.57402073e+00,
         9.61637207e+00,  9.65872341e+00,  9.70107475e+00,  9.74342609e+00,
         9.78577743e+00,  9.82812877e+00,  9.87048011e+00,  9.91283145e+00,
         9.95518279e+00,  9.99753413e+00,  1.00398855e+01,  1.00822368e+01,
         1.01245881e+01,  1.01669395e+01,  1.02092908e+01,  1.02516422e+01,
         1.02939935e+01,  1.03363448e+01,  1.03786962e+01,  1.04210475e+01,
         1.04633989e+01,  1.05057502e+01,  1.05481015e+01,  1.05904529e+01,
         1.06328042e+01,  1.06751556e+01,  1.07175069e+01,  1.07598582e+01,
         1.08022096e+01,  1.08445609e+01,  1.08869123e+01,  1.09292636e+01,
         1.09716149e+01,  1.10139663e+01,  1.10563176e+01,  1.10986690e+01,
         1.11410203e+01,  1.11833716e+01,  1.12257230e+01,  1.12680743e+01,
         1.13104256e+01,  1.13527770e+01,  1.13951283e+01,  1.14374797e+01,
         1.14798310e+01,  1.15221823e+01,  1.15645337e+01,  1.16068850e+01,
         1.16492364e+01,  1.16915877e+01,  1.17339390e+01,  1.17762904e+01,
         1.18186417e+01,  1.18609931e+01,  1.19033444e+01,  1.19456957e+01,
         1.19880471e+01,  1.20303984e+01,  1.20727498e+01,  1.21151011e+01,
         1.21574524e+01,  1.21998038e+01,  1.22421551e+01,  1.22845065e+01,
         1.23268578e+01,  1.23692091e+01,  1.24115605e+01,  1.24539118e+01,
         1.24962631e+01,  1.25386145e+01,  1.25809658e+01,  1.26233172e+01,
         1.26656685e+01,  1.27080198e+01,  1.27503712e+01,  1.27927225e+01,
         1.28350739e+01,  1.28774252e+01,  1.29197765e+01,  1.29621279e+01,
         1.30044792e+01,  1.30468306e+01,  1.30891819e+01,  1.31315332e+01,
         1.31738846e+01,  1.32162359e+01,  1.32585873e+01,  1.33009386e+01,
         1.33432899e+01,  1.33856413e+01,  1.34279926e+01,  1.34703440e+01,
         1.35126953e+01,  1.35550466e+01,  1.35973980e+01,  1.36397493e+01,
         1.36821007e+01,  1.37244520e+01,  1.37668033e+01,  1.38091547e+01,
         1.38515060e+01,  1.38938573e+01,  1.39362087e+01,  1.39785600e+01,
         1.40209114e+01,  1.40632627e+01,  1.41056140e+01,  1.41479654e+01,
         1.41903167e+01,  1.42326681e+01,  1.42750194e+01,  1.43173707e+01,
         1.43597221e+01,  1.44020734e+01,  1.44444248e+01,  1.44867761e+01,
         1.45291274e+01,  1.45714788e+01,  1.46138301e+01,  1.46561815e+01,
         1.46985328e+01,  1.47408841e+01,  1.47832355e+01,  1.48255868e+01,
         1.48679382e+01,  1.49102895e+01,  1.49526408e+01,  1.49949922e+01,
         1.50373435e+01,  1.50796949e+01,  1.51220462e+01,  1.51643975e+01,
         1.52067489e+01,  1.52491002e+01,  1.52914515e+01,  1.53338029e+01,
         1.53761542e+01,  1.54185056e+01,  1.54608569e+01,  1.55032082e+01,
         1.55455596e+01,  1.55879109e+01,  1.56302623e+01,  1.56726136e+01,
         1.57149649e+01,  1.57573163e+01,  1.57996676e+01,  1.58420190e+01,
         1.58843703e+01,  1.59267216e+01,  1.59690730e+01,  1.60114243e+01,
         1.60537757e+01,  1.60961270e+01,  1.61384783e+01,  1.61808297e+01,
         1.62231810e+01,  1.62655324e+01,  1.63078837e+01,  1.63502350e+01,
         1.63925864e+01,  1.64349377e+01,  1.64772891e+01,  1.65196404e+01,
         1.65619917e+01,  1.66043431e+01,  1.66466944e+01,  1.66890457e+01,
         1.67313971e+01,  1.67737484e+01,  1.68160998e+01,  1.68584511e+01,
         1.69008024e+01,  1.69431538e+01,  1.69855051e+01,  1.70278565e+01,
         1.70702078e+01,  1.71125591e+01,  1.71549105e+01,  1.71972618e+01,
         1.72396132e+01,  1.72819645e+01,  1.73243158e+01,  1.73666672e+01,
         1.74090185e+01,  1.74513699e+01,  1.74937212e+01,  1.75360725e+01,
         1.75784239e+01,  1.76207752e+01,  1.76631266e+01,  1.77054779e+01,
         1.77478292e+01,  1.77901806e+01,  1.78325319e+01,  1.78748833e+01,
         1.79172346e+01,  1.79595859e+01,  1.80019373e+01,  1.80442886e+01,
         1.80866399e+01,  1.81289913e+01,  1.81713426e+01,  1.82136940e+01,
         1.82560453e+01,  1.82983966e+01,  1.83407480e+01,  1.83830993e+01,
         1.84254507e+01,  1.84678020e+01,  1.85101533e+01,  1.85525047e+01,
         1.85948560e+01,  1.86372074e+01,  1.86795587e+01,  1.87219100e+01,
         1.87642614e+01,  1.88066127e+01,  1.88489641e+01,  1.88913154e+01,
         1.89336667e+01,  1.89760181e+01,  1.90183694e+01,  1.90607208e+01,
         1.91030721e+01,  1.91454234e+01,  1.91877748e+01,  1.92301261e+01]),
 array([-1.87994009e+01, -1.87576457e+01, -1.87158905e+01, -1.86741353e+01,
        -1.86323800e+01, -1.85906248e+01, -1.85488696e+01, -1.85071144e+01,
        -1.84653592e+01, -1.84236039e+01, -1.83818487e+01, -1.83400935e+01,
        -1.82983383e+01, -1.82565830e+01, -1.82148278e+01, -1.81730726e+01,
        -1.81313174e+01, -1.80895622e+01, -1.80478069e+01, -1.80060517e+01,
        -1.79642965e+01, -1.79225413e+01, -1.78807861e+01, -1.78390308e+01,
        -1.77972756e+01, -1.77555204e+01, -1.77137652e+01, -1.76720099e+01,
        -1.76302547e+01, -1.75884995e+01, -1.75467443e+01, -1.75049891e+01,
        -1.74632338e+01, -1.74214786e+01, -1.73797234e+01, -1.73379682e+01,
        -1.72962129e+01, -1.72544577e+01, -1.72127025e+01, -1.71709473e+01,
        -1.71291921e+01, -1.70874368e+01, -1.70456816e+01, -1.70039264e+01,
        -1.69621712e+01, -1.69204160e+01, -1.68786607e+01, -1.68369055e+01,
        -1.67951503e+01, -1.67533951e+01, -1.67116398e+01, -1.66698846e+01,
        -1.66281294e+01, -1.65863742e+01, -1.65446190e+01, -1.65028637e+01,
        -1.64611085e+01, -1.64193533e+01, -1.63775981e+01, -1.63358428e+01,
        -1.62940876e+01, -1.62523324e+01, -1.62105772e+01, -1.61688220e+01,
        -1.61270667e+01, -1.60853115e+01, -1.60435563e+01, -1.60018011e+01,
        -1.59600459e+01, -1.59182906e+01, -1.58765354e+01, -1.58347802e+01,
        -1.57930250e+01, -1.57512697e+01, -1.57095145e+01, -1.56677593e+01,
        -1.56260041e+01, -1.55842489e+01, -1.55424936e+01, -1.55007384e+01,
        -1.54589832e+01, -1.54172280e+01, -1.53754728e+01, -1.53337175e+01,
        -1.52919623e+01, -1.52502071e+01, -1.52084519e+01, -1.51666966e+01,
        -1.51249414e+01, -1.50831862e+01, -1.50414310e+01, -1.49996758e+01,
        -1.49579205e+01, -1.49161653e+01, -1.48744101e+01, -1.48326549e+01,
        -1.47908996e+01, -1.47491444e+01, -1.47073892e+01, -1.46656340e+01,
        -1.46238788e+01, -1.45821235e+01, -1.45403683e+01, -1.44986131e+01,
        -1.44568579e+01, -1.44151027e+01, -1.43733474e+01, -1.43315922e+01,
        -1.42898370e+01, -1.42480818e+01, -1.42063265e+01, -1.41645713e+01,
        -1.41228161e+01, -1.40810609e+01, -1.40393057e+01, -1.39975504e+01,
        -1.39557952e+01, -1.39140400e+01, -1.38722848e+01, -1.38305295e+01,
        -1.37887743e+01, -1.37470191e+01, -1.37052639e+01, -1.36635087e+01,
        -1.36217534e+01, -1.35799982e+01, -1.35382430e+01, -1.34964878e+01,
        -1.34547326e+01, -1.34129773e+01, -1.33712221e+01, -1.33294669e+01,
        -1.32877117e+01, -1.32459564e+01, -1.32042012e+01, -1.31624460e+01,
        -1.31206908e+01, -1.30789356e+01, -1.30371803e+01, -1.29954251e+01,
        -1.29536699e+01, -1.29119147e+01, -1.28701594e+01, -1.28284042e+01,
        -1.27866490e+01, -1.27448938e+01, -1.27031386e+01, -1.26613833e+01,
        -1.26196281e+01, -1.25778729e+01, -1.25361177e+01, -1.24943625e+01,
        -1.24526072e+01, -1.24108520e+01, -1.23690968e+01, -1.23273416e+01,
        -1.22855863e+01, -1.22438311e+01, -1.22020759e+01, -1.21603207e+01,
        -1.21185655e+01, -1.20768102e+01, -1.20350550e+01, -1.19932998e+01,
        -1.19515446e+01, -1.19097893e+01, -1.18680341e+01, -1.18262789e+01,
        -1.17845237e+01, -1.17427685e+01, -1.17010132e+01, -1.16592580e+01,
        -1.16175028e+01, -1.15757476e+01, -1.15339924e+01, -1.14922371e+01,
        -1.14504819e+01, -1.14087267e+01, -1.13669715e+01, -1.13252162e+01,
        -1.12834610e+01, -1.12417058e+01, -1.11999506e+01, -1.11581954e+01,
        -1.11164401e+01, -1.10746849e+01, -1.10329297e+01, -1.09911745e+01,
        -1.09494192e+01, -1.09076640e+01, -1.08659088e+01, -1.08241536e+01,
        -1.07823984e+01, -1.07406431e+01, -1.06988879e+01, -1.06571327e+01,
        -1.06153775e+01, -1.05736223e+01, -1.05318670e+01, -1.04901118e+01,
        -1.04483566e+01, -1.04066014e+01, -1.03648461e+01, -1.03230909e+01,
        -1.02813357e+01, -1.02395805e+01, -1.01978253e+01, -1.01560700e+01,
        -1.01143148e+01, -1.00725596e+01, -1.00308044e+01, -9.98904915e+00,
        -9.94729393e+00, -9.90553871e+00, -9.86378348e+00, -9.82202826e+00,
        -9.78027304e+00, -9.73851782e+00, -9.69676260e+00, -9.65500737e+00,
        -9.61325215e+00, -9.57149693e+00, -9.52974171e+00, -9.48798649e+00,
        -9.44623127e+00, -9.40447604e+00, -9.36272082e+00, -9.32096560e+00,
        -9.27921038e+00, -9.23745516e+00, -9.19569994e+00, -9.15394471e+00,
        -9.11218949e+00, -9.07043427e+00, -9.02867905e+00, -8.98692383e+00,
        -8.94516861e+00, -8.90341338e+00, -8.86165816e+00, -8.81990294e+00,
        -8.77814772e+00, -8.73639250e+00, -8.69463728e+00, -8.65288205e+00,
        -8.61112683e+00, -8.56937161e+00, -8.52761639e+00, -8.48586117e+00,
        -8.44410594e+00, -8.40235072e+00, -8.36059550e+00, -8.31884028e+00,
        -8.27708506e+00, -8.23532984e+00, -8.19357461e+00, -8.15181939e+00,
        -8.11006417e+00, -8.06830895e+00, -8.02655373e+00, -7.98479851e+00,
        -7.94304328e+00, -7.90128806e+00, -7.85953284e+00, -7.81777762e+00,
        -7.77602240e+00, -7.73426718e+00, -7.69251195e+00, -7.65075673e+00,
        -7.60900151e+00, -7.56724629e+00, -7.52549107e+00, -7.48373585e+00,
        -7.44198062e+00, -7.40022540e+00, -7.35847018e+00, -7.31671496e+00,
        -7.27495974e+00, -7.23320452e+00, -7.19144929e+00, -7.14969407e+00,
        -7.10793885e+00, -7.06618363e+00, -7.02442841e+00, -6.98267318e+00,
        -6.94091796e+00, -6.89916274e+00, -6.85740752e+00, -6.81565230e+00,
        -6.77389708e+00, -6.73214185e+00, -6.69038663e+00, -6.64863141e+00,
        -6.60687619e+00, -6.56512097e+00, -6.52336575e+00, -6.48161052e+00,
        -6.43985530e+00, -6.39810008e+00, -6.35634486e+00, -6.31458964e+00,
        -6.27283442e+00, -6.23107919e+00, -6.18932397e+00, -6.14756875e+00,
        -6.10581353e+00, -6.06405831e+00, -6.02230309e+00, -5.98054786e+00,
        -5.93879264e+00, -5.89703742e+00, -5.85528220e+00, -5.81352698e+00,
        -5.77177175e+00, -5.73001653e+00, -5.68826131e+00, -5.64650609e+00,
        -5.60475087e+00, -5.56299565e+00, -5.52124042e+00, -5.47948520e+00,
        -5.43772998e+00, -5.39597476e+00, -5.35421954e+00, -5.31246432e+00,
        -5.27070909e+00, -5.22895387e+00, -5.18719865e+00, -5.14544343e+00,
        -5.10368821e+00, -5.06193299e+00, -5.02017776e+00, -4.97842254e+00,
        -4.93666732e+00, -4.89491210e+00, -4.85315688e+00, -4.81140166e+00,
        -4.76964643e+00, -4.72789121e+00, -4.68613599e+00, -4.64438077e+00,
        -4.60262555e+00, -4.56087033e+00, -4.51911510e+00, -4.47735988e+00,
        -4.43560466e+00, -4.39384944e+00, -4.35209422e+00, -4.31033899e+00,
        -4.26858377e+00, -4.22682855e+00, -4.18507333e+00, -4.14331811e+00,
        -4.10156289e+00, -4.05980766e+00, -4.01805244e+00, -3.97629722e+00,
        -3.93454200e+00, -3.89278678e+00, -3.85103156e+00, -3.80927633e+00,
        -3.76752111e+00, -3.72576589e+00, -3.68401067e+00, -3.64225545e+00,
        -3.60050023e+00, -3.55874500e+00, -3.51698978e+00, -3.47523456e+00,
        -3.43347934e+00, -3.39172412e+00, -3.34996890e+00, -3.30821367e+00,
        -3.26645845e+00, -3.22470323e+00, -3.18294801e+00, -3.14119279e+00,
        -3.09943756e+00, -3.05768234e+00, -3.01592712e+00, -2.97417190e+00,
        -2.93241668e+00, -2.89066146e+00, -2.84890623e+00, -2.80715101e+00,
        -2.76539579e+00, -2.72364057e+00, -2.68188535e+00, -2.64013013e+00,
        -2.59837490e+00, -2.55661968e+00, -2.51486446e+00, -2.47310924e+00,
        -2.43135402e+00, -2.38959880e+00, -2.34784357e+00, -2.30608835e+00,
        -2.26433313e+00, -2.22257791e+00, -2.18082269e+00, -2.13906747e+00,
        -2.09731224e+00, -2.05555702e+00, -2.01380180e+00, -1.97204658e+00,
        -1.93029136e+00, -1.88853614e+00, -1.84678091e+00, -1.80502569e+00,
        -1.76327047e+00, -1.72151525e+00, -1.67976003e+00, -1.63800480e+00,
        -1.59624958e+00, -1.55449436e+00, -1.51273914e+00, -1.47098392e+00,
        -1.42922870e+00, -1.38747347e+00, -1.34571825e+00, -1.30396303e+00,
        -1.26220781e+00, -1.22045259e+00, -1.17869737e+00, -1.13694214e+00,
        -1.09518692e+00, -1.05343170e+00, -1.01167648e+00, -9.69921257e-01,
        -9.28166036e-01, -8.86410814e-01, -8.44655592e-01, -8.02900370e-01,
        -7.61145149e-01, -7.19389927e-01, -6.77634705e-01, -6.35879484e-01,
        -5.94124262e-01, -5.52369040e-01, -5.10613818e-01, -4.68858597e-01,
        -4.27103375e-01, -3.85348153e-01, -3.43592932e-01, -3.01837710e-01,
        -2.60082488e-01, -2.18327266e-01, -1.76572045e-01, -1.34816823e-01,
        -9.30616012e-02, -5.13063795e-02, -9.55115781e-03,  3.22040639e-02,
         7.39592856e-02,  1.15714507e-01,  1.57469729e-01,  1.99224951e-01,
         2.40980173e-01,  2.82735394e-01,  3.24490616e-01,  3.66245838e-01,
         4.08001059e-01,  4.49756281e-01,  4.91511503e-01,  5.33266725e-01,
         5.75021946e-01,  6.16777168e-01,  6.58532390e-01,  7.00287611e-01,
         7.42042833e-01,  7.83798055e-01,  8.25553277e-01,  8.67308498e-01,
         9.09063720e-01,  9.50818942e-01,  9.92574163e-01,  1.03432939e+00,
         1.07608461e+00,  1.11783983e+00,  1.15959505e+00,  1.20135027e+00,
         1.24310549e+00,  1.28486072e+00,  1.32661594e+00,  1.36837116e+00,
         1.41012638e+00,  1.45188160e+00,  1.49363682e+00,  1.53539205e+00,
         1.57714727e+00,  1.61890249e+00,  1.66065771e+00,  1.70241293e+00,
         1.74416815e+00,  1.78592338e+00,  1.82767860e+00,  1.86943382e+00,
         1.91118904e+00,  1.95294426e+00,  1.99469948e+00,  2.03645471e+00,
         2.07820993e+00,  2.11996515e+00,  2.16172037e+00,  2.20347559e+00,
         2.24523081e+00,  2.28698604e+00,  2.32874126e+00,  2.37049648e+00,
         2.41225170e+00,  2.45400692e+00,  2.49576215e+00,  2.53751737e+00,
         2.57927259e+00,  2.62102781e+00,  2.66278303e+00,  2.70453825e+00,
         2.74629348e+00,  2.78804870e+00,  2.82980392e+00,  2.87155914e+00,
         2.91331436e+00,  2.95506958e+00,  2.99682481e+00,  3.03858003e+00,
         3.08033525e+00,  3.12209047e+00,  3.16384569e+00,  3.20560091e+00,
         3.24735614e+00,  3.28911136e+00,  3.33086658e+00,  3.37262180e+00,
         3.41437702e+00,  3.45613224e+00,  3.49788747e+00,  3.53964269e+00,
         3.58139791e+00,  3.62315313e+00,  3.66490835e+00,  3.70666358e+00,
         3.74841880e+00,  3.79017402e+00,  3.83192924e+00,  3.87368446e+00,
         3.91543968e+00,  3.95719491e+00,  3.99895013e+00,  4.04070535e+00,
         4.08246057e+00,  4.12421579e+00,  4.16597101e+00,  4.20772624e+00,
         4.24948146e+00,  4.29123668e+00,  4.33299190e+00,  4.37474712e+00,
         4.41650234e+00,  4.45825757e+00,  4.50001279e+00,  4.54176801e+00,
         4.58352323e+00,  4.62527845e+00,  4.66703367e+00,  4.70878890e+00,
         4.75054412e+00,  4.79229934e+00,  4.83405456e+00,  4.87580978e+00,
         4.91756500e+00,  4.95932023e+00,  5.00107545e+00,  5.04283067e+00,
         5.08458589e+00,  5.12634111e+00,  5.16809634e+00,  5.20985156e+00,
         5.25160678e+00,  5.29336200e+00,  5.33511722e+00,  5.37687244e+00,
         5.41862767e+00,  5.46038289e+00,  5.50213811e+00,  5.54389333e+00,
         5.58564855e+00,  5.62740377e+00,  5.66915900e+00,  5.71091422e+00,
         5.75266944e+00,  5.79442466e+00,  5.83617988e+00,  5.87793510e+00,
         5.91969033e+00,  5.96144555e+00,  6.00320077e+00,  6.04495599e+00,
         6.08671121e+00,  6.12846643e+00,  6.17022166e+00,  6.21197688e+00,
         6.25373210e+00,  6.29548732e+00,  6.33724254e+00,  6.37899777e+00,
         6.42075299e+00,  6.46250821e+00,  6.50426343e+00,  6.54601865e+00,
         6.58777387e+00,  6.62952910e+00,  6.67128432e+00,  6.71303954e+00,
         6.75479476e+00,  6.79654998e+00,  6.83830520e+00,  6.88006043e+00,
         6.92181565e+00,  6.96357087e+00,  7.00532609e+00,  7.04708131e+00,
         7.08883653e+00,  7.13059176e+00,  7.17234698e+00,  7.21410220e+00,
         7.25585742e+00,  7.29761264e+00,  7.33936786e+00,  7.38112309e+00,
         7.42287831e+00,  7.46463353e+00,  7.50638875e+00,  7.54814397e+00,
         7.58989919e+00,  7.63165442e+00,  7.67340964e+00,  7.71516486e+00,
         7.75692008e+00,  7.79867530e+00,  7.84043053e+00,  7.88218575e+00,
         7.92394097e+00,  7.96569619e+00,  8.00745141e+00,  8.04920663e+00,
         8.09096186e+00,  8.13271708e+00,  8.17447230e+00,  8.21622752e+00,
         8.25798274e+00,  8.29973796e+00,  8.34149319e+00,  8.38324841e+00,
         8.42500363e+00,  8.46675885e+00,  8.50851407e+00,  8.55026929e+00,
         8.59202452e+00,  8.63377974e+00,  8.67553496e+00,  8.71729018e+00,
         8.75904540e+00,  8.80080062e+00,  8.84255585e+00,  8.88431107e+00,
         8.92606629e+00,  8.96782151e+00,  9.00957673e+00,  9.05133196e+00,
         9.09308718e+00,  9.13484240e+00,  9.17659762e+00,  9.21835284e+00,
         9.26010806e+00,  9.30186329e+00,  9.34361851e+00,  9.38537373e+00,
         9.42712895e+00,  9.46888417e+00,  9.51063939e+00,  9.55239462e+00,
         9.59414984e+00,  9.63590506e+00,  9.67766028e+00,  9.71941550e+00,
         9.76117072e+00,  9.80292595e+00,  9.84468117e+00,  9.88643639e+00,
         9.92819161e+00,  9.96994683e+00,  1.00117021e+01,  1.00534573e+01,
         1.00952125e+01,  1.01369677e+01,  1.01787229e+01,  1.02204782e+01,
         1.02622334e+01,  1.03039886e+01,  1.03457438e+01,  1.03874991e+01,
         1.04292543e+01,  1.04710095e+01,  1.05127647e+01,  1.05545199e+01,
         1.05962752e+01,  1.06380304e+01,  1.06797856e+01,  1.07215408e+01,
         1.07632960e+01,  1.08050513e+01,  1.08468065e+01,  1.08885617e+01,
         1.09303169e+01,  1.09720722e+01,  1.10138274e+01,  1.10555826e+01,
         1.10973378e+01,  1.11390930e+01,  1.11808483e+01,  1.12226035e+01,
         1.12643587e+01,  1.13061139e+01,  1.13478691e+01,  1.13896244e+01,
         1.14313796e+01,  1.14731348e+01,  1.15148900e+01,  1.15566453e+01,
         1.15984005e+01,  1.16401557e+01,  1.16819109e+01,  1.17236661e+01,
         1.17654214e+01,  1.18071766e+01,  1.18489318e+01,  1.18906870e+01,
         1.19324423e+01,  1.19741975e+01,  1.20159527e+01,  1.20577079e+01,
         1.20994631e+01,  1.21412184e+01,  1.21829736e+01,  1.22247288e+01,
         1.22664840e+01,  1.23082392e+01,  1.23499945e+01,  1.23917497e+01,
         1.24335049e+01,  1.24752601e+01,  1.25170154e+01,  1.25587706e+01,
         1.26005258e+01,  1.26422810e+01,  1.26840362e+01,  1.27257915e+01,
         1.27675467e+01,  1.28093019e+01,  1.28510571e+01,  1.28928124e+01,
         1.29345676e+01,  1.29763228e+01,  1.30180780e+01,  1.30598332e+01,
         1.31015885e+01,  1.31433437e+01,  1.31850989e+01,  1.32268541e+01,
         1.32686093e+01,  1.33103646e+01,  1.33521198e+01,  1.33938750e+01,
         1.34356302e+01,  1.34773855e+01,  1.35191407e+01,  1.35608959e+01,
         1.36026511e+01,  1.36444063e+01,  1.36861616e+01,  1.37279168e+01,
         1.37696720e+01,  1.38114272e+01,  1.38531825e+01,  1.38949377e+01,
         1.39366929e+01,  1.39784481e+01,  1.40202033e+01,  1.40619586e+01,
         1.41037138e+01,  1.41454690e+01,  1.41872242e+01,  1.42289794e+01,
         1.42707347e+01,  1.43124899e+01,  1.43542451e+01,  1.43960003e+01,
         1.44377556e+01,  1.44795108e+01,  1.45212660e+01,  1.45630212e+01,
         1.46047764e+01,  1.46465317e+01,  1.46882869e+01,  1.47300421e+01,
         1.47717973e+01,  1.48135526e+01,  1.48553078e+01,  1.48970630e+01,
         1.49388182e+01,  1.49805734e+01,  1.50223287e+01,  1.50640839e+01,
         1.51058391e+01,  1.51475943e+01,  1.51893495e+01,  1.52311048e+01,
         1.52728600e+01,  1.53146152e+01,  1.53563704e+01,  1.53981257e+01,
         1.54398809e+01,  1.54816361e+01,  1.55233913e+01,  1.55651465e+01,
         1.56069018e+01,  1.56486570e+01,  1.56904122e+01,  1.57321674e+01,
         1.57739227e+01,  1.58156779e+01,  1.58574331e+01,  1.58991883e+01,
         1.59409435e+01,  1.59826988e+01,  1.60244540e+01,  1.60662092e+01,
         1.61079644e+01,  1.61497196e+01,  1.61914749e+01,  1.62332301e+01,
         1.62749853e+01,  1.63167405e+01,  1.63584958e+01,  1.64002510e+01,
         1.64420062e+01,  1.64837614e+01,  1.65255166e+01,  1.65672719e+01,
         1.66090271e+01,  1.66507823e+01,  1.66925375e+01,  1.67342928e+01,
         1.67760480e+01,  1.68178032e+01,  1.68595584e+01,  1.69013136e+01,
         1.69430689e+01,  1.69848241e+01,  1.70265793e+01,  1.70683345e+01,
         1.71100897e+01,  1.71518450e+01,  1.71936002e+01,  1.72353554e+01,
         1.72771106e+01,  1.73188659e+01,  1.73606211e+01,  1.74023763e+01,
         1.74441315e+01,  1.74858867e+01,  1.75276420e+01,  1.75693972e+01,
         1.76111524e+01,  1.76529076e+01,  1.76946629e+01,  1.77364181e+01,
         1.77781733e+01,  1.78199285e+01,  1.78616837e+01,  1.79034390e+01,
         1.79451942e+01,  1.79869494e+01,  1.80287046e+01,  1.80704598e+01,
         1.81122151e+01,  1.81539703e+01,  1.81957255e+01,  1.82374807e+01,
         1.82792360e+01,  1.83209912e+01,  1.83627464e+01,  1.84045016e+01,
         1.84462568e+01,  1.84880121e+01,  1.85297673e+01,  1.85715225e+01,
         1.86132777e+01,  1.86550330e+01,  1.86967882e+01,  1.87385434e+01,
         1.87802986e+01,  1.88220538e+01,  1.88638091e+01,  1.89055643e+01,
         1.89473195e+01,  1.89890747e+01,  1.90308299e+01,  1.90725852e+01,
         1.91143404e+01,  1.91560956e+01,  1.91978508e+01,  1.92396061e+01,
         1.92813613e+01,  1.93231165e+01,  1.93648717e+01,  1.94066269e+01,
         1.94483822e+01,  1.94901374e+01,  1.95318926e+01,  1.95736478e+01,
         1.96154030e+01,  1.96571583e+01,  1.96989135e+01,  1.97406687e+01,
         1.97824239e+01,  1.98241792e+01,  1.98659344e+01,  1.99076896e+01,
         1.99494448e+01,  1.99912000e+01,  2.00329553e+01,  2.00747105e+01,
         2.01164657e+01,  2.01582209e+01,  2.01999762e+01,  2.02417314e+01,
         2.02834866e+01,  2.03252418e+01,  2.03669970e+01,  2.04087523e+01,
         2.04505075e+01,  2.04922627e+01,  2.05340179e+01,  2.05757731e+01,
         2.06175284e+01,  2.06592836e+01,  2.07010388e+01,  2.07427940e+01,
         2.07845493e+01,  2.08263045e+01,  2.08680597e+01,  2.09098149e+01,
         2.09515701e+01,  2.09933254e+01,  2.10350806e+01,  2.10768358e+01,
         2.11185910e+01,  2.11603463e+01,  2.12021015e+01,  2.12438567e+01,
         2.12856119e+01,  2.13273671e+01,  2.13691224e+01,  2.14108776e+01,
         2.14526328e+01,  2.14943880e+01,  2.15361432e+01,  2.15778985e+01,
         2.16196537e+01,  2.16614089e+01,  2.17031641e+01,  2.17449194e+01,
         2.17866746e+01,  2.18284298e+01,  2.18701850e+01,  2.19119402e+01,
         2.19536955e+01,  2.19954507e+01,  2.20372059e+01,  2.20789611e+01,
         2.21207164e+01,  2.21624716e+01,  2.22042268e+01,  2.22459820e+01,
         2.22877372e+01,  2.23294925e+01,  2.23712477e+01,  2.24130029e+01,
         2.24547581e+01,  2.24965133e+01,  2.25382686e+01,  2.25800238e+01,
         2.26217790e+01,  2.26635342e+01,  2.27052895e+01,  2.27470447e+01,
         2.27887999e+01,  2.28305551e+01,  2.28723103e+01,  2.29140656e+01]))
[38]:
print(f"Total run-time: {time.perf_counter()-t0:.3f}s")
Total run-time: 16.242s
Conclusions

Now, PyFAI provides the units to represent a data array as a function of in-plane and out-of-plane components of vector q. This is a standard way of represent GIWAXS/GISAXS or fiber diffraction patterns. FiberUnits can be retrieved with a special method and the incident angle, tilt angle and sample orientation parameters can be defined and updated at the moment. Moreover, the methods integrate_fiber and integrate_grazing_incidence allow to get straight slices from the Qip-Qoop patterns.