qspec logo qspec logo

A physics toolbox for laser spectroscopy.

Static Badge Static Badge Static Badge

Static Badge Static Badge

© 2026 Patrick Müller. All rights reserved.

qspec. get_val_with_unc  (  val_string  )[source]

Convert the str representation of a number with uncertainty into the value and its uncertainty.

Parameters:
val_stringstr

The str representation of a number with uncertainty of the format "1.234(56)". Decimal separators can be used or spared arbitrarily.

Returns:
(val, unc)tuple[float, float]

The value and its uncertainty.