RuntimeError: Astigmatism angle is outside [-2 pi, 2 pi]

Hello,
I am running an ab intitio reconstruction of my own dataset and I keep getting the following error:
Traceback (most recent call last):
File “/home/exx/cryosparc/cryosparc-compute/sparcjob.py”, line 288, in
cuda_devs = current_experiment_params[‘cuda_devs’])
File “/home/exx/cryosparc/cryosparc-compute/abinit.py”, line 342, in abinit
class_anneal_beta = class_anneal_beta)
File “/home/exx/cryosparc/cryosparc-compute/reconstruct.py”, line 281, in reconstruction_kernel
work(img)
File “/home/exx/cryosparc/cryosparc-compute/reconstruct.py”, line 187, in work
C = img.get_parametric_ctf()
File “/home/exx/cryosparc/cryosparc-compute/dataio/data.py”, line 155, in get_parametric_ctf
self.parametric_ctf = ctf.ParametricCTF(params=p)
File “/home/exx/cryosparc/cryosparc-compute/ctf/ctf.py”, line 73, in init
raise exceptions.RuntimeError(‘Astigmatism angle is outside [-2 pi, 2 pi]: {0} rad, {1} deg. Likely a missing degrees to radians conversion.’.format(angast,180*angast/n.pi))
RuntimeError: Astigmatism angle is outside [-2 pi, 2 pi]: -9.81032166377 rad, -562.090027 deg. Likely a missing degrees to radians conversion.

This error appears early in the reconstruction, usually after iteration 4 or 5. I have tried this with a single class and multiple classes and the same error occurs. Is this a problem with the data set? Is there a way to manually convert degrees to radians in my dataset?

Thank you.

Hi Taylor,

Thanks for reporting. This is most likely a bad value in your star file (assuming you used a star file as input?). CryoSPARC expects astigmatism angles to be in degrees in the star file, but in the range [-360,360]. Your star file has at least one particle that is being seen at later iterations that has an astigmatism angle = -562.09. Perhaps you can look in your star file to find the offending particle? There may actually be a parsing issue (if there is no whitespace between two columns in some line for example).

Ali

Thank you. In my .star file there was one micrograph with that astigmatism value. Once I removed it from the dataset everything ran smoothly.

Great, glad it’s sorted out.