question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

control precision of display of energy

See original GitHub issue

Nice tool.

At the moment the energy is written with the full precisions of the number provided to add_level(). Would be nice if there was a simple control of the displayed precision. Perhaps at two levels, one in add_level(), and another for the ED() object, used if no precision control is given to add_level().

The use case would be taking energies directly from quantum chemical computational output, where they are reported to machine precision (16 or 20 digits), or at least reported to greater precision than you’d want to display in the energy diagram.

It can be done by feeding the value given the add_level through round e.g. add_level( round(energy,3) ), but the code could look tidier if the desired precision could be included in the ED API, e.g add_level( energy, precision=3 )

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
giacomomarchiorocommented, Jan 7, 2022

Perfect, I am glad it helps.

a.round_energies_at_digit = 2 Will also only affect the precision of the displayed text not that one of the positioning.

1reaction
drew-parsonscommented, Jan 7, 2022

That makes sense. We don’t want to lose precision in the position of the level, I only want to control it in the display. The top_text approach works for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Step 4.1 Measure, monitor and analyze performance metrics
Monitor and measure the energy performance of the SEUs and compare it with past history to: Maintain or restore effective operation,; Control energy...
Read more >
The Best Electricity Usage Monitors of 2022 - Reviews by YBD
Precision. The usefulness of each monitor depends on what you're hoping to find out, but all of them can show electricity use over...
Read more >
Changing Format and Precision of Numeric Controls and ...
To change the format and precision of the digital display, select Digital Display from the Apply to pull-down menu and repeat steps 2...
Read more >
eGauge: Energy Metering Systems
eGauge home and commercial energy meters connect electricity usage and solar production ... Monitor Electricity on Every Circuit with Precision and Accuracy.
Read more >
Energy Management 120V | Precision Circuits Inc
Energy Management 120V ... Part number: 50 Amp Power Control System Controllers ... Power Control System Central Monitor Panel Remote Display.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found