Forums » Software Installation »
Leginon 3.0 client could not recognize the Gatan CCD
Added by Long Gui almost 11 years ago
To whom it may concern,
I am trying to install the Leginon 3.0 client on the TEM computer but I have a little problem about the Gatan camera recognition. I followed this link: http://emg.nysbc.org/projects/leginon/wiki/Gatan_on_Windows-32
to set up the client files but after I started leginon and connected the remote with the microscope computers, only the TEM is recognized and the Gatan camera did not show up.
Then I run this command:
form pyscope import gatan
g = gatan.Gatan()
g.setExposureTime(200)
g.getImage()
The results displays:
name 'gatani' is not defined
If I tried a different command:
form pyscope import gatan
g = gatani.Gatani()
g.setExposureTime(200)
g.getImage()
It also exit with an error:
AttributeError: 'module' object has no attribute 'IGatanCamera'. (Figure.1)
Our system is a FEI T12 TEM equipped with a Gatan Ultrascan CCD camera. The DigitalMicrograph software edition is 1.85.1535. One thing I noticed that previously I can control the CCD camera on the FEI Interface, but after we updated the DigitalMicrograph software, this FEI interface could not recognize the camera either. (Figure.2) So I guess maybe some important plugins or components are missing so the Leginon clients could not recognize the CCD camera?
Thanks a lot in advance.
-Long
Figure1.png (47.6 KB) Figure1.png | |||
Figure2.png (178 KB) Figure2.png |
Replies (21)
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Anchi Cheng almost 11 years ago
Try run updatecom.py and then send me the one generated from TecnaiCCD. You will find the word 'tecnaiCCD somewhere in the file generated. Also give me the TUI version and let me know if any update has been made on that side.
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Long Gui almost 11 years ago
Hello Anchi,
I have attached the .py file generated from TecnaiCCD after I run updatecom.py.
Our current TUI version is version 3.1.3 and we did not change our TUI software.
Thanks a lot,
-Long
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Long Gui almost 11 years ago
Hello Anchi,
I forgot to mention that the Gatan DigitalMicrograph software edition is 1.85.1535 and I think it is also a new edition of Gatan DM software series 1.0
Thanks,
Long
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Anchi Cheng almost 11 years ago
Looks like tecnaiccd,dll is the same as before, same version and the content looked the same as well.
It could be the version but the error said that it could not find the class in the module when the python file generated by tecnaiccd.dll clearly has it. Therefore could you try one more time now that we are sure that updatecom.py has generated the python file?
Thanks.
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Long Gui almost 11 years ago
Hello Anchi,
Sorry for the late reply since we focus on the TF20 and K2 camera recently and do not have more time on this T12/CCD system...
Today I had quick talk with FEI engineer and he showed that the FEI interface could recognize the camera via TIA software. So after I open both DM and TIA software, the camera control workspace on the FEI interface could work well.
However, after I opened both DM and TIA, I run the test command:
form pyscope import gatan g = gatani.Gatani() g.setExposureTime(200) g.getImage()
It still returns a error command:
AttributeError: 'module' object has no attribute 'IGatanCamera'.
So have you known a seminar situation like this before?
I searched the Leginon installation notes and find this following content:
Modify comtypes if TIA controlling camera is used or Gatan camera is controlled by older, 32-bit computer.
IMPORTANT: After installing comtypes, you must make one modification to it. The module "safearray.py" that comes with comtypes must be replaced with a modified version that we provide. You can find the custom version of safearray.py in the pyscope package. Please copy this module from pyscope into the installed comtypes folder: C:\Python2*\Lib\site-packages\comtypes\. It should replace the safearray.py that is included in comtypes.Remove safearray.pyc in C:\Python2*\Lib\site-packages\comtypes\ if it does not appear to recompile (timestamp of the file change) when you import comtype in python command line
Do you think this modification could fix our problem?
Thanks a lot in advance,
-Long
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Anchi Cheng almost 11 years ago
Hi, Long,
It appears that your problem happened before the part using comtypes, but in the initialization step, which is why I didn't mention it. You should however apply the patch regardless because it will come up when this problem is solved.
I will have to consult Gatan about this. In the mean time, you might give tia.TIA a try.
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Anchi Cheng almost 11 years ago
Our scope with the same version of DM is up today, and I checked there. It worked fine. It means that it is not a version problem and is specific to your site. It means talking to Gatan won't help.
I did find a few things you can try to diagnose your problem.
1. I was wrong about comtypes is not an issue at initialization. It is imported and initialized to create tecnaiccd client. When it fails, it trys the old comarray. Therefore, check if you can initialize comtypes with these python commands:
import comtypes import comtypes.client
If either of these fails, apply the patch for safearray to see if it helps. 2. Check if you have multiple copies of things on the scope/camera computer and clean them up. The followings are most likely to cause problems:
- comtypes
- comarray
- tecnaiccd.dll
- the .py file generated from updatecom.py
Which python version do you have on this computer?
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Long Gui over 10 years ago
Hello Anchi,
Sorry to bother you again after such a long time. Because we are going to have more and more users on the other microscopy, Kelly and I plan to finish the Leginon configuration on this T12 microscopy with Leginon 3.0.
It is great to hear from you that you did not have any problems in the Leginon with Gatan DM 1.85.1535
For your suggestions:
1. I have run these python commands
import comtypes
import comtypes.client
And there is no results after running. I think it is a good thing at least no error message shows.
2. I am running python 2.7.3 with Leginon 3.0
So I searched for the keywords "comarray" but no package named "comarray" is found in python folder.
I looked for comarray in the online instructions, but it is only mentioned in Leginon 2.1 with Python 2.5.
Thanks a lot in advance!
-Long
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Long Gui over 10 years ago
Hello Anchi,
I am sorry to bother you again. We are still having a problem with the Leginon 3.0 on T12 about recognizing the camera.
One thing that I forget to mention is that we used to install Leginon 2.1 with Python 2.5 on that computer. I removed all related Leginon 2.1 files before I install the new Leginon 3.0 on that computer. Do you think it is possible some left old Leginon files would induce such a problem? (Maybe the best way is to re-install the operation system on the TEM computer?)
Thanks,
Long
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Anchi Cheng over 10 years ago
Hi, Long,
All Leginon files,except the configuration, reside in python's site-packages folder, regardless of version. On Windows computer, this would be C:\Python25\Lib\site-packages.
Look for the packages names that is named after the Leginon subpackages, then you will see if they are still there.
By the way, this has gone on for a while, now. Is it possible to setup a remote login so we can work from there ? We can talk off-line.
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Long Gui over 10 years ago
Hello Anchi,
Thank you very much for your help. Definitely I can set up a remote login so that you can diagnose the problem much easier.
I am free tomorrow and most of time next week. Which time is most convenient for you Anchi? And what's the software do you usually use? (teamview or windows remote control?)
Thanks again,
Long
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Long Gui over 10 years ago
Hello Anchi,
Thank you very much for your effort this afternoon! After I change the camera type to tia.TIA, the Leginon can recognize the camera now. After I run the test command
form pyscope import tia
g = tia.TIA
g.setExposureTime(200)
g.getImage()
The TIA could take a image now. (As the attached image shows) And the Leginon client on the TEM computer could recognize the camera as "TIA" now.
However, I am having another difficulty here: the Leginon client on the TEM computer could not recognize the TEM at this moment. The "get magnification" button on the client is grey.
I have run the updatecom.py and the results show "Initializing Tecnai Scripting .. Done"
I have also attached the instrument.cfg file as the attached file. Could you take a quick check it?
Thanks a lot!
Long
TIA_image.bmp (7.5 MB) TIA_image.bmp |
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Long Gui over 10 years ago
Sorry. instrument.cfg was not uploaded in the last post.
instruments.cfg (2.29 KB) instruments.cfg | |||
instruments.cfg (2.29 KB) instruments.cfg |
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Anchi Cheng over 10 years ago
Hi, long,
If you do directly the test of module functionality as in FEI_TecnaiTitan_installation_specifics, does it give any error
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Long Gui over 10 years ago
Hello Anchi,
I have followed the steps on the http://emg.nysbc.org/projects/leginon/wiki/FEI_TecnaiTitan_installation_specifics
And after I run
t = tecnai.Tecnai()
The Python program displayed an error saying "unable to initialize Tecnai interface"
I have not faced any problem like this before and I am sure that the FEI Tecnai interface runs nicely before I test this command.
You can also check more information as the attached file.
Thanks a lot!
-Long
Tecnai_testing.bmp (1.55 MB) Tecnai_testing.bmp |
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Anchi Cheng over 10 years ago
Long,
While the error message is a minor bug, the fact that it needs to print the non-existing error message means a real problem.
The last time I saw this was when I attempted to install on an FEI scope without TEM Scripting activated. The software is on the computer which is why we were able to find it in updatecom.py script. However, if you did not purchase it with the microscope, it is not usable. A software registration key is required and can only be activated by FEI. You should talk to your service engineer to find out if it is registered to use. If it has worked before, something is corrupted on this computer since tecnaiccd.dll also does not work.
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Long Gui over 10 years ago
Hello Anchi,
Thank you for your answer. Just to confirm it, I have just run updatecom.py and I have attached the result.
The result of "updatecom.py" shows that "initializing TEM scripting.. done". Does that indicate that we still have this TEM scripting activated? Or should I still have to talk with a FEI engineer to activate it?
Thanks a lot,
Long
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Anchi Cheng over 10 years ago
I only learned this recently. updatecom.py only tells you that the software FILE is on the computer. To use it, FEI has to give permission. This permission comes from a software registration key they issue.
Since the scope has the TEM Scripting files, when your service engineer log in for service, he/she will be able to use it because the service account is authorized to use everything FEI provide. However, when a user log in, as supervisor or not, software registration key needs to be in place for you to use it.
Yes, you still need to talk to FEI engineer to check the activation.
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Long Gui over 10 years ago
Hello Anchi,
I have asked the FEI engineer and he asked me to run c:/tecnai/configurator.exe and the result show as the attached file.
Based on the result, the FEI engineer answered that the TEM scripting files have been installed and activated.
Just wondering, is there any case that the Leginon fails to talk with FEI Tecnai Interface?
Thanks,
Long
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Anchi Cheng over 10 years ago
Unfortunately, no. I have never seen this.
Let's try a remote session again. I need to try a few things.
RE: Leginon 3.0 client could not recognize the Gatan CCD - Added by Anchi Cheng over 10 years ago
Move the thread for tecnai not initialize to tecnai.Tecnai can not be initialized