linumpy.gpu.corrections#
GPU-accelerated correction operations for linumpy.
Functions#
|
GPU-accelerated galvo shift correction. |
|
Detect and conditionally fix galvo shift. |
Module Contents#
- linumpy.gpu.corrections.fix_galvo_shift(volume, shift, axis=1, use_gpu=True)[source]#
GPU-accelerated galvo shift correction.
- linumpy.gpu.corrections.detect_and_fix_galvo_shift(volume, n_pixel_return=40, threshold=0.5, axis=1, use_gpu=True)[source]#
Detect and conditionally fix galvo shift.
Note: Detection uses CPU (GPU offers no benefit). Only the fix uses GPU.
- Parameters:
- Returns:
np.ndarray – Corrected volume (or original if no fix needed)
dict – Detection results with ‘shift’, ‘confidence’, ‘fixed’ keys
- Return type:
Any