cosmicjellyfish.analysis.utilities#

synopsis:

A collection of small utilities.

Functions

CosmicFish_write_header

This function prints to screen the CosmicFish header.

confidence_coefficient

This function returns the number of sigmas given a confidence level.

find_nearest

This function finds the index of the element in array which is nearest to ValueError :type array: :param array: an array of numbers :type value: :param value: a number :return: the index in array nearest to value :rtype: int

grouper

This small function regroups a list in sub lists of n elements

make_list

Checks if elements is a list.

mant_exp_to_num

This function returns a float built with the given (base 10) mantissa and exponent.

mkdirp

This function creates the directory dirpath if it is not found :type dirpath: :param dirpath: string with the path of the directory to be created :return: None :rtype: NoneType

nice_number

This function returns a nice number built with num.

num_to_mant_exp

This function returns the (base 10) exponent and mantissa of a number.

print_table

This function prints on the screen a nicely formatted table.

rel_error_to_index

This function returns the percentage difference compared to median of an array for each element :type array: :param array: numpy array of numbers :optional_param percentage: if set to True, returns percentage difference.

rel_median_error

This function returns the percentage difference compared to median of an array for each element :type array: :param array: numpy array of numbers :optional_param percentage: if set to True, returns percentage difference.

significant_digits

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