significant_digits#

cosmicjellyfish.analysis.utilities.significant_digits(num_err, mode=1, digits=1)[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

  • digits (int) – input number of digits to keep

Returns:

a number with all the significant digits according to error

Return type:

float