Comments (4)
Could you check your Andor SDK2 version?
Accroding to its changelog, version 2.94.30001.0 fixed bug stating Fix for SDK defaulting to using an unavailable PAG for iXon 888
. That could be the reason you're experiencing this issue.
If updating SDK2 version does not help, you can try moving preamp_gain=self.GetPreAmpGain(pa)
(line 660 in atmcd32d_lib.py
) inside the try
block immediately following it, i.e., move it one line down and add an extra indent. This should get rid of this particular error, although there might be similar error further down the line (e.g., when trying to get or set the preamp gain or the amplifier mode). If you do try this, could you also report the result of executing cam.get_all_amp_modes()
?
from pylablib.
I'm using SDK version 2.104.33000.0.
I tried making that change in atmcd32d_lib.py
and got DRV_NOT_SUPPORTED
from SetNumberPrescans
. Here's the traceback:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Covey Lab\pyLabLib\pylablib\devices\Andor\AndorSDK2.py", line 112, in __init__
self.open()
File "C:\Users\Covey Lab\pyLabLib\pylablib\devices\Andor\AndorSDK2.py", line 239, in open
self._setup_default_settings()
File "C:\Users\Covey Lab\pyLabLib\pylablib\devices\Andor\AndorSDK2.py", line 182, in _setup_default_settings
self.setup_kinetic_mode(1)
File "C:\Users\Covey Lab\pyLabLib\pylablib\devices\Andor\AndorSDK2.py", line 69, in wrapped
res=func(self,*args,**kwargs)
File "C:\Users\Covey Lab\pyLabLib\pylablib\devices\Andor\AndorSDK2.py", line 704, in setup_kinetic_mode
lib.SetNumberPrescans(num_prescan)
File "<string>", line 1, in <lambda>
File "C:\Users\Covey Lab\pyLabLib\pylablib\core\utils\ctypes_wrap.py", line 278, in wrapped_func
retval=func(*call_args)
File "C:\Users\Covey Lab\pyLabLib\pylablib\devices\Andor\atmcd32d_lib.py", line 41, in errchecker
raise AndorSDK2LibError(func.__name__,result)
pylablib.devices.Andor.atmcd32d_lib.AndorSDK2LibError: function 'SetNumberPrescans' raised error 20991(DRV_NOT_SUPPORTED)
Also, here is the output from get_all_amp_modes
(I printed them from the AndorSDK2Lib
call in atmcd32d_lib.py
since the camera didn't get fully set up):
[TAmpModeFull(channel=0, channel_bitdepth=16, oamp=0, oamp_kind='Electron Multiplying', hsspeed=0, hsspeed_MHz=30.0, preamp=0, preamp_gain=1.0), TAmpModeFull(channel=0, channel_bitdepth=16, oamp=0, oamp_kind='Electron Multiplying', hsspeed=0, hsspeed_MHz=30.0, preamp=1, preamp_gain=2.0), TAmpModeFull(channel=0, channel_bitdepth=16, oamp=0, oamp_kind='Electron Multiplying', hsspeed=1, hsspeed_MHz=20.0, preamp=0, preamp_gain=1.0), TAmpModeFull(channel=0, channel_bitdepth=16, oamp=0, oamp_kind='Electron Multiplying', hsspeed=1, hsspeed_MHz=20.0, preamp=1, preamp_gain=2.0), TAmpModeFull(channel=0, channel_bitdepth=16, oamp=0, oamp_kind='Electron Multiplying', hsspeed=2, hsspeed_MHz=10.0, preamp=0, preamp_gain=1.0), TAmpModeFull(channel=0, channel_bitdepth=16, oamp=0, oamp_kind='Electron Multiplying', hsspeed=2, hsspeed_MHz=10.0, preamp=1, preamp_gain=2.0), TAmpModeFull(channel=0, channel_bitdepth=16, oamp=0, oamp_kind='ElectronMultiplying', hsspeed=3, hsspeed_MHz=1.0, preamp=0, preamp_gain=1.0), TAmpModeFull(channel=0, channel_bitdepth=16, oamp=0, oamp_kind='Electron Multiplying', hsspeed=3, hsspeed_MHz=1.0, preamp=1, preamp_gain=2.0), TAmpModeFull(channel=0, channel_bitdepth=16, oamp=1, oamp_kind='Conventional', hsspeed=0, hsspeed_MHz=1.0, preamp=0, preamp_gain=1.0), TAmpModeFull(channel=0, channel_bitdepth=16, oamp=1, oamp_kind='Conventional', hsspeed=0, hsspeed_MHz=1.0, preamp=1, preamp_gain=2.0), TAmpModeFull(channel=0, channel_bitdepth=16, oamp=1, oamp_kind='Conventional', hsspeed=1, hsspeed_MHz=0.10000000149011612, preamp=0, preamp_gain=1.0), TAmpModeFull(channel=0, channel_bitdepth=16, oamp=1, oamp_kind='Conventional', hsspeed=1, hsspeed_MHz=0.10000000149011612, preamp=1, preamp_gain=2.0)]
from pylablib.
OK, it looks like there are still some capabilities which are not always supported, but which the class does not check. Could you replace the line 704 in AndorSDK2.py (it's the lib.SetNumberPrescans(num_prescan)
line which raises the error) with
if self._check_option("set",AC_SETFUNC.AC_SETFUNCTION_PRESCANS):
lib.SetNumberPrescans(num_prescan)
else:
num_prescan=0
I apologize for such awkward step-by-step debugging, but the documentation is not always 100% clear on which errors can arise in which situation, and which functions may or may not be available.
from pylablib.
That seems to work -- at least no exceptions are thrown now when I connect to the camera. I'm still in the process of setting everything up so I don't have any tests I can run to make sure it fully works, but I'll let you know if I encounter anything else. Thanks!
from pylablib.
Related Issues (20)
- Andor Timeout Error HOT 3
- Live acquisition HOT 8
- No module named 'pylablib.devices.Andor.utils' HOT 1
- Fails on Linux platform with Ando SDK2 installed. HOT 2
- Hello, please tell me who used the thorlabs_apt_device library how to correctly call the status_ method to get the position in millimeters!
- Parameters not set correctly after initializing Thorlabs BSC203 HOT 3
- Clarification on MPC-XXX device operation HOT 13
- BSC 201-3 Can not home HOT 2
- Problem when opening connection with zelux (thorlabs camera) HOT 3
- Connection problem with MLS203 thorlabs stage and BBD302 controller HOT 3
- External Triger and DDG in AndorSDK2 HOT 1
- Set/Reset trigger with pyLabLib for Thorlabs KDC101 HOT 4
- Arcus Performax Stage AttributeError: NoneType object has no attribute 'argtypes' HOT 3
- Kinesis BBD302 x-stage moving but y-stage is not homing
- ThorlabsBackendError: backend exception: 'read returned less data than expected' ('read returned less data than expected') HOT 1
- Absolute movement causes the stage to move continously in wrong direction HOT 5
- Pyinstaller Executable Crashing
- setup_velocity method does not change minimum velocity and maximum velocity HOT 1
- BPC301 - connected, but no communication HOT 2
- Issue with jogging channel 3 of Kinesis Piezomoter with KIM101 4 channel controller HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pylablib.