# Extra features and functionality of binarycpython

In this notebook we’ll go over some of the extra features and functionality that was not covered in the other notebooks.

Within the module `binarycpython.utils.functions` there are many functions that can be useful when using binarycpython. We can see which functions are in there, again by using the `help()`

    [33]:

    from binarycpython.utils.functions import (
        get_help,
        get_help_all,
        get_help_super,
        return_binary_c_version_info,
        get_defaults
    )
    # help(binarycpython.utils.functions)

## getting extra information about binary_c parameters

There are several functions that can be used to get information about the parameters in binary_c: - `get_help(parameter)`: Function to get information about the specific input parameter. Prints the output on default but returns a dictionary containing the information. - `get_help_all(print_help=True)`: Function to get information about all the parameters. Prints the output on default but returns a dictionary containing the information. - `get_help_super()`: Function to get even more information about all the parameters. Does not print the output on default but returns a dictionary containing the information. - `get_defaults()`: Function that will get all the default values for the parameters. Returns a dictionary

    [23]:

    get_help('M_1')

    parameter_name:
            M_1
    parameter_value_input_type:
            Float
    description:
            The initial mass of star one (in solar units, internally this is star index 0).
    default:
            0

    [23]:

    {'parameter_name': 'M_1',
     'parameter_value_input_type': 'Float',
     'description': 'The initial mass of star one (in solar units, internally this is star index 0).',
     'default': '0'}

    [22]:

    # get_help_all()

    [21]:

    # get_help_super()

    [36]:

    # get_defaults()

## Build information of binary_c

Sometimes we want to know with which settings binary_c has been built. We can use the function `return_binary_c_version_info` for this. This function will parse the version info of binary_c and return a dictionary with all the settings.

    [32]:

    version_info_dict = return_binary_c_version_info(parsed=True)
    print(version_info_dict.keys())

    dict_keys(['networks', 'isotopes', 'argpairs', 'ensembles', 'macros', 'elements', 'dt_limits', 'nucleosynthesis_sources', 'miscellaneous'])

## Example parse function

TODO: In the functions module there is an example parse function that can be used in conjunction with run_system.

    [34]:

    Help on function get_defaults in module binarycpython.utils.functions:

    get_defaults(filter_values:bool=False) -> dict
        Function that calls the binaryc get args function and cast it into a dictionary.

        All the values are strings

        Args:
            filter_values: whether to filter out NULL and Function defaults.

        Returns:
            dictionary containing the parameter name as key and the parameter default as value

## Dictionary modification

- merge_dicts

- update_dicts

- multiply_values_dict

TODO:

## Getting help

There are sever

    [ ]: