mesa.ecospatial.generate_patches
- mesa.ecospatial.generate_patches(spatial_data, library_key, library_id, scaling_factor, spatial_key)
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: