diff --git a/binarycpython/utils/grid.py b/binarycpython/utils/grid.py index 9cbb6872a91c2a7235b75a98032991192bd188ab..fa949ec7bcbc4c8324c25e829a11706d3f2f00d5 100644 --- a/binarycpython/utils/grid.py +++ b/binarycpython/utils/grid.py @@ -92,6 +92,7 @@ from binarycpython.utils.distribution_functions import ( Arenou2010_binary_fraction, raghavan2010_binary_fraction, Moe_di_Stefano_2017_multiplicity_fractions, + normalize_dict, ) from binarycpython import _binary_c_bindings @@ -4127,6 +4128,8 @@ eccentricity3=0 Makes use of the self.bse_options['multiplicity'] value. If its not set, it will raise an error grid_options['multiplicity_fraction_function'] will be checked for the choice + + TODO: add option to put a manual binary fraction in here (solve via negative numbers being the functions) """ # Just return 1 if no option has been chosen @@ -4206,6 +4209,9 @@ eccentricity3=0 msg = "Chosen value for the multiplicity fraction function is not known." raise ValueError(msg) + # To make sure we normalize the dictionary + multiplicity_fraction_dict = normalize_dict(multiplicity_fraction_dict, verbosity=self.grid_options["verbosity"]) + verbose_print( "Multiplicity: {} multiplicity_fraction: {}".format(system_dict['multiplicity'], multiplicity_fraction_dict[system_dict['multiplicity']]), self.grid_options["verbosity"],