Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with getting images in Andor sdk 2 #91

Open
sulton560 opened this issue Sep 18, 2024 · 0 comments
Open

problem with getting images in Andor sdk 2 #91

sulton560 opened this issue Sep 18, 2024 · 0 comments

Comments

@sulton560
Copy link

Thank you for this great library. I am facing problems with getting images from my iStar Spectroscope using this library. The problem is when using the _read_frames function I get image with no information in it (I mean laser shot or anything). matrice with the shape of 1024x1024 and with the values from 495 to 530. I gave the shape of this image according to my detector size. But what I want to get is the two dimensional matrice with wavelength and counts in it.
To get a better image i tried to use the other function getAcquiredData() but I get the following error. Can you please guide me how to solve it.

And one more question, Can you please tell me what is the range in _read_frames function? and what is the limit of it. To get a single scan I passed (0,1) to the range. Am I using it correctly?

Traceback (most recent call last):
File "C:\Users\cpl_laptop\AppData\Local\Temp\ipykernel_7832\1184092104.py", line 109, in get_data
my_data = cam.get_acquired_data()
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\cpl_laptop\anaconda3\Lib\site-packages\pylablib\devices\Andor\AndorSDK2.py", line 1098, in get_acquired_data
result = lib.GetAcquiredData(dim)
^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1, in
File "C:\Users\cpl_laptop\anaconda3\Lib\site-packages\pylablib\core\utils\ctypes_wrap.py", line 267, in wrapped_func
func_args=self._prepare_arguments(argnames,prep_argtypes,kwargs,argprep)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\cpl_laptop\anaconda3\Lib\site-packages\pylablib\core\utils\ctypes_wrap.py", line 160, in _prepare_arguments
v=functions.call_cut_args(p,**kwargs) if hasattr(p,"call") else p
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\cpl_laptop\anaconda3\Lib\site-packages\pylablib\core\utils\functions.py", line 309, in call_cut_args
return func(*args,**cut_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\cpl_laptop\anaconda3\Lib\site-packages\pylablib\core\utils\ctypes_wrap.py", line 336, in prep
n=args[size_arg_pos]
~~~~^^^^^^^^^^^^^^
IndexError: tuple index out of range

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant