KAHIBARO
Discord Login Register

5.2. Length Units

Table of Contents

`mm`

In GATE, all distances and sizes must be expressed with explicit units. The millimetre, written as mm, is the most common length unit in typical medical-physics simulations because many scanner and patient structures are naturally specified at this scale.

In Python GATE scripts you normally work with values multiplied by unit symbols defined by the Geant4 / GATE units system. For example, to define a 2 mm world half size along x you would write something like 2 * mm. The mm object represents one millimetre in the internal GATE unit system, so every length parameter that expects a distance can use this multiplier.

Millimetres are usually used for detector crystal sizes, voxel sizes, collimator features, and small shifts in position. When you design geometry, it is good practice to decide early that your "mental" unit is millimetres and keep all geometry parameters consistent with that choice.

The table below shows how millimetres relate to other common units in GATE:

QuantityValue in mm
1 mm1
1 cm10
1 m1000
0.5 mm0.5
1 voxel of size 2 * mm2

Always multiply numeric distances by a unit like mm, for example 5 * mm. Writing a bare number such as 5 without units is incorrect for length parameters in GATE.

`cm`

The centimetre, written as cm, is also widely used in GATE, especially for larger objects such as phantoms, patient bodies, and world volumes. One centimetre equals 10 millimetres, so 1 cm is exactly the same as 10 mm in the GATE units system.

Centimetres are convenient when you think in terms of clinical scales: a 20 cm diameter phantom, a 15 cm field of view, or a 30 cm water tank. When you write geometry parameters in centimetres, GATE internally converts them to its base length unit, so 3 cm and 30 mm are interpreted identically.

Because GATE allows mixing units in expressions, you can safely combine centimetres and millimetres in the same formula. For instance, a shift of 1 cm + 5 mm is valid and will be converted to a single internal value.

Example descriptionGATE expression
Cube of side 10 cm10 * cm
Cylinder radius 2.5 cm2.5 * cm
World half size 50 cm50 * cm
Phantom offset of 1.5 cm1.5 * cm
3 cm plus 4 mm total displacement3 cm + 4 mm

Be consistent: do not mix up your mental units. If you think in centimetres, always check that values written in cm correspond to what you expect in real size, and avoid silently switching between mm and cm without noticing.

`m`

The metre, written as m, is used in GATE for very large scales, such as defining an extensive world volume or modeling large rooms, bunkers, or accelerator beamlines. One metre equals 100 centimetres and 1000 millimetres, so 1 m is the same as 100 cm or 1000 * mm.

In most medical imaging and therapy simulations, object sizes are far below one metre, so m appears less frequently than mm or cm. However, the world volume often benefits from being defined in metres to avoid particles reaching the boundary too quickly. For example, a world half size of 2 * m along each axis gives particles plenty of space to propagate around a patient or scanner model.

You can convert between metres and smaller units directly in expressions:

RelationGATE expression equivalence
1 m1 m == 100 cm == 1000 * mm
0.5 m0.5 m == 50 cm
2 m2 m == 200 cm
1.2 m1.2 m == 120 cm

Using metres for coarse positioning and world dimensions, and millimetres or centimetres for detailed structures, is a practical strategy. Just remember that every numeric value must be multiplied by the appropriate unit object.

Never assume that a plain number is interpreted as metres. In GATE, there is no default physical length unit for user parameters. You must always specify the unit, for example 2 m, 150 cm, or 500 * mm.

Views: 14

Comments

Please login to add a comment.

Don't have an account? Register now!