Project

General

Profile

Actions

Bug #2596

closed

Falcon camera at OIST gives Cannot acquire with current acquisition setup' error

Added by Anchi Cheng almost 11 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
11/22/2013
Due date:
% Done:

0%

Estimated time:
Affected Version:
Appion/Leginon 3.0.0
Show in known bugs:
No
Workaround:

Description

From Matthias Wolf

I got 3.0 mostly installed and working after some tinkering.

I can connect to the Krios and talk to it, insert/retract the cameras and take images on Orius.

But on Falcon, I am getting the following error:
Leginon version: 3.0
(-2147352567, 'Exception occurred.', (u'Cannot acquire with current acquisition setup', u'ESVision', None, 0L, 0))

A black image results.

The pixel count is correctly configured, I am using comtypes 6.0.2 and replaced the safearray.py on windows and configcheck.py tells me I am using the intended *.cfg files. Camera configuration as chosen in the "manual" launcher settings is 4096 x 4096.

We are on Titan 1.5 - maybe something is different?
How can I list all the available camera classes? Maybe there is a name inconsistency.


Files

tia.py (7.74 KB) tia.py tia.py for Titan Krios with Falcon, Orius and STEM Matthias Wolf, 07/03/2014 04:45 AM
Actions #1

Updated by Anchi Cheng almost 11 years ago

Matthias sent me gen_py files. Here are their versions

TEMScripting 0.5.01
TOMMoniker 1.0
ES Vision 3.0
Low Dose Server 0.5.01

Changes to what we know of are minor, so it is unlikely the problem.

TUI version is Titan 1.5 while NUS has 1.3 so that might be a problem if it has a bearing on this.

Actions #2

Updated by Anchi Cheng almost 11 years ago

  • Affected Version changed from Appion/Leginon 2.1.0 to Appion/Leginon 3.0.0

Matthias,

Please tell me what you get on these property calls

from pyscope import tia
t = tia.TIA_Falcon()
t.ccd.Camera
t.ccd.Name
r=t.ccd.PixelReadoutRange
r.StartX
r.StartY
r.EndX
r.EndY
t.ccd.GetTotalPixelReadoutRange.SizeY

By the way, I get these from pyscope tia.py, following what _getImage function has to do before it calls self.acqman.Acquire()

Since the version of the scripting except TUI is similar, I wonder if it does not switch camera properly and ends up trying to acquire with Orius which is smaller in dimension and thus failed. Jian's hint about TUI default camera might be in effect here. He observed that the default camera you get when TUI is started seems to be the only camera we can control through Leginon. It might be that our code does not truly switch camera properly when it comes to image acquisition and setup.

Actions #3

Updated by Anchi Cheng almost 11 years ago

Matthias's email

Hi Anchi!

Today I started another 1 week session on the Titan Krios and I had partial success!

1. I can take images on Falcon with SerialEM
2. after that (serialEM closed), Falcon acquisition seems to work correctly with leginon running on Linux and instrument client on windows.

3. If I exit leginon application on Linux and restart leginon on Linux without doing the SerialEm thing again on windows, it cannot not take an image and previous error occurs (if nothing was touched on the windows side).

4. If leginon admin and client are both running on windows, then the following is true:
If and only if I took an image on serialEM before, then I can record and display it in leginon - but the subsequent image in leginon will result in a novel error (after other error: "DataAccessError: referenced data can not be found: DataReference[class: AcquisitionImageData, dmid: (('titan52332590', 49152), 546), dbid: 13, referent: weak]")

5. I uncommented the STEM entry, but it doesn't seem to make a difference.

I don't worry much about 4.

Thus I think you are right that we are missing something to initialize the Falcon before the image is taken. This apparently works in serialEM, but not in leginon with our current configuration of detectors. Therefore it has most likely nothing to do with differences caused by versions of TIA/Titan system software. I could use serialEM to initialize the camera as a workaround before starting a leginon session, but of course it would be nice if we could identify the source of the problem.

....
Actions #4

Updated by Anchi Cheng almost 11 years ago

  • Assignee changed from Anchi Cheng to Matthias Wolf
  • Priority changed from Normal to Urgent

Matthias,

Is the SerialEM initialization done without Leginon opened and Application (such as Calibrations or Manual) loaded? Or has the Application has already opened and the camera can be found in Camera Settings of a node such as Correction node ?

Another way for me to understand this is if you can try the SerialEM "initialization" between these lines are issued as python commands on PC computer

from pyscope import tia
# Try initialize with SerialEM here
t = tia.TIA_Falcon()
# Try initialize with SerialEM here
t.selectSetup()
t.finalizeSetup()
# Try initialize with SerialEM here
t.acqman.Acquire()

Thanks.

Actions #5

Updated by Anchi Cheng almost 11 years ago

  • Assignee changed from Matthias Wolf to Anchi Cheng

Matthias's answer:

the SerialEM "initialization" was done without any leginon component running.

Matthias's test results:

### no SerialEM whatsoever:
>>> from pyscope import tia
>>> t = tia.TIA_Falcon()
>>> t.selectSetup()
>>> t.finalizeSetup()
>>> t.acqman.Acquire()
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "C:\Python27\lib\site-packages\comtypes\client\dynamic.py", line 42, in __call__
    return self._obj._comobj.Invoke(self._id, *args)
  File "C:\Python27\lib\site-packages\comtypes\automation.py", line 717, in Invoke
    raise COMError(hresult, text, details)
COMError: (-2147352567, 'Exception occurred.', (u'Cannot acquire with current acquisition setup', u'ESVision', None, 0L, 0))

### SerialEM after step 1:
>>> from pyscope import tia
>>> # started SerialEM here, took 1 Falcon image, exited SerialEM
>>> t = tia.TIA_Falcon()
>>> t.selectSetup()
>>> t.finalizeSetup()
>>> t.acqman.Acquire()
>>> # no error!

### SerialEM after step 2:
>>> from pyscope import tia
>>> t = tia.TIA_Falcon()
>>> # started SerialEM here, took 1 Falcon image, exited SerialEM
>>> t.selectSetup()
>>> t.finalizeSetup()
>>> t.acqman.Acquire()
>>> # no error!

### SerialEM after step 3:
>>> from pyscope import tia
>>> t = tia.TIA_Falcon()
>>> t.selectSetup()
>>> t.finalizeSetup()
>>> # started SerialEM here, took 1 Falcon image, exited SerialEM
>>> t.acqman.Acquire()
>>> # no error!

after "initializing" with serialem at step 3 (see below) in PythonWin on the scope PC ...

### SerialEM after step 3:
>>> from pyscope import tia
>>> t = tia.TIA_Falcon()
>>> t.selectSetup()
>>> t.finalizeSetup()
>>> # started SerialEM here, took 1 Falcon image, exited SerialEM
>>> t.acqman.Acquire()
>>> # no error!

... I left the PythonWin shell open on the PC and started the Leginon client on the PC and leginon host on Linux.
Then using manual acquisition I was still able to take a Falcon image on the Linux side and then a few more without any problems.

Then I closed Leginon host on Linux and leginon instrument client on PC.
After restarting leginon both on PC and Linux (the original PythonWin shell remained open and untouched), it produced the known error again upon acquisition on the Linux side.

Therefore, closing leginon (likely the PC instrument client) somehow undoes / resets the "SerialEM initialization".

I checked the status of the CCD camera buttons in TIA and the state in "TEM BlankerShutterMonitor" - there were no evident changes (camera retracted or the like) during all steps of these tests.

   Matthias

Actions #6

Updated by Anchi Cheng over 10 years ago

  • Status changed from Assigned to In Test
  • Assignee changed from Anchi Cheng to Matthias Wolf
  • Priority changed from Urgent to Normal

This is finally resolved with r18332 by setting ScanningServer to Spot mode before every image acquisition. Tested with remote session.

Matthias, please upload here the final tia.py file you are using so that I can make sure that I have not missed anything.

Actions #7

Updated by Matthias Wolf over 10 years ago

Hi Anchi,
sorry about taking my time. I will upload tia.py.

It works, but... Leginon cannot change cameras between Orius and Falcon. Could this be related to the spot-scan change we made in tia.py? I must change manually in the Titan UI.

M

Actions #8

Updated by Anchi Cheng over 10 years ago

Hi, Mathias,

Is Orius controlled by tia or gatan ? You will know it by the instruments.cfg classname used.

If both camera are controlled by tia, this problem might be related to issue #2823. I will need to write a database schema update if you have gone quite far into using them. Otherwise, it is a simple matter of adding the line similar to r18362 to each subclass like this:

class TIA_Falcon(TIA):
  name = 'Falcon'
  ....
class TIA_Orius(TIA):
  name = 'Orius'
  ....
Actions #9

Updated by Matthias Wolf over 10 years ago

Anchi,
Orius is controlled by Gatan, Falcon by TIA:

[Orius]
class: gatan.Gatan
[BM-Falcon]
class: tia.TIA_Falcon

Ideally, this would all be controlled by TIA to confuse the system less.
Where exactly to I add the TIA_ ? In instruments.cfg, or tecnai.py?
M

Actions #10

Updated by Anchi Cheng over 10 years ago

The change I mentioned would be in tia.py. You should find the class definition near the end of it. It may well be that gatan approach does not work for you because of the STEM mode which I don't know the equivalent of Spot mode to be used in DM.

One thing to try before switching to use TIA for Orius (do change instruments.cfg to use the tia.TIA_Orius if you do so) is to choose in TUI "BM-Falcon" in the Camera tab instead of any other camera. It seems that there is a validation within FEI's software that caused other settings not working properly.

Actions #11

Updated by Matthias Wolf over 10 years ago

I tried out your suggestions(incl. selecting Falcon at the start) and they didn't work.
Then I noticed you had included the STEM spotscan line in a trunk update and decided to take a risk and upgraded everything to the latest trunk version (until then, I was on the latest "official" myami-3.0 branch)... now the camera changing is working fine! It is using the same scheme with gatan for Orius and tia for Falcon as before and it looks like the calibrations are still there and all is working! Thanks for your help, Anchi, and the effort you guys put into your own Krios! :-D

Matthias

Actions #12

Updated by Anchi Cheng over 10 years ago

Umm, that means several minor changes together made this work. Sorry for the non-working 3.0 Falcon II will be officially supported in release 3.1, then.

Actions #13

Updated by Sargis Dallakyan almost 7 years ago

  • Status changed from In Test to Closed
Actions

Also available in: Atom PDF