sst-core icon indicating copy to clipboard operation
sst-core copied to clipboard

UnitAlgebra BestSI for time

Open ghost opened this issue 7 years ago • 2 comments

It would be nice to special-case the BestSI functions on UnitAlgebra for time, specifically when the amount of time passed is greater than seconds. Most people don't typically think in KiloSeconds and MegaSeconds, but rather minutes, hours, days, etc.

ghost avatar Aug 17 '17 18:08 ghost

I agree that Ks and Ms are weird units. I worry that this might break any string parsing code out there - and might make plotting results MORE difficult. If I grab a time from the file, I don't want to have to parse hours + minutes + seconds and convert to seconds.

What if we print us, ms, s - then stop at seconds and just print larger seconds. In parentheses, we could print hours, minutes, seconds for human readable but still keep seconds available for parsing and avoid breaking anyone's parsing scripts.

1.3456Ks -> 1345.6s (22m 25.6s)

jjwilke avatar Apr 05 '19 17:04 jjwilke

This is a challenge to do since UnitAlgebra doesn't really know anything about the units that are registered with it. We could possibly change the unit registration to include the ability to have functions that can do some of these conversions. I'll look into it.

feldergast avatar Mar 10 '21 21:03 feldergast