Run_motioncor2.py wrapper for motioncor2 error

Hello.

We recently updated to Cryosparc 3, and we are now getting the following error from the motioncor2 wrapper:

[CPU: 1.41 GB] Traceback (most recent call last): File “cryosparc_worker/cryosparc_compute/run.py”, line 84, in cryosparc_compute.run.main File “/opt/cryoem/cryosparc/cryosparc2_worker/cryosparc_compute/jobs/motioncorrection/run_motioncor2.py”, line 432, in run_motioncor2_wrapper plt.plot(fit_cumulative_patch_shifts[0][:,0],fit_cumulative_patch_shifts[0][:,1],’-k.’, label=‘Patch Motion Alignment’) IndexError: index 0 is out of bounds for axis 0 with size 0

This was working fine in our previous version of Cryosparc, but now using motioncor2 produces this error reliably with each job.

1 Like

Hi @yodamoppet,

We are looking into this - thanks
Out of curiosity, why opt to use motioncor2? Is patch-motion not working for your data?

Ali

1 Like

Same error when ran motioncor2.

I would prefer patch-motion, but our memory card is not powerful enough to run this job for my super-resolution data.

Thanks.

Our researchers have had issues with patch-motion which had bugs with Falcon3 data that left black borders around micrographs. This has been fixed, but they have mostly settled on using motioncor2 for high-resolution data.

Hi @yy314, have you tried patch motion with the “low memory mode” in v3?

@yodamoppet thanks for the info. Patch motion has had a couple of improvements recently so it may be worth trying again. We are working on the motioncor2 issue.

@apunjani Yes, I ticked “low memory mode”. My data is Krios-K3 counting super resolution.

Our cluster resource is as below:
40 threads, memory 256GB, 2x Tesla P4 8GB memory each

patch-motion in the latest version 3 continues to give dark bars around the image – any possibility for a workaround or fix? Alternately, any updates with integration of motioncor2?

Here is an example of what we are looking at.

The data is collected on a Falcon III, 42 frames, 62 e/A^2 total dose. On some data sets I have observed this but not on others. It appears whether patch-motion is run on either a TitanV or on a 2080Ti.

I can send you an example if that would be helpful.

FYI the motioncor2 wrapper issue should be fixed in the latest cryoSPARC v3.1. We’re currently looking into the patch motion issue with the black bars.

@yodamoppet @jcoleman if you made any changes to the motion correction parameters for the Patch Motion job, can you share a screenshot of the Inputs and Parameters tab so we can try to replicate this?

1 Like

Thanks for fixing the wrapper issue, that working now.

The issue appears with the default settings for patch motion correction. No issue with data collected on a K3, Falcon data is collected with EPU.

@jcoleman talked to the team and we’ve found that the black bar happens when the movie’s last frame is blank. Can you try setting the End Frame parameter to 40 or below until the black bars disappear?

@nfrasser thank you! You are right, this does seem to be an EPU bug. Setting the end frame parameter to 40 makes the black bar disappear.

I will also report this to ThermoFisher.

2 Likes