Project

General

Profile

Where to find camc

Added by Scott Stagg over 16 years ago

Hi Leginon folks,

I am trying to set up Leg. on our CM120. I am following the instructions on the installation web page with modifications based on what I derived that Jim did for the installation on our CM300. I think I have the tem side working properly as the following (from http://emg.nysbc.org/bb/viewtopic.php?t=246 ) worked for me:

from pyScope import CM 
mytem = CM.CM() 
mytem.getMagnification()

When I tried:

from pyScope import tietz 

python crashed, and this isn't really surprising because I didn't install CAMC. I haven't found anywhere in the documentation where it describes where to get CAMC and how to install it. Is it already installed if the Tietz software is working?

Thanks,

Scott


Replies (8)

- Added by Jim Pulokas over 16 years ago

It should be called CAMC4.exe, so search for that on your hard drive. In our case, I think it was installed when they installed our camera. If it is not there, it may be possible to copy it from your other computer, but I am not sure exactly what files would need to be copied. It may depend on some other DLLs. If you have an installation disk from Tietz, you may be albe to find it on that.

If you think CAMC4 is installed, another thing that may cause problems is if you install pyScope using "python setup.py install" rather than using a windows installer exe, then it will not do some important initizlization using the install-pyscope.py script. The only thing to solve this right now is to first install pyScope 1.0.8 using the installer, then install whatever version you want on top of it using "python setup.py install".

- Added by Scott Stagg over 16 years ago

I can't seem to find a windows installer .exe for pyScope. I have pyScope-1.0.8, and that has a setup.py file. But I don't see any installer. In the setup for the CM300, it's PYTHONPATH points to a directory that contains pyScope. It doesn't seem to be using the one in site-packages.

- Added by Jim Pulokas over 16 years ago

Now I remember... When I was at FSU, we set up the Windows computer to mount the samba share on your linux computer. We set it up so that both computers were using the same Leginon and pyScope, because this made it easier to debug things and not have to keep copying changes between the two computers. This explains why your python path is not normal.

We probably never used the Windows installer to install pyScope because that would have installed it in the standard location (c:\python25\lib\site-packages). You may need to download the installer: http://emg.nysbc.org/software/pyscope/ or it is included in the Leginon 1.5b windows installer package.

Now I can't remember how we set up that special path on windows. It could have been by creating Leginon.pth and pyScope.pth files in site-packages, or it was by actually modifying the environment variable. In the standard installation, Leginon is installed in a folder called "Leginon" in site-packages. A file called Leginon.pth is also created, but it points to the local Leginon rather than an external one on a samba share.

- Added by Scott Stagg over 16 years ago

I have decided that since I am going to be doing some developing on pyScope I will continue to use Leginon and pyScope from the Samba share. I'm going to have a svn directory for each microscope to keep things straight. I have figured out how to set the PYTHONPATH variable on Windows (you use the regedit command and navigate to Python25 etc), so I won't have to worry about python finding the directory. Is there any way that I can use my external pyScope directory without running the Windows installer? Can I just manually do the things the installer does? Can I simply execute the install-pyscope.py script?

BTW, I found CAMC4.exe.

- Added by Jim Pulokas over 16 years ago

As it is right now, the install-pyscope.py script will not run stand alone. There is a function get_special_folder_path that only seems to exist if you are running the script from a python installer. Also there is this

if sys.argv[1] == '-install':
which only seems to be set during a python install command.

The workaround might be:

Make a copy of install-pyscope.py and call it something else, then put it in svn so other people can use it. In the new script, get rid of all that get_special_folder_path stuff and get rid of all the shortcut creation stuff. That is just creating a shortcut to the updatecom.py script, which you can do manually if you want it. Now get rid of the "if sys.argv" condition and just run all the code without a condition.

You can see that the main purpose for this script is to call the updatecom.py script (which registers the COM modules that pyScope needs) and to register the tietzping module, which Christian created (not sure what it's for).

By the way, the updatecom.py script does work stand alone, but it won't take care of the

tietzping thing. Maybe this can all be cleaned up to work both in the stand alone case and in the installer case.

- Added by Scott Stagg over 16 years ago

OK, I'm stuck. I can't figure out how to get camera to work. I tried using the Windows installer, and python crashed when I tried "from pyScope import tietz" . I tried using python setup.py install and it crashed. Somewhere in the BB or leginon docs. it talks about having the right driver for the camera. How do I know what the right driver is? Where is it set up with Leginon? If the camera works with the Tietz software, does that mean that the right driver is installed properly? Do you have any suggestions for how I should proceed?

Thanks,

Scott

More info - Added by Scott Stagg over 16 years ago

I tried going through the install-pyscope file line by line in the python interpreter, and I now have some more information for you. Here is the line where things break down

>>>pyScope.updatecom.run(os.path.join(pythonfolder, 'pyScope'))
Generating .py files from type libraries...
Tecnai Scripting: Error, cannot find typlib for "Tecnai Scripting" 
Tecnai Low Dose Kit: Error, cannot find typelib for "Low Dose Server Library" 
Tecnai Exposure Adaptor: Error, cannot find typelib for "adaExp Library" 
Gatan CCD Camera: Error, cannot find typelib for "TecnaiCCD 1.0 Type Library" 
Tietz CCD Camera: Error, cannot create file "C:\Python25\Lib\site-packages\pyScope\tietzcom.py" 
Dpne.

All it says about the Tietz camera is that it cannot create the tietzcom.py file. Any ideas?

Scott

- Added by Scott Stagg over 16 years ago

OK, I figured it out. After going through the updatecom.py file line by line, I determined that for some reason python would not write to site-packages. Weird. Anyway, I made the stand-alone install-pyscope file that you suggested and had it output to the local directory instead of the site-packages one. That worked like a charm. Now I have a new problem and I'm going to post it as a new thread in pyScope.

BTW. I will commit my new install-pyscope to SVN after I'm sure everythin workds and I won't mess anybody up.

Scott

    (1-8/8)