Refactoring #1407

Envelope task #1438: === Physics ===

Envelope task #1406: == Particle correlations ==

rotate the sample, not Q

Added by wuttke over 3 years ago. Updated over 2 years ago.

Status:RejectedStart date:
Priority:LowDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Currently, rotation of particles is emulated by rotating Q. In the future, keep Q=ki-kf invariant, and apply rotations to sample components.

Rationale:

Rotating Q instead of the sample was never more than a workaround. It may have helped to achieve some optimization with minimal coding. But it clearly does not reflect the given geometry, and is now becoming constringing.

In the future, we will have different sample components rotated relative to each other. It will be much more natural to model this by rotation of sample components, than by rotating Q.

In the past, keeping particles unrotated appeared advantageous because form factors were given in terms of x,y,z coordinates. This has completely changed with the reimplementation of the polyhedral form factors, which is based on coordinate-free algebra, with vertex coordinates only appearing in the constructor. This makes particle rotation very easy and fast: Just rotate the vertices in the constructor. Nothing has to change in evaluate_for_q(). Much more efficient than rotating every single Q.

History

#1 Updated by wuttke over 3 years ago

  • Parent task set to #1406

#2 Updated by wuttke almost 3 years ago

  • Status changed from New to Long Term Idea

#3 Updated by wuttke over 2 years ago

  • Status changed from Long Term Idea to Rejected

Not worth a separate refactoring, but will be done when implementing graded layers, as explained in design proposal.

Also available in: Atom PDF