cogrecon.core.visualization package

Submodules

cogrecon.core.visualization.vis_iposition module

cogrecon.core.visualization.vis_iposition.visualization(trial_data, analysis_configuration, min_points, transformed_points, output_list, start_threshold, end_threshold, start_accuracy_map, end_accuracy_map, animation_duration=2, animation_ticks=20, print_output=True, extent=None, fig_size=None, legend_args=None)[source]

This function visualizes TrialData, showing all the steps in the pipeline.

Parameters:
  • end_accuracy_map – the accuracy map at the end of processing
  • start_accuracy_map – the accuracy map at the beginning of processing
  • end_threshold – the accuracy threshold at the end of processing
  • start_threshold – the accuracy threshold at the beginning of processing
  • trial_data – the TrialData to be visualized
  • analysis_configuration – the AnalysisConfiguration to use to visualize (for accuracy visualization mainly)
  • min_points – the points output from the deanonymization task
  • transformed_points – the points output from the transformation task
  • output_list – the final outputs produced by full_pipeline
  • animation_duration – a time in seconds specifying the duration of the transform animation
  • animation_ticks – the number of ticks (frame updates) which should occur throughout the animation
  • print_output – if True, the output_list values will be printed in a user friendly form
  • extent – the extents to plot in the data space
  • fig_size – a tuple containing the size of the figure in inches
  • legend_args – a list of arguments to be passed to the legend (default is None)

cogrecon.core.visualization.vis_spatial_navigation_2room module

cogrecon.core.visualization.vis_spatial_navigation_2room.get_direction_patch_location(center, radius, angle)[source]

Returns a point whose location is determined by a location, radius and angle.

Parameters:
  • center – the center/anchor point from which the new point is determined
  • radius – the distance from the center at which the new point is located
  • angle – the angle at which the new point is located
Returns:

a new point

cogrecon.core.visualization.vis_spatial_navigation_2room.update_line(num, avatar, avatar_direction_marker, fig, pos, orient, line, r)[source]

This helper function animates the visualization.

Parameters:
  • avatar – the character marker
  • avatar_direction_marker – the character direction marker
  • fig – the figure to which plotting is performed
  • num – the iteration number
  • pos – the position data
  • orient – the orientation data
  • line – the path line to be updated
  • r – the radius for the direction marker
Returns:

the updated line information associated with ‘line’ input

cogrecon.core.visualization.vis_spatial_navigation_2room.visualize(raw_file, summary_file, background_img_path='./media/spatial_navigation/background.png', frame_interval_ms=1)[source]

This function provides basic visualization for the 2-Room Spatial Navigation task given a raw and summary input file.

Parameters:
  • frame_interval_ms – the updated interval of the animation in ms
  • background_img_path – the path to the image to be displayed in the background
  • raw_file – the full path to the raw data file
  • summary_file – the full path to the summary data file

cogrecon.core.visualization.vis_spatial_navigation_4room module

cogrecon.core.visualization.vis_spatial_navigation_4room.generate_buffered_points(data_dict, subject_id, trial_num)[source]
cogrecon.core.visualization.vis_spatial_navigation_4room.update()[source]
cogrecon.core.visualization.vis_spatial_navigation_4room.visualize(input_path, point_speed=100, colors='rg')[source]

cogrecon.core.visualization.vis_time_travel_task module

cogrecon.core.visualization.vis_time_travel_task.generate_normed_segments(path, __meta=None, normalize_translation=True, normalize_length=True, normalize_rotation=True)[source]

This function generates normalized line segments given a path, meta-data, and normalization flags.

Parameters:
  • path – the path to the data to process.
  • __meta – the meta information from the data filename (automatically detected if None)
  • normalize_translation – if True, translation will be normalized
  • normalize_length – if True, scaling will be normalized
  • normalize_rotation – if True, rotation will be normalized
Returns:

cogrecon.core.visualization.vis_time_travel_task.get_rotation_matrix(i_v, unit=None)[source]

This function gets a rotation matrix given a vector from a unit vector.

Parameters:
  • i_v – the vector whose rotation should be calculated
  • unit – the unit vector for reference
Returns:

a rotation matrix

cogrecon.core.visualization.vis_time_travel_task.item_path_visualization(search_directory=None, file_regex='\\d\\d\\d_\\d_1_\\d_\\d\\d\\d\\d-\\d\\d-\\d\\d_\\d\\d-\\d\\d-\\d\\d.dat')[source]

This function visualizes item-to-item paths given some input files.

Parameters:
  • search_directory – a directory to search recursively for input files
  • file_regex – a regular expression to search for in the files in search_directory
Return type:

bool

Returns:

True if files were successfully processed, False otherwise.

cogrecon.core.visualization.vis_time_travel_task.subsetter(path)[source]

This function is used as a helper to subset data via a particular criteria.

Parameters:path – the path to the data
Returns:a bool which, if True, suggests keeping the data, otherwise it suggests removing the data from the visualization
cogrecon.core.visualization.vis_time_travel_task.update()[source]

This function is the animation update function used internally in visualize_time_travel_data.

cogrecon.core.visualization.vis_time_travel_task.visualize_time_travel_data(path=None, automatically_rotate=True)[source]

This function visualizes data from the Time Travel Task in 3D.

Parameters:
  • path – the path to a data file to visualize
  • automatically_rotate – If True, the figure will automatically rotate in an Abs(Sin(x)) function shape, otherwise the user can interact with the figure.
Returns:

Nothing

cogrecon.core.visualization.vis_virtual_morris_water_maze module

cogrecon.core.visualization.vis_virtual_morris_water_maze.update()[source]

This function is the animation update function used internally in visualize.

cogrecon.core.visualization.vis_virtual_morris_water_maze.visualize(path=None)[source]

This function visualizes data for the virtual morris water maze task.

Parameters:path – a path to a log file from the virtual morris water maze task
Returns:Nothing

Module contents