The function DiffractionObject.get_array_index source code is
def get_array_index(self, xtype, xvalue):
"""Return the index of the closest value in the array associated with
the specified xtype and the value provided.
...
"""
xtype = self._input_xtype
xarray = self.on_xtype(xtype)[0]
if len(xarray) == 0:
raise ValueError(
f"The '{xtype}' array is empty. "
"Please ensure it is initialized."
)
index = (np.abs(xarray - xvalue)).argmin()
return index
So the input parameter xtype doesn't have an effect at all. Thus, the following code
Activity