dynamo.vf.BaseVectorField

class dynamo.vf.BaseVectorField(X=None, V=None, Grid=None, *args, **kwargs)[source]

The BaseVectorField class is a base class for storing and manipulating vector fields. A vector field is a function that associates a vector to each point in a certain space.

The BaseVectorField class has a number of methods that allow you to work with vector fields. The __init__ method initializes the object, taking in a number of optional arguments such as X, V, and Grid, which correspond to the coordinates of the points in the vector field, the vector values at those points, and a grid used for evaluating the vector field, respectively.

The construct_graph method takes in a set of coordinates X and returns a tuple consisting of a matrix of pairwise distances between the points in X and an object for performing nearest neighbor searches. The from_adata method takes in an AnnData object and a basis string, and extracts the coordinates and vector values of the vector field stored in the AnnData object.

The get_X, get_V, and get_data methods return the coordinates, vector values, and both the coordinates and vector values of the vector field, respectively. The find_fixed_points method searches for fixed points of the vector field function, which are points where the velocity of the vector field is zero. The get_fixed_points method returns the fixed points and their types (stable or unstable). The plot method generates a plot of the vector field.

__init__(X=None, V=None, Grid=None, *args, **kwargs)[source]

Methods

__init__([X, V, Grid])

assign_fixed_points([domain, cores])

assign each cell to the associated fixed points

construct_graph([X])

rtype:

Tuple[ndarray, Union[NNDescent, NearestNeighbors]]

find_fixed_points([n_x0, X0, domain, ...])

Search for fixed points of the vector field function.

from_adata(adata[, basis, vf_key])

get_V([idx])

rtype:

ndarray

get_X([idx])

rtype:

ndarray

get_data()

rtype:

Tuple[ndarray, ndarray]

get_fixed_points(**kwargs)

Get fixed points of the vector field function.

integrate(init_states[, dims, scale, t_end, ...])

Integrate along a path through the vector field field function to predict the state after a certain amount of time t has elapsed.