Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix precision problem in BraggScattererInCrystalStructure "Position"-property #12348

Closed
MichaelWedel opened this issue Apr 10, 2015 · 1 comment
Assignees
Labels
Diffraction Issues and pull requests related to diffraction
Milestone

Comments

@MichaelWedel
Copy link
Contributor

In ticket http://trac.mantidproject.org/mantid/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``.

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.

@MichaelWedel
Copy link
Contributor Author

This issue was originally trac ticket 11510

@MichaelWedel MichaelWedel added the Diffraction Issues and pull requests related to diffraction label Jun 3, 2015
@MichaelWedel MichaelWedel self-assigned this Jun 3, 2015
@MichaelWedel MichaelWedel added this to the Release 3.4 milestone Jun 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Diffraction Issues and pull requests related to diffraction
Projects
None yet
Development

No branches or pull requests

1 participant