Project

General

Profile

TVIPS XF416 camera

Added by Morgan Beeby about 3 years ago

Hi Anchi,

As first step in upgrading Leginon 3.1 to Leginon 3.5 I'm installing on our T12 with a new TVIPS XF416 camera (which I never configured for Leginon 3.1). I have an error message, but also wondered -- when I clear the error -- which teitz class this camera should use?

I go to register CAMC4.exe (I need to go into the EMMENU directory for this):


cd C:\TVIPS\EMMENU\Bin
CAMC4.exe /regserver

Then run updatecom.py:

cd C:\python27\Lib\site-packages\pyscope
C:\python27\python.exe updatecom.py

But get an error:

initializing Tietz CCD Camera
Error, cannot find typelib for "('CAMC4 1.0 Type Library',)"

I'm afraid I've not used Windows for a couple of decades so waaay out of my depth with troubleshooting (though tried finding out about inspecting the registry, etc,...).

Do you have any thoughts on how to go about troubleshooting?

many thanks,

Morgan


Replies (7)

RE: TVIPS XF416 camera - Added by Anchi Cheng about 3 years ago

We have a XF416 as well. Nice camera. I did not get it to work properly with the new CAMC4, though. Had some trouble with the new calls when I need to reach it through a remote computer like the case Leginon is. A work around is to use EMMENU scripting. See

Tivips_f416_electron_diffraction_recording

For single image acquisition, you won't need to set up recorder, just Leginon view port and tvips.cfg

I don't know if you have XF416E_GPU or XF416. I only produced the subclass for the GPU version but did not coded any function specific to the GPU part, yet.

RE: TVIPS XF416 camera - Added by Morgan Beeby almost 3 years ago

Hi Anchi,

Sorry, moving at a glacial rate troubleshooting this due to stacks of teaching...

I am now getting a difficult-to-decipher error when I test the camera using pyscope. I note that we actually have TVIPS' EMMENU5 installed, which I'm concerned may be the issue?

>>> from pyscope import tietz2
>>> t=tietz2.EmMenuF416()
# Generating comtypes.gen._3DC9CBF0_E47B_4FF6_9CEE_C4CC3699403E_0_1_0
C:\Python27\lib\site-packages\comtypes\tools\codegenerator.py:474: UserWarning: Structure IMAGE_VECTOR: PACKING FAILED: field bstrImgFolder offset (32/64)
  warnings.warn(message, UserWarning)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\pyscope\tietz2.py", line 61, in __init__
    self._connectToEMMENUScripting()
  File "C:\Python27\lib\site-packages\pyscope\tietz2.py", line 149, in _connectToEMMENUScripting
    connection = get_emmenu()
  File "C:\Python27\lib\site-packages\pyscope\tietz2.py", line 43, in get_emmenu
    connection.instr = comtypes.client.CreateObject('EMMENU4.EMMENUApplication.1')
  File "C:\Python27\lib\site-packages\comtypes\client\__init__.py", line 242, in CreateObject
    return _manage(obj, clsid, interface=interface)
  File "C:\Python27\lib\site-packages\comtypes\client\__init__.py", line 188, in _manage
    obj = GetBestInterface(obj)
  File "C:\Python27\lib\site-packages\comtypes\client\__init__.py", line 110, in GetBestInterface
    mod = GetModule(tlib)
  File "C:\Python27\lib\site-packages\comtypes\client\_generate.py", line 112, in GetModule
    mod = _CreateWrapper(tlib, pathname)
  File "C:\Python27\lib\site-packages\comtypes\client\_generate.py", line 188, in _CreateWrapper
    mod = _my_import(fullname)
  File "C:\Python27\lib\site-packages\comtypes\client\_generate.py", line 26, in _my_import
    return __import__(fullname, globals(), locals(), ['DUMMY'])
  File "C:\Python27\lib\site-packages\comtypes\gen\_3DC9CBF0_E47B_4FF6_9CEE_C4CC3699403E_0_1_0.py", line 510, in <module>
    assert sizeof(IMAGE_VECTOR) == 1248, sizeof(IMAGE_VECTOR)
AssertionError: 1208

My C:\Python27\Lib\site-packages\pyscope\instruments.cfg:

[XF416]
class:tietz2.EmMenuF416
zplane: 50
width: 4096
height: 4096

And my C:\Python27\Lib\site-packages\pyscope\tvips.cfg:

#####################################################################
## This config file describes TVIPS F416 configuration that can not
## be set through scripting.  These configurations must match
## EMMENU configuration
##
[debug]
ALL = False
CAMERA = False
[sensor]
PIXELSIZE_UM%X = 15.5
PIXELSIZE_UM%Y = 15.5
[recorder]
DIRECTORY = C:\Temp\
DEFAULT_FILENAME = Image

Did I mess something up...?

thanks for your continued pointers...

Morgan

RE: TVIPS XF416 camera - Added by Anchi Cheng almost 3 years ago

Looks like some compiler problem. I will have to ask TVIPS about EMMENU5.

RE: TVIPS XF416 camera - Added by Anchi Cheng almost 3 years ago

Our EMMENU is 5.2.12. What is yours ?

Did you install as 64-bit version of python ? What is comtypes version ? It might be a comtypes problem.

RE: TVIPS XF416 camera - Added by Anchi Cheng almost 3 years ago

EMMENU exact version ?

RE: TVIPS XF416 camera - Added by Anchi Cheng almost 3 years ago

The error message indicates "field bstrImgFolder offset (32/64)
warnings". I think you will need to install 64-bit version python.

Uninstall your 32-bit packages and python Using Windows Uninstall tools, and then delete anything in C:\Python27. It should give you a clean start to do the 64-bit installation.

I had success installing python 2.7.16 and then install comtypes 1.1.7 through pip installation. I added the 2.7.18.amd64.msi In the File link which should work, too. The rest of supporting packages executable are from our site.

    (1-7/7)