harpy.pt.add_points#
- harpy.pt.add_points(sdata, ddf, output_points_name, coordinates, transformations=None, overwrite=True)#
Add a points element to a SpatialData object.
This function allows you to add a points element to
sdata. The points element is derived from aDaskDataFrame. Ifsdatais backed by a zarr store, the resulting points element will be backed to the zarr store, otherwiseddfwill be persisted in memory.- Parameters:
sdata (
SpatialData) – The SpatialData object to which the new points element will be added.ddf (
DataFrame) – The DaskDataFrame containing the points data to be added.output_points_name (
str) – The name of the output points element where the points data will be stored.coordinates (
dict[str,str]) – A dictionary specifying the coordinate mappings for the points data (e.g., {“x”: “x_column”, “y”: “y_column”}).transformations (
dict[str,BaseTransformation] |None(default:None)) – Transformations that will be added to the resultingoutput_points_name. Currentlyharpyonly supports the Identity transformation.overwrite (
bool(default:True)) – If True, overwritesoutput_points_nameif it already exists insdata.
- Return type:
- Returns:
: The
sdataobject with the points element added.