[Fix] Loading lattices with any periodicity
SOLEIL-U-v9-quad.mat The previous implementation did not work for a lattice with a periodicity of 20. The for loop did not give the correct size of the positions array. I've changed it, and now it produces the correct results. An example of a lattice with a periodicity of 20 is attached. Now everything seems to be giving good results.
Commits are ugly because I had to revert emittance calculations changes that I'm still working on.