Closed prjemian closed 7 months ago
@strempfer: I have reproduced this situation in test code with the current version and am working on repairs now. In short, the restored samples should each have two reflections in this test. That fails:
for sample in e4cv.calc._samples.values():
assert len(sample.reflections) == 2, f"{sample.name=}"
assert len(e4cv.calc._samples) == 4
agent = DiffractometerConfiguration(e4cv)
config = agent.export()
agent.restore(config, clear=False)
assert len(e4cv.calc._samples) == 4
for sample in e4cv.calc._samples.values():
> assert len(sample.reflections) == 2
E AssertionError: assert 10 == 2
Those commits should have been on a new branch. Since I've pushed them, will remove the changes with git revert
.
Lots of new errors now in test_configuration.py
module.
All of the form: It is not possible to compute the UB matrix when the given reflections are colinear
. When this line is removed, no such error, but reflections are duplicated: https://github.com/bluesky/hklpy/blob/c8163ab8a6ad28e0342ae9d8c27695d1ed391130/hkl/configuration.py#L297
... Starving for a sample.update_reflection()
method. Alas, v2 item.
It looks like when
clear=False
, it reads reflections from 'main' also into the following sample.Originally posted by @strempfer in https://github.com/bluesky/hklpy/issues/279#issuecomment-1798543499