dispel.providers.apdm.io module#
Functionality to read files from APDM.
- class dispel.providers.apdm.io.Apdm[source]#
Bases:
object
Encapsulate APDM wearable sensor data.
- dispel.providers.apdm.io.extract_raw_data_set(sensor_or_definition, data, data_set_definitions_dict)[source]#
Extract raw data set based on sensor type from data frame.
- Parameters:
sensor_or_definition (str | ApdmSensorType | RawDataSetDefinition) – The sensor to be extracted or the definition of the data set
data (DataFrame) – The data frame obtained with
read_sensor_log_as_data_frame()
data_set_definitions_dict (Dict[str | ApdmSensorType, RawDataSetDefinition]) – A dictionary mapping sensor type to raw data set definitions
- Returns:
The raw data set for the specified sensor.
- Return type:
- Raises:
ValueError – If the
data
is not a filled pandas data frame.ValueError – If the
sensor_or_definition
’s definition is not found.
- dispel.providers.apdm.io.get_apdm_reading(data)[source]#
Get the reading representation of an APDM data frame.
- Parameters:
data (DataFrame) – The data frame obtained with
read_apdm_as_data_frame()
- Returns:
The
APDMReading
representation of the APDM h5 file.- Return type:
- dispel.providers.apdm.io.get_device(data)[source]#
Get device information from the APDM reading.
- Parameters:
data (DataFrame) – The data frame obtained with
read_apdm_as_data_frame()
- Returns:
The device information present in the APDM reading
- Return type:
- dispel.providers.apdm.io.get_effective_time_frame(data)[source]#
Get the effective time frame for the APDM reading.
- Parameters:
data (DataFrame) – The data frame obtained with
read_sensor_log_as_data_frame()
- Returns:
The start and end dates for the time frame spanned by data.
- Return type:
Tuple[pd.Timestamp, pd.Timestamp]
- dispel.providers.apdm.io.get_evaluation(data)[source]#
Get the evaluation for the APDM reading.
- Parameters:
data (DataFrame) – The data frame obtained with
read_apdm_as_data_frame()
- Returns:
The evaluation information
- Return type: