Closed jakobchwastek closed 3 months ago
Would it be beneficial to standardize all timestamps to milliseconds during the initialization of GazeDataFrame
? This approach could simplify the implementation and testing of functions that handle timestamps by limiting them to a single unit.
In that case time_column_unit
would only reflect the unit of timestamps in input data frame.
Yes I think that's the way to go! That way we have a standardized unit for all our subsequent transformations and only need to check in the init
How do we want to specify the unit? as a string, e.g. ms
, sec
?
Yes, i would go with string. Do you think supporting seconds and milliseconds is sufficient for now?
Should we call the parameter time_column_unit
or just time_unit
Yes, i would go with string. Do you think supporting seconds and milliseconds is sufficient for now?
As a fallback we would probably also need to have a step
unit. The specific time values in milliseconds would then be calculated by using the sampling rate.
So all in all we should support: seconds
, milliseconds
, step
Should we call the parameter
time_column_unit
or justtime_unit
I like simply time_unit
. We just need to document that all time values will be transformed to milliseconds.
Description of the problem
Currently
GazeDataFrame
andDatabaseDefinition
lack explicit information about the unit of timestamps in the time column, which is crucial for some future functions.Description of a solution
time_column_unit
parameter to the constructor ofGazeDataFrame
defining the unit oftime_column
.GazeDataFrame
to verify if the unit has been set when a time column is specified.time_column_unit
attribute in theDatasetDefinition
class.gaze.from_csv
,gaze.from_pandas
,gaze.from_numpy
to include atime_column_unit
parameter.Minmum Acceptance Criteria