dispel.providers.digital_artefacts.io.ft module#

Functionality to read digital artefacts (DA) finger tapping records.

dispel.providers.digital_artefacts.io.ft.FT_DA_LEVEL = ['domhand', 'nondomhand']#

The list of level in the finger tap Digital Artefact records

dispel.providers.digital_artefacts.io.ft.TEST_DURATION = 20#

Duration of the finger tap Digital Artefact test

dispel.providers.digital_artefacts.io.ft.create_bdh_level(level_data, level_id)[source]#

Create a Level from the DA level data.

Parameters:
  • level_data (Dict) – A dict containing the DA level data

  • level_id (str) – The id of the level

Returns:

The level representation of the input data

Return type:

Level

dispel.providers.digital_artefacts.io.ft.format_da_ft_to_bdh(level_data)[source]#

Transform the digital artefact ft data into BDH ft format.

Parameters:

level_data (Dict) – Dict that contains the level data from DA

Returns:

A pandas dataframe in the BDH format

Return type:

pandas.DataFrame

Raises:

ValueError – If block number is not unique

dispel.providers.digital_artefacts.io.ft.generate_raw_dataset(bdh_format_data)[source]#

Transform the BDH format data into a RawDataSet.

Parameters:

bdh_format_data (DataFrame) – The finger tapping data in the io format

Returns:

The RawDataSet representation of the finger tapping data

Return type:

RawDataSet

dispel.providers.digital_artefacts.io.ft.get_level_epoch(level_data)[source]#

Extract level epoch from the digital artefact record.

Parameters:

level_data (Dict) – The dictionary containing the level data

Returns:

The epoch object of the current level

Return type:

Epoch

dispel.providers.digital_artefacts.io.ft.parsable_da_json(value)[source]#

Test if a value is a dictionary and can be parsed by the DA parser.

Parameters:

value (Any) –

Return type:

bool

dispel.providers.digital_artefacts.io.ft.parse_ft_reading(record)[source]#

Get the reading representation of a da data frame.

Parameters:

record (Dict) – The dictionary representing the digital artefact record

Returns:

The reading representation of the DA file

Return type:

DigitalArtefactsReading