Iterative disentanglement of rigid and non-rigid displacements. Flowchart showing the iterative estimation of atom specific weights (scales), the rigid-body transformation and the parameters of the distribution of the scales. The initial scales are generated randomly. Both EM and Gibbs sampling operate by cycling through the updates until convergence is reach. The EM updates are deterministic, the Gibbs sampling updates stochastic.