Feature #777
closedHow to support two cameras on one scope
0%
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
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.
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
- File tecnai.py tecnai.py added
- File gatan.py gatan.py added
- File instruments.cfg instruments.cfg added
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.
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'