Sets the sampling rate (in Hz) for an aniframe object and optionally converts time values from frames to seconds. If the data is already in SI time units, only the metadata is updated without modifying the time values.
Value
An aniframe object with updated sampling_rate metadata and, if applicable, time values converted from frames to seconds.
Details
The function performs the following operations:
Checks the current unit_time in the object's metadata
If unit_time is "frame" or "unknown", converts time values to seconds using the formula: time_in_seconds = time_in_frames / sampling_rate
If unit_time is already an SI unit (ms, s, m, h), leaves time values unchanged and issues an informational message
Updates the sampling_rate in the object's metadata regardless of the current unit_time
This function is particularly useful when working with motion capture or video data where time is initially recorded as frame numbers.