Module for analyzing binary population simulation results.

posydon.popsyn.analysis.get_subsets(path, find_n=None, select_oneline=None, select_history=None, select_columns=None, verbose=True)[source]

Get the oneline and history subsets for a selection of binaries.

You select binaries from an HDF5 population by providing a function that operates either on oneline or history and returns a boolean mask in- dicating which rows correspond to the binaries of interest. E.g.,

def find_no_end(df):

return df[“event_f”] != “END”

can be used to find binaries that ended abruptly, based on the information in the oneline table. Therefore, we set select_oneline=find_no_end. If no selector has been set, all binaries are selected (combine this with the select_columns argument to get a column subset of the data.)

Parameters
  • path (str) – The fullpath of the HDF5 file.

  • find_n (int or None) – The number of binaries to select (at most) or None to select all.

  • select_oneline (function or None) – The function to operate on chunks of the oneline table.

  • select_history (function or None) – The function to operate on chunks of the oneline table.

  • select_columns (None or str or array) – If None, all columns will be returned. If a string, only those columns with name containing this string will be returned. An array of strings can be used for multiple such patterns.

Returns

The subsets of the dataframes with the data for the selected binaries.

Return type

oneline, history

posydon.popsyn.analysis.report_columns(path)[source]

Print the columns in the oneline and history keys in an HDF5 file.

Parameters

path (str) – The fullpath of the HDF5 file.