How can I get the information about per-particle scale factor of each particle?

Hi All,
I ran a Local Refinement job with the option “minimize over per-particle scale” enabled, and I obtained an image showing the distribution of per-particle scale factors in the results, as shown in the attached picture. However, after converting the particles.cs and passthrough_particles.cs files into a STAR file using pyem, I noticed that the resulting file does not contain any information about these scale factors. Initially, I thought the rlnCtfBfactor column might correspond to this parameter, but the values in this column are all zero.
Is there a way to extract this information?
Thank you!

Hi @Wayne – if you are just trying to export the per-particle scale values, you can get those using cryosparc tools. For example, the script below saves them in a .txt file (but any number of other formats are also possible).

from cryosparc.tools import CryoSPARC
import json
import numpy as np
from pathlib import Path

with open(Path('~/instance-info.json').expanduser(), 'r') as f:
    instance_info = json.load(f)

cs = CryoSPARC(**instance_info)
assert cs.test_connection()

project_uid = "P345"
project = cs.find_project(project_uid)

job_uid = "J15"
job = project.find_job(job_uid)

particles = job.load_output("particles")

per_particle_scale = particles["alignments3D/alpha"]

with open(f"{project_uid}-{job_uid}_per-particle-scale.txt", "w") as f:
    f.write("\n".join(str(s) for s in per_particle_scale))
1 Like