Modes

Modes of the laser as defined in the EN207 standard.

class lasersafety.modes.Mode(*values)

Possible modes of the laser as defined in EN207 standard.

D = 'D'

Continuous t > 0.25s

I = 'I'

Long pulse 1ms <= t < 0.25s

R = 'R'

Short pulse 1ns <= t < 1ms

M = 'M'

Ultra short pulse t < 1ns

static _generate_next_value_(name, start, count, last_values)

Return the lower-cased version of the member name.

lasersafety.modes.get_test_by_pulse_duration(pulse_duration: float | int) Mode

Return the mode of the laser depending on the pulse duration. The pulse duration is expected in second. It should be a float (or an int) greater or equal than 0. A value of 0 is assumed to mean “continuous wave (CW)” and mode D is returned.

Parameters:

pulse_duration (float) – duration of the pulse in seconds.

Raises:
  • ValueError – if the pulse duration is not a float (or an int).

  • ValueError – if the pulse duration is strictly lower than 0.

Returns:

the mode corresponding to the given pulse duration as per EN207.

Return type:

Mode