nrc-cnrc / EGSnrc

Toolkit for Monte Carlo simulation of ionizing radiation — Trousse d'outils logiciels pour la simulation Monte Carlo du rayonnement ionisant
http://nrc-cnrc.github.io/EGSnrc
GNU Affero General Public License v3.0
242 stars 146 forks source link

Fix #1004: beamdp axis labels are confusing #1170

Closed blakewalters closed 2 months ago

blakewalters commented 3 months ago

Addresses #1004.

Note: I find our method for specifying axis units in beamdp using a backslash in front of the unit (i.e., '/unit') confusing, especially for quantities which may also have a unit in the denominator (e.g., '/MeV cm^-2'). I wonder if we should move to just using brackets instead.

ftessier commented 3 months ago

@blakewalters I agree with you about slash notation for units, for it becomes quite confusing, as you said, when the units themselves involve a quotient. I find that $v\ (\mathrm{m/s})$ clearer than $v / (\mathrm{m/s})$, for example.

However, the SI Brochure Section 5.4 is quite definitive in its recommendation for Rules and style conventions for expressing values of quantities:

Symbols for units are treated as mathematical entities. In expressing the value of a quantity as the product of a numerical value and a unit, both the numerical value and the unit may be treated by the ordinary rules of algebra. This procedure is described as the use of quantity calculus, or the algebra of quantities. For example, the equation p = 48 kPa may equally be written as p/kPa = 48. It is common practice to write the quotient of a quantity and a unit in this way for a column heading in a table, so that the entries in the table are simply numbers. (...) The axes of a graph may also be labelled in this way, so that the tick marks are labelled only with numbers, as in the graph below.

So you and I will probably just have to get used to it?

ftessier commented 3 months ago

I fixed all the other occurrences of erroneous flags \S (superscript) and \N (normal) in Grace plot axes labels throughout the EGSnrc code base.

ftessier commented 3 months ago

Commits should be squashed before merging.