Skip to content

Camera attempt#43

Merged
AdvancedImagingUTSW merged 9 commits into
developfrom
camera_attempt
Feb 3, 2022
Merged

Camera attempt#43
AdvancedImagingUTSW merged 9 commits into
developfrom
camera_attempt

Conversation

@AdvancedImagingUTSW
Copy link
Copy Markdown
Collaborator

@andrewjUTSW Want to pull these changes in? Tested both the synthetic mode and the real mode on the acquisition computer and it seemed to not throw any errors.

Provides minimal framework for us to build up imaging workflows. Camera works. DAQ works. Stage works. Shutters work... Will tune up the lasers next.

AdvancedImagingUTSW and others added 9 commits February 1, 2022 15:17
Need to look at this bug:

  File "C:\Users\Spectral\Anaconda3\envs\ASLM\lib\tkinter\__init__.py", line 1885, in __call__
    return self.func(*args)
  File "C:\Users\Spectral\Documents\GitHub\ASLM\src\controller\sub_controllers\acquire_bar_controller.py", line 100, in launch_popup_window
    self.parent_controller.execute('acquire')
  File "C:\Users\Spectral\Documents\GitHub\ASLM\src\controller\aslm_controller.py", line 279, in execute
    self.threads_pool.createThread('camera', self.model.acquire_image())
  File "C:\Users\Spectral\Documents\GitHub\ASLM\src\model\aslm_model.py", line 70, in acquire_image
    self.daq.write_waveforms_to_tasks()
  File "C:\Users\Spectral\Documents\GitHub\ASLM\src\model\devices\daq\NI\NIDAQ.py", line 331, in write_waveforms_to_tasks
    self.galvo_etl_task.write(self.galvo_and_etl_waveforms)
  File "C:\Users\Spectral\Anaconda3\envs\ASLM\lib\site-packages\nidaqmx\task.py", line 1221, in write
    self._raise_invalid_write_num_chans_error(
  File "C:\Users\Spectral\Anaconda3\envs\ASLM\lib\site-packages\nidaqmx\task.py", line 1092, in _raise_invalid_write_num_chans_error
    raise DaqError(
nidaqmx.errors.DaqError: Write cannot be performed, because the number of channels in the data does not match the number of channels in the task.

When writing, supply data for all channels in the task. Alternatively, modify the task to contain the same number of channels as the data written.

Number of Channels in Task: 4
Number of Channels in Data: 1
No more errors being thrown.  Function being called properly, but the camera now hangs.  I'm not sure if we are initializing the camera in the proper mode.  Checking next.
Now consistent.
Pretty brutal on so many levels, but success.  Had to dig into the camera API, evaluate my wiring, check signals on oscilloscopes, etc.
Also tried to clean up the Hamamatsu API code to make it slightly more readable.  But not much.
@AdvancedImagingUTSW AdvancedImagingUTSW merged commit ab92e12 into develop Feb 3, 2022
@codeCollision4 codeCollision4 deleted the camera_attempt branch June 27, 2022 14:05
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

Successfully merging this pull request may close these issues.

2 participants