cosmicfish_pylib.utilities.significant_digits

cosmicfish_pylib.utilities.significant_digits(num_err, mode=0)[source]

This function returns the number in num_err at the precision of error.

Parameters:
  • num_err (tuple) – (number, error) input number and error in a tuple.
  • mode (int) –

    (optional) operation to use to build the number

    0 – use ceil
    1 – use round
    2 – use floor
Returns:

a number with all the significant digits according to error

Return type:

float