Project

General

Profile

Actions

Feature #3786

open

advance phase plate at fixed time interval

Added by Anchi Cheng almost 9 years ago. Updated almost 5 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Start date:
11/27/2015
Due date:
% Done:

0%

Estimated time:
Deliverable:

Description

simple wait for user method


Files

nextphaseplate.au3 (921 Bytes) nextphaseplate.au3 AutoIt script for phase plate advance on scope Matthias Wolf, 03/27/2016 09:12 AM
pp_application.png (46.6 KB) pp_application.png add phase plate node to MSI-T2 Matthias Wolf, 08/09/2016 05:00 AM
nextphaseplate.exe (954 KB) nextphaseplate.exe William Rice, 01/19/2017 12:13 PM
Actions #1

Updated by Jian Shi over 8 years ago

Hi Anchi,

Is phase plate functioning. I saw some code in the respository but I can't find the tool in any node or application. I am using latest 19600 version. I would happy to test it for you on our Krios.

Regards,
Jian

Actions #2

Updated by Anchi Cheng over 8 years ago

I was working with Matthias Wolf when I committed these changes. There is no TEM scripting for advancing phase plate, so the node simply wait for the user. However, we locally on his scope used a cursor/mouse button manipulation program called AutoIt to "click" the "Next Phase Plate" button on TUI to achieve automation effect.

The node class is PhasePlateAligner. It needs PhasePlatePublishEvent binding from Exposure node. The usage and settings is similar to AlignZLP for energy filter. Therefore, you will need to define a reference target (empty) somewhere on the grid.

FEI promise a scripting access but it has not happened, yet.

Nearly in-focus phase plate usage also needs multi-point focus measurement averaging. Issue #3785

These will be release on 3.3. Matthias is fairly happy with it, but there are still details to clean up. You are welcome to try out. Maybe you will notice different problems.

Actions #3

Updated by Matthias Wolf over 8 years ago

On popular demand, I am adding a brief description of automated phase plate (pp) advance with AutoIt.
The pp is working brilliantly on our Krios thanks to Anchi's 4-point focuser and pp conditioner (initiates next pp and charges up pp for preset time after chosen time elapsed). AutoIt does Windows GUI automation and works very reliably, but requires the flapped-out "next pp" OCX open in TUI and visible on screen.

1. Download and install AutoIt on the scope PC: [[https://www.autoitscript.com/site/autoit/downloads/]]
2. pp conditioner node is already in repository, I think. Requires reference position (empty square) in grid atlas.
3. Tecnai.py on the scope client needs Anchi's pp modification - look for "AUTOIT".
Set AUTOIT_EXE_PATH = "C:\\Program Files\\AutoIt3\\nextphaseplate.exe" in Tecnai.py on scope PC
4. Modify attached AutoIt script to match your pp OCX window dimensions (use AutoIt Window Info Finder Tool)
and compile to exe file

Matthias

Actions #4

Updated by Anchi Cheng over 8 years ago

committed pyscope/tecnai.py that calls AutoIt script executable to go with Matthias's instruction above as r19640

Actions #5

Updated by Jian Shi over 8 years ago

I got AUTOIT script and exe working, and installed latest GIT version includes the function all. But I am not quite sure how tecnai.py call the exe? Is there a node, or setting to control it?

Actions #6

Updated by Jian Shi over 8 years ago

Jian Shi wrote:

I got AUTOIT script and exe working, and installed latest GIT version includes the function call. But I am not quite sure how tecnai.py call the exe? Is there a node, or setting to control it?

Actions #7

Updated by Matthias Wolf over 8 years ago

Hi Jian,
there is a variable AUTOIT_EXE_PATH in tecnai.py on the microscopy PC, which points to the path and name of the executable. Compile the autoit script, store it in a readable place and modify this path.
Matthias

Actions #8

Updated by Jian Shi over 8 years ago

Hi Matthia,

I have done what you have pointed out, and it works well when I double click the exe on Krios PC. Tecnai.py was also modified to the path.

But I am wondering if there is a node/setting in Leginon to activate the function call to the exe. ie. How to control the intervals and incubating time etc.

There is some code in wx folder, suggesting there may be a node for phase plate, just like LN2 filler. But I didn't see it anywhere in latest applications.

Actions #9

Updated by Matthias Wolf over 8 years ago

Jian, I don't know where the applications "live" and how to export them... probably in the database.

Try first to import Anchi's latest MSI-T2 xml through the web interface.

If the phase plate node does not show up in the node list, you can create your own new application based on your old one: In leginon GUI "Application - Edit", "Application - Load", choose your existing MSI-T2, right-click on "Main - add node", choose "Phase Plate Aligner", name it "Phase Plate". Then in "exposure" and "Presets Manager" right-click and "bind event" to "Phase Plate" as in the attached screen shot. Save the application under a new name, e.g. "PP-MSI-T2".

I did the same for adding the GIF zero-loss align conditioner, hence "PP-MSI-T2-GIF". For tomo it's similar. Once you load the new application, the properties of the new nodes are self-explanatory when you open them.
Anchi, maybe you could make the phase plate conditioner a default of MSI-T2 (3.3)?

Actions #10

Updated by Jian Shi over 8 years ago

Thanks a million, Matthias.

Regards, Jian

Actions #11

Updated by Anchi Cheng over 8 years ago

Matthias,

Thanks for helping Jian. To answer your questions, yes the applications live in the database.

See Applications regarding "Exporting to Leginon application XML file

It can then imported at the other end.

I will add PP control in 3.3 applications.

Actions #12

Updated by William Rice almost 8 years ago

added file from krios2

Actions #13

Updated by Anchi Cheng almost 7 years ago

  • Status changed from Assigned to Closed
Actions #14

Updated by William Rice over 5 years ago

  • Status changed from Closed to New

I'm trying to get the PP app working here. I don't see any AUTOIT_EXE_PATH in Tecnai2.py (in the pyscope directory) on the scope PC, and I don't see a tecnai.py file anywhere in the site packages directory. Where is this variable now defined?

Actions #15

Updated by William Rice over 5 years ago

NM found it in fei.cfg

Actions #16

Updated by Anchi Cheng almost 5 years ago

Saved nextphaseplate.au3.txt as NextPhasePlate.au3 in pyscope/autoit

Also changed the fei.cfg key to

AUTOIT_PHASE_PLATE_EXE_PATH

Actions

Also available in: Atom PDF