cosmicfishpie.utilities package
Submodules
cosmicfishpie.utilities.utils module
- class cosmicfishpie.utilities.utils.inputiniparser(config_dir, config_file='main.ini', parameter_translator={}, fiducial_translator={})[source]
Bases:
object
- class cosmicfishpie.utilities.utils.numerics[source]
Bases:
object- static bisection(array, value)[source]
Given an
array, and given avalue, returns an index j such thatvalueis between array[j] and array[j+1].arraymust be monotonic increasing. Returns 0 if value is less than or equal to the first element, and len(array)-1 if value is greater than or equal to the last element.
- static round_decimals_up(number, decimals=2, precision=5)[source]
Returns a value rounded up to a specific number of decimal places.
- old_round_decimals_up = False
- class cosmicfishpie.utilities.utils.physmath[source]
Bases:
object- sr = np.float64(3282.806350011744)
- class cosmicfishpie.utilities.utils.printing[source]
Bases:
object- static suppress_warnings(func)[source]
Decorator to optionally suppress warnings based on global SUPPRESS_WARNINGS flag.
- Parameters:
func (
callable) – The function to wrap- Returns:
Wrapped function with optional warning suppression
- Return type:
callable
- static time_print(feedback_level=0, min_level=0, text='Computation done in: ', time_ini=None, time_fin=None, instance=None)[source]
- SUPPRESS_WARNINGS = False
- debug = False
- cosmicfishpie.utilities.utils.load_fisher_from_json(json_path)[source]
Load a FisherMatrix configuration snapshot JSON and construct a FisherMatrix.
- Parameters:
json_path (
str) – Path to a JSON produced by FisherMatrix.export_fisher (*_specifications.json).- Returns:
(fisher_matrix_instance, snapshot_dict)
- Return type:
Notes
This only reconstructs the object with the same options/specifications/parameters. You still need to call
.compute()on the returned FisherMatrix to perform the run.