RefinementBatch doesn't have its own unit cell
The idea behind RefinementBatch
is that as the instrument/sample rotates, the conditions and therefore state may change, e.g. the temperature may change, resulting in a different unit cell. By dividing the peaks into batches with peaks in a specific frame range, we can refine the unit cell independently for each batch, and in the limit of a small enough batch, the cell and instrument state can be refined to the correct values.
The problem is that each RefinementBatch
contains a private pointer UnitCell* _cell
to a unit cell owned by experiment. As it stands, this is just a single cell, so it will always be refined to the last refinement batch.
Edited by Raza, Zamaan