alab_management.sample_view.sample module#
The definition of the Sample and SamplePosition classes.
- class Sample(sample_id, task_id, name, position, metadata=<factory>, tags=<factory>)[source]#
Bases:
object
Basic sample object.
sample_id
: the unique id of a sample in the databasetask_id
: the unique id of a task that currently “owns” (is processing) this samplename
: the name of this sampleposition
: current position of the sample in the lab. if None, the sample has not been initialized in the lab
-
metadata:
dict
[str
,Any
]#
-
name:
str
#
-
position:
str
|None
#
-
sample_id:
ObjectId
#
-
tags:
list
[str
]#
-
task_id:
ObjectId
|None
#
- class SamplePosition(name, number=1, description='')[source]#
Bases:
object
A sample position in the lab.
Sample position is a position in the lab that can hold sample, it is not a geographic coordinate in the lab, but a defined position in the lab
name
: the name of this sample position, which is the unique identifier of a sample positiondescription
: a string that describes the sample position briefly
-
SEPARATOR:
ClassVar
[str
] = '/'#
-
description:
str
= ''#
-
name:
str
#
-
number:
int
= 1#
- get_all_standalone_sample_positions()[source]#
Get all the device names in the device registry.
- Return type:
dict
[str
,SamplePosition
]