cogrecon.core.data_flexing package

Submodules

cogrecon.core.data_flexing.category_data_flexor module

cogrecon.core.data_flexing.category_data_flexor.process_category_files(selected_directory=None, output_path='..\\..\\..\\saved_data\\category_reprocessed\\')[source]

This function performs a very specific task as requested by a researcher. It first prompts for the selection of a particular directory. It searches that directory and sub directories for files with a particular suffix assumed to be in the custom category format. It also finds the associated data coordinates file and splits the files into ###_category_position_data_coordinates.txt, ###_nocategory_position_data_coordinates.txt, ###_category_categories.txt, ###_nocategory_categories.txt. It also takes the root actual_coordinates.txt file and generates ###_nocategory_actual_corodinates.txt, ###_category_actual_coordinates.txt files for each participant.

The result is written to a specified output path (created if it does not already exist).

Parameters:
  • selected_directory – The string path to a directory to scan for files ending in study_iposition_data.txt. If left empty, a popup dialog will be presented to select a directory.
  • output_path – The directory into which the output files should be saved.

cogrecon.core.data_flexing.descrambler module

cogrecon.core.data_flexing.descrambler.descrambler()[source]

This descrambler performs a very specific task as requested by a researcher. It first prompts for the selection of a particular directory. It searches that directory for files (any file) and parses that file as a TSV. The TSV is expected to have a final element on each line which represents the order the line is actually meant to be in. The file is, thus, reordered according to this last element (assumed to be an integer).

The result is written to an output path which is the input path with descrambled prepended to the filename.

cogrecon.core.data_flexing.dimension_removal module

cogrecon.core.data_flexing.dimension_removal.remove_dimensions(participant_data, removal_dim_indices=None)[source]

This function filters our particular dimensions from the ParticipantData type. This is useful in cases such as which space and time are combined and we wish to view the space axes independently of the time axis.

Return type:

ParticipantData

Parameters:
  • participant_data – A ParticipantData data structure which contains the TrialData for each trial.
  • removal_dim_indices – A list of integers which represent the dimensions (indices) to be removed.
Returns:

a ParticipantData object which has had a particular set of dimension indices (defined by removal_dim_indices) which have been removed.

Module contents