I would like to read out image analytics data (e.g. defocus values, astigmatism, relative ice thickness, CTF resolution, etc.) on-the-fly from CryoSPARC Live sessions to feed them into a “TEM Monitoring Overview” tool we have been working on. It seems like some information is in the .cs files of the live session (e.g. ./CS-project-name/S1/ctfestimated/), but not all of it. Notoriously, CTF resolution (CTFmaxres) is missing, for instance, or image mean intensity values. Is there any way to get an efficient readout of all session image analytics, as they are shown in the “Overview” tab of the respective Live session?
As far as I could see, CS tools also doesn’t offer this via any API points. Maybe I am also simply blind. At any rate, any help in this matter would be greatly appreciated!
In CryoSPARC v4.7, one may query exposure attributes using the rtp command client’s get_exposure() method.
The rtp client can be accessed
in cryosparc-tools via the CryoSPARC-type object’s rtpattribute: rtp = cs.rtp
or in the interactive cli, available through the cryosparcm icli shell command, where rtp is defined upon icli startup.
The exposure attributes you are interested in, or close proxies thereof, can be obtained as follows for an (hypothetical) exposure with ID 9 of the S1 Live session of project P99:
An offset needs to be applied when comparing the exposure IDs between the Live session (index starts at 1) and a Manually Curate Exposures job that loads the exported Live exposures (index starts at 0). Exposure ID 9 in the rtp.get_exposure() command would correspond to Index 8 in the Manually Curate Exposures job.
The rtp client functionality will change in a future CryoSPARC release. Scripts using the rtp client will need to be modified correspondingly.