Skip to content
Draft
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
97ab376
first functional offset-piezo scanned lock-in raster scan camera (not…
barentine Oct 10, 2024
db3bb13
Merge branch 'master' of https://github.com/python-microscopy/python-…
barentine Jan 29, 2025
afb5021
Merge branch 'master' of https://github.com/python-microscopy/python-…
barentine Jan 30, 2025
b340661
fix metadata grabs
barentine Feb 24, 2025
ae8f627
use linspace instead of arange for scan position generation in softwa…
barentine Feb 24, 2025
f7afeab
add null data_len property to TestSignalProvider
barentine Feb 25, 2025
f48ca4a
Merge branch 'master' of https://github.com/python-microscopy/python-…
barentine Mar 4, 2025
ceb386b
add pointscan scanner and camera baseclasses
barentine Mar 4, 2025
6deb77e
add a test pointscan camera init script
barentine Mar 4, 2025
7db2543
grab camera channel count and set shape in protocolacquisition
barentine Mar 4, 2025
4ca5a6c
add offset stage scanner using the new baseclasses, and remove raster…
barentine Mar 4, 2025
4e5704f
add software scanner which does not use offset stages
barentine Mar 5, 2025
cfb2ecd
give the scanner default buffer allocation / destruction methods, use…
barentine Mar 5, 2025
dc1b382
some cleanup/docstrings
barentine Mar 5, 2025
0301218
move buffer wait into base class and fix width/height swap
barentine Mar 6, 2025
126a443
add preliminary NIDAQmx scanner
barentine Mar 6, 2025
b4cce6c
fix fast-scan order for nidaq scanner
barentine Mar 6, 2025
9226902
wire up dtype for pointscan camera to scanner
barentine Mar 7, 2025
a58f26e
add Camera.dtype attribute, to set current frame datatype in framewra…
barentine Mar 7, 2025
299615f
pass camera dtype as backend kwarg
barentine Mar 10, 2025
11c1ccd
add non-uint16 dtype support for HDFBackend
barentine Mar 10, 2025
204f409
add multichannel subclass of ZStackAcquisition and use it in spoolcon…
barentine Mar 10, 2025
7b629b6
add n_channels attribute to camera base class
barentine Mar 10, 2025
28323e2
move multichannel camera handling out of spoolcontroller, into protoc…
barentine Mar 10, 2025
2c75c33
add move_to_position method and use it to optionally return to scan c…
barentine Mar 11, 2025
da0202a
fix default dtype def in nidaq scanner
barentine Mar 14, 2025
e844c36
set timeout based on pixel count and dwell, and handle dynamic return…
barentine Mar 14, 2025
71c360e
handle channel settings through a class rather than passing a dict
barentine Mar 14, 2025
132a47d
change voxelsize units to um (standard for PYMEACquire stages and cam…
barentine Mar 14, 2025
00e178d
bidirectional scanning for nidaq
barentine Mar 17, 2025
a46f17f
write bidirectional into buffer correctly
barentine Mar 18, 2025
3fa2ed3
add pixel clock rate getter/setter to base scanner
barentine Mar 26, 2025
e1c3bac
spool single shot mode using software trigger
barentine Mar 26, 2025
e25e96c
scan in a thread to free up the GUI
barentine Mar 27, 2025
9e3984b
Merge branch 'master' of https://github.com/python-microscopy/python-…
barentine Apr 1, 2025
b95f865
add continuous mode, and fix some threaded software trigger issues
barentine Apr 11, 2025
bab496b
add a basic cam control panel to adjust pixel count and stride on poi…
barentine Apr 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
set timeout based on pixel count and dwell, and handle dynamic return…
… type from read (list vs list of list depending on dim)
  • Loading branch information
barentine committed Mar 14, 2025
commit e844c36e9000a25df8755b99f08c28aeb778aca0
11 changes: 7 additions & 4 deletions PYME/Acquire/Hardware/pointscan_shim/nidaq_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# 'min_val': -1,
# 'max_val': 1,
# 'units': VoltageUnits.VOLTS,
# 'terminal_config': TerminalConfiguration.NRSE
# 'terminal_config': TerminalConfiguration.RSE
# },
# }

Expand Down Expand Up @@ -168,16 +168,19 @@ def _scan(self):
# start counter task (which should actually kick this whole thing off)
ctr_task.start()
# wait until we're done
ctr_task.wait_until_done()
ctr_task.wait_until_done(timeout=2 * self.n_steps / self._pixel_clock_rate)
# read data from AI task
data = ai_task.read(number_of_samples_per_channel=self.n_steps)
# print(data)

# write the scan buffer to the full frame buffer
for ind in range(self.n_channels):
buf = self.free_buffers.get_nowait()
# thought data should be (n_channels, n_steps), but comes as list of lists
buf[:] = np.asarray(data[ind]).reshape(self.width, self.height)
if self.n_channels > 1:
# thought data should be (n_channels, n_steps), but comes as list of lists
buf[:] = np.asarray(data[ind]).reshape(self.width, self.height)
else:
buf[:] = np.asarray(data).reshape(self.width, self.height)
with self.full_buffer_lock:
self.full_buffers.put(buf)
self.n_full += 1
Expand Down