ome / omero-figure

An OMERO.web app for creating Figures from images in OMERO
http://figure.openmicroscopy.org
GNU Affero General Public License v3.0
15 stars 30 forks source link

Timestamp format millisecs #378

Closed will-moore closed 4 years ago

will-moore commented 4 years ago

Fixes #375

This adds supports for displaying timestamp labels in milliseconds or mins:secs. Previously, all timestamps were loaded as seconds (timestamps were rounded when images were added to figures) and these integer values are stored in the figure JSON, so all existing figures can't have timestamps in milliseconds.

So, when older figures are open (VERSION 4) we now load un-rounded timestamps from the server to update those values in the figure JSON. This allows us to choose "milliseconds" for timestamp labels (also "mins:secs") AND fixes the display of milliseconds for the label beside the T-slider.

To test:

jburel commented 4 years ago

The slider shows 00:00:10.71, as a user, I will expect to see the same in the label

will-moore commented 4 years ago

@jburel Which label? What format did you choose for the label?

jburel commented 4 years ago

[mins:secs]

will-moore commented 4 years ago

Then the label should say 00:11 (mins:secs) rounded to nearest second.

jburel commented 4 years ago

it is rounded to the nearest second 10.47 -> 10. My point was more that the time is displayed in the slider as 10.47 but the precision is lost when adding as a label

will-moore commented 4 years ago

If the user chooses mins:secs format then they are probably showing a bunch of frames from a movie that lasts several minutes, so they don't need to see milliseconds. That's what I see when I look at figures from papers. Sometimes it's even less precision. e.g. 5 mins, 10 mins, 15 mins etc.. If the microscope didn't get around to acquiring the image until 5 mins 1.52 secs, they don't want to show that on the figure.

will-moore commented 4 years ago

We could add a format for mins:secs.00 (or something) if we also want to support that. It might be useful for FRAP example where some frames are very fast to start with, but the movie is longer than a few milliseconds?

will-moore commented 4 years ago

Fixed "millisecs" and "secs" to "milliseconds" and "seconds". Menu options now look like this:

Screenshot 2020-05-01 at 14 56 10

And formatted on the figure like this (uses "ms" and "s" units): Screenshot 2020-05-01 at 14 56 23

jburel commented 4 years ago

Thanks We should probably do a release before the community meeting