I notice there is a function cryosparc_2_cs_ctf_parameters that exists in the repository, but is never actually executed. I'd expected to see the function be called somewhere here, but it isn't. The function was added in this commit "Converting everything but Zernike coefs, and I haven't been able to find any other context.
|
def cryosparc_2_cs_ctf_parameters(cs, df=None): |
|
log = logging.getLogger('root') |
|
if df is None: |
|
df = pd.DataFrame() |
|
if 'ctf/tilt_A' in cs.dtype.names: |
|
log.debug("Recovering beam tilt") |
|
df[star.Relion.BEAMTILTX] = cs['ctf/tilt_A'][:, 0] |
|
df[star.Relion.BEAMTILTY] = cs['ctf/tilt_A'][:, 1] |
|
if 'ctf/shift_A' in cs.dtype.names: |
|
pass |
|
if 'ctf/trefoil_A' in cs.dtype.names: |
|
pass |
|
# df[star.Relion.ODDZERNIKE] = cs['ctf/trefoil_A'] |
|
if 'ctf/tetrafoil_A' in cs.dtype.names: |
|
pass |
|
# df[star.Relion.EVENZERNIKE] = cs['ctf/tetra_A'] |
|
if 'ctf/anisomag' in cs.dtype.names: |
|
df[star.Relion.MAGMAT00] = cs['ctf/anisomag'][:, 0] |
|
df[star.Relion.MAGMAT01] = cs['ctf/anisomag'][:, 1] |
|
df[star.Relion.MAGMAT10] = cs['ctf/anisomag'][:, 2] |
|
df[star.Relion.MAGMAT11] = cs['ctf/anisomag'][:, 3] |
|
return df |
Can you tell me more about it?
Context: A colleague of mine asked if it was possible to transfer the CTF parameter metadata when converting files from CryoSPARC back to Relion. That's how I found this function. It looks like it does some of what we want, but we are currently struggling to figure out exactly how to make the conversion to the Zernike parameters Relion needs.
I notice there is a function
cryosparc_2_cs_ctf_parametersthat exists in the repository, but is never actually executed. I'd expected to see the function be called somewhere here, but it isn't. The function was added in this commit "Converting everything but Zernike coefs, and I haven't been able to find any other context.pyem/pyem/metadata.py
Lines 291 to 312 in 4af3869
Can you tell me more about it?
Context: A colleague of mine asked if it was possible to transfer the CTF parameter metadata when converting files from CryoSPARC back to Relion. That's how I found this function. It looks like it does some of what we want, but we are currently struggling to figure out exactly how to make the conversion to the Zernike parameters Relion needs.