stereo.algorithm.spa_track.SpaTrack.get_velocity_grid¶
- SpaTrack.get_velocity_grid(spatial_key=None, grid_num=50, smooth=0.5, density=1.0)[source]¶
Convert cell velocity to grid velocity for streamline display.
The visualization of vector field borrows idea from scTour: https://github.com/LiQian-XC/sctour/blob/main/sctour.
- Parameters:
spatial_key (
Optional[str]) – The key to get position information of cells, by default, thedata.spatial_keywill be used.grid_num (
int) – the number of grids, defaults to 50smooth (
float) – The factor for scale in Gaussian pdf, defaults to 0.5density (
float) – grid density, defaults to 1.0
- Returns:
A tuple containing the embedding and unitary displacement vectors in grid level.