Difference between the results calculated by the DXA called through the graphical interface and the DXA called through the OVITO library

My ovito version is 3.10.6.
This is the version of ovito library:
In the GUI, OVITO tells me that the model has a total of 417 dislocations and that the total length of these dislocations is 5896.97:
In the python script, I use the following statement to count how many dislocation lines are in the current model file and their total length.

from ovito.io import import_file
from ovito.modifiers import DislocationAnalysisModifier as DXA

pipeline = import_file("dump_20000.shear", input_format="lammps/dump",
num_frame = pipeline.source.num_frames
data = pipeline.compute(frame=0)
result = 0.0
for line in data.dislocations.lines:
  result += line.length
print(len(data.dislocations.lines), result)

After running the above code, I get the following output:
This means that when I call the DXA algorithm from the OVITO library via python, it tells me that there are 426 dislocation lines in the current model, and that the total length of these dislocation lines is 5856.63.
And there is a slight discrepancy between such a result and the one I get in the OVITO GUI, so I am confused, is there something wrong with my python code? Or is this just normal?
Finally, as I’m a new user so unfortunately I can’t upload my dump files, but I’ve found after a few tests that these differences can be triggered consistently in the version of OVITO I provided earlier.

Thank you for sharing your observations. Generally, the results should not differ if you use the exact same settings. Can you double-check, that this is the case?

  1. Did you also activate the sorting of particles during file import in the GUI?
  2. Do any input parameters to the DXA differ from the values set in the GUI? In the script you seem to use default values only. ovito.modifiers — OVITO Python Reference 3.10.6 documentation

Sorry, I completely forgot that I need to activate particle sorting when importing files in the GUI interface, so this is a complete misunderstanding.