Revise use of properties in handler/experiment and handler/stage
A bit of cleanup is required. Some aspects below, in random order. As they are all connected, go through all before deciding on the changes.
-
check throughout the code if we do need combined property ( analysis_range_pixels
) or separate would make more sense. -
we have analysis_range_pixels
defined as property returning tuple. It is dangerous as we have to remember the order. Use either named tuples with subproperties.x
and.t
, or separate properties for time and space -
not sure _pixels should be calculated from floats. Currently, we store int in database (which is good as it is discrete, simple to compare) that gets converted on read-in to floats which are later converted to pixels back. So, it would make sense to keep in pixels and convert to floats when needed. -
consider keeping ranges in experimental stages as int (for end and start). for float values, just define additional view that will calculate time values for those records. Have to think it through as it may require moving data between old and new table, dropping current table and making view instead to keep the same API for others.