allen-cell-animated / website-3d-cell-viewer

Other
4 stars 4 forks source link

time in minutes should automatically change to hours/days #265

Open toloudis opened 1 month ago

toloudis commented 1 month ago

Use Case

We are viewing time series that were captured in 30min intervals but there are 120 of them. 120*30 = 3600 minutes total. It would be nice if the view showed that in hh:mm or some such format.

Solution

How should we auto-adjust the time units? Do we just assume they will never be sub-seconds and jsut show dd:hh:mm:ss? The time display in the lower right of the view would show dd:hh:mm:ss/dd:hh:mm:ss and maybe drop the leading terms if they are zero?

would dd:hh:mm:ss work? and drop the leading terms if they would always be 0. So for data captured every 30min, with total T=120, at T=61 you would see something like 01:06:30:00/02:16:00:00 (2 days 16 hours). We have to figure out how to determine that seconds or minutes precision could be dropped

ShrimpCryptid commented 1 month ago

Code from Timelapse Feature Explorer: https://github.com/allen-cell-animated/timelapse-colorizer/blob/main/src/colorizer/CanvasUIOverlay.ts#L261-L292