poses: optional two dimensional array, containing the poses of the entity (x,y,orientation_x, orientation_y).
poses: optional two dimensional array, containing the poses of the entity (x,y,orientation_x, orientation_y).
poses_rad: optional two dimensional containing the poses of the entity (x,y, orientation_rad).
poses_rad: optional two dimensional containing the poses of the entity (x,y, orientation_rad).
name: optional name of the entity. If no name is given, the is used with an id (e.g. 'fish_1')
name: optional name of the entity. If no name is given, the is used with an id (e.g. 'fish_1')
individual_id (int, optional): invididual id of the entity.
outlines: optional three dimensional array, containing the outlines of the entity
outlines: optional three dimensional array, containing the outlines of the entity
Returns:
Returns:
Name of the created entity
Name of the created entity
...
@@ -471,14 +473,15 @@ class File(h5py.File):
...
@@ -471,14 +473,15 @@ class File(h5py.File):
)
)
entity=robofish.io.Entity.create_entity(
entity=robofish.io.Entity.create_entity(
self["entities"],
entities_group=self["entities"],
category,
category=category,
poses,
poses=poses,
name,
name=name,
positions,
individual_id=individual_id,
orientations,
positions=positions,
outlines,
orientations=orientations,
sampling,
outlines=outlines,
sampling=sampling,
)
)
returnentity
returnentity
...
@@ -488,6 +491,7 @@ class File(h5py.File):
...
@@ -488,6 +491,7 @@ class File(h5py.File):
category:str,
category:str,
poses:Iterable,
poses:Iterable,
names:Iterable[str]=None,
names:Iterable[str]=None,
individual_ids:Iterable[int]=None,
outlines=None,
outlines=None,
sampling=None,
sampling=None,
)->Iterable:
)->Iterable:
...
@@ -497,6 +501,7 @@ class File(h5py.File):
...
@@ -497,6 +501,7 @@ class File(h5py.File):
category: The common category for the entities. The canonical values are ['organism', 'robot', 'obstacle'].
category: The common category for the entities. The canonical values are ['organism', 'robot', 'obstacle'].
poses: three dimensional array, containing the poses of the entity.
poses: three dimensional array, containing the poses of the entity.
name: optional array of names of the entities. If no names are given, the category is used with an id (e.g. 'fish_1')
name: optional array of names of the entities. If no names are given, the category is used with an id (e.g. 'fish_1')
individual_ids (Iterable[int]): optional array of individual ids of the entities.
outlines: optional array, containing the outlines of the entities, either a three dimensional common outline array can be given, or a four dimensional array.
outlines: optional array, containing the outlines of the entities, either a three dimensional common outline array can be given, or a four dimensional array.
sampling: The string refference to the sampling. If none is given, the standard sampling from creating the file is used.
sampling: The string refference to the sampling. If none is given, the standard sampling from creating the file is used.