Ticket #11510 (closed: fixed)

Opened 5 years ago

Last modified 5 years ago

Fix precision problem in BraggScattererInCrystalStructure "Position"-property

Reported by: Michael Wedel Owned by: Michael Wedel
Priority: major Milestone: Release 3.4
Component: Diffraction Keywords:
Cc: Blocked By:
Blocking: Tester: Dan Nixon

Description

In ticket #11465, precision problems in calculation of equivalent positions in space groups were addressed.

The class Geometry::BraggScattererInCrystalStructure handles atom positions by exposing a PropertyWithValue<V3D>.

During tests with the structure of SiO2 (trigonal, space group 154) and PoldiCreatePeaksFromCell, it turned out that for correctly handling coordinate values of "2/3", this mechanism is not precise enough. No matter how accurate the position is given in the string passed to the algorithm, it is at some point cut off at 6 digits and leads to incorrect equivalent positions.

The property should be converted to a string that is interpreted using the multi-return value feature of muParser. This has the advantage that users can specify coordinates like "1/4", "1/3", "1/2", "2/3" etc. directly and they are evaluated by muParser down to double precision, preventing problems as described above.

On the downside, it will not be possible any more to assign V3D-object directly to the property using setProperty, so the unit tests using this property have to be adjusted.

Change History

comment:1 Changed 5 years ago by Michael Wedel

  • Status changed from new to inprogress

Refs #11510. Use muParser to parse atom position strings.

Changeset: a7b91316ecb1731ec5bcf54540b31d473b2ecdeb

comment:2 Changed 5 years ago by Michael Wedel

Refs #11510. Fix unit tests.

Changeset: 079857285dae8a2f3f6d98b3925413fd9f05f6d6

comment:3 Changed 5 years ago by Michael Wedel

Refs #11510. Added system tests

Added system tests for different structures from different crystal systems.

Changeset: 80d479dae59639d14ff83c899ec4a3ad9ea20077

comment:4 Changed 5 years ago by Michael Wedel

Refs #11510. Fixing system test for SiO2

Changeset: ddc9b915f1dab2259e0122a3c8159b3bfbf28a87

comment:5 Changed 5 years ago by Michael Wedel

  • Status changed from inprogress to verify
  • Resolution set to fixed

This is being verified as pull request #566.

comment:6 Changed 5 years ago by Michael Wedel

Refs #11510. Removing boost dependency for RHEL6

Changeset: 5c6e9d2442ad417901405eb93ffed862e3d39b7e

comment:7 Changed 5 years ago by Michael Wedel

Refs #11510. Using single value expression parsing for win7

Changeset: 1353c52118abfd63d6b089d71ee2a8d810bc2853

comment:8 Changed 5 years ago by Michael Wedel

Refs #11510. Fixing compiler warning on win7

Changeset: a42f85a8d3d2fad3b988a6c86defa627543565e5

comment:9 Changed 5 years ago by Michael Wedel

Refs #11510. Fixing pylint issue in system test

Changeset: 7b8c7aab4788e22db92f4d3ee94bca616d7db9f3

comment:10 Changed 5 years ago by Dan Nixon

  • Status changed from verify to verifying
  • Tester set to Dan Nixon

comment:11 Changed 5 years ago by Dan Nixon

  • Status changed from verifying to closed

Merge pull request #566 from mantidproject/11510_fix_bragg_scatterer_in_crystal_structure_position

Fix BraggScattererInCrystalStructure "Position" property

Full changeset: b611de4a0f6f0829392d136d32f93ba0988c809a

comment:12 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 12348

Note: See TracTickets for help on using tickets.