dynamo.pl.line_integral_conv¶
- dynamo.pl.line_integral_conv(adata, basis='umap', U_grid=None, V_grid=None, xy_grid_nums=[50, 50], method='yt', cmap='viridis', normalize=False, density=1, lim=(0, 1), const_alpha=False, kernellen=100, V_threshold=None, vector='velocity', file=None, save_show_or_return='show', save_kwargs={}, g_kwargs_dict={})[source]¶
- Visualize vector field with quiver, streamline and line integral convolution (LIC), using velocity estimates on a
grid from the associated data. A white noise background will be used for texture as default. Adjust the bounds of lim in the range of [0, 1] which applies upper and lower bounds to the values of line integral convolution and enhance the visibility of plots. When const_alpha=False, alpha will be weighted spatially by the values of line integral convolution; otherwise a constant value of the given alpha is used.
- Parameters
adata (
AnnData
) – AnnData object that contains U_grid and V_grid databasis (str (default: trimap)) – The dimension reduction method to use.
U_grid ('np.ndarray' (default: None)) – Original velocity on the first dimension of a 2 d grid.
V_grid ('np.ndarray' (default: None)) – Original velocity on the second dimension of a 2 d grid.
xy_grid_nums (tuple (default: (50, 50))) – the number of grids in either x or y axis. The number of grids has to be the same on both dimensions.
method ('float') – sigma2 is defined as sum(sum((Y - V)**2)) / (N * D)
cmap ('float') – Percentage of inliers in the samples. This is an inital value for EM iteration, and it is not important.
normalize ('float') – Paramerter of the model of outliers. We assume the outliers obey uniform distribution, and the volume of outlier’s variation space is a.
density ('float') – Paramerter of the model of outliers. We assume the outliers obey uniform distribution, and the volume of outlier’s variation space is a.
lim ('float') – Paramerter of the model of outliers. We assume the outliers obey uniform distribution, and the volume of outlier’s variation space is a.
const_alpha ('float') – Paramerter of the model of outliers. We assume the outliers obey uniform distribution, and the volume of outlier’s variation space is a.
kernellen ('float') – Paramerter of the model of outliers. We assume the outliers obey uniform distribution, and the volume of outlier’s variation space is a.
V_threshold (float or None (default: None)) – The threshold of velocity value for visualization
vector (str (default: velocity)) – Which vector type will be used for plotting, one of {‘velocity’, ‘acceleration’} or either velocity field or acceleration field will be plotted.
save_show_or_return ({‘show’, ‘save’, ‘return’} (default: show)) – Whether to save, show or return the figure.
save_kwargs (dict (default: {})) – A dictionary that will passed to the save_fig function. By default it is an empty dictionary and the save_fig function will use the {“path”: None, “prefix”: ‘line_integral_conv’, “dpi”: None, “ext”: ‘pdf’, “transparent”: True, “close”: True, “verbose”: True} as its parameters. Otherwise you can provide a dictionary that properly modify those keys according to your needs.
- Returns
- Return type
Nothing, but plot the vector field with quiver, streamline and line integral convolution (LIC)