Error when optimizing per-particle defocus while Homogeneous refinement

Hello, I obtain the following error when running an Homogeneous refinement with the option of optimize per-particle defocus, it runs until iteration 6 and then fails. If I ran it only switching that option to No then it works nicely.

[CPU: 2.90 GB] Traceback (most recent call last):
File “cryosparc2_worker/cryosparc2_compute/run.py”, line 85, in cryosparc2_compute.run.main
File “cryosparc2_worker/cryosparc2_compute/jobs/refine/newrun.py”, line 401, in cryosparc2_compute.jobs.refine.newrun.run_homo_refine
File “cryosparc2_worker/cryosparc2_compute/jobs/refine/newrun.py”, line 402, in cryosparc2_compute.jobs.refine.newrun.run_homo_refine
File “cryosparc2_worker/cryosparc2_compute/jobs/ctf_refinement/run_local.py”, line 192, in cryosparc2_compute.jobs.ctf_refinement.run_local.full_defocus_refine
File “cryosparc2_compute/jobs/runcommon.py”, line 1318, in log_plot
imgfiles = _upload_plot_img_files(base_file_name, fig_or_pngstringio, is_gif)
File “cryosparc2_compute/jobs/runcommon.py”, line 1564, in _upload_plot_img_files
pngdata = _fig_to_stringio(fig_or_pngstringio, ‘png’)
File “cryosparc2_compute/jobs/runcommon.py”, line 1548, in _fig_to_stringio
fig.savefig(s, format=format, bbox_inches=‘tight’, pad_inches=0)
File “/home/carlos/cryosparc/cryosparc2_worker/deps/anaconda/lib/python2.7/site-packages/matplotlib/figure.py”, line 1565, in savefig
self.canvas.print_figure(*args, **kwargs)
File “/home/carlos/cryosparc/cryosparc2_worker/deps/anaconda/lib/python2.7/site-packages/matplotlib/backend_bases.py”, line 2180, in print_figure
**kwargs)
File “/home/carlos/cryosparc/cryosparc2_worker/deps/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py”, line 537, in print_png
_png.write_png(renderer._renderer, filename_or_obj, self.figure.dpi)
RuntimeError: libpng signaled error

I wonder if anyone have any insight regarding this error.

Thank you
Adrian

Hi @Adrian,

This seems to be a dependency related problem in plotting. Which version of cryoSPARC is this?

Hi @apunjani
This is cryoSPARC v2.15.0, I know there is v3.1.0 however as far as I know CUDA 9.2 is required and it is not installed in my workstation.
In the failed job I set the Num. particles to plot to 0, I do not know if it makes sense with a problem in plotting.

Hi @Adrian,

I think you’re probably right - setting num particles to plot to zero would cause this error. The library is failing to plot because the plot is completely empty. The plotting doesn’t take very long so probably best to leave it at the default value.