AssertionError: Not enough patches to constrain spline fit (Patch CTF Estimation)

Please post error messages as text to enable more informative searches of the discussion forum.
You may want to examine the parameters you specified during movie import, for example the correctness of the value provided for Raw pixel size (A), as noted in Patch Motion Correction: "Not enough patches to constrain spline fit..."

Here is it.
License is valid.

Launching job on lane default target localhost …

Running job on master node hostname localhost

[CPU: 165.5 MB Avail: 122.89 GB]
Job J8 Started

[CPU: 165.5 MB Avail: 122.81 GB]
Master running v4.2.1, worker running v4.2.1

[CPU: 165.5 MB Avail: 122.81 GB]
Working in directory: /run/media/zhw/HD-LXU3/CS-mx/J8

[CPU: 165.5 MB Avail: 122.81 GB]
Running on lane default

[CPU: 165.5 MB Avail: 122.81 GB]
Resources allocated:

[CPU: 165.5 MB Avail: 122.81 GB]
Worker: localhost

[CPU: 165.5 MB Avail: 122.81 GB]
CPU : [0, 1, 2, 3, 4, 5, 6, 7]

[CPU: 165.5 MB Avail: 122.81 GB]
GPU : [0, 1, 2, 3]

[CPU: 165.5 MB Avail: 122.81 GB]
RAM : [0]

[CPU: 165.5 MB Avail: 122.81 GB]
SSD : False

[CPU: 165.5 MB Avail: 122.81 GB]

[CPU: 165.5 MB Avail: 122.81 GB]
Importing job module for job type patch_ctf_estimation_multi…

[CPU: 198.6 MB Avail: 122.78 GB]
Job ready to run

[CPU: 198.6 MB Avail: 122.78 GB]


[CPU: 200.1 MB Avail: 122.77 GB]
Job will process this many micrographs: 2090

[CPU: 200.1 MB Avail: 122.77 GB]
parent process is 21182

[CPU: 159.5 MB Avail: 122.72 GB]
Calling CUDA init from 21233

[CPU: 159.5 MB Avail: 122.72 GB]
Calling CUDA init from 21231

[CPU: 159.5 MB Avail: 122.72 GB]
Calling CUDA init from 21235

[CPU: 159.5 MB Avail: 122.72 GB]
Calling CUDA init from 21238

[CPU: 294.4 MB Avail: 122.17 GB]
– 0.0: processing 3 of 2090: J7/imported/012924739942553695964_20220603-mxco-tilt30_00004.mrc
loading /run/media/zhw/HD-LXU3/CS-mx/J7/imported/012924739942553695964_20220603-mxco-tilt30_00004.mrc
Loading raw mic data from J7/imported/012924739942553695964_20220603-mxco-tilt30_00004.mrc …
Done in 0.08s
Processing …

[CPU: 294.7 MB Avail: 122.17 GB]
– 3.0: processing 1 of 2090: J7/imported/016723199002478509905_20220603-mxco-tilt30_00002.mrc
loading /run/media/zhw/HD-LXU3/CS-mx/J7/imported/016723199002478509905_20220603-mxco-tilt30_00002.mrc
Loading raw mic data from J7/imported/016723199002478509905_20220603-mxco-tilt30_00002.mrc …
Done in 0.08s
Processing …

[CPU: 294.5 MB Avail: 122.17 GB]
– 2.0: processing 0 of 2090: J7/imported/015634133477353746482_20220603-mxco-tilt30_00001.mrc
loading /run/media/zhw/HD-LXU3/CS-mx/J7/imported/015634133477353746482_20220603-mxco-tilt30_00001.mrc
Loading raw mic data from J7/imported/015634133477353746482_20220603-mxco-tilt30_00001.mrc …
Done in 0.09s
Processing …

[CPU: 294.5 MB Avail: 122.17 GB]
– 1.0: processing 2 of 2090: J7/imported/009309766774211205456_20220603-mxco-tilt30_00003.mrc
loading /run/media/zhw/HD-LXU3/CS-mx/J7/imported/009309766774211205456_20220603-mxco-tilt30_00003.mrc
Loading raw mic data from J7/imported/009309766774211205456_20220603-mxco-tilt30_00003.mrc …
Done in 0.08s
Processing …

[CPU: 204.3 MB Avail: 121.84 GB]
Error occurred while processing J7/imported/016723199002478509905_20220603-mxco-tilt30_00002.mrc
Traceback (most recent call last):
File “/home/zhw/cryosparc2/cryosparc2_worker/cryosparc_worker/cryosparc_compute/jobs/pipeline.py”, line 60, in exec
return self.process(item)
File “cryosparc_master/cryosparc_compute/jobs/ctf_estimation/run.py”, line 112, in cryosparc_compute.jobs.ctf_estimation.run.run.ctfworker.process
File “cryosparc_master/cryosparc_compute/jobs/ctf_estimation/run.py”, line 118, in cryosparc_compute.jobs.ctf_estimation.run.run.ctfworker.process
File “cryosparc_master/cryosparc_compute/jobs/ctf_estimation/run.py”, line 119, in cryosparc_compute.jobs.ctf_estimation.run.run.ctfworker.process
File “cryosparc_master/cryosparc_compute/jobs/ctf_estimation/patchctf.py”, line 70, in cryosparc_compute.jobs.ctf_estimation.patchctf.patchctf_v217
File “cryosparc_master/cryosparc_compute/jobs/ctf_estimation/patchctf.py”, line 564, in cryosparc_compute.jobs.ctf_estimation.patchctf.patchctf_v217
AssertionError: Not enough patches to constrain spline fit

Marking J7/imported/016723199002478509905_20220603-mxco-tilt30_00002.mrc as incomplete and continuing…

Thanks. Have you confirmed that the parameters for the Import Movies job were correct? See Patch Motion Correction: "Not enough patches to constrain spline fit...".

Yes, the parameters are correct. After I changed the override knots from 6x9 to 5x5 in the patch CTF, it successfully ran. But I wonder if it affects my results and how should I determine the numbers…

Hi @komokuy,

Thanks for bringing this up. This seems to be a problem with the patch CTF job at moderately high magnification. The workaround that you found is totally reasonable, don’t be afraid to use it. I’ve recorded this issue and we will fix it in a future version of cryosparc.

–Harris