Error during tilt series alignment (patchtracking)

75 views
Skip to first unread message

David Boyer

unread,
Sep 22, 2023, 4:39:22 PM9/22/23
to EMAN2
Hello,

I am having trouble aligning a few tilt series, and I'm not sure why. I wonder if anyone knows what's going on? BTW, this only happens with a subset of my tilt series with no apparent pattern that distinguishes them. Below is the command and the error message:

e2tomogram.py tiltseries/$input --zeroid=-1 --tltstep=5.0 --npk=20 --tltkeep=0.75  --outsize=1k --bytile --notmp --pkkeep=0.75 --compressbits=8 --clipz=256 --bxsz=32 --filterres=40.0 --extrapad --rmbeadthr=-1.0 --threads=16 --patchtrack=2 --niter=1 --ppid=-1 --tltax=-94.8 --maxshift=0.5

/home/davboyer/cryoem/miniconda3/envs/eman-dev/bin/e2tomogram.py:787: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
  px=np.array(px)
Traceback (most recent call last):
  File "/home/davboyer/cryoem/miniconda3/envs/eman-dev/bin/e2tomogram.py", line 2342, in <module>
    main()
  File "/home/davboyer/cryoem/miniconda3/envs/eman-dev/bin/e2tomogram.py", line 410, in main
    ttparams, loss0= do_patch_tracking(imgs_500, ttparams, options)
  File "/home/davboyer/cryoem/miniconda3/envs/eman-dev/bin/e2tomogram.py", line 796, in do_patch_tracking
    tilex[i]=tilex[lasti]+px[i]
ValueError: operands could not be broadcast together with shapes (2,) (8192,)

Muyuan Chen

unread,
Sep 22, 2023, 5:03:24 PM9/22/23
to em...@googlegroups.com
I think it happens when one tilt drifts too far and gets out of the region of the tomogram...I typically discard those data so I did not come up with a fix. Maybe it can be fixed with try except but maybe easier to just throw away bad data?


--
--
----------------------------------------------------------------------------------------------
You received this message because you are subscribed to the Google
Groups "EMAN2" group.
To post to this group, send email to em...@googlegroups.com
To unsubscribe from this group, send email to eman2+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/eman2

---
You received this message because you are subscribed to the Google Groups "EMAN2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eman2+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eman2/5a06e355-34dd-4ee1-9e90-6153472a191fn%40googlegroups.com.

David Boyer

unread,
Sep 22, 2023, 8:24:33 PM9/22/23
to EMAN2
I think you are right. Sadly, many of my tilt series have a few really off tilts in my current dataset. My colleague Peng Ge made a patch for this, which I attach here. (He wanted me to note he accidentally made a reverse patch).

It helped me to get e2tomogram.py to process my tilt series, at least.

e2tomogram.patch

Muyuan Chen

unread,
Sep 22, 2023, 8:46:17 PM9/22/23
to em...@googlegroups.com
Good to know. If it works for most of your data and don’t crash on other datasets, let me know. 

I can make a fix but I don’t have datasets that trigger the same error to do tests. I remember seeing similar errors but it is hard to find that bad data. For those outlier issues making fixes sometimes trigger other errors in other datasets. If your fix doesn’t break for other data we can add that to the main branch.

Muyuan

On Sep 22, 2023, at 5:24 PM, David Boyer <davb...@g.ucla.edu> wrote:

I think you are right. Sadly, many of my tilt series have a few really off tilts in my current dataset. My colleague Peng Ge made a patch for this, which I attach here. (He wanted me to note he accidentally made a reverse patch).
Reply all
Reply to author
Forward
0 new messages