Would it be possible to add a metric for exposure curation that captures the variance between patches/knots within a mic during patch motion? Inspection of the patch motion plots and comparison with the micrographs suggests that it might be a pretty clean way to differentiate between good micrographs and micrographs with no ice or a lot of junk.
Also, an FFT-based metric that reports the max SNR in the ice ring band (rather than the average, as relative ice thickness does) would be handy, as it is an easy way to separate out crystalline ice.
Related to the patches question, are there any metrics such as total motion, local motion curvature, or patch CTF stats that would be more easily suited to the “messy” micrographs. Can you post a couple micrographs, one of the “messy” mic and one of a “clean” mic?
In this particular case it is just reporting on empty holes (no ice) - which can be caught by poor CTF fit, unless there is carbon in the frame in which case the CTF fit will still look ok. In other cases the patch-variation seems to report on the presence of junk, or very thin/breaking ice.
I don’t have local motion curvature as an option in Curate, just full frame motion curvature?
I will see if I can dig up some micrographs - or maybe best is I will see if I can make a proof-of-concept CS-tools script to see if this useful for identifying mics that are otherwise not removed by other exclusion criteria.
In this particular case it is just reporting on empty holes (no ice) - which can be caught by poor CTF fit, unless there is carbon in the frame in which case the CTF fit will still look ok. In other cases the patch-variation seems to report on the presence of junk, or very thin/breaking ice.
Good to know, thanks!
I don’t have local motion curvature as an option in Curate, just full frame motion curvature?
Ah, yes sorry, full frame motion correction. Local is only available after local motion correction and wouldn’t be useful here.
The per-patch trajectories are not stored in any of the output files of PMC, but its possible to use the splines that are output in the job directory. We have a notebook example for deriving per-particle trajectories from patch motion trajectories. Part of this notebook includes the relevant code to interpret the splines and compute the per-patch trajectories.
Although for some reason even though it preserves the rigid motion & local motion output slots, the local motion & rigid motion slots don’t show up in curate jobs launched from the subsets - not sure why. Maybe the thumbnails need to be in the actual job one launches Curate from?
In any case it does a pretty decent job of separating out micrographs with junk & broken ice, not sure yet whether it is better for that purpose than other metrics, but perhaps worth playing with. I have it calculating the maximum displacement (added frame by frame) as well as the average patchwise, and you can use either metric to output subsets (either manual thresholds or n bins).
Cheers
Oli
EDIT
Makes me think - it would be useful if there was a way to add support for custom statistics to both curate micrographs and subset particles by statistic - that way the user could calculate a statistic with a script, but then have the selection/subsetting/plotting handled by native CS jobs
After briefly parsing your code, it seems like passthroughs aren’t retained in the external results job. I would add the passthrough information to you function that writes out your subsets, e.g.:
cs.save_external_result(
project_uid="P1",
workspace_uid="W3",
dataset=dropped_mics,
type="exposure",
name="exposures",
slots=["ctf"],
passthrough=("J145", "exposures"), # Connects to original data
title="dropped mics")
not sure yet whether it is better for that purpose than other metrics
Let us know if you find any good uses!
it would be useful if there was a way to add support for custom statistics to both curate micrographs and subset particles by statistic