Loading binarycpython/utils/population_class.py +2 −2 Original line number Diff line number Diff line Loading @@ -537,7 +537,7 @@ class Population( ############### # Check for parse function if not self.population_options["parse_function"]: self.vb1( self.vb_error( "Warning: No parse function set. Make sure you intended to do this.", ) Loading Loading @@ -679,7 +679,7 @@ class Population( NOTE: (david): this is a rather general function, and I'm not sure if we want to have a general dry-run function? """ self.vb1("Doing a dry run of the grid.") self.vb_error("Doing a dry run of the grid.") system_generator = self.population_options["_system_generator"] total_starcount = system_generator(self) self.population_options["_total_starcount"] = total_starcount Loading binarycpython/utils/population_extensions/distribution_functions.py +2 −2 Original line number Diff line number Diff line Loading @@ -797,7 +797,7 @@ class distribution_functions: msg = "Multiplicity modulator has to have 4 elements. Now it is {}, len: {}".format( multiplicity_modulator_array, len(multiplicity_modulator_array) ) self.vb1( self.vb_error( msg, ) raise ValueError(msg) Loading Loading @@ -836,7 +836,7 @@ class distribution_functions: # Normalize it so it fills to one when taking all the multiplicities: full_fractions_array = full_fractions_array / np.sum(full_fractions_array) self.vb1( self.vb_info( "\tMoe and di Stefano 2017: Moe_di_Stefano_2017_multiplicity_fractions: using model {}: full_fractions_array: {}".format( "Poisson", full_fractions_array ), Loading binarycpython/utils/population_extensions/grid_sampling.py +1 −1 Original line number Diff line number Diff line Loading @@ -815,7 +815,7 @@ class grid_sampling: self.population_options["gridcode_filename"] = gridcode_filename self.vb1( self.vb_error( "{blue}Write grid code to {file} [dry_run = {dry}]{reset}".format( blue=self.ANSI_colours["blue"], file=gridcode_filename, Loading binarycpython/utils/population_extensions/monte_carlo_sampling.py +2 −2 Original line number Diff line number Diff line Loading @@ -1044,7 +1044,7 @@ class monte_carlo_sampling: """ # Code to load the generator code self.vb1( self.vb_info( message="Load monte-carlo generator function from {file}".format( file=self.population_options["_monte_carlo_sampling_generator_filename"] ), Loading @@ -1062,7 +1062,7 @@ class monte_carlo_sampling: self.population_options["_monte_carlo_sampling_generator"] = generator self.vb1("Grid code loaded") self.vb_info("Monte-carlo system generator") def _monte_carlo_sampling_setup(self): """ Loading binarycpython/utils/population_extensions/sampling_variables.py +4 −4 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ class sampling_variables: # Set the value and print for key, value in kwargs.items(): sampling_variable[key] = value self.vb1( self.vb_info( "Updated grid variable: {}".format( json.dumps(sampling_variable, indent=4, ensure_ascii=False) ), Loading @@ -88,7 +88,7 @@ class sampling_variables: if name in self.population_options["_sampling_variables"]: del self.population_options["_sampling_variables"][name] self.vb1( self.vb_info( "Deleted sampling variable: {}".format(name), ) else: Loading Loading @@ -121,7 +121,7 @@ class sampling_variables: newname ] = self.population_options["_sampling_variables"].pop(oldname) self.population_options["_sampling_variables"][newname]["name"] = newname self.vb1( self.vb_info( "Rename sampling variable: {} to {}".format(oldname, newname), ) else: Loading Loading @@ -312,7 +312,7 @@ class sampling_variables: sampling_variable["name"] ] = sampling_variable self.vb2( self.vb_error( "Added sampling variable: {}".format( json.dumps(sampling_variable, indent=4, ensure_ascii=False) ), Loading Loading
binarycpython/utils/population_class.py +2 −2 Original line number Diff line number Diff line Loading @@ -537,7 +537,7 @@ class Population( ############### # Check for parse function if not self.population_options["parse_function"]: self.vb1( self.vb_error( "Warning: No parse function set. Make sure you intended to do this.", ) Loading Loading @@ -679,7 +679,7 @@ class Population( NOTE: (david): this is a rather general function, and I'm not sure if we want to have a general dry-run function? """ self.vb1("Doing a dry run of the grid.") self.vb_error("Doing a dry run of the grid.") system_generator = self.population_options["_system_generator"] total_starcount = system_generator(self) self.population_options["_total_starcount"] = total_starcount Loading
binarycpython/utils/population_extensions/distribution_functions.py +2 −2 Original line number Diff line number Diff line Loading @@ -797,7 +797,7 @@ class distribution_functions: msg = "Multiplicity modulator has to have 4 elements. Now it is {}, len: {}".format( multiplicity_modulator_array, len(multiplicity_modulator_array) ) self.vb1( self.vb_error( msg, ) raise ValueError(msg) Loading Loading @@ -836,7 +836,7 @@ class distribution_functions: # Normalize it so it fills to one when taking all the multiplicities: full_fractions_array = full_fractions_array / np.sum(full_fractions_array) self.vb1( self.vb_info( "\tMoe and di Stefano 2017: Moe_di_Stefano_2017_multiplicity_fractions: using model {}: full_fractions_array: {}".format( "Poisson", full_fractions_array ), Loading
binarycpython/utils/population_extensions/grid_sampling.py +1 −1 Original line number Diff line number Diff line Loading @@ -815,7 +815,7 @@ class grid_sampling: self.population_options["gridcode_filename"] = gridcode_filename self.vb1( self.vb_error( "{blue}Write grid code to {file} [dry_run = {dry}]{reset}".format( blue=self.ANSI_colours["blue"], file=gridcode_filename, Loading
binarycpython/utils/population_extensions/monte_carlo_sampling.py +2 −2 Original line number Diff line number Diff line Loading @@ -1044,7 +1044,7 @@ class monte_carlo_sampling: """ # Code to load the generator code self.vb1( self.vb_info( message="Load monte-carlo generator function from {file}".format( file=self.population_options["_monte_carlo_sampling_generator_filename"] ), Loading @@ -1062,7 +1062,7 @@ class monte_carlo_sampling: self.population_options["_monte_carlo_sampling_generator"] = generator self.vb1("Grid code loaded") self.vb_info("Monte-carlo system generator") def _monte_carlo_sampling_setup(self): """ Loading
binarycpython/utils/population_extensions/sampling_variables.py +4 −4 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ class sampling_variables: # Set the value and print for key, value in kwargs.items(): sampling_variable[key] = value self.vb1( self.vb_info( "Updated grid variable: {}".format( json.dumps(sampling_variable, indent=4, ensure_ascii=False) ), Loading @@ -88,7 +88,7 @@ class sampling_variables: if name in self.population_options["_sampling_variables"]: del self.population_options["_sampling_variables"][name] self.vb1( self.vb_info( "Deleted sampling variable: {}".format(name), ) else: Loading Loading @@ -121,7 +121,7 @@ class sampling_variables: newname ] = self.population_options["_sampling_variables"].pop(oldname) self.population_options["_sampling_variables"][newname]["name"] = newname self.vb1( self.vb_info( "Rename sampling variable: {} to {}".format(oldname, newname), ) else: Loading Loading @@ -312,7 +312,7 @@ class sampling_variables: sampling_variable["name"] ] = sampling_variable self.vb2( self.vb_error( "Added sampling variable: {}".format( json.dumps(sampling_variable, indent=4, ensure_ascii=False) ), Loading