Create, evolve and save a binary star population.
- class posydon.popsyn.binarypopulation.BinaryGenerator(sampler=<function generate_independent_samples>, RNG=None, **kwargs)[source]
Bases:
object
Generate binaries to be included in a BinaryPopulation.
Initialize the BinaryGenerator instance.
- draw_initial_binary(**kwargs)[source]
Return a binary for evolution in a population.
- Parameters
index (int) – Sets binary index. Defaults to number of generated binaries.
- Returns
binary
- Return type
- class posydon.popsyn.binarypopulation.BinaryPopulation(**kwargs)[source]
Bases:
object
Handle a binary star population.
Initialize the binary population object.
- Parameters
number_of_binaries (int) – Size of the population
population_properties (SimulationProperties) – Instance of simulationproperties holding steps.
- combine_saved_files(absolute_filepath, file_names, mode='a')[source]
Combine various temporary files in a given folder.
- class posydon.popsyn.binarypopulation.PopulationManager(file_name=None, **kwargs)[source]
Bases:
object
Manage a population of binaries.
Initialize a PopulationManager instance.
- breakdown_to_df(binary, **kwargs)[source]
Breakdown to a pandas DataFrame.
Breakdown a binary into more convenient data type, store it, and remove the BinaryStar instance from self.
- from_hdf(indices, where=None, restore=False)[source]
Load a BinaryStar instance from an hdf file of a saved population.
- generate(**kwargs)[source]
Generate a binary by drawing from the binary_generator.
This can be a callable or a generator.