figureflow.figure_panel.FigurePanel.get_representative_data
- figureflow.figure_panel.FigurePanel.get_representative_data = <function FigurePanel.get_representative_data>
Get list of units (cells etc) that are closest to average of data. Data from one unit is in a single image, therefore cannot be separated the function will rank units than regarding their difference to the mean. If you want a representative neuron but did measure neurites, a unit should be a neuron but the function will account the difference from the mean of all measured neurites. It will weigh larger differences from the mean more (squared difference of mean).
- Parameters:
unit_column – columns which uniquely identify one “unit”, only necessary if there is more than one datapoint in one image with list_of_columns being the columns that define one unit that was analyzed (e.g. for a neurite it could be [“date”, “neuron”, “neurite”]).
cols_to_show – Columns to show in summary
nb_of_measurements_matter – Whether representative data should be sorted by number of measurements. When one unit can have more than one datapoint, this means first showing the units with the most datapoints, independent of their deviation from the mean. This can be helpful when most units have e.g. 2 datapoints and only a few 1, then you may only want to use units with 2 datapoints.
sort_by_relative_difference – Whether to sort by relative difference from the mean (if True) Otherwise will sort by absolute difference. When having more than one measure, relative difference can help making them comparable (keeping the contribution of all measures similar). But in that case a mean close to 0 might also artificially increase the relative difference.
print_results – Whether to print results or just calculate them. When printing comparisons for multiple plots later, just calculating can be enough.
nb_vals_to_show – Number of units to show for each group.
column_suffix – suffix that should be added for difference columns this should be something that is not present in any current column name.