Skip to content

Commit

Permalink
FIX: 2-decimal precision on fluence calculation
Browse files Browse the repository at this point in the history
Former-commit-id: 931e0fe [formerly 931e0fe [formerly dba4af9]]
Former-commit-id: d7f0a22
Former-commit-id: c6035de
  • Loading branch information
LaurentRDC committed Feb 25, 2017
1 parent 6dbe888 commit 539f5b4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions iris/gui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,9 +604,6 @@ def update(self, *args):
f = fluence(float(self.incident_laser_power_edit.text()),
int(self.laser_rep_rate_cb.currentText()),
FWHM = [int(self.beam_size_x_edit.text()), int(self.beam_size_y_edit.text())])
self.fluence.setText('{:2f}'.format(str(f)) + ' mJ / cm^2')
except ValueError: # Could not parse
self.fluence.setText('-----')



self.fluence.setText('{:.2f}'.format(f) + ' mJ / cm^2')
except: # Could not parse
self.fluence.setText('-----')

0 comments on commit 539f5b4

Please sign in to comment.