dispel.data.core module#
Core data model for the analysis library.
- class dispel.data.core.Evaluation[source]#
Bases:
Epoch
Evaluation information for a
Reading
.The evaluation corresponds to the json related task, whereas the session corresponds to the group of tasks that the evaluation finds itself in.
FIXME: DOC
- uuid#
The unique unified identifier of the evaluation
- finished#
True
if the concerned task has been finished normally.False
otherwise.
- exit_reason#
The exit condition. It determines the type of interruption if the test was interrupted, as well as the reason for the end of the test if the test has been completed.
- user_id#
The identifier of the user
- class dispel.data.core.Reading[source]#
Bases:
FlagMixIn
A data capture from an experiment.
- evaluation#
The evaluation information for this reading
- session#
The session information for this reading
- measure_set#
A list of measures already processed on the device
- schema#
The schema of the reading
- date#
The time the reading was recorded
- device#
The device that captured the reading
- Parameters:
evaluation – The evaluation information for this reading
session – The session information for this reading
levels – An iterable of Level
measure_set – A list of measures already processed on the device
schema – The schema of the reading
date – The time the reading was recorded
device – The device that captured the reading
- __init__(evaluation, session=None, levels=None, measure_set=None, schema=None, date=None, device=None)[source]#
- Parameters:
evaluation (Evaluation) –
session (Session | None) –
measure_set (MeasureSet | None) –
schema (ReadingSchema | None) –
date (Any | None) –
device (Device | None) –
- get_level(level_id=None)[source]#
Get level for a given level_id.
- Parameters:
level_id (str | LevelId | None) – The id identifying the level.
- Returns:
The level identified by
level_id
. If no level id is provided and the reading contains only one level it will be returned. Otherwise, the function will raise aValueError
.- Return type:
- Raises:
ValueError – If the given id does not match any existing level within the reading.
ValueError – If no id has been provided, and there are multiple levels withing the reading.
- get_measure_set(level_id=None)[source]#
Get measure_set from level identified with level_id.
- Parameters:
- Return type:
- get_merged_measure_set()[source]#
Get a measure set containing all the reading’s measure values.
- Return type:
- get_raw_data_set(data_set_id, level_id)[source]#
Get the raw data set for a given data set id and a level.
- Parameters:
- Returns:
The raw data set with the matching id.
- Return type:
- has_raw_data_set(data_set_id, level_id)[source]#
Check whether the reading contains the desired raw data set.
- property levels: ValuesView[Level]#
Get a list of all Level in the reading.
- class dispel.data.core.ReadingSchema[source]#
Bases:
object
Schema definition for reading.
- __init__(namespace, name, version)#
- class dispel.data.core.Session[source]#
Bases:
Epoch
Session information for a
Reading
.The session corresponds to the group of tasks that the evaluation finds itself in.
FIXME: DOC
- uuid#
The unique unified identifier of the session
- evaluation_codes#
An iterable of task types available in the session. Ordered by display order.