Copy CTF parameters to re-imported particles?

Hi Oli,

Strange. I’ve just done a little test myself and noticed the same. It seems to be matching whole image stacks and ignoring the stack indices, which feels like a bug to me rather than the intended behaviour. Perhaps @wtempel can help shed some light?

Otherwise, I’m afraid cryosparc-tools, which I’m hopeless at, may be the only way to compare the two arrays.

EDIT:

Blindly cobbled together a cryosparc-tools workflow based on Example 9. The workflow assumes particles are reassociated with their exposures during import. This skirts the need for UID handling when comparing blob/path. Perhaps a starting point for what you want to do?

from cryosparc-tools import CryoSPARC
import numpy as np

cs = CryoSPARC(
    license="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    host="localhost",
    base_port=39000,
    email="ali@example.com",
    password="password123"
)

select_project = "P294"
select_workspace = "W2"
job_original_particles = "J31"
job_imported_particles = "J34"

original_particles = cs.find_job(select_project, job_original_particles).load_output("particles")
imported_particles = cs.find_job(select_project, job_imported_particles).load_output("imported_particles")

original_particles.add_fields(["intersect_field"], ["str"])
original_particles["intersect_field"] = [
    f"{r['location/micrograph_path']}.{r['blob/idx']}"
    for r in original_particles.rows()
]

imported_particles.add_fields(["intersect_field"], ["str"])
imported_particles["intersect_field"] = [
    f"{r['location/micrograph_path']}.{r['blob/idx']}"
    for r in imported_particles.rows()
]

intersection = original_particles.query({"intersect_field": imported_particles["intersect_field"]})

cs.save_external_result(
    select_project,
    select_workspace,
    intersection,
    type="particle",
    name="cryosieve_intersection",
    slots=["blob"],
    passthrough=(job_original_particles, "particles"),
    title="Cryosieved Subset",
)

Cheers,
Yang

3 Likes