dispel.providers.bdh.tasks.ft module#

Processing functionality for Finger Tapping (FT) task.

class dispel.providers.bdh.tasks.ft.BDHPreprocessingStepGroup[source]#

Bases: ProcessingStepGroup

BDH preprocessing step group for finger tapping.

steps: List[ProcessingStep | ProcessingStepGroup] = [<dispel.providers.bdh.tasks.ft.TransformRawTouchEvents object>, <dispel.providers.bdh.tasks.ft.TransformGesture object>, <dispel.providers.bdh.tasks.ft.TransformTapsFromRaw object>, <dispel.providers.bdh.tasks.ft.SetTimestampIndexBDHonly object>, <dispel.providers.bdh.tasks.ft.TransformTapEvents object>, <dispel.providers.bdh.tasks.ft.SetTimestampIndexBDHonly object>]#
class dispel.providers.bdh.tasks.ft.BDHSteps[source]#

Bases: ProcessingStepGroup

BDH steps used to process finger tapping records.

steps: List[ProcessingStep] = [<dispel.providers.bdh.tasks.ft.BDHPreprocessingStepGroup object>, <dispel.providers.generic.tasks.ft.steps.GenericFingerTappingSteps object>]#
class dispel.providers.bdh.tasks.ft.SetTimestampIndexBDHonly[source]#

Bases: SetTimestampIndex

BDH specific set timestamp processing step.

class dispel.providers.bdh.tasks.ft.TransformGesture[source]#

Bases: TransformStep

Generate a gesture dataset from the preprocessed raw touch events.

data_set_ids: str | Iterable[str] = 'processed_screen'#

An iterable of data sets to be being processed

definitions: List[RawDataValueDefinition] = [<RawDataValueDefinition: gestures (gestures)>]#
new_data_set_id: str = 'gestures'#
class dispel.providers.bdh.tasks.ft.TransformRawTouchEvents[source]#

Bases: TransformStep

Preprocess the io raw touch events.

The touch path ids that we receive with the io format are not increasing over time, this is just a counter of the number of fingers on the screen. In order to use the :class: ~dispel.providers.generic.touch.Gesture module we need to transform those ids into an increasing sequence with one touch path id per tap.

data_set_ids: str | Iterable[str] = 'screen'#

An iterable of data sets to be being processed

definitions: List[RawDataValueDefinition] = [<RawDataValueDefinition: xPosition (xPosition)>, <RawDataValueDefinition: yPosition (yPosition)>, <RawDataValueDefinition: touchAction (touchAction)>, <RawDataValueDefinition: tsTouch (tsTouch)>, <RawDataValueDefinition: touchPathId (touchPathId)>, <RawDataValueDefinition: pressure (pressure)>]#
new_data_set_id: str = 'processed_screen'#
static preprocess_raw_touch_events(data)[source]#

Pre-process the raw touch events.

class dispel.providers.bdh.tasks.ft.TransformTapEvents[source]#

Bases: TransformStep

Generate a gesture dataset from the preprocessed raw touch events.

data_set_ids: str | Iterable[str] = ['taps_from_raw', 'tap_events_ts']#

An iterable of data sets to be being processed

definitions: List[RawDataValueDefinition] = [<RawDataValueDefinition: begin (begin)>, <RawDataValueDefinition: end (end)>, <RawDataValueDefinition: duration (duration)>, <RawDataValueDefinition: first_position (first_position)>, <RawDataValueDefinition: tap_duration (tap_duration)>, <RawDataValueDefinition: location (location)>]#
static enrich(raw_ts, taps)[source]#

Enrich the tap events with the information provided by the raw events.

new_data_set_id: str = 'enriched_tap_events'#
class dispel.providers.bdh.tasks.ft.TransformTapsFromRaw[source]#

Bases: TransformStep

Retrieve the tap events from the gesture dataset.

data_set_ids: str | Iterable[str] = 'gestures'#

An iterable of data sets to be being processed

definitions: List[RawDataValueDefinition] = [<RawDataValueDefinition: begin (begin)>, <RawDataValueDefinition: end (end)>, <RawDataValueDefinition: duration (duration)>, <RawDataValueDefinition: first_position (first_position)>, <RawDataValueDefinition: tap_duration (tap_duration)>]#
new_data_set_id: str = 'taps_from_raw'#