cryo-EM TIFF movies to single low-res jpg

99 views
Skip to first unread message

Jerry (Fengbin) Wang

unread,
Feb 19, 2024, 3:15:50 PM2/19/24
to EMAN2
Dear EMAN2 users and developers

I am wondering whether there is a quick method in EMAN2 to convert TIFF movies (40 frames) into low-res jpgs? As sometimes, we want to look at jpgs first to select movies, while jpgs are not always provided.

I tried a few things in e2proc2d but couldn't find a way to add 40 frames in the TIFF together (without alignment)

Many thanks
Jerry

Ludtke, Steven J.

unread,
Feb 19, 2024, 3:19:04 PM2/19/24
to em...@googlegroups.com
Not sure exactly what "low res" means in this case, but you can certainly use 

e2proc2d.py file.tif file.jpg --average

or if you're after a "thumbnail" or somesuch

e2proc2d.py file.tif file.jpg --meanshrink 12 --average

In general:
e2proc2d.py --help
and
e2help.py processors

should give you information on most of what you need. 

---
Steven Ludtke, Ph.D. <slu...@bcm.edu>                      Baylor College of Medicine
Charles C. Bell Jr., Professor of Structural Biology        Dept. of Biochemistry 
Deputy Director, Advanced Technology Cores                  and Molecular Pharmacology
Academic Director, CryoEM Core
Co-Director CIBR Center


--
--
----------------------------------------------------------------------------------------------
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/b8fcda85-a9e2-4af4-a448-3a9a2a340708n%40googlegroups.com.

Ludtke, Steven J.

unread,
Feb 19, 2024, 3:20:57 PM2/19/24
to em...@googlegroups.com
Maybe worth mentioning the less obvious wildcard mechanism (it  is mentioned in --help) too:

e2proc2d.py *.tif @.jpg --meanshrink=12 --average

---
Steven Ludtke, Ph.D. <slu...@bcm.edu>                      Baylor College of Medicine
Charles C. Bell Jr., Professor of Structural Biology        Dept. of Biochemistry 
Deputy Director, Advanced Technology Cores                  and Molecular Pharmacology
Academic Director, CryoEM Core
Co-Director CIBR Center

On Feb 19, 2024, at 1:24 PM, Jerry (Fengbin) Wang <jerry...@gmail.com> wrote:

Jerry (Fengbin) Wang

unread,
Feb 19, 2024, 3:48:01 PM2/19/24
to EMAN2
Many thanks Steven! I didn't put --meanshrink before --average which caused the problem

I have a follow-up question. When I ran this command 

e2proc2d.py input.tif output.png --meanshrink=4 --average

The output file looks perfect if I opened it by e2display. However, in a Mac folder, the preview looks dark. The meanshrink=12 file looks more bright. Is there a fix to this?

image.png

Ludtke, Steven J.

unread,
Feb 19, 2024, 5:34:00 PM2/19/24
to em...@googlegroups.com
The default for PNG images is 16 bit output, and the values may not span the 16 bit range without scaling. If you do:

e2proc2d.py input.tif output.png:8 --meanshrink=4 --average

it should generate 8 bit PNGs instead

---
Steven Ludtke, Ph.D. <slu...@bcm.edu>                      Baylor College of Medicine
Charles C. Bell Jr., Professor of Structural Biology        Dept. of Biochemistry 
Deputy Director, Advanced Technology Cores                  and Molecular Pharmacology
Academic Director, CryoEM Core
Co-Director CIBR Center

On Feb 19, 2024, at 2:48 PM, Jerry (Fengbin) Wang <jerry...@gmail.com> wrote:

Many thanks Steven! I didn't put --meanshrink before --average which caused the problem

I have a follow-up question. When I ran this command 

e2proc2d.py input.tif output.png --meanshrink=4 --average

The output file looks perfect if I opened it by e2display. However, in a Mac folder, the preview looks dark. The meanshrink=12 file looks more bright. Is there a fix to this?

Sen, Anindito

unread,
Feb 19, 2024, 6:23:49 PM2/19/24
to em...@googlegroups.com
Thanks Guys,

I was also about to enquire about this.  



Stay safe & Regards


Anindito Sen. Ph.D


Microscopy and Imaging Center 
Texas A&M University

301 Old Main Dr

College Station, TX 77843-2257

 

Office: ILSB Room 1133
Tel. 979-458-9881

fax: 979-847-8933

http://microscopy.tamu.edu



From: em...@googlegroups.com <em...@googlegroups.com> on behalf of Ludtke, Steven J. <slu...@bcm.edu>
Sent: Monday, February 19, 2024 2:20 PM
To: em...@googlegroups.com <em...@googlegroups.com>
Subject: Re: [EMAN2] cryo-EM TIFF movies to single low-res jpg
 
Maybe worth mentioning the less obvious wildcard mechanism (it is mentioned in --help) too: e2proc2d. py *. tif @. jpg --meanshrink=12 --average --- Steven Ludtke, Ph. D. <sludtke@ bcm. edu> Baylor College of Medicine Charles C. Bell Jr. , Professor
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd

Jerry (Fengbin) Wang

unread,
Feb 19, 2024, 6:59:49 PM2/19/24
to EMAN2
Oops, I got this after adding :8

Is it my python or Eman2 version problem?

Screenshot 2024-02-19 at 5.58.15 PM.png

Many thanks!
Regards,
Jerry

Ludtke, Steven J.

unread,
Feb 19, 2024, 7:08:24 PM2/19/24
to em...@googlegroups.com
Your installed version may be too old. You can try --outmode=uint8 instead?

---
Steven Ludtke, Ph.D. <slu...@bcm.edu>                      Baylor College of Medicine
Charles C. Bell Jr., Professor of Structural Biology        Dept. of Biochemistry 
Deputy Director, Advanced Technology Cores                  and Molecular Pharmacology
Academic Director, CryoEM Core
Co-Director CIBR Center

On Feb 19, 2024, at 5:59 PM, Jerry (Fengbin) Wang <jerry...@gmail.com> wrote:

Oops, I got this after adding :8

Is it my python or Eman2 version problem?

Jerry (Fengbin) Wang

unread,
Feb 20, 2024, 12:53:22 AM2/20/24
to EMAN2
Many thanks Steven! I still have some issues in my eman2 version, but I figured out a two-step command to get around this from your old posts:

e2proc2d.py 20240202_1132_A000_G000_H001_D001.tiff tmp.png --meanshrink=4 --average
e2proc2d.py tmp.png tmp.jpg --fixintscaling sane

Thanks again!
Jerry

Reply all
Reply to author
Forward
0 new messages