mesa.ecospatial.generate_patches
- mesa.ecospatial.generate_patches(spatial_data: AnnData | DataFrame, library_key: str, library_id: str, scaling_factor: int | float, spatial_key: str | List[str])
Generate a list of patches from a spatial data object.
- Parameters:
spatial_data (Union[ad.AnnData, pd.DataFrame]) – The spatial data from which to generate patches.
library_key (str) – The key identifying the library within the spatial data.
library_id (str) – The identifier for the library within the spatial data.
scaling_factor (Union[int, float]) – The scaling factor to determine the size of the patches.
spatial_key (Union[str, List[str]]) – The key or list of keys to access the spatial data.
- Returns:
A list of patches.
- Return type:
list