calculate_nan_stats#
- movement.utils.reports.calculate_nan_stats(data, keypoint=None, individual=None)[source]#
Calculate NaN stats for a given keypoint and individual.
This function calculates the number and percentage of NaN points for a given keypoint and individual in the input data. A keypoint is considered NaN if any of its
space
coordinates are NaN.- Parameters:
data (xarray.DataArray) – The input data containing
keypoints
andindividuals
dimensions.keypoint (str, optional) – The name of the keypoint for which to generate the report. If
None
, it is assumed that the input data contains only one keypoint and this keypoint is used. Default isNone
.individual (str, optional) – The name of the individual for which to generate the report. If
None
, it is assumed that the input data contains only one individual and this individual is used. Default isNone
.
- Returns:
A string containing the report.
- Return type:
str