Skip to content

Commit

Permalink
Lower precision on fluence calculation (2 decimals)
Browse files Browse the repository at this point in the history
Former-commit-id: 15cb379 [formerly 15cb379 [formerly 57aa64f]]
Former-commit-id: 9615cc2
Former-commit-id: be43196
  • Loading branch information
LaurentRDC committed Feb 25, 2017
1 parent 5408a73 commit 6dbe888
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions iris/gui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,9 @@ 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
f = '---'
self.fluence.setText(str(f) + ' mJ / cm^2')
self.fluence.setText('-----')



0 comments on commit 6dbe888

Please sign in to comment.