AssertionError in non-uniform refinement

I get the following error during the local decomposition of NU-refinement at process step 3 of 4. Any help is appreciated.

Local decomposition...
  Processing 1 of 4...
  Processing 2 of 4...
  Processing 3 of 4...

Traceback (most recent call last):
  File "cryosparc2_worker/cryosparc2_compute/", line 78, in
  File "cryosparc2_worker/cryosparc2_compute/jobs/nonuniform_refine/", line 645, in
1 Like

Hi @mazhabmt,

Can you make sure the volume and mask you provided were the same shape?


Hi Ali,
I am also getting the same error in NU refinement.
I am not providing any mask separately form my side and using dynamic mask option from my map/Volume. Can any one suggest how I can solve this issue?


Hi, I got the same error using v2.13.2 for NU Refinement. Any solution? Thanks.

-- Iteration 3
[CPU: 14.29 GB]    Auto batchsize 24566 (each split)
[CPU: 14.29 GB]    Using Max Alignment Radius 44.703 (7.430A)
[CPU: 14.29 GB]    Using dynamic mask.
[CPU: 14.29 GB]   Start local processing...
[CPU: 15.13 GB]  Expand dynamic mask A and B by 11 voxels
[CPU: 15.98 GB]  -- DEV 0 THR 1 NUM 6283 TOTAL 320.48379 ELAPSED 1234.9929 --
[CPU: 15.98 GB]   Newly generated random seed: 639778646
[CPU: 17.23 GB]    Processed 49132.000 images in 1240.024s.
[CPU: 15.97 GB]    Computing Global FSCs... 
[CPU: 16.02 GB]      Done in 133.173s
[CPU: 16.02 GB]  Cross-validation...
[CPU: 19.40 GB]    Using Filter Radius 48.131 (6.901A) | Previous: 44.703 (7.430A)
[CPU: 20.20 GB]  Local decomposition...
[CPU: 20.20 GB]    Processing 1 of 4...
[CPU: 20.89 GB]    Processing 2 of 4...
[CPU: 21.58 GB]    Processing 3 of 4...
Traceback (most recent call last):
  File "cryosparc2_worker/cryosparc2_compute/", line 78, in
  File "cryosparc2_worker/cryosparc2_compute/jobs/nonuniform_refine/", line 747, in

Hi @donghuachen,

We are still not sure why this error happens… we have not been able to reproduce it here. We are trying to investigate, it appears to be a rare edge case.
Could you try changing something (e.g. re-extract the particles with a different box size, or downsample the particles, or set the refinement volume size to a different value in nu-refinement, include more or less particles from 2D classes, run with a subset of particles, etc) and see if the job will succeed somehow? That will really help us figure out what the edge case is.

I wanted to perform Nu refinment on my particle stack I create in Relion3. My particle box size is 220.I have got following error in my job. I am not providing any mask and using dynamic mask option.

[CPU: 2.00 GB]   Traceback (most recent call last):
  File "cryosparc2_worker/cryosparc2_compute/", line 85, in
  File "cryosparc2_worker/cryosparc2_compute/jobs/nonuniform_refine/", line 747, in

Please some one suggest me what I should do?


Hi @Nitesh, thanks for reporting this, we’ve identified the issue and have a patch available. You can get it in cryoSPARC v2.15 with cryosparcm patch:

After you do that, please also refresh cryoSPARC so that it registers the patch files

cryosparcm cli "reload()"
cryosparcm cli "refresh_job_types()"

Let me know if you run into any trouble with that.


Thank you Nick.
It solve the issue.