ValueError during 3D variability

When I try to run a 3D Variability job on my current dataset, I get the following error message in the console during the first iteration:

[CPU: 4.44 GB]   Traceback (most recent call last):
  File "cryosparc_worker/cryosparc_compute/", line 85, in
  File "cryosparc_worker/cryosparc_compute/jobs/var3D/", line 529, in
  File "cryosparc_worker/cryosparc_compute/jobs/var3D/", line 465, in
ValueError: operands could not be broadcast together with shapes (384,384,384) (768,768,768) (384,384,384) 

The input is particles from a homogeneous refinement; to reduce the box size, I have tried both Downsample Particles and re-extracting at binned size 384, with the same result.

Hi @camittacm ,

This is most likely caused by the mask being sampled at a different box size than the particles. Can you take a look at the mask slice plots at the start of the stream log and confirm that the axes limits range from 0 to 767? This would indicate that the mask is sampled at a box size of 768, whereas the particles have size 384.

Right now the only workaround is to use the Volume Tools to regenerate and resample the mask to box size 384. This can be done by providing the input mask, changing the type of input/output parameter to “mask”, and then setting the box size of 384 (see attached image for an example with resampling to size 64).

Screen Shot 2022-09-26 at 4.06.09 PM

Edit: As of CryoSPARC v4.0+, all jobs that take masks as inputs will allow for re-sampling of the mask to match the necessary volume/particles’ box and pixel sizes.


Yes, the axis limits are from 0 to 767. I will try the volume tools!