Project

General

Profile

Actions

Feature #777

closed

How to support two cameras on one scope

Added by Scott Stagg over 14 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
07/26/2010
Due date:
% Done:

0%

Estimated time:
Deliverable:

Description

In my preliminary investigations, it seems that Leginon currently is not capable of supporting two cameras on one scope. I would like to see if it is possible to add this as a Leginon feature. As a short-term work around, do you suppose that it would be possible to have two separate installations of leginon on the same PC: one that is configured for one camera, and one for the other?


Files

tecnai.py (62.7 KB) tecnai.py Scott Stagg, 07/16/2012 03:16 PM
gatan.py (14.1 KB) gatan.py Scott Stagg, 07/16/2012 03:16 PM
instruments.cfg (1.4 KB) instruments.cfg Scott Stagg, 07/16/2012 03:16 PM

Related issues 1 (0 open1 closed)

Related to Leginon - Bug #1048: GIF switches to EFTEM mode, has different magnificationsClosedAnchi Cheng10/11/2011

Actions
Actions #1

Updated by Anchi Cheng over 14 years ago

Do you mean using two camera in the same session, taking some images with one and others with the other? At one point, this was certainly functional when we had an off-axis TV camera on T2. It might be broken now since we use self.instrument to
get instrument information a lot.

Actions #2

Updated by Scott Stagg over 14 years ago

Hi Anchi, I don't think I need to use both cameras simultaneously. I mean one camera for one session, and a different camera for a different session. They would need separate flat fields etc. It's not clear how I would specify two cameras in the configuration or how I would choose one or the other.

Updated by Scott Stagg over 12 years ago

Related to this, I am now having a problem where I cannot use my previous setup to support the EFTEM mode and the GIF with myami2.2. Previously, I had used a workaround where I made new Tecnai and Gatan classes in pyscope, and treated the cameras/EM mode as different instruments entirely. After the update, Leginon is giving me the error below:

C:\Python25\Lib\site-packages\leginon>C:\python25\python.exe launcher.py
(importing fake libcv)
Traceback (most recent call last):
  File "launcher.py", line 14, in <module>
    import noderegistry
  File "C:\python25\Lib\site-packages\leginon\noderegistry.py", line 33, in <mod
ule>
    import leginon.allnodes
  File "C:\python25\Lib\site-packages\leginon\allnodes.py", line 163, in <module
>
    from driftmanager import DriftManager
  File "C:\python25\Lib\site-packages\leginon\driftmanager.py", line 20, in <mod
ule>
    import EM
  File "C:\python25\Lib\site-packages\leginon\EM.py", line 15, in <module>
    from pyscope import tem, ccdcamera, registry
  File "C:\python25\Lib\site-packages\pyscope\registry.py", line 16, in <module>

    for c in config.getTEMClasses():
  File "C:\python25\Lib\site-packages\pyscope\config.py", line 93, in getTEMClas
ses
    parse()
  File "C:\python25\Lib\site-packages\pyscope\config.py", line 63, in parse
    cls = getattr(mod, clsname)
AttributeError: 'module' object has no attribute 'GatanGIF'

The tecnai and gatan python files that I used are attached, as well as instruments.cfg. Note that when TecnaiEFTEM and GatanGIF are commented out in instruments.cfg, launcher.py actually works.

Actions #4

Updated by Anchi Cheng over 12 years ago

  • Assignee set to Scott Stagg

The problem, I think is duplicated class name in each module.

For example, in gatan.py you have

class Gatan(ccdcamera.CCDCamera):
    name='Gatan'
    .....

and then
class Gatan(ccdcamera.CCDCamera):
    name='GatanGIF'
    .....

The second class in the module should start with

class GatanGIF(ccdcamera.CCDCamera):
    name='GatanGIF'

config.py could not find class GatanGIF in gatan.py without a class named so. The name that is defined inside the class is only how it will be displayed in Leginon.

Same problem with tecnai.py

I would also suggest that instead of duplicating Gatan class to make a new class GatanGIF, you simply make a subclass that inherit Gatan class. I think it would work just as well, and it involves only two lines like this:

class GatanGIF(Gatan):
    name='GatanGIF'

Actions #5

Updated by Anchi Cheng about 11 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF