Processing Local Motion trajectories

Hi,

I am seeking to further process some statistics from a Local Motion correction job. How would one access the every individual particle movement per frame from either the .cs or .npy files from the job directory?

They are numpy structured/record arrays. You can read them with np.load() in an ipython session and start playing around. Check out my code for conversion in csparc2star.py and pyem/metadata.py from my github repo for an example.

Hi Daniel,

Many thanks for you post! I have pulled apart the .cs files and .npy files of the cryoSPARCv2 test data and I have several questions.

How are the dimensions of numpy object to be interpreted? “14sep05c_00024sq_00004hl_00002es.frames_particles_traj.npy” has dimenstions of (736,38,2). I intially assumed that the indexes were as follows:
(particles(#), frames(#), x & y displacement(pixels)).

Is the above interpretation correct? I’m a little confused as to this matter as the corresponding star file (which I pulled off the .cs file) contains 459 particles whereas the .npy file seems to have 736.

Again many thanks!

Haha, no idea!

It must be (particles, frames, x?, y?). If you look at the values in the x and y, say just a histogram, does it seem most likely to be coordinates or displacements?