dispel.providers.bdh.transform module#
Transform module for transform step specific to io format.
The transform step below are steps only modifying a reading coming from a BDH input.
- class dispel.providers.bdh.transform.ProcessBDHOnlyMixIn[source]#
Bases:
ABC
,TransformStep
An abstract class to process only if an instance is a BDH Reading.
- process_reading(reading, **kwargs)[source]#
Overwrite process reading.
- Parameters:
reading (Reading) –
- Return type:
Generator[ProcessingResult | ProcessingControlResult, None, None]
- class dispel.providers.bdh.transform.ProcessBDHProcessingStepGroupOnly[source]#
Bases:
ABC
An abstract class to process only if an instance is a BDH Reading.
- process_reading(reading, **kwargs)[source]#
Overwrite process_reading.
- Parameters:
reading (Reading) –
- Return type:
Generator[ProcessingResult | ProcessingControlResult, None, None]
- class dispel.providers.bdh.transform.TruncateBDHVoiceInstructions[source]#
Bases:
ProcessBDHOnlyMixIn
Truncate voice instructions in UTT test for BDH format.
For BDH Format, IMUs are recorded during the entire session of SBT-UTT test, even during the voice instructions. To match ADS Format of the UTT and only get IMUs during the actual UTT, the data has to be truncated after the third voice instruction.
- static get_voice_instruction_end(level)[source]#
Get the timestamp at which the voice instructions end.
- level_filter: LevelFilter = <LevelIdFilter: level id in [utt]>#
- class dispel.providers.bdh.transform.TruncateFirstTwoMinBDH[source]#
Bases:
ProcessBDHOnlyMixIn
Truncate BDH sensor data to keep only the first two minutes.
Due to the fact the SBT-UTT test does not have a maximum time allowed by Konectom during recording this is to prevent that extremely long recordings are being processed and takes into account only the first two minutes. In practice, this also addresses a Konectom isssue where there is a gap in timestamps in UTT that can span to hours.
- class dispel.providers.bdh.transform.TruncateLastThirtySecondsBDH[source]#
Bases:
ProcessBDHOnlyMixIn
Truncate BDH sensor data to keep the last 30 seconds.
For BDH Format, IMUs are recorded during the entire session of SBT-UTT test, even during the voice instructions. To match ADS Format of the SBT and only get IMUs during the actual SBT, the data has to be truncated to keep the last 30 seconds.
- level_filter: LevelFilter = <LevelIdFilter: level id in [sbt]>#
- class dispel.providers.bdh.transform.TruncateSensorsSBT[source]#
Bases:
ProcessingStepGroup
A ProcessingStepGroup concatenating Sensor Truncation steps.
- steps: List[ProcessingStep] = [<dispel.providers.bdh.transform.TruncateLastThirtySecondsBDH object>, <dispel.providers.bdh.transform.TruncateLastThirtySecondsBDH object>, <dispel.providers.bdh.transform.TruncateLastThirtySecondsBDH object>]#