ovrlpy.compute_VSI ================== .. py:function:: ovrlpy.compute_VSI(df, pca_components, min_expression = None, KDE_bandwidth = 1, patch_length = 500, n_workers = 8, dtype=np.float32) Calculate the vertical signal integrity (VSI). :param df: The spatial transcriptomics dataset. This dataframe should contain a *gene*, *x*, *y*, and *z* column. Needs to be prepared by calling pre_process_coordinates :type df: pandas.DataFrame :param pca_components: PCA components from fitted local maxima. :type pca_components: pandas.DataFrame :param min_expression: Minimal gene expression level to include in the VSI computation. Defaults to the 110% of the maximum expression profile of two molecules in the KDE. :type min_expression: float, optional :param KDE_bandwidth: Bandwidth for the kernel density estimation. :type KDE_bandwidth: float, optional :param patch_length: Data will be processed in patches. Upperbound for the length in x/y of a patch. :type patch_length: int, optional :param n_workers: Number of threads to use for processing. :type n_workers: int, optional :param dtype: Datatype used for the calculations. :returns: * **VSI** (*numpy.ndarray*) -- The vertical signal integrity score. * **signal** (*numpy.ndarray*) -- The total gene expression signal.