diff --git a/binarycpython/utils/custom_logging_functions.py b/binarycpython/utils/custom_logging_functions.py
index 51c87068e3b789b64b0839c6ac2ebf960506a872..949ba3c2916292c0b026baee21d87c20168e6484 100644
--- a/binarycpython/utils/custom_logging_functions.py
+++ b/binarycpython/utils/custom_logging_functions.py
@@ -13,7 +13,7 @@ from typing import Union, Tuple, Optional
 from binarycpython.utils.functions import temp_dir, remove_file, verbose_print
 
 
-def autogen_C_logging_code(logging_dict: dict, verbose: int = 0) -> Optional[str]:
+def autogen_C_logging_code(logging_dict: dict, verbosity: int = 0) -> Optional[str]:
     """
     Function that auto-generates PRINTF statements for binaryc.
     Input is a dictionary where the key is the header of that logging line
@@ -50,12 +50,13 @@ def autogen_C_logging_code(logging_dict: dict, verbose: int = 0) -> Optional[str
 
     # Loop over dict keys
     for key in logging_dict:
-        if verbose > 0:
-            print(
-                "Generating Print statement for custom logging code with {} as a header".format(
+        verbose_print(
+            "Generating Print statement for custom logging code with {} as a header".format(
                     key
-                )
-            )
+            ),
+            verbosity,
+            1,
+        )
         logging_dict_entry = logging_dict[key]
 
         # Check if item is of correct type:
@@ -83,7 +84,7 @@ def autogen_C_logging_code(logging_dict: dict, verbose: int = 0) -> Optional[str
 
 
 ####################################################################################
-def binary_c_log_code(code: str, verbose: int = 0) -> str:
+def binary_c_log_code(code: str, verbosity: int = 0) -> str:
     """
     Function to construct the code to construct the custom logging function
 
@@ -114,16 +115,17 @@ def binary_c_log_code(code: str, verbose: int = 0) -> str:
 
     Args:
         code: Exact c-statement to output information in binary_c. Can be wrapped in logical statements.
-        verbose: Level of verbosity. Defaults to zero if not set explicitly.
+        verbosity: Level of verbosity. Defaults to zero if not set explicitly.
 
     Returns:
         string containing the custom logging code. This includes all the includes and other definitions. This code will be used as the shared library
     """
 
     verbose_print(
-        "Creating the code for the shared library for the custom logging", verbose, 0
+        "Creating the code for the shared library for the custom logging",
+        verbosity,
+        1,
     )
-
     if not "Printf" in code:
         print(
             "Error: There has to be at least a printf statement in the provided code. Aborting"
@@ -158,14 +160,14 @@ void binary_c_API_function custom_output_function(struct stardata_t * stardata)
     return textwrap.dedent(custom_logging_function_string)
 
 
-def binary_c_write_log_code(code: str, filename: str, verbose: int = 0) -> None:
+def binary_c_write_log_code(code: str, filename: str, verbosity: int = 0) -> None:
     """
     Function to write the generated logging code to a file
 
     Args:
         code: string containing the custom logging code to write to a file.
         filename: target filename.
-        verbose: Level of verbosity. Defaults to zero if not set explicitly.
+        verbosity: Level of verbosity. Defaults to zero if not set explicitly.
     """
 
     # TODO: change this. I don't like the cwd
@@ -173,10 +175,12 @@ def binary_c_write_log_code(code: str, filename: str, verbose: int = 0) -> None:
     filePath = os.path.join(cwd, filename)
 
     # Remove if it exists
-    remove_file(filePath, verbose)
-
-    if verbose > 0:
-        print("Writing the custom logging code to {}".format(filePath))
+    remove_file(filePath, verbosity)
+    verbose_print(
+        "Writing the custom logging code to {}".format(filePath),
+        verbosity,
+        1,
+    )
 
     # Write again
     with open(filePath, "w") as file:
@@ -208,7 +212,7 @@ def from_binary_c_config(config_file: str, flag: str) -> str:
     return res
 
 
-def return_compilation_dict(verbose: int = 0) -> dict:
+def return_compilation_dict(verbosity: int = 0) -> dict:
     """
     Function to build the compile command for the shared library
 
@@ -218,16 +222,18 @@ def return_compilation_dict(verbose: int = 0) -> dict:
     # https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/
 
     Args:
-        verbose: Level of verbosity. Defaults to zero if not set explicitly.
+        verbosity: Level of verbosity. Defaults to zero if not set explicitly.
 
     Returns:
         string containing the command to build the shared library
     """
 
-    if verbose > 0:
-        print(
-            "Calling the binary_c config code to get the info to build the shared library"
-        )
+    verbose_print(
+        "Calling the binary_c config code to get the info to build the shared library",
+        verbosity,
+        1,
+    )
+
     # use binary_c-config to get necessary flags
     BINARY_C_DIR = os.getenv("BINARY_C")
     if BINARY_C_DIR:
@@ -297,18 +303,20 @@ def return_compilation_dict(verbose: int = 0) -> dict:
     ]
     libs = "{} {}".format(" ".join(library_paths), " ".join(non_library_paths))
 
-    if verbose > 0:
-        print(
-            "Got options to compile:\n\tcc = {cc}\n\tccflags = {ccflags}\n\tld = {ld}\n\tlibs = {libs}\n\tinc = {inc}\n\n".format(
+    #
+    verbose_print(
+        "Got options to compile:\n\tcc = {cc}\n\tccflags = {ccflags}\n\tld = {ld}\n\tlibs = {libs}\n\tinc = {inc}\n\n".format(
                 cc=cc, ccflags=ccflags, ld=ld, libs=libs, inc=inc
-            )
-        )
+        ),
+        verbosity,
+        1,
+    )
 
     return {"cc": cc, "ld": ld, "ccflags": ccflags, "libs": libs, "inc": inc}
 
 
 def compile_shared_lib(
-    code: str, sourcefile_name: str, outfile_name: str, verbose: int = 0
+    code: str, sourcefile_name: str, outfile_name: str, verbosity: int = 0
 ) -> None:
     """
     Function to write the custom logging code to a file and then compile it.
@@ -320,17 +328,17 @@ def compile_shared_lib(
         code: string containing the custom logging code
         sourcefile_name: name of the file that will contain the code
         outfile_name: name of the file that will be the shared library
-        verbose: Level of verbosity. Defaults to zero if not set explicitly.
+        verbosity: Level of verbosity. Defaults to zero if not set explicitly.
     """
 
     # Write code to file
-    binary_c_write_log_code(code, sourcefile_name, verbose)
+    binary_c_write_log_code(code, sourcefile_name, verbosity)
 
     # Remove the library if present:
-    remove_file(outfile_name, verbose)
+    remove_file(outfile_name, verbosity)
 
     # create compilation command
-    compilation_dict = return_compilation_dict(verbose)
+    compilation_dict = return_compilation_dict(verbosity)
 
     # Construct full command
     command = (
@@ -348,26 +356,32 @@ def compile_shared_lib(
     command = " ".join(command.split())
 
     # Execute compilation and create the library
-    if verbose > 0:
-        print(
-            "Building shared library for custom logging with (binary_c.h) on {}\n".format(
+    verbose_print(
+        "Building shared library for custom logging with (binary_c.h) on {}\n".format(
                 socket.gethostname()
-            )
-        )
-        print(
-            "Executing following command to compile the shared library:\n{command}".format(
-                command=command
-            )
-        )
-    res = subprocess.check_output("{command}".format(command=command), shell=True)
-    # print(res)
-    if verbose > 0:
-        if res:
-            print("Output of compilation command:\n{}".format(res))
+        ),
+        verbosity,
+        1,
+    )
+    verbose_print(
+        "Executing following command to compile the shared library:\n{command}".format(
+            command=command
+        ),
+        verbosity,
+        1,
+    )
 
+    #
+    res = subprocess.check_output("{command}".format(command=command), shell=True)
+    if res:
+        verbose_print(
+            "Output of compilation command:\n{}".format(res),
+            verbosity,
+            1,
+        )
 
 def create_and_load_logging_function(
-    custom_logging_code: str, verbose: int = 0, custom_tmp_dir=None
+    custom_logging_code: str, verbosity: int = 0, custom_tmp_dir=None
 ) -> Tuple[int, str]:
     """
     Function to automatically compile the shared library with the given
@@ -378,7 +392,7 @@ def create_and_load_logging_function(
 
     Args:
         custom_logging_code: string containing the custom logging code
-        verbose: Level of verbosity. Defaults to zero if not set explicitly.
+        verbosity: Level of verbosity. Defaults to zero if not set explicitly.
 
     Returns:
         memory address of the custom logging function in a capsule.
@@ -404,11 +418,14 @@ def create_and_load_logging_function(
         custom_logging_code,
         sourcefile_name=os.path.join(custom_logging_dir, "custom_logging.c"),
         outfile_name=library_name,
-        verbose=verbose,
+        verbosity=verbosity,
     )
 
-    if verbose > 0:
-        print("loading shared library for custom logging")
+    verbose_print(
+        "loading shared library for custom logging",
+        verbosity,
+        1,
+    )
 
     # Loading library
     _ = ctypes.CDLL("libgslcblas.so", mode=ctypes.RTLD_GLOBAL)
@@ -433,12 +450,13 @@ def create_and_load_logging_function(
         )
         raise ValueError
 
-    if verbose > 0:
-        print(
-            "loaded shared library for custom logging. \
-            custom_output_function is loaded in memory at {}".format(
-                func_memaddr
-            )
-        )
+    verbose_print(
+        "loaded shared library for custom logging. \
+        custom_output_function is loaded in memory at {}".format(
+            func_memaddr
+        ),
+        verbosity,
+        1,
+    )
 
     return func_memaddr, library_name
diff --git a/binarycpython/utils/grid.py b/binarycpython/utils/grid.py
index 0ac0f2ccbc5134bde0e8587243945bcf705fbd51..a77abd8c3c216a4b712cb1d215abf53c97f6dcd0 100644
--- a/binarycpython/utils/grid.py
+++ b/binarycpython/utils/grid.py
@@ -47,6 +47,8 @@ from binarycpython.utils.grid_options_defaults import (
     grid_options_defaults_dict,
     moe_di_stefano_default_options,
     _MS_VERBOSITY_LEVEL,
+    _CUSTOM_LOGGING_VERBOSITY_LEVEL,
+    _LOGGER_VERBOSITY_LEVEL,
 )
 
 from binarycpython.utils.custom_logging_functions import (
@@ -229,13 +231,16 @@ class Population:
 
             # The of the keys go into a custom_options dict
             else:
-                print(
-                    "!! Key doesnt match previously known parameter: \
-                    adding: {}={} to custom_options".format(
+                verbose_print(
+                    "<<<< Warning: Key does not match previously known parameter: \
+                    adding: {}={} to custom_options >>>>".format(
                         key, kwargs[key]
-                    )
+                    ),
+                    self.grid_options["verbosity"],
+                    1,
                 )
                 self.custom_options[key] = kwargs[key]
+
     def parse_cmdline(self) -> None:
         """
         Function to handle settings values via the command line.
@@ -343,7 +348,7 @@ class Population:
         argline = argline.strip()
         return argline
 
-    def last_grid_variable(self):
+    def _last_grid_variable(self):
         """
         Function that returns the last grid variable
         (i.e. the one with the highest grid_variable_number)
@@ -500,7 +505,7 @@ class Population:
 
         return options
 
-    def _return_binary_c_version_info(self, parsed=False):
+    def return_binary_c_version_info(self, parsed=False):
         """
         Function that returns the version information of binary_c
         """
@@ -509,7 +514,7 @@ class Population:
 
         return version_info
 
-    def _return_binary_c_defaults(self):
+    def return_binary_c_defaults(self):
         """
         Function that returns the defaults of the binary_c version that is used.
         """
@@ -553,7 +558,7 @@ class Population:
 
         #
         if include_binary_c_defaults:
-            binary_c_defaults = self._return_binary_c_defaults()
+            binary_c_defaults = self.return_binary_c_defaults()
             all_info["binary_c_defaults"] = binary_c_defaults
 
         if include_binary_c_version_info:
@@ -683,7 +688,7 @@ class Population:
             # Generate entire shared lib code around logging lines
             custom_logging_code = binary_c_log_code(
                 self.grid_options["C_logging_code"],
-                verbose=self.grid_options["verbosity"],
+                verbosity=self.grid_options["verbosity"]-(_CUSTOM_LOGGING_VERBOSITY_LEVEL-1),
             )
 
             # Load memory address
@@ -692,7 +697,7 @@ class Population:
                 self.grid_options["_custom_logging_shared_library_file"],
             ) = create_and_load_logging_function(
                 custom_logging_code,
-                verbose=self.grid_options["verbosity"],
+                verbosity=self.grid_options["verbosity"]-(_CUSTOM_LOGGING_VERBOSITY_LEVEL-1),
                 custom_tmp_dir=self.grid_options["tmp_dir"],
             )
 
@@ -700,12 +705,12 @@ class Population:
             # Generate real logging code
             logging_line = autogen_C_logging_code(
                 self.grid_options["C_auto_logging"],
-                verbose=self.grid_options["verbosity"],
+                verbosity=self.grid_options["verbosity"]-(_CUSTOM_LOGGING_VERBOSITY_LEVEL-1),
             )
 
             # Generate entire shared lib code around logging lines
             custom_logging_code = binary_c_log_code(
-                logging_line, verbose=self.grid_options["verbosity"]
+                logging_line, verbosity=self.grid_options["verbosity"]-(_CUSTOM_LOGGING_VERBOSITY_LEVEL-1)
             )
 
             # Load memory address
@@ -714,9 +719,10 @@ class Population:
                 self.grid_options["_custom_logging_shared_library_file"],
             ) = create_and_load_logging_function(
                 custom_logging_code,
-                verbose=self.grid_options["verbosity"],
+                verbosity=self.grid_options["verbosity"]-(_CUSTOM_LOGGING_VERBOSITY_LEVEL-1),
                 custom_tmp_dir=self.grid_options["tmp_dir"],
             )
+
     ###################################################
     # Ensemble functions
     ###################################################
@@ -766,7 +772,7 @@ class Population:
             self._condor_grid()
         else:
             # Execute population evolution subroutines
-            self.evolve_population()
+            self._evolve_population()
 
         # Put all interesting stuff in a variable and output that afterwards, as analytics of the run.
         analytics_dict = {
@@ -797,7 +803,7 @@ class Population:
 
         return analytics_dict
 
-    def evolve_population(self):
+    def _evolve_population(self):
         """
         Function to evolve populations. This handles the setting up, evolving
         and cleaning up of a population of stars.
@@ -888,7 +894,7 @@ class Population:
                 0,
             )
 
-    def get_stream_logger(self, level=logging.DEBUG):
+    def _get_stream_logger(self, level=logging.DEBUG):
         """Return logger with configured StreamHandler."""
         stream_logger = logging.getLogger("stream_logger")
         stream_logger.handlers = []
@@ -902,7 +908,7 @@ class Population:
 
         return stream_logger
 
-    def system_queue_filler(self, job_queue, amt_cores):
+    def _system_queue_filler(self, job_queue, amt_cores):
         """
         Function that is responsible for keeping the queue filled.
 
@@ -910,8 +916,9 @@ class Population:
         Will have to play with the size of this.
         """
 
-        stream_logger = self.get_stream_logger()
-        stream_logger.debug(f"setting up the system_queue_filler now")
+        stream_logger = self._get_stream_logger()
+        if self.grid_options['verbosity'] >= _LOGGER_VERBOSITY_LEVEL:
+            stream_logger.debug(f"setting up the system_queue_filler now")
 
         # Setup of the generator
         self._generate_grid_code(dry_run=False)
@@ -927,7 +934,6 @@ class Population:
             job_queue.put((system_number, system_dict))
 
             # Print some info
-            # stream_logger.debug(f"producing: {system_number}")  # DEBUG
             verbose_print(
                 "Queue produced system {}".format(system_number),
                 self.grid_options["verbosity"],
@@ -949,7 +955,9 @@ class Population:
             #     print("\tsystem_queue_filler: Size dir(self): {}".format(convert_bytes(bytes_size_self)))
 
         # Send closing signal to workers. When they receive this they will terminate
-        stream_logger.debug(f"Signaling stop to processes")  # DEBUG
+        if self.grid_options['verbosity'] >= _LOGGER_VERBOSITY_LEVEL:
+            stream_logger.debug(f"Signaling stop to processes")  # DEBUG
+    
         for _ in range(amt_cores):
             job_queue.put("STOP")
 
@@ -1024,7 +1032,7 @@ class Population:
             p.start()
 
         # Set up the system_queue
-        self.system_queue_filler(job_queue, amt_cores=self.grid_options["amt_cores"])
+        self._system_queue_filler(job_queue, amt_cores=self.grid_options["amt_cores"])
 
         # Join the processes
         for p in processes:
@@ -1094,6 +1102,7 @@ class Population:
             "_total_probability_weighted_mass_run"
         ] = combined_output_dict["_total_probability_weighted_mass_run"]
         self.grid_options['_zero_prob_stars_skipped'] = combined_output_dict['_zero_prob_stars_skipped']
+
     def _evolve_system_mp(self, full_system_dict):
         """
         Function that the multiprocessing evolution method calls to evolve a system
@@ -1146,8 +1155,9 @@ class Population:
             ID  # Store the ID as a object property again, lets see if that works.
         )
 
-        stream_logger = self.get_stream_logger()
-        stream_logger.debug(f"Setting up processor: process-{self.process_ID}")
+        stream_logger = self._get_stream_logger()
+        if self.grid_options['verbosity'] >= _LOGGER_VERBOSITY_LEVEL:
+            stream_logger.debug(f"Setting up processor: process-{self.process_ID}")
 
         # Set the process names
         name = 'binarycpython population thread {}'.format(ID)
@@ -1176,7 +1186,7 @@ class Population:
                 self.grid_options["_store_memaddr"],
             ),
             self.grid_options["verbosity"],
-            0,
+            1,
         )
 
         # Set the ensemble memory address
@@ -1193,7 +1203,7 @@ class Population:
             verbose_print(
                 "\tUsing persistent_data memaddr: {}".format(persistent_data_memaddr),
                 self.grid_options["verbosity"],
-                0,
+                1,
             )
 
         # Set up local variables
@@ -1361,7 +1371,10 @@ class Population:
             "w",
         ) as f:
             f.write("FINISHING")
-        stream_logger.debug(f"Process-{self.process_ID} is finishing.")
+
+        if self.grid_options['verbosity'] >= _LOGGER_VERBOSITY_LEVEL:
+            stream_logger.debug(f"Process-{self.process_ID} is finishing.")
+
 
         # Handle ensemble output: is ensemble==1, then either directly write that data to a file, or combine everything into 1 file.
         ensemble_json = {}  # Make sure it exists already
@@ -1460,7 +1473,7 @@ class Population:
 
             ),
             self.grid_options["verbosity"],
-            0,
+            1,
         )
 
         # Write summary
@@ -1501,7 +1514,9 @@ class Population:
             f.write("FINISHED")
 
         result_queue.put(output_dict)
-        stream_logger.debug(f"Process-{self.process_ID} is finished.")
+
+        if self.grid_options['verbosity'] >= _LOGGER_VERBOSITY_LEVEL:
+            stream_logger.debug(f"Process-{self.process_ID} is finished.")
 
         # Clean up the interpolators if they exist
 
@@ -3014,6 +3029,9 @@ class Population:
             output_dir: (optional, default = None) directory where to write the file to. If custom_options['data_dir'] is present, then that one will be used first, and then the output_dir
             output_filename: (optional, default = None) filename of the output. If not set it will be called "binary_c_calls.txt"
             include_defaults: (optional, default = None) whether to include the defaults of binary_c in the lines that are written. Beware that this will result in very long lines, and it might be better to just export the binary_c defaults and keep them in a separate file.
+
+        Returns:
+            filename: filename that was used to write the calls to
         """
 
         # Check if there is no compiled grid yet. If not, lets try to build it first.
@@ -3088,6 +3106,10 @@ class Population:
             print("Error. No grid function found!")
             raise ValueError
 
+
+        return binary_c_calls_full_filename
+
+
     def _cleanup_defaults(self):
         """
         Function to clean up the default values:
@@ -3102,7 +3124,7 @@ class Population:
         TODO: Rethink this functionality. seems a bit double, could also be just outside of the class
         """
 
-        binary_c_defaults = self._return_binary_c_defaults().copy()
+        binary_c_defaults = self.return_binary_c_defaults().copy()
         cleaned_dict = filter_arg_dict(binary_c_defaults)
 
         return cleaned_dict
@@ -3900,15 +3922,10 @@ eccentricity3=0
         )
 
         # and finally the probability calculator
-        self.grid_options["_grid_variables"][self.last_grid_variable()][
+        self.grid_options["_grid_variables"][self._last_grid_variable()][
             "probdist"
         ] = probdist_addition
 
-        # Add the options to the grid
-        # self.grid_options["_grid_variables"][self.last_grid_variable()][
-        #     "precode"
-        # ] += "; self.grid_options['m&s_ensemble_options'] = {}".format(o)
-
         verbose_print(
             "\tMoe_di_Stefano_2017: Added final call to the pdf function",
             self.grid_options["verbosity"],
diff --git a/binarycpython/utils/grid_options_defaults.py b/binarycpython/utils/grid_options_defaults.py
index 7f80a0e4f3392c7d621f9cbe8db0766172a0ac9a..37585f2e426e3ae4159cf1ca11970cb77512d7ff 100644
--- a/binarycpython/utils/grid_options_defaults.py
+++ b/binarycpython/utils/grid_options_defaults.py
@@ -18,6 +18,8 @@ import os
 from binarycpython.utils.custom_logging_functions import temp_dir
 from binarycpython.utils.functions import return_binary_c_version_info
 
+_LOGGER_VERBOSITY_LEVEL = 1
+_CUSTOM_LOGGING_VERBOSITY_LEVEL = 2
 _MS_VERBOSITY_LEVEL = 5
 _MS_VERBOSITY_INTERPOLATOR_LEVEL = 6
 _MS_VERBOSITY_INTERPOLATOR_EXTRA_LEVEL = 7
diff --git a/docs/Makefile b/docs/Makefile
index d0c3cbf1020d5c292abdedf27627c6abe25e2293..31daf9645dc2928cc36c032e3f34faec8657eb29 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -8,6 +8,8 @@ SPHINXBUILD   ?= sphinx-build
 SOURCEDIR     = source
 BUILDDIR      = build
 
+# Copy the notebooks
+
 # Put it first so that "make" without argument is like "make help".
 help:
 	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -17,4 +19,15 @@ help:
 # Catch-all target: route all unknown targets to Sphinx using the new
 # "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
 %: Makefile
+	# copy the notebooks
+	cp ../examples/notebook_individual_systems.ipynb source/
+	cp ../examples/notebook_custom_logging.ipynb source/
+	cp ../examples/notebook_population.ipynb source/
+	cp ../examples/notebook_extra_features.ipynb source/
+	cp ../examples/notebook_api_functionality.ipynb source/
+
+	# Copy the badges
+	cp -r ../badges/ source/
+	
+	# actually run the sphinx stuff
 	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
diff --git a/docs/build/doctrees/binary_c_parameters.doctree b/docs/build/doctrees/binary_c_parameters.doctree
index 39147e49b37777bd607584bb55d534f7b02de8c4..c459014308936f8bff24b47e72c5c4d983c4405d 100644
Binary files a/docs/build/doctrees/binary_c_parameters.doctree and b/docs/build/doctrees/binary_c_parameters.doctree differ
diff --git a/docs/build/doctrees/custom_logging_functions.doctree b/docs/build/doctrees/custom_logging_functions.doctree
index 49c9e8a7f23a14b54ebb7a54e9db0a46011dced7..2baedf88c0674787690b0e452b62a95a58a06441 100644
Binary files a/docs/build/doctrees/custom_logging_functions.doctree and b/docs/build/doctrees/custom_logging_functions.doctree differ
diff --git a/docs/build/doctrees/distribution_functions.doctree b/docs/build/doctrees/distribution_functions.doctree
index 1da5ab487d8e3e6976aa07ca1ccce68e92453225..a5f832e6551b727b5e2b85396944895cb9f40287 100644
Binary files a/docs/build/doctrees/distribution_functions.doctree and b/docs/build/doctrees/distribution_functions.doctree differ
diff --git a/docs/build/doctrees/environment.pickle b/docs/build/doctrees/environment.pickle
index 4736f93d38f415fb7a7bdc904b83a480d3293be0..59a55f82e1e3ec1d3e6a5e062c827347ee1864b5 100644
Binary files a/docs/build/doctrees/environment.pickle and b/docs/build/doctrees/environment.pickle differ
diff --git a/docs/build/doctrees/example_notebooks.doctree b/docs/build/doctrees/example_notebooks.doctree
new file mode 100644
index 0000000000000000000000000000000000000000..b9bef3c20dc63831463b0ae0c0e0c9848b042660
Binary files /dev/null and b/docs/build/doctrees/example_notebooks.doctree differ
diff --git a/docs/build/doctrees/examples.doctree b/docs/build/doctrees/examples.doctree
deleted file mode 100644
index d338f5d8552417a69007a27c5fe82a53820b2316..0000000000000000000000000000000000000000
Binary files a/docs/build/doctrees/examples.doctree and /dev/null differ
diff --git a/docs/build/doctrees/functions.doctree b/docs/build/doctrees/functions.doctree
index 55930afdae733dce254051eee123bd7ff750dfd2..4fa1fa8595d451316bf9fb81bb73e75e959634b9 100644
Binary files a/docs/build/doctrees/functions.doctree and b/docs/build/doctrees/functions.doctree differ
diff --git a/docs/build/doctrees/general_examples.doctree b/docs/build/doctrees/general_examples.doctree
deleted file mode 100644
index 6a9ea1d82f7f59f34c616945f3276e2fab821847..0000000000000000000000000000000000000000
Binary files a/docs/build/doctrees/general_examples.doctree and /dev/null differ
diff --git a/docs/build/doctrees/grid.doctree b/docs/build/doctrees/grid.doctree
index 12d12b69345f33e785b43d88a98ef8f1662b729e..6954097710a726daade6683f7c30f32b46b5f6eb 100644
Binary files a/docs/build/doctrees/grid.doctree and b/docs/build/doctrees/grid.doctree differ
diff --git a/docs/build/doctrees/grid_options_defaults.doctree b/docs/build/doctrees/grid_options_defaults.doctree
index 85f8989f323ce1c8bae27de688c7dac8a4cef280..a30f5c4df06312a6b3100c35e328ecc52d10ce2b 100644
Binary files a/docs/build/doctrees/grid_options_defaults.doctree and b/docs/build/doctrees/grid_options_defaults.doctree differ
diff --git a/docs/build/doctrees/grid_options_descriptions.doctree b/docs/build/doctrees/grid_options_descriptions.doctree
index 21e4c679b107fb157cb8ec70adfdad66409efb6e..ef9f5f153be768b3795647b853039c46c3f89296 100644
Binary files a/docs/build/doctrees/grid_options_descriptions.doctree and b/docs/build/doctrees/grid_options_descriptions.doctree differ
diff --git a/docs/build/doctrees/hpc_functions.doctree b/docs/build/doctrees/hpc_functions.doctree
index da2ff86e814c5f0b1bae3d23e1323c2e395ad97d..4fcafc7f3b5df064761c1d4e79a39e2b745defa0 100644
Binary files a/docs/build/doctrees/hpc_functions.doctree and b/docs/build/doctrees/hpc_functions.doctree differ
diff --git a/docs/build/doctrees/index.doctree b/docs/build/doctrees/index.doctree
index 9515d8a367c083a7bc16eb5808428c7b3c03830c..c0b1adc8cd9411e63986831be12d8da490a424fc 100644
Binary files a/docs/build/doctrees/index.doctree and b/docs/build/doctrees/index.doctree differ
diff --git a/docs/build/doctrees/modules.doctree b/docs/build/doctrees/modules.doctree
index a934abb3a00f1c89d9f74c148c35a275b451e39d..e39ddcdbc7468db4e520ea49e532ac855e217618 100644
Binary files a/docs/build/doctrees/modules.doctree and b/docs/build/doctrees/modules.doctree differ
diff --git a/docs/build/doctrees/nbsphinx/notebook_api_functionality.ipynb b/docs/build/doctrees/nbsphinx/notebook_api_functionality.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..d81c31711bfc5d6de3159fd8958df96dd145ded0
--- /dev/null
+++ b/docs/build/doctrees/nbsphinx/notebook_api_functionality.ipynb
@@ -0,0 +1,951 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "cb9d00f5-9613-471e-a4bb-6181311bf73b",
+   "metadata": {},
+   "source": [
+    "# Using the API functionality of binarycpython\n",
+    "This notebook shows how to use the API functions that interface with binary_c. It usually is better to use wrapper functions that internally use these API functions, because most of the output here is very raw\n",
+    "\n",
+    "Binarycpython uses the Python-C extension framework to interface Python with C. The sourcecode for this is contained in `src/binary_c_python.c`, and the functions are available via `from binarycpython import _binary_c_bindings`.\n",
+    "\n",
+    "The following functions are available through the API: (run cell below)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "id": "ded7eaf6-e1ba-46c2-9f6f-9ebcb14a264d",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Help on module binarycpython._binary_c_bindings in binarycpython:\n",
+      "\n",
+      "NAME\n",
+      "    binarycpython._binary_c_bindings - Module to interface the Binary_c API with python.\n",
+      "\n",
+      "FUNCTIONS\n",
+      "    free_persistent_data_memaddr_and_return_json_output(...)\n",
+      "        Frees the persistent_data memory and returns the json output\n",
+      "    \n",
+      "    free_store_memaddr(...)\n",
+      "        Frees the store memaddr\n",
+      "    \n",
+      "    return_arglines(...)\n",
+      "        Return the default args for a binary_c system\n",
+      "    \n",
+      "    return_help(...)\n",
+      "        Return the help info for a given parameter\n",
+      "    \n",
+      "    return_help_all(...)\n",
+      "        Return an overview of all the parameters, their description, categorized in sections\n",
+      "    \n",
+      "    return_maximum_mass_ratio_for_RLOF(...)\n",
+      "        Returns a string containing the maximum mass ratio for which a binary system does not RLOF at zams. Optionally accepts a store_capsule. Please use the wrapper functions in utils for this except when you know what you're doing\n",
+      "    \n",
+      "    return_minimum_orbit_for_RLOF(...)\n",
+      "        Returns a string containing the minimum orbit and separation for which a binary system does not RLOF at zams. Please use the wrapper functions in utils for this except when you know what you're doing\n",
+      "    \n",
+      "    return_persistent_data_memaddr(...)\n",
+      "        Return the store memory adress that will be passed to run_population\n",
+      "    \n",
+      "    return_store_memaddr(...)\n",
+      "        Return the store memory adress that will be passed to run_population\n",
+      "    \n",
+      "    return_version_info(...)\n",
+      "        Return the version information of the used binary_c build\n",
+      "    \n",
+      "    run_system(...)\n",
+      "        Function to run a system. This is a general function that will be able to handle different kinds of situations: single system run with different settings, population run with different settings, etc. To avoid having too many functions doing slightly different things. \n",
+      "        \n",
+      "        Arguments:\n",
+      "                argstring: argument string for binary_c\n",
+      "                (opt) custom_logging_func_memaddr: memory address value for custom logging function. Default = -1 (None)\n",
+      "                (opt) store_memaddr: memory adress of the store. Default = -1 (None)\n",
+      "                (opt) write_logfile: Boolean (in int form) for whether to enable the writing of the log function. Default = 0\n",
+      "                (opt) population: Boolean (in int form) for whether this system is part of a population run. Default = 0.\n",
+      "    \n",
+      "    test_func(...)\n",
+      "        Function that contains random snippets. Do not expect this to remain available, or reliable. i.e. dont use it.\n",
+      "\n",
+      "FILE\n",
+      "    /home/david/.pyenv/versions/3.6.4/envs/dev-binarycpython3.6.4/lib/python3.6/site-packages/binarycpython/_binary_c_bindings.cpython-36m-x86_64-linux-gnu.so\n",
+      "\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "from binarycpython import _binary_c_bindings\n",
+    "help(_binary_c_bindings)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "7ddede71-ffaa-4b24-aece-e94128a60d7f",
+   "metadata": {},
+   "source": [
+    "There are three main categories of functions:\n",
+    "\n",
+    "- Functions to get information from binary_c: these can be used to evolve systems, and get utility information from binary_c.\n",
+    "    - run_system\n",
+    "    - return_minimum_orbit_for_RLOF\n",
+    "    - return_maximum_mass_ratio_for_RLOF\n",
+    "    - return_help\n",
+    "    - return_help_all\n",
+    "    - return_arglines\n",
+    "\n",
+    "- Memory creation functions: these can be used to have binary_c allocate memory which is used or written to by binary_c\n",
+    "    - return_persistent_data_memaddr\n",
+    "    - return_store_memaddr\n",
+    "\n",
+    "- Memory freeing functions: These can be used to free the allocated memory, and in the case of persistent memory it will also return the contents of the ensemble\n",
+    "    - free_persistent_data_memaddr_and_return_json_output\n",
+    "    - free_store_memaddr"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "0dd3e115-1571-42f7-9ab9-cf7688fa28c1",
+   "metadata": {},
+   "source": [
+    "## Example usage:"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "c5015daa-35ab-4736-a04d-f3cbe661638c",
+   "metadata": {},
+   "source": [
+    "### Setting up, using and freeing store"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 10,
+   "id": "10a74d5a-a3d5-4543-a5bc-20d1fe885bb4",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "<capsule object \"STORE\" at 0x7f163859d0c0>\n",
+      "SINGLE_STAR_LIFETIME 10 27.7358\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# allocating store memory\n",
+    "store_memaddr = _binary_c_bindings.return_store_memaddr()\n",
+    "print(store_memaddr)\n",
+    "\n",
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=10,\n",
+    "    orbital_period=4500,\n",
+    "    eccentricity=0.0,\n",
+    "    metallicity=0.02,\n",
+    "    max_evolution_time=15000,\n",
+    ").strip()\n",
+    "\n",
+    "#\n",
+    "output = _binary_c_bindings.run_system(argstring, store_memaddr=store_memaddr)\n",
+    "print(output)\n",
+    "\n",
+    "# Freeing store\n",
+    "_binary_c_bindings.free_store_memaddr(store_memaddr)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "e9da5fc6-e680-483c-982e-4819767ed5b2",
+   "metadata": {},
+   "source": [
+    "### Getting information from binary_c"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "24f7ffe5-0076-459d-a37f-254e10d0d9f9",
+   "metadata": {},
+   "source": [
+    "We can get information for a parameter via return_help(parameter_name):\n",
+    "This will return an unparsed output"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 11,
+   "id": "318874f6-7acf-49bb-9786-299d4dffc0b3",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "binary_c help for variable : M_1 <Float>\n",
+      "\n",
+      "The initial mass of star one (in solar units, internally this is star index 0).\n",
+      "\n",
+      "Default : 0\n",
+      "\n",
+      "\n",
+      "\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(_binary_c_bindings.return_help('M_1'))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f7fafce6-a522-43ac-a0c2-15a3db393b49",
+   "metadata": {},
+   "source": [
+    "We can get information on all available parameters via return_help(parameter_name):"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 16,
+   "id": "d7e757ae-579c-42a2-a310-f0401b7800e8",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "\n",
+      "############################################################\n",
+      "##### Section Stars\n",
+      "############################################################\n",
+      "metallicity : This sets the metallicity of the stars, i.e. the amount (by mass) of matter which is not hydrogen or helium. If you are using the BSE algorithm, this must be 1e-4 <= metallicity <= 0.03. See also nucsyn_metallicity and effective_metallicity. : (null)\n",
+      "effective_metallicity : This sets effective metallicity of stars as used in routines like the Schneider wind loss. If not set, or set to DEFAULT_TO_METALLICITY (==-1, the default), this is just the same as metallicity. The main difference between effective_metallicity and metallicity is the range of validity: 0 <= effective_metallicity <= 1, while metallicity's range of validity is limited by the stellar evolution algorithm (so, for BSE, is 1e-4 <= metallicity <= 0.03). : (null)\n",
+      "M_1 : The initial mass of star one (in solar units, internally this is star index 0). : (null)\n",
+      "M_2 : The initial mass of star two (in solar units, internally this is star index 1). : (null)\n",
+      "M_3 : The initial mass of star three (in solar units, internally this is star index 2). : (null)\n",
+      "M_4 : The initial mass of star four (in solar units, internally this is star index 3). : (null)\n",
+      "vrot1 : The initial equatorial rotational velocity of star one (in km/s, internally this is star index 0). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot2,3,4. : (null)\n",
+      "vrot2 : The initial equatorial rotational velocity of star two (in km/s, internally this is star index 1). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,3,4. : (null)\n",
+      "vrot3 : The initial equatorial rotational velocity of star three (in km/s, internally this is star index 2). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,2,4. : (null)\n",
+      "vrot4 : The initial equatorial rotational velocity of star four (in km/s, internally this is star index 3). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,2,3. : (null)\n",
+      "Prot1 : The initial equatorial rotational velocity of star one (in km/s, internally this is star index 0). See also Prot2,3,4. : (null)\n",
+      "Prot2 : The initial equatorial rotational velocity of star two (in km/s, internally this is star index 1). See also Prot1,3,4. : (null)\n",
+      "Prot3 : The initial equatorial rotational period of star three (in days, internally this is star index 2). See also Prot1,2,4. : (null)\n",
+      "Prot4 : The initial equatorial rotational period of star four (in days, internally this is star index 3). See also Prot1,2,3. : (null)\n",
+      "inclination1 : The initial inclination of star one (in degrees). : (null)\n",
+      "inclination2 : The initial inclination of star two (in degrees). : (null)\n",
+      "inclination3 : The initial inclination of star three (in degrees). : (null)\n",
+      "inclination4 : The initial inclination of star four (in degrees). : (null)\n",
+      "B_1 : The initial magnetic field of star one (in Gauss, internally this is star index 0). : (null)\n",
+      "B_2 : The initial magnetic field of star two (in Gauss, internally this is star index 1). : (null)\n",
+      "B_3 : The initial magnetic field of star three (in Gauss, internally this is star index 2). : (null)\n",
+      "B_4 : The initial magnetic field of star four (in Gauss, internally this is star index 3). : (null)\n",
+      "B_inclination1 : The initial inclination of the magnetic field of star one (in degrees). : (null)\n",
+      "B_inclination2 : The initial inclination of the magnetic field of star two (in degrees). : (null)\n",
+      "B_inclination3 : The initial inclination of the magnetic field of star three (in degrees). : (null)\n",
+      "B_inclination4 : The initial inclination of the magnetic field of star four (in degrees). : (null)\n",
+      "stellar_type_1 : Set the stellar type of star 1 (internal index 0), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "stellar_type_2 : Set the stellar type of star 2 (internal index 1), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "stellar_type_3 : Set the stellar type of star 3 (internal index 2), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "stellar_type_4 : Set the stellar type of star 4 (internal index 3), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "max_stellar_type_1 : The maximum stellar type of star 1 (internal index 0). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value. \n",
+      " : (null)\n",
+      "max_stellar_type_2 : The maximum stellar type of star 2 (internal index 1). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.\n",
+      " : (null)\n",
+      "max_stellar_type_3 : The maximum stellar type of star 3 (internal index 2). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.\n",
+      " : (null)\n",
+      "max_stellar_type_4 : The maximum stellar type of star 4 (internal index 3). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.\n",
+      " : (null)\n",
+      "probability : The probability is a weighting applied to the star based on, say, the initial mass function. When running a grid of stars to simulate *all* stars, the summed probability of all the stars should be 1.0. : (null)\n",
+      "phasevol : The system's phase volume, used by binary_grid. : (null)\n",
+      "stellar_structure_algorithm : Set the stellar structure algorithm. 0=modified BSE (default), 1=none, 2=external function (must be defined by the calling code), 3=binary_c (not yet implemented). : (null)\n",
+      "solver : The type of solver. Default is the Forward-Euler (0), but could be RK2 (1), RK4 (2) or a predictor-corretor (3). : (null)\n",
+      "max_evolution_time : Set the maximum age for the stars (Myr). : (null)\n",
+      "max_model_number : Set the maximum number of models, ignored if 0 (default is 0). : (null)\n",
+      "monte_carlo_kicks : Turn on Monte-Carlo SN kicks. On (True) by default, and indeed other algorithms are probably broken. : (null)\n",
+      "disable_debug : Disables debug output. Only has an effect when DEBUG is 1, which probably requires a rebuild. Default FALSE. : (null)\n",
+      "timestep_logging : Turn on timestep logging (default is False). : (null)\n",
+      "rejects_in_log : Show timestep rejections in the main log (default is False). : (null)\n",
+      "vandenHeuvel_logging : Turn on van den Heuvel logging (default is False). : (null)\n",
+      "evolution_splitting : If True, turn on splitting of an evolutionary run if splitpoint (e.g. supernova) occurs. : (null)\n",
+      "disable_events : Whether to disable the new events code (defaults to False, so we use events by default)\n",
+      " : (null)\n",
+      "evolution_splitting_sn_eccentricity_threshold : Threshold eccentricity above which evolution splitting happens in a system with no SN kick. (0.01) : (null)\n",
+      "evolution_splitting_sn_n : Number of runs to split into when a SN occurs. : (null)\n",
+      "evolution_splitting_maxdepth : Max number of splits in an evolutionary run. : (null)\n",
+      "equation_of_state_algorithm : Set the equation of state algorithm. 0 = Paczynski. : (null)\n",
+      "opacity_algorithm : Set the opacity algorithm. 0 = Paczynski, 1 = Ferguson/Opal. : (null)\n",
+      "wind_mass_loss : Defines the algorithm used for stellar winds. 0 = none, 1 = Hurley et al. (2002), 2 = Schneider (2018). : 0\n",
+      "gbwind : Wind prescription for first red giant branch stars.  0=Reimers (Hurley et al 2000/2002; choose gb_reimers_eta=0.5 for their mass loss rate), 1=Schroeder+Cuntz 2005 (set gb_reimers_eta=1.0 for their mass loss rate). : (null)\n",
+      "mattsson_Orich_tpagbwind : Experimental : turns on Mattsson's TPAGB wind when the star is oxygen rich. Requires MATTSSON_MASS_LOSS. : (null)\n",
+      "magnetic_braking_factor : Multiplier for the magnetic braking angular momentum loss rate. : (null)\n",
+      "magnetic_braking_gamma : gamma factor in Rappaport style magnetic braking expression. : (null)\n",
+      "magnetic_braking_algorithm : Algorithm for the magnetic braking angular momentum loss rate. 0 = Hurley et al. 2002, 1 = Andronov, Pinnsonneault and Sills 2003, 2 = Barnes and Kim 2010  : (null)\n",
+      "helium_flash_mass_loss : Mass to be lost at the helium flash. : (null)\n",
+      "gb_reimers_eta : First red giant branch wind multiplication factor, cf. eta in Reimers' mass loss formula. (This multiplies the 4e-13 in Reimers' formula, or the 8e-14 in Schroeder and Cuntz.) : (null)\n",
+      "gbwindfac : Multiplier for the giant branch wind mass loss rate : (null)\n",
+      "tpagbwindfac : Multiplier for the TPAGB wind mass loss rate : (null)\n",
+      "eagbwindfac : Multiplier for the EAGB wind mass loss rate : (null)\n",
+      "nieuwenhuijzen_windfac : Multiplier for the Nieuwenhuijzen & de Jager wind mass loss rate : (null)\n",
+      "tpagbwind : Wind prescription during the TPAGB. 0=Karakas 2002 (a modified Vassiliadis and Wood 1993), 1=Hurley et al 2000/2002 (Vassiliadis and Wood 1993), 2=Reimers, 3=Bloecker, 4=Van Loon,  5=Rob's C-wind (broken?), 6,7=Vassiliadis and Wood 1993 (Karakas,Hurley variants respectively) when C/O>1, 8=Mattsson, 9 = Goldman et al. (2017), 10 = Beasor et al. (2020). : (null)\n",
+      "eagbwind : Wind prescription during the EAGB. 0=BSE (Hurley+2002, based on VW93), 1 = Goldman et al. (2017), 2 = Beasor et al. (2020). : (null)\n",
+      "wind_gas_to_dust_ratio : Gas to dust ratio used in wind calculations (e.g. Goldman et al. 2017). Typically 200 (Milky Way)-500 (Magellanic Clouds). Default is 200, approximately as in MW stars. : (null)\n",
+      "vwind_multiplier : Multiplier for the stellar wind velocity. : (null)\n",
+      "vwind_beta : Beta for stellar wind speed calculations, where vwind=sqrt(beta) * escape velocity. Default 0.125 (from BSE, Hurley et al. 2002).  : (null)\n",
+      "superwind_mira_switchon : In the Vassiliadis and Wood (1993) AGB wind prescription, the superwind is turned on at a given Mira period, usually 500 days. You can vary when this switch-on happens with this parameter. : (null)\n",
+      "vw93_mira_shift : In the Vassiliadis and Wood (1993) AGB wind prescription, the wind loss rate depends on the Mira period plus this offset. Requires VW93_MIRA_SHIFT. : (null)\n",
+      "vw93_multiplier : In the Vassiliadis and Wood (1993) AGB wind prescription, the wind loss rate is multiplied by this factor. Requires VW93_MULTIPLIER. : (null)\n",
+      "tpagb_reimers_eta : TPAGB Reimers wind multiplication factor, cf. eta in Reimers' mass loss formula. (This multiplies the 4e-13 in Reimers' formula, or the 8e-14 in Schroeder and Cuntz.) Note that Reimers is not the default TPAGB wind prescription. See also tpagbwind. : (null)\n",
+      "artificial_mass_accretion_rate%d : Constant mass accretion rate for star <n>. : (null)\n",
+      "artificial_angular_momentum_accretion_rate%d : Constant angular momentum accretion for star <n>. : (null)\n",
+      "artificial_orbital_angular_momentum_accretion_rate : Constant angular momentum accretion rate on the orbit. : (null)\n",
+      "artificial_accretion_start_time : Time at which artificial accretion stars. Ignored if <0 (default is -1). : (null)\n",
+      "artificial_accretion_end_time : Time at which artificial accretion ends. Ignored if <0 (default is -1). : (null)\n",
+      "wr_wind : Massive-star (WR) wind prescription. 0 = Hurley et al 2000/2002, 1=Maeder and Meynet, 2=Nugis and Lamers, 3=John Eldridge's version of Vink's early-2000s wind (See Lynnette Dray's thesis, or John Eldridge's thesis) : (null)\n",
+      "wr_wind_fac : Massive-star (WR) wind multiplication factor. : (null)\n",
+      "wrwindfac : Massive-star (WR) wind multiplication factor. Synonymous with wr_wind_fac (which you should use instead). : (null)\n",
+      "BH_prescription : Black hole mass prescrition: relates the mass of a newly formed black hole to its progenitor's (CO) core mass. 0=Hurley et al 2000/2002, 1=Belczynski (early 2000s). : (null)\n",
+      "PPISN_prescription : (Pulsational) Pair-Instability Supernova prescription: Relates initial helium core mass of star to whether the star undergoes PPISN or PISN. Requires PPISN flag to be True (see binary_c_parameters.h). 0=no ppisn, 1=Farmer et al 2019. : Ignore\n",
+      "sn_kick_distribution_II : Set the distribution of speeds applied to kick type II core collapse supernova systems. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_ECAP : Set the distribution of speeds applied to the remnants of electron-capture supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_NS_NS : Set the distribution of speeds applied to kick neutron stars and black holes that survive a NS-NS merger. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_IBC : Set the distribution of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_GRB_COLLAPSAR : Set the distribution of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova which is also a collapsar. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_TZ : Set the distribution of speeds applied to kick newly-born neutron stars and black holes at the death of a Thorne-Zytkow object. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_AIC_BH : Set the distribution of speeds applied to kick newly-born neutron stars black holes after accretion induced collapse of a neutron star. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_BH_BH : Set the distribution of speeds applied to black holes formed by the merger of two black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_BH_NS : Set the distribution of speeds applied to black holes formed by the merger of a neutron star and a black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_IA_Hybrid_HeCOWD : Set the distribution of speeds applied to any survivor of a hybrid He-COWD SNIa explosion. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_IA_Hybrid_HeCOWD_subluminous : Set the distribution of speeds applied to any survivor of a subluminous hybrid He-COWD SNIa explosion. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_PPISN : Set the distribution of speeds applied to PPISN supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_PISN : Set the distribution of speeds applied to PISN supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_PHDIS : Set the distribution of speeds applied to PHDIS supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_II : Set the dispersion of speeds applied to kick type II core collapse supernova systems. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_ECAP : Set the dispersion of speeds applied to the remnants of electron-capture supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_NS_NS : Set the dispersion of speeds applied to kick neutron stars and black holes that survive a NS-NS merger. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_IBC : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_GRB_COLLAPSAR : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova which is also a collapsar. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_TZ : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes at the death of a Thorne-Zytkow object. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_AIC_BH : Set the dispersion of speeds applied to kick newly-born neutron stars black holes after accretion induced collapse of a neutron star. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_BH_BH : Set the dispersion of speeds applied to black holes formed by the merger of two black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_BH_NS : Set the dispersion of speeds applied to black holes formed by the merger of a neutron star and a black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_IA_Hybrid_HeCOWD : Set the dispersion of speeds applied to the survivor of a SNIa explosion of a hybrid He-COWD. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_IA_Hybrid_HeCOWD_subluminous : Set the dispersion of speeds applied to the survivor of a subluminous SNIa explosion of a hybrid He-COWD. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_PPISN : Set the dispersion of speeds applied to the survivor of a PPISN supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_PISN : Set the dispersion of speeds applied to the survivor of a PISN supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_PHDIS : Set the dispersion of speeds applied to the survivor of a PHDIS supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_companion_IA_He : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia He supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_ELD : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia ELD (sub-Mch) supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_CHAND : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia Mch supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_AIC : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when an accretion induced collapse (supernova) occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_ECAP : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when an electron capture supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_He_Coal : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia helium merger supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_CHAND_Coal : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia Mch merger supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_NS_NS : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a neutron-star neutron-star merger. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_GRB_COLLAPSAR : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a GRB Collapsar (rapidly rotating SN Ibc) supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_HeStarIa : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a He-star Ia supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IBC : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a type Ib/c supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_II : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a type II supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IIa : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a type IIa supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_WDKICK : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a WD is kicked. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_TZ : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Thorne-Zytkow object is formed. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_AIC_BH : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a neutron star collapses to a black hole. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_BH_BH : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when two black holes merge. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_BH_NS : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a black hole merges with a neutron star. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_Hybrid_HeCOWD : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a hybrid He-COWD type Ia explosion. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_Hybrid_HeCOWD_subluminous : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a subluminous hybrid He-COWD type Ia explosion. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_PPISN : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a PPISN supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_PISN : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a PISN supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_PHDIS : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a PHDIS supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "wd_sigma : Set the speed at which white dwarfs are kicked when they form, in km/s. Default is zero (i.e. no kick). Requires WD_KICKS. : (null)\n",
+      "wd_kick_direction : Set the direction of white dwarf kicks. 0 = random, 1 = up, 2 = forward, 3 = backward, 4 = inward, 5 = outward. Requires WD_KICKS. : (null)\n",
+      "wd_kick_when : Decide when to kick a white dwarf. 0=at birth, 1=at first RLOF, 2=at given pulse number (see wd_kick_pulse_number), 3 at every pulse Requires WD_KICKS. : (null)\n",
+      "wd_kick_pulse_number : Apply a kick to a star at a desired pulse number on the TPAGB (i.e. pre-WD). Requires WD_KICKS. : (null)\n",
+      "minimum_helium_ignition_core_mass : Minimum helium core mass required to ignite helium in the case that the hydrogen envelope is stripped on the giant branch, e.g. to make an sdB or sdO star. Typically 0.4, if 0.0 then the BSE algorithm (based on the total mass) is used. : (null)\n",
+      "minimum_CO_core_mass_for_carbon_ignition : Minimum CO core mass for carbon ignition, assuming Mc,bagb>1.6Msun. Typically around 1.08Msun (Pols+1998). : (null)\n",
+      "minimum_CO_core_mass_for_neon_ignition : Minimum CO core mass for neon ignition. Typically around 1.42Msun. Stars that have cores that ignite carbon, but not neon explode in electon-capture supernovae. : (null)\n",
+      "minimum_mcbagb_for_nondegenerate_carbon_ignition : Minimum Mc,bagb (core mass at the base of the AGB) for non-degenerate carbon ignition. Typically around 2.25Msun (Pols+1998). : (null)\n",
+      "maximum_mcbagb_for_degenerate_carbon_ignition : Maximum Mc,bagb (core mass at the base of the AGB) for degenerate carbon ignition. Typically around 1.6Msun (Pols+1998). : (null)\n",
+      "max_neutron_star_mass : Maximum mass of a neutron star before it collapses to a black hole. Typically around 2Msun. : (null)\n",
+      "chandrasekhar_mass : The Chandrasekhar mass, usually 1.44Msun : (null)\n",
+      "delta_mcmin : A parameter to reduce the minimum core mass for third dredge up to occur on the TPAGB. As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. : (null)\n",
+      "lambda_min : A parameter to increase the efficiency of third dredge up on the TPAGB. The efficiency is lambda * lambda_mult, and setting lambda_min>0 implies that, once Mc>Mcmin (see delta_mcmin) lambda=Max(lambda(fit to Karakas), lambda_min). As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. See also lambda_multiplier. : (null)\n",
+      "lambda_multiplier : A parameter to increase the efficiency of third dredge up on the TPAGB. The efficiency is lambda * lambda_mult, and setting lambda_min>0 implies that, once Mc>Mcmin (see delta_mcmin) lambda=Max(lambda(fit to Karakas), lambda_min). As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. : (null)\n",
+      "minimum_envelope_mass_for_third_dredgeup : The minimum envelope mass for third dredge up on the TPAGB. Early, solar metallicity models by Straniero et al suggested 0.5Msun is typical. However, circumstantial evidence (Izzard et al 2009) as well as newer models by Stancliffe and Karakas suggest that at low metallicity a value nearer zero is more appropriate. : (null)\n",
+      "mass_of_pmz : The mass in the partial mixing zone of a TPAGB star, using the Karakas 2012 tables. Ask Carlo Abate for more details, or see the series of papers Abate et al 2012, 2013, 2014. Requires NUCSYN and USE_TABULAR_INTERSHELL_ABUNDANCES_KARAKAS_2012. : (null)\n",
+      "c13_eff : The \"efficiency\" of partial mixing in a TPAGB star intershell region, when using the s-process tables of Gallino, Busso, Lugaro et al. as provided by Maria Lugaro for the Izzard et al. 2009 paper. Requires NUCSYN and NUCSYN_S_PROCESS. : (null)\n",
+      "mc13_pocket_multiplier : Multiplies the mass in the partial mixing zone of a TPAGB star, when using the s-process tables of Gallino, Busso, Lugaro et al. as provided by Maria Lugaro for the Izzard et al. 2009 paper. Requires NUCSYN and NUCSYN_S_PROCESS. : (null)\n",
+      "tides_convective_damping : Tidal convective damping algorithm. 0=TIDES_HURLEY2002 Zahn 197x timescales + Hut, as in Hurley et al (2002), 1 = TIDES_ZAHN1989 : Zahn 1989 lambdas + Hut. : (null)\n",
+      "E2_prescription : Choose how to calculate the E2 structural parameter (used in tidal timescale calculations). 0=Hurley 1=Izzard (see Siess et al 2013). : (null)\n",
+      "dtfac : A parameter to decrease the timestep ONLY during the TPAGB phase. : (null)\n",
+      "hbbtfac : A parameter to modulate the temperature at the base of the hot-bottom burning zone in TPAGB stars. (Works only if NUCSYN is defined) : (null)\n",
+      "wind_multiplier_%d : Wind multiplier for the stellar type specified by the intger %d. By default these are all 1.0. : (null)\n",
+      "wind_type_multiplier_%d : Wind multiplier for different types of wind (MS, GB, AGB, WR, LBV, OTHER), given by the integer %d. By default these are all 1.0. : (null)\n",
+      "pre_main_sequence : Set to True to turn on pre-main sequence evolution. Currently this is not a special stellar type, rather the first (small) fraction of the main sequence has increased radii to match the Railton et al 2014 fits to Tout's pre-main sequence stars. Requires PRE_MAIN_SEQUENCE. See also pre_main_sequence_fit_lobes. : (null)\n",
+      "pre_main_sequence_fit_lobes : Set to True force a pre-main sequence star into its Roche lobe. This is done by artificially aging it. Requires PRE_MAIN_SEQUENCE : (null)\n",
+      "small_envelope_method : Choose the method used to determine the stellar radius when the envelope mass is very thin. 0 = Hurley et al. (2002), 1 = Miller Bertolami et al. (2016+) for GB and AGB stars only. : (null)\n",
+      "timestep_modulator : Multiplier applied to the global timestep. Requires TIMESTEP_MODULATION. : (null)\n",
+      "timestep_multiplier%d : Multiplier applied to timestep limit <n>. : (null)\n",
+      "maximum_timestep : The maximum timestep (MYr). : (null)\n",
+      "zoomfac_multiplier_decrease : When a timestep is rejected, decrease the timestep by this factor (0.5). : (null)\n",
+      "zoomfac_multiplier_increase : When a timestep is rejected, zooms, then succeeds, increase the timestep by this factor (1.2). : (null)\n",
+      "maximum_timestep_factor : The maximum factor between two subsequent timesteps (1.2). : (null)\n",
+      "maximum_nuclear_burning_timestep : The maximum timestep (MYr) in any nuclear burning phase. : (null)\n",
+      "nova_retention_method : Algorithm used to calculate the amount of mass retained during a nova explosion. 0=use nova_retention_fraction. (other methods pending) : (null)\n",
+      "MINT_metallicity : This sets the metallicity for MINT. It is ignored if set to -1.0, the default, in which case the normal metallicity parameter is used. : (null)\n",
+      "gaia_Teff_binwidth : log10(Effective temperature) bin width used to make Gaia-like HRDs\n",
+      " : (null)\n",
+      "gaia_L_binwidth : log10(luminosity) bin width used to make Gaia-like HRDs\n",
+      " : (null)\n",
+      "gaia_colour_transform_method : Use this to select the method used to transform to Gaia colours from other colour schemes. GAIA_CONVERSION_UBVRI_UNIVARIATE_JORDI2010 = 0 Jordi et al.'s univariate UBVRI fits, GAIA_CONVERSION_UBVRI_BIVARIATE_JORDI2010 = 1 Jordi et al.'s bivariate UBVRI fits, GAIA_CONVERSION_ugriz_UNIVARIATE_JORDI2010 = 2 Jordi et al.'s univariate UBVRI fits, GAIA_CONVERSION_ugriz_BIVARIATE_JORDI2010 = 3 Jordi et al.'s univariate ugriv fits, GAIA_CONVERSION_UBVRI_UNIVARIATE_EVANS2018 = 4 Evans et al. (2018, DR2) fits, GAIA_CONVERSION_ugriz_UNIVARIATE_EVANS2018 = 5 Evans et al. (2018, DR2) fits, GAIA_CONVERSION_UBVRI_RIELLO2020 = 6 Riello et al. (2020, DR3) fits, GAIA_CONVERSION_ugriz_RIELLO2020 = 7 Riello et al. (2020, DR3) fits. : (null)\n",
+      "rotationally_enhanced_mass_loss : Set to 1 to enable rotationally enhanced mass loss rate algorithms: 0= none, 1=formula cf. Langer models (=ROTATIONALLY_ENHANCED_MASSLOSS_LANGER_FORMULA), 2=limit accretion rate before wind loss is applied, 3 = both 1 and 2. See also rotationally_enhanced_exponent : (null)\n",
+      "AGB_core_algorithm : Algorithm to use for calculating AGB core masses. 0=Hurley et al. 2002 if no NUCSYN, Karakas 2002 if NUCSYN is defined; 1=Hurley et al. 2002 (overshooting models); 1=Karakas 2002 (non-overshooting models). : (null)\n",
+      "AGB_radius_algorithm : Algorithm to use for calculating radii on the TPAGB. : (null)\n",
+      "AGB_luminosity_algorithm : Algorithm to use for calculating luminosities on the TPAGB. : (null)\n",
+      "AGB_3dup_algorithm : Algorithm to use for calculating third dredge up efficiency on the TPAGB. : (null)\n",
+      "overspin_algorithm : Algorithm to determine what we do when a star is rotating at its breakup velocity. OVERSPIN_BSE (0) conservatively transfers the angular momentum back to the orbit. OVERSPIN_MASSLOSS uses the rotationally_enhanced_massloss parameter to lose mass which carries away the angular momentum. : (null)\n",
+      "rotationally_enhanced_exponent : The exponent (power) by which rotationally enhanced mass loss is raised. Requires ROTATIONALLY_ENHANCED_MASS_LOSS. See also rotationally_enhanced_mass_loss. : (null)\n",
+      "batchmode : Set the batchmode control variable. Use only if you know what you are doing! : (null)\n",
+      "speedtests : If True, turns on speedtests during version information (off by default). : (null)\n",
+      "use_fixed_timestep_%d : Set to True to use fixed timestep <n>, False to turn off. Fixed timesteps are on (this is True) by default. : (null)\n",
+      "task%d : Control tasks to be performed by binary_c. By default, these are all TRUE. For more information see binary_c_macros.h, particularly the BINARY_C_TASK_* macros. : (null)\n",
+      "orbiting_object : Usage: --orbiting_object mass,spinrate,central_object,period. : 1.0\n",
+      "orbiting_objects_log : If True, turn on orbiting-object log. : (null)\n",
+      "orbiting_objects_log : If True, turn on orbiting-object log. : (null)\n",
+      "orbiting_objects_wind_accretion_multiplier : Multiplier for wind accretion on orbiting objects. Hurley et al 2002 use 1.5, which is the default. : (null)\n",
+      "orbiting_objects_close_pc_threshold : How close are orbiting objects allowed to be? Set this to be the absolute percentage difference minimum. : (null)\n",
+      "orbiting_objects_tides_multiplier : Multiplier for tidal torques on orbiting objects. : (null)\n",
+      "evaporate_escaped_orbiting_objects : If True, evaporate orbiting objects that have escaped the system. : (null)\n",
+      "RLOF_transition_objects_escape : If True, objects that escape their Roche lobe are ejected from the system, otherwise they are placed just outside the minimum stable orbit. : (null)\n",
+      "PN_resolve : If True, the timestep will be shortened to resolve better the PN phase (FALSE). : (null)\n",
+      "PN_resolve_minimum_luminosity : The luminosity above which extra time resolution for PNe is applied (see PN_resolve). : (null)\n",
+      "PN_resolve_maximum_envelope_mass : The envelope mass below which extra time resolution for PNe is applied (see PN_resolve). : (null)\n",
+      "PN_resolve_minimum_effective_temperature : The minimum effective temperature above which extra time resolution for PNe is applied (see PN_resolve). : (null)\n",
+      "PN_fast_wind : If True, thin-envelope PNe will have fast winds (FALSE). : (null)\n",
+      "PN_fast_wind_dm_GB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_GB) : (null)\n",
+      "PN_fast_wind_mdot_GB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_GB) : (null)\n",
+      "PN_fast_wind_dm_AGB : The envelope mass below which fast wind used during the AGB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_AGB) : (null)\n",
+      "PN_fast_wind_mdot_AGB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_AGB) : (null)\n",
+      "HeWD_HeWD_ignition_mass : HeWD-HeWD mergers above this mass reignite helium. (0.3) : (null)\n",
+      "wind_Nieuwenhuijzen_luminosity_lower_limit : Above this luminosity we activate the Nieuwenhuijzen and de Jager wind (4e3 Lsun). : (null)\n",
+      "wind_LBV_luminosity_lower_limit : Above this luminosity we activate the LBV wind (6e5 Lsun). : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Binary\n",
+      "############################################################\n",
+      "separation : Set the orbital separation (actually the semi-major axis) of the binary (internal index 0, stellar indices 0 and 1) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)\n",
+      "separation_triple : Set the orbital separation (actually the semi-major axis) of the triple (internal index 1) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)\n",
+      "separation_quadruple : Set the orbital separation (actually the semi-major axis) of the quadruple (internal index 2) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)\n",
+      "orbital_period : Set the initial orbital period of the binary, stars 1 and 2 (internal indices 0 and 1) in days. See also separation. : (null)\n",
+      "orbital_period_triple : Set the initial orbital period of the triple in days. See also separation. : (null)\n",
+      "orbital_period_quadruple : Set the orbital period of the outer binary in a quadrulple (stars 3 and 4, internal indices 2 and 3) in days. See also separation. : (null)\n",
+      "eccentricity : Set the initial eccentricity of the binary orbit (stars 1 and 2, internal indices 0 and 1). : (null)\n",
+      "eccentricity_triple : Set the initial eccentricity of the triple orbit. : (null)\n",
+      "eccentricity_quadruple : Set the initial eccentricity of the outer binary of a quadruple (stars 3 and 4, internal indices 2 and 3). : (null)\n",
+      "incliniation : Set the initial orbital_inclination of the binary relative to zero. : (null)\n",
+      "incliniation_triple : Set the initial orbital_inclination of the triple orbit relative to zero. : (null)\n",
+      "incliniation_quadruple : Set the initial orbital_inclinationy of the quadruple orbit relative to zero. : (null)\n",
+      "orbital_phase : Set the initial orbital phase of the binary orbit. : (null)\n",
+      "orbital_phase_triple : Set the initial orbital phase of the triple orbit. : (null)\n",
+      "orbital_phase_quadruple : Set the initial orbital phase of the quadruple orbit. : (null)\n",
+      "argument_of_periastron : Set the initial argument of periastron of the binary orbit. : (null)\n",
+      "argument_of_periastron_triple : Set the initial argument of periastron of the triple orbit. : (null)\n",
+      "argument_of_periastron_quadruple : Set the initial argument of periastron of the quadruple orbit. : (null)\n",
+      "disc_timestep_factor : Factor that multiplies the natural timestep of a disc. : (null)\n",
+      "white_dwarf_cooling_model : White dwarf cooling model, relates age to luminosity. WHITE_DWARF_COOLING_MESTEL = 0 is Mestel's model, WHITE_DWARF_COOLING_MESTEL_MODIFIED = 1 is Hurley's modified Mestel model, WHITE_DWARF_COOLING_CARRASCO2014 = 2 is based on Carrasco (2014) tables.   : (null)\n",
+      "white_dwarf_radius_model : White dwarf radius model, radius to mass (and perhaps age). WHITE_DWARF_RADIUS_NAUENBERG1972 = 0 Nauenberg (1972), WHITE_DWARF_RADIUS_MU = 1 mu-dependent variant, WHITE_DWARF_RADIUS_CARRASCO2014 = 2 is based on Carrasco (2014) tables. : (null)\n",
+      "cbdisc_mass_loss_inner_viscous_accretion_method : Chooses where the mass that is accreted from the inner edge of a circumbinary disc goes, i.e. to which star. 0 = Young and Clarke 2015, 1 = Gerosa et al 2015, 2 = 50:50 (i.e. not dependence on mass). : (null)\n",
+      "cbdisc_inner_edge_stripping : If True, allow inner edge mass stripping. : (null)\n",
+      "cbdisc_end_evolution_after_disc : If True, stop evolution when a disc evaporates. : (null)\n",
+      "cbdisc_no_wind_if_cbdisc : If True, disable stellar winds when there is a circumbinary disc. : (null)\n",
+      "cbdisc_outer_edge_stripping : If True, allow outer edge mass stripping. : (null)\n",
+      "disc_n_monte_carlo_guesses : Number of monte carlo guesses to try in the disc solver if the normal list of guesses fails (0). : (null)\n",
+      "disc_log : If 1, turn on the disc log. Requires DISC_LOG to be defined on build. : (null)\n",
+      "disc_log2d : If 1, turn on the 2d disc log. Requires DISC_LOG to be defined on build. : (null)\n",
+      "disc_log_dt : If non-zero, only allows disc log output every disc_log_dt Myr. : (null)\n",
+      "disc_log_directory : Directory into which disc logging is sent (must exist!). : /tmp/\n",
+      "post_ce_adaptive_menv : If TRUE, and if post_ce_objects_have_envelopes is TRUE, then the envelope mass of a post-CE star is such that it sits just inside its Roche lobe. If FALSE then a fixed (thin) envelope mass is applied that depends on the stellar type (see macros POST_CE_ENVELOPE_DM_GB, POST_CE_ENVELOPE_DM_EAGB and POST_CE_ENVELOPE_DM_TPAGB). : (null)\n",
+      "post_ce_objects_have_envelopes : If TRUE then post-common-envelope objects have thin envelopes. You need this if you are to have post-CE post-AGB stars. Note that this *may* be unstable, i.e. you may end up having many CEEs. The mass in the envelope is controlled by post_ce_adaptive_menv. TRUE by default. : (null)\n",
+      "PN_comenv_transition_time : post-common envelope transition time in years (1e2).  This is the time taken to move from CEE ejection to Teff > 30e4 K. Hall et al. (2013) suggest ~100 years. : (null)\n",
+      "minimum_time_between_PNe : The minimum time (Myr) between planetary nebula detections. This prevents multiple, fast common envelopes triggering two PNe (0.1). : (null)\n",
+      "PN_Hall_fading_time_algorithm : In stars with low mass (<0.45Msun) cores, you can choose to set the PN fading time to either the minimum (PN_HALL_FADING_TIME_ALGORITHM_MINIMUM) or maximum (PN_HALL_FADING_TIME_ALGORITHM_MAXIMUM) as shown in Fig. 6 of Hall et al. (2013). : (null)\n",
+      "PPN_envelope_mass : Desired pre-planetary nebula (post-AGB) envelope mass. : (null)\n",
+      "cbdisc_eccentricity_pumping_method : Select from various eccentricity-pumping methods when there is a circumbinary disc. Requires DISCS. 0 = off. : (null)\n",
+      "cbdisc_viscous_photoevaporative_coupling : Set to 1 to turn on viscous-photoevaporative coupling in circumbinary discs. Requires DISCS. 0 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_NONE = off, 1 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_INSTANT instant, 2 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_VISCOUS slow, viscous wind. : (null)\n",
+      "cbdisc_inner_edge_stripping_timescale : Defines the timescale for mass loss from by inner edge stripping. 0 = instant, 1 = very long, 2 = viscous at Revap_in, 3 = orbital at Revap_in. : (null)\n",
+      "cbdisc_outer_edge_stripping_timescale : Defines the timescale for mass loss from by outer edge stripping. 0 = instant, 1 = very long, 2 = viscous at Revap_in, 3 = orbital at Revap_out. : (null)\n",
+      "cbdisc_viscous_L2_coupling : Set to 1 to turn on viscous-L2-loss coupling in circumbinary discs. Requires DISCS. 0 = off. : (null)\n",
+      "gravitational_radiation_model : Model for gravitational radiation from the system. 0=Hurley et al 2002 (Landau and Lifshitz 1951). 1 = as 0 but only when there is no RLOF. 2 = none. : (null)\n",
+      "nova_irradiation_multiplier : Multiplier for nova-radiative induced mass loss. (Shara+1986) : (null)\n",
+      "gravitational_radiation_modulator_J : Modulator for gravitational wave radiation angular momentum loss rate (1.0). : (null)\n",
+      "gravitational_radiation_modulator_e : Modulator for gravitational wave radiation eccentricity pumping rate (1.0). : (null)\n",
+      "nova_faml_multiplier : Nova friction-induced angular momentum loss multiplier. (Shara+1986) : (null)\n",
+      "RLOF_angular_momentum_transfer_model : Choose angular momentum transfer model in RLOF. 0=BSE (with discs), 1=conservative : (null)\n",
+      "post_SN_orbit_method : Method by which the post-SN orbit is calculated. 0=BSE, 1=Tauris&Taken 1998. : (null)\n",
+      "multiplicity : Multiplicity: 1=single star, 2=binary, 3=triple, 4=quadruple. : (null)\n",
+      "accretion_limit_eddington_steady_multiplier : Steady accretion is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_steady_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)\n",
+      "accretion_limit_eddington_LMMS_multiplier : Accretion from a low-mass, convective, main_sequence star is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_LMMS_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)\n",
+      "accretion_limit_eddington_WD_to_remnant_multiplier : Accretion from a WD onto a remnant star (e.g. another white dwarf, neutron star or black hole) is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_WD_to_remnant_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)\n",
+      "accretion_limit_thermal_multiplier : Mass transfer onto a MS, HG or CHeB star is limited by the accretor's thermal rate times this multiplier. : (null)\n",
+      "accretion_limit_dynamical_multiplier : Mass transfer is limited by the accretor's dynamical rate times this multiplier. : (null)\n",
+      "donor_limit_envelope_multiplier : Mass transfer by RLOF is limited by this fraction of the donor's envelope mass per timestep : (null)\n",
+      "donor_limit_thermal_multiplier : Mass transfer by RLOF is limited by the accretor's thermal rate times this multiplier. : (null)\n",
+      "donor_limit_dynamical_multiplier : Mass transfer by RLOF is limited by the donor's dynamical rate times this multiplier. : (null)\n",
+      "Bondi_Hoyle_accretion_factor : Wind accretion rate, as calculated by the Bondi-Hoyle-Littleton formula, multiplcation factor. Hurley et al 2002 use 1.5, which is the default. : (null)\n",
+      "tidal_strength_factor : A modulator for the tidal strength. If this factor > 1 then tides are stronger, i.e. tidal timescales are reduced. : (null)\n",
+      "hachisu_qcrit : Critical q=Maccretor/Mdonor above which Hachisu's disk wind turns on. : (null)\n",
+      "hachisu_disk_wind : Set to True to turn on Hachisu's disk wind when material accretes too fast onto a white dwarf. This helps to make more SNeIa. See also hachisu_qcrit. : (null)\n",
+      "mass_accretion_for_eld : The mass that must be accreted onto a COWD for it to ignite as an edge-lit detonation SNIa. : (null)\n",
+      "WDWD_merger_algorithm : Algorithm to be used when merging two white dwarfs. 0 = Hurley et al. (2002), 1 = Perets+ (2019), 2 = Chen+ (2016, todo)  : (null)\n",
+      "type_Ia_MCh_supernova_algorithm : Algorithm to be used when calculating type Ia yields from Chandrasekhar-mass exploders. 0 = DD7 (Iwamoto 1999), 1 = Seitenzahl 2013 3D hydro yields (you must also set Seitenzahl2013_model)  : (null)\n",
+      "Seitenzahl2013_model : Which of Seitenzahl et al. 2013's models to use? One of N1,N3,N5,N10,N20,N40,N100L,N100,N100H,N150,N200,N300C,N1600,N1600C,N100_Z0.5,N100_Z0.1,N100_Z0.01 (defaults to N100). : N1\n",
+      "type_Ia_sub_MCh_supernova_algorithm : Algorithm to be used when calculating type Ia yields from sub-Chandrasekhar-mass exploders. (Currently unused.) : (null)\n",
+      "max_HeWD_mass : The maximum mass a HeWD can have before it ignites helium (0.7). : (null)\n",
+      "merger_mass_loss_fraction : Fraction of the total mass which is lost when stars merge. : (null)\n",
+      "merger_angular_momentum_factor : When two stars merge the resulting single star retains a fraction of the total system angular momentum (or the critical spin angular momentum, if it is smaller) multiplied by this factor. : (null)\n",
+      "wind_angular_momentum_loss : Prescription for losing angular momentum in a stellar wind. 0=Hurley et al 2002 ('Tout') prescription, 1=lw i.e. a factor multiplying the specific orbital angular momentum, 2=lw hybrid for fast winds. Set wind_djorb_fac to the desired factor.. : (null)\n",
+      "wind_djorb_fac : Factor multiplying angular momentum loss in a stellar wind when wind_angular_momentum_loss=0 (the Tout/Hurley et al 2002 prescription). See wind_angular_momentum_loss. : (null)\n",
+      "lw : Factor multiplying angular momentum loss in a stellar wind when wind_angular_momentum_loss=1,2 (the 'lw' prescription). See wind_angular_momentum_loss. : (null)\n",
+      "VW93_EAGB_wind_speed : Activate this to use Vassiliadis and Wood (1993) wind speed during the EAGB. : (null)\n",
+      "VW93_TPAGB_wind_speed : Activate this to use Vassiliadis and Wood (1993) wind speed during the EAGB. : (null)\n",
+      "use_periastron_Roche_radius : Set this to True to use the Roche lobe radius at periastron, rather than (the default to) assume a circular orbit. This will be useful one day when we treat RLOF in eccentric orbits properly, hopefully. : (null)\n",
+      "qcrit_LMMS : Apply critical q=Mdonor/Maccretor value for low-mass main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_MS : Apply critical q=Mdonor/Maccretor value for (non-low mass) main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HG : Apply critical q=Mdonor/Maccretor value for Hertzsprung gap stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_GB : Apply critical q=Mdonor/Maccretor value for first red giant branch stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_CHeB : Apply critical q=Mdonor/Maccretor value for core helium burning stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_EAGB : Apply critical q=Mdonor/Maccretor value for early-AGB stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_TPAGB : Apply critical q=Mdonor/Maccretor value for TP-AGB stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeMS : Apply critical q=Mdonor/Maccretor value for helium main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeHG : Apply critical q=Mdonor/Maccretor value for helium Hertzsprung gap stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeGB : Apply critical q=Mdonor/Maccretor value for helium red giant stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeWD : Apply critical q=Mdonor/Maccretor value for helium white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_COWD : Apply critical q=Mdonor/Maccretor value for carbon-oxygen white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_ONeWD : Apply critical q=Mdonor/Maccretor value for oxygen-neon white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_NS : Apply critical q=Mdonor/Maccretor value for neutron stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_BH : Apply critical q=Mdonor/Maccretor value for black holes to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_LMMS : Apply critical q=Mdonor/Maccretor value for (low mass) main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_MS : Apply critical q=Mdonor/Maccretor value for (non-low mass) main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HG : Apply critical q=Mdonor/Maccretor value for Hertzsprung gap stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_GB : Apply critical q=Mdonor/Maccretor value for first red giant branch stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_CHeB : Apply critical q=Mdonor/Maccretor value for core helium burning stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_EAGB : Apply critical q=Mdonor/Maccretor value for early-AGB stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_TPAGB : Apply critical q=Mdonor/Maccretor value for TP-AGB stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeMS : Apply critical q=Mdonor/Maccretor value for helium main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeHG : Apply critical q=Mdonor/Maccretor value for helium Hertzsprung gap stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeGB : Apply critical q=Mdonor/Maccretor value for helium red giant stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeWD : Apply critical q=Mdonor/Maccretor value for helium white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_COWD : Apply critical q=Mdonor/Maccretor value for carbon-oxygen white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_ONeWD : Apply critical q=Mdonor/Maccretor value for oxygen-neon white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_NS : Apply critical q=Mdonor/Maccretor value for neutron stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_BH : Apply critical q=Mdonor/Maccretor value for black holes to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "mass_for_Hestar_Ia_upper : Only helium stars below this mass can explode as SNIa. Default is zero, i.e. it never happens. See also mass_for_Hestar_Ia_lower. : (null)\n",
+      "mass_for_Hestar_Ia_lower : Only helium stars above this mass can explode as SNIa. Default is zero, i.e. it never happens. See also mass_for_Hestar_Ia_upper. : (null)\n",
+      "alphaCB : Circumbinary disk viscosity parameter, alpha. : (null)\n",
+      "minimum_donor_menv_for_comenv : Minimum donor envelope mass for common envelope evolution to be triggered (Msun). Default 0. : (null)\n",
+      "comenv_prescription : Use this to choose which common envelope prescription you should use. 0=Hurley et al 2002 (based on the Paczyński energy model) or 1=Nelemans and Tout (angular momentum model). See also alpha_ce, comenv_ms_accretion_mass, comenv_ms_accretion_fraction, comenv_ns_accretion_fraction, comenv_ns_accretion_mass, nelemans_gamma, nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs, lambda_ce, lambda_ionisation. : (null)\n",
+      "comenv_prescription%d : Use this to choose which common envelope prescription you should use. 0=Hurley et al 2002 (based on the Paczyński energy model) or 1=Nelemans and Tout (angular momentum model). See also alpha_ce, comenv_ms_accretion_mass, comenv_ms_accretion_fraction, comenv_ns_accretion_fraction, comenv_ns_accretion_mass, nelemans_gamma, nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs, lambda_ce, lambda_ionisation. : (null)\n",
+      "comenv_ejection_spin_method : When a common envelope is ejected, we need to decide how fast the stars are left spinning. COMENV_EJECTION_SPIN_METHOD_DO_NOTHING (0) is the default, this just leaves the stars/stellar cores spinning with the same spin rate (omega = angular velocity) with which they entered the common envelope phase. COMENV_EJECTION_SPIN_METHOD_SYCHRONIZE instead tidally synchronizes the stars with their new orbital angular velocity. : (null)\n",
+      "comenv_merger_spin_method : When a common envelope binary merges, we need to decide how fast the resulting single star is left spinning. COMENV_MERGER_SPIN_METHOD_SPECIFIC (0) is the default, this preserves angular momentum but limits the specific angular momentum of the merged star to the specific angular momentum of the system at the onset of common envelope evolution. COMENV_MERGER_SPIN_METHOD_CONSERVE_ANGMOM (1) sets the merger's angular momentum to be that of the system at the onset of common envelope evolution (which means the star may be rotating supercritically). COMENV_MERGER_SPIN_METHOD_CONSERVE_OMEGA (2) sets the spin rate (angular frequency = omega) of the merged star to be that of the orbit just at the onset of common envelope evolution. : (null)\n",
+      "comenv_ms_accretion_mass : Experimental. During common envelope evolution, a main sequence star may accrete some of the envelope's mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_fraction. : (null)\n",
+      "comenv_ms_accretion_fraction : Experimental. During common envelope evolution, a main sequence may accrete a fraction of the envelope's mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_mass. : (null)\n",
+      "comenv_ns_accretion_mass : Experimental. During common envelope evolution, a neutron star may accrete some of the envelope's mass. Requires COMENV_NS_ACCRETION. See also comenv_ns_accretion_fraction. : (null)\n",
+      "comenv_ns_accretion_fraction : Experimental. During common envelope evolution, a neutron star may accrete a fraction of the envelope's mass. Requires COMENV_NS_ACCRETION. See also comenv_ns_accretion_mass. : (null)\n",
+      "alpha_ce : Common envelope energy formalism parameter. A fraction alpha of the orbital energy is used to eject the envelope. See Hurley et al 2002 for details. : (null)\n",
+      "alpha_ce%d : Common envelope energy formalism parameter. A fraction alpha of the orbital energy is used to eject the envelope. See Hurley et al 2002 for details. : (null)\n",
+      "lambda_ce : Common envelope parameter. The binding energy of the common envelope is G*M*Menv/(lambda*R). Typically this is taken to be 0.5, but if set to -1 binary_c uses the Dewi and Tauris fits instead, -2 uses the formalism of Wang, Jia and Li (2016) and if -3 then a polytropic formalism is used (see also comenv_splitmass). : (null)\n",
+      "lambda_ce%d : Common envelope parameter. The binding energy of the common envelope is G*M*Menv/(lambda*R). Typically this is taken to be 0.5, but if set to -1 binary_c uses the Dewi and Tauris fits instead, -2 uses the formalism of Wang, Jia and Li (2016) and if -3 then a polytropic formalism is used (see also comenv_splitmass). : (null)\n",
+      "comenv_splitmass : When lambda_ce=-2, the envelope binding energy, lambda, is calculated using a polytropic formalism. The comenv_splitmass defines the point, in the units of the core mass, above which material is ejected. : (null)\n",
+      "nelemans_recalc_eccentricity : If True, recalculate the eccentricity after angular momentum is removed.  : (null)\n",
+      "comenv_post_eccentricity : Eccentricity remaining after common envelope ejection. : (null)\n",
+      "nelemans_gamma : Set the fraction of the orbital specific angular momentum that is used to eject the common envelope according to the Nelemans and Tout prescription. See also nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs. : (null)\n",
+      "nelemans_minq : Only activate the Nelemans and Tout common envelope prescription for q>nelemans_minq. See also nelemans_gamma, nelemans_max_frac_j_change, nelemans_n_comenvs. : (null)\n",
+      "nelemans_max_frac_j_change : Maximum fractional angular momentum change in the Nelemans and Tout common envelope prescription. See also nelemans_gamma, nelemans_minq, nelemans_n_comenvs. : (null)\n",
+      "nelemans_n_comenvs : Set the maximum number of common envelope ejections allowed to follow the Nelemans and Tout prescription, after which the standard alpha prescription is used. : (null)\n",
+      "lambda_ionisation : A fraction lambda_ionisation of the recombination energy in the common envelope goes into ejecting the envelope. This is usually 0.0, but a positive value can make a big difference to the outcome of common envelope evolution. : (null)\n",
+      "lambda_ionisation%d : A fraction lambda_ionisation of the recombination energy in the common envelope goes into ejecting the envelope. This is usually 0.0, but a positive value can make a big difference to the outcome of common envelope evolution. : (null)\n",
+      "lambda_enthalpy : A fraction of the enthalpy to be included in the common envelope evolution binding energy. Only used for the Wang 2016 prescription (so far). : (null)\n",
+      "lambda_enthalpy%d : A fraction of the enthalpy to be included in the common envelope evolution binding energy. Only used for the Wang 2016 prescription (so far). : (null)\n",
+      "cbdisc_albedo : Circumbinary-disc albedo. Requires DISCS. : (null)\n",
+      "cbdisc_gamma : Circumbinary disc gamma (equation of state) parameter. Requires DISCS. : (null)\n",
+      "cbdisc_alpha : Circumbinary disc alpha (viscosity) parameter. Requires DISCS. : (null)\n",
+      "cbdisc_kappa : Circumbinary disc kappa (opacity) parameter. Requires DISCS. : (null)\n",
+      "cbdisc_minimum_evaporation_timescale : Circumbinary disc minimum evaporation timescale (years). If (slow, not edge stripped) mass loss would evaporate the disc on a timescale less than this, simply evaporate the disc immediated. Usually set to 1y, ignore if zero. Requires DISCS. : (null)\n",
+      "cbdisc_torquef : Circumbinary disc binary torque multiplier. Requires DISCS. : (null)\n",
+      "cbdisc_max_lifetime : Circumbinary disc maximum lifetime (years, ignored if 0). Requires DISCS. : (null)\n",
+      "cbdisc_init_dM : On cbdisc start, reduce mass by a fraction dM if it won't converge. Requires DISCS. : (null)\n",
+      "cbdisc_init_dJdM : On cbdisc start, reduce angular momentum by a fraction dJ/dM*dM if it won't converge. Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_constant_rate : Circumbinary disc constant mass loss rate (Msun/year). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_FUV_multiplier : Circumbinary disc FUV mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_Xray_multiplier : Circumbinary disc X-ray mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_ISM_ram_pressure_multiplier : Circumbinary disc interstellar medium ram pressure stripping mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_ISM_pressure : Circumbinary disc interstellar medium ram pressure in units of Boltzmann constant per Kelvin (I think...). Requires DISCS. Typically 3000.0. See e.g. http://www.astronomy.ohio-state.edu/~pogge/Ast871/Notes/Intro.pdf page 15 or https://arxiv.org/pdf/0902.0820.pdf Fig. 1 (left panel). : (null)\n",
+      "cbdisc_mass_loss_inner_viscous_multiplier : Circumbinary disc inner edge viscous mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_inner_viscous_angular_momentum_multiplier : Circumbinary disc inner edge viscous angular momentum multiplier (no units). The inner edge angular momentum Requires DISCS. : (null)\n",
+      "cbdisc_resonance_multiplier : Circumbinary disc resonant interaction multiplier, affects eccentricity pumping and angular momentum rates. Requires DISCS. : (null)\n",
+      "cbdisc_resonance_damping : Circumbinary disc resonant interaction damping: should be on (True) to damp the l=1, m=2 resonance when the disc inner edge lies outside the resonance location. Requires DISCS. : (null)\n",
+      "cbdisc_fail_ring_inside_separation : If True, while converging on a structure, circumbinary discs with Rring < the binary separation are immediately failed. : (null)\n",
+      "cbdisc_mass_loss_inner_L2_cross_multiplier : Circumbinary disc inner edge L2-crossing mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_minimum_luminosity : Circumbinary disc minimum luminosity. If the disc becomes dimmer than this, the disc is evaporated instantly. Requires DISCS. : (null)\n",
+      "cbdisc_minimum_mass : Circumbinary disc minimum mass. If the disc becomes less massive than this, the disc is evaporated instantly. Requires DISCS. : (null)\n",
+      "cbdisc_minimum_fRing : Circumbinary disc minimum fRing. If the disc becomes a ring, and fRing = |Rout/Rin-1| < this value (and this value is non-zero), the disc is evaporated instantly. Requires DISCS. : (null)\n",
+      "comenv_disc_angmom_fraction : If >0 Fraction of the common envelope's angular momentum that goes into the circumbinary disc. If -1 then uses the moments of inertia to calculate (deprecated), if -2 use the common envelope's specific angular momentum, if -3 uses the L2 point at the end of the common envelope to set the angular momentum. Requires DISCS and DISCS_CIRCUMBINARY_FROM_COMENV. : (null)\n",
+      "comenv_disc_mass_fraction : Fraction of the common envelope's mass that goes into the circumbinary disc. Requires DISCS and DISCS_CIRCUMBINARY_FROM_COMENV. : (null)\n",
+      "wind_disc_angmom_fraction : If >0 Fraction of the wind envelope's angular momentum that goes into the circumbinary disc. If -1 then uses the L2 point's specific angular momentum. Requires DISCS and DISCS_CIRCUMBINARY_FROM_WIND. : (null)\n",
+      "wind_disc_mass_fraction : Fraction of the stellar wind's mass that goes into the circumbinary disc. Requires DISCS and DISCS_CIRCUMBINARY_FROM_WIND. : (null)\n",
+      "WRLOF_method : Choose whether and how to apply wind-Roche-lobe-overflow. 0=none, 1=q-dependent, 2=quadratic See Abate et al 2013/14 for details. Requires WRLOF_MASS_TRANSFER. : (null)\n",
+      "minimum_timestep : The minimum timestep (Myr). : (null)\n",
+      "timestep_solver_factor : Factor applied in timestep_limits, e.g. to prevent X changing too fast by comparing to X/dX/dt, which is usually 1 but can be higher to lengthen timesteps when using an alternative solver. : (null)\n",
+      "RLOF_mdot_factor : Multiplier applied to the mass transfer rate during Roche-lobe overflow. Requires RLOF_MDOT_MODULATION. : (null)\n",
+      "RLOF_f : Factor to enlarge a Roche lobe, nominally because of radiation pressure (see Dermine et al paper). Requires RLOF_RADIATION_CORRECTION. : (null)\n",
+      "minimum_separation_for_instant_RLOF : If True, instead of evolving the system just report the minimum separation (on the zero-age main sequence) that would lead to instant RLOF. Used by binary_grid. See also minimum_orbital_period_for_instant_RLOF and maximum_mass_ratio_for_instant_RLOF. : (null)\n",
+      "minimum_orbital_period_for_instant_RLOF : If True, instead of evolving the system just report the minimum orbital period (on the zero-age main sequence) that would lead to instant RLOF. Used by binary_grid. See also minimum_separation_for_instant_RLOF and maximum_mass_ratio_for_instant_RLOF. : (null)\n",
+      "maximum_mass_ratio_for_instant_RLOF : If True, instead of evolving the system just report the maximum mass ratio (on the zero-age main sequence) that would lead to instant RLOF, given M1 and orbital period. Used by binary_grid. See also minimum_separation_for_instant_RLOF and minimum_orbital_period_for_instant_RLOF. : (null)\n",
+      "RLOF_method : Use RLOF_method to choose the algorithm you use for Roche-lobe overflow mass loss rate calculations. 0=Hurley et al 2002, 1=Adaptive (for radiative stars) R=RL method, 2=Ritter (probably broken), 3=Claeys etal 2014 variant on Hurley et al 2002. : (null)\n",
+      "RLOF_interpolation_method : When a star overflows its Roche lobe, it always has R>RL because of the limited time resolution of the simulation. Binary_c then uses an algorithm to get back to when R~RL (within a desired tolerance, set in RLOF_ENTRY_THRESHOLD which is usually 1.02, i.e. overflow of 2%). You can choose algorithm 0, the Hurley et al 2002 method which reverses time (i.e. uses a Newton-like scheme), or 1 to use the binary_c method which rejects a timestep (and hence does no logging on that timestep) and repeats with half the timestep until R~RL. The latter is now the default, because this means there are no negative timesteps which break various other algorithms (e.g. nucleosynthesis). : (null)\n",
+      "nova_retention_fraction : The mass accreted during a nova as fraction of mass transferred : (null)\n",
+      "beta_reverse_nova : The fraction of mass ejected in a nova explosion which is accreted back onto the companion star. Set to -1 to automatically calculate based on a geometric argument, or 0 or positive to set the value. : (null)\n",
+      "WD_accretion_rate_novae_upper_limit_hydrogen_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is hydrogen rich : above this rate the mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_novae_upper_limit_helium_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is helium rich : above this rate the mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_novae_upper_limit_other_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is neither hydrogen nor helium rich : above this rate the mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_new_giant_envelope_lower_limit_hydrogen_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope with a hydrogen-rich donor. Below this mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_new_giant_envelope_lower_limit_helium_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope with a helium-rich donor. Below this mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_new_giant_envelope_lower_limit_other_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope when the donor is neither hydrogen nor helium rich. Below this mass transfer leads to stable burning. : (null)\n",
+      "CRAP_parameter : Tidally enhanced mass loss parameter. See Tout and Eggleton's paper on the subject. (Was the parameter bb). : (null)\n",
+      "individual_novae : If individual_novae is True, novae are resolved such that each explosion is performed separtaely. : (null)\n",
+      "nova_timestep_accelerator_num : The nova timestep is accelerated if the nova number exceeds nova_timestep_accelerator_num. If zero or negative, acceleration is off. See also nova_timestep_accelerator_index and nova_timestep_accelerator_max. Only used if individual_novae is on.\n",
+      " : (null)\n",
+      "nova_timestep_accelerator_index : The index at which the nova timestep is accelerated. A larger value gives longer timesteps. See also nova_timestep_accelerator_num and nova_timestep_accelerator_max. Only used if individual_novae is on.\n",
+      " : (null)\n",
+      "nova_timestep_accelerator_max : The nova timestep is accelerated by a factor that is capped at nova_timestep_accelerator_max. This parameter is ignored if it is zero or negative. See also nova_timestep_accelerator_num and nova_timestep_accelerator_index. Only used if individual_novae is on.\n",
+      " : (null)\n",
+      "nonconservative_angmom_gamma : Mass lost from the system (but NOT from a stellar wind) takes a fraction gamma of the orbital angular momentum with it. Set to -1 to take the specific angular momentum of the donor star. Set to -2 to take super-Eddington, nova and disk-wind angular momenta as if a wind from the accretor. : (null)\n",
+      "max_stellar_angmom_change : Maxmimum fractional change in stellar angular momentum allowed before a timestep is rejected (0.05). : (null)\n",
+      "comenv_ms_accretion_mass : Experimental. During common envelope evolution, a main sequence star may accrete some of the envelope's mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_fraction. : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Nucsyn\n",
+      "############################################################\n",
+      "third_dup : If True, enables third dredge up. Requires NUCSYN and NUCSYN_THIRD_DREDGE_UP. : (null)\n",
+      "third_dup_multiplier : Usage: --third_dup_multiplier <i> <f>. Multiplies the abundance of element <i> by <f> during third dredge up. : 1.0\n",
+      "NeNaMgAl : Enables NeNaMgAl reaction network. Requires NUCSYN and NUCSYN_HBB. : Ignore\n",
+      "nucsyn_network%d : Usage: --nucsyn_network%d <boolean>. Turn a nuclear network on or off. : (null)\n",
+      "nucsyn_network_error%d : Usage: --nucsyn_network_error%d <f>. Threshold error in nuclear network solver for network %d. : (null)\n",
+      "nucreacmult%d : Usage: --nucreacmult%d <f>. Multiply nuclear reaction given by the integer %d (integer) by f (float).  : (null)\n",
+      "nucsyn_metallicity : This sets the metallicity of the nucleosynthesis algorithms, i.e. the amount (by mass) of matter which is not hydrogen or helium. Usually you'd just set this with the metallicity parameter, but if you want the nucleosynthesis to be outside the range of the stellar evolution algorithm (e.g. Z=0 or Z=0.04) then you need to use nucsyn_metallicity. That said, it's also outside the range of some of the nucleosynthesis algorithms as well, so you have been warned! : (null)\n",
+      "nucsyn_solver : Choose the solver used in nuclear burning. 0 = KAPS_RENTROP is a Kaps-Rentrop scheme (fast, not great for stiff problems), 1 = LSODA (Adams/BSF switcher), 2 = CVODE library (https://computing.llnl.gov/projects/sundials. Default 0.  : 0\n",
+      "initial_abundance_mix : initial abundance mixture: 0=AG89, 1=Karakas 2002, 2=Lodders 2003, 3=Asplund 2005 (not available?), 4=Garcia Berro, 5=Grevesse Noels 1993 : 0\n",
+      "init_abund : Usage: --init_abund <i> <X>. Sets the initial abundance of isotope number <i> to mass fraction <X>. : 0.02\n",
+      "init_abund_mult : Usage: --init_abund_mult <i> <f>. Multiplies the initial abundance of isotope number <i> by <f>. : 1.0\n",
+      "init_abund_dex : Usage: --init_abund_dex <i> <f>. Changes the initial abundance of isotope number <i> by <f> dex. : 0.0\n",
+      "init_abunds_only : If True, outputs only the initial abundances, then exits. : (null)\n",
+      "initial_abunds_only : If True, outputs only the initial abundances, then exits. : (null)\n",
+      "no_thermohaline_mixing : If True, disables thermohaline mixing. : (null)\n",
+      "lithium_GB_post_Heflash : Sets the lithium abundances after the helium flash. Requires NUCSYN and LITHIUM_TABLES. : (null)\n",
+      "lithium_GB_post_1DUP : Sets the lithium abundance after first dredge up. Requires NUCSYN and LITHIUM_TABLES. : (null)\n",
+      "lithium_hbb_multiplier : Multiplies the lithium abundances on the AGB during HBB (based on Karakas/Fishlock et al models).Requires NUCSYN and LITHIUM_TABLES. : (null)\n",
+      "angelou_lithium_decay_function : Functional form which describes Li7 decay. Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Choices are : 0 expoential (see angelou_lithium_decay_time). : (null)\n",
+      "angelou_lithium_LMMS_time : Time at which lithium manufacture is triggered in a low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_MS_time : Time at which lithium manufacture is triggered on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_HG_time : Time at which lithium manufacture is triggered on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_GB_time : Time at which lithium manufacture is triggered on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_CHeB_time : Time at which lithium manufacture is triggered during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_EAGB_time : Time at which lithium manufacture is triggered on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_TPAGB_time : Time at which lithium manufacture is triggered on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_LMMS_decay_time : Decay time for surface lithium abundance during the low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_MS_decay_time : Decay time for surface lithium abundance on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_HG_decay_time : Decay time for surface lithium abundance on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_GB_decay_time : Decay time for surface lithium abundance on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_CHeB_decay_time : Decay time for surface lithium abundance during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_EAGB_decay_time : Decay time for surface lithium abundance on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_TPAGB_decay_time : Decay time for surface lithium abundance on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_LMMS_massfrac : Lithium mass fraction when its manufacture is triggered during the low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_MS_massfrac : Lithium mass fraction when its manufacture is triggered on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_HG_massfrac : Lithium mass fraction when its manufacture is triggered on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_GB_massfrac : Lithium mass fraction when its manufacture is triggered on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_CHeB_massfrac : Lithium mass fraction when its manufacture is triggered during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_EAGB_massfrac : Lithium mass fraction when its manufacture is triggered on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_TPAGB_massfrac : Lithium mass fraction when its manufacture is triggered on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_vrot_trigger : Equatorial rotational velocity at which lithium manufacture is triggered (km/s). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0.\n",
+      " : (null)\n",
+      "angelou_lithium_vrotfrac_trigger : Fraction of Keplerian (breakup) equatorial rotational velocity at which lithium manufacture is triggered (must be <1, ignored if 0). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0.\n",
+      " : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Output\n",
+      "############################################################\n",
+      "david_logging_function : Function to choose which kind of information gets logged Requires DAVID. Choices are: 0= None, >0 for custom logging functions : Ignore\n",
+      "cf_amanda_log : Enable logging to compare to Amanda's models. : (null)\n",
+      "float_overflow_checks : Turn on to enable floating-point overflow checks at the end of each timestep, if they are available. 0=off, 1=warn (stderr) on failure, 2=exit on failure (0) : (null)\n",
+      "save_pre_events_stardata : Enable this to save a copy of stardata to stardata->pre_events_stardata just before an event. : (null)\n",
+      "disable_end_logging : Disable the logging that happens at the end of the evolution. : (null)\n",
+      "ensemble : Turn on ensemble calculations and output. : (null)\n",
+      "ensemble_filters_off : Sets all ensemble filters to be off (FALSE) - these can then be enabled one-by-one with --ensemble_filter_[...] TRUE. : (null)\n",
+      "ensemble_filter_%d : Turn on or off ensemble filter <n>. For a list of filters, see ensemble_macros.h. : (null)\n",
+      "ensemble_legacy_ensemble : Turn on ensemble legacy population output. : (null)\n",
+      "legacy_yields : Turn on ensemble legacy yield output. : (null)\n",
+      "ensemble_defer : Defer ensemble output. : (null)\n",
+      "ensemble_dt : When doing ensemble calculations, data are stored and/or output every ensemble_dt Myr. See also ensemble, ensemble_logdt, ensemble_startlogtime. : (null)\n",
+      "ensemble_logdt : When doing ensemble calculations, and when logensembletimes is set, the ensemble is stored/output every ensemble_logdt Myr. See also ensemble, ensemble_dt, ensemble_startlogtime. : (null)\n",
+      "ensemble_startlogtime : Start log ensemble data storage/calculations/output at ensemble_startlogtime. See also ensemble, ensemble_dt, ensemble_startlogtime. : (null)\n",
+      "ensemble_logtimes : When doing ensemble calculations/output, set this to act at log times rather than linear times. : (null)\n",
+      "postagb_legacy_logging : Turn on post-AGB legacy logging. : (null)\n",
+      "disc_legacy_logging : Turn on disc legacy logging. : (null)\n",
+      "EMP_logg_maximum : Maximum logg that EMP stars are allowed to have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_minimum_age. : (null)\n",
+      "EMP_minimum_age : Minimum age that EMP stars are required to have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_logg_maximum. : (null)\n",
+      "EMP_feh_maximum : Maximum [Fe/H] that an EMP stars may have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default -2.0. : (null)\n",
+      "CEMP_cfe_minimum : Minimum [C/Fe] that CEMP stars are required to have. See Izzard et al 2009. See also NEMP_cfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default 0.7. : (null)\n",
+      "NEMP_cfe_minimum : Minimum [N/Fe] that NEMP stars are required to have. See Izzard et al 2009, Pols et al. 2012. See also CEMP_cfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default 1.0. : (null)\n",
+      "thick_disc_start_age : Lookback time for the start of the thick disc star formation, e.g. 13e3 Myr. Units = Myr. : (null)\n",
+      "thick_disc_end_age : Lookback time for the end of the thick disc star formation, e.g. 4e3 Myr. Units = Myr. : (null)\n",
+      "thick_disc_logg_min : Minimum logg for thick disc giants to be logged. : (null)\n",
+      "thick_disc_logg_max : Maximum logg for thick disc giants to be logged. : (null)\n",
+      "escape_velocity : A parameter used in constructing galactic chemical evolution (GCE) models. If the stellar wind velocity exceeds this value, any chemical yield from the wind is ignored, i.e. assumed lost. (km/s) Requires NUCSYN_GCE_OUTFLOW_CHECKS. Default 1e9 km/s. See also escape_fraction. : (null)\n",
+      "escape_fraction : A parameter used in constructing galactic chemical evolution (GCE) models. If the stellar wind velocity exceeds this value, any chemical yield from the wind is ignored, i.e. assumed lost. (km/s) Requires NUCSYN_GCE_OUTFLOW_CHECKS. Default 0.0. See also escape_velocity. : (null)\n",
+      "colour_log : If set to True, thelog is coloured with ANSI colour formatting. Requires FILE_LOG to be defined. : \n",
+      "log_filename : Location of the output logging filename. If set to \"/dev/null\" then there is no logging. : \n",
+      "stopfile : File which, when it exists, will stop the current binary_c repeat run. : \n",
+      "stardata_dump_filename : Location of the stardata dump file. : \n",
+      "stardata_load_filename : Location of the stardata file to load. : \n",
+      "api_log_filename_prefix : Location of the output logging filename prefix for the API. If set to \"/dev/null\" then there is no logging. : 0\n",
+      "hrdiag_output : Set to True to output high time-resolution Hertzstrpung-Russell diagram information. Requires HRDIAG. : (null)\n",
+      "internal_buffering : Experimental. Set to non-zero values to implement internal buffering prior to output. For use with binary_grid, you shouldn't really be playing with this. : (null)\n",
+      "eccentric_RLOF_model : Chooses which model is used to handle eccentric RLOF. Default is RLOF_ECCENTRIC_AS_CIRCULAR, i.e. ignore the eccentricity. Note: requires force_corotation_of_primary_and_orbit to be FALSE.\n",
+      " : (null)\n",
+      "force_circularization_on_RLOF : If True forces circularization of stars and orbit when RLOF starts, this is as in the BSE algorithm. (True) : (null)\n",
+      "wtts_log : If True, enables log file output for WTTS2. : (null)\n",
+      "fabian_imf_log_time : Time at which to output for Fabian Schneider's IMF project. Requires FABIAN_IMF_LOG : Ignore\n",
+      "fabian_imf_log_timestep : Timestep for Fabian Schneider's IMF project logging. Requires FABIAN_IMF_LOG : Ignore\n",
+      "version : Display binary_c version and build information. Also performs timing tests. : Ignore\n",
+      "dumpversion : Display binary_c version number (short format). : Ignore\n",
+      "version_only : Display binary_c version number and build information, but do not perform timing tests or anything that requires stardata to be non-NULL. : Ignore\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Input\n",
+      "############################################################\n",
+      "MINT_dir : Location of MINT algorithm data. : \n",
+      "MINT_data_cleanup : Activate checks on incoming data to try to account for problems. Will make data-loading slower, but may fix a few things. : \n",
+      "MINT_MS_rejuvenation : Turn on or off (hydrogen) main-sequence rejuvenation. : \n",
+      "MINT_remesh : Turn on or off MINT's remeshing. : \n",
+      "MINT_use_ZAMS_profiles : Use chemical profiles at the ZAMS if MINT_use_ZAMS_profiles is TRUE, otherwise set homogeneous abundances. (Default is TRUE, so we use the profiles if they are available.) : \n",
+      "MINT_disable_grid_load_warnings : Use this to explicitly disable MINT's warnings when loading a grid with, e.g., missing or too much data. : \n",
+      "MINT_Kippenhahn : Turn on or off MINT's Kippenhahn diagrams. If 0, off, if 1, output star 1 (index 0), if 2 output star 2 (index 1). Default 0. : \n",
+      "MINT_Kippenhahn_stellar_type : Stellar type selector for Kippenhahn plots. Set to -1 to ignore, otherwise the stellar type number for which Kippenhahn plot data should be output. : \n",
+      "MINT_Kippenhahn_companion_stellar_type : Companion stellar type selector for Kippenhahn plots. Set to -1 to ignore, otherwise the stellar type number for the companion for which Kippenhahn plot data should be output. : \n",
+      "MINT_nuclear_burning : Turn on or off MINT's nuclear burning algorithm. : \n",
+      "MINT_minimum_shell_mass : Minimum shell mass in MINT's nuclear burning routines. : \n",
+      "MINT_maximum_shell_mass : Maximum shell mass in MINT's nuclear burning routines. : \n",
+      "\n",
+      "############################################################\n",
+      "##### Section I/O\n",
+      "############################################################\n",
+      "go : batchmode control command : Ignore\n",
+      "gogo : batchmode control command : Ignore\n",
+      "reset_stars : Reset the star structures. Used in batchmode : Ignore\n",
+      "reset_stars_defaults : Reset the star structures and set defaults. Used in batchmode : Ignore\n",
+      "defaults : Reset all defaults. Used in batchmode : Ignore\n",
+      "echo : Activate batchmode command echoing, i.e. when you enter a command, binary_c repeats the command then executes it. : Ignore\n",
+      "noecho : Deactivate batchmode command echoing. See 'echo'. : Ignore\n",
+      "noechonow : Deactivate batchmode command echoing. See 'echo'. : Ignore\n",
+      "bye : Quit binary_c. Used in batchmode. : Ignore\n",
+      "fin : batchmode control command : Ignore\n",
+      "reset_prefs : Reset preferences struct. Used in batchmode : Ignore\n",
+      "status : Output batchmode status information. : Ignore\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Algorithms\n",
+      "############################################################\n",
+      "repeat : If > 1, repeats the system as many times as required. Handy if you're using Monte-Carlo kicks and want to sample the parameter space well. Also, if you are running speed tests this is good to give a statistically more reasonable result. (See e.g. 'tbse pgo'). : (null)\n",
+      "random_systems : Experimental. Use this to apply random initial system parameters (masses, separations, etc.). Useful for testing only. : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Misc\n",
+      "############################################################\n",
+      "random_seed : Random number seed, usually a (possibly negative) integer. Useful for exactly reproducing the evolution of a system which involves a kick (which is a Monte-Carlo, i.e. pseudorandom, process). : (null)\n",
+      "random_systems_seed : Random number seed for the generation of random systems. See random_systems and random_seed. : (null)\n",
+      "random_skip : Skip the first <random_seed> random numbers that are generated. Usually this is 0 so they are all used. : (null)\n",
+      "idum : [NB: deprecated, please use 'random_seed' instead.] Random number seed, usually a (possibly negative) integer. Useful for exactly reproducing the evolution of a system which involves a kick (which is a Monte-Carlo, i.e. pseudorandom, process). : (null)\n",
+      "reverse_time : Make time go backwards. To be considered very experimental! : (null)\n",
+      "start_time : Start time for the simulation. : (null)\n",
+      "warmup_cpu : Uses the CPU at maximum power the given number of seconds, prior to running normal stellar evolution. : Ignore\n",
+      "help : Display help pages. Usage: --help <help topic>. : Ignore\n",
+      "argopts : Display argument options. Usage: --argopts <argument>. : Ignore\n",
+      "help_all : Display all help pages. : Ignore\n",
+      "list_args : Display list of arguments with their default values. Useful for batchmode. : Ignore\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(_binary_c_bindings.return_help_all())"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "bfec32cf-7240-4a82-ac30-b3d99a018a28",
+   "metadata": {},
+   "source": [
+    "We can get all the parameter names and their default values with return_arglines(): (abridged output)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 20,
+   "id": "3d29ca9d-ac66-4f9e-81cf-2edd14a98b79",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "__ARG_BEGIN\n",
+      "metallicity = 0.02\n",
+      "effective_metallicity = -1\n",
+      "M_1 = 0\n"
+     ]
+    }
+   ],
+   "source": [
+    "print('\\n'.join(_binary_c_bindings.return_arglines().splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "e8b1c8b6-a878-43f4-bc36-1b20b3e66c6f",
+   "metadata": {},
+   "source": [
+    "Lastly, we can ask binary_c to determine the minimum period or maximum mass for RLOF at the ZAMS: Both of them need an argstring as input"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "e517f561-09c6-419d-ba89-d9cb61e6ebab",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MINIMUM SEPARATION 0.31\n",
+      "MINIMUM PERIOD 0.00632092\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=10,\n",
+    "    orbital_period=4500,\n",
+    "    eccentricity=0.0,\n",
+    "    metallicity=0.02,\n",
+    "    max_evolution_time=15000,\n",
+    ").strip()\n",
+    "\n",
+    "#\n",
+    "output = _binary_c_bindings.return_minimum_orbit_for_RLOF(argstring, store_capsule=store_memaddr)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 46,
+   "id": "7da75a95-8831-4346-a584-e042ced75249",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MAXIMUM MASS RATIO 0.0141\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=5,\n",
+    "    M_2=1,\n",
+    "    orbital_period=0.0001,\n",
+    "    eccentricity=0.0,\n",
+    "    metallicity=0.02,\n",
+    "    max_evolution_time=15000,\n",
+    ").strip()\n",
+    "\n",
+    "#\n",
+    "output = _binary_c_bindings.return_maximum_mass_ratio_for_RLOF(argstring)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "id": "5fe52d8e-1721-4796-a856-002cf4525d96",
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/build/doctrees/nbsphinx/notebook_custom_logging.ipynb b/docs/build/doctrees/nbsphinx/notebook_custom_logging.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..e84895375014ce29b29a572a9a264d1505eb1db9
--- /dev/null
+++ b/docs/build/doctrees/nbsphinx/notebook_custom_logging.ipynb
@@ -0,0 +1,517 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "879b596b-d70c-4f90-b668-563b4ad93ffc",
+   "metadata": {},
+   "source": [
+    "# Notebook custom logging\n",
+    "In this notebook you'll learn how to use the custom logging functionality"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 37,
+   "id": "696ecbb9-1efd-48f4-a57e-2cf6dfe416f1",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from binarycpython import _binary_c_bindings\n",
+    "from binarycpython.utils.custom_logging_functions import (\n",
+    "    autogen_C_logging_code,\n",
+    "    binary_c_log_code,\n",
+    "    create_and_load_logging_function,\n",
+    ")\n",
+    "from binarycpython.utils.run_system_wrapper import run_system\n",
+    "from binarycpython.utils.grid import Population"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "d4d721cc-df4f-4ac2-b6f9-62e85ca0c1e5",
+   "metadata": {},
+   "source": [
+    "The custom logging functionality allows us to decide the output of binary_c _without_ modifying the actual sourcecode of binary_c (i.e. editing `src/logging/log_every_timestep` in binary_c). Rather, we can create a logging routine from within python.\n",
+    "\n",
+    "Technically, the following steps are taken:\n",
+    "- User creates a logging print statement from within python\n",
+    "- The logging print statement string gets wrapped into a proper c-function by `binary_c_log_code`\n",
+    "- The c-function string gets compiled and loaded into memory by `create_and_load_logging_function`\n",
+    "- The memory adress of the compiled and loaded print function can now be passed to C\n",
+    "- binary_c uses the custom print function \n",
+    "\n",
+    "The custom logging functionality can be used when running systems via `run_system()`, via `Population.evolve()` and `Population.evolve_single()`, and directly via the API\n",
+    "\n",
+    "Within the logging statement we can access information from the stardata object, as well as use logical statements to determine when to log information. What we cannot do, however, is access functions that are not _publicly available_. For very elaborate printing routines it is still advised to actually hardcode the print statement into binary_c itself."
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "be137151-bb57-43d7-bab1-0167512ac727",
+   "metadata": {},
+   "source": [
+    "## Usage"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ac4e5f4c-81e6-4980-b852-aca84ca74f4c",
+   "metadata": {},
+   "source": [
+    "There are two methods to create the C-code that will be compiled:\n",
+    "- Automatically generate the print statement and use the wrapper to generate the full function string, by using `autogen_C_logging_code`\n",
+    "- Create your custom print statement and use the wrapper to generate the full function string, by writing out the print statement. Here the logging statement obviously has to be valid C code"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "236cf821-09ac-4237-9b8f-6e36d2edf446",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Printf(\"MY_STELLAR_DATA %g %g\\n\",((double)stardata->model.time),((double)stardata->star[0].mass));\n"
+     ]
+    }
+   ],
+   "source": [
+    "# generate logging lines. Here you can choose whatever you want to have logged, and with what header\n",
+    "# this generates working print statements\n",
+    "logging_line = autogen_C_logging_code(\n",
+    "    {\n",
+    "        \"MY_STELLAR_DATA\": [\"model.time\", \"star[0].mass\"],\n",
+    "    }\n",
+    ")\n",
+    "print(logging_line)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 30,
+   "id": "feb423d5-5cc3-433c-9801-f8017abbc03a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Printf(\"MY_STELLAR_DATA time=%g mass=%g\\n\", stardata->model.time, stardata->star[0].mass)\n"
+     ]
+    }
+   ],
+   "source": [
+    "# You can also decide to `write` your own logging_line, which allows you to write a more complex logging statement with conditionals.\n",
+    "logging_line = 'Printf(\"MY_STELLAR_DATA time=%g mass=%g\\\\n\", stardata->model.time, stardata->star[0].mass)'\n",
+    "print(logging_line)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 31,
+   "id": "2f5defbf-c623-49ed-a238-fba52a563a58",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "#pragma push_macro(\"Max\")\n",
+      "#pragma push_macro(\"Min\")\n",
+      "#undef Max\n",
+      "#undef Min\n",
+      "#include \"binary_c.h\"\n",
+      "\n",
+      "// add visibility __attribute__ ((visibility (\"default\"))) to it \n",
+      "void binary_c_API_function custom_output_function(struct stardata_t * stardata);\n",
+      "void binary_c_API_function custom_output_function(struct stardata_t * stardata)\n",
+      "{\n",
+      "    // struct stardata_t * stardata = (struct stardata_t *)x;\n",
+      "    Printf(\"MY_STELLAR_DATA time=%g mass=%g\\n\", stardata->model.time, stardata->star[0].mass);\n",
+      "}\n",
+      "\n",
+      "#undef Max \n",
+      "#undef Min\n",
+      "#pragma pop_macro(\"Min\")\n",
+      "#pragma pop_macro(\"Max\")    \n"
+     ]
+    }
+   ],
+   "source": [
+    "# Generate the entire 'script' by wrapping the logging line\n",
+    "custom_logging_code = binary_c_log_code(logging_line)\n",
+    "print(custom_logging_code)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "efa7f1e9-247e-4196-a883-bcff05265d02",
+   "metadata": {},
+   "source": [
+    "Combining the above with e.g. run_system() (see notebook_individual_systems for more examples):"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 32,
+   "id": "dcd74bbc-478b-43e4-b495-8c456e8d1d88",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MY_STELLAR_DATA time=0 mass=2\n",
+      "MY_STELLAR_DATA time=0 mass=2\n",
+      "MY_STELLAR_DATA time=1e-06 mass=2\n",
+      "MY_STELLAR_DATA time=2e-06 mass=2\n"
+     ]
+    }
+   ],
+   "source": [
+    "# logging statement\n",
+    "logging_line = 'Printf(\"MY_STELLAR_DATA time=%g mass=%g\\\\n\", stardata->model.time, stardata->star[0].mass)'\n",
+    "\n",
+    "# Entire script\n",
+    "custom_logging_code = binary_c_log_code(logging_line)\n",
+    "\n",
+    "# Run system\n",
+    "output = run_system(M_1=2, custom_logging_code=custom_logging_code)\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print(\"\\n\".join(output.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "1998ee8f-8c0a-462b-b1e0-54f5963902cc",
+   "metadata": {},
+   "source": [
+    "### Using custom logging with the population object\n",
+    "Custom logging can be used for a whole population by setting the print statement (so not the entire logging script) in `C_logging_code`"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 33,
+   "id": "77bd09b0-1a94-499d-97db-a1f991c67c12",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "EXAMPLE_ABOVE_MS             1.041660877905e+02 4.99198 4.99198 6.1357 6.1357 2 1\n",
+      "EXAMPLE_ABOVE_MS             1.041662558619e+02 4.99198 4.99198 6.14057 6.1357 2 2\n",
+      "EXAMPLE_ABOVE_MS             1.041662560111e+02 4.99198 4.99198 6.14057 6.14057 2 2\n",
+      "EXAMPLE_ABOVE_MS             1.041662564579e+02 4.99198 4.99198 6.14059 6.14057 2 2\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Set up population\n",
+    "pop = Population()\n",
+    "\n",
+    "# Set some BSE parameters\n",
+    "pop.set(\n",
+    "    M_1=5\n",
+    ")\n",
+    "\n",
+    "# Example logging that prints only if the star is post main-sequence\n",
+    "example_logging_string_post_MS = \"\"\"\n",
+    "if(stardata->star[0].stellar_type>MS)\n",
+    "{\n",
+    "    Printf(\"EXAMPLE_ABOVE_MS %30.12e %g %g %g %g %d %d\\\\n\",\n",
+    "        // \n",
+    "        stardata->model.time, // 1\n",
+    "\n",
+    "        stardata->star[0].mass, //2\n",
+    "        stardata->previous_stardata->star[0].mass, //3\n",
+    "\n",
+    "        stardata->star[0].radius, //4\n",
+    "        stardata->previous_stardata->star[0].radius, //5\n",
+    "\n",
+    "        stardata->star[0].stellar_type, //6\n",
+    "        stardata->previous_stardata->star[0].stellar_type //7\n",
+    "  );\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "# Set the logging\n",
+    "pop.set(\n",
+    "    C_logging_code=example_logging_string_post_MS\n",
+    ")\n",
+    "out = pop.evolve_single()\n",
+    "\n",
+    "# Print (abridged) output\n",
+    "print('\\n'.join(out.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "93397ff3-9b71-470d-8bc4-08fe5b1a5dca",
+   "metadata": {},
+   "source": [
+    "### Using custom logging when running directly from the API\n",
+    "When running a system directly with the API we need to manually load the custom logging into memory (via `create_and_load_logging_function`) and pass the memory address to the binary_c binding via `_binary_c_bindings.run_system(argstring, custom_logging_func_memaddr=custom_logging_memaddr)`"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 40,
+   "id": "30142286-34ce-433e-82c8-565e2160ff5b",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MY_STELLAR_DATA 0 15\n",
+      "MY_STELLAR_DATA 0 15\n",
+      "MY_STELLAR_DATA 1e-06 15\n",
+      "MY_STELLAR_DATA 2e-06 15\n"
+     ]
+    }
+   ],
+   "source": [
+    "# generate logging lines\n",
+    "logging_line = autogen_C_logging_code(\n",
+    "    {\n",
+    "        \"MY_STELLAR_DATA\": [\"model.time\", \"star[0].mass\"],\n",
+    "    }\n",
+    ")\n",
+    "\n",
+    "# Generate code around logging lines\n",
+    "custom_logging_code = binary_c_log_code(logging_line)\n",
+    "\n",
+    "# Generate library and get memaddr\n",
+    "custom_logging_memaddr, shared_lib_filename = create_and_load_logging_function(\n",
+    "    custom_logging_code\n",
+    ")\n",
+    "\n",
+    "#\n",
+    "m1 = 15.0  # Msun\n",
+    "m2 = 14.0  # Msun\n",
+    "separation = 0  # 0 = ignored, use period\n",
+    "orbital_period = 4530.0  # days\n",
+    "eccentricity = 0.0\n",
+    "metallicity = 0.02\n",
+    "max_evolution_time = 15000\n",
+    "argstring = \"binary_c M_1 {0:g} M_2 {1:g} separation {2:g} orbital_period {3:g} eccentricity {4:g} metallicity {5:g} max_evolution_time {6:g}\".format(\n",
+    "    m1,\n",
+    "    m2,\n",
+    "    separation,\n",
+    "    orbital_period,\n",
+    "    eccentricity,\n",
+    "    metallicity,\n",
+    "    max_evolution_time,\n",
+    ")\n",
+    "output = _binary_c_bindings.run_system(\n",
+    "    argstring, custom_logging_func_memaddr=custom_logging_memaddr\n",
+    ")\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print('\\n'.join(output.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "39c76b1d-d968-4eef-b5ae-2542ed9557c3",
+   "metadata": {},
+   "source": [
+    "## Examples of logging strings\n",
+    "Below are some examples of logging strings"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "2ac4af72-6dab-4cc9-986e-5b5b1fa31b73",
+   "metadata": {},
+   "source": [
+    "### Compact object\n",
+    "This logging will print the timestep when the star becomes a compact object. After it does, we change the maximum time to be the current time, effectively terminating the evolution"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 42,
+   "id": "6f0edc65-a788-4706-a0c5-2ace030765ec",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "SINGLE_STAR_LIFETIME 10 27.7358\n",
+      "EXAMPLE_LOG_CO             2.773581245005e+01 1.33524 9.19314 1.72498e-05 730.446 13 5\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_logging_string_CO = \"\"\"\n",
+    "if(stardata->star[0].stellar_type>=NS)\n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"EXAMPLE_LOG_CO %30.12e %g %g %g %g %d %d\\\\n\",\n",
+    "            // \n",
+    "            stardata->model.time, // 1\n",
+    "\n",
+    "            stardata->star[0].mass, //2\n",
+    "            stardata->previous_stardata->star[0].mass, //3\n",
+    "\n",
+    "            stardata->star[0].radius, //4\n",
+    "            stardata->previous_stardata->star[0].radius, //5\n",
+    "\n",
+    "            stardata->star[0].stellar_type, //6\n",
+    "            stardata->previous_stardata->star[0].stellar_type //7\n",
+    "      );\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "# Entire script\n",
+    "custom_logging_code = binary_c_log_code(example_logging_string_CO)\n",
+    "\n",
+    "# Run system\n",
+    "output = run_system(M_1=10, custom_logging_code=custom_logging_code)\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print(\"\\n\".join(output.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "51c51592-6406-43bd-a879-10ace64aaf28",
+   "metadata": {},
+   "source": [
+    "### Logging mass evolution and the supernova\n",
+    "This logging code prints the mass evolution and the moment the star goes supernova"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 47,
+   "id": "8f58fdf9-3e76-4c18-a1c5-eed0980d4133",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "EXAMPLE_MASSLOSS             9.878236827680e+00 1.61349 8.38063 20 13 1\n",
+      "EXAMPLE_SN             9.878236827680e+00 1.61349 8.38063 20 12 13 5 1 6.74037 4.92267 6.74037 0 0\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_logging_string_CO = \"\"\"\n",
+    "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %g %d %g\\\\n\",\n",
+    "    // \n",
+    "    stardata->model.time, // 1\n",
+    "    stardata->star[0].mass, //2\n",
+    "    stardata->previous_stardata->star[0].mass, //3\n",
+    "    stardata->common.zero_age.mass[0], //4\n",
+    "\n",
+    "    stardata->star[0].stellar_type, //5\n",
+    "    stardata->model.probability //6\n",
+    ");\n",
+    "if(stardata->star[0].SN_type != SN_NONE)\n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        if(stardata->pre_events_stardata != NULL)\n",
+    "        {\n",
+    "            Printf(\"EXAMPLE_SN %30.12e \" // 1\n",
+    "                \"%g %g %g %d \" // 2-5\n",
+    "                \"%d %d %g %g \" // 6-9\n",
+    "                \"%g %g %g %g\\\\n\", // 10-13\n",
+    "\n",
+    "                // \n",
+    "                stardata->model.time, // 1\n",
+    "\n",
+    "                stardata->star[0].mass, //2\n",
+    "                stardata->pre_events_stardata->star[0].mass, //3\n",
+    "                stardata->common.zero_age.mass[0], //4\n",
+    "                stardata->star[0].SN_type, //5\n",
+    "\n",
+    "                stardata->star[0].stellar_type, //6\n",
+    "                stardata->pre_events_stardata->star[0].stellar_type, //7\n",
+    "                stardata->model.probability, //8\n",
+    "                stardata->pre_events_stardata->star[0].core_mass[ID_core(stardata->pre_events_stardata->star[0].stellar_type)],           // 9\n",
+    "\n",
+    "                stardata->pre_events_stardata->star[0].core_mass[CORE_CO],     // 10\n",
+    "                stardata->pre_events_stardata->star[0].core_mass[CORE_He],    // 11\n",
+    "                stardata->star[0].fallback, // 12\n",
+    "                stardata->star[0].fallback_mass // 13\n",
+    "            );\n",
+    "        }\n",
+    "        else\n",
+    "        {\n",
+    "            Printf(\"EXAMPLE_SN %30.12e \" // 1\n",
+    "                \"%g %g %g %d \" // 2-5\n",
+    "                \"%d %d %g %g \" // 6-9\n",
+    "                \"%g %g %g %g\\\\n\", // 10-13\n",
+    "\n",
+    "                // \n",
+    "                stardata->model.time, // 1\n",
+    "\n",
+    "                stardata->star[0].mass, //2\n",
+    "                stardata->previous_stardata->star[0].mass, //3\n",
+    "                stardata->common.zero_age.mass[0], //4\n",
+    "                stardata->star[0].SN_type, //5\n",
+    "\n",
+    "                stardata->star[0].stellar_type, //6\n",
+    "                stardata->previous_stardata->star[0].stellar_type, //7\n",
+    "                stardata->model.probability, //8\n",
+    "                stardata->previous_stardata->star[0].core_mass[ID_core(stardata->previous_stardata->star[0].stellar_type)],           // 9\n",
+    "\n",
+    "                stardata->previous_stardata->star[0].core_mass[CORE_CO],     // 10\n",
+    "                stardata->previous_stardata->star[0].core_mass[CORE_He],    // 11\n",
+    "                stardata->star[0].fallback, // 12\n",
+    "                stardata->star[0].fallback_mass // 13\n",
+    "            );\n",
+    "        }\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "# Entire script\n",
+    "custom_logging_code = binary_c_log_code(example_logging_string_CO)\n",
+    "\n",
+    "# Run system\n",
+    "output = run_system(M_1=20, custom_logging_code=custom_logging_code)\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print(\"\\n\".join(output.splitlines()[-2:]))"
+   ]
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/build/doctrees/nbsphinx/notebook_extra_features.ipynb b/docs/build/doctrees/nbsphinx/notebook_extra_features.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..d453a6f5bef5a661a59491fde19511cee3f6c579
--- /dev/null
+++ b/docs/build/doctrees/nbsphinx/notebook_extra_features.ipynb
@@ -0,0 +1,44 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "d5c04b77-f0be-4b33-8c03-c72eb846527c",
+   "metadata": {},
+   "source": [
+    "# Extra features and functionality of binarycpython\n",
+    "In this notebook we'll go over some of the extra features and functionality that was not covered in the other notebooks.\n",
+    "\n",
+    "TODO"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "id": "0020f1bc-2a23-455c-8216-9e63e6e038ae",
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/build/doctrees/nbsphinx/notebook_individual_systems.ipynb b/docs/build/doctrees/nbsphinx/notebook_individual_systems.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..19c2d29fbd316324eb39a361e897be2b835955e8
--- /dev/null
+++ b/docs/build/doctrees/nbsphinx/notebook_individual_systems.ipynb
@@ -0,0 +1,563 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "a544d28c-c2e1-4c6a-b55b-8caec440743f",
+   "metadata": {},
+   "source": [
+    "# Running individual systems with binarycpython\n",
+    "This notebook will show you how to run single systems and analyze their results.\n",
+    "\n",
+    "It can be useful to have some functions to quickly run a single system to e.g. inspect what evolutionary steps a specific system goes through, to plot the mass loss evolution of a single star, etc. "
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "dd5d9ec7-5791-45f1-afbd-225947e2a583",
+   "metadata": {},
+   "source": [
+    "## Single system with run_wrapper\n",
+    "The simplest method to run a single system is to use the run_system wrapper. This function deals with setting up the argument string, makes sure all the required parameters are included and handles setting and cleaning up the custom logging functionality (see notebook_custom_logging).\n",
+    "\n",
+    "As arguments to this function we can add any of the parameters that binary_c itself actually knows, as well as:\n",
+    "- custom_logging_code: string containing a print statement that binary_c can use to print information\n",
+    "- log_filename: path of the logfile that binary_c generates\n",
+    "- parse_function: function that handles parsing the output of binary-c"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "id": "425efed3-d8e3-432d-829e-41d8ebe05162",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from binarycpython.utils.run_system_wrapper import run_system\n",
+    "# help(run_system) # Uncomment to see the docstring"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "id": "b2abab48-433d-4936-8434-14804c52c9f6",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "SINGLE_STAR_LIFETIME 1 12462\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "output = run_system(M_1=1)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f127a5e4-dc01-4472-9130-8a943c92e8a7",
+   "metadata": {},
+   "source": [
+    "Lets try adding a log filename now:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
+   "id": "029fc3f2-f09a-49af-a32b-248505738f2e",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "      TIME      M1       M2   K1  K2           SEP   ECC  R1/ROL1 R2/ROL2  TYPE RANDOM_SEED=67365 RANDOM_COUNT=0\n",
+      "     0.0000    1.000    0.000  1  15            -1 -1.00   0.000   0.000  \"INITIAL \"\n",
+      " 11003.1302    1.000    0.000  2  15            -1 -1.00   0.000   0.000  \"OFF_MS\"\n",
+      " 11003.1302    1.000    0.000  2  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 11582.2424    1.000    0.000  3  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12325.1085    0.817    0.000  4  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12457.1300    0.783    0.000  5  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12460.8955    0.774    0.000  6  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12460.8955    0.774    0.000  6  15            -1 -1.00   0.000   0.000  \"shrinkAGB\"\n",
+      " 12461.9514    0.523    0.000 11  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 15000.0000    0.523    0.000 11  15            -1 -1.00   0.000   0.000  \"MAX_TIME\"\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "output = run_system(M_1=1, log_filename='/tmp/test_logfile.txt')\n",
+    "with open('/tmp/test_logfile.txt', 'r') as f:\n",
+    "    print(f.read())"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "606670f2-3e0a-43c7-a885-006b92fac9d2",
+   "metadata": {},
+   "source": [
+    "To get more useful output we can include a custom_logging snippet (see notebook_custom_logging):"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 6,
+   "id": "e6a23b55-ca42-440d-83ac-e76a24a83a67",
+   "metadata": {
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "['EXAMPLE_MASSLOSS             0.000000000000e+00 1 1 1', 'EXAMPLE_MASSLOSS             0.000000000000e+00 1 1 1', 'EXAMPLE_MASSLOSS             1.000000000000e-06 1 1 1', 'EXAMPLE_MASSLOSS             2.000000000000e-06 1 1 1']\n"
+     ]
+    }
+   ],
+   "source": [
+    "from binarycpython.utils.custom_logging_functions import binary_c_log_code\n",
+    "\n",
+    "# Create the print statement\n",
+    "custom_logging_print_statement = \"\"\"\n",
+    "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %d\\\\n\",\n",
+    "    // \n",
+    "    stardata->model.time, // 1\n",
+    "    stardata->star[0].mass, //2\n",
+    "    stardata->common.zero_age.mass[0], //4\n",
+    "\n",
+    "    stardata->star[0].stellar_type //5\n",
+    ");\n",
+    "\"\"\"\n",
+    "\n",
+    "# Generate entire shared lib code around logging lines\n",
+    "custom_logging_code = binary_c_log_code(custom_logging_print_statement)\n",
+    "\n",
+    "output = run_system(M_1=1, custom_logging_code=custom_logging_code)\n",
+    "print(output.splitlines()[:4])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "4c885143-db79-4fed-b4c4-0bd846e24f7d",
+   "metadata": {},
+   "source": [
+    "Now we have some actual output, it is time to create a parse_function which parses the output. Adding a parse_function to the run_system will make run_system run the output of binary_c through the parse_function."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "3822721f-217a-495b-962e-d57137b9e290",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "[['time', 'mass', 'initial_mass', 'stellar_type'], [0.0, 1.0, 1.0, 1.0], [0.0, 1.0, 1.0, 1.0]]\n"
+     ]
+    }
+   ],
+   "source": [
+    "def parse_function(output):\n",
+    "    \"\"\"\n",
+    "    Example function to parse the output of binary_c\n",
+    "    \"\"\"\n",
+    "\n",
+    "    # \n",
+    "    column_names = ['time', 'mass', 'initial_mass', 'stellar_type']\n",
+    "    value_lines = [column_names]\n",
+    "    \n",
+    "    # Loop over output\n",
+    "    for line in output.splitlines():\n",
+    "        \n",
+    "        # Select the lines starting with the header we chose\n",
+    "        if line.startswith(\"EXAMPLE_MASSLOSS\"):\n",
+    "        \n",
+    "        # Split the output and fetch the data\n",
+    "            split_line = line.split()\n",
+    "            values = [float(el) for el in split_line[1:]]\n",
+    "            value_lines.append(values)\n",
+    "\n",
+    "    return value_lines\n",
+    "\n",
+    "# Catch output\n",
+    "output = run_system(M_1=1, custom_logging_code=custom_logging_code, parse_function=parse_function)\n",
+    "print(output[:3])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "a551f07f-2eff-4425-9375-267579a581b3",
+   "metadata": {},
+   "source": [
+    "This output can now be turned into e.g. an Numpy array or Pandas dataframe (my favorite: makes querying the data very easy)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 8,
+   "id": "654a07ed-2a88-46ff-9da0-b7759580f9f3",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "0        time      mass initial_mass stellar_type\n",
+      "1           0         1            1            1\n",
+      "2           0         1            1            1\n",
+      "3       1e-06         1            1            1\n",
+      "4       2e-06         1            1            1\n",
+      "5       3e-06         1            1            1\n",
+      "...       ...       ...          ...          ...\n",
+      "1612  12461.8  0.577754            1            6\n",
+      "1613    12462  0.522806            1           11\n",
+      "1614    13462  0.522806            1           11\n",
+      "1615    14462  0.522806            1           11\n",
+      "1616    15000  0.522806            1           11\n",
+      "\n",
+      "[1616 rows x 4 columns]\n"
+     ]
+    }
+   ],
+   "source": [
+    "import pandas as pd\n",
+    "\n",
+    "# Load data into dataframe\n",
+    "example_df = pd.DataFrame(output)\n",
+    "\n",
+    "# Fix column headers\n",
+    "example_df.columns = example_df.iloc[0]\n",
+    "example_df = example_df.drop(example_df.index[0])\n",
+    "\n",
+    "print(example_df)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "325c2ce6-f9a1-46b7-937f-84040e1252cf",
+   "metadata": {
+    "tags": []
+   },
+   "source": [
+    "## Single system via population object\n",
+    "When setting up your population object (see notebook_population), and configuring all the parameters, it is possible to run a single system using that same configuration. It will use the parse_function if set, and running a single system is a good method to test if everything works accordingly."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 9,
+   "id": "4a98ffca-1b72-4bb8-8df1-3bf3187d882f",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from binarycpython.utils.grid import Population\n",
+    "# help(Population) # Uncomment to see the docstring"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "7e2c2ef0-3db2-46a6-8c85-9b6cf720eb6a",
+   "metadata": {},
+   "source": [
+    "First, let's try this without any custom logging or parsing functionality"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 10,
+   "id": "bff1cc2e-6b32-4ba0-879f-879ffbabd223",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: M_1=10 to BSE_options\n",
+      "Creating and loading custom logging functionality\n",
+      "Running binary_c M_1 10\n",
+      "Cleaning up the custom logging stuff. type: single\n",
+      "SINGLE_STAR_LIFETIME 10 27.7358\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Create the population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# Set some parameters\n",
+    "example_pop.set(\n",
+    "    verbosity=1\n",
+    ")\n",
+    "example_pop.set(\n",
+    "    M_1=10\n",
+    ")\n",
+    "\n",
+    "# get output and print\n",
+    "output = example_pop.evolve_single()\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ae01fa35-f8b1-4a40-bfb2-b9e872cae0e7",
+   "metadata": {},
+   "source": [
+    "Now lets add some actual output with the custom logging"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 13,
+   "id": "dd748bab-b57e-4129-8350-9ea11fa179d0",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: C_logging_code=\n",
+      "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %g %d\\n\",\n",
+      "    // \n",
+      "    stardata->model.time, // 1\n",
+      "    stardata->star[0].mass, //2\n",
+      "    stardata->previous_stardata->star[0].mass, //3\n",
+      "    stardata->common.zero_age.mass[0], //4\n",
+      "\n",
+      "    stardata->star[0].stellar_type //5\n",
+      ");\n",
+      " to grid_options\n",
+      "Creating and loading custom logging functionality\n",
+      "Running binary_c M_1 10\n",
+      "Cleaning up the custom logging stuff. type: single\n",
+      "Removed /tmp/binary_c_python/custom_logging/libcustom_logging_eac2dfc438a14e5a9f5be98b1b6b4294.so\n",
+      "['EXAMPLE_MASSLOSS             0.000000000000e+00 10 0 10 1', 'EXAMPLE_MASSLOSS             0.000000000000e+00 10 10 10 1', 'EXAMPLE_MASSLOSS             1.000000000000e-06 10 10 10 1', 'EXAMPLE_MASSLOSS             2.000000000000e-06 10 10 10 1']\n"
+     ]
+    }
+   ],
+   "source": [
+    "custom_logging_print_statement = \"\"\"\n",
+    "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %g %d\\\\n\",\n",
+    "    // \n",
+    "    stardata->model.time, // 1\n",
+    "    stardata->star[0].mass, //2\n",
+    "    stardata->previous_stardata->star[0].mass, //3\n",
+    "    stardata->common.zero_age.mass[0], //4\n",
+    "\n",
+    "    stardata->star[0].stellar_type //5\n",
+    ");\n",
+    "\"\"\"   \n",
+    "\n",
+    "example_pop.set(C_logging_code=custom_logging_print_statement)\n",
+    "\n",
+    "# get output and print\n",
+    "output = example_pop.evolve_single()\n",
+    "print(output.splitlines()[:4])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "588a7d9e-9d64-4b3b-8907-656b905286e8",
+   "metadata": {},
+   "source": [
+    "Lastly we can add a parse_function to handle parsing the output again. \n",
+    "\n",
+    "Because the parse_function will now be part of the population object, it can access information of the object. We need to make a new parse function that is fit for an object: we the arguments now need to be (self, output). Returning the data is useful when running evolve_single(), but won't be used in a population evolution."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 14,
+   "id": "fec39154-cce6-438c-8c2c-509d76b00f34",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "import os\n",
+    "import json\n",
+    "import numpy as np\n",
+    "\n",
+    "def object_parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parse function that can be added to the population object\n",
+    "    \"\"\"\n",
+    "\n",
+    "    # We can access object instance information now. \n",
+    "    # In this way we can store the results in a file for example. \n",
+    "    output_file = os.path.join(self.custom_options['output_dir'], 'example_output.json')\n",
+    "    \n",
+    "    # \n",
+    "    column_names = ['time', 'mass', 'initial_mass', 'stellar_type']\n",
+    "    value_lines = [column_names]\n",
+    "    \n",
+    "    # Loop over output\n",
+    "    for line in output.splitlines():\n",
+    "        \n",
+    "        # Select the lines starting with the header we chose\n",
+    "        if line.startswith(\"EXAMPLE_MASSLOSS\"):\n",
+    "        \n",
+    "        # Split the output and fetch the data\n",
+    "            split_line = line.split()\n",
+    "            values = [float(el) for el in split_line[1:]]\n",
+    "            value_lines.append(values)\n",
+    "\n",
+    "    # Turn into an array\n",
+    "    values_array = np.array(value_lines[1:])\n",
+    "    \n",
+    "    # make dict and fill\n",
+    "    output_dict = {}\n",
+    "    for i in range(len(column_names)):\n",
+    "        output_dict[column_names[i]] = list(values_array[:,i])\n",
+    "\n",
+    "    # Write to file\n",
+    "    with open(output_file, 'w') as f:\n",
+    "        f.write(json.dumps(output_dict, indent=4))\n",
+    "        \n",
+    "    # Return something anyway\n",
+    "    return value_lines"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 15,
+   "id": "57347512-fd4a-434b-b13c-5e6dbd3ac415",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: parse_function=<function object_parse_function at 0x7f9265091598> to grid_options\n",
+      "<<<< Warning: Key does not match previously known parameter:                     adding: output_dir=/tmp/ to custom_options >>>>\n",
+      "Creating and loading custom logging functionality\n",
+      "Running binary_c M_1 10\n",
+      "Cleaning up the custom logging stuff. type: single\n",
+      "Removed /tmp/binary_c_python/custom_logging/libcustom_logging_e9c2bec7f15541eb847fc6013e48e7ed.so\n",
+      "[['time', 'mass', 'initial_mass', 'stellar_type'], [0.0, 10.0, 0.0, 10.0, 1.0], [0.0, 10.0, 10.0, 10.0, 1.0], [1e-06, 10.0, 10.0, 10.0, 1.0]]\n",
+      "dict_keys(['time', 'mass', 'initial_mass', 'stellar_type'])\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_pop.set(\n",
+    "    parse_function=object_parse_function,\n",
+    "    output_dir='/tmp/'\n",
+    ")\n",
+    "output = example_pop.evolve_single()\n",
+    "print(output[:4])\n",
+    "\n",
+    "# Example of loading the data that was written\n",
+    "with open(os.path.join(example_pop.custom_options['output_dir'], 'example_output.json')) as f:\n",
+    "    written_data = json.loads(f.read())\n",
+    "\n",
+    "print(written_data.keys())"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ddc06da3-fc68-4c6f-8067-14ea862b964d",
+   "metadata": {},
+   "source": [
+    "## Single system via API functionality\n",
+    "It is possible to construct your own functionality to run a single system by directly calling the API function to run a system. Under the hood all the other functions and wrappers actually use this API.\n",
+    "\n",
+    "There are less failsafes for this method, so this make sure the input is correct and binary_c knows all the arguments you pass in.\n",
+    "\n",
+    "for more details on this API function see `notebook_api_functions`"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "56886792-d379-4eac-b0d4-54508edb39c7",
+   "metadata": {},
+   "source": [
+    "First we must construct the argument string that we pass to binary_c"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 16,
+   "id": "ec48125c-6bf5-48f4-9357-8261800b5d8b",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "SINGLE_STAR_LIFETIME 15 14.2383\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# For a binary system we need to pass in these arguments\n",
+    "M_1 = 15.0  # Msun\n",
+    "M_2 = 14.0  # Msun\n",
+    "separation = 0  # 0 = ignored, use period\n",
+    "orbital_period = 4530.0  # days\n",
+    "eccentricity = 0.0\n",
+    "metallicity = 0.02\n",
+    "max_evolution_time = 15000  # Myr. You need to include this argument.\n",
+    "\n",
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} M_2 {M_2} separation {separation} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=M_1,\n",
+    "    M_2=M_2,\n",
+    "    separation=separation,\n",
+    "    orbital_period=orbital_period,\n",
+    "    eccentricity=eccentricity,\n",
+    "    metallicity=metallicity,\n",
+    "    max_evolution_time=max_evolution_time,\n",
+    ").strip()\n",
+    "\n",
+    "from binarycpython import _binary_c_bindings\n",
+    "\n",
+    "output = _binary_c_bindings.run_system(argstring)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "55c8ea24-0fc0-452c-8121-1e7667433479",
+   "metadata": {},
+   "source": [
+    "As we can see above, the output is rather empty. But if SINGLE_STAR_LIFETIME is printed we know we caught the output correctly. To get actual output we should have timesteps printed in the `log_every_timestep.c` in binary_c, or add some custom_logging (see notebook_custom_logging). "
+   ]
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/build/doctrees/nbsphinx/notebook_population.ipynb b/docs/build/doctrees/nbsphinx/notebook_population.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..56f3b153c23064e82863f188906d50243e795715
--- /dev/null
+++ b/docs/build/doctrees/nbsphinx/notebook_population.ipynb
@@ -0,0 +1,1213 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "bbbaafbb-fd7d-4b73-a970-93506ba35d71",
+   "metadata": {},
+   "source": [
+    "# Running populations with binarycpython\n",
+    "This notebook will show you how to evolve a population of stars\n",
+    "\n",
+    "Much of the code in the binarycpython package is written to evolve a population of stars through the Population object, rather than running a single system. Let's go through the functionality of this object step by step and set up some example populations. \n",
+    "\n",
+    "At the bottom of this notebook there are some complete example scripts"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "id": "bf6b8673-a2b5-4b50-ad1b-e90671f57470",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "import os\n",
+    "from binarycpython.utils.custom_logging_functions import temp_dir\n",
+    "from binarycpython.utils.grid import Population\n",
+    "\n",
+    "# help(Population) # Uncomment to see the public functions of this object"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "a081ab23-7822-4971-aa82-991548534714",
+   "metadata": {},
+   "source": [
+    "- running ensemble\n",
+    "- using M&S grid"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f268eff3-4e08-4f6b-8b59-f22dba4d2074",
+   "metadata": {},
+   "source": [
+    "## Setting up the Population object\n",
+    "To set up and configure the population object we need to make an object instance of the `Population` object, and add configuration via the `.set()` function.\n",
+    "\n",
+    "There are three categories of options that the Population object can set:\n",
+    "- BSE options: these options will be used for the binary_c calls, and are recognized by comparing the arguments to a known list of available arguments of binary_c. To see which options are available, see section [`binary_c parameters` in the documentation](https://ri0005.pages.surrey.ac.uk/binary_c-python/binary_c_parameters.html). You can access these through `population.bse_options['<bse option name>']` after you have set them. \n",
+    "\n",
+    "- Grid options: these options will be used to configure the behaviour of the Population object. To see which options are available, see section [`Population grid code options` in the documentation](https://ri0005.pages.surrey.ac.uk/binary_c-python/grid_options_descriptions.html). They can be accessed via `population.grid_options['<grid option name>']` after you have set them. \n",
+    "\n",
+    "- Custom options: these options are not recognized as either of the above, so they will be stored in the custom_options, and can be accessed via `population.custom_options['<custom option name>']`"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "id": "79ab50b7-591f-4883-af09-116d1835a751",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: M_1=10 to BSE_options\n",
+      "adding: orbital_period=45000000080 to BSE_options\n",
+      "adding: max_evolution_time=15000 to BSE_options\n",
+      "adding: eccentricity=0.02 to BSE_options\n",
+      "adding: amt_cores=2 to grid_options\n",
+      "<<<< Warning: Key does not match previously known parameter:                     adding: data_dir=/tmp/binary_c_python/example_python_population_result to custom_options >>>>\n",
+      "<<<< Warning: Key does not match previously known parameter:                     adding: base_filename=example_pop.dat to custom_options >>>>\n",
+      "1\n",
+      "example_pop.dat\n",
+      "10\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Create population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# If you want verbosity, set this before other things\n",
+    "example_pop.set(verbosity=1)\n",
+    "\n",
+    "# Setting values can be done via .set(<parameter_name>=<value>)\n",
+    "# Values that are known to be binary_c_parameters are loaded into bse_options.\n",
+    "# Those that are present in the default grid_options are set in grid_options\n",
+    "# All other values that you set are put in a custom_options dict\n",
+    "example_pop.set(\n",
+    "    # binary_c physics options\n",
+    "    M_1=10,  # bse_options\n",
+    "    orbital_period=45000000080,  # bse_options\n",
+    "    max_evolution_time=15000,  # bse_options\n",
+    "    eccentricity=0.02,  # bse_options\n",
+    "\n",
+    "\n",
+    "    # grid_options\n",
+    "    amt_cores=2,  # grid_options\n",
+    "    \n",
+    "    # Custom options # TODO: need to be set in grid_options probably\n",
+    "    data_dir=os.path.join(\n",
+    "        temp_dir(), \"example_python_population_result\"\n",
+    "    ),  # custom_options\n",
+    "    base_filename=\"example_pop.dat\",  # custom_options\n",
+    ")\n",
+    "\n",
+    "# We can use the options through\n",
+    "print(example_pop.grid_options['verbosity'])\n",
+    "print(example_pop.custom_options['base_filename'])\n",
+    "print(example_pop.bse_options['M_1'])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f8d46d19-633d-4911-821d-a59daed31816",
+   "metadata": {},
+   "source": [
+    "After configuring the population, but before running the actual population, its usually a good idea to export the full configuration (including version info of binary_c and all the parameters) to a file. To do this we use `example_pop.export_all_info()`.\n",
+    "\n",
+    "On default this exports everything, each of the sections can be disabled:\n",
+    "  - population settings (bse_options, grid_options, custom_options), turn off with include_population\n",
+    "      settings=False\n",
+    "  - binary_c_defaults (all the commandline arguments that binary c accepts, and their defaults).\n",
+    "      turn off with include_binary_c_defaults=False\n",
+    "  - include_binary_c_version_info (all the compilation info, and information about the compiled\n",
+    "      parameters), turn off with include_binary_c_version_info=False\n",
+    "  - include_binary_c_help_all (all the help information for all the binary_c parameters),\n",
+    "      turn off with include_binary_c_help_all=Fase\n",
+    "      \n",
+    "On default it will write this to the custom_options['data_dir'], but that can be overriden by setting use_datadir=False and providing an outfile=<>"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
+   "id": "b9c2471a-a5b0-48b7-a50b-2f0d22100926",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Writing settings to /tmp/binary_c_python/example_python_population_result/example_pop_settings.json\n"
+     ]
+    },
+    {
+     "data": {
+      "text/plain": [
+       "'/tmp/binary_c_python/example_python_population_result/example_pop_settings.json'"
+      ]
+     },
+     "execution_count": 3,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "example_pop.export_all_info()"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f9a65554-36ab-4a04-96ca-9f1422c307fd",
+   "metadata": {},
+   "source": [
+    "## Adding grid variables\n",
+    "The main purpose of the Population object is to handle the population synthesis side of running a set of stars. The main method to do this with binarycpython, as is the case with Perl binarygrid, is to use grid variables. These are loops over a predefined range of values, where a probability will be assigned to the systems based on the chosen probability distributions.\n",
+    "\n",
+    "Usually we use either 1 mass grid variable, or a trio of mass, mass ratio and period (See below for full examples of all of these). We can, however, also add grid sampling for e.g. eccentricity, metallicity or other parameters. \n",
+    "\n",
+    "In some cases it could be easier to set up a for loop that sets that parameter and calls the evolve function several times, e.g. when you want to vary a prescription (usually a discrete, unweighted parameter) \n",
+    "\n",
+    "\n",
+    "A notable special type of grid variable is that of the Moe & di Stefano 2017 dataset (see further down in the notebook).\n",
+    "\n",
+    "To add a grid variable to the population object we use `example_pop.add_grid_variable` (see next cell)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 4,
+   "id": "68c84521-9ae8-4020-af7a-5334173db969",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Help on method add_grid_variable in module binarycpython.utils.grid:\n",
+      "\n",
+      "add_grid_variable(name:str, longname:str, valuerange:Union[list, str], resolution:str, spacingfunc:str, probdist:str, dphasevol:Union[str, int], parameter_name:str, gridtype:str='edge', branchpoint:int=0, precode:Union[str, NoneType]=None, condition:Union[str, NoneType]=None) -> None method of binarycpython.utils.grid.Population instance\n",
+      "    Function to add grid variables to the grid_options.\n",
+      "    \n",
+      "    The execution of the grid generation will be through a nested for loop.\n",
+      "    Each of the grid variables will get create a deeper for loop.\n",
+      "    \n",
+      "    The real function that generates the numbers will get written to a new file in the TMP_DIR,\n",
+      "    and then loaded imported and evaluated.\n",
+      "    beware that if you insert some destructive piece of code, it will be executed anyway.\n",
+      "    Use at own risk.\n",
+      "    \n",
+      "    Tasks:\n",
+      "        - TODO: Fix this complex function.\n",
+      "    \n",
+      "    Args:\n",
+      "        name:\n",
+      "            name of parameter. This is evaluated as a parameter and you can use it throughout\n",
+      "            the rest of the function\n",
+      "            \n",
+      "            Examples:\n",
+      "                name = 'lnm1'\n",
+      "        longname:\n",
+      "            Long name of parameter\n",
+      "            \n",
+      "            Examples:\n",
+      "                longname = 'Primary mass'\n",
+      "        range:\n",
+      "            Range of values to take. Does not get used really, the spacingfunction is used to\n",
+      "            get the values from\n",
+      "            \n",
+      "            Examples:\n",
+      "                range = [math.log(m_min), math.log(m_max)]\n",
+      "        resolution:\n",
+      "            Resolution of the sampled range (amount of samples).\n",
+      "            TODO: check if this is used anywhere\n",
+      "    \n",
+      "            Examples: \n",
+      "                resolution = resolution[\"M_1\"]\n",
+      "        spacingfunction:\n",
+      "            Function determining how the range is sampled. You can either use a real function,\n",
+      "            or a string representation of a function call. Will get written to a file and\n",
+      "            then evaluated.\n",
+      "    \n",
+      "            Examples:\n",
+      "                spacingfunction = \"const(math.log(m_min), math.log(m_max), {})\".format(resolution['M_1'])\n",
+      "    \n",
+      "        precode:\n",
+      "            Extra room for some code. This code will be evaluated within the loop of the\n",
+      "            sampling function (i.e. a value for lnm1 is chosen already)\n",
+      "            \n",
+      "            Examples:\n",
+      "                precode = 'M_1=math.exp(lnm1);'\n",
+      "        probdist:\n",
+      "            Function determining the probability that gets assigned to the sampled parameter\n",
+      "            \n",
+      "            Examples:\n",
+      "                probdist = 'Kroupa2001(M_1)*M_1'\n",
+      "        dphasevol:\n",
+      "            part of the parameter space that the total probability is calculated with. Put to -1\n",
+      "            if you want to ignore any dphasevol calculations and set the value to 1\n",
+      "            Examples:\n",
+      "                dphasevol = 'dlnm1'\n",
+      "        condition:\n",
+      "            condition that has to be met in order for the grid generation to continue\n",
+      "            Examples:\n",
+      "                condition = 'self.grid_options['binary']==1'\n",
+      "        gridtype:\n",
+      "            Method on how the value range is sampled. Can be either 'edge' (steps starting at\n",
+      "            the lower edge of the value range) or 'center'\n",
+      "            (steps starting at lower edge + 0.5 * stepsize).\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "help(example_pop.add_grid_variable)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "bd75cebe-2152-4025-b680-dc020b80889b",
+   "metadata": {},
+   "source": [
+    "All the distribution functions that we can use are stored in the `binarycpython.utils.distribution_functions` or `binarycpython/utils/distribution_functions.py` on git. If you uncomment the help statement below you can see which functions are available now:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 5,
+   "id": "048db541-3e92-4c5d-a25c-9c5a34b9c857",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [],
+   "source": [
+    "# import binarycpython.utils.distribution_functions\n",
+    "# help(binarycpython.utils.distribution_functions)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "1b3a007b-5c17-42a7-a981-7e268e6f545c",
+   "metadata": {},
+   "source": [
+    "The next cell contains an example of adding the mass grid variable, but sampling in log mass. The commented grid variables are examples of the mass ratio sampling and the period sampling."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 6,
+   "id": "47979841-2c26-4b26-8945-603d013dc93a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Added grid variable: {\n",
+      "    \"name\": \"lnm1\",\n",
+      "    \"longname\": \"Primary mass\",\n",
+      "    \"valuerange\": [\n",
+      "        2,\n",
+      "        150\n",
+      "    ],\n",
+      "    \"resolution\": \"20\",\n",
+      "    \"spacingfunc\": \"const(math.log(2), math.log(150), 20)\",\n",
+      "    \"precode\": \"M_1=math.exp(lnm1)\",\n",
+      "    \"probdist\": \"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+      "    \"dphasevol\": \"dlnm1\",\n",
+      "    \"parameter_name\": \"M_1\",\n",
+      "    \"condition\": \"\",\n",
+      "    \"gridtype\": \"edge\",\n",
+      "    \"branchpoint\": 0,\n",
+      "    \"grid_variable_number\": 0\n",
+      "}\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Add grid variables\n",
+    "resolution = {\"M_1\": 20, \"q\": 20, \"per\": 40}\n",
+    "\n",
+    "# Mass\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"lnm1\",\n",
+    "    longname=\"Primary mass\",\n",
+    "    valuerange=[2, 150],\n",
+    "    resolution=\"{}\".format(resolution[\"M_1\"]),\n",
+    "    spacingfunc=\"const(math.log(2), math.log(150), {})\".format(resolution[\"M_1\"]),\n",
+    "    precode=\"M_1=math.exp(lnm1)\",\n",
+    "    probdist=\"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+    "    dphasevol=\"dlnm1\",\n",
+    "    parameter_name=\"M_1\",\n",
+    "    condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    ")\n",
+    "\n",
+    "# # Mass ratio\n",
+    "# test_pop.add_grid_variable(\n",
+    "#     name=\"q\",\n",
+    "#     longname=\"Mass ratio\",\n",
+    "#     valuerange=[\"0.1/M_1\", 1],\n",
+    "#     resolution=\"{}\".format(resolution['q']),\n",
+    "#     spacingfunc=\"const(0.1/M_1, 1, {})\".format(resolution['q']),\n",
+    "#     probdist=\"flatsections(q, [{'min': 0.1/M_1, 'max': 1.0, 'height': 1}])\",\n",
+    "#     dphasevol=\"dq\",\n",
+    "#     precode=\"M_2 = q * M_1\",\n",
+    "#     parameter_name=\"M_2\",\n",
+    "#     condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    "# )\n",
+    "\n",
+    "# #\n",
+    "# test_pop.add_grid_variable(\n",
+    "#    name=\"log10per\", # in days\n",
+    "#    longname=\"log10(Orbital_Period)\",\n",
+    "#    valuerange=[0.15, 5.5],\n",
+    "#    resolution=\"{}\".format(resolution[\"per\"]),\n",
+    "#    spacingfunc=\"const(0.15, 5.5, {})\".format(resolution[\"per\"]),\n",
+    "#    precode=\"\"\"orbital_period = 10** log10per\n",
+    "# sep = calc_sep_from_period(M_1, M_2, orbital_period)\n",
+    "# sep_min = calc_sep_from_period(M_1, M_2, 10**0.15)\n",
+    "# sep_max = calc_sep_from_period(M_1, M_2, 10**5.5)\"\"\",\n",
+    "#    probdist=\"sana12(M_1, M_2, sep, orbital_period, sep_min, sep_max, math.log10(10**0.15), math.log10(10**5.5), -0.55)\",\n",
+    "#    parameter_name=\"orbital_period\",\n",
+    "#    dphasevol=\"dlog10per\",\n",
+    "# )\n"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "163f13ae-fec1-4ee8-b9d4-c1b75c19ff39",
+   "metadata": {},
+   "source": [
+    "## Setting logging and handling the output\n",
+    "On default, binary_c will not output anything (except for 'SINGLE STAR LIFETIME'). It is up to us to determine what will be printed. We can either do that by hardcoding the print statements into `binary_c` (see documentation binary_c). Or, we can use the custom logging functionality of binarycpython (see notebook `notebook_custom_logging.ipynb`), which is faster to set up and requires no recompilation of binary_c, but is somewhat more limited in its functionality. \n",
+    "\n",
+    "After configuring what will be printed, we need to make a function to parse the output. This can be done by setting the parse_function parameter in the population object (see also notebook `notebook_individual_systems.ipynb`). \n",
+    "\n",
+    "In the code below we will set up both the custom logging, and a parse function to handle that output"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "0c986215-93b1-4e30-ad79-f7c397e9ff7d",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: C_logging_code=\n",
+      "if(stardata->star[0].stellar_type >= 13)    \n",
+      "{\n",
+      "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+      "    {\n",
+      "        Printf(\"EXAMPLE_COMPACT_OBJECT %30.12e %g %g %g %d\\n\",\n",
+      "            // \n",
+      "            stardata->model.time, // 1\n",
+      "            stardata->star[0].mass, // 2\n",
+      "            stardata->common.zero_age.mass[0], // 3\n",
+      "            stardata->model.probability, // 4\n",
+      "            stardata->star[0].stellar_type // 5\n",
+      "      );\n",
+      "    };\n",
+      "    /* Kill the simulation to save time */\n",
+      "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+      "};\n",
+      " to grid_options\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Create custom logging statement: in this case we will log when the star turns into a compact object, and then terminate the evolution.\n",
+    "custom_logging_statement = \"\"\"\n",
+    "if(stardata->star[0].stellar_type >= 13)    \n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"EXAMPLE_COMPACT_OBJECT %30.12e %g %g %g %d\\\\n\",\n",
+    "            // \n",
+    "            stardata->model.time, // 1\n",
+    "            stardata->star[0].mass, // 2\n",
+    "            stardata->common.zero_age.mass[0], // 3\n",
+    "            stardata->model.probability, // 4\n",
+    "            stardata->star[0].stellar_type // 5\n",
+    "      );\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "example_pop.set(\n",
+    "    C_logging_code=custom_logging_statement\n",
+    ")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ae1f1f0c-1f8b-42d8-b051-cbf8c6b51514",
+   "metadata": {},
+   "source": [
+    "The parse function must now catch lines that start with \"EXAMPLE_COMPACT_OBJECT\", and write that line to a file"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 8,
+   "id": "fd197154-a8ce-4865-8929-008d3483101a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: parse_function=<function parse_function at 0x7ff3bdf79620> to grid_options\n"
+     ]
+    }
+   ],
+   "source": [
+    "def parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parse function\n",
+    "    \"\"\"\n",
+    "    \n",
+    "    # get info from the population instance\n",
+    "    data_dir = self.custom_options[\"data_dir\"]\n",
+    "    base_filename = self.custom_options[\"base_filename\"]\n",
+    "\n",
+    "    # Check directory, make if necessary\n",
+    "    os.makedirs(data_dir, exist_ok=True)\n",
+    "\n",
+    "    seperator = \" \"\n",
+    "\n",
+    "    # Create filename\n",
+    "    outfilename = os.path.join(data_dir, base_filename)\n",
+    "\n",
+    "    parameters = [\"time\", \"mass\", \"zams_mass\", \"probability\", \"stellar_type\"]\n",
+    "\n",
+    "    # Go over the output.\n",
+    "    for line in output.splitlines():\n",
+    "        headerline = line.split()[0]\n",
+    "\n",
+    "        # CHeck the header and act accordingly\n",
+    "        if headerline == \"EXAMPLE_COMPACT_OBJECT\":\n",
+    "            values = line.split()[1:]\n",
+    "            print(line)\n",
+    "            \n",
+    "            if not len(parameters) == len(values):\n",
+    "                print(\"Amount of column names isnt equal to amount of columns\")\n",
+    "                raise ValueError\n",
+    "\n",
+    "            if not os.path.exists(outfilename):\n",
+    "                with open(outfilename, \"w\") as f:\n",
+    "                    f.write(seperator.join(parameters) + \"\\n\")\n",
+    "\n",
+    "            with open(outfilename, \"a\") as f:\n",
+    "                f.write(seperator.join(values) + \"\\n\")\n",
+    "\n",
+    "# Add the parsing function\n",
+    "example_pop.set(\n",
+    "    parse_function=parse_function,\n",
+    ")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "91509ce5-ffe7-4937-aa87-6d7baac9ac04",
+   "metadata": {},
+   "source": [
+    "## Evolving the grid\n",
+    "Now that we configured all the main parts of the population object, we can actually run the population! Doing this is straightforward: `example_pop.evolve()`\n",
+    "\n",
+    "This will start up the processing of all the systems. We can control how many cores are used by settings `amt_cores`. By setting the `verbosity` of the population object to a higher value we can get a lot of verbose information about the run, but for now we will set it to 0.\n",
+    "\n",
+    "There are many grid_options that can lead to different behaviour of the evolution of the grid. Please do have a look at those: [grid options docs](https://ri0005.pages.surrey.ac.uk/binary_c-python/grid_options_descriptions.html), and try  "
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 9,
+   "id": "8ea376c1-1e92-45af-8cab-9d7fdca564eb",
+   "metadata": {
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: verbosity=0 to grid_options\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Grid has handled 20 stars\n",
+      "with a total probability of 0.05150046619238192\n",
+      "Total starcount for this run will be: 20\n",
+      "EXAMPLE_COMPACT_OBJECT             2.867655467480e+01 1.33079 9.81391 0.00167028 13\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "EXAMPLE_COMPACT_OBJECT             1.931266944719e+01 1.3933 12.3177 0.00124307 13\n",
+      "EXAMPLE_COMPACT_OBJECT             4.439623364590e+01 1.38004 7.81906 0.00224431 13\n",
+      "EXAMPLE_COMPACT_OBJECT             1.364277535630e+01 1.47961 15.4603 0.000925128 13\n",
+      "EXAMPLE_COMPACT_OBJECT             1.017435498578e+01 1.59052 19.4046 0.000688507 13\n",
+      "EXAMPLE_COMPACT_OBJECT             8.294870923827e+00 1.7197 24.3552 0.000512406 13\n",
+      "EXAMPLE_COMPACT_OBJECT             6.802132608769e+00 1.84162 30.5689 0.000381347 13\n",
+      "EXAMPLE_COMPACT_OBJECT             5.723570798020e+00 1.99471 38.3678 0.00028381 13\n",
+      "EXAMPLE_COMPACT_OBJECT             4.933751523833e+00 2.15875 48.1564 0.000211219 13\n",
+      "EXAMPLE_COMPACT_OBJECT             4.337250536639e+00 2.35209 60.4424 0.000157195 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.862081089332e+00 2.56776 75.8628 0.000116989 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.449960890183e+00 2.80457 95.2174 8.70668e-05 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.172196856333e+00 3.05193 119.51 6.47976e-05 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.069627290216e+00 3.27563 150 4.82242e-05 14\n",
+      "Population-2a7732d03e594ef4b5dfe9051b41d9c0 finished! The total probability was: 0.05150046619238191. It took a total of 0.7797017097473145s to run 20 systems on 2 cores\n",
+      "There were no errors found in this run.\n"
+     ]
+    }
+   ],
+   "source": [
+    "# change verbosity\n",
+    "example_pop.set(verbosity=0)\n",
+    "\n",
+    "## Executing a population\n",
+    "## This uses the values generated by the grid_variables\n",
+    "analytics = example_pop.evolve()  # TODO: update this function call"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "91ab45c7-7d31-4543-aee4-127ab58e891f",
+   "metadata": {},
+   "source": [
+    "After the run is complete, some technical report on the run is returned. I stored that in `analytics`. As we can see below, this dictionary is like a status report of the evolution. Useful for e.g. debugging."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 10,
+   "id": "e1f0464b-0424-4022-b34b-5b744bc2c59d",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "{'population_name': '2a7732d03e594ef4b5dfe9051b41d9c0', 'evolution_type': 'grid', 'failed_count': 0, 'failed_prob': 0, 'failed_systems_error_codes': [], 'errors_exceeded': False, 'errors_found': False, 'total_probability': 0.05150046619238191, 'total_count': 20, 'start_timestamp': 1628444120.234709, 'end_timestamp': 1628444121.0144107, 'total_mass_run': 730.1048014407228, 'total_probability_weighted_mass_run': 0.2983275843337705, 'zero_prob_stars_skipped': 0}\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(analytics)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "6460df56-9fba-4817-9a1e-593ef15d98c1",
+   "metadata": {},
+   "source": [
+    "## Noteworthy functionality\n",
+    "Some extra features that are available from via the population object are:\n",
+    "- write_binary_c_calls_to_file: Function to write the calls that would be passed to binary_c to a file"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 11,
+   "id": "83f8e519-4f7c-474a-ad95-f175a34fae81",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Help on method write_binary_c_calls_to_file in module binarycpython.utils.grid:\n",
+      "\n",
+      "write_binary_c_calls_to_file(output_dir:Union[str, NoneType]=None, output_filename:Union[str, NoneType]=None, include_defaults:bool=False) -> None method of binarycpython.utils.grid.Population instance\n",
+      "    Function that loops over the grid code and writes the generated parameters to a file.\n",
+      "    In the form of a command line call\n",
+      "    \n",
+      "    Only useful when you have a variable grid as system_generator. MC wouldn't be that useful\n",
+      "    \n",
+      "    Also, make sure that in this export there are the basic parameters\n",
+      "    like m1,m2,sep, orb-per, ecc, probability etc.\n",
+      "    \n",
+      "    On default this will write to the datadir, if it exists\n",
+      "    \n",
+      "    Tasks:\n",
+      "        - TODO: test this function\n",
+      "        - TODO: make sure the binary_c_python .. output file has a unique name\n",
+      "    \n",
+      "    Args:\n",
+      "        output_dir: (optional, default = None) directory where to write the file to. If custom_options['data_dir'] is present, then that one will be used first, and then the output_dir\n",
+      "        output_filename: (optional, default = None) filename of the output. If not set it will be called \"binary_c_calls.txt\"\n",
+      "        include_defaults: (optional, default = None) whether to include the defaults of binary_c in the lines that are written. Beware that this will result in very long lines, and it might be better to just export the binary_c defaults and keep them in a separate file.\n",
+      "    \n",
+      "    Returns:\n",
+      "        filename: filename that was used to write the calls to\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "help(example_pop.write_binary_c_calls_to_file)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 12,
+   "id": "dacfed75-dfe3-4afd-a0ff-a4be17746021",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Generating grid code\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Saving grid code to grid_options\n",
+      "Writing grid code to /tmp/binary_c_python/binary_c_grid_2a7732d03e594ef4b5dfe9051b41d9c0.py\n",
+      "Loading grid code function from /tmp/binary_c_python/binary_c_grid_2a7732d03e594ef4b5dfe9051b41d9c0.py\n",
+      "Grid code loaded\n",
+      "Writing binary_c calls to /tmp/binary_c_python/example_python_population_result/binary_c_calls.txt\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "Grid has handled 20 stars\n",
+      "with a total probability of 0.05150046619238192\n",
+      "/tmp/binary_c_python/example_python_population_result/binary_c_calls.txt\n",
+      "binary_c M_1 2.0 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.013208238029791246\n",
+      "binary_c M_1 2.5102526289471614 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.009829948023831718\n",
+      "binary_c M_1 3.1506841305680684 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.0073157281034221516\n",
+      "binary_c M_1 3.9545065608702976 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.005444573822104362\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_pop.set(verbosity=10)\n",
+    "calls_filename = example_pop.write_binary_c_calls_to_file()\n",
+    "print(calls_filename)\n",
+    "\n",
+    "with open(calls_filename, 'r') as f:\n",
+    "    print('\\n'.join(f.read().splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "60359eb1-4d0c-4d2d-8265-ec5171b944a2",
+   "metadata": {},
+   "source": [
+    "## Full examples of population scripts\n",
+    "Below is a full setup for a population of single stars"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 13,
+   "id": "7212b6be-9787-4122-a7f1-86538cf38179",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Grid has handled 20 stars\n",
+      "with a total probability of 0.05150046619238192\n",
+      "Total starcount for this run will be: 20\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Population-3680f3882c0a449c944462abffea2447 finished! The total probability was: 0.05150046619238191. It took a total of 0.6246354579925537s to run 20 systems on 2 cores\n",
+      "There were no errors found in this run.\n",
+      "\n",
+      "\n",
+      "time mass zams_mass probability radius stellar_type\n",
+      "2.867655467480e+01 1.33079 9.81391 0.00167028 1.72498e-05 13\n",
+      "1.931266944719e+01 1.3933 12.3177 0.00124307 1.72498e-05 13\n",
+      "4.439623364590e+01 1.38004 7.81906 0.00224431 1.72498e-05 13\n",
+      "1.364277535630e+01 1.47961 15.4603 0.000925128 1.72498e-05 13\n",
+      "1.017435498578e+01 1.59052 19.4046 0.000688507 1.72498e-05 13\n",
+      "8.294870923827e+00 1.7197 24.3552 0.000512406 1.72498e-05 13\n",
+      "6.802132608769e+00 1.84162 30.5689 0.000381347 1.72498e-05 13\n",
+      "5.723570798020e+00 1.99471 38.3678 0.00028381 1.72498e-05 13\n",
+      "4.933751523833e+00 2.15875 48.1564 0.000211219 1.72498e-05 13\n",
+      "4.337250536639e+00 2.35209 60.4424 0.000157195 9.97286e-06 14\n",
+      "3.862081089332e+00 2.56776 75.8628 0.000116989 1.08873e-05 14\n",
+      "3.449960890183e+00 2.80457 95.2174 8.70668e-05 1.18914e-05 14\n",
+      "3.172196856333e+00 3.05193 119.51 6.47976e-05 1.29402e-05 14\n",
+      "3.069627290216e+00 3.27563 150 4.82242e-05 1.38887e-05 14\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "import os\n",
+    "\n",
+    "from binarycpython.utils.grid import Population\n",
+    "from binarycpython.utils.custom_logging_functions import temp_dir\n",
+    "\n",
+    "def parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parsing function\n",
+    "    \"\"\"\n",
+    "    \n",
+    "    # extract info from the population instance\n",
+    "\n",
+    "    # Get some information from the\n",
+    "    data_dir = self.custom_options[\"data_dir\"]\n",
+    "    base_filename = self.custom_options[\"base_filename\"]\n",
+    "\n",
+    "    # Check directory, make if necessary\n",
+    "    os.makedirs(data_dir, exist_ok=True)\n",
+    "\n",
+    "    #\n",
+    "    seperator = \" \"\n",
+    "\n",
+    "    # Create filename\n",
+    "    outfilename = os.path.join(data_dir, base_filename)\n",
+    "\n",
+    "    # The header columns matching this \n",
+    "    parameters = [\"time\", \"mass\", \"zams_mass\", \"probability\", \"radius\", \"stellar_type\"]\n",
+    "\n",
+    "    # Go over the output.\n",
+    "    for el in output.splitlines():\n",
+    "        headerline = el.split()[0]\n",
+    "\n",
+    "        # CHeck the header and act accordingly\n",
+    "        if headerline == \"MY_STELLAR_DATA\":\n",
+    "            values = el.split()[1:]\n",
+    "\n",
+    "            if not len(parameters) == len(values):\n",
+    "                print(\"Amount of column names isnt equal to amount of columns\")\n",
+    "                raise ValueError\n",
+    "\n",
+    "            if not os.path.exists(outfilename):\n",
+    "                with open(outfilename, \"w\") as f:\n",
+    "                    f.write(seperator.join(parameters) + \"\\n\")\n",
+    "\n",
+    "            with open(outfilename, \"a\") as f:\n",
+    "                f.write(seperator.join(values) + \"\\n\")\n",
+    "\n",
+    "\n",
+    "# Create population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# If you want verbosity, set this before other things\n",
+    "example_pop.set(verbosity=0)\n",
+    "\n",
+    "# Setting values can be done via .set(<parameter_name>=<value>)\n",
+    "example_pop.set(\n",
+    "    # binary_c physics options\n",
+    "    M_1=10,  # bse_options\n",
+    "    separation=0,  # bse_options\n",
+    "    orbital_period=45000000080,  # bse_options\n",
+    "    max_evolution_time=15000,  # bse_options\n",
+    "    eccentricity=0.02,  # bse_options\n",
+    "    \n",
+    "    # grid_options\n",
+    "    amt_cores=2,  # grid_options\n",
+    "\n",
+    "    # Custom options: the data directory and the output filename\n",
+    "    data_dir=os.path.join(\n",
+    "        temp_dir(), \"example_python_population_result\"\n",
+    "    ),  # custom_options\n",
+    "    base_filename=\"example_pop.dat\",  # custom_options\n",
+    ")\n",
+    "\n",
+    "# Creating a parsing function\n",
+    "example_pop.set(\n",
+    "    parse_function=parse_function,  # Setting the parse function thats used in the evolve_population\n",
+    ")\n",
+    "\n",
+    "### Custom logging\n",
+    "# Log the moment when the star turns into neutron\n",
+    "example_pop.set(\n",
+    "    C_logging_code=\"\"\"\n",
+    "if(stardata->star[0].stellar_type >= 13)    \n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"MY_STELLAR_DATA %30.12e %g %g %g %g %d\\\\n\",\n",
+    "            // \n",
+    "            stardata->model.time, // 1\n",
+    "            stardata->star[0].mass, // 2\n",
+    "            stardata->common.zero_age.mass[0], // 4\n",
+    "            stardata->model.probability, // 5\n",
+    "            stardata->star[0].radius, // 6\n",
+    "            stardata->star[0].stellar_type // 7\n",
+    "      );\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    ")\n",
+    "\n",
+    "# Add grid variables\n",
+    "resolution = {\"M_1\": 20}\n",
+    "\n",
+    "# Mass\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"lnm1\",\n",
+    "    longname=\"Primary mass\",\n",
+    "    valuerange=[2, 150],\n",
+    "    resolution=\"{}\".format(resolution[\"M_1\"]),\n",
+    "    spacingfunc=\"const(math.log(2), math.log(150), {})\".format(resolution[\"M_1\"]),\n",
+    "    precode=\"M_1=math.exp(lnm1)\",\n",
+    "    probdist=\"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+    "    dphasevol=\"dlnm1\",\n",
+    "    parameter_name=\"M_1\",\n",
+    "    condition=\"\",\n",
+    ")\n",
+    "\n",
+    "# Exporting of all the settings can be done with .export_all_info()\n",
+    "example_pop.export_all_info()\n",
+    "\n",
+    "# remove the result file if it exists\n",
+    "if os.path.isfile(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\")):\n",
+    "    os.remove(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"))\n",
+    "\n",
+    "\n",
+    "# Evolve the population\n",
+    "example_pop.evolve()\n",
+    "\n",
+    "# \n",
+    "with open(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"), 'r') as f:\n",
+    "    output = f.read()\n",
+    "print(\"\\n\")\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "c2ab0979-6575-481d-9c1c-ca98517b2437",
+   "metadata": {},
+   "source": [
+    "We can also set up a population that samples biinary systems, by adding extra grid variables. Below is an example of a full script that runs a binary population and registers when a double compact object is formed. The logging is rather compact and should be expanded top be more useful"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 14,
+   "id": "79acdbb2-7dd6-45c4-9609-80994f03619a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Constructing/adding: q\n",
+      "Constructing/adding: log10per\n",
+      "Grid has handled 125 stars\n",
+      "with a total probability of 0.0862478164626921\n",
+      "Total starcount for this run will be: 125\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Constructing/adding: q\n",
+      "Constructing/adding: log10per\n",
+      "Population-d20a4c74d20a43b881c0c9e5def5f76c finished! The total probability was: 0.08624781646269201. It took a total of 8.561265707015991s to run 125 systems on 2 cores\n",
+      "There were no errors found in this run.\n",
+      "\n",
+      "\n",
+      "time mass_1 zams_mass_1 mass_2 zams_mass_2 stellar_type_1 prev_stellar_type_1 stellar_type_2 prev_stellar_type_2 metallicity probability\n",
+      "8.863377990313e+01 1.29444 5.88566 0 2.99283 13 5 15 15 0.02 0.000627913\n",
+      "1.146421815741e+02 0 5.88566 1.33062 4.43925 15 15 13 5 0.02 0.000627913\n",
+      "7.222715508467e+01 1.34922 5.88566 0 5.88566 13 5 15 15 0.02 0.000627913\n",
+      "1.350021848285e+01 1.48488 17.3205 0 0.1 13 5 15 15 0.02 0.000154349\n",
+      "1.171108213270e+01 1.53113 17.3205 0 0.1 13 5 15 15 0.02 0.000154349\n",
+      "1.171086983243e+01 1.53177 17.3205 0 0.1 13 9 15 15 0.02 0.000154349\n",
+      "1.170770599495e+01 1.53176 17.3205 0 4.40513 13 5 15 15 0.02 0.000172877\n",
+      "1.230407246199e+01 1.59499 17.3205 0 4.40513 13 5 15 15 0.02 0.000610573\n",
+      "1.108751340926e+01 1.70319 17.3205 0 8.71025 13 4 15 15 0.02 0.000610573\n",
+      "1.941017702765e+01 1.34903 17.3205 1.65097 8.71025 13 13 13 5 0.02 0.000172877\n",
+      "1.980988739731e+01 1.36979 17.3205 1.60808 8.71025 13 13 13 5 0.02 0.000121486\n",
+      "3.571858031651e+01 1.53174 17.3205 1.30504 8.71025 13 13 13 5 0.02 8.42148e-05\n",
+      "3.459153942631e+01 1.53176 17.3205 1.31004 8.71025 13 13 13 5 0.02 9.8162e-05\n",
+      "1.687368550125e+01 1.34937 17.3205 1.73856 13.0154 13 13 13 8 0.02 0.000172877\n",
+      "1.194842917007e+01 1.78096 17.3205 0 13.0154 13 8 15 15 0.02 0.000610573\n",
+      "1.733614170983e+01 1.53184 17.3205 1.42375 13.0154 13 13 13 5 0.02 9.8162e-05\n",
+      "1.723547465714e+01 1.38403 17.3205 1.71288 13.0154 13 13 13 8 0.02 0.000121486\n",
+      "1.764340254985e+01 1.53174 17.3205 1.41264 13.0154 13 13 13 5 0.02 8.42148e-05\n",
+      "1.170425790780e+01 1.52963 17.3205 0 17.3205 13 5 15 15 0.02 0.000172877\n",
+      "8.922967341481e+00 1.85486 17.3205 0 17.3205 13 8 15 15 0.02 0.000610573\n",
+      "1.232906623449e+01 1.41074 17.3205 1.34281 17.3205 13 13 13 8 0.02 0.000121486\n",
+      "1.170775828562e+01 1.53183 17.3205 1.53183 17.3205 13 5 13 5 0.02 9.8162e-05\n",
+      "1.170770422321e+01 1.53175 17.3205 1.53175 17.3205 13 5 13 5 0.02 8.42148e-05\n",
+      "5.075844624794e+00 2.12303 50.9713 0 0.1 13 8 15 15 0.02 3.79411e-05\n",
+      "4.766606588165e+00 2.20484 50.9713 0 0.1 14 8 15 15 0.02 3.79411e-05\n",
+      "4.768305081494e+00 2.18838 50.9713 0 0.1 13 8 15 15 0.02 3.79411e-05\n",
+      "4.458869865939e+00 2.29864 50.9713 0 12.8178 14 8 15 15 0.02 0.000150087\n",
+      "1.806014211040e+01 2.10446 50.9713 1.40749 12.8178 13 13 13 5 0.02 2.9863e-05\n",
+      "4.797342083485e+00 2.10328 50.9713 0 12.8178 13 13 15 1 0.02 4.24954e-05\n",
+      "1.721374713429e+01 2.21673 50.9713 1.42212 12.8178 14 14 13 5 0.02 2.41295e-05\n",
+      "4.055645404546e+00 2.47276 50.9713 0 25.5357 14 7 15 15 0.02 0.000150087\n",
+      "1.806123543037e+01 2.21893 50.9713 1.40745 12.8178 14 14 13 5 0.02 2.07011e-05\n",
+      "8.117519147635e+00 2.10433 50.9713 2.21473 25.5357 13 13 14 8 0.02 4.24954e-05\n",
+      "8.315554923168e+00 2.15343 50.9713 2.08519 25.5357 13 13 13 8 0.02 2.9863e-05\n",
+      "7.917420996633e+00 2.21892 50.9713 1.7431 25.5357 14 14 13 8 0.02 2.07011e-05\n",
+      "7.693213405973e+00 2.21805 50.9713 1.78384 25.5357 14 14 13 8 0.02 2.41295e-05\n",
+      "3.753837732894e+00 2.62517 50.9713 0 38.2535 14 7 15 15 0.02 0.000150087\n",
+      "7.087296558990e+00 2.10417 50.9713 2.40935 38.2535 13 13 14 8 0.02 4.24954e-05\n",
+      "7.007109286263e+00 2.15854 50.9713 2.28672 38.2535 13 13 14 8 0.02 2.9863e-05\n",
+      "5.653200958306e+00 2.21878 50.9713 2.0587 38.2535 14 14 13 8 0.02 2.41295e-05\n",
+      "5.733794947644e+00 2.21892 50.9713 1.99255 38.2535 14 14 13 8 0.02 2.07011e-05\n",
+      "3.513216011269e+00 2.76647 50.9713 0 50.9713 14 7 15 15 0.02 0.000150087\n",
+      "4.750574783854e+00 2.27442 50.9713 0 50.9713 14 8 15 15 0.02 4.24954e-05\n",
+      "7.278384712062e+00 1.29678 50.9713 2.09216 50.9713 13 8 13 13 0.02 2.9863e-05\n",
+      "4.765996194699e+00 2.20787 50.9713 2.20787 50.9713 14 8 14 8 0.02 2.07011e-05\n",
+      "4.765535914728e+00 2.21331 50.9713 2.21331 50.9713 14 8 14 8 0.02 2.41295e-05\n",
+      "3.104706358826e+00 3.17639 150 0 0.1 14 7 15 15 0.02 9.32641e-06\n",
+      "3.069363482023e+00 3.27572 150 0 0.1 14 7 15 15 0.02 9.32641e-06\n",
+      "3.047074050271e+00 3.3836 150 0 37.575 14 7 15 15 0.02 3.68933e-05\n",
+      "5.974759306305e+00 3.23604 150 2.53922 37.575 14 14 14 7 0.02 1.04459e-05\n",
+      "6.074084349384e+00 3.30145 150 2.13876 37.575 14 14 13 8 0.02 7.34071e-06\n",
+      "5.733865371895e+00 3.29994 150 2.00498 37.575 14 14 13 8 0.02 5.93135e-06\n",
+      "3.027099358410e+00 3.53631 150 0 75.05 14 7 15 15 0.02 3.68933e-05\n",
+      "5.807147339697e+00 3.30197 150 1.9791 37.575 14 14 13 8 0.02 5.08861e-06\n",
+      "4.862942347290e+00 3.25294 150 2.97823 75.05 14 14 14 7 0.02 1.04459e-05\n",
+      "4.556479830908e+00 3.29942 150 2.73221 75.05 14 14 14 7 0.02 7.34071e-06\n",
+      "3.853070305680e+00 3.29977 150 2.62486 75.05 14 14 14 7 0.02 5.93135e-06\n",
+      "3.881529045940e+00 3.30149 150 2.55924 75.05 14 14 14 7 0.02 5.08861e-06\n",
+      "3.015033359333e+00 3.64419 150 0 112.525 14 7 15 15 0.02 3.68933e-05\n",
+      "4.126828648362e+00 3.32047 150 0 112.525 14 14 15 3 0.02 1.04459e-05\n",
+      "3.990017992944e+00 3.3032 150 2.94027 112.525 14 14 14 7 0.02 7.34071e-06\n",
+      "3.206771867883e+00 3.07671 150 3.11282 112.525 14 14 14 7 0.02 5.93135e-06\n",
+      "3.006827156705e+00 3.72638 150 0 150 14 7 15 15 0.02 3.68933e-05\n",
+      "3.218786094847e+00 3.30337 150 3.01344 112.525 14 14 14 7 0.02 5.08861e-06\n",
+      "4.527722847382e+00 1.42238 150 0 150 13 5 15 15 0.02 1.04459e-05\n",
+      "3.069567332611e+00 3.27804 150 3.27804 150 14 7 14 7 0.02 5.93135e-06\n",
+      "5.726405299909e+00 1.29746 150 3.22759 150 13 8 14 14 0.02 7.34071e-06\n",
+      "3.069626478211e+00 3.27565 150 3.27565 150 14 7 14 7 0.02 5.08861e-06\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "import os\n",
+    "\n",
+    "from binarycpython.utils.grid import Population\n",
+    "from binarycpython.utils.custom_logging_functions import temp_dir\n",
+    "\n",
+    "def parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parsing function\n",
+    "    \"\"\"\n",
+    "    \n",
+    "    # extract info from the population instance\n",
+    "\n",
+    "    # Get some information from the\n",
+    "    data_dir = self.custom_options[\"data_dir\"]\n",
+    "    base_filename = self.custom_options[\"base_filename\"]\n",
+    "\n",
+    "    # Check directory, make if necessary\n",
+    "    os.makedirs(data_dir, exist_ok=True)\n",
+    "\n",
+    "    #\n",
+    "    seperator = \" \"\n",
+    "\n",
+    "    # Create filename\n",
+    "    outfilename = os.path.join(data_dir, base_filename)\n",
+    "\n",
+    "    # The header columns matching this \n",
+    "    parameters = [\n",
+    "        \"time\", \n",
+    "        \"mass_1\", \"zams_mass_1\", \"mass_2\", \"zams_mass_2\",\n",
+    "        \"stellar_type_1\", \"prev_stellar_type_1\", \"stellar_type_2\", \"prev_stellar_type_2\", \n",
+    "        \"metallicity\", \"probability\"\n",
+    "    ]\n",
+    "    \n",
+    "    # Go over the output.\n",
+    "    for el in output.splitlines():\n",
+    "        headerline = el.split()[0]\n",
+    "\n",
+    "        # CHeck the header and act accordingly\n",
+    "        if headerline == \"EXAMPLE_DCO\":\n",
+    "            values = el.split()[1:]\n",
+    "\n",
+    "            if not len(parameters) == len(values):\n",
+    "                print(\"Amount of column names isnt equal to amount of columns\")\n",
+    "                raise ValueError\n",
+    "\n",
+    "            if not os.path.exists(outfilename):\n",
+    "                with open(outfilename, \"w\") as f:\n",
+    "                    f.write(seperator.join(parameters) + \"\\n\")\n",
+    "\n",
+    "            with open(outfilename, \"a\") as f:\n",
+    "                f.write(seperator.join(values) + \"\\n\")\n",
+    "\n",
+    "\n",
+    "# Create population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# If you want verbosity, set this before other things\n",
+    "example_pop.set(verbosity=0)\n",
+    "\n",
+    "# Setting values can be done via .set(<parameter_name>=<value>)\n",
+    "example_pop.set(\n",
+    "    # binary_c physics options\n",
+    "    M_1=10,  # bse_options\n",
+    "    separation=0,  # bse_options\n",
+    "    orbital_period=45000000080,  # bse_options\n",
+    "    max_evolution_time=15000,  # bse_options\n",
+    "    eccentricity=0.02,  # bse_options\n",
+    "    \n",
+    "    # grid_options\n",
+    "    amt_cores=2,  # grid_options\n",
+    "\n",
+    "    # Custom options: the data directory and the output filename\n",
+    "    data_dir=os.path.join(\n",
+    "        temp_dir(), \"example_python_population_result\"\n",
+    "    ),  # custom_options\n",
+    "    base_filename=\"example_pop.dat\",  # custom_options\n",
+    ")\n",
+    "\n",
+    "# Creating a parsing function\n",
+    "example_pop.set(\n",
+    "    parse_function=parse_function,  # Setting the parse function thats used in the evolve_population\n",
+    ")\n",
+    "\n",
+    "### Custom logging\n",
+    "# Log the moment when the star turns into neutron\n",
+    "example_pop.set(\n",
+    "    C_logging_code=\"\"\"\n",
+    "// logger to find gravitational wave progenitors\n",
+    "if(stardata->star[0].stellar_type>=NS && stardata->star[1].stellar_type>=NS)\n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"EXAMPLE_DCO %30.12e \" // 1\n",
+    "            \"%g %g %g %g \" // 2-5\n",
+    "            \"%d %d %d %d \" // 6-9\n",
+    "            \"%g %g\\\\n\", // 10-11\n",
+    "\n",
+    "            stardata->model.time, // 1\n",
+    "\n",
+    "            stardata->star[0].mass, //2\n",
+    "            stardata->common.zero_age.mass[0], //3\n",
+    "            stardata->star[1].mass, //4\n",
+    "            stardata->common.zero_age.mass[1], //5\n",
+    "\n",
+    "            stardata->star[0].stellar_type, //6\n",
+    "            stardata->previous_stardata->star[0].stellar_type, //7\n",
+    "            stardata->star[1].stellar_type, //8\n",
+    "            stardata->previous_stardata->star[1].stellar_type, //9\n",
+    "\n",
+    "            // model stuff\n",
+    "            stardata->common.metallicity, //10\n",
+    "            stardata->model.probability //11\n",
+    "        );\n",
+    "    }\n",
+    "    /* Kill the simulation to safe time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "}\n",
+    "\"\"\"\n",
+    ")\n",
+    "\n",
+    "# Add grid variables\n",
+    "resolution = {\"M_1\": 5, \"q\": 5, \"per\": 5}\n",
+    "\n",
+    "# Mass\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"lnm1\",\n",
+    "    longname=\"Primary mass\",\n",
+    "    valuerange=[2, 150],\n",
+    "    resolution=\"{}\".format(resolution[\"M_1\"]),\n",
+    "    spacingfunc=\"const(math.log(2), math.log(150), {})\".format(resolution[\"M_1\"]),\n",
+    "    precode=\"M_1=math.exp(lnm1)\",\n",
+    "    probdist=\"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+    "    dphasevol=\"dlnm1\",\n",
+    "    parameter_name=\"M_1\",\n",
+    "    condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    ")\n",
+    "\n",
+    "# Mass ratio\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"q\",\n",
+    "    longname=\"Mass ratio\",\n",
+    "    valuerange=[\"0.1/M_1\", 1],\n",
+    "    resolution=\"{}\".format(resolution['q']),\n",
+    "    spacingfunc=\"const(0.1/M_1, 1, {})\".format(resolution['q']),\n",
+    "    probdist=\"flatsections(q, [{'min': 0.1/M_1, 'max': 1.0, 'height': 1}])\",\n",
+    "    dphasevol=\"dq\",\n",
+    "    precode=\"M_2 = q * M_1\",\n",
+    "    parameter_name=\"M_2\",\n",
+    "    condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    ")\n",
+    "\n",
+    "#\n",
+    "example_pop.add_grid_variable(\n",
+    "   name=\"log10per\", # in days\n",
+    "   longname=\"log10(Orbital_Period)\",\n",
+    "   valuerange=[0.15, 5.5],\n",
+    "   resolution=\"{}\".format(resolution[\"per\"]),\n",
+    "   spacingfunc=\"const(0.15, 5.5, {})\".format(resolution[\"per\"]),\n",
+    "   precode=\"\"\"orbital_period = 10** log10per\n",
+    "sep = calc_sep_from_period(M_1, M_2, orbital_period)\n",
+    "sep_min = calc_sep_from_period(M_1, M_2, 10**0.15)\n",
+    "sep_max = calc_sep_from_period(M_1, M_2, 10**5.5)\"\"\",\n",
+    "   probdist=\"sana12(M_1, M_2, sep, orbital_period, sep_min, sep_max, math.log10(10**0.15), math.log10(10**5.5), -0.55)\",\n",
+    "   parameter_name=\"orbital_period\",\n",
+    "   dphasevol=\"dlog10per\",\n",
+    ")\n",
+    "\n",
+    "# Exporting of all the settings can be done with .export_all_info()\n",
+    "example_pop.export_all_info()\n",
+    "\n",
+    "# remove the result file if it exists\n",
+    "if os.path.isfile(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\")):\n",
+    "    os.remove(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"))\n",
+    "\n",
+    "# Evolve the population\n",
+    "example_pop.evolve()\n",
+    "\n",
+    "# \n",
+    "with open(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"), 'r') as f:\n",
+    "    output = f.read()\n",
+    "print(\"\\n\")\n",
+    "print(output)"
+   ]
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/build/doctrees/notebook_api_functionality.doctree b/docs/build/doctrees/notebook_api_functionality.doctree
new file mode 100644
index 0000000000000000000000000000000000000000..d13dc561967683b55c3d7d9fa7e91bc39cca513f
Binary files /dev/null and b/docs/build/doctrees/notebook_api_functionality.doctree differ
diff --git a/docs/build/doctrees/notebook_custom_logging.doctree b/docs/build/doctrees/notebook_custom_logging.doctree
new file mode 100644
index 0000000000000000000000000000000000000000..0897e2ff37eec933d0519126e6a06dd587d9bdee
Binary files /dev/null and b/docs/build/doctrees/notebook_custom_logging.doctree differ
diff --git a/docs/build/doctrees/notebook_extra_features.doctree b/docs/build/doctrees/notebook_extra_features.doctree
new file mode 100644
index 0000000000000000000000000000000000000000..f0032b9960a7cf4b362985aa0456b119598a5c5e
Binary files /dev/null and b/docs/build/doctrees/notebook_extra_features.doctree differ
diff --git a/docs/build/doctrees/notebook_individual_systems.doctree b/docs/build/doctrees/notebook_individual_systems.doctree
new file mode 100644
index 0000000000000000000000000000000000000000..9d602efb727073bda11972d674aef97623b4bce7
Binary files /dev/null and b/docs/build/doctrees/notebook_individual_systems.doctree differ
diff --git a/docs/build/doctrees/notebook_population.doctree b/docs/build/doctrees/notebook_population.doctree
new file mode 100644
index 0000000000000000000000000000000000000000..2fe6b3d2cc9149c8f3a8350e8ae7e16a7bbf1060
Binary files /dev/null and b/docs/build/doctrees/notebook_population.doctree differ
diff --git a/docs/build/doctrees/plot_functions.doctree b/docs/build/doctrees/plot_functions.doctree
index 57328fd02f2ddd260053baa71eeb415f969322ce..f0affdfdc59e0690f2070e069fceb200b846eece 100644
Binary files a/docs/build/doctrees/plot_functions.doctree and b/docs/build/doctrees/plot_functions.doctree differ
diff --git a/docs/build/doctrees/population_example.doctree b/docs/build/doctrees/population_example.doctree
deleted file mode 100644
index c2f09e4dafda3abec873ad81f29dd01e9f860e01..0000000000000000000000000000000000000000
Binary files a/docs/build/doctrees/population_example.doctree and /dev/null differ
diff --git a/docs/build/doctrees/readme_link.doctree b/docs/build/doctrees/readme_link.doctree
index 993113cf4c67cba24500d959f451f520e97aa898..e9622f33a0658d2e097976d6d9c3fe3e5368c872 100644
Binary files a/docs/build/doctrees/readme_link.doctree and b/docs/build/doctrees/readme_link.doctree differ
diff --git a/docs/build/doctrees/run_system_wrapper.doctree b/docs/build/doctrees/run_system_wrapper.doctree
index bac76d0617cd57991a8e6869b0a4eaa34d091b4f..a6ea2f2c6c055369a77d782c380d77e53867454b 100644
Binary files a/docs/build/doctrees/run_system_wrapper.doctree and b/docs/build/doctrees/run_system_wrapper.doctree differ
diff --git a/docs/build/doctrees/spacing_functions.doctree b/docs/build/doctrees/spacing_functions.doctree
index 9cd4254603ca98ef74088656007aba83ddb64a59..70fd3a19e4682e01551414730b3227beb3555677 100644
Binary files a/docs/build/doctrees/spacing_functions.doctree and b/docs/build/doctrees/spacing_functions.doctree differ
diff --git a/docs/build/doctrees/stellar_types.doctree b/docs/build/doctrees/stellar_types.doctree
index 7d2d7a826cf471cd425845584a5e1009ea3c449d..a6440d267a247c8761eeb2c0ac1ea6bc311b716f 100644
Binary files a/docs/build/doctrees/stellar_types.doctree and b/docs/build/doctrees/stellar_types.doctree differ
diff --git a/docs/build/doctrees/useful_funcs.doctree b/docs/build/doctrees/useful_funcs.doctree
index 11570d5e27fab4d435fd51ab204d43636c5ed14d..1788c284e901d0fa9672d2860baaeab237464613 100644
Binary files a/docs/build/doctrees/useful_funcs.doctree and b/docs/build/doctrees/useful_funcs.doctree differ
diff --git a/docs/build/html/.buildinfo b/docs/build/html/.buildinfo
index 0fef865eb8bf85eda5e675e928067129120fc8c0..55a8b12a7eb43bc74f8800b104d95cd1b1c785b6 100644
--- a/docs/build/html/.buildinfo
+++ b/docs/build/html/.buildinfo
@@ -1,4 +1,4 @@
 # Sphinx build info version 1
 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: f4e8f1e1d66809b0bdafd78f415a24e8
+config: 44b2282a912f792069bea03167435e80
 tags: 645f666f9bcd5a90fca523b33c5a78b7
diff --git a/docs/build/html/_modules/binarycpython/utils/custom_logging_functions.html b/docs/build/html/_modules/binarycpython/utils/custom_logging_functions.html
index e0517fb0bf16a8772b6aa7dc20fe2d209cbdce39..6178bd94039490c5a55a10a5a7c9e087ecef43ea 100644
--- a/docs/build/html/_modules/binarycpython/utils/custom_logging_functions.html
+++ b/docs/build/html/_modules/binarycpython/utils/custom_logging_functions.html
@@ -30,6 +30,9 @@
         <script src="../../../_static/underscore.js"></script>
         <script src="../../../_static/doctools.js"></script>
         <script src="../../../_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="../../../_static/js/theme.js"></script>
 
@@ -84,7 +87,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../readme_link.html">Python module for binary_c</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../modules.html">Binarycpython code</a></li>
-<li class="toctree-l1"><a class="reference internal" href="../../../examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -168,13 +171,13 @@
 <span class="kn">from</span> <span class="nn">binarycpython.utils.functions</span> <span class="kn">import</span> <span class="n">temp_dir</span><span class="p">,</span> <span class="n">remove_file</span><span class="p">,</span> <span class="n">verbose_print</span>
 
 
-<div class="viewcode-block" id="autogen_C_logging_code"><a class="viewcode-back" href="../../../custom_logging_functions.html#binarycpython.utils.custom_logging_functions.autogen_C_logging_code">[docs]</a><span class="k">def</span> <span class="nf">autogen_C_logging_code</span><span class="p">(</span><span class="n">logging_dict</span><span class="p">:</span> <span class="nb">dict</span><span class="p">,</span> <span class="n">verbose</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]:</span>
+<div class="viewcode-block" id="autogen_C_logging_code"><a class="viewcode-back" href="../../../custom_logging_functions.html#binarycpython.utils.custom_logging_functions.autogen_C_logging_code">[docs]</a><span class="k">def</span> <span class="nf">autogen_C_logging_code</span><span class="p">(</span><span class="n">logging_dict</span><span class="p">:</span> <span class="nb">dict</span><span class="p">,</span> <span class="n">verbosity</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]:</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Function that autogenerates PRINTF statements for binaryc.</span>
+<span class="sd">    Function that auto-generates PRINTF statements for binaryc.</span>
 <span class="sd">    Input is a dictionary where the key is the header of that logging line</span>
 <span class="sd">    and items which are lists of parameters that will be put in that logging line</span>
 
-<span class="sd">    The list elements are all appended to &#39;stardata-&gt;&#39; in the autogenerated code.</span>
+<span class="sd">    The list elements are all appended to &#39;stardata-&gt;&#39; in the auto-generated code.</span>
 
 <span class="sd">    Example:</span>
 <span class="sd">        Input dictionary should look like this::</span>
@@ -190,7 +193,7 @@
 
 <span class="sd">    Args:</span>
 <span class="sd">        logging_dict: Dictionary containing lists of parameters that binary_c has to output. The keys are used by binary_c as start of the sentence.</span>
-<span class="sd">        verbose: Level of verbosity. Defaults to zero if not set explicilty.</span>
+<span class="sd">        verbose: Level of verbosity. Defaults to zero if not set explicitly.</span>
 
 <span class="sd">    Returns:</span>
 <span class="sd">        string containing C printf statement built to output the parameters given as input.</span>
@@ -205,12 +208,13 @@
 
     <span class="c1"># Loop over dict keys</span>
     <span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">logging_dict</span><span class="p">:</span>
-        <span class="k">if</span> <span class="n">verbose</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
-            <span class="nb">print</span><span class="p">(</span>
-                <span class="s2">&quot;Generating Print statement for custom logging code with </span><span class="si">{}</span><span class="s2"> as a header&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+        <span class="n">verbose_print</span><span class="p">(</span>
+            <span class="s2">&quot;Generating Print statement for custom logging code with </span><span class="si">{}</span><span class="s2"> as a header&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                     <span class="n">key</span>
-                <span class="p">)</span>
-            <span class="p">)</span>
+            <span class="p">),</span>
+            <span class="n">verbosity</span><span class="p">,</span>
+            <span class="mi">1</span><span class="p">,</span>
+        <span class="p">)</span>
         <span class="n">logging_dict_entry</span> <span class="o">=</span> <span class="n">logging_dict</span><span class="p">[</span><span class="n">key</span><span class="p">]</span>
 
         <span class="c1"># Check if item is of correct type:</span>
@@ -238,7 +242,7 @@
 
 
 <span class="c1">####################################################################################</span>
-<div class="viewcode-block" id="binary_c_log_code"><a class="viewcode-back" href="../../../custom_logging_functions.html#binarycpython.utils.custom_logging_functions.binary_c_log_code">[docs]</a><span class="k">def</span> <span class="nf">binary_c_log_code</span><span class="p">(</span><span class="n">code</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">verbose</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+<div class="viewcode-block" id="binary_c_log_code"><a class="viewcode-back" href="../../../custom_logging_functions.html#binarycpython.utils.custom_logging_functions.binary_c_log_code">[docs]</a><span class="k">def</span> <span class="nf">binary_c_log_code</span><span class="p">(</span><span class="n">code</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">verbosity</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
     <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">    Function to construct the code to construct the custom logging function</span>
 
@@ -269,16 +273,17 @@
 
 <span class="sd">    Args:</span>
 <span class="sd">        code: Exact c-statement to output information in binary_c. Can be wrapped in logical statements.</span>
-<span class="sd">        verbose: Level of verbosity. Defaults to zero if not set explicilty.</span>
+<span class="sd">        verbosity: Level of verbosity. Defaults to zero if not set explicitly.</span>
 
 <span class="sd">    Returns:</span>
 <span class="sd">        string containing the custom logging code. This includes all the includes and other definitions. This code will be used as the shared library</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
     <span class="n">verbose_print</span><span class="p">(</span>
-        <span class="s2">&quot;Creating the code for the shared library for the custom logging&quot;</span><span class="p">,</span> <span class="n">verbose</span><span class="p">,</span> <span class="mi">0</span>
+        <span class="s2">&quot;Creating the code for the shared library for the custom logging&quot;</span><span class="p">,</span>
+        <span class="n">verbosity</span><span class="p">,</span>
+        <span class="mi">1</span><span class="p">,</span>
     <span class="p">)</span>
-
     <span class="k">if</span> <span class="ow">not</span> <span class="s2">&quot;Printf&quot;</span> <span class="ow">in</span> <span class="n">code</span><span class="p">:</span>
         <span class="nb">print</span><span class="p">(</span>
             <span class="s2">&quot;Error: There has to be at least a printf statement in the provided code. Aborting&quot;</span>
@@ -313,14 +318,14 @@
     <span class="k">return</span> <span class="n">textwrap</span><span class="o">.</span><span class="n">dedent</span><span class="p">(</span><span class="n">custom_logging_function_string</span><span class="p">)</span></div>
 
 
-<div class="viewcode-block" id="binary_c_write_log_code"><a class="viewcode-back" href="../../../custom_logging_functions.html#binarycpython.utils.custom_logging_functions.binary_c_write_log_code">[docs]</a><span class="k">def</span> <span class="nf">binary_c_write_log_code</span><span class="p">(</span><span class="n">code</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">filename</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">verbose</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
+<div class="viewcode-block" id="binary_c_write_log_code"><a class="viewcode-back" href="../../../custom_logging_functions.html#binarycpython.utils.custom_logging_functions.binary_c_write_log_code">[docs]</a><span class="k">def</span> <span class="nf">binary_c_write_log_code</span><span class="p">(</span><span class="n">code</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">filename</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">verbosity</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
     <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">    Function to write the generated logging code to a file</span>
 
 <span class="sd">    Args:</span>
 <span class="sd">        code: string containing the custom logging code to write to a file.</span>
 <span class="sd">        filename: target filename.</span>
-<span class="sd">        verbose: Level of verbosity. Defaults to zero if not set explicilty.</span>
+<span class="sd">        verbosity: Level of verbosity. Defaults to zero if not set explicitly.</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
     <span class="c1"># TODO: change this. I don&#39;t like the cwd</span>
@@ -328,10 +333,12 @@
     <span class="n">filePath</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">cwd</span><span class="p">,</span> <span class="n">filename</span><span class="p">)</span>
 
     <span class="c1"># Remove if it exists</span>
-    <span class="n">remove_file</span><span class="p">(</span><span class="n">filePath</span><span class="p">,</span> <span class="n">verbose</span><span class="p">)</span>
-
-    <span class="k">if</span> <span class="n">verbose</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
-        <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Writing the custom logging code to </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">filePath</span><span class="p">))</span>
+    <span class="n">remove_file</span><span class="p">(</span><span class="n">filePath</span><span class="p">,</span> <span class="n">verbosity</span><span class="p">)</span>
+    <span class="n">verbose_print</span><span class="p">(</span>
+        <span class="s2">&quot;Writing the custom logging code to </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">filePath</span><span class="p">),</span>
+        <span class="n">verbosity</span><span class="p">,</span>
+        <span class="mi">1</span><span class="p">,</span>
+    <span class="p">)</span>
 
     <span class="c1"># Write again</span>
     <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">filePath</span><span class="p">,</span> <span class="s2">&quot;w&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">file</span><span class="p">:</span>
@@ -363,26 +370,28 @@
     <span class="k">return</span> <span class="n">res</span></div>
 
 
-<div class="viewcode-block" id="return_compilation_dict"><a class="viewcode-back" href="../../../custom_logging_functions.html#binarycpython.utils.custom_logging_functions.return_compilation_dict">[docs]</a><span class="k">def</span> <span class="nf">return_compilation_dict</span><span class="p">(</span><span class="n">verbose</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">dict</span><span class="p">:</span>
+<div class="viewcode-block" id="return_compilation_dict"><a class="viewcode-back" href="../../../custom_logging_functions.html#binarycpython.utils.custom_logging_functions.return_compilation_dict">[docs]</a><span class="k">def</span> <span class="nf">return_compilation_dict</span><span class="p">(</span><span class="n">verbosity</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">dict</span><span class="p">:</span>
     <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">    Function to build the compile command for the shared library</span>
 
-<span class="sd">    Inspired by binary_c_inline_config command in perl</span>
+<span class="sd">    Inspired by binary_c_inline_config command in Perl</span>
 
-<span class="sd">    TODO: this function still has some cleaning up to do wrt default values for the compile command</span>
+<span class="sd">    TODO: this function still has some cleaning up to do w.r.t. default values for the compile command</span>
 <span class="sd">    # https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/</span>
 
 <span class="sd">    Args:</span>
-<span class="sd">        verbose: Level of verbosity. Defaults to zero if not set explicilty.</span>
+<span class="sd">        verbosity: Level of verbosity. Defaults to zero if not set explicitly.</span>
 
 <span class="sd">    Returns:</span>
 <span class="sd">        string containing the command to build the shared library</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
-    <span class="k">if</span> <span class="n">verbose</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
-        <span class="nb">print</span><span class="p">(</span>
-            <span class="s2">&quot;Calling the binary_c config code to get the info to build the shared library&quot;</span>
-        <span class="p">)</span>
+    <span class="n">verbose_print</span><span class="p">(</span>
+        <span class="s2">&quot;Calling the binary_c config code to get the info to build the shared library&quot;</span><span class="p">,</span>
+        <span class="n">verbosity</span><span class="p">,</span>
+        <span class="mi">1</span><span class="p">,</span>
+    <span class="p">)</span>
+
     <span class="c1"># use binary_c-config to get necessary flags</span>
     <span class="n">BINARY_C_DIR</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getenv</span><span class="p">(</span><span class="s2">&quot;BINARY_C&quot;</span><span class="p">)</span>
     <span class="k">if</span> <span class="n">BINARY_C_DIR</span><span class="p">:</span>
@@ -452,18 +461,20 @@
     <span class="p">]</span>
     <span class="n">libs</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="si">{}</span><span class="s2"> </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="s2">&quot; &quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">library_paths</span><span class="p">),</span> <span class="s2">&quot; &quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">non_library_paths</span><span class="p">))</span>
 
-    <span class="k">if</span> <span class="n">verbose</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
-        <span class="nb">print</span><span class="p">(</span>
-            <span class="s2">&quot;Got options to compile:</span><span class="se">\n\t</span><span class="s2">cc = </span><span class="si">{cc}</span><span class="se">\n\t</span><span class="s2">ccflags = </span><span class="si">{ccflags}</span><span class="se">\n\t</span><span class="s2">ld = </span><span class="si">{ld}</span><span class="se">\n\t</span><span class="s2">libs = </span><span class="si">{libs}</span><span class="se">\n\t</span><span class="s2">inc = </span><span class="si">{inc}</span><span class="se">\n\n</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+    <span class="c1">#</span>
+    <span class="n">verbose_print</span><span class="p">(</span>
+        <span class="s2">&quot;Got options to compile:</span><span class="se">\n\t</span><span class="s2">cc = </span><span class="si">{cc}</span><span class="se">\n\t</span><span class="s2">ccflags = </span><span class="si">{ccflags}</span><span class="se">\n\t</span><span class="s2">ld = </span><span class="si">{ld}</span><span class="se">\n\t</span><span class="s2">libs = </span><span class="si">{libs}</span><span class="se">\n\t</span><span class="s2">inc = </span><span class="si">{inc}</span><span class="se">\n\n</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                 <span class="n">cc</span><span class="o">=</span><span class="n">cc</span><span class="p">,</span> <span class="n">ccflags</span><span class="o">=</span><span class="n">ccflags</span><span class="p">,</span> <span class="n">ld</span><span class="o">=</span><span class="n">ld</span><span class="p">,</span> <span class="n">libs</span><span class="o">=</span><span class="n">libs</span><span class="p">,</span> <span class="n">inc</span><span class="o">=</span><span class="n">inc</span>
-            <span class="p">)</span>
-        <span class="p">)</span>
+        <span class="p">),</span>
+        <span class="n">verbosity</span><span class="p">,</span>
+        <span class="mi">1</span><span class="p">,</span>
+    <span class="p">)</span>
 
     <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;cc&quot;</span><span class="p">:</span> <span class="n">cc</span><span class="p">,</span> <span class="s2">&quot;ld&quot;</span><span class="p">:</span> <span class="n">ld</span><span class="p">,</span> <span class="s2">&quot;ccflags&quot;</span><span class="p">:</span> <span class="n">ccflags</span><span class="p">,</span> <span class="s2">&quot;libs&quot;</span><span class="p">:</span> <span class="n">libs</span><span class="p">,</span> <span class="s2">&quot;inc&quot;</span><span class="p">:</span> <span class="n">inc</span><span class="p">}</span></div>
 
 
 <div class="viewcode-block" id="compile_shared_lib"><a class="viewcode-back" href="../../../custom_logging_functions.html#binarycpython.utils.custom_logging_functions.compile_shared_lib">[docs]</a><span class="k">def</span> <span class="nf">compile_shared_lib</span><span class="p">(</span>
-    <span class="n">code</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">sourcefile_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">outfile_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">verbose</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span>
+    <span class="n">code</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">sourcefile_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">outfile_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">verbosity</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span>
 <span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
     <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">    Function to write the custom logging code to a file and then compile it.</span>
@@ -475,17 +486,17 @@
 <span class="sd">        code: string containing the custom logging code</span>
 <span class="sd">        sourcefile_name: name of the file that will contain the code</span>
 <span class="sd">        outfile_name: name of the file that will be the shared library</span>
-<span class="sd">        verbose: Level of verbosity. Defaults to zero if not set explicilty.</span>
+<span class="sd">        verbosity: Level of verbosity. Defaults to zero if not set explicitly.</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
     <span class="c1"># Write code to file</span>
-    <span class="n">binary_c_write_log_code</span><span class="p">(</span><span class="n">code</span><span class="p">,</span> <span class="n">sourcefile_name</span><span class="p">,</span> <span class="n">verbose</span><span class="p">)</span>
+    <span class="n">binary_c_write_log_code</span><span class="p">(</span><span class="n">code</span><span class="p">,</span> <span class="n">sourcefile_name</span><span class="p">,</span> <span class="n">verbosity</span><span class="p">)</span>
 
     <span class="c1"># Remove the library if present:</span>
-    <span class="n">remove_file</span><span class="p">(</span><span class="n">outfile_name</span><span class="p">,</span> <span class="n">verbose</span><span class="p">)</span>
+    <span class="n">remove_file</span><span class="p">(</span><span class="n">outfile_name</span><span class="p">,</span> <span class="n">verbosity</span><span class="p">)</span>
 
     <span class="c1"># create compilation command</span>
-    <span class="n">compilation_dict</span> <span class="o">=</span> <span class="n">return_compilation_dict</span><span class="p">(</span><span class="n">verbose</span><span class="p">)</span>
+    <span class="n">compilation_dict</span> <span class="o">=</span> <span class="n">return_compilation_dict</span><span class="p">(</span><span class="n">verbosity</span><span class="p">)</span>
 
     <span class="c1"># Construct full command</span>
     <span class="n">command</span> <span class="o">=</span> <span class="p">(</span>
@@ -499,30 +510,36 @@
         <span class="p">)</span>
     <span class="p">)</span>
 
-    <span class="c1"># remove extra whitespaces:</span>
+    <span class="c1"># remove extra white spaces:</span>
     <span class="n">command</span> <span class="o">=</span> <span class="s2">&quot; &quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">command</span><span class="o">.</span><span class="n">split</span><span class="p">())</span>
 
     <span class="c1"># Execute compilation and create the library</span>
-    <span class="k">if</span> <span class="n">verbose</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
-        <span class="nb">print</span><span class="p">(</span>
-            <span class="s2">&quot;Building shared library for custom logging with (binary_c.h) on </span><span class="si">{}</span><span class="se">\n</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+    <span class="n">verbose_print</span><span class="p">(</span>
+        <span class="s2">&quot;Building shared library for custom logging with (binary_c.h) on </span><span class="si">{}</span><span class="se">\n</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                 <span class="n">socket</span><span class="o">.</span><span class="n">gethostname</span><span class="p">()</span>
-            <span class="p">)</span>
-        <span class="p">)</span>
-        <span class="nb">print</span><span class="p">(</span>
-            <span class="s2">&quot;Executing following command to compile the shared library:</span><span class="se">\n</span><span class="si">{command}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
-                <span class="n">command</span><span class="o">=</span><span class="n">command</span>
-            <span class="p">)</span>
-        <span class="p">)</span>
-    <span class="n">res</span> <span class="o">=</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">check_output</span><span class="p">(</span><span class="s2">&quot;</span><span class="si">{command}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">command</span><span class="o">=</span><span class="n">command</span><span class="p">),</span> <span class="n">shell</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
-    <span class="c1"># print(res)</span>
-    <span class="k">if</span> <span class="n">verbose</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
-        <span class="k">if</span> <span class="n">res</span><span class="p">:</span>
-            <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Output of compilation command:</span><span class="se">\n</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">res</span><span class="p">))</span></div>
+        <span class="p">),</span>
+        <span class="n">verbosity</span><span class="p">,</span>
+        <span class="mi">1</span><span class="p">,</span>
+    <span class="p">)</span>
+    <span class="n">verbose_print</span><span class="p">(</span>
+        <span class="s2">&quot;Executing following command to compile the shared library:</span><span class="se">\n</span><span class="si">{command}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+            <span class="n">command</span><span class="o">=</span><span class="n">command</span>
+        <span class="p">),</span>
+        <span class="n">verbosity</span><span class="p">,</span>
+        <span class="mi">1</span><span class="p">,</span>
+    <span class="p">)</span>
 
+    <span class="c1">#</span>
+    <span class="n">res</span> <span class="o">=</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">check_output</span><span class="p">(</span><span class="s2">&quot;</span><span class="si">{command}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">command</span><span class="o">=</span><span class="n">command</span><span class="p">),</span> <span class="n">shell</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+    <span class="k">if</span> <span class="n">res</span><span class="p">:</span>
+        <span class="n">verbose_print</span><span class="p">(</span>
+            <span class="s2">&quot;Output of compilation command:</span><span class="se">\n</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">res</span><span class="p">),</span>
+            <span class="n">verbosity</span><span class="p">,</span>
+            <span class="mi">1</span><span class="p">,</span>
+        <span class="p">)</span></div>
 
 <div class="viewcode-block" id="create_and_load_logging_function"><a class="viewcode-back" href="../../../custom_logging_functions.html#binarycpython.utils.custom_logging_functions.create_and_load_logging_function">[docs]</a><span class="k">def</span> <span class="nf">create_and_load_logging_function</span><span class="p">(</span>
-    <span class="n">custom_logging_code</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">verbose</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">custom_tmp_dir</span><span class="o">=</span><span class="kc">None</span>
+    <span class="n">custom_logging_code</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">verbosity</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">custom_tmp_dir</span><span class="o">=</span><span class="kc">None</span>
 <span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Tuple</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">str</span><span class="p">]:</span>
     <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">    Function to automatically compile the shared library with the given</span>
@@ -533,10 +550,10 @@
 
 <span class="sd">    Args:</span>
 <span class="sd">        custom_logging_code: string containing the custom logging code</span>
-<span class="sd">        verbose: Level of verbosity. Defaults to zero if not set explicilty.</span>
+<span class="sd">        verbosity: Level of verbosity. Defaults to zero if not set explicitly.</span>
 
 <span class="sd">    Returns:</span>
-<span class="sd">        memory adress of the custom logging function in a int type.</span>
+<span class="sd">        memory address of the custom logging function in a capsule.</span>
 <span class="sd">    &quot;&quot;&quot;</span>
     <span class="c1">#</span>
 
@@ -547,7 +564,7 @@
 
     <span class="n">custom_logging_dir</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">tmp_dir</span><span class="p">,</span> <span class="s2">&quot;custom_logging&quot;</span><span class="p">)</span>
 
-    <span class="c1"># Create the subdir for the custom_logging code</span>
+    <span class="c1"># Create the sub dir for the custom_logging code</span>
     <span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="n">custom_logging_dir</span><span class="p">,</span> <span class="n">exist_ok</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
 
     <span class="c1">#</span>
@@ -559,11 +576,14 @@
         <span class="n">custom_logging_code</span><span class="p">,</span>
         <span class="n">sourcefile_name</span><span class="o">=</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">custom_logging_dir</span><span class="p">,</span> <span class="s2">&quot;custom_logging.c&quot;</span><span class="p">),</span>
         <span class="n">outfile_name</span><span class="o">=</span><span class="n">library_name</span><span class="p">,</span>
-        <span class="n">verbose</span><span class="o">=</span><span class="n">verbose</span><span class="p">,</span>
+        <span class="n">verbosity</span><span class="o">=</span><span class="n">verbosity</span><span class="p">,</span>
     <span class="p">)</span>
 
-    <span class="k">if</span> <span class="n">verbose</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
-        <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;loading shared library for custom logging&quot;</span><span class="p">)</span>
+    <span class="n">verbose_print</span><span class="p">(</span>
+        <span class="s2">&quot;loading shared library for custom logging&quot;</span><span class="p">,</span>
+        <span class="n">verbosity</span><span class="p">,</span>
+        <span class="mi">1</span><span class="p">,</span>
+    <span class="p">)</span>
 
     <span class="c1"># Loading library</span>
     <span class="n">_</span> <span class="o">=</span> <span class="n">ctypes</span><span class="o">.</span><span class="n">CDLL</span><span class="p">(</span><span class="s2">&quot;libgslcblas.so&quot;</span><span class="p">,</span> <span class="n">mode</span><span class="o">=</span><span class="n">ctypes</span><span class="o">.</span><span class="n">RTLD_GLOBAL</span><span class="p">)</span>
@@ -588,13 +608,14 @@
         <span class="p">)</span>
         <span class="k">raise</span> <span class="ne">ValueError</span>
 
-    <span class="k">if</span> <span class="n">verbose</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
-        <span class="nb">print</span><span class="p">(</span>
-            <span class="s2">&quot;loaded shared library for custom logging. </span><span class="se">\</span>
-<span class="s2">            custom_output_function is loaded in memory at </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
-                <span class="n">func_memaddr</span>
-            <span class="p">)</span>
-        <span class="p">)</span>
+    <span class="n">verbose_print</span><span class="p">(</span>
+        <span class="s2">&quot;loaded shared library for custom logging. </span><span class="se">\</span>
+<span class="s2">        custom_output_function is loaded in memory at </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+            <span class="n">func_memaddr</span>
+        <span class="p">),</span>
+        <span class="n">verbosity</span><span class="p">,</span>
+        <span class="mi">1</span><span class="p">,</span>
+    <span class="p">)</span>
 
     <span class="k">return</span> <span class="n">func_memaddr</span><span class="p">,</span> <span class="n">library_name</span></div>
 </pre></div>
@@ -623,9 +644,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/_modules/binarycpython/utils/distribution_functions.html b/docs/build/html/_modules/binarycpython/utils/distribution_functions.html
index 51cdc6db376c1e597944f242a22705e7121288de..851e9eb7c21995973e2e0b7e7a7523abc0448676 100644
--- a/docs/build/html/_modules/binarycpython/utils/distribution_functions.html
+++ b/docs/build/html/_modules/binarycpython/utils/distribution_functions.html
@@ -30,6 +30,9 @@
         <script src="../../../_static/underscore.js"></script>
         <script src="../../../_static/doctools.js"></script>
         <script src="../../../_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="../../../_static/js/theme.js"></script>
 
@@ -84,7 +87,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../readme_link.html">Python module for binary_c</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../modules.html">Binarycpython code</a></li>
-<li class="toctree-l1"><a class="reference internal" href="../../../examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -167,12 +170,12 @@
 
 <span class="sd">Tasks:</span>
 <span class="sd">    - TODO: make some things globally present? rob does this in his module..i guess it saves</span>
-<span class="sd">        calculations but not sure if im gonna do that now</span>
+<span class="sd">        calculations but not sure if I&#39;m gonna do that now</span>
 <span class="sd">    - TODO: add eccentricity distribution: thermal</span>
 <span class="sd">    - TODO: Add SFH distributions depending on redshift</span>
 <span class="sd">    - TODO: Add metallicity distributions depending on redshift</span>
 <span class="sd">    - TODO: Add initial rotational velocity distributions</span>
-<span class="sd">    - TODO: make an n-part powerlaw thats general enough to fix the three part and the 4 part</span>
+<span class="sd">    - TODO: make an n-part power law that&#39;s general enough to fix the three part and the 4 part</span>
 <span class="sd">&quot;&quot;&quot;</span>
 
 <span class="kn">import</span> <span class="nn">gc</span>
@@ -192,7 +195,7 @@
 
 <span class="c1">###</span>
 <span class="c1"># File containing probability distributions</span>
-<span class="c1"># Mostly copied from the perl modules</span>
+<span class="c1"># Mostly copied from the Perl modules</span>
 <span class="n">LOG_LN_CONVERTER</span> <span class="o">=</span> <span class="mf">1.0</span> <span class="o">/</span> <span class="n">math</span><span class="o">.</span><span class="n">log</span><span class="p">(</span><span class="mf">10.0</span><span class="p">)</span>
 <span class="n">distribution_constants</span> <span class="o">=</span> <span class="p">{}</span>  <span class="c1"># To store the constants in</span>
 
@@ -201,10 +204,10 @@
     <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">    Function that makes sure that the global dict is prepared to have a value set there.</span>
 <span class="sd">    This dictionary will store values and factors for the distribution functions,</span>
-<span class="sd">    so that they dont have to be calculated each time.</span>
+<span class="sd">    so that they don&#39;t have to be calculated each time.</span>
 
 <span class="sd">    Args:</span>
-<span class="sd">        global_dict: globablly acessible dictionary where factors are stored in</span>
+<span class="sd">        global_dict: globally accessible dictionary where factors are stored in</span>
 <span class="sd">        list_of_sub_keys: List of keys that must become be(come) present in the global_dict</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
@@ -295,17 +298,17 @@
     <span class="n">min_val</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">],</span> <span class="n">max_val</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">],</span> <span class="n">k</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">]</span>
 <span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">]:</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Function that returns the constant to normalise a powerlaw</span>
+<span class="sd">    Function that returns the constant to normalise a power law</span>
 
 <span class="sd">    TODO: what if k is -1?</span>
 
 <span class="sd">    Args:</span>
 <span class="sd">        min_val: lower bound of the range</span>
 <span class="sd">        max_val: upper bound of the range</span>
-<span class="sd">        k: powerlaw slope</span>
+<span class="sd">        k: power law slope</span>
 
 <span class="sd">    Returns:</span>
-<span class="sd">        constant to normalize the given powerlaw between the min_val and max_val range</span>
+<span class="sd">        constant to normalise the given power law between the min_val and max_val range</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
     <span class="n">k1</span> <span class="o">=</span> <span class="n">k</span> <span class="o">+</span> <span class="mf">1.0</span>
@@ -326,11 +329,11 @@
     <span class="n">x</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">],</span>
 <span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">]:</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Single powerlaw with index k at x from min to max</span>
+<span class="sd">    Single power law with index k at x from min to max</span>
 
 <span class="sd">    Args:</span>
-<span class="sd">        min_val: lower bound of the powerlaw</span>
-<span class="sd">        max_val: upper bound of the powerlaw</span>
+<span class="sd">        min_val: lower bound of the power law</span>
+<span class="sd">        max_val: upper bound of the power law</span>
 <span class="sd">        k: slope of the power law</span>
 <span class="sd">        x: position at which we want to evaluate</span>
 
@@ -349,7 +352,7 @@
 
     <span class="n">powerlaw_const</span> <span class="o">=</span> <span class="n">powerlaw_constant</span><span class="p">(</span><span class="n">min_val</span><span class="p">,</span> <span class="n">max_val</span><span class="p">,</span> <span class="n">k</span><span class="p">)</span>
 
-    <span class="c1"># powerlaw</span>
+    <span class="c1"># power law</span>
     <span class="n">prob</span> <span class="o">=</span> <span class="n">powerlaw_const</span> <span class="o">*</span> <span class="p">(</span><span class="n">x</span> <span class="o">**</span> <span class="n">k</span><span class="p">)</span>
     <span class="c1"># print(</span>
     <span class="c1">#     &quot;Power law from {} to {}: const = {}, y = {}&quot;.format(</span>
@@ -369,9 +372,9 @@
     <span class="n">p3</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">],</span>
 <span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">]:</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Function to calculate the constants for a three-part powerlaw</span>
+<span class="sd">    Function to calculate the constants for a three-part power law</span>
 
-<span class="sd">    TODO: use the powerlaw_constant function to calculate all these values</span>
+<span class="sd">    TODO: use the power law_constant function to calculate all these values</span>
 
 <span class="sd">    Args:</span>
 <span class="sd">        m0: lower bound mass</span>
@@ -442,7 +445,7 @@
     <span class="n">p3</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">],</span>
 <span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">]:</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Generalized three-part power law, usually used for mass distributions</span>
+<span class="sd">    Generalised three-part power law, usually used for mass distributions</span>
 
 <span class="sd">    Args:</span>
 <span class="sd">        m: mass at which we want to evaluate the distribution.</span>
@@ -486,19 +489,19 @@
     <span class="n">gmax</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">],</span>
 <span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">]:</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Function to calculate the normalisation constant for the gaussian</span>
+<span class="sd">    Function to calculate the normalisation constant for the Gaussian</span>
 
 <span class="sd">    Args:</span>
-<span class="sd">        mean: mean of the gaussian</span>
-<span class="sd">        sigma: standard deviation of the gaussian</span>
+<span class="sd">        mean: mean of the Gaussian</span>
+<span class="sd">        sigma: standard deviation of the Gaussian</span>
 <span class="sd">        gmin: lower bound of the range to calculate the probabilities in</span>
 <span class="sd">        gmax: upper bound of the range to calculate the probabilities in</span>
 
 <span class="sd">    Returns:</span>
-<span class="sd">        normalisation constant for the gaussian distribution(mean, sigma) between gmin and gmax</span>
+<span class="sd">        normalisation constant for the Gaussian distribution(mean, sigma) between gmin and gmax</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
-    <span class="c1"># First time; calculate multipllier for given mean and sigma</span>
+    <span class="c1"># First time; calculate multiplier for given mean and sigma</span>
     <span class="n">ptot</span> <span class="o">=</span> <span class="mi">0</span>
     <span class="n">resolution</span> <span class="o">=</span> <span class="mi">1000</span>
     <span class="n">d</span> <span class="o">=</span> <span class="p">(</span><span class="n">gmax</span> <span class="o">-</span> <span class="n">gmin</span><span class="p">)</span> <span class="o">/</span> <span class="n">resolution</span>
@@ -515,15 +518,15 @@
     <span class="n">x</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">],</span> <span class="n">mean</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">],</span> <span class="n">sigma</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">]</span>
 <span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">]:</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Function to evaluate a gaussian at a given point, but this time without any boundaries.</span>
+<span class="sd">    Function to evaluate a Gaussian at a given point, but this time without any boundaries.</span>
 
 <span class="sd">    Args:</span>
 <span class="sd">        x: location at which to evaluate the distribution</span>
-<span class="sd">        mean: mean of the gaussian</span>
-<span class="sd">        sigma: standard deviation of the gaussian</span>
+<span class="sd">        mean: mean of the Gaussian</span>
+<span class="sd">        sigma: standard deviation of the Gaussian</span>
 
 <span class="sd">    Returns:</span>
-<span class="sd">        value of the gaussian at x</span>
+<span class="sd">        value of the Gaussian at x</span>
 <span class="sd">    &quot;&quot;&quot;</span>
     <span class="n">gaussian_prefactor</span> <span class="o">=</span> <span class="mf">1.0</span> <span class="o">/</span> <span class="n">math</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="mf">2.0</span> <span class="o">*</span> <span class="n">math</span><span class="o">.</span><span class="n">pi</span><span class="p">)</span>
 
@@ -544,13 +547,13 @@
 
 <span class="sd">    Args:</span>
 <span class="sd">        x: location at which to evaluate the distribution</span>
-<span class="sd">        mean: mean of the gaussian</span>
-<span class="sd">        sigma: standard deviation of the gaussian</span>
+<span class="sd">        mean: mean of the Gaussian</span>
+<span class="sd">        sigma: standard deviation of the Gaussian</span>
 <span class="sd">        gmin: lower bound of the range to calculate the probabilities in</span>
 <span class="sd">        gmax: upper bound of the range to calculate the probabilities in</span>
 
 <span class="sd">    Returns:</span>
-<span class="sd">        &#39;probability&#39; of the gaussian distribution between the boundaries, evaluated at x</span>
+<span class="sd">        &#39;probability&#39; of the Gaussian distribution between the boundaries, evaluated at x</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
     <span class="c1"># # location (X value), mean and sigma, min and max range</span>
@@ -559,7 +562,7 @@
     <span class="k">if</span> <span class="p">(</span><span class="n">x</span> <span class="o">&lt;</span> <span class="n">gmin</span><span class="p">)</span> <span class="ow">or</span> <span class="p">(</span><span class="n">x</span> <span class="o">&gt;</span> <span class="n">gmax</span><span class="p">):</span>
         <span class="n">prob</span> <span class="o">=</span> <span class="mi">0</span>
     <span class="k">else</span><span class="p">:</span>
-        <span class="c1"># normalize over given range</span>
+        <span class="c1"># normalise over given range</span>
         <span class="c1"># TODO: add loading into global var</span>
         <span class="n">normalisation</span> <span class="o">=</span> <span class="n">gaussian_normalizing_const</span><span class="p">(</span><span class="n">mean</span><span class="p">,</span> <span class="n">sigma</span><span class="p">,</span> <span class="n">gmin</span><span class="p">,</span> <span class="n">gmax</span><span class="p">)</span>
         <span class="n">prob</span> <span class="o">=</span> <span class="n">gaussian_func</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">mean</span><span class="p">,</span> <span class="n">sigma</span><span class="p">)</span> <span class="o">/</span> <span class="n">normalisation</span>
@@ -574,7 +577,7 @@
 
 <div class="viewcode-block" id="Kroupa2001"><a class="viewcode-back" href="../../../distribution_functions.html#binarycpython.utils.distribution_functions.Kroupa2001">[docs]</a><span class="k">def</span> <span class="nf">Kroupa2001</span><span class="p">(</span><span class="n">m</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">],</span> <span class="n">newopts</span><span class="p">:</span> <span class="nb">dict</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">]:</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Probability distribution function for kroupa 2001 IMF, where the default values to the</span>
+<span class="sd">    Probability distribution function for Kroupa 2001 IMF, where the default values to the</span>
 <span class="sd">    three_part_powerlaw are: default = {&quot;m0&quot;: 0.1, &quot;m1&quot;: 0.5, &quot;m2&quot;: 1, &quot;mmax&quot;: 100, &quot;p1&quot;: -1.3, &quot;p2&quot;: -2.3,&quot;p3&quot;: -2.3}</span>
 
 <span class="sd">    Args:</span>
@@ -585,7 +588,7 @@
 <span class="sd">        &#39;probability&#39; of distribution function evaluated at m</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
-    <span class="c1"># Default params and override them</span>
+    <span class="c1"># Default parameters and override them</span>
     <span class="n">default</span> <span class="o">=</span> <span class="p">{</span>
         <span class="s2">&quot;m0&quot;</span><span class="p">:</span> <span class="mf">0.1</span><span class="p">,</span>
         <span class="s2">&quot;m1&quot;</span><span class="p">:</span> <span class="mf">0.5</span><span class="p">,</span>
@@ -690,7 +693,7 @@
 
 <div class="viewcode-block" id="imf_tinsley1980"><a class="viewcode-back" href="../../../distribution_functions.html#binarycpython.utils.distribution_functions.imf_tinsley1980">[docs]</a><span class="k">def</span> <span class="nf">imf_tinsley1980</span><span class="p">(</span><span class="n">m</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">]:</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Probability distribution function for tinsley 1980 IMF (defined up until 80Msol): three_part_powerlaw(m, 0.1, 2.0, 10.0, 80.0, -2.0, -2.3, -3.3)</span>
+<span class="sd">    Probability distribution function for Tinsley 1980 IMF (defined up until 80Msol): three_part_powerlaw(m, 0.1, 2.0, 10.0, 80.0, -2.0, -2.3, -3.3)</span>
 
 <span class="sd">    Args:</span>
 <span class="sd">        m: mass to evaluate the distribution at</span>
@@ -717,7 +720,7 @@
 
 <div class="viewcode-block" id="imf_scalo1998"><a class="viewcode-back" href="../../../distribution_functions.html#binarycpython.utils.distribution_functions.imf_scalo1998">[docs]</a><span class="k">def</span> <span class="nf">imf_scalo1998</span><span class="p">(</span><span class="n">m</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">]:</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    From scalo 1998</span>
+<span class="sd">    From Scalo 1998</span>
 
 <span class="sd">    Probability distribution function for Scalo 1998 IMF (defined up until 80Msol): three_part_powerlaw(m, 0.1, 1.0, 10.0, 80.0, -1.2, -2.7, -2.3)</span>
 
@@ -867,7 +870,7 @@
 <span class="sd">        amax: maximum separation of the distribution (upper bound of the range)</span>
 <span class="sd">        x0: log of minimum period of the distribution (lower bound of the range)</span>
 <span class="sd">        x1: log of maximum period of the distribution (upper bound of the range)</span>
-<span class="sd">        p: slope of the distributoon</span>
+<span class="sd">        p: slope of the distribution</span>
 
 <span class="sd">    Returns:</span>
 <span class="sd">        &#39;probability&#39; of orbital period P given the other parameters</span>
@@ -880,7 +883,7 @@
         <span class="n">p1</span> <span class="o">=</span> <span class="mf">1.0</span> <span class="o">+</span> <span class="n">p</span>
 
         <span class="c1"># For more details see the LyX document of binary_c for this distribution</span>
-        <span class="c1"># where the variables and normalizations are given</span>
+        <span class="c1"># where the variables and normalisations are given</span>
         <span class="c1"># we use the notation x=log(P), xmin=log(Pmin), x0=log(P0), ... to determine the</span>
         <span class="n">x</span> <span class="o">=</span> <span class="n">LOG_LN_CONVERTER</span> <span class="o">*</span> <span class="n">math</span><span class="o">.</span><span class="n">log</span><span class="p">(</span><span class="n">P</span><span class="p">)</span>
         <span class="n">xmin</span> <span class="o">=</span> <span class="n">LOG_LN_CONVERTER</span> <span class="o">*</span> <span class="n">math</span><span class="o">.</span><span class="n">log</span><span class="p">(</span><span class="n">calc_period_from_sep</span><span class="p">(</span><span class="n">M1</span><span class="p">,</span> <span class="n">M2</span><span class="p">,</span> <span class="n">amin</span><span class="p">))</span>
@@ -970,10 +973,10 @@
     <span class="c1"># save mass input and limit mass used (M1 from now on) to fitted range</span>
     <span class="n">Mwas</span> <span class="o">=</span> <span class="n">M1</span>
     <span class="n">M1</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="mf">1.15</span><span class="p">,</span> <span class="nb">min</span><span class="p">(</span><span class="mf">16.3</span><span class="p">,</span> <span class="n">M1</span><span class="p">))</span>
-    <span class="c1"># print(&quot;Izzard2012 called for M={} (trunc&#39;d to {}), P={}\n&quot;.format(Mwas, M1, P))</span>
+    <span class="c1"># print(&quot;Izzard2012 called for M={} (truncated to {}), P={}\n&quot;.format(Mwas, M1, P))</span>
 
     <span class="c1"># Calculate the normalisations</span>
-    <span class="c1"># need to normalize the distribution for this mass</span>
+    <span class="c1"># need to normalise the distribution for this mass</span>
     <span class="c1"># (and perhaps secondary mass)</span>
     <span class="n">prepare_dict</span><span class="p">(</span><span class="n">distribution_constants</span><span class="p">,</span> <span class="p">[</span><span class="s2">&quot;Izzard2012&quot;</span><span class="p">,</span> <span class="n">M1</span><span class="p">])</span>
     <span class="k">if</span> <span class="ow">not</span> <span class="n">distribution_constants</span><span class="p">[</span><span class="s2">&quot;Izzard2012&quot;</span><span class="p">][</span><span class="n">M1</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">log10Pmin</span><span class="p">):</span>
@@ -982,13 +985,13 @@
         <span class="p">]</span> <span class="o">=</span> <span class="mi">1</span>  <span class="c1"># To prevent this loop from going recursive</span>
         <span class="n">N</span> <span class="o">=</span> <span class="mf">200.0</span>  <span class="c1"># Resolution for normalisation. I hope 1000 is enough</span>
         <span class="n">dlP</span> <span class="o">=</span> <span class="p">(</span><span class="mf">10.0</span> <span class="o">-</span> <span class="n">log10Pmin</span><span class="p">)</span> <span class="o">/</span> <span class="n">N</span>
-        <span class="n">C</span> <span class="o">=</span> <span class="mi">0</span>  <span class="c1"># normalisation const.</span>
+        <span class="n">C</span> <span class="o">=</span> <span class="mi">0</span>  <span class="c1"># normalisation constant.</span>
         <span class="k">for</span> <span class="n">lP</span> <span class="ow">in</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="n">log10Pmin</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="n">dlP</span><span class="p">):</span>
             <span class="n">C</span> <span class="o">+=</span> <span class="n">dlP</span> <span class="o">*</span> <span class="n">Izzard2012_period_distribution</span><span class="p">(</span><span class="mi">10</span> <span class="o">**</span> <span class="n">lP</span><span class="p">,</span> <span class="n">M1</span><span class="p">,</span> <span class="n">log10Pmin</span><span class="p">)</span>
 
         <span class="n">distribution_constants</span><span class="p">[</span><span class="s2">&quot;Izzard2012&quot;</span><span class="p">][</span><span class="n">M1</span><span class="p">][</span><span class="n">log10Pmin</span><span class="p">]</span> <span class="o">=</span> <span class="mf">1.0</span> <span class="o">/</span> <span class="n">C</span>
     <span class="c1"># print(</span>
-    <span class="c1">#     &quot;Normalization constant for Izzard2012 M={} (log10Pmin={}) is\</span>
+    <span class="c1">#     &quot;Normalisation constant for Izzard2012 M={} (log10Pmin={}) is\</span>
     <span class="c1">#     {}\n&quot;.format(</span>
     <span class="c1">#         M1, log10Pmin, distribution_constants[&quot;Izzard2012&quot;][M1][log10Pmin]</span>
     <span class="c1">#     )</span>
@@ -1079,7 +1082,7 @@
 <span class="sd">        z: redshift</span>
 
 <span class="sd">    Returns:</span>
-<span class="sd">        Cosmic star formation rate in Solarmass year^-1 megaparsec^-3</span>
+<span class="sd">        Cosmic star formation rate in Solar mass year^-1 mega parsec^-3</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
     <span class="n">CSFH</span> <span class="o">=</span> <span class="mf">0.015</span> <span class="o">*</span> <span class="p">((</span><span class="mi">1</span> <span class="o">+</span> <span class="n">z</span><span class="p">)</span> <span class="o">**</span> <span class="mf">2.7</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="p">(((</span><span class="mi">1</span> <span class="o">+</span> <span class="n">z</span><span class="p">)</span> <span class="o">/</span> <span class="mf">2.9</span><span class="p">)</span> <span class="o">**</span> <span class="mf">5.6</span><span class="p">))</span>
@@ -1102,8 +1105,8 @@
 <span class="c1">#</span>
 <span class="c1"># TODO: Solve the memory issues that are present. </span>
 <span class="c1">#    Are the interpolators not cleaned? </span>
-<span class="c1"># TODO: Parallellize the setting up of the interpolators</span>
-<span class="c1"># TODO: Generalize the code such that we can input other/newer tables</span>
+<span class="c1"># TODO: Parallelize the setting up of the interpolators</span>
+<span class="c1"># TODO: Generalise the code such that we can input other/newer tables</span>
 
 <span class="c1">########################################################################</span>
 
@@ -1114,7 +1117,7 @@
 
 <div class="viewcode-block" id="poisson"><a class="viewcode-back" href="../../../distribution_functions.html#binarycpython.utils.distribution_functions.poisson">[docs]</a><span class="k">def</span> <span class="nf">poisson</span><span class="p">(</span><span class="n">lambda_val</span><span class="p">,</span> <span class="n">n</span><span class="p">,</span> <span class="n">nmax</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">verbosity</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Function that calculates the poisson value and normalizes</span>
+<span class="sd">    Function that calculates the Poisson value and normalises</span>
 <span class="sd">    TODO: improve the description</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
@@ -1136,7 +1139,7 @@
 
     <span class="c1"># Poisson distribution : note, n can be zero</span>
     <span class="c1">#</span>
-    <span class="c1"># nmax is the truncation : if set, we normalize</span>
+    <span class="c1"># nmax is the truncation : if set, we normalise</span>
     <span class="c1"># correctly.</span>
     <span class="n">p_val</span> <span class="o">=</span> <span class="n">_poisson</span><span class="p">(</span><span class="n">lambda_val</span><span class="p">,</span> <span class="n">n</span><span class="p">)</span>
 
@@ -1161,7 +1164,7 @@
 
 <span class="k">def</span> <span class="nf">_poisson</span><span class="p">(</span><span class="n">lambda_val</span><span class="p">,</span> <span class="n">n</span><span class="p">):</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Function to return the poisson value</span>
+<span class="sd">    Function to return the Poisson value</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
     <span class="k">return</span> <span class="p">(</span><span class="n">lambda_val</span> <span class="o">**</span> <span class="n">n</span><span class="p">)</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">exp</span><span class="p">(</span><span class="o">-</span><span class="n">lambda_val</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="mf">1.0</span> <span class="o">*</span> <span class="n">math</span><span class="o">.</span><span class="n">factorial</span><span class="p">(</span><span class="n">n</span><span class="p">))</span>
@@ -1219,7 +1222,7 @@
 
 <div class="viewcode-block" id="normalize_dict"><a class="viewcode-back" href="../../../distribution_functions.html#binarycpython.utils.distribution_functions.normalize_dict">[docs]</a><span class="k">def</span> <span class="nf">normalize_dict</span><span class="p">(</span><span class="n">result_dict</span><span class="p">,</span> <span class="n">verbosity</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Function to normalize a dictionary</span>
+<span class="sd">    Function to normalise a dictionary</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
     <span class="n">sum_result</span> <span class="o">=</span> <span class="nb">sum</span><span class="p">([</span><span class="n">result_dict</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">result_dict</span><span class="o">.</span><span class="n">keys</span><span class="p">()])</span>
@@ -1227,11 +1230,10 @@
         <span class="n">result_dict</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="n">result_dict</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">/</span> <span class="n">sum_result</span>
     <span class="k">return</span> <span class="n">result_dict</span></div>
 
-<div class="viewcode-block" id="Moe_de_Stefano_2017_multiplicity_fractions"><a class="viewcode-back" href="../../../distribution_functions.html#binarycpython.utils.distribution_functions.Moe_de_Stefano_2017_multiplicity_fractions">[docs]</a><span class="k">def</span> <span class="nf">Moe_de_Stefano_2017_multiplicity_fractions</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">verbosity</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
+<div class="viewcode-block" id="Moe_di_Stefano_2017_multiplicity_fractions"><a class="viewcode-back" href="../../../distribution_functions.html#binarycpython.utils.distribution_functions.Moe_di_Stefano_2017_multiplicity_fractions">[docs]</a><span class="k">def</span> <span class="nf">Moe_di_Stefano_2017_multiplicity_fractions</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">verbosity</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
     <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">    Function that creates a list of probability fractions and</span>
-<span class="sd">    normalizes and merges them according to the users choice.</span>
-
+<span class="sd">    normalises and merges them according to the users choice.</span>
 
 <span class="sd">    TODO: make an extrapolation functionality in this. log10(1.6e1)</span>
 <span class="sd">    is low, we can probably go a bit further</span>
@@ -1290,7 +1292,7 @@
         <span class="n">full_fractions_array</span> <span class="o">=</span> <span class="n">full_fractions_array</span><span class="o">/</span><span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">(</span><span class="n">full_fractions_array</span><span class="p">)</span>
 
         <span class="n">verbose_print</span><span class="p">(</span>
-            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_multiplicity_fractions: using model </span><span class="si">{}</span><span class="s2">: full_fractions_array: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="s2">&quot;Poisson&quot;</span><span class="p">,</span> <span class="n">full_fractions_array</span><span class="p">),</span>
+            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_multiplicity_fractions: using model </span><span class="si">{}</span><span class="s2">: full_fractions_array: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="s2">&quot;Poisson&quot;</span><span class="p">,</span> <span class="n">full_fractions_array</span><span class="p">),</span>
             <span class="n">verbosity</span><span class="p">,</span>
             <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
         <span class="p">)</span>
@@ -1311,7 +1313,7 @@
         <span class="c1"># Set last value</span>
         <span class="n">full_fractions_array</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">=</span> <span class="mf">0.0</span>  <span class="c1"># no quadruples</span>
         <span class="n">verbose_print</span><span class="p">(</span>
-            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_multiplicity_fractions: using model </span><span class="si">{}</span><span class="s2">: full_fractions_array: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="s2">&quot;data&quot;</span><span class="p">,</span> <span class="n">full_fractions_array</span><span class="p">),</span>
+            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_multiplicity_fractions: using model </span><span class="si">{}</span><span class="s2">: full_fractions_array: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="s2">&quot;data&quot;</span><span class="p">,</span> <span class="n">full_fractions_array</span><span class="p">),</span>
             <span class="n">verbosity</span><span class="p">,</span>
             <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
         <span class="p">)</span>
@@ -1320,7 +1322,7 @@
     <span class="k">if</span> <span class="n">options</span><span class="p">[</span><span class="s2">&quot;normalize_multiplicities&quot;</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;raw&quot;</span><span class="p">:</span>
         <span class="c1"># Don&#39;t multiply by the multiplicity_array, but do give a fractions array</span>
         <span class="n">verbose_print</span><span class="p">(</span>
-            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_multiplicity_fractions: Not normalizing (using raw results): results: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">full_fractions_array</span><span class="p">),</span>
+            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_multiplicity_fractions: Not normalising (using raw results): results: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">full_fractions_array</span><span class="p">),</span>
             <span class="n">verbosity</span><span class="p">,</span>
             <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
         <span class="p">)</span>
@@ -1330,11 +1332,11 @@
         <span class="c1"># Multiply the full_multiplicity_fraction array by the multiplicity_multiplier_array, creating a weighted fractions array</span>
         <span class="n">weighted_fractions_array</span> <span class="o">=</span> <span class="n">full_fractions_array</span> <span class="o">*</span> <span class="n">multiplicity_modulator_array</span>
 
-        <span class="c1"># Normalize this so it is intotal 1:</span>
+        <span class="c1"># Normalise this so it is in total 1:</span>
         <span class="n">result</span> <span class="o">=</span> <span class="n">weighted_fractions_array</span><span class="o">/</span><span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">(</span><span class="n">weighted_fractions_array</span><span class="p">)</span>
 
         <span class="n">verbose_print</span><span class="p">(</span>
-            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_multiplicity_fractions: Normalizing with </span><span class="si">{}</span><span class="s2">. result: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="s2">&quot;norm&quot;</span><span class="p">,</span> <span class="n">result</span><span class="p">),</span>
+            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_multiplicity_fractions: Normalising with </span><span class="si">{}</span><span class="s2">. result: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="s2">&quot;norm&quot;</span><span class="p">,</span> <span class="n">result</span><span class="p">),</span>
             <span class="n">verbosity</span><span class="p">,</span>
             <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
         <span class="p">)</span>
@@ -1344,17 +1346,17 @@
         <span class="c1"># (i.e. not multiplied by multiplier) and do the merging</span>
         <span class="n">result</span> <span class="o">=</span> <span class="n">merge_multiplicities</span><span class="p">(</span><span class="n">full_fractions_array</span><span class="p">,</span> <span class="n">max_multiplicity</span><span class="p">,</span> <span class="n">verbosity</span><span class="o">=</span><span class="n">verbosity</span><span class="p">)</span>
 
-        <span class="c1"># Then normalize to be sure</span>
+        <span class="c1"># Then normalise to be sure</span>
         <span class="n">result</span> <span class="o">=</span> <span class="n">result</span><span class="o">/</span><span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
 
         <span class="n">verbose_print</span><span class="p">(</span>
-            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_multiplicity_fractions: Normalizing with </span><span class="si">{}</span><span class="s2">, max_multiplicity=</span><span class="si">{}</span><span class="s2"> result=</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="s2">&quot;merge&quot;</span><span class="p">,</span> <span class="n">max_multiplicity</span><span class="p">,</span> <span class="n">result</span><span class="p">),</span>
+            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_multiplicity_fractions: Normalising with </span><span class="si">{}</span><span class="s2">, max_multiplicity=</span><span class="si">{}</span><span class="s2"> result=</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="s2">&quot;merge&quot;</span><span class="p">,</span> <span class="n">max_multiplicity</span><span class="p">,</span> <span class="n">result</span><span class="p">),</span>
             <span class="n">verbosity</span><span class="p">,</span>
             <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
         <span class="p">)</span>
 
     <span class="n">verbose_print</span><span class="p">(</span>
-        <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_multiplicity_fractions: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">result</span><span class="p">)),</span>
+        <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_multiplicity_fractions: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">result</span><span class="p">)),</span>
         <span class="n">verbosity</span><span class="p">,</span>
         <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
     <span class="p">)</span>
@@ -1382,7 +1384,7 @@
     <span class="c1"># Since the information from the table for M&amp;S is independent of any choice we make,</span>
     <span class="c1"># we need to take into account that for example our choice of minimum mass leads to</span>
     <span class="c1"># a minimum q_min that is not the same as in the table</span>
-    <span class="c1"># We should ignore those parts of the table and renormalize.</span>
+    <span class="c1"># We should ignore those parts of the table and renormalise.</span>
     <span class="c1"># If we are below the lowest value of qmin in the table we need to extrapolate the data</span>
     <span class="c1">#</span>
     <span class="c1"># Anyway, the goal of this function is to provide some extrapolated values for q when we should sample outside of the boundaries</span>
@@ -1425,9 +1427,15 @@
         <span class="c1"># qmin = options[&quot;ranges&quot;][&quot;M&quot;][</span>
         <span class="c1">#     0</span>
         <span class="c1"># ]  # TODO: this lower range must not be lower than Mmin.</span>
-        <span class="c1"># print(&quot;build_q_table qmin: {}&quot;.format(qmin))</span>
+
         <span class="n">qmin</span> <span class="o">=</span> <span class="n">options</span><span class="p">[</span><span class="s1">&#39;Mmin&#39;</span><span class="p">]</span><span class="o">/</span><span class="n">options</span><span class="p">[</span><span class="s1">&#39;M_1&#39;</span><span class="p">]</span>
-        <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;build_q_table qmin: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">qmin</span><span class="p">))</span>
+        <span class="n">verbose_print</span><span class="p">(</span>
+            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: build_q_table qmin: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                <span class="n">qmin</span><span class="p">,</span>
+            <span class="p">),</span>
+            <span class="n">verbosity</span><span class="p">,</span>
+            <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
+        <span class="p">)</span>
 
         <span class="c1"># qmax = maximum_mass_ratio_for_RLOF(options[m], options[p])</span>
         <span class="c1"># TODO: change this to the above</span>
@@ -1440,7 +1448,13 @@
 
         <span class="n">qeps</span> <span class="o">=</span> <span class="mf">1e-8</span>  <span class="c1"># small number but such that qeps+1 != 1</span>
         <span class="k">if</span> <span class="n">qeps</span> <span class="o">+</span> <span class="mi">1</span> <span class="o">==</span> <span class="mf">1.0</span><span class="p">:</span>
-            <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;qeps (= </span><span class="si">{}</span><span class="s2">) +1 == 1. Make qeps larger&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">qeps</span><span class="p">))</span>
+            <span class="n">verbose_print</span><span class="p">(</span>
+                <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: build_q_table: qeps (= </span><span class="si">{}</span><span class="s2">) +1 == 1. Make qeps larger&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                    <span class="n">qeps</span><span class="p">,</span>
+                <span class="p">),</span>
+                <span class="n">verbosity</span><span class="p">,</span>
+                <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
+            <span class="p">)</span>
 
         <span class="k">if</span> <span class="n">qmin</span> <span class="o">&gt;=</span> <span class="n">qmax</span><span class="p">:</span>
             <span class="c1"># there may be NO binaries in this part of the parameter space:</span>
@@ -1464,7 +1478,7 @@
                 <span class="n">require_extrapolation</span><span class="p">[</span><span class="s2">&quot;low&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mi">0</span>
                 <span class="n">require_extrapolation</span><span class="p">[</span>
                     <span class="s2">&quot;high&quot;</span>
-                <span class="p">]</span> <span class="o">=</span> <span class="mi">1</span>  <span class="c1"># TODO: shouldnt the extrapolation need to happen if qmax &gt; 0.95</span>
+                <span class="p">]</span> <span class="o">=</span> <span class="mi">1</span>  <span class="c1"># TODO: shouldn&#39;t the extrapolation need to happen if qmax &gt; 0.95</span>
                 <span class="n">qdata</span><span class="p">[</span><span class="n">qmin</span><span class="p">]</span> <span class="o">=</span> <span class="n">Moecache</span><span class="p">[</span><span class="s2">&quot;rinterpolator_q&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">interpolate</span><span class="p">(</span>
                     <span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">log10</span><span class="p">(</span><span class="n">options</span><span class="p">[</span><span class="n">m</span><span class="p">]),</span> <span class="n">np</span><span class="o">.</span><span class="n">log10</span><span class="p">(</span><span class="n">options</span><span class="p">[</span><span class="n">p</span><span class="p">]),</span> <span class="n">qmin</span><span class="p">]</span>
                 <span class="p">)[</span><span class="mi">0</span><span class="p">]</span>
@@ -1567,7 +1581,7 @@
                             <span class="p">)</span>
                             <span class="k">continue</span>
                         <span class="k">elif</span> <span class="n">method</span> <span class="o">==</span> <span class="s2">&quot;flat&quot;</span><span class="p">:</span>
-                            <span class="c1"># use the end value value and extrapolate it</span>
+                            <span class="c1"># use the end value and extrapolate it</span>
                             <span class="c1"># with zero slope</span>
                             <span class="n">qdata</span><span class="p">[</span><span class="n">qlimit</span><span class="p">]</span> <span class="o">=</span> <span class="n">qdata</span><span class="p">[</span><span class="n">qs</span><span class="p">[</span><span class="n">end_index</span><span class="p">]]</span>
                             <span class="n">verbose_print</span><span class="p">(</span>
@@ -1620,7 +1634,7 @@
                                 <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
                             <span class="p">)</span>
                         <span class="k">elif</span> <span class="n">method</span><span class="o">==</span><span class="s2">&quot;poly&quot;</span><span class="p">:</span>
-                            <span class="c1"># TODO: consider implementing the poly method (see perl version)</span>
+                            <span class="c1"># TODO: consider implementing the poly method (see Perl version)</span>
                             <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;M&amp;S: build_q_table: Method &#39;poly&#39; not implemented&quot;</span><span class="p">)</span>
 
                         <span class="k">else</span><span class="p">:</span>
@@ -1654,16 +1668,16 @@
 
         <span class="k">if</span> <span class="n">can_renormalize</span><span class="p">:</span>
             <span class="n">verbose_print</span><span class="p">(</span>
-                <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: build_q_table: Renormalizing table&quot;</span><span class="p">,</span>
+                <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: build_q_table: Renormalising table&quot;</span><span class="p">,</span>
                 <span class="n">verbosity</span><span class="p">,</span>
                 <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
             <span class="p">)</span>
 
-            <span class="c1"># now we integrate and renormalize (if the table is not all zero)</span>
+            <span class="c1"># now we integrate and renormalise (if the table is not all zero)</span>
             <span class="n">I</span> <span class="o">=</span> <span class="n">get_integration_constant_q</span><span class="p">(</span><span class="n">q_interpolator</span><span class="p">,</span> <span class="n">tmp_table</span><span class="p">,</span> <span class="n">qdata</span><span class="p">,</span> <span class="n">verbosity</span><span class="o">=</span><span class="n">verbosity</span><span class="p">)</span>
 
             <span class="k">if</span> <span class="n">I</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
-                <span class="c1"># normalize to 1.0 by dividing the data by 1.0/$I</span>
+                <span class="c1"># normalise to 1.0 by dividing the data by 1.0/$I</span>
                 <span class="n">q_interpolator</span><span class="o">.</span><span class="n">multiply_table_column</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mf">1.0</span> <span class="o">/</span> <span class="n">I</span><span class="p">)</span>
 
                 <span class="c1"># test this</span>
@@ -1697,7 +1711,7 @@
 
 <div class="viewcode-block" id="powerlaw_extrapolation_q"><a class="viewcode-back" href="../../../distribution_functions.html#binarycpython.utils.distribution_functions.powerlaw_extrapolation_q">[docs]</a><span class="k">def</span> <span class="nf">powerlaw_extrapolation_q</span><span class="p">(</span><span class="n">qdata</span><span class="p">,</span> <span class="n">qs</span><span class="p">,</span> <span class="n">indices</span><span class="p">,</span> <span class="n">verbosity</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Function to do the powerlaw extrapolation at the lower end of the q range</span>
+<span class="sd">    Function to do the power law extrapolation at the lower end of the q range</span>
 <span class="sd">    &quot;&quot;&quot;</span>
     <span class="n">newq</span> <span class="o">=</span> <span class="mf">0.05</span>
 
@@ -1751,7 +1765,7 @@
 <span class="sd">    Function to integrate the q interpolator and return the integration constant</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
-    <span class="n">dq</span> <span class="o">=</span> <span class="mf">1e-3</span>  <span class="c1"># resolution of the integration/renormalization</span>
+    <span class="n">dq</span> <span class="o">=</span> <span class="mf">1e-3</span>  <span class="c1"># resolution of the integration/renormalisation</span>
     <span class="n">I</span> <span class="o">=</span> <span class="mi">0</span>
 
     <span class="c1"># integrate: note that the value of the integral is</span>
@@ -1780,7 +1794,7 @@
 
 <div class="viewcode-block" id="fill_data"><a class="viewcode-back" href="../../../distribution_functions.html#binarycpython.utils.distribution_functions.fill_data">[docs]</a><span class="k">def</span> <span class="nf">fill_data</span><span class="p">(</span><span class="n">sample_values</span><span class="p">,</span> <span class="n">data_dict</span><span class="p">):</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Function that returns the normalized array of values for given logmass and logperiod</span>
+<span class="sd">    Function that returns the normalised array of values for given logmass and logperiod</span>
 <span class="sd">    used for the e and q values</span>
 
 <span class="sd">    TODO: make sure we do the correct thing with the dstep</span>
@@ -1797,7 +1811,7 @@
         <span class="n">data</span><span class="p">[</span><span class="n">sample_value</span><span class="p">]</span> <span class="o">=</span> <span class="n">val</span>
         <span class="n">I</span> <span class="o">+=</span> <span class="n">val</span>
 
-    <span class="c1"># Normalize the data</span>
+    <span class="c1"># Normalise the data</span>
     <span class="k">for</span> <span class="n">sample_value</span> <span class="ow">in</span> <span class="n">sample_values</span><span class="p">:</span>
         <span class="n">data</span><span class="p">[</span><span class="n">sample_value</span><span class="p">]</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="n">sample_value</span><span class="p">]</span> <span class="o">/</span> <span class="n">I</span>
 
@@ -1810,7 +1824,7 @@
     <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">    Function to calculate the P integral</span>
 
-<span class="sd">    We need to renormalize this because min_per &gt; 0, and not all periods should be included</span>
+<span class="sd">    We need to renormalise this because min_per &gt; 0, and not all periods should be included</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
     <span class="k">global</span> <span class="n">Moecache</span>
@@ -1861,7 +1875,7 @@
     <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">    Function to calculate the P integral</span>
 
-<span class="sd">    We need to renormalize this because min_per &gt; 0, and not all periods should be included</span>
+<span class="sd">    We need to renormalise this because min_per &gt; 0, and not all periods should be included</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
     <span class="k">global</span> <span class="n">Moecache</span>
@@ -1914,9 +1928,9 @@
 
     <span class="k">return</span> <span class="n">prob_dict</span></div>
 
-<div class="viewcode-block" id="Moe_de_Stefano_2017_pdf"><a class="viewcode-back" href="../../../distribution_functions.html#binarycpython.utils.distribution_functions.Moe_de_Stefano_2017_pdf">[docs]</a><span class="k">def</span> <span class="nf">Moe_de_Stefano_2017_pdf</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">verbosity</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
+<div class="viewcode-block" id="Moe_di_Stefano_2017_pdf"><a class="viewcode-back" href="../../../distribution_functions.html#binarycpython.utils.distribution_functions.Moe_di_Stefano_2017_pdf">[docs]</a><span class="k">def</span> <span class="nf">Moe_di_Stefano_2017_pdf</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">verbosity</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Moe &amp; distefano function to calculate the probability density.</span>
+<span class="sd">    Moe &amp; diStefano function to calculate the probability density.</span>
 
 <span class="sd">    takes a dictionary as input (in options) with options:</span>
 
@@ -1929,7 +1943,7 @@
 <span class="sd">    &quot;&quot;&quot;</span>
 
     <span class="n">verbose_print</span><span class="p">(</span>
-        <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf with options:</span><span class="se">\n\t\t</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+        <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf with options:</span><span class="se">\n\t\t</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
             <span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">options</span><span class="p">)</span>
         <span class="p">),</span>
         <span class="n">verbosity</span><span class="p">,</span>
@@ -1941,7 +1955,7 @@
     <span class="c1"># Get the multiplicity from the options, and if its not there, calculate it based on the</span>
     <span class="c1"># TODO: the function below makes no sense. We NEED to pass the multiplicity in the</span>
     <span class="k">if</span> <span class="ow">not</span> <span class="n">options</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;multiplicity&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">):</span>
-        <span class="n">msg</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: Did not find a multiplicity value in the options dictionary&quot;</span>
+        <span class="n">msg</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: Did not find a multiplicity value in the options dictionary&quot;</span>
         <span class="n">verbose_print</span><span class="p">(</span>
             <span class="n">msg</span><span class="p">,</span>
             <span class="n">verbosity</span><span class="p">,</span>
@@ -1957,7 +1971,7 @@
     <span class="c1"># Immediately return 0 if the multiplicity modulator is 0</span>
     <span class="k">if</span> <span class="n">options</span><span class="p">[</span><span class="s2">&quot;multiplicity_modulator&quot;</span><span class="p">][</span><span class="n">multiplicity</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
         <span class="n">verbose_print</span><span class="p">(</span>
-            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: returning 0 because of the multiplicity modulator being 0&quot;</span><span class="p">,</span>
+            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: returning 0 because of the multiplicity modulator being 0&quot;</span><span class="p">,</span>
             <span class="n">verbosity</span><span class="p">,</span>
             <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
         <span class="p">)</span>
@@ -1965,12 +1979,12 @@
 
     <span class="c1">############################################################</span>
     <span class="c1"># multiplicity fraction</span>
-    <span class="c1"># Calculate the probabilty, or rather, fraction, of stars that belong to this mass</span>
+    <span class="c1"># Calculate the probability, or rather, fraction, of stars that belong to this mass</span>
 
-    <span class="n">multiplicity_probability</span> <span class="o">=</span> <span class="n">Moe_de_Stefano_2017_multiplicity_fractions</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">verbosity</span><span class="p">)[</span><span class="n">multiplicity</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span>
+    <span class="n">multiplicity_probability</span> <span class="o">=</span> <span class="n">Moe_di_Stefano_2017_multiplicity_fractions</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">verbosity</span><span class="p">)[</span><span class="n">multiplicity</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span>
     <span class="n">prob_dict</span><span class="p">[</span><span class="s1">&#39;multiplicity&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">multiplicity_probability</span>
     <span class="n">verbose_print</span><span class="p">(</span>
-        <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: Appended multiplicity (mass1 = </span><span class="si">{}</span><span class="s2">) probability (</span><span class="si">{}</span><span class="s2">) to the prob dict (</span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+        <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: Appended multiplicity (mass1 = </span><span class="si">{}</span><span class="s2">) probability (</span><span class="si">{}</span><span class="s2">) to the prob dict (</span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
             <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">],</span> <span class="n">prob_dict</span><span class="p">[</span><span class="s1">&#39;multiplicity&#39;</span><span class="p">],</span> <span class="n">prob_dict</span>
         <span class="p">),</span>
         <span class="n">verbosity</span><span class="p">,</span>
@@ -1983,12 +1997,12 @@
     <span class="c1"># NB multiply by M1 to convert dN/dM to dN/dlnM</span>
     <span class="c1"># (dlnM = dM/M, so 1/dlnM = M/dM)</span>
 
-    <span class="c1"># TODO: Create an n-part-powerlaw method that can have breakpoints and slopes. I&#39;m using a three-part powerlaw now.</span>
-    <span class="c1"># TODO: is this actually the correct way? putting the M1 in there? Do we sample in logspace?</span>
+    <span class="c1"># TODO: Create an n-part-powerlaw method that can have breakpoints and slopes. I&#39;m using a three-part power law now.</span>
+    <span class="c1"># TODO: is this actually the correct way? putting the M1 in there? Do we sample in log space?</span>
     <span class="n">M1_probability</span> <span class="o">=</span> <span class="n">Kroupa2001</span><span class="p">(</span><span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">])</span> <span class="o">*</span> <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">]</span>
     <span class="n">prob_dict</span><span class="p">[</span><span class="s1">&#39;M_1&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">M1_probability</span>
     <span class="n">verbose_print</span><span class="p">(</span>
-        <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: Appended Mass (m=</span><span class="si">{}</span><span class="s2">) probability (</span><span class="si">{}</span><span class="s2">) to the prob dict (</span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+        <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: Appended Mass (m=</span><span class="si">{}</span><span class="s2">) probability (</span><span class="si">{}</span><span class="s2">) to the prob dict (</span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
             <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">],</span> <span class="n">prob_dict</span><span class="p">[</span><span class="s1">&#39;M_1&#39;</span><span class="p">],</span> <span class="n">prob_dict</span>
         <span class="p">),</span>
         <span class="n">verbosity</span><span class="p">,</span>
@@ -2016,7 +2030,7 @@
                 <span class="n">verbosity</span><span class="o">=</span><span class="n">verbosity</span> <span class="o">-</span> <span class="p">(</span><span class="n">_MS_VERBOSITY_INTERPOLATOR_LEVEL</span> <span class="o">-</span> <span class="mi">1</span><span class="p">),</span>
             <span class="p">)</span>
             <span class="n">verbose_print</span><span class="p">(</span>
-                <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: Created new period interpolator: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: Created new period interpolator: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                     <span class="n">Moecache</span><span class="p">[</span><span class="s2">&quot;rinterpolator_log10P&quot;</span><span class="p">]</span>
                 <span class="p">),</span>
                 <span class="n">verbosity</span><span class="p">,</span>
@@ -2033,7 +2047,7 @@
                     <span class="n">verbosity</span><span class="o">=</span><span class="n">verbosity</span> <span class="o">-</span> <span class="p">(</span><span class="n">_MS_VERBOSITY_INTERPOLATOR_LEVEL</span> <span class="o">-</span> <span class="mi">1</span><span class="p">),</span>
                 <span class="p">)</span>
                 <span class="n">verbose_print</span><span class="p">(</span>
-                    <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: Created new q interpolator: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                    <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: Created new q interpolator: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                         <span class="n">Moecache</span><span class="p">[</span><span class="s2">&quot;rinterpolator_q&quot;</span><span class="p">]</span>
                     <span class="p">),</span>
                     <span class="n">verbosity</span><span class="p">,</span>
@@ -2051,7 +2065,7 @@
                         <span class="n">verbosity</span><span class="o">=</span><span class="n">verbosity</span> <span class="o">-</span> <span class="p">(</span><span class="n">_MS_VERBOSITY_INTERPOLATOR_LEVEL</span> <span class="o">-</span> <span class="mi">1</span><span class="p">),</span>
                     <span class="p">)</span>
                     <span class="n">verbose_print</span><span class="p">(</span>
-                        <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: Created new e interpolator: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                        <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: Created new e interpolator: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                             <span class="n">Moecache</span><span class="p">[</span><span class="s2">&quot;rinterpolator_e&quot;</span><span class="p">]</span>
                         <span class="p">),</span>
                         <span class="n">verbosity</span><span class="p">,</span>
@@ -2083,7 +2097,7 @@
         <span class="n">p_val</span> <span class="o">=</span> <span class="n">p_val</span> <span class="o">/</span> <span class="n">Moecache</span><span class="p">[</span><span class="s2">&quot;P_integrals&quot;</span><span class="p">][</span><span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">]]</span>
         <span class="n">prob_dict</span><span class="p">[</span><span class="s1">&#39;P&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">p_val</span>
         <span class="n">verbose_print</span><span class="p">(</span>
-            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: Appended period (m=</span><span class="si">{}</span><span class="s2">, P=</span><span class="si">{}</span><span class="s2">) probability (</span><span class="si">{}</span><span class="s2">) to the prob list (</span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: Appended period (m=</span><span class="si">{}</span><span class="s2">, P=</span><span class="si">{}</span><span class="s2">) probability (</span><span class="si">{}</span><span class="s2">) to the prob list (</span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                 <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">],</span> <span class="n">options</span><span class="p">[</span><span class="s2">&quot;P&quot;</span><span class="p">],</span> <span class="n">prob_dict</span><span class="p">[</span><span class="s1">&#39;P&#39;</span><span class="p">],</span> <span class="n">prob_dict</span>
             <span class="p">),</span>
             <span class="n">verbosity</span><span class="p">,</span>
@@ -2109,7 +2123,7 @@
             <span class="c1"># Construct the q table</span>
             <span class="n">build_q_table</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">m_label</span><span class="p">,</span> <span class="n">p_label</span><span class="p">,</span> <span class="n">verbosity</span><span class="o">=</span><span class="n">verbosity</span><span class="p">)</span>
             <span class="n">verbose_print</span><span class="p">(</span>
-                <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: Created q_table (</span><span class="si">{}</span><span class="s2">) for m=</span><span class="si">{}</span><span class="s2"> p=</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">Moecache</span><span class="p">[</span>
+                <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: Created q_table (</span><span class="si">{}</span><span class="s2">) for m=</span><span class="si">{}</span><span class="s2"> p=</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">Moecache</span><span class="p">[</span>
                     <span class="s2">&quot;rinterpolator_q_given_</span><span class="si">{}</span><span class="s2">_log10</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">m_label</span><span class="p">,</span> <span class="n">p_label</span><span class="p">)</span>
                 <span class="p">],</span> <span class="n">options</span><span class="p">[</span><span class="n">m_label</span><span class="p">],</span> <span class="n">options</span><span class="p">[</span><span class="n">p_label</span><span class="p">]),</span>
                 <span class="n">verbosity</span><span class="p">,</span>
@@ -2122,7 +2136,7 @@
                 <span class="p">]</span><span class="o">.</span><span class="n">interpolate</span><span class="p">([</span><span class="n">secondary_mass</span> <span class="o">/</span> <span class="n">primary_mass</span><span class="p">])[</span><span class="mi">0</span><span class="p">]</span>
             <span class="n">prob_dict</span><span class="p">[</span><span class="s1">&#39;q&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">q_prob</span>
             <span class="n">verbose_print</span><span class="p">(</span>
-                <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: appended mass ratio (M=</span><span class="si">{}</span><span class="s2"> P=</span><span class="si">{}</span><span class="s2"> q=</span><span class="si">{}</span><span class="s2">) probability (</span><span class="si">{}</span><span class="s2">) to the prob list (</span><span class="si">{}</span><span class="s2">) &quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: appended mass ratio (M=</span><span class="si">{}</span><span class="s2"> P=</span><span class="si">{}</span><span class="s2"> q=</span><span class="si">{}</span><span class="s2">) probability (</span><span class="si">{}</span><span class="s2">) to the prob list (</span><span class="si">{}</span><span class="s2">) &quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                     <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">],</span>
                     <span class="n">options</span><span class="p">[</span><span class="s2">&quot;P&quot;</span><span class="p">],</span>
                     <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_2&quot;</span><span class="p">]</span> <span class="o">/</span> <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">],</span>
@@ -2149,14 +2163,14 @@
                 <span class="p">)</span>
                 <span class="n">mass_period_string</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="si">{}</span><span class="s2">_</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">],</span> <span class="n">options</span><span class="p">[</span><span class="s2">&quot;P&quot;</span><span class="p">])</span>
 
-                <span class="c1"># Set probabilty for ecc</span>
+                <span class="c1"># Set probability for ecc</span>
                 <span class="n">ecc_val</span> <span class="o">=</span> <span class="n">Moecache</span><span class="p">[</span><span class="s2">&quot;rinterpolator_e&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">interpolate</span><span class="p">(</span>
                     <span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">log10</span><span class="p">(</span><span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">]),</span> <span class="n">np</span><span class="o">.</span><span class="n">log10</span><span class="p">(</span><span class="n">options</span><span class="p">[</span><span class="s2">&quot;P&quot;</span><span class="p">]),</span> <span class="n">options</span><span class="p">[</span><span class="s2">&quot;ecc&quot;</span><span class="p">]]</span>
                 <span class="p">)[</span><span class="mi">0</span><span class="p">]</span>
                 <span class="n">ecc_val</span> <span class="o">=</span> <span class="n">ecc_val</span> <span class="o">/</span> <span class="n">Moecache</span><span class="p">[</span><span class="s2">&quot;ecc_integrals&quot;</span><span class="p">][</span><span class="n">mass_period_string</span><span class="p">]</span>
                 <span class="n">prob_dict</span><span class="p">[</span><span class="s1">&#39;ecc&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">ecc_val</span>
                 <span class="n">verbose_print</span><span class="p">(</span>
-                    <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: Appended eccentricity (m=</span><span class="si">{}</span><span class="s2">, P=</span><span class="si">{}</span><span class="s2">, ecc=</span><span class="si">{}</span><span class="s2">) probability (</span><span class="si">{}</span><span class="s2">) to the prob list (</span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                    <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: Appended eccentricity (m=</span><span class="si">{}</span><span class="s2">, P=</span><span class="si">{}</span><span class="s2">, ecc=</span><span class="si">{}</span><span class="s2">) probability (</span><span class="si">{}</span><span class="s2">) to the prob list (</span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                         <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">],</span> <span class="n">options</span><span class="p">[</span><span class="s2">&quot;P&quot;</span><span class="p">],</span> <span class="n">options</span><span class="p">[</span><span class="s2">&quot;ecc&quot;</span><span class="p">],</span> <span class="n">prob_dict</span><span class="p">[</span><span class="s1">&#39;ecc&#39;</span><span class="p">],</span> <span class="n">prob_dict</span>
                     <span class="p">),</span>
                     <span class="n">verbosity</span><span class="p">,</span>
@@ -2189,7 +2203,7 @@
                 <span class="c1"># period is too short : system is not hierarchical</span>
                 <span class="n">prob_dict</span><span class="p">[</span><span class="s1">&#39;P2&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="mi">0</span>
                 <span class="n">verbose_print</span><span class="p">(</span>
-                    <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: period2 is too short: </span><span class="si">{}</span><span class="s2"> &lt; </span><span class="si">{}</span><span class="s2">, system is not hierarchichal. Added 0 to probability list&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                    <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: period2 is too short: </span><span class="si">{}</span><span class="s2"> &lt; </span><span class="si">{}</span><span class="s2">, system is not hierarchical. Added 0 to probability list&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                         <span class="n">options</span><span class="p">[</span><span class="s2">&quot;P1&quot;</span><span class="p">],</span> <span class="n">min_P2</span>
                     <span class="p">),</span>
                     <span class="n">verbosity</span><span class="p">,</span>
@@ -2224,7 +2238,7 @@
                 <span class="n">p_val</span> <span class="o">=</span> <span class="n">p_val</span> <span class="o">/</span> <span class="n">Moecache</span><span class="p">[</span><span class="s2">&quot;P2_integrals&quot;</span><span class="p">][</span><span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1+M_2&quot;</span><span class="p">]]</span>
                 <span class="n">prob_dict</span><span class="p">[</span><span class="s1">&#39;P2&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">p_val</span>
                 <span class="n">verbose_print</span><span class="p">(</span>
-                    <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: Appended period2 (m1=</span><span class="si">{}</span><span class="s2"> m2=</span><span class="si">{}</span><span class="s2">, P2=</span><span class="si">{}</span><span class="s2">) probability (</span><span class="si">{}</span><span class="s2">) to the prob list (</span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                    <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: Appended period2 (m1=</span><span class="si">{}</span><span class="s2"> m2=</span><span class="si">{}</span><span class="s2">, P2=</span><span class="si">{}</span><span class="s2">) probability (</span><span class="si">{}</span><span class="s2">) to the prob list (</span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                         <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">],</span> <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_2&quot;</span><span class="p">],</span> <span class="n">options</span><span class="p">[</span><span class="s2">&quot;P2&quot;</span><span class="p">],</span> <span class="n">prob_dict</span><span class="p">[</span><span class="s1">&#39;P2&#39;</span><span class="p">],</span> <span class="n">prob_dict</span>
                     <span class="p">),</span>
                     <span class="n">verbosity</span><span class="p">,</span>
@@ -2249,7 +2263,7 @@
                 <span class="c1"># Build q table</span>
                 <span class="n">build_q_table</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">m_label</span><span class="p">,</span> <span class="n">p_label</span><span class="p">,</span> <span class="n">verbosity</span><span class="o">=</span><span class="n">verbosity</span><span class="p">)</span>
                 <span class="n">verbose_print</span><span class="p">(</span>
-                    <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: Called build_q_table&quot;</span><span class="p">,</span>
+                    <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: Called build_q_table&quot;</span><span class="p">,</span>
                     <span class="n">verbosity</span><span class="p">,</span>
                     <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
                 <span class="p">)</span>
@@ -2260,7 +2274,7 @@
                 <span class="p">]</span><span class="o">.</span><span class="n">interpolate</span><span class="p">([</span><span class="n">secondary_mass</span> <span class="o">/</span> <span class="n">primary_mass</span><span class="p">])[</span><span class="mi">0</span><span class="p">]</span>
                 <span class="n">prob_dict</span><span class="p">[</span><span class="s1">&#39;q2&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">q2_val</span>
                 <span class="n">verbose_print</span><span class="p">(</span>
-                    <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: appended mass ratio (M_1+M_2=</span><span class="si">{}</span><span class="s2"> M_3=</span><span class="si">{}</span><span class="s2"> P=</span><span class="si">{}</span><span class="s2"> q=</span><span class="si">{}</span><span class="s2">) probability (</span><span class="si">{}</span><span class="s2">) to the prob list (</span><span class="si">{}</span><span class="s2">) &quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                    <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: appended mass ratio (M_1+M_2=</span><span class="si">{}</span><span class="s2"> M_3=</span><span class="si">{}</span><span class="s2"> P=</span><span class="si">{}</span><span class="s2"> q=</span><span class="si">{}</span><span class="s2">) probability (</span><span class="si">{}</span><span class="s2">) to the prob list (</span><span class="si">{}</span><span class="s2">) &quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                         <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1+M_2&quot;</span><span class="p">],</span>
                         <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_3&quot;</span><span class="p">],</span>
                         <span class="n">options</span><span class="p">[</span><span class="s2">&quot;P&quot;</span><span class="p">],</span>
@@ -2278,7 +2292,7 @@
                 <span class="c1"># TODO: Implement ecc2 calculation</span>
                 <span class="k">if</span> <span class="n">multiplicity</span> <span class="o">==</span> <span class="mi">4</span><span class="p">:</span>
                     <span class="c1"># quadruple system.</span>
-                    <span class="c1"># TODO: Ask Rob about the strructure of the quadruple. Is this only double binary quadrupples?</span>
+                    <span class="c1"># TODO: Ask Rob about the structure of the quadruple. Is this only double binary quadruples?</span>
 
                     <span class="c1">############################################################</span>
                     <span class="c1"># orbital period 3</span>
@@ -2311,7 +2325,7 @@
                     <span class="n">p_val</span> <span class="o">=</span> <span class="n">p_val</span> <span class="o">/</span> <span class="n">Moecache</span><span class="p">[</span><span class="s2">&quot;P2_integrals&quot;</span><span class="p">][</span><span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1+M_2&quot;</span><span class="p">]]</span>
                     <span class="n">prob_dict</span><span class="p">[</span><span class="s1">&#39;P3&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">p_val</span>
                     <span class="n">verbose_print</span><span class="p">(</span>
-                        <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: Appended period2 (M=4) (M_1=</span><span class="si">{}</span><span class="s2"> M_2=</span><span class="si">{}</span><span class="s2">, P2=</span><span class="si">{}</span><span class="s2">) probability (</span><span class="si">{}</span><span class="s2">) to the prob list (</span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                        <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: Appended period2 (M=4) (M_1=</span><span class="si">{}</span><span class="s2"> M_2=</span><span class="si">{}</span><span class="s2">, P2=</span><span class="si">{}</span><span class="s2">) probability (</span><span class="si">{}</span><span class="s2">) to the prob list (</span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                             <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">],</span> <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_2&quot;</span><span class="p">],</span> <span class="n">options</span><span class="p">[</span><span class="s2">&quot;P2&quot;</span><span class="p">],</span> <span class="n">prob_dict</span><span class="p">[</span><span class="s1">&#39;P3&#39;</span><span class="p">],</span> <span class="n">prob_dict</span>
                         <span class="p">),</span>
                         <span class="n">verbosity</span><span class="p">,</span>
@@ -2337,7 +2351,7 @@
                     <span class="c1"># Calculate new q table</span>
                     <span class="n">build_q_table</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">m_label</span><span class="p">,</span> <span class="n">p_label</span><span class="p">,</span> <span class="n">verbosity</span><span class="o">=</span><span class="n">verbosity</span><span class="p">)</span>
                     <span class="n">verbose_print</span><span class="p">(</span>
-                        <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: Created q_table &quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(),</span>
+                        <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: Created q_table &quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(),</span>
                         <span class="n">verbosity</span><span class="p">,</span>
                         <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
                     <span class="p">)</span>
@@ -2348,7 +2362,7 @@
                     <span class="p">]</span><span class="o">.</span><span class="n">interpolate</span><span class="p">([</span><span class="n">secondary_mass</span> <span class="o">/</span> <span class="n">primary_mass</span><span class="p">])[</span><span class="mi">0</span><span class="p">]</span>
                     <span class="n">prob_dict</span><span class="p">[</span><span class="s1">&#39;q3&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">q3_prob</span>
                     <span class="n">verbose_print</span><span class="p">(</span>
-                        <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: appended mass ratio (M_1+M_2=</span><span class="si">{}</span><span class="s2"> M_3=</span><span class="si">{}</span><span class="s2"> P=</span><span class="si">{}</span><span class="s2"> q=</span><span class="si">{}</span><span class="s2">) probability (</span><span class="si">{}</span><span class="s2">) to the prob list (</span><span class="si">{}</span><span class="s2">) &quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                        <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: appended mass ratio (M_1+M_2=</span><span class="si">{}</span><span class="s2"> M_3=</span><span class="si">{}</span><span class="s2"> P=</span><span class="si">{}</span><span class="s2"> q=</span><span class="si">{}</span><span class="s2">) probability (</span><span class="si">{}</span><span class="s2">) to the prob list (</span><span class="si">{}</span><span class="s2">) &quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                             <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1+M_2&quot;</span><span class="p">],</span>
                             <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_3&quot;</span><span class="p">],</span>
                             <span class="n">options</span><span class="p">[</span><span class="s2">&quot;P&quot;</span><span class="p">],</span>
@@ -2367,7 +2381,7 @@
 
     <span class="c1"># check for input of multiplicity</span>
     <span class="k">elif</span> <span class="n">multiplicity</span> <span class="ow">not</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">5</span><span class="p">):</span>
-        <span class="n">msg</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: Unknown multiplicity </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+        <span class="n">msg</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: Unknown multiplicity </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                 <span class="n">multiplicity</span>
             <span class="p">)</span>
         <span class="n">verbose_print</span><span class="p">(</span>
@@ -2383,7 +2397,7 @@
     <span class="c1"># Some info</span>
     <span class="k">if</span> <span class="n">multiplicity</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
         <span class="n">verbose_print</span><span class="p">(</span>
-            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: M_1=</span><span class="si">{}</span><span class="s2"> q=N/A log10P=N/A (</span><span class="si">{}</span><span class="s2">): </span><span class="si">{}</span><span class="s2"> -&gt; </span><span class="si">{}</span><span class="se">\n</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: M_1=</span><span class="si">{}</span><span class="s2"> q=N/A log10P=N/A (</span><span class="si">{}</span><span class="s2">): </span><span class="si">{}</span><span class="s2"> -&gt; </span><span class="si">{}</span><span class="se">\n</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                 <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">],</span>
                 <span class="nb">len</span><span class="p">(</span><span class="n">prob_dict</span><span class="p">),</span>
                 <span class="nb">str</span><span class="p">(</span><span class="n">prob_dict</span><span class="p">),</span>
@@ -2394,7 +2408,7 @@
         <span class="p">)</span>
     <span class="k">elif</span> <span class="n">multiplicity</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
         <span class="n">verbose_print</span><span class="p">(</span>
-            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: M_1=</span><span class="si">{}</span><span class="s2"> q=</span><span class="si">{}</span><span class="s2"> log10P=</span><span class="si">{}</span><span class="s2"> ecc=</span><span class="si">{}</span><span class="s2"> (</span><span class="si">{}</span><span class="s2">): </span><span class="si">{}</span><span class="s2"> -&gt; </span><span class="si">{}</span><span class="se">\n</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: M_1=</span><span class="si">{}</span><span class="s2"> q=</span><span class="si">{}</span><span class="s2"> log10P=</span><span class="si">{}</span><span class="s2"> ecc=</span><span class="si">{}</span><span class="s2"> (</span><span class="si">{}</span><span class="s2">): </span><span class="si">{}</span><span class="s2"> -&gt; </span><span class="si">{}</span><span class="se">\n</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                 <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">],</span>
                 <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_2&quot;</span><span class="p">]</span> <span class="o">/</span> <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">]</span> <span class="k">if</span> <span class="n">options</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;M_2&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="k">else</span> <span class="s2">&quot;N/A&quot;</span><span class="p">,</span>
                 <span class="n">np</span><span class="o">.</span><span class="n">log10</span><span class="p">(</span><span class="n">options</span><span class="p">[</span><span class="s2">&quot;P&quot;</span><span class="p">]),</span>
@@ -2408,7 +2422,7 @@
         <span class="p">)</span>
     <span class="k">elif</span> <span class="n">multiplicity</span> <span class="o">==</span> <span class="mi">3</span><span class="p">:</span>
         <span class="n">verbose_print</span><span class="p">(</span>
-            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_de_Stefano_2017_pdf: M_1=</span><span class="si">{}</span><span class="s2"> q=</span><span class="si">{}</span><span class="s2"> log10P=</span><span class="si">{}</span><span class="s2"> ecc=</span><span class="si">{}</span><span class="s2"> M_3=</span><span class="si">{}</span><span class="s2"> log10P2=</span><span class="si">{}</span><span class="s2"> ecc2=</span><span class="si">{}</span><span class="s2"> (</span><span class="si">{}</span><span class="s2">): </span><span class="si">{}</span><span class="s2"> -&gt; </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">M&amp;S: Moe_di_Stefano_2017_pdf: M_1=</span><span class="si">{}</span><span class="s2"> q=</span><span class="si">{}</span><span class="s2"> log10P=</span><span class="si">{}</span><span class="s2"> ecc=</span><span class="si">{}</span><span class="s2"> M_3=</span><span class="si">{}</span><span class="s2"> log10P2=</span><span class="si">{}</span><span class="s2"> ecc2=</span><span class="si">{}</span><span class="s2"> (</span><span class="si">{}</span><span class="s2">): </span><span class="si">{}</span><span class="s2"> -&gt; </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                 <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">],</span>
                 <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_2&quot;</span><span class="p">]</span> <span class="o">/</span> <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">]</span> <span class="k">if</span> <span class="n">options</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;M_2&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="k">else</span> <span class="s2">&quot;N/A&quot;</span><span class="p">,</span>
                 <span class="n">np</span><span class="o">.</span><span class="n">log10</span><span class="p">(</span><span class="n">options</span><span class="p">[</span><span class="s2">&quot;P&quot;</span><span class="p">]),</span>
@@ -2425,7 +2439,7 @@
         <span class="p">)</span>
     <span class="k">elif</span> <span class="n">multiplicity</span> <span class="o">==</span> <span class="mi">4</span><span class="p">:</span>
         <span class="n">verbose_print</span><span class="p">(</span>
-            <span class="s2">&quot;M&amp;S: Moe_de_Stefano_2017_pdf: M_1=</span><span class="si">{}</span><span class="s2"> q=</span><span class="si">{}</span><span class="s2"> log10P=</span><span class="si">{}</span><span class="s2"> ecc=</span><span class="si">{}</span><span class="s2"> M_3=</span><span class="si">{}</span><span class="s2"> log10P2=</span><span class="si">{}</span><span class="s2"> ecc2=</span><span class="si">{}</span><span class="s2"> M_4=</span><span class="si">{}</span><span class="s2"> log10P3=</span><span class="si">{}</span><span class="s2"> ecc3=</span><span class="si">{}</span><span class="s2"> (</span><span class="si">{}</span><span class="s2">) : </span><span class="si">{}</span><span class="s2"> -&gt; </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+            <span class="s2">&quot;M&amp;S: Moe_di_Stefano_2017_pdf: M_1=</span><span class="si">{}</span><span class="s2"> q=</span><span class="si">{}</span><span class="s2"> log10P=</span><span class="si">{}</span><span class="s2"> ecc=</span><span class="si">{}</span><span class="s2"> M_3=</span><span class="si">{}</span><span class="s2"> log10P2=</span><span class="si">{}</span><span class="s2"> ecc2=</span><span class="si">{}</span><span class="s2"> M_4=</span><span class="si">{}</span><span class="s2"> log10P3=</span><span class="si">{}</span><span class="s2"> ecc3=</span><span class="si">{}</span><span class="s2"> (</span><span class="si">{}</span><span class="s2">) : </span><span class="si">{}</span><span class="s2"> -&gt; </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                 <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">],</span>
                 <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_2&quot;</span><span class="p">]</span> <span class="o">/</span> <span class="n">options</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">]</span> <span class="k">if</span> <span class="n">options</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;M_2&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="k">else</span> <span class="s2">&quot;N/A&quot;</span><span class="p">,</span>
                 <span class="n">np</span><span class="o">.</span><span class="n">log10</span><span class="p">(</span><span class="n">options</span><span class="p">[</span><span class="s2">&quot;P&quot;</span><span class="p">]),</span>
@@ -2468,9 +2482,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/_modules/binarycpython/utils/functions.html b/docs/build/html/_modules/binarycpython/utils/functions.html
index d2a6ac3f3a26bc9dc4fd0f6b912d281cd94e1d25..dea1362a7f8d801dd3e01ac2a33611b6a37aec2b 100644
--- a/docs/build/html/_modules/binarycpython/utils/functions.html
+++ b/docs/build/html/_modules/binarycpython/utils/functions.html
@@ -30,6 +30,9 @@
         <script src="../../../_static/underscore.js"></script>
         <script src="../../../_static/doctools.js"></script>
         <script src="../../../_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="../../../_static/js/theme.js"></script>
 
@@ -84,7 +87,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../readme_link.html">Python module for binary_c</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../modules.html">Binarycpython code</a></li>
-<li class="toctree-l1"><a class="reference internal" href="../../../examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -184,7 +187,7 @@
 <span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
 
 <span class="kn">from</span> <span class="nn">binarycpython</span> <span class="kn">import</span> <span class="n">_binary_c_bindings</span>
-<span class="kn">import</span> <span class="nn">binarycpython.utils.moe_distefano_data</span> <span class="k">as</span> <span class="nn">moe_distefano_data</span>
+<span class="kn">import</span> <span class="nn">binarycpython.utils.moe_di_stefano_2017_data</span> <span class="k">as</span> <span class="nn">moe_di_stefano_2017_data</span>
 
 <span class="kn">import</span> <span class="nn">py_rinterpolate</span>
 
@@ -239,7 +242,7 @@
 <span class="sd">            - If the types are of numerical type: subtract the value at dict 2 from dict 1.</span>
 <span class="sd">            - If the types are both dictionaries: call this function with the subdicts</span>
 
-<span class="sd">        WHen the keys are not of the same type:</span>
+<span class="sd">        When the keys are not of the same type:</span>
 <span class="sd">            - if the keys are all of numerical types</span>
 
 <span class="sd">    For the unique keys:</span>
@@ -368,9 +371,9 @@
     <span class="k">return</span> <span class="n">new_dict</span></div>
 
 
-<div class="viewcode-block" id="get_moe_distefano_dataset"><a class="viewcode-back" href="../../../functions.html#binarycpython.utils.functions.get_moe_distefano_dataset">[docs]</a><span class="k">def</span> <span class="nf">get_moe_distefano_dataset</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">verbosity</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
+<div class="viewcode-block" id="get_moe_di_stefano_dataset"><a class="viewcode-back" href="../../../functions.html#binarycpython.utils.functions.get_moe_di_stefano_dataset">[docs]</a><span class="k">def</span> <span class="nf">get_moe_di_stefano_dataset</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">verbosity</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Function to get the default moe and Distefano dataset or accept a userinput.</span>
+<span class="sd">    Function to get the default moe and di Stefano dataset or accept a user input.</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
     <span class="k">if</span> <span class="ow">not</span> <span class="n">options</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;file&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">):</span>
@@ -380,7 +383,7 @@
             <span class="mi">1</span><span class="p">,</span>
         <span class="p">)</span>
 
-        <span class="n">json_data</span> <span class="o">=</span> <span class="n">copy</span><span class="o">.</span><span class="n">deepcopy</span><span class="p">(</span><span class="n">moe_distefano_data</span><span class="o">.</span><span class="n">moe_distefano_2017_data</span><span class="p">)</span>
+        <span class="n">json_data</span> <span class="o">=</span> <span class="n">copy</span><span class="o">.</span><span class="n">deepcopy</span><span class="p">(</span><span class="n">moe_di_stefano_2017_data</span><span class="o">.</span><span class="n">moe_di_stefano_2017_data</span><span class="p">)</span>
 
     <span class="k">else</span><span class="p">:</span>
         <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span><span class="n">options</span><span class="p">[</span><span class="s2">&quot;file&quot;</span><span class="p">]):</span>
@@ -401,7 +404,7 @@
             <span class="p">)</span>
 
         <span class="k">else</span><span class="p">:</span>
-            <span class="c1"># Read input data and Clean up the data if there are whitespaces around the keys</span>
+            <span class="c1"># Read input data and Clean up the data if there are white spaces around the keys</span>
             <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">options</span><span class="p">[</span><span class="s2">&quot;file&quot;</span><span class="p">],</span> <span class="s2">&quot;r&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">data_filehandle</span><span class="p">:</span>
                 <span class="n">datafile_data</span> <span class="o">=</span> <span class="n">data_filehandle</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
             <span class="n">datafile_data</span> <span class="o">=</span> <span class="n">datafile_data</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s1">&#39;&quot; &#39;</span><span class="p">,</span> <span class="s1">&#39;&quot;&#39;</span><span class="p">)</span>
@@ -518,11 +521,11 @@
 <span class="sd">    Function to remove files but with verbosity</span>
 
 <span class="sd">    Args:</span>
-<span class="sd">        file: full filepath to the file that will be removed.</span>
+<span class="sd">        file: full file path to the file that will be removed.</span>
 <span class="sd">        verbosity: current verbosity level (Optional)</span>
 
 <span class="sd">    Returns:</span>
-<span class="sd">        the path of a subdirectory called binary_c_python in the TMP of the filesystem</span>
+<span class="sd">        the path of a sub directory called binary_c_python in the TMP of the file system</span>
 
 <span class="sd">    &quot;&quot;&quot;</span>
 
@@ -548,7 +551,7 @@
 
 <div class="viewcode-block" id="temp_dir"><a class="viewcode-back" href="../../../functions.html#binarycpython.utils.functions.temp_dir">[docs]</a><span class="k">def</span> <span class="nf">temp_dir</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Function to create directory within the TMP directory of the filesystem</span>
+<span class="sd">    Function to create directory within the TMP directory of the file system</span>
 
 <span class="sd">    Makes use of os.makedirs exist_ok which requires python 3.2+</span>
 
@@ -556,7 +559,7 @@
 <span class="sd">        function arguments: str input where each next input will be a child of the previous full_path. e.g. temp_dir(&#39;tests&#39;, &#39;grid&#39;) will become &#39;/tmp/binary_c_python/tests/grid&#39;</span>
 
 <span class="sd">    Returns:</span>
-<span class="sd">        the path of a subdirectory called binary_c_python in the TMP of the filesystem</span>
+<span class="sd">        the path of a sub directory called binary_c_python in the TMP of the file system</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
     <span class="n">tmp_dir</span> <span class="o">=</span> <span class="n">tempfile</span><span class="o">.</span><span class="n">gettempdir</span><span class="p">()</span>
@@ -579,7 +582,7 @@
 <span class="sd">     - settings file is selected by checking on files ending on settings</span>
 <span class="sd">     - data files are selected by checking on files ending with .dat</span>
 
-<span class="sd">    TODO: fix missing settingsfiles</span>
+<span class="sd">    TODO: fix missing settings files</span>
 
 <span class="sd">    Args:</span>
 <span class="sd">        data_dir: directory containing the data files and settings file</span>
@@ -662,7 +665,7 @@
 
     <span class="n">found_prev</span> <span class="o">=</span> <span class="kc">False</span>
     <span class="k">if</span> <span class="s2">&quot;BINARY_C_MACRO_HEADER&quot;</span> <span class="ow">in</span> <span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">:</span>
-        <span class="c1"># the envvar is already present. lets save that and put that back later</span>
+        <span class="c1"># the env var is already present. lets save that and put that back later</span>
         <span class="n">found_prev</span> <span class="o">=</span> <span class="kc">True</span>
         <span class="n">prev_value</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">[</span><span class="s2">&quot;BINARY_C_MACRO_HEADER&quot;</span><span class="p">]</span>
 
@@ -778,7 +781,7 @@
     <span class="n">version_info_dict</span><span class="p">[</span><span class="s2">&quot;isotopes&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">isotope_dict</span> <span class="k">if</span> <span class="n">isotope_dict</span> <span class="k">else</span> <span class="kc">None</span>
 
     <span class="c1">##########################</span>
-    <span class="c1"># Argpairs:</span>
+    <span class="c1"># Arg pairs:</span>
     <span class="c1"># Split off</span>
     <span class="n">argpairs</span> <span class="o">=</span> <span class="nb">set</span><span class="p">([</span><span class="n">el</span> <span class="k">for</span> <span class="n">el</span> <span class="ow">in</span> <span class="n">cleaned</span> <span class="k">if</span> <span class="n">el</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;ArgPair&quot;</span><span class="p">)])</span>
     <span class="n">cleaned</span> <span class="o">=</span> <span class="n">cleaned</span> <span class="o">-</span> <span class="n">argpairs</span>
@@ -902,7 +905,7 @@
 
     <span class="c1">##########################</span>
     <span class="c1"># miscellaneous:</span>
-    <span class="c1"># All those that I didnt catch with the above filters. Could try to get some more out though.</span>
+    <span class="c1"># All those that I didn&#39;t catch with the above filters. Could try to get some more out though.</span>
     <span class="c1"># TODO: filter a bit more.</span>
 
     <span class="n">misc_dict</span> <span class="o">=</span> <span class="p">{}</span>
@@ -958,7 +961,7 @@
 
 <div class="viewcode-block" id="output_lines"><a class="viewcode-back" href="../../../functions.html#binarycpython.utils.functions.output_lines">[docs]</a><span class="k">def</span> <span class="nf">output_lines</span><span class="p">(</span><span class="n">output</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">list</span><span class="p">:</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Function that outputs the lines that were recieved from the binary_c run, but now as an iterator.</span>
+<span class="sd">    Function that outputs the lines that were received from the binary_c run, but now as an iterator.</span>
 
 <span class="sd">    Args:</span>
 <span class="sd">        output: raw binary_c output</span>
@@ -980,7 +983,7 @@
 <span class="sd">    This function works in two cases:</span>
 <span class="sd">    if the caught line contains output like &#39;example_header time=12.32 mass=0.94 ..&#39;</span>
 <span class="sd">    or if the line contains output like &#39;example_header 12.32 0.94&#39;</span>
-<span class="sd">    Please dont the two cases.</span>
+<span class="sd">    Please don&#39;t the two cases.</span>
 
 <span class="sd">    You can give a &#39;selected_header&#39; to catch any line that starts with that.</span>
 <span class="sd">    Then the values will be put into a dictionary.</span>
@@ -1034,7 +1037,7 @@
 
     <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">value_dicts</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
         <span class="nb">print</span><span class="p">(</span>
-            <span class="s2">&quot;Sorry, didnt find any line matching your header </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">selected_header</span><span class="p">)</span>
+            <span class="s2">&quot;Sorry, didn&#39;t find any line matching your header </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">selected_header</span><span class="p">)</span>
         <span class="p">)</span>
         <span class="k">return</span> <span class="kc">None</span>
 
@@ -1101,7 +1104,7 @@
 <span class="sd">    This function is called by get_defaults()</span>
 
 <span class="sd">    Args:</span>
-<span class="sd">        arg_dict: dictionary containing the argument + default keypairs of binary_c</span>
+<span class="sd">        arg_dict: dictionary containing the argument + default key pairs of binary_c</span>
 
 <span class="sd">    Returns:</span>
 <span class="sd">        filtered dictionary (pairs with NULL and Function values are removed)</span>
@@ -1271,10 +1274,10 @@
 
 <div class="viewcode-block" id="get_help_all"><a class="viewcode-back" href="../../../functions.html#binarycpython.utils.functions.get_help_all">[docs]</a><span class="k">def</span> <span class="nf">get_help_all</span><span class="p">(</span><span class="n">print_help</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">dict</span><span class="p">:</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Function that reads out the output of the return_help_all api call to binary_c. This return_help_all binary_c returns all the information for the parameters, their descriptions and other properties. The output is categorized in sections.</span>
+<span class="sd">    Function that reads out the output of the return_help_all API call to binary_c. This return_help_all binary_c returns all the information for the parameters, their descriptions and other properties. The output is categorised in sections.</span>
 
 <span class="sd">    Args:</span>
-<span class="sd">        print_help: (optional, default = Tru) prints all the parameters and their descriptions.</span>
+<span class="sd">        print_help: (optional, default = True) prints all the parameters and their descriptions.</span>
 
 <span class="sd">    Returns:</span>
 <span class="sd">        returns a dictionary containing dictionaries per section. These dictionaries contain the parameters and descriptions etc for all the parameters in that section</span>
@@ -1320,7 +1323,7 @@
             <span class="k">for</span> <span class="n">split_param</span> <span class="ow">in</span> <span class="n">split_params</span><span class="p">:</span>
                 <span class="n">split_param_info</span> <span class="o">=</span> <span class="n">split_param</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot; : &quot;</span><span class="p">)</span>
                 <span class="k">if</span> <span class="ow">not</span> <span class="nb">len</span><span class="p">(</span><span class="n">split_param_info</span><span class="p">)</span> <span class="o">==</span> <span class="mi">3</span><span class="p">:</span>
-                    <span class="c1"># there are ocassions where the semicolon</span>
+                    <span class="c1"># there are occasions where the semicolon</span>
                     <span class="c1"># is used in the description text itself.</span>
                     <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">split_param_info</span><span class="p">)</span> <span class="o">==</span> <span class="mi">4</span><span class="p">:</span>
                         <span class="n">split_param_info</span> <span class="o">=</span> <span class="p">[</span>
@@ -1329,7 +1332,7 @@
                             <span class="n">split_param_info</span><span class="p">[</span><span class="mi">3</span><span class="p">],</span>
                         <span class="p">]</span>
 
-                    <span class="c1"># other occassions?</span>
+                    <span class="c1"># other occasions?</span>
 
                 <span class="c1"># Put the information in a dict</span>
                 <span class="n">param_name</span> <span class="o">=</span> <span class="n">split_param_info</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
@@ -1484,7 +1487,7 @@
 <span class="sd">            this document</span>
 
 <span class="sd">    Args:</span>
-<span class="sd">        output_file: name of the output .rst faile containing the ReStructuredText formatted output</span>
+<span class="sd">        output_file: name of the output .rst file containing the ReStructuredText formatted output</span>
 <span class="sd">            of all the binary_c parameters.</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
@@ -1536,13 +1539,13 @@
 
 
 <span class="c1">########################################################</span>
-<span class="c1"># logfile functions</span>
+<span class="c1"># log file functions</span>
 <span class="c1">########################################################</span>
 
 
 <div class="viewcode-block" id="load_logfile"><a class="viewcode-back" href="../../../functions.html#binarycpython.utils.functions.load_logfile">[docs]</a><span class="k">def</span> <span class="nf">load_logfile</span><span class="p">(</span><span class="n">logfile</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Experimental function that parses the generated logfile of binary_c.</span>
+<span class="sd">    Experimental function that parses the generated log file of binary_c.</span>
 
 <span class="sd">    This function is not finished and shouldn&#39;t be used yet.</span>
 
@@ -1550,7 +1553,7 @@
 <span class="sd">        - TODO:</span>
 
 <span class="sd">    Args:</span>
-<span class="sd">        - logfile: filename of the logfile you want to parse</span>
+<span class="sd">        - logfile: filename of the log file you want to parse</span>
 
 <span class="sd">    Returns:</span>
 
@@ -1938,7 +1941,7 @@
             <span class="k">if</span> <span class="ow">not</span> <span class="nb">type</span><span class="p">(</span><span class="n">key</span><span class="p">)</span> <span class="ow">in</span> <span class="n">all_types_keys</span><span class="p">:</span>
                 <span class="n">all_types_keys</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">type</span><span class="p">(</span><span class="n">key</span><span class="p">))</span>
 
-        <span class="c1"># If there are multiple types, then we loop over them and do a piecewise sort</span>
+        <span class="c1"># If there are multiple types, then we loop over them and do a piece wise sort</span>
         <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">all_types_keys</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">:</span>
             <span class="n">msg</span> <span class="o">=</span> <span class="s2">&quot;Different types in the same dictionary key set&quot;</span>
             
@@ -1993,7 +1996,7 @@
 <span class="sd">        binary_c_output: raw binary_c output string</span>
 
 <span class="sd">    Returns:</span>
-<span class="sd">        json dictionary with the parsed ENSEMBLE_JSON data</span>
+<span class="sd">        JSON dictionary with the parsed ENSEMBLE_JSON data</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
     <span class="n">json_dict</span> <span class="o">=</span> <span class="kc">None</span>
@@ -2075,7 +2078,7 @@
 
 <div class="viewcode-block" id="BinaryCEncoder.default"><a class="viewcode-back" href="../../../functions.html#binarycpython.utils.functions.BinaryCEncoder.default">[docs]</a>    <span class="k">def</span> <span class="nf">default</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">o</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">        Converting function. Well, could be more precise. look at the json module</span>
+<span class="sd">        Converting function. Well, could be more precise. look at the JSON module</span>
 <span class="sd">        &quot;&quot;&quot;</span>
         <span class="k">try</span><span class="p">:</span>
             <span class="n">str_repr</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">o</span><span class="p">)</span>
@@ -2090,13 +2093,13 @@
 
 <div class="viewcode-block" id="binaryc_json_serializer"><a class="viewcode-back" href="../../../functions.html#binarycpython.utils.functions.binaryc_json_serializer">[docs]</a><span class="k">def</span> <span class="nf">binaryc_json_serializer</span><span class="p">(</span><span class="n">obj</span><span class="p">:</span> <span class="n">Any</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Any</span><span class="p">:</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Custom serializer for binary_c to use when functions are present in the dictionary</span>
+<span class="sd">    Custom serialiser for binary_c to use when functions are present in the dictionary</span>
 <span class="sd">    that we want to export.</span>
 
 <span class="sd">    Function objects will be turned into str representations of themselves</span>
 
 <span class="sd">    Args:</span>
-<span class="sd">        obj: The object that might not be serializable</span>
+<span class="sd">        obj: The object that might not be serialisable</span>
 
 <span class="sd">    Returns:</span>
 <span class="sd">        Either string representation of object if the object is a function, or the object itself</span>
@@ -2150,9 +2153,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/_modules/binarycpython/utils/grid.html b/docs/build/html/_modules/binarycpython/utils/grid.html
index 80bf98e072d27f7be1ac53fdd94611ddec408630..e3499d4720f63a169d2219156c463cfa867cf964 100644
--- a/docs/build/html/_modules/binarycpython/utils/grid.html
+++ b/docs/build/html/_modules/binarycpython/utils/grid.html
@@ -30,6 +30,9 @@
         <script src="../../../_static/underscore.js"></script>
         <script src="../../../_static/doctools.js"></script>
         <script src="../../../_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="../../../_static/js/theme.js"></script>
 
@@ -84,7 +87,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../readme_link.html">Python module for binary_c</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../modules.html">Binarycpython code</a></li>
-<li class="toctree-l1"><a class="reference internal" href="../../../examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -200,8 +203,10 @@
 
 <span class="kn">from</span> <span class="nn">binarycpython.utils.grid_options_defaults</span> <span class="kn">import</span> <span class="p">(</span>
     <span class="n">grid_options_defaults_dict</span><span class="p">,</span>
-    <span class="n">moe_distefano_default_options</span><span class="p">,</span>
+    <span class="n">moe_di_stefano_default_options</span><span class="p">,</span>
     <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
+    <span class="n">_CUSTOM_LOGGING_VERBOSITY_LEVEL</span><span class="p">,</span>
+    <span class="n">_LOGGER_VERBOSITY_LEVEL</span><span class="p">,</span>
 <span class="p">)</span>
 
 <span class="kn">from</span> <span class="nn">binarycpython.utils.custom_logging_functions</span> <span class="kn">import</span> <span class="p">(</span>
@@ -220,7 +225,7 @@
     <span class="n">merge_dicts</span><span class="p">,</span>
     <span class="n">update_dicts</span><span class="p">,</span>
     <span class="n">extract_ensemble_json_from_string</span><span class="p">,</span>
-    <span class="n">get_moe_distefano_dataset</span><span class="p">,</span>
+    <span class="n">get_moe_di_stefano_dataset</span><span class="p">,</span>
     <span class="n">recursive_change_key_to_float</span><span class="p">,</span>
     <span class="n">custom_sort_dict</span><span class="p">,</span>
     <span class="n">recursive_change_key_to_string</span><span class="p">,</span>
@@ -243,7 +248,7 @@
     <span class="n">get_max_multiplicity</span><span class="p">,</span>
     <span class="n">Arenou2010_binary_fraction</span><span class="p">,</span>
     <span class="n">raghavan2010_binary_fraction</span><span class="p">,</span>
-    <span class="n">Moe_de_Stefano_2017_multiplicity_fractions</span><span class="p">,</span>
+    <span class="n">Moe_di_Stefano_2017_multiplicity_fractions</span><span class="p">,</span>
 <span class="p">)</span>
 
 <span class="kn">from</span> <span class="nn">binarycpython</span> <span class="kn">import</span> <span class="n">_binary_c_bindings</span>
@@ -281,7 +286,7 @@
         <span class="bp">self</span><span class="o">.</span><span class="n">custom_options</span> <span class="o">=</span> <span class="p">{}</span>
 
         <span class="c1"># Load M&amp;s options</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;m&amp;s_options&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">copy</span><span class="o">.</span><span class="n">deepcopy</span><span class="p">(</span><span class="n">moe_distefano_default_options</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;m&amp;s_options&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">copy</span><span class="o">.</span><span class="n">deepcopy</span><span class="p">(</span><span class="n">moe_di_stefano_default_options</span><span class="p">)</span>
 
         <span class="c1"># Write M&amp;S options to a file</span>
         <span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;tmp_dir&quot;</span><span class="p">],</span> <span class="s2">&quot;moe_distefano&quot;</span><span class="p">),</span> <span class="n">exist_ok</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
@@ -384,13 +389,16 @@
 
             <span class="c1"># The of the keys go into a custom_options dict</span>
             <span class="k">else</span><span class="p">:</span>
-                <span class="nb">print</span><span class="p">(</span>
-                    <span class="s2">&quot;!! Key doesnt match previously known parameter: </span><span class="se">\</span>
-<span class="s2">                    adding: </span><span class="si">{}</span><span class="s2">=</span><span class="si">{}</span><span class="s2"> to custom_options&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                <span class="n">verbose_print</span><span class="p">(</span>
+                    <span class="s2">&quot;&lt;&lt;&lt;&lt; Warning: Key does not match previously known parameter: </span><span class="se">\</span>
+<span class="s2">                    adding: </span><span class="si">{}</span><span class="s2">=</span><span class="si">{}</span><span class="s2"> to custom_options &gt;&gt;&gt;&gt;&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                         <span class="n">key</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">[</span><span class="n">key</span><span class="p">]</span>
-                    <span class="p">)</span>
+                    <span class="p">),</span>
+                    <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
+                    <span class="mi">1</span><span class="p">,</span>
                 <span class="p">)</span>
                 <span class="bp">self</span><span class="o">.</span><span class="n">custom_options</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="n">kwargs</span><span class="p">[</span><span class="n">key</span><span class="p">]</span></div>
+
 <div class="viewcode-block" id="Population.parse_cmdline"><a class="viewcode-back" href="../../../grid.html#binarycpython.utils.grid.Population.parse_cmdline">[docs]</a>    <span class="k">def</span> <span class="nf">parse_cmdline</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
         <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">        Function to handle settings values via the command line.</span>
@@ -498,9 +506,9 @@
         <span class="n">argline</span> <span class="o">=</span> <span class="n">argline</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span>
         <span class="k">return</span> <span class="n">argline</span>
 
-<div class="viewcode-block" id="Population.last_grid_variable"><a class="viewcode-back" href="../../../grid.html#binarycpython.utils.grid.Population.last_grid_variable">[docs]</a>    <span class="k">def</span> <span class="nf">last_grid_variable</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+    <span class="k">def</span> <span class="nf">_last_grid_variable</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">        Functon that returns the last grid variable</span>
+<span class="sd">        Function that returns the last grid variable</span>
 <span class="sd">        (i.e. the one with the highest grid_variable_number)</span>
 <span class="sd">        &quot;&quot;&quot;</span>
 
@@ -512,7 +520,8 @@
                 <span class="p">]</span>
                 <span class="o">==</span> <span class="n">number</span> <span class="o">-</span> <span class="mi">1</span>
             <span class="p">):</span>
-                <span class="k">return</span> <span class="n">grid_variable</span></div>
+                <span class="k">return</span> <span class="n">grid_variable</span>
+
 <div class="viewcode-block" id="Population.add_grid_variable"><a class="viewcode-back" href="../../../grid.html#binarycpython.utils.grid.Population.add_grid_variable">[docs]</a>    <span class="k">def</span> <span class="nf">add_grid_variable</span><span class="p">(</span>
         <span class="bp">self</span><span class="p">,</span>
         <span class="n">name</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
@@ -531,7 +540,7 @@
         <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">        Function to add grid variables to the grid_options.</span>
 
-<span class="sd">        The execution of the grid generation will be through a nested forloop.</span>
+<span class="sd">        The execution of the grid generation will be through a nested for loop.</span>
 <span class="sd">        Each of the grid variables will get create a deeper for loop.</span>
 
 <span class="sd">        The real function that generates the numbers will get written to a new file in the TMP_DIR,</span>
@@ -581,7 +590,7 @@
 <span class="sd">                Examples:</span>
 <span class="sd">                    precode = &#39;M_1=math.exp(lnm1);&#39;</span>
 <span class="sd">            probdist:</span>
-<span class="sd">                FUnction determining the probability that gets asigned to the sampled parameter</span>
+<span class="sd">                Function determining the probability that gets assigned to the sampled parameter</span>
 <span class="sd">                </span>
 <span class="sd">                Examples:</span>
 <span class="sd">                    probdist = &#39;Kroupa2001(M_1)*M_1&#39;</span>
@@ -600,8 +609,7 @@
 <span class="sd">                (steps starting at lower edge + 0.5 * stepsize).</span>
 <span class="sd">        &quot;&quot;&quot;</span>
 
-        <span class="c1"># TODO: Add check for the gridtype input value</span>
-        <span class="c1"># TODO: add functionality for branchpoint</span>
+        <span class="c1"># TODO: Add check for the grid type input value</span>
 
         <span class="c1"># Add grid_variable</span>
         <span class="n">grid_variable</span> <span class="o">=</span> <span class="p">{</span>
@@ -636,7 +644,7 @@
         <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">        Function that returns all the options that have been set.</span>
 
-<span class="sd">        Can be combined with json to make a nice file.</span>
+<span class="sd">        Can be combined with JSON to make a nice file.</span>
 
 <span class="sd">        Returns:</span>
 <span class="sd">            dictionary containing &quot;bse_options&quot;, &quot;grid_options&quot;, &quot;custom_options&quot;</span>
@@ -650,21 +658,21 @@
 
         <span class="k">return</span> <span class="n">options</span></div>
 
-    <span class="k">def</span> <span class="nf">_return_binary_c_version_info</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">parsed</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
+<div class="viewcode-block" id="Population.return_binary_c_version_info"><a class="viewcode-back" href="../../../grid.html#binarycpython.utils.grid.Population.return_binary_c_version_info">[docs]</a>    <span class="k">def</span> <span class="nf">return_binary_c_version_info</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">parsed</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">        Function that returns the version information of binary_c</span>
 <span class="sd">        &quot;&quot;&quot;</span>
 
         <span class="n">version_info</span> <span class="o">=</span> <span class="n">return_binary_c_version_info</span><span class="p">(</span><span class="n">parsed</span><span class="o">=</span><span class="n">parsed</span><span class="p">)</span>
 
-        <span class="k">return</span> <span class="n">version_info</span>
+        <span class="k">return</span> <span class="n">version_info</span></div>
 
-    <span class="k">def</span> <span class="nf">_return_binary_c_defaults</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+<div class="viewcode-block" id="Population.return_binary_c_defaults"><a class="viewcode-back" href="../../../grid.html#binarycpython.utils.grid.Population.return_binary_c_defaults">[docs]</a>    <span class="k">def</span> <span class="nf">return_binary_c_defaults</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">        Function that returns the defaults of the binary_c version that is used.</span>
 <span class="sd">        &quot;&quot;&quot;</span>
 
-        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">defaults</span>
+        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">defaults</span></div>
 
 <div class="viewcode-block" id="Population.return_all_info"><a class="viewcode-back" href="../../../grid.html#binarycpython.utils.grid.Population.return_all_info">[docs]</a>    <span class="k">def</span> <span class="nf">return_all_info</span><span class="p">(</span>
         <span class="bp">self</span><span class="p">,</span>
@@ -703,7 +711,7 @@
 
         <span class="c1">#</span>
         <span class="k">if</span> <span class="n">include_binary_c_defaults</span><span class="p">:</span>
-            <span class="n">binary_c_defaults</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_return_binary_c_defaults</span><span class="p">()</span>
+            <span class="n">binary_c_defaults</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">return_binary_c_defaults</span><span class="p">()</span>
             <span class="n">all_info</span><span class="p">[</span><span class="s2">&quot;binary_c_defaults&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">binary_c_defaults</span>
 
         <span class="k">if</span> <span class="n">include_binary_c_version_info</span><span class="p">:</span>
@@ -726,14 +734,14 @@
         <span class="n">include_binary_c_help_all</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span>
     <span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Union</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="kc">None</span><span class="p">]:</span>
         <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">        Function that exports the all_info to a json file</span>
+<span class="sd">        Function that exports the all_info to a JSON file</span>
 
 <span class="sd">        Tasks:</span>
-<span class="sd">            - TODO: if any of the values in the dicts here is of a not-serializable form, then we</span>
+<span class="sd">            - TODO: if any of the values in the dicts here is of a not-serialisable form, then we</span>
 <span class="sd">                need to change that to a string or something so, use a recursive function that</span>
 <span class="sd">                goes over the all_info dict and finds those that fit</span>
 <span class="sd">            - TODO: Fix to write things to the directory. which options do which etc</span>
-<span class="sd">            - TODO: theres flawed logic here. rewrite this part pls</span>
+<span class="sd">            - TODO: there&#39;s flawed logic here. rewrite this part pls</span>
 <span class="sd">            - TODO: consider actually just removing the whole &#39;output to file&#39; part and let the</span>
 <span class="sd">                user do this.</span>
 
@@ -746,7 +754,7 @@
 <span class="sd">                version info (see return_binary_c_version_info)</span>
 <span class="sd">            include_binary_c_help_all: whether to include a dict containing all the information</span>
 <span class="sd">                about the binary_c parameters (see get_help_all)</span>
-<span class="sd">            use_datadir: boolean whether to use the custom_options[&#39;data_dir&#39;] to write the file to.</span>
+<span class="sd">            use_datadir: Boolean whether to use the custom_options[&#39;data_dir&#39;] to write the file to.</span>
 <span class="sd">                If the  custom_options[&quot;base_filename&quot;] is set, the output file will be called</span>
 <span class="sd">                &lt;custom_options[&quot;base_filename&quot;]&gt;_settings.json. Otherwise a file called</span>
 <span class="sd">                simulation_&lt;date+time&gt;_settings.json will be created</span>
@@ -833,16 +841,16 @@
             <span class="c1"># Generate entire shared lib code around logging lines</span>
             <span class="n">custom_logging_code</span> <span class="o">=</span> <span class="n">binary_c_log_code</span><span class="p">(</span>
                 <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;C_logging_code&quot;</span><span class="p">],</span>
-                <span class="n">verbose</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
+                <span class="n">verbosity</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">]</span><span class="o">-</span><span class="p">(</span><span class="n">_CUSTOM_LOGGING_VERBOSITY_LEVEL</span><span class="o">-</span><span class="mi">1</span><span class="p">),</span>
             <span class="p">)</span>
 
-            <span class="c1"># Load memory adress</span>
+            <span class="c1"># Load memory address</span>
             <span class="p">(</span>
                 <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;custom_logging_func_memaddr&quot;</span><span class="p">],</span>
                 <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;_custom_logging_shared_library_file&quot;</span><span class="p">],</span>
             <span class="p">)</span> <span class="o">=</span> <span class="n">create_and_load_logging_function</span><span class="p">(</span>
                 <span class="n">custom_logging_code</span><span class="p">,</span>
-                <span class="n">verbose</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
+                <span class="n">verbosity</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">]</span><span class="o">-</span><span class="p">(</span><span class="n">_CUSTOM_LOGGING_VERBOSITY_LEVEL</span><span class="o">-</span><span class="mi">1</span><span class="p">),</span>
                 <span class="n">custom_tmp_dir</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;tmp_dir&quot;</span><span class="p">],</span>
             <span class="p">)</span>
 
@@ -850,23 +858,24 @@
             <span class="c1"># Generate real logging code</span>
             <span class="n">logging_line</span> <span class="o">=</span> <span class="n">autogen_C_logging_code</span><span class="p">(</span>
                 <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;C_auto_logging&quot;</span><span class="p">],</span>
-                <span class="n">verbose</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
+                <span class="n">verbosity</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">]</span><span class="o">-</span><span class="p">(</span><span class="n">_CUSTOM_LOGGING_VERBOSITY_LEVEL</span><span class="o">-</span><span class="mi">1</span><span class="p">),</span>
             <span class="p">)</span>
 
             <span class="c1"># Generate entire shared lib code around logging lines</span>
             <span class="n">custom_logging_code</span> <span class="o">=</span> <span class="n">binary_c_log_code</span><span class="p">(</span>
-                <span class="n">logging_line</span><span class="p">,</span> <span class="n">verbose</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">]</span>
+                <span class="n">logging_line</span><span class="p">,</span> <span class="n">verbosity</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">]</span><span class="o">-</span><span class="p">(</span><span class="n">_CUSTOM_LOGGING_VERBOSITY_LEVEL</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span>
             <span class="p">)</span>
 
-            <span class="c1"># Load memory adress</span>
+            <span class="c1"># Load memory address</span>
             <span class="p">(</span>
                 <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;custom_logging_func_memaddr&quot;</span><span class="p">],</span>
                 <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;_custom_logging_shared_library_file&quot;</span><span class="p">],</span>
             <span class="p">)</span> <span class="o">=</span> <span class="n">create_and_load_logging_function</span><span class="p">(</span>
                 <span class="n">custom_logging_code</span><span class="p">,</span>
-                <span class="n">verbose</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
+                <span class="n">verbosity</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">]</span><span class="o">-</span><span class="p">(</span><span class="n">_CUSTOM_LOGGING_VERBOSITY_LEVEL</span><span class="o">-</span><span class="mi">1</span><span class="p">),</span>
                 <span class="n">custom_tmp_dir</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;tmp_dir&quot;</span><span class="p">],</span>
             <span class="p">)</span>
+
     <span class="c1">###################################################</span>
     <span class="c1"># Ensemble functions</span>
     <span class="c1">###################################################</span>
@@ -888,13 +897,13 @@
 
 <div class="viewcode-block" id="Population.evolve"><a class="viewcode-back" href="../../../grid.html#binarycpython.utils.grid.Population.evolve">[docs]</a>    <span class="k">def</span> <span class="nf">evolve</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
         <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">        Entrypoint function of the whole object. From here, based on the settings,</span>
+<span class="sd">        Entry point function of the whole object. From here, based on the settings,</span>
 <span class="sd">        we set up a SLURM or CONDOR grid, or if no setting is given we go straight</span>
 <span class="sd">        to evolving the population</span>
 
 <span class="sd">        There are no direct arguments to this function, rather it is based on the grid_options settings:</span>
-<span class="sd">            grid_options[&#39;slurm&#39;]: integer boolean whether to use a slurm_grid evolution</span>
-<span class="sd">            grid_options[&#39;condor&#39;]: integer boolean whether to use a condor_grid evolution</span>
+<span class="sd">            grid_options[&#39;slurm&#39;]: integer Boolean whether to use a slurm_grid evolution</span>
+<span class="sd">            grid_options[&#39;condor&#39;]: integer Boolean whether to use a condor_grid evolution</span>
 
 <span class="sd">        If neither of the above is set, we continue without using HPC routines</span>
 <span class="sd">        (that doesn&#39;t mean this cannot be run on a server with many cores)</span>
@@ -908,7 +917,7 @@
 
         <span class="c1"># Check which type:</span>
         <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;slurm&quot;</span><span class="p">]</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
-            <span class="c1"># Execute slurm subroutines</span>
+            <span class="c1"># Execute Slurm subroutines</span>
             <span class="bp">self</span><span class="o">.</span><span class="n">_slurm_grid</span><span class="p">()</span>
 
         <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;condor&quot;</span><span class="p">]</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
@@ -916,7 +925,7 @@
             <span class="bp">self</span><span class="o">.</span><span class="n">_condor_grid</span><span class="p">()</span>
         <span class="k">else</span><span class="p">:</span>
             <span class="c1"># Execute population evolution subroutines</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">evolve_population</span><span class="p">()</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">_evolve_population</span><span class="p">()</span>
 
         <span class="c1"># Put all interesting stuff in a variable and output that afterwards, as analytics of the run.</span>
         <span class="n">analytics_dict</span> <span class="o">=</span> <span class="p">{</span>
@@ -947,7 +956,7 @@
 
         <span class="k">return</span> <span class="n">analytics_dict</span></div>
 
-<div class="viewcode-block" id="Population.evolve_population"><a class="viewcode-back" href="../../../grid.html#binarycpython.utils.grid.Population.evolve_population">[docs]</a>    <span class="k">def</span> <span class="nf">evolve_population</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+    <span class="k">def</span> <span class="nf">_evolve_population</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">        Function to evolve populations. This handles the setting up, evolving</span>
 <span class="sd">        and cleaning up of a population of stars.</span>
@@ -1036,9 +1045,9 @@
                 <span class="s2">&quot;There were no errors found in this run.&quot;</span><span class="p">,</span>
                 <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
                 <span class="mi">0</span><span class="p">,</span>
-            <span class="p">)</span></div>
+            <span class="p">)</span>
 
-<div class="viewcode-block" id="Population.get_stream_logger"><a class="viewcode-back" href="../../../grid.html#binarycpython.utils.grid.Population.get_stream_logger">[docs]</a>    <span class="k">def</span> <span class="nf">get_stream_logger</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">level</span><span class="o">=</span><span class="n">logging</span><span class="o">.</span><span class="n">DEBUG</span><span class="p">):</span>
+    <span class="k">def</span> <span class="nf">_get_stream_logger</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">level</span><span class="o">=</span><span class="n">logging</span><span class="o">.</span><span class="n">DEBUG</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;Return logger with configured StreamHandler.&quot;&quot;&quot;</span>
         <span class="n">stream_logger</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;stream_logger&quot;</span><span class="p">)</span>
         <span class="n">stream_logger</span><span class="o">.</span><span class="n">handlers</span> <span class="o">=</span> <span class="p">[]</span>
@@ -1050,9 +1059,9 @@
         <span class="n">sh</span><span class="o">.</span><span class="n">setFormatter</span><span class="p">(</span><span class="n">formatter</span><span class="p">)</span>
         <span class="n">stream_logger</span><span class="o">.</span><span class="n">addHandler</span><span class="p">(</span><span class="n">sh</span><span class="p">)</span>
 
-        <span class="k">return</span> <span class="n">stream_logger</span></div>
+        <span class="k">return</span> <span class="n">stream_logger</span>
 
-<div class="viewcode-block" id="Population.system_queue_filler"><a class="viewcode-back" href="../../../grid.html#binarycpython.utils.grid.Population.system_queue_filler">[docs]</a>    <span class="k">def</span> <span class="nf">system_queue_filler</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">job_queue</span><span class="p">,</span> <span class="n">amt_cores</span><span class="p">):</span>
+    <span class="k">def</span> <span class="nf">_system_queue_filler</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">job_queue</span><span class="p">,</span> <span class="n">amt_cores</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">        Function that is responsible for keeping the queue filled.</span>
 
@@ -1060,8 +1069,9 @@
 <span class="sd">        Will have to play with the size of this.</span>
 <span class="sd">        &quot;&quot;&quot;</span>
 
-        <span class="n">stream_logger</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_stream_logger</span><span class="p">()</span>
-        <span class="n">stream_logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;setting up the system_queue_filler now&quot;</span><span class="p">)</span>
+        <span class="n">stream_logger</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_stream_logger</span><span class="p">()</span>
+        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;verbosity&#39;</span><span class="p">]</span> <span class="o">&gt;=</span> <span class="n">_LOGGER_VERBOSITY_LEVEL</span><span class="p">:</span>
+            <span class="n">stream_logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;setting up the system_queue_filler now&quot;</span><span class="p">)</span>
 
         <span class="c1"># Setup of the generator</span>
         <span class="bp">self</span><span class="o">.</span><span class="n">_generate_grid_code</span><span class="p">(</span><span class="n">dry_run</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
@@ -1071,13 +1081,12 @@
         <span class="n">generator</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;_system_generator&quot;</span><span class="p">](</span><span class="bp">self</span><span class="p">,</span> <span class="n">print_results</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
 
         <span class="c1"># TODO: build in method to handle with the HPC.</span>
-        <span class="c1"># Continously fill the queue</span>
+        <span class="c1"># Continuously fill the queue</span>
         <span class="k">for</span> <span class="n">system_number</span><span class="p">,</span> <span class="n">system_dict</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">generator</span><span class="p">):</span>
             <span class="c1"># Put job in queue</span>
             <span class="n">job_queue</span><span class="o">.</span><span class="n">put</span><span class="p">((</span><span class="n">system_number</span><span class="p">,</span> <span class="n">system_dict</span><span class="p">))</span>
 
             <span class="c1"># Print some info</span>
-            <span class="c1"># stream_logger.debug(f&quot;producing: {system_number}&quot;)  # DEBUG</span>
             <span class="n">verbose_print</span><span class="p">(</span>
                 <span class="s2">&quot;Queue produced system </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">system_number</span><span class="p">),</span>
                 <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
@@ -1099,9 +1108,11 @@
             <span class="c1">#     print(&quot;\tsystem_queue_filler: Size dir(self): {}&quot;.format(convert_bytes(bytes_size_self)))</span>
 
         <span class="c1"># Send closing signal to workers. When they receive this they will terminate</span>
-        <span class="n">stream_logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Signaling stop to processes&quot;</span><span class="p">)</span>  <span class="c1"># DEBUG</span>
+        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;verbosity&#39;</span><span class="p">]</span> <span class="o">&gt;=</span> <span class="n">_LOGGER_VERBOSITY_LEVEL</span><span class="p">:</span>
+            <span class="n">stream_logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Signaling stop to processes&quot;</span><span class="p">)</span>  <span class="c1"># DEBUG</span>
+    
         <span class="k">for</span> <span class="n">_</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">amt_cores</span><span class="p">):</span>
-            <span class="n">job_queue</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="s2">&quot;STOP&quot;</span><span class="p">)</span></div>
+            <span class="n">job_queue</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="s2">&quot;STOP&quot;</span><span class="p">)</span>
 
 <div class="viewcode-block" id="Population.format_ensemble_results"><a class="viewcode-back" href="../../../grid.html#binarycpython.utils.grid.Population.format_ensemble_results">[docs]</a>    <span class="k">def</span> <span class="nf">format_ensemble_results</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">ensemble_dictionary</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;</span>
@@ -1134,13 +1145,13 @@
         <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">        Function that handles running the population using multiprocessing.</span>
 
-<span class="sd">        First we set uip the multiprocessing manager and the job and result queue.</span>
+<span class="sd">        First we set up the multiprocessing manager and the job and result queue.</span>
 
 <span class="sd">        Then we spawn &lt;self.grid_options[&quot;amt_cores&quot;]&gt; amount of process instances,</span>
 <span class="sd">        and signal them to start.</span>
 
 <span class="sd">        While the processes are waiting for their instructions, we start the queue filler,</span>
-<span class="sd">        which goes over the gridcode and puts all the tasks in a queue until its full.</span>
+<span class="sd">        which goes over the grid code and puts all the tasks in a queue until its full.</span>
 
 <span class="sd">        The processes take these jobs, evolve the and store results.</span>
 
@@ -1152,7 +1163,7 @@
 
         <span class="c1"># Set process name</span>
         <span class="n">setproctitle</span><span class="o">.</span><span class="n">setproctitle</span><span class="p">(</span><span class="s1">&#39;binarycpython parent process&#39;</span><span class="p">)</span>
-        <span class="n">setproctitle</span><span class="o">.</span><span class="n">setthreadtitle</span><span class="p">(</span><span class="s2">&quot;binarycpyhon parent thread&quot;</span><span class="p">)</span>
+        <span class="n">setproctitle</span><span class="o">.</span><span class="n">setthreadtitle</span><span class="p">(</span><span class="s2">&quot;binarycpython parent thread&quot;</span><span class="p">)</span>
 
         <span class="c1"># Set up the manager object that can share info between processes</span>
         <span class="n">manager</span> <span class="o">=</span> <span class="n">multiprocessing</span><span class="o">.</span><span class="n">Manager</span><span class="p">()</span>
@@ -1174,7 +1185,7 @@
             <span class="n">p</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
 
         <span class="c1"># Set up the system_queue</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">system_queue_filler</span><span class="p">(</span><span class="n">job_queue</span><span class="p">,</span> <span class="n">amt_cores</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;amt_cores&quot;</span><span class="p">])</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_system_queue_filler</span><span class="p">(</span><span class="n">job_queue</span><span class="p">,</span> <span class="n">amt_cores</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;amt_cores&quot;</span><span class="p">])</span>
 
         <span class="c1"># Join the processes</span>
         <span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">processes</span><span class="p">:</span>
@@ -1244,6 +1255,7 @@
             <span class="s2">&quot;_total_probability_weighted_mass_run&quot;</span>
         <span class="p">]</span> <span class="o">=</span> <span class="n">combined_output_dict</span><span class="p">[</span><span class="s2">&quot;_total_probability_weighted_mass_run&quot;</span><span class="p">]</span>
         <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;_zero_prob_stars_skipped&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">combined_output_dict</span><span class="p">[</span><span class="s1">&#39;_zero_prob_stars_skipped&#39;</span><span class="p">]</span>
+
     <span class="k">def</span> <span class="nf">_evolve_system_mp</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">full_system_dict</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">        Function that the multiprocessing evolution method calls to evolve a system</span>
@@ -1296,8 +1308,9 @@
             <span class="n">ID</span>  <span class="c1"># Store the ID as a object property again, lets see if that works.</span>
         <span class="p">)</span>
 
-        <span class="n">stream_logger</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_stream_logger</span><span class="p">()</span>
-        <span class="n">stream_logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Setting up processor: process-</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">process_ID</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+        <span class="n">stream_logger</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_stream_logger</span><span class="p">()</span>
+        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;verbosity&#39;</span><span class="p">]</span> <span class="o">&gt;=</span> <span class="n">_LOGGER_VERBOSITY_LEVEL</span><span class="p">:</span>
+            <span class="n">stream_logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Setting up processor: process-</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">process_ID</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
 
         <span class="c1"># Set the process names</span>
         <span class="n">name</span> <span class="o">=</span> <span class="s1">&#39;binarycpython population thread </span><span class="si">{}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">ID</span><span class="p">)</span>
@@ -1326,12 +1339,12 @@
                 <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;_store_memaddr&quot;</span><span class="p">],</span>
             <span class="p">),</span>
             <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
-            <span class="mi">0</span><span class="p">,</span>
+            <span class="mi">1</span><span class="p">,</span>
         <span class="p">)</span>
 
-        <span class="c1"># Set the ensemble memaddr</span>
+        <span class="c1"># Set the ensemble memory address</span>
         <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">bse_options</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;ensemble&quot;</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
-            <span class="c1"># set persistent data memaddr if necessary.</span>
+            <span class="c1"># set persistent data memory address if necessary.</span>
             <span class="n">persistent_data_memaddr</span> <span class="o">=</span> <span class="p">(</span>
                 <span class="n">_binary_c_bindings</span><span class="o">.</span><span class="n">return_persistent_data_memaddr</span><span class="p">()</span>
             <span class="p">)</span>
@@ -1343,7 +1356,7 @@
             <span class="n">verbose_print</span><span class="p">(</span>
                 <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">Using persistent_data memaddr: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">persistent_data_memaddr</span><span class="p">),</span>
                 <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
-                <span class="mi">0</span><span class="p">,</span>
+                <span class="mi">1</span><span class="p">,</span>
             <span class="p">)</span>
 
         <span class="c1"># Set up local variables</span>
@@ -1398,7 +1411,7 @@
             <span class="c1"># they match the keys known to binary_c.</span>
             <span class="c1"># Won&#39;t do that every system cause that is a bit of a waste of computing time.</span>
             <span class="k">if</span> <span class="n">number_of_systems_run</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
-                <span class="c1"># TODO: Put this someplace else and wrap in a functioncall</span>
+                <span class="c1"># TODO: Put this someplace else and wrap in a function call</span>
                 <span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">full_system_dict</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span>
                     <span class="k">if</span> <span class="ow">not</span> <span class="n">key</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">available_keys</span><span class="p">:</span>
                         <span class="c1"># Deal with special keys</span>
@@ -1426,7 +1439,7 @@
             <span class="n">verbose_print</span><span class="p">(</span>
                 <span class="s2">&quot;Process </span><span class="si">{}</span><span class="s2"> is handling system </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">ID</span><span class="p">,</span> <span class="n">system_number</span><span class="p">),</span>
                 <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
-                <span class="mi">2</span><span class="p">,</span>
+                <span class="mi">1</span><span class="p">,</span>
             <span class="p">)</span>
 
             <span class="c1"># In some cases, the whole run crashes. To be able to figure out which system</span>
@@ -1511,13 +1524,16 @@
             <span class="s2">&quot;w&quot;</span><span class="p">,</span>
         <span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
             <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s2">&quot;FINISHING&quot;</span><span class="p">)</span>
-        <span class="n">stream_logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Process-</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">process_ID</span><span class="si">}</span><span class="s2"> is finishing.&quot;</span><span class="p">)</span>
+
+        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;verbosity&#39;</span><span class="p">]</span> <span class="o">&gt;=</span> <span class="n">_LOGGER_VERBOSITY_LEVEL</span><span class="p">:</span>
+            <span class="n">stream_logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Process-</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">process_ID</span><span class="si">}</span><span class="s2"> is finishing.&quot;</span><span class="p">)</span>
+
 
         <span class="c1"># Handle ensemble output: is ensemble==1, then either directly write that data to a file, or combine everything into 1 file.</span>
         <span class="n">ensemble_json</span> <span class="o">=</span> <span class="p">{}</span>  <span class="c1"># Make sure it exists already</span>
         <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">bse_options</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;ensemble&quot;</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
             <span class="n">verbose_print</span><span class="p">(</span>
-                <span class="s2">&quot;Process </span><span class="si">{}</span><span class="s2">: is freeing ensemble output (using persisten_data memaddr </span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                <span class="s2">&quot;Process </span><span class="si">{}</span><span class="s2">: is freeing ensemble output (using persistent_data memaddr </span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                     <span class="n">ID</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">persistent_data_memory_dict</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">process_ID</span><span class="p">]</span>
                 <span class="p">),</span>
                 <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
@@ -1572,7 +1588,7 @@
                     <span class="p">)</span>
                 <span class="p">)</span>
 
-        <span class="c1"># free store mem:</span>
+        <span class="c1"># free store memory:</span>
         <span class="n">_binary_c_bindings</span><span class="o">.</span><span class="n">free_store_memaddr</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;_store_memaddr&quot;</span><span class="p">])</span>
 
         <span class="c1"># Return a set of results and errors</span>
@@ -1610,7 +1626,7 @@
 
             <span class="p">),</span>
             <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
-            <span class="mi">0</span><span class="p">,</span>
+            <span class="mi">1</span><span class="p">,</span>
         <span class="p">)</span>
 
         <span class="c1"># Write summary</span>
@@ -1651,12 +1667,14 @@
             <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s2">&quot;FINISHED&quot;</span><span class="p">)</span>
 
         <span class="n">result_queue</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">output_dict</span><span class="p">)</span>
-        <span class="n">stream_logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Process-</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">process_ID</span><span class="si">}</span><span class="s2"> is finished.&quot;</span><span class="p">)</span>
+
+        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;verbosity&#39;</span><span class="p">]</span> <span class="o">&gt;=</span> <span class="n">_LOGGER_VERBOSITY_LEVEL</span><span class="p">:</span>
+            <span class="n">stream_logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Process-</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">process_ID</span><span class="si">}</span><span class="s2"> is finished.&quot;</span><span class="p">)</span>
 
         <span class="c1"># Clean up the interpolators if they exist</span>
 
         <span class="c1"># TODO: make a cleanup function for the individual threads</span>
-        <span class="c1"># TODO: make sure this is necessary. Actually its probably not, because we have a centralized queue</span>
+        <span class="c1"># TODO: make sure this is necessary. Actually its probably not, because we have a centralised queue</span>
 
         <span class="k">return</span>
 
@@ -1691,7 +1709,7 @@
             <span class="n">population</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span>
         <span class="p">)</span>
 
-        <span class="c1"># TODO: add call to function that cleans up the temp customlogging dir,</span>
+        <span class="c1"># TODO: add call to function that cleans up the temp custom logging dir,</span>
         <span class="c1">#   and unloads the loaded libraries.</span>
         <span class="c1"># TODO: make a switch to turn this off</span>
 
@@ -1760,14 +1778,14 @@
                 <span class="p">[</span><span class="n">key</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;ensemble_filter_&quot;</span><span class="p">)</span> <span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">bse_options</span><span class="p">]</span>
             <span class="p">):</span>
                 <span class="n">verbose_print</span><span class="p">(</span>
-                    <span class="s2">&quot;Warning: Running the ensemble without any filter requires alot of available RAM&quot;</span><span class="p">,</span>
+                    <span class="s2">&quot;Warning: Running the ensemble without any filter requires a lot of available RAM&quot;</span><span class="p">,</span>
                     <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
                     <span class="mi">0</span><span class="p">,</span>
                 <span class="p">)</span>
 
             <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">bse_options</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;ensemble_filters_off&quot;</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">1</span><span class="p">:</span>
                 <span class="n">verbose_print</span><span class="p">(</span>
-                    <span class="s2">&quot;Warning: Running the ensemble without any filter requires alot of available RAM&quot;</span><span class="p">,</span>
+                    <span class="s2">&quot;Warning: Running the ensemble without any filter requires a lot of available RAM&quot;</span><span class="p">,</span>
                     <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
                     <span class="mi">0</span><span class="p">,</span>
                 <span class="p">)</span>
@@ -1775,7 +1793,7 @@
             <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;combine_ensemble_with_thread_joining&quot;</span><span class="p">]</span> <span class="o">==</span> <span class="kc">False</span><span class="p">:</span>
                 <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">custom_options</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;data_dir&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">):</span>
                     <span class="n">verbose_print</span><span class="p">(</span>
-                        <span class="s2">&quot;Error: chosen to write the ensemble output directly to files but data_dir isnt set&quot;</span><span class="p">,</span>
+                        <span class="s2">&quot;Error: chosen to write the ensemble output directly to files but data_dir isn&#39;t set&quot;</span><span class="p">,</span>
                         <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
                         <span class="mi">0</span><span class="p">,</span>
                     <span class="p">)</span>
@@ -1789,23 +1807,24 @@
 
             <span class="c1"># Put in check</span>
             <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;_grid_variables&quot;</span><span class="p">])</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
-                <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Error: you havent defined any grid variables! Aborting&quot;</span><span class="p">)</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Error: you haven&#39;t defined any grid variables! Aborting&quot;</span><span class="p">)</span>
                 <span class="k">raise</span> <span class="ne">ValueError</span>
 
             <span class="c1"># Set up the grid code with a dry run option to see total probability</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">_generate_grid_code</span><span class="p">(</span><span class="n">dry_run</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+            <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;do_dry_run&#39;</span><span class="p">]:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">_generate_grid_code</span><span class="p">(</span><span class="n">dry_run</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
 
-            <span class="c1"># Load the grid code</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">_load_grid_function</span><span class="p">()</span>
+                <span class="c1"># Load the grid code</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">_load_grid_function</span><span class="p">()</span>
 
-            <span class="c1"># Do a dry run</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">_dry_run</span><span class="p">()</span>
+                <span class="c1"># Do a dry run</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">_dry_run</span><span class="p">()</span>
 
-            <span class="nb">print</span><span class="p">(</span>
-                <span class="s2">&quot;Total starcount for this run will be: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
-                    <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;_total_starcount&quot;</span><span class="p">]</span>
+                <span class="nb">print</span><span class="p">(</span>
+                    <span class="s2">&quot;Total starcount for this run will be: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                        <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;_total_starcount&quot;</span><span class="p">]</span>
+                    <span class="p">)</span>
                 <span class="p">)</span>
-            <span class="p">)</span>
 
             <span class="c1">#######################</span>
             <span class="c1"># Reset values and prepare the grid function</span>
@@ -1835,8 +1854,9 @@
             <span class="c1"># TODO: fix this function</span>
             <span class="c1"># self._load_source_file_function()</span>
 
-            <span class="c1"># Do a dry run</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">_dry_run_source_file</span><span class="p">()</span>
+            <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;do_dry_run&#39;</span><span class="p">]:</span>
+                <span class="c1"># Do a dry run</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">_dry_run_source_file</span><span class="p">()</span>
 
             <span class="nb">print</span><span class="p">(</span>
                 <span class="s2">&quot;Total starcount for this run will be: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
@@ -1899,7 +1919,7 @@
             <span class="k">del</span> <span class="n">Moecache</span><span class="p">[</span><span class="n">key</span><span class="p">]</span>
 
     <span class="c1">###################################################</span>
-    <span class="c1"># Gridcode functions</span>
+    <span class="c1"># Grid code functions</span>
     <span class="c1">#</span>
     <span class="c1"># Function below are used to run populations with</span>
     <span class="c1"># a variable grid</span>
@@ -1917,13 +1937,13 @@
 <span class="sd">        # TODO: Add correct logging everywhere</span>
 <span class="sd">        # TODO: add part to handle separation if orbital_period is added. Idea. use default values</span>
 <span class="sd">        #   for orbital parameters and possibly overwrite those or something.</span>
-<span class="sd">        # TODO: add centering center left right for the spacing.</span>
+<span class="sd">        # TODO: add centre left right for the spacing.</span>
 <span class="sd">        # TODO: add sensible description to this function.</span>
 <span class="sd">        # TODO: Check whether all the probability and phasevol values are correct.</span>
 <span class="sd">        # TODO: import only the necessary packages/functions</span>
 <span class="sd">        # TODO: Put all the masses, eccentricities and periods in there already</span>
-<span class="sd">        # TODO: Put the certain blocks that are repeated in some subfunctions</span>
-<span class="sd">        # TODO: make sure running systems with multicplity 3+ is also possible.</span>
+<span class="sd">        # TODO: Put the certain blocks that are repeated in some sub functions</span>
+<span class="sd">        # TODO: make sure running systems with multiplicity 3+ is also possible.</span>
 
 <span class="sd">        Results in a generated file that contains a system_generator function.</span>
 <span class="sd">        &quot;&quot;&quot;</span>
@@ -2027,8 +2047,8 @@
             <span class="n">grid_variable</span> <span class="o">=</span> <span class="n">grid_variable_el</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
 
             <span class="c1">#########################</span>
-            <span class="c1"># Setting up the forloop</span>
-            <span class="c1"># Add comment for forloop</span>
+            <span class="c1"># Setting up the for loop</span>
+            <span class="c1"># Add comment for for loop</span>
             <span class="n">code_string</span> <span class="o">+=</span> <span class="p">(</span>
                 <span class="n">indent</span> <span class="o">*</span> <span class="n">depth</span>
                 <span class="o">+</span> <span class="s2">&quot;# for loop for </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">grid_variable</span><span class="p">[</span><span class="s2">&quot;parameter_name&quot;</span><span class="p">])</span>
@@ -2072,6 +2092,7 @@
             <span class="c1">#     + &quot;\n&quot;</span>
             <span class="c1"># )</span>
 
+            <span class="c1"># TODO: make sure this works</span>
             <span class="c1"># Adding for loop structure</span>
             <span class="n">code_string</span> <span class="o">+=</span> <span class="p">(</span>
                 <span class="n">indent</span> <span class="o">*</span> <span class="n">depth</span>
@@ -2081,8 +2102,29 @@
                 <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span>
             <span class="p">)</span>
 
+            <span class="c1"># code_string += (</span>
+            <span class="c1">#     indent * depth</span>
+            <span class="c1">#     + &quot;for {}_sample_number in range({}):&quot;.format(</span>
+            <span class="c1">#         grid_variable[&quot;name&quot;], grid_variable[&quot;resolution&quot;]</span>
+            <span class="c1">#     )</span>
+            <span class="c1">#     + &quot;\n&quot;</span>
+            <span class="c1"># )</span>
+            <span class="c1"># code_string += (</span>
+            <span class="c1">#     indent * (depth+1)</span>
+            <span class="c1">#     + &quot;{} = sampled_values_{}[0] + ((sampled_values_{}[-1]-sampled_values_{}[0])/{}) * {}_sample_number&quot;.format(</span>
+            <span class="c1">#         grid_variable[&quot;name&quot;], grid_variable[&quot;name&quot;], grid_variable[&quot;name&quot;], grid_variable[&quot;name&quot;], grid_variable[&quot;resolution&quot;], grid_variable[&quot;name&quot;]</span>
+            <span class="c1">#     )</span>
+            <span class="c1">#     + &quot;\n&quot;</span>
+            <span class="c1"># )</span>
+
+
+
+
+
+
+
             <span class="c1">#################################################################################</span>
-            <span class="c1"># Check condition and generate forloop</span>
+            <span class="c1"># Check condition and generate for loop</span>
 
             <span class="c1"># If the grid variable has a condition, write the check and the action</span>
             <span class="k">if</span> <span class="n">grid_variable</span><span class="p">[</span><span class="s2">&quot;condition&quot;</span><span class="p">]:</span>
@@ -2110,7 +2152,7 @@
                 <span class="p">)</span>
                 <span class="n">code_string</span> <span class="o">+=</span> <span class="n">indent</span> <span class="o">*</span> <span class="p">(</span><span class="n">depth</span> <span class="o">+</span> <span class="mi">2</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;continue&quot;</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span>
 
-                <span class="c1"># Add some whiteline</span>
+                <span class="c1"># Add some white line</span>
                 <span class="n">code_string</span> <span class="o">+=</span> <span class="n">indent</span> <span class="o">*</span> <span class="p">(</span><span class="n">depth</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span>
 
             <span class="c1">##############3</span>
@@ -2131,7 +2173,7 @@
             <span class="p">)</span>
             <span class="n">code_string</span> <span class="o">+=</span> <span class="n">indent</span> <span class="o">*</span> <span class="p">(</span><span class="n">depth</span> <span class="o">+</span> <span class="mi">2</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;continue&quot;</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span>
 
-            <span class="c1"># Add some whiteline</span>
+            <span class="c1"># Add some white line</span>
             <span class="n">code_string</span> <span class="o">+=</span> <span class="n">indent</span> <span class="o">*</span> <span class="p">(</span><span class="n">depth</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span>
 
             <span class="c1">#########################</span>
@@ -2223,7 +2265,7 @@
 
             <span class="c1"># The final parts of the code, where things are returned, are within the deepest loop,</span>
             <span class="c1"># but in some cases code from a higher loop needs to go under it again</span>
-            <span class="c1"># SO I think its better to put an ifstatement here that checks</span>
+            <span class="c1"># SO I think its better to put an if statement here that checks</span>
             <span class="c1"># whether this is the last loop.</span>
             <span class="k">if</span> <span class="n">loopnr</span> <span class="o">==</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;_grid_variables&quot;</span><span class="p">])</span> <span class="o">-</span> <span class="mi">1</span><span class="p">:</span>
 
@@ -2261,7 +2303,7 @@
             <span class="p">)</span>
 
             <span class="c1"># Set phasevol</span>
-            <span class="c1"># TODO: fix. this isnt supposed to be the value that we give it here. discuss</span>
+            <span class="c1"># TODO: fix. this isn&#39;t supposed to be the value that we give it here. discuss</span>
             <span class="n">code_string</span> <span class="o">+=</span> <span class="n">indent</span> <span class="o">*</span> <span class="p">(</span><span class="n">depth</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;phasevol /= phasevol_</span><span class="si">{}</span><span class="se">\n</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                 <span class="n">grid_variable</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]</span>
             <span class="p">)</span>
@@ -2331,7 +2373,7 @@
         <span class="c1">#################################################################################</span>
         <span class="c1"># Stop of code generation. Here the code is saved and written</span>
 
-        <span class="c1"># Save the gridcode to the grid_options</span>
+        <span class="c1"># Save the grid code to the grid_options</span>
         <span class="n">verbose_print</span><span class="p">(</span>
             <span class="s2">&quot;Saving grid code to grid_options&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span> <span class="mi">1</span>
         <span class="p">)</span>
@@ -2353,6 +2395,8 @@
 
         <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">gridcode_filename</span><span class="p">,</span> <span class="s2">&quot;w&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">file</span><span class="p">:</span>
             <span class="n">file</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">code_string</span><span class="p">)</span>
+
+
     <span class="k">def</span> <span class="nf">_write_gridcode_system_call</span><span class="p">(</span>
         <span class="bp">self</span><span class="p">,</span> <span class="n">code_string</span><span class="p">,</span> <span class="n">indent</span><span class="p">,</span> <span class="n">depth</span><span class="p">,</span> <span class="n">grid_variable</span><span class="p">,</span> <span class="n">dry_run</span><span class="p">,</span> <span class="n">branchpoint</span>
     <span class="p">):</span>
@@ -2460,13 +2504,10 @@
 
         <span class="k">if</span> <span class="ow">not</span> <span class="n">dry_run</span><span class="p">:</span>
             <span class="c1"># Handling of what is returned, or what is not.</span>
-            <span class="c1"># TODO: think of whether this is a good method</span>
-            <span class="c1"># code_string += indent * (depth + 2) + &quot;if (self.grid_options[&#39;multiplicity&#39;] &gt;= 2): print(&#39;phasevol_q: &#39;,phasevol_q); print(&#39;phasevol_log10per: &#39;,phasevol_log10per);\n&quot;</span>
             <span class="n">code_string</span> <span class="o">+=</span> <span class="n">indent</span> <span class="o">*</span> <span class="p">(</span><span class="n">depth</span> <span class="o">+</span> <span class="mi">2</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;yield(parameter_dict)</span><span class="se">\n</span><span class="s2">&quot;</span>
 
         <span class="c1"># If its a dry run, dont do anything with it</span>
         <span class="k">else</span><span class="p">:</span>
-            <span class="c1"># code_string += indent * (depth + 2) + &quot;if (self.grid_options[&#39;multiplicity&#39;] &gt;= 2): print(phasevol_q)\n&quot;</span>
             <span class="n">code_string</span> <span class="o">+=</span> <span class="n">indent</span> <span class="o">*</span> <span class="p">(</span><span class="n">depth</span> <span class="o">+</span> <span class="mi">2</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;pass</span><span class="se">\n</span><span class="s2">&quot;</span>
 
         <span class="n">code_string</span> <span class="o">+=</span> <span class="n">indent</span> <span class="o">*</span> <span class="p">(</span><span class="n">depth</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;#&quot;</span> <span class="o">*</span> <span class="mi">40</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span>
@@ -2475,7 +2516,7 @@
 
     <span class="k">def</span> <span class="nf">_load_grid_function</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">        Functon that loads the script containing the grid code.</span>
+<span class="sd">        Function that loads the script containing the grid code.</span>
 
 <span class="sd">        TODO: Update this description</span>
 <span class="sd">        Test function to run grid stuff. mostly to test the import</span>
@@ -2547,10 +2588,10 @@
             <span class="nb">print</span><span class="p">(</span><span class="n">info_string</span><span class="p">)</span>
 
     <span class="c1">###################################################</span>
-    <span class="c1"># Montecarlo functions</span>
+    <span class="c1"># Monte Carlo functions</span>
     <span class="c1">#</span>
     <span class="c1"># Functions below are used to run populations with</span>
-    <span class="c1"># Monte carlo</span>
+    <span class="c1"># Monte Carlo</span>
     <span class="c1">###################################################</span>
 
     <span class="c1">###################################################</span>
@@ -2593,7 +2634,7 @@
             <span class="n">minimal_verbosity</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
         <span class="p">)</span>
 
-        <span class="c1"># We can choose to perform a check on the sourcefile, which checks if the lines start with &#39;binary_c&#39;</span>
+        <span class="c1"># We can choose to perform a check on the source file, which checks if the lines start with &#39;binary_c&#39;</span>
         <span class="k">if</span> <span class="n">check</span><span class="p">:</span>
             <span class="n">source_file_check_filehandle</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span>
                 <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;source_file_filename&quot;</span><span class="p">],</span> <span class="s2">&quot;r&quot;</span>
@@ -2618,7 +2659,7 @@
 
     <span class="k">def</span> <span class="nf">_dict_from_line_source_file</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">line</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">        Function that creates a dict from a binary_c argline</span>
+<span class="sd">        Function that creates a dict from a binary_c arg line</span>
 <span class="sd">        &quot;&quot;&quot;</span>
 
         <span class="k">if</span> <span class="n">line</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;binary_c &quot;</span><span class="p">):</span>
@@ -3117,18 +3158,16 @@
         <span class="n">include_defaults</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span>
     <span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
         <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">        Function that loops over the gridcode and writes the generated parameters to a file.</span>
-<span class="sd">        In the form of a commandline call</span>
+<span class="sd">        Function that loops over the grid code and writes the generated parameters to a file.</span>
+<span class="sd">        In the form of a command line call</span>
 
-<span class="sd">        Only useful when you have a variable grid as system_generator. MC wouldnt be that useful</span>
+<span class="sd">        Only useful when you have a variable grid as system_generator. MC wouldn&#39;t be that useful</span>
 
 <span class="sd">        Also, make sure that in this export there are the basic parameters</span>
 <span class="sd">        like m1,m2,sep, orb-per, ecc, probability etc.</span>
 
 <span class="sd">        On default this will write to the datadir, if it exists</span>
 
-<span class="sd">        WARNING; dont use yet. not fully tested.</span>
-
 <span class="sd">        Tasks:</span>
 <span class="sd">            - TODO: test this function</span>
 <span class="sd">            - TODO: make sure the binary_c_python .. output file has a unique name</span>
@@ -3136,7 +3175,10 @@
 <span class="sd">        Args:</span>
 <span class="sd">            output_dir: (optional, default = None) directory where to write the file to. If custom_options[&#39;data_dir&#39;] is present, then that one will be used first, and then the output_dir</span>
 <span class="sd">            output_filename: (optional, default = None) filename of the output. If not set it will be called &quot;binary_c_calls.txt&quot;</span>
-<span class="sd">            include_defaults: (optional, default = None) whether to include the defaults of binary_c in the lines that are written. Beware that this will result in very long lines, and it might be better to just export the binary_c defaults and keep them in a seperate file.</span>
+<span class="sd">            include_defaults: (optional, default = None) whether to include the defaults of binary_c in the lines that are written. Beware that this will result in very long lines, and it might be better to just export the binary_c defaults and keep them in a separate file.</span>
+
+<span class="sd">        Returns:</span>
+<span class="sd">            filename: filename that was used to write the calls to</span>
 <span class="sd">        &quot;&quot;&quot;</span>
 
         <span class="c1"># Check if there is no compiled grid yet. If not, lets try to build it first.</span>
@@ -3155,7 +3197,7 @@
 
             <span class="c1"># Put in check</span>
             <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;_grid_variables&quot;</span><span class="p">])</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
-                <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Error: you havent defined any grid variables! Aborting&quot;</span><span class="p">)</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Error: you haven&#39;t defined any grid variables! Aborting&quot;</span><span class="p">)</span>
                 <span class="k">raise</span> <span class="ne">ValueError</span>
 
             <span class="c1">#</span>
@@ -3169,7 +3211,7 @@
             <span class="c1"># Check if there is an output dir configured</span>
             <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">custom_options</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;data_dir&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">):</span>
                 <span class="n">binary_c_calls_output_dir</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">custom_options</span><span class="p">[</span><span class="s2">&quot;data_dir&quot;</span><span class="p">]</span>
-            <span class="c1"># otherwise check if theres one passed to the function</span>
+            <span class="c1"># otherwise check if there&#39;s one passed to the function</span>
             <span class="k">else</span><span class="p">:</span>
                 <span class="k">if</span> <span class="ow">not</span> <span class="n">output_dir</span><span class="p">:</span>
                     <span class="nb">print</span><span class="p">(</span>
@@ -3178,7 +3220,7 @@
                     <span class="k">raise</span> <span class="ne">ValueError</span>
                 <span class="n">binary_c_calls_output_dir</span> <span class="o">=</span> <span class="n">output_dir</span>
 
-            <span class="c1"># check if theres a filename passed to the function</span>
+            <span class="c1"># check if there&#39;s a filename passed to the function</span>
             <span class="k">if</span> <span class="n">output_filename</span><span class="p">:</span>
                 <span class="n">binary_c_calls_filename</span> <span class="o">=</span> <span class="n">output_filename</span>
             <span class="c1"># otherwise use default value</span>
@@ -3209,7 +3251,11 @@
                     <span class="n">file</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">binary_cmdline_string</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>
         <span class="k">else</span><span class="p">:</span>
             <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Error. No grid function found!&quot;</span><span class="p">)</span>
-            <span class="k">raise</span> <span class="ne">ValueError</span></div>
+            <span class="k">raise</span> <span class="ne">ValueError</span>
+
+
+        <span class="k">return</span> <span class="n">binary_c_calls_full_filename</span></div>
+
 
     <span class="k">def</span> <span class="nf">_cleanup_defaults</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;</span>
@@ -3225,7 +3271,7 @@
 <span class="sd">        TODO: Rethink this functionality. seems a bit double, could also be just outside of the class</span>
 <span class="sd">        &quot;&quot;&quot;</span>
 
-        <span class="n">binary_c_defaults</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_return_binary_c_defaults</span><span class="p">()</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
+        <span class="n">binary_c_defaults</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">return_binary_c_defaults</span><span class="p">()</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
         <span class="n">cleaned_dict</span> <span class="o">=</span> <span class="n">filter_arg_dict</span><span class="p">(</span><span class="n">binary_c_defaults</span><span class="p">)</span>
 
         <span class="k">return</span> <span class="n">cleaned_dict</span>
@@ -3253,7 +3299,7 @@
 
             <span class="c1"># TODO: Unset custom logging code</span>
 
-            <span class="c1"># TODO: Unset function memory adress</span>
+            <span class="c1"># TODO: Unset function memory address</span>
             <span class="c1"># print(self.grid_options[&quot;custom_logging_func_memaddr&quot;])</span>
 
             <span class="c1"># remove shared library files</span>
@@ -3271,7 +3317,7 @@
             <span class="p">)</span>
 
             <span class="c1"># TODO: make sure that these also work. not fully sure if necessary tho.</span>
-            <span class="c1">#   whether its a single file, or a dict of files/memaddresses</span>
+            <span class="c1">#   whether its a single file, or a dict of files/mem addresses</span>
 
         <span class="k">if</span> <span class="n">evol_type</span> <span class="o">==</span> <span class="s2">&quot;MC&quot;</span><span class="p">:</span>
             <span class="k">pass</span>
@@ -3294,7 +3340,7 @@
 <span class="sd">        Function to set the loggers for the execution of the grid</span>
 <span class="sd">        &quot;&quot;&quot;</span>
 
-        <span class="c1"># Set logfile</span>
+        <span class="c1"># Set log file</span>
         <span class="n">binary_c_logfile</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;log_file&quot;</span><span class="p">]</span>
 
         <span class="c1"># Create directory</span>
@@ -3312,7 +3358,7 @@
             <span class="s2">&quot;</span><span class="si">%(asctime)s</span><span class="s2"> - </span><span class="si">%(name)s</span><span class="s2"> - </span><span class="si">%(levelname)s</span><span class="s2"> - </span><span class="si">%(message)s</span><span class="s2">&quot;</span>
         <span class="p">)</span>
 
-        <span class="c1"># Make and add filehandlers</span>
+        <span class="c1"># Make and add file handlers</span>
         <span class="c1"># make handler for output to file</span>
         <span class="n">handler_file</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">FileHandler</span><span class="p">(</span><span class="n">filename</span><span class="o">=</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">binary_c_logfile</span><span class="p">))</span>
         <span class="n">handler_file</span><span class="o">.</span><span class="n">setFormatter</span><span class="p">(</span><span class="n">log_formatter</span><span class="p">)</span>
@@ -3388,7 +3434,7 @@
 
                 <span class="c1"># If not, write the failing systems to files unique to each process</span>
                 <span class="k">else</span><span class="p">:</span>
-                    <span class="c1"># Write arglines to file</span>
+                    <span class="c1"># Write arg lines to file</span>
                     <span class="n">argstring</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_return_argline</span><span class="p">(</span><span class="n">system_dict</span><span class="p">)</span>
                     <span class="k">with</span> <span class="nb">open</span><span class="p">(</span>
                         <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span>
@@ -3406,9 +3452,9 @@
                 <span class="mi">2</span><span class="p">,</span>
             <span class="p">)</span>
 
-<div class="viewcode-block" id="Population.set_moe_distefano_settings"><a class="viewcode-back" href="../../../grid.html#binarycpython.utils.grid.Population.set_moe_distefano_settings">[docs]</a>    <span class="k">def</span> <span class="nf">set_moe_distefano_settings</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">options</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
+<div class="viewcode-block" id="Population.set_moe_di_stefano_settings"><a class="viewcode-back" href="../../../grid.html#binarycpython.utils.grid.Population.set_moe_di_stefano_settings">[docs]</a>    <span class="k">def</span> <span class="nf">set_moe_di_stefano_settings</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">options</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">        Function to set user input configurations for the moe &amp; distefano methods</span>
+<span class="sd">        Function to set user input configurations for the moe &amp; di Stefano methods</span>
 <span class="sd">    </span>
 <span class="sd">        If nothing is passed then we just use the default options</span>
 <span class="sd">        &quot;&quot;&quot;</span>
@@ -3423,15 +3469,15 @@
             <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;tmp_dir&quot;</span><span class="p">],</span> <span class="s2">&quot;moe_distefano&quot;</span><span class="p">),</span> <span class="s2">&quot;moeopts.dat&quot;</span><span class="p">),</span> <span class="s2">&quot;w&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
                 <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;m&amp;s_options&#39;</span><span class="p">],</span> <span class="n">indent</span><span class="o">=</span><span class="mi">4</span><span class="p">))</span></div>
 
-    <span class="k">def</span> <span class="nf">_load_moe_distefano_data</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+    <span class="k">def</span> <span class="nf">_load_moe_di_stefano_data</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">        Function to load the moe &amp; distefano data</span>
+<span class="sd">        Function to load the moe &amp; di stefano data</span>
 <span class="sd">        &quot;&quot;&quot;</span>
 
-        <span class="c1"># Only if the grid is loaded and moecache contains information</span>
+        <span class="c1"># Only if the grid is loaded and Moecache contains information</span>
         <span class="k">if</span> <span class="p">(</span><span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;_loaded_ms_data&#39;</span><span class="p">])</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">Moecache</span><span class="p">:</span>
-            <span class="c1"># Load the json data</span>
-            <span class="n">json_data</span> <span class="o">=</span> <span class="n">get_moe_distefano_dataset</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;m&amp;s_options&#39;</span><span class="p">],</span> <span class="n">verbosity</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;verbosity&#39;</span><span class="p">])</span>
+            <span class="c1"># Load the JSON data</span>
+            <span class="n">json_data</span> <span class="o">=</span> <span class="n">get_moe_di_stefano_dataset</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;m&amp;s_options&#39;</span><span class="p">],</span> <span class="n">verbosity</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;verbosity&#39;</span><span class="p">])</span>
 
             <span class="c1"># entry of log10M1 is a list containing 1 dict. We can take the dict out of the list</span>
             <span class="n">json_data</span><span class="p">[</span><span class="s2">&quot;log10M1&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">json_data</span><span class="p">[</span><span class="s2">&quot;log10M1&quot;</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span>
@@ -3441,7 +3487,7 @@
             <span class="k">if</span> <span class="ow">not</span> <span class="n">logmasses</span><span class="p">:</span>
                 <span class="n">msg</span> <span class="o">=</span> <span class="s2">&quot;The table does not contain masses.&quot;</span>
                 <span class="n">verbose_print</span><span class="p">(</span>
-                    <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">Moe_de_Stefano_2017: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">msg</span><span class="p">),</span>
+                    <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">Moe_di_Stefano_2017: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">msg</span><span class="p">),</span>
                     <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
                     <span class="mi">0</span><span class="p">,</span>
                 <span class="p">)</span>
@@ -3464,7 +3510,7 @@
                 <span class="k">if</span> <span class="ow">not</span> <span class="p">(</span><span class="n">logperiods</span> <span class="o">==</span> <span class="n">current_logperiods</span><span class="p">):</span>
                     <span class="n">msg</span> <span class="o">=</span> <span class="s2">&quot;Period values are not consistent throughout the dataset&quot;</span>
                     <span class="n">verbose_print</span><span class="p">(</span>
-                        <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">Moe_de_Stefano_2017: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">msg</span><span class="p">),</span>
+                        <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">Moe_di_Stefano_2017: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">msg</span><span class="p">),</span>
                         <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
                         <span class="mi">0</span><span class="p">,</span>
                     <span class="p">)</span>
@@ -3480,7 +3526,7 @@
                     <span class="p">):</span>
                         <span class="n">msg</span> <span class="o">=</span> <span class="s2">&quot;Period spacing is not consistent throughout the dataset&quot;</span>
                         <span class="n">verbose_print</span><span class="p">(</span>
-                            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">Moe_de_Stefano_2017: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">msg</span><span class="p">),</span>
+                            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">Moe_di_Stefano_2017: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">msg</span><span class="p">),</span>
                             <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
                             <span class="mi">0</span><span class="p">,</span>
                         <span class="p">)</span>
@@ -3582,7 +3628,7 @@
                     <span class="c1">#</span>
                     <span class="n">qs</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">json_data</span><span class="p">[</span><span class="s2">&quot;log10M1&quot;</span><span class="p">][</span><span class="n">logmass</span><span class="p">][</span><span class="s2">&quot;logP&quot;</span><span class="p">][</span><span class="n">logperiod</span><span class="p">][</span><span class="s2">&quot;q&quot;</span><span class="p">])</span>
 
-                    <span class="c1"># Fill the data and &#39;normalize&#39;</span>
+                    <span class="c1"># Fill the data and &#39;normalise&#39;</span>
                     <span class="n">qdata</span> <span class="o">=</span> <span class="n">fill_data</span><span class="p">(</span>
                         <span class="n">qs</span><span class="p">,</span> <span class="n">json_data</span><span class="p">[</span><span class="s2">&quot;log10M1&quot;</span><span class="p">][</span><span class="n">logmass</span><span class="p">][</span><span class="s2">&quot;logP&quot;</span><span class="p">][</span><span class="n">logperiod</span><span class="p">][</span><span class="s2">&quot;q&quot;</span><span class="p">]</span>
                     <span class="p">)</span>
@@ -3600,7 +3646,7 @@
                     <span class="c1"># eccentricity distributions as a function of mass, period, ecc</span>
                     <span class="n">eccs</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">json_data</span><span class="p">[</span><span class="s2">&quot;log10M1&quot;</span><span class="p">][</span><span class="n">logmass</span><span class="p">][</span><span class="s2">&quot;logP&quot;</span><span class="p">][</span><span class="n">logperiod</span><span class="p">][</span><span class="s2">&quot;e&quot;</span><span class="p">])</span>
 
-                    <span class="c1"># Fill the data and &#39;normalize&#39;</span>
+                    <span class="c1"># Fill the data and &#39;normalise&#39;</span>
                     <span class="n">ecc_data</span> <span class="o">=</span> <span class="n">fill_data</span><span class="p">(</span>
                         <span class="n">eccs</span><span class="p">,</span> <span class="n">json_data</span><span class="p">[</span><span class="s2">&quot;log10M1&quot;</span><span class="p">][</span><span class="n">logmass</span><span class="p">][</span><span class="s2">&quot;logP&quot;</span><span class="p">][</span><span class="n">logperiod</span><span class="p">][</span><span class="s2">&quot;e&quot;</span><span class="p">]</span>
                     <span class="p">)</span>
@@ -3640,35 +3686,35 @@
                 <span class="p">)</span>
 
             <span class="n">verbose_print</span><span class="p">(</span>
-                <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">Moe_de_Stefano_2017: Length period_distributions table: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">Moe_di_Stefano_2017: Length period_distributions table: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                     <span class="nb">len</span><span class="p">(</span><span class="n">Moecache</span><span class="p">[</span><span class="s2">&quot;period_distributions&quot;</span><span class="p">])</span>
                 <span class="p">),</span>
                 <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
                 <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
             <span class="p">)</span>
             <span class="n">verbose_print</span><span class="p">(</span>
-                <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">Moe_de_Stefano_2017: Length multiplicity table: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">Moe_di_Stefano_2017: Length multiplicity table: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                     <span class="nb">len</span><span class="p">(</span><span class="n">Moecache</span><span class="p">[</span><span class="s2">&quot;multiplicity_table&quot;</span><span class="p">])</span>
                 <span class="p">),</span>
                 <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
                 <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
             <span class="p">)</span>
             <span class="n">verbose_print</span><span class="p">(</span>
-                <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">Moe_de_Stefano_2017: Length q table: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">Moe_di_Stefano_2017: Length q table: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                     <span class="nb">len</span><span class="p">(</span><span class="n">Moecache</span><span class="p">[</span><span class="s2">&quot;q_distributions&quot;</span><span class="p">])</span>
                 <span class="p">),</span>
                 <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
                 <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
             <span class="p">)</span>
             <span class="n">verbose_print</span><span class="p">(</span>
-                <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">Moe_de_Stefano_2017: Length ecc table: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">Moe_di_Stefano_2017: Length ecc table: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                     <span class="nb">len</span><span class="p">(</span><span class="n">Moecache</span><span class="p">[</span><span class="s2">&quot;ecc_distributions&quot;</span><span class="p">])</span>
                 <span class="p">),</span>
                 <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
                 <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
             <span class="p">)</span>
 
-            <span class="c1"># Write to logfile</span>
+            <span class="c1"># Write to log file</span>
             <span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;tmp_dir&quot;</span><span class="p">],</span> <span class="s2">&quot;moe_distefano&quot;</span><span class="p">),</span> <span class="n">exist_ok</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
             <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;tmp_dir&quot;</span><span class="p">],</span> <span class="s2">&quot;moe_distefano&quot;</span><span class="p">),</span> <span class="s2">&quot;moecache.json&quot;</span><span class="p">),</span> <span class="s2">&quot;w&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">cache_filehandle</span><span class="p">:</span>
                 <span class="n">cache_filehandle</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">Moecache</span><span class="p">,</span> <span class="n">indent</span><span class="o">=</span><span class="mi">4</span><span class="p">))</span>
@@ -3676,9 +3722,9 @@
             <span class="c1"># Signal that the data has been loaded</span>
             <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;_loaded_ms_data&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="kc">True</span>
 
-    <span class="k">def</span> <span class="nf">_set_moe_distefano_distributions</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+    <span class="k">def</span> <span class="nf">_set_moe_di_stefano_distributions</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">        Function to set the moe &amp; distefano distribution</span>
+<span class="sd">        Function to set the Moe &amp; di Stefano distribution</span>
 <span class="sd">        &quot;&quot;&quot;</span>
 
         <span class="c1">############################################################</span>
@@ -3687,7 +3733,7 @@
 
         <span class="n">max_multiplicity</span> <span class="o">=</span> <span class="n">get_max_multiplicity</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;m&amp;s_options&#39;</span><span class="p">][</span><span class="s2">&quot;multiplicity_modulator&quot;</span><span class="p">])</span>
         <span class="n">verbose_print</span><span class="p">(</span>
-            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">Moe_de_Stefano_2017: Max multiplicity = </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">max_multiplicity</span><span class="p">),</span>
+            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">Moe_di_Stefano_2017: Max multiplicity = </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">max_multiplicity</span><span class="p">),</span>
             <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
             <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
         <span class="p">)</span>
@@ -3737,7 +3783,7 @@
             <span class="n">gridtype</span><span class="o">=</span><span class="s2">&quot;centred&quot;</span><span class="p">,</span>
             <span class="n">dphasevol</span><span class="o">=</span><span class="s2">&quot;dlnm1&quot;</span><span class="p">,</span>
             <span class="n">precode</span><span class="o">=</span><span class="s1">&#39;M_1 = np.exp(lnm1); options[&quot;M_1&quot;]=M_1&#39;</span><span class="p">,</span>
-            <span class="n">probdist</span><span class="o">=</span><span class="s2">&quot;Moe_de_Stefano_2017_pdf({{</span><span class="si">{}</span><span class="s2">, </span><span class="si">{}</span><span class="s2">, </span><span class="si">{}</span><span class="s2">}}, verbosity=self.grid_options[&#39;verbosity&#39;])[&#39;total_probdens&#39;] if multiplicity == 1 else 1&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+            <span class="n">probdist</span><span class="o">=</span><span class="s2">&quot;Moe_di_Stefano_2017_pdf({{</span><span class="si">{}</span><span class="s2">, </span><span class="si">{}</span><span class="s2">, </span><span class="si">{}</span><span class="s2">}}, verbosity=self.grid_options[&#39;verbosity&#39;])[&#39;total_probdens&#39;] if multiplicity == 1 else 1&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                 <span class="nb">str</span><span class="p">(</span><span class="nb">dict</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;m&amp;s_options&#39;</span><span class="p">]))[</span><span class="mi">1</span><span class="p">:</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span> <span class="s2">&quot;&#39;multiplicity&#39;: multiplicity&quot;</span><span class="p">,</span> <span class="s2">&quot;&#39;M_1&#39;: M_1&quot;</span>
             <span class="p">),</span>
         <span class="p">)</span>
@@ -3999,7 +4045,7 @@
 
         <span class="c1"># Now we are at the last part.</span>
         <span class="c1"># Here we should combine all the information that we calculate and update the options</span>
-        <span class="c1"># dictionary. This will then be passed to the Moe_de_Stefano_2017_pdf to calculate</span>
+        <span class="c1"># dictionary. This will then be passed to the Moe_di_Stefano_2017_pdf to calculate</span>
         <span class="c1"># the real probability. The trick we use is to strip the options_dict as a string</span>
         <span class="c1"># and add some keys to it:</span>
 
@@ -4018,24 +4064,17 @@
             <span class="s1">&#39;&quot;ecc3&quot;: eccentricity3&#39;</span><span class="p">,</span>
         <span class="p">)</span>
 
-        <span class="n">probdist_addition</span> <span class="o">=</span> <span class="s2">&quot;Moe_de_Stefano_2017_pdf(</span><span class="si">{}</span><span class="s2">, verbosity=self.grid_options[&#39;verbosity&#39;])[&#39;total_probdens&#39;]&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+        <span class="n">probdist_addition</span> <span class="o">=</span> <span class="s2">&quot;Moe_di_Stefano_2017_pdf(</span><span class="si">{}</span><span class="s2">, verbosity=self.grid_options[&#39;verbosity&#39;])[&#39;total_probdens&#39;]&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
             <span class="n">updated_options</span>
         <span class="p">)</span>
 
         <span class="c1"># and finally the probability calculator</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;_grid_variables&quot;</span><span class="p">][</span><span class="bp">self</span><span class="o">.</span><span class="n">last_grid_variable</span><span class="p">()][</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;_grid_variables&quot;</span><span class="p">][</span><span class="bp">self</span><span class="o">.</span><span class="n">_last_grid_variable</span><span class="p">()][</span>
             <span class="s2">&quot;probdist&quot;</span>
         <span class="p">]</span> <span class="o">=</span> <span class="n">probdist_addition</span>
 
-        <span class="c1"># Add the options to the grid</span>
-        <span class="c1"># self.grid_options[&quot;_grid_variables&quot;][self.last_grid_variable()][</span>
-        <span class="c1">#     &quot;precode&quot;</span>
-        <span class="c1"># ] += &quot;; self.grid_options[&#39;m&amp;s_ensemble_options&#39;] = {}&quot;.format(o)</span>
-
         <span class="n">verbose_print</span><span class="p">(</span>
-            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">Moe_de_Stefano_2017: Added final call to the pdf function&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
-                <span class="n">max_multiplicity</span>
-            <span class="p">),</span>
+            <span class="s2">&quot;</span><span class="se">\t</span><span class="s2">Moe_di_Stefano_2017: Added final call to the pdf function&quot;</span><span class="p">,</span>
             <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
             <span class="n">_MS_VERBOSITY_LEVEL</span><span class="p">,</span>
         <span class="p">)</span>
@@ -4044,29 +4083,29 @@
         <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;_set_ms_grid&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="kc">True</span>
 
     <span class="c1">################################################################################################</span>
-<div class="viewcode-block" id="Population.Moe_de_Stefano_2017"><a class="viewcode-back" href="../../../grid.html#binarycpython.utils.grid.Population.Moe_de_Stefano_2017">[docs]</a>    <span class="k">def</span> <span class="nf">Moe_de_Stefano_2017</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">options</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
+<div class="viewcode-block" id="Population.Moe_di_Stefano_2017"><a class="viewcode-back" href="../../../grid.html#binarycpython.utils.grid.Population.Moe_di_Stefano_2017">[docs]</a>    <span class="k">def</span> <span class="nf">Moe_di_Stefano_2017</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">options</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">        Function to handle setting the user input settings,</span>
 <span class="sd">        set up the data and load that into interpolators and</span>
-<span class="sd">        and then set the distribution functions</span>
+<span class="sd">        then set the distribution functions</span>
 
 <span class="sd">        Takes a dictionary as its only argument</span>
 <span class="sd">        &quot;&quot;&quot;</span>
 
-        <span class="c1"># Set the userinput</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">set_moe_distefano_settings</span><span class="p">(</span><span class="n">options</span><span class="o">=</span><span class="n">options</span><span class="p">)</span>
+        <span class="c1"># Set the user input</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">set_moe_di_stefano_settings</span><span class="p">(</span><span class="n">options</span><span class="o">=</span><span class="n">options</span><span class="p">)</span>
 
         <span class="c1"># Load the data</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">_load_moe_distefano_data</span><span class="p">()</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_load_moe_di_stefano_data</span><span class="p">()</span>
 
         <span class="c1"># construct the grid here</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">_set_moe_distefano_distributions</span><span class="p">()</span></div>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_set_moe_di_stefano_distributions</span><span class="p">()</span></div>
 
     <span class="k">def</span> <span class="nf">_clean_interpolators</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">        Function to clean up the interpolators after a run</span>
 
-<span class="sd">        We look in the MoeCache global variable for items that are interpolators.</span>
+<span class="sd">        We look in the Moecache global variable for items that are interpolators.</span>
 <span class="sd">        Should be called by the general cleanup function AND the thread cleanup function</span>
 <span class="sd">        &quot;&quot;&quot;</span>
 
@@ -4092,7 +4131,12 @@
 
         <span class="c1"># Just return 1 if no option has been chosen</span>
         <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;multiplicity_fraction_function&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
-            <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Chosen not to use any multiplicity fraction.&quot;</span><span class="p">)</span>
+            <span class="n">verbose_print</span><span class="p">(</span>
+                <span class="s2">&quot;_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.&quot;</span><span class="p">,</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
+                <span class="mi">2</span><span class="p">,</span>
+            <span class="p">)</span>
+
             <span class="k">return</span> <span class="mi">1</span>
 
         <span class="c1"># Raise an error if the multiplicity is not set</span>
@@ -4106,7 +4150,7 @@
             <span class="n">verbose_print</span><span class="p">(</span>
                 <span class="s2">&quot;_calculate_multiplicity_fraction: Using Arenou 2010 to calculate multiplicity fractions&quot;</span><span class="p">,</span>
                 <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
-                <span class="mi">1</span><span class="p">,</span>
+                <span class="mi">2</span><span class="p">,</span>
             <span class="p">)</span>
 
             <span class="n">binary_fraction</span> <span class="o">=</span> <span class="n">Arenou2010_binary_fraction</span><span class="p">(</span><span class="n">system_dict</span><span class="p">[</span><span class="s1">&#39;M_1&#39;</span><span class="p">])</span>
@@ -4117,7 +4161,7 @@
             <span class="n">verbose_print</span><span class="p">(</span>
                 <span class="s2">&quot;_calculate_multiplicity_fraction: Using Rhagavan 2010 to calculate multiplicity fractions&quot;</span><span class="p">,</span>
                 <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
-                <span class="mi">1</span><span class="p">,</span>
+                <span class="mi">2</span><span class="p">,</span>
             <span class="p">)</span>
 
             <span class="n">binary_fraction</span> <span class="o">=</span> <span class="n">raghavan2010_binary_fraction</span><span class="p">(</span><span class="n">system_dict</span><span class="p">[</span><span class="s1">&#39;M_1&#39;</span><span class="p">])</span>
@@ -4131,16 +4175,16 @@
                 <span class="n">msg</span> <span class="o">=</span> <span class="s2">&quot;The M&amp;S options do not seem to be set properly. The value is </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;m&amp;s_options&#39;</span><span class="p">])</span>
                 <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
 
-            <span class="c1"># Second: is the moecache filled.</span>
+            <span class="c1"># Second: is the Moecache filled.</span>
             <span class="k">if</span> <span class="ow">not</span> <span class="n">Moecache</span><span class="p">:</span>
                 <span class="n">verbose_print</span><span class="p">(</span>
                     <span class="s2">&quot;_calculate_multiplicity_fraction: Moecache is empty. It needs to be filled with the data for the interpolators. Loading the data now&quot;</span><span class="p">,</span>
                     <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
-                    <span class="mi">1</span><span class="p">,</span>
+                    <span class="mi">2</span><span class="p">,</span>
                 <span class="p">)</span>
 
                 <span class="c1"># Load the data</span>
-                <span class="bp">self</span><span class="o">.</span><span class="n">_load_moe_distefano_data</span><span class="p">()</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">_load_moe_di_stefano_data</span><span class="p">()</span>
 
             <span class="c1"># record the prev value</span>
             <span class="n">prev_M1_value_ms</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;m&amp;s_options&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;M_1&#39;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
@@ -4149,7 +4193,7 @@
             <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;m&amp;s_options&#39;</span><span class="p">][</span><span class="s1">&#39;M_1&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">system_dict</span><span class="p">[</span><span class="s1">&#39;M_1&#39;</span><span class="p">]</span>
 
             <span class="c1"># Calculate the multiplicity fraction</span>
-            <span class="n">multiplicity_fraction_list</span> <span class="o">=</span> <span class="n">Moe_de_Stefano_2017_multiplicity_fractions</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;m&amp;s_options&#39;</span><span class="p">],</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">])</span>
+            <span class="n">multiplicity_fraction_list</span> <span class="o">=</span> <span class="n">Moe_di_Stefano_2017_multiplicity_fractions</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;m&amp;s_options&#39;</span><span class="p">],</span> <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">])</span>
 
             <span class="c1"># Turn into dict</span>
             <span class="n">multiplicity_fraction_dict</span> <span class="o">=</span> <span class="p">{</span><span class="n">el</span><span class="o">+</span><span class="mi">1</span><span class="p">:</span><span class="n">multiplicity_fraction_list</span><span class="p">[</span><span class="n">el</span><span class="p">]</span> <span class="k">for</span> <span class="n">el</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">multiplicity_fraction_list</span><span class="p">))}</span>
@@ -4165,7 +4209,7 @@
         <span class="n">verbose_print</span><span class="p">(</span>
             <span class="s2">&quot;Multiplicity: </span><span class="si">{}</span><span class="s2"> multiplicity_fraction: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">system_dict</span><span class="p">[</span><span class="s1">&#39;multiplicity&#39;</span><span class="p">],</span> <span class="n">multiplicity_fraction_dict</span><span class="p">[</span><span class="n">system_dict</span><span class="p">[</span><span class="s1">&#39;multiplicity&#39;</span><span class="p">]]),</span>
             <span class="bp">self</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s2">&quot;verbosity&quot;</span><span class="p">],</span>
-            <span class="mi">1</span><span class="p">,</span>
+            <span class="mi">2</span><span class="p">,</span>
         <span class="p">)</span>
 
         <span class="k">return</span> <span class="n">multiplicity_fraction_dict</span><span class="p">[</span><span class="n">system_dict</span><span class="p">[</span><span class="s1">&#39;multiplicity&#39;</span><span class="p">]]</span></div>
@@ -4195,9 +4239,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/_modules/binarycpython/utils/grid_options_defaults.html b/docs/build/html/_modules/binarycpython/utils/grid_options_defaults.html
index e2ee12889651d6179d83a3119a4cb9f2cd781df7..eaf338168671ffc8a0a3069efcf23a13e3bcfeb0 100644
--- a/docs/build/html/_modules/binarycpython/utils/grid_options_defaults.html
+++ b/docs/build/html/_modules/binarycpython/utils/grid_options_defaults.html
@@ -30,6 +30,9 @@
         <script src="../../../_static/underscore.js"></script>
         <script src="../../../_static/doctools.js"></script>
         <script src="../../../_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="../../../_static/js/theme.js"></script>
 
@@ -84,7 +87,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../readme_link.html">Python module for binary_c</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../modules.html">Binarycpython code</a></li>
-<li class="toctree-l1"><a class="reference internal" href="../../../examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -173,6 +176,8 @@
 <span class="kn">from</span> <span class="nn">binarycpython.utils.custom_logging_functions</span> <span class="kn">import</span> <span class="n">temp_dir</span>
 <span class="kn">from</span> <span class="nn">binarycpython.utils.functions</span> <span class="kn">import</span> <span class="n">return_binary_c_version_info</span>
 
+<span class="n">_LOGGER_VERBOSITY_LEVEL</span> <span class="o">=</span> <span class="mi">1</span>
+<span class="n">_CUSTOM_LOGGING_VERBOSITY_LEVEL</span> <span class="o">=</span> <span class="mi">2</span>
 <span class="n">_MS_VERBOSITY_LEVEL</span> <span class="o">=</span> <span class="mi">5</span>
 <span class="n">_MS_VERBOSITY_INTERPOLATOR_LEVEL</span> <span class="o">=</span> <span class="mi">6</span>
 <span class="n">_MS_VERBOSITY_INTERPOLATOR_EXTRA_LEVEL</span> <span class="o">=</span> <span class="mi">7</span>
@@ -183,11 +188,11 @@
     <span class="c1"># general (or unordered..)</span>
     <span class="c1">##########################</span>
     <span class="s2">&quot;amt_cores&quot;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>  <span class="c1"># total amount of cores used to evolve the population</span>
-    <span class="s2">&quot;parse_function&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>  <span class="c1"># FUnction to parse the output with.</span>
+    <span class="s2">&quot;parse_function&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>  <span class="c1"># Function to parse the output with.</span>
     <span class="s2">&quot;multiplicity_fraction_function&quot;</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="c1"># Which multiplicity fraction function to use. 0: None, 1: Arenou 2010, 2: Rhagavan 2010, 3: M&amp;S 2017</span>
     <span class="s2">&quot;tmp_dir&quot;</span><span class="p">:</span> <span class="n">temp_dir</span><span class="p">(),</span>  <span class="c1"># Setting the temp dir of the program</span>
     <span class="s2">&quot;_main_pid&quot;</span><span class="p">:</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span>  <span class="c1"># Placeholder for the main process id of the run.</span>
-    <span class="s2">&quot;combine_ensemble_with_thread_joining&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>  <span class="c1"># Flag on whether to combine everything and return it to the user or if false: write it to data_dir/ensemble_output_{popuation_id}_{thread_id}.json</span>
+    <span class="s2">&quot;combine_ensemble_with_thread_joining&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>  <span class="c1"># Flag on whether to combine everything and return it to the user or if false: write it to data_dir/ensemble_output_{population_id}_{thread_id}.json</span>
     <span class="s2">&quot;_commandline_input&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
     <span class="s2">&quot;log_runtime_systems&quot;</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>  <span class="c1"># whether to log the runtime of the systems (1 file per thread. stored in the tmp_dir)</span>
     <span class="s2">&quot;_actually_evolve_system&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>  <span class="c1"># Whether to actually evolve the systems of just act as if. for testing. used in _process_run_population_grid</span>
@@ -195,6 +200,7 @@
     <span class="s2">&quot;run_zero_probability_system&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Whether to run the zero probability systems</span>
     <span class="s2">&quot;_zero_prob_stars_skipped&quot;</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
     <span class="s2">&quot;ensemble_factor_in_probability_weighted_mass&quot;</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span> <span class="c1"># Whether to multiply the ensemble results by 1/probability_weighted_mass</span>
+    <span class="s2">&quot;do_dry_run&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Whether to do a dry run to calculate the total probability for this run</span>
     <span class="c1">##########################</span>
     <span class="c1"># Execution log:</span>
     <span class="c1">##########################</span>
@@ -224,17 +230,17 @@
     <span class="c1">##########################</span>
     <span class="c1"># Custom logging</span>
     <span class="c1">##########################</span>
-    <span class="s2">&quot;C_auto_logging&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>  <span class="c1"># Should contain a dictionary where the kes are they headers</span>
+    <span class="s2">&quot;C_auto_logging&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>  <span class="c1"># Should contain a dictionary where the keys are they headers</span>
     <span class="c1"># and the values are lists of parameters that should be logged.</span>
-    <span class="c1"># This will get parsed by autogen_C_logging_code in custom_loggion_functions.py</span>
+    <span class="c1"># This will get parsed by autogen_C_logging_code in custom_logging_functions.py</span>
     <span class="s2">&quot;C_logging_code&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>  <span class="c1"># Should contain a string which holds the logging code.</span>
     <span class="s2">&quot;custom_logging_func_memaddr&quot;</span><span class="p">:</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span>  <span class="c1"># Contains the custom_logging functions memory address</span>
     <span class="s2">&quot;_custom_logging_shared_library_file&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>  <span class="c1"># file containing the .so file</span>
     <span class="c1">##########################</span>
     <span class="c1"># Store pre-loading:</span>
     <span class="c1">##########################</span>
-    <span class="s2">&quot;_store_memaddr&quot;</span><span class="p">:</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span>  <span class="c1"># Contains the store object memory adress, useful for preloading.</span>
-    <span class="c1"># defaults to -1 and isnt used if thats the default then.</span>
+    <span class="s2">&quot;_store_memaddr&quot;</span><span class="p">:</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span>  <span class="c1"># Contains the store object memory address, useful for pre loading.</span>
+    <span class="c1"># defaults to -1 and isn&#39;t used if that&#39;s the default then.</span>
     <span class="c1">##########################</span>
     <span class="c1"># Log args: logging of arguments</span>
     <span class="c1">##########################</span>
@@ -247,7 +253,7 @@
     <span class="s2">&quot;evolution_type&quot;</span><span class="p">:</span> <span class="s2">&quot;grid&quot;</span><span class="p">,</span>  <span class="c1"># Flag for type of population evolution</span>
     <span class="s2">&quot;_evolution_type_options&quot;</span><span class="p">:</span> <span class="p">[</span>
         <span class="s2">&quot;grid&quot;</span><span class="p">,</span>
-    <span class="p">],</span>  <span class="c1"># available choices for type of population evolution. # TODO: fill later with monte carlo, sourcefile</span>
+    <span class="p">],</span>  <span class="c1"># available choices for type of population evolution. # TODO: fill later with Monte Carlo, source file</span>
     <span class="s2">&quot;_system_generator&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>  <span class="c1"># value that holds the function that generates the system</span>
     <span class="c1"># (result of building the grid script)</span>
     <span class="s2">&quot;source_file_filename&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>  <span class="c1"># filename for the source</span>
@@ -599,14 +605,14 @@
     <span class="s2">&quot;_binary_c_shared_library&quot;</span><span class="p">:</span> <span class="s2">&quot;Full path to the libbinary_c file. This options is not used in the population object&quot;</span><span class="p">,</span>
     <span class="s2">&quot;verbosity&quot;</span><span class="p">:</span> <span class="s2">&quot;Verbosity of the population code. Default is 0, by which only errors will be printed. Higher values will show more output, which is good for debugging.&quot;</span><span class="p">,</span>
     <span class="s2">&quot;binary&quot;</span><span class="p">:</span> <span class="s2">&quot;Set this to 1 if the population contains binaries. Input: int&quot;</span><span class="p">,</span>  <span class="c1"># TODO: write what effect this has.</span>
-    <span class="s2">&quot;amt_cores&quot;</span><span class="p">:</span> <span class="s2">&quot;The amount of cores that the population grid will use. The multiprocessing is useful but make sure to figure out how many logical cores the machine has. The core is multiprocessed, not multithreaded, and will gain no extra speed when amt_cores exceeds the amount of logical cores. Input: int&quot;</span><span class="p">,</span>
+    <span class="s2">&quot;amt_cores&quot;</span><span class="p">:</span> <span class="s2">&quot;The amount of cores that the population grid will use. The multiprocessing is useful but make sure to figure out how many logical cores the machine has. The core is multi processed, not multi threaded, and will gain no extra speed when amt_cores exceeds the amount of logical cores. Input: int&quot;</span><span class="p">,</span>
     <span class="s2">&quot;_start_time_evolution&quot;</span><span class="p">:</span> <span class="s2">&quot;Variable storing the start timestamp of the population evolution. Set by the object itself.&quot;</span><span class="p">,</span>  <span class="c1"># TODO: make sure this is logged to a file</span>
     <span class="s2">&quot;_end_time_evolution&quot;</span><span class="p">:</span> <span class="s2">&quot;Variable storing the end timestamp of the population evolution. Set by the object itself&quot;</span><span class="p">,</span>  <span class="c1"># TODO: make sure this is logged to a file</span>
     <span class="s2">&quot;_total_starcount&quot;</span><span class="p">:</span> <span class="s2">&quot;Variable storing the total amount of systems in the generator. Used and set by the population object.&quot;</span><span class="p">,</span>
     <span class="s2">&quot;_custom_logging_shared_library_file&quot;</span><span class="p">:</span> <span class="s2">&quot;filename for the custom_logging shared library. Used and set by the population object&quot;</span><span class="p">,</span>
-    <span class="s2">&quot;_errors_found&quot;</span><span class="p">:</span> <span class="s2">&quot;Variable storing a boolean flag whether errors by binary_c are encountered.&quot;</span><span class="p">,</span>
-    <span class="s2">&quot;_errors_exceeded&quot;</span><span class="p">:</span> <span class="s2">&quot;Variable storing a boolean flag whether the amount of errors was higher than the set threshold (failed_systems_threshold). If True, then the commandline arguments of the failing systems will not be stored in the failed_system_log files.&quot;</span><span class="p">,</span>
-    <span class="s2">&quot;source_file_filename&quot;</span><span class="p">:</span> <span class="s2">&quot;Variable containing the source file containing lines of binary_c commandline calls. These all have to start with binary_c.&quot;</span><span class="p">,</span>  <span class="c1"># TODO: Expand</span>
+    <span class="s2">&quot;_errors_found&quot;</span><span class="p">:</span> <span class="s2">&quot;Variable storing a Boolean flag whether errors by binary_c are encountered.&quot;</span><span class="p">,</span>
+    <span class="s2">&quot;_errors_exceeded&quot;</span><span class="p">:</span> <span class="s2">&quot;Variable storing a Boolean flag whether the amount of errors was higher than the set threshold (failed_systems_threshold). If True, then the command line arguments of the failing systems will not be stored in the failed_system_log files.&quot;</span><span class="p">,</span>
+    <span class="s2">&quot;source_file_filename&quot;</span><span class="p">:</span> <span class="s2">&quot;Variable containing the source file containing lines of binary_c command line calls. These all have to start with binary_c.&quot;</span><span class="p">,</span>  <span class="c1"># TODO: Expand</span>
     <span class="s2">&quot;C_auto_logging&quot;</span><span class="p">:</span> <span class="s2">&quot;Dictionary containing parameters to be logged by binary_c. The structure of this dictionary is as follows: the key is used as the headline which the user can then catch. The value at that key is a list of binary_c system parameters (like star[0].mass)&quot;</span><span class="p">,</span>
     <span class="s2">&quot;C_logging_code&quot;</span><span class="p">:</span> <span class="s2">&quot;Variable to store the exact code that is used for the custom_logging. In this way the user can do more complex logging, as well as putting these logging strings in files.&quot;</span><span class="p">,</span>
     <span class="s2">&quot;_failed_count&quot;</span><span class="p">:</span> <span class="s2">&quot;Variable storing the amount of failed systems.&quot;</span><span class="p">,</span>
@@ -616,43 +622,44 @@
     <span class="s2">&quot;_grid_variables&quot;</span><span class="p">:</span> <span class="s2">&quot;Dictionary storing the grid_variables. These contain properties which are accessed by the _generate_grid_code function&quot;</span><span class="p">,</span>
     <span class="s2">&quot;_population_id&quot;</span><span class="p">:</span> <span class="s2">&quot;Variable storing a unique 32-char hex string.&quot;</span><span class="p">,</span>
     <span class="s2">&quot;_commandline_input&quot;</span><span class="p">:</span> <span class="s2">&quot;String containing the arguments passed to the population object via the command line. Set and used by the population object.&quot;</span><span class="p">,</span>
-    <span class="s2">&quot;_system_generator&quot;</span><span class="p">:</span> <span class="s2">&quot;Function object that contains the system generator function. This can be from a grid, or a source file, or a montecarlo grid.&quot;</span><span class="p">,</span>
+    <span class="s2">&quot;_system_generator&quot;</span><span class="p">:</span> <span class="s2">&quot;Function object that contains the system generator function. This can be from a grid, or a source file, or a Monte Carlo grid.&quot;</span><span class="p">,</span>
     <span class="s2">&quot;gridcode_filename&quot;</span><span class="p">:</span> <span class="s2">&quot;Filename for the grid code. Set and used by the population object. TODO: allow the user to provide their own function, rather than only a generated function.&quot;</span><span class="p">,</span>
     <span class="s2">&quot;log_args&quot;</span><span class="p">:</span> <span class="s2">&quot;Boolean to log the arguments. Unused &quot;</span><span class="p">,</span>  <span class="c1"># TODO: fix the functionality for this and describe it properly</span>
     <span class="s2">&quot;log_args_dir&quot;</span><span class="p">:</span> <span class="s2">&quot;Directory to log the arguments to. Unused&quot;</span><span class="p">,</span>  <span class="c1"># TODO: fix the functionality for this and describe it properly</span>
     <span class="s2">&quot;log_file&quot;</span><span class="p">:</span> <span class="s2">&quot;Log file for the population object. Unused&quot;</span><span class="p">,</span>  <span class="c1"># TODO: fix the functionality for this and describe it properly</span>
-    <span class="s2">&quot;custom_logging_func_memaddr&quot;</span><span class="p">:</span> <span class="s2">&quot;Memory adress where the custom_logging_function is stored. Input: int&quot;</span><span class="p">,</span>
+    <span class="s2">&quot;custom_logging_func_memaddr&quot;</span><span class="p">:</span> <span class="s2">&quot;Memory address where the custom_logging_function is stored. Input: int&quot;</span><span class="p">,</span>
     <span class="s2">&quot;_count&quot;</span><span class="p">:</span> <span class="s2">&quot;Counter tracking which system the generator is on.&quot;</span><span class="p">,</span>
     <span class="s2">&quot;_probtot&quot;</span><span class="p">:</span> <span class="s2">&quot;Total probability of the population.&quot;</span><span class="p">,</span>  <span class="c1"># TODO: check whether this is used properly throughout</span>
     <span class="s2">&quot;_main_pid&quot;</span><span class="p">:</span> <span class="s2">&quot;Main process ID of the master process. Used and set by the population object.&quot;</span><span class="p">,</span>
-    <span class="s2">&quot;_store_memaddr&quot;</span><span class="p">:</span> <span class="s2">&quot;Memory adress of the store object for binary_c.&quot;</span><span class="p">,</span>
-    <span class="s2">&quot;failed_systems_threshold&quot;</span><span class="p">:</span> <span class="s2">&quot;Variable storing the maximum amount of systems that are allowed to fail before logging their commandline arguments to failed_systems log files&quot;</span><span class="p">,</span>
+    <span class="s2">&quot;_store_memaddr&quot;</span><span class="p">:</span> <span class="s2">&quot;Memory address of the store object for binary_c.&quot;</span><span class="p">,</span>
+    <span class="s2">&quot;failed_systems_threshold&quot;</span><span class="p">:</span> <span class="s2">&quot;Variable storing the maximum amount of systems that are allowed to fail before logging their command line arguments to failed_systems log files&quot;</span><span class="p">,</span>
     <span class="s2">&quot;parse_function&quot;</span><span class="p">:</span> <span class="s2">&quot;Function that the user can provide to handle the output the binary_c. This function has to take the arguments (self, output). Its best not to return anything in this function, and just store stuff in the grid_options[&#39;results&#39;] dictionary, or just output results to a file&quot;</span><span class="p">,</span>
     <span class="s2">&quot;condor&quot;</span><span class="p">:</span> <span class="s2">&quot;Int flag whether to use a condor type population evolution. Not implemented yet.&quot;</span><span class="p">,</span>  <span class="c1"># TODO: describe this in more detail</span>
-    <span class="s2">&quot;slurm&quot;</span><span class="p">:</span> <span class="s2">&quot;Int flag whether to use a slurm type population evolution.&quot;</span><span class="p">,</span>  <span class="c1"># TODO: describe this in more detail</span>
-    <span class="s2">&quot;weight&quot;</span><span class="p">:</span> <span class="s2">&quot;Weight factor for each system. The calculated probability is mulitplied by this. If the user wants each system to be repeated several times, then this variable should not be changed, rather change the _repeat variable instead, as that handles the reduction in probability per system. This is useful for systems that have a process with some random element in it.&quot;</span><span class="p">,</span>  <span class="c1"># TODO: add more info here, regarding the evolution splitting.</span>
+    <span class="s2">&quot;slurm&quot;</span><span class="p">:</span> <span class="s2">&quot;Int flag whether to use a Slurm type population evolution.&quot;</span><span class="p">,</span>  <span class="c1"># TODO: describe this in more detail</span>
+    <span class="s2">&quot;weight&quot;</span><span class="p">:</span> <span class="s2">&quot;Weight factor for each system. The calculated probability is multiplied by this. If the user wants each system to be repeated several times, then this variable should not be changed, rather change the _repeat variable instead, as that handles the reduction in probability per system. This is useful for systems that have a process with some random element in it.&quot;</span><span class="p">,</span>  <span class="c1"># TODO: add more info here, regarding the evolution splitting.</span>
     <span class="s2">&quot;repeat&quot;</span><span class="p">:</span> <span class="s2">&quot;Factor of how many times a system should be repeated. Consider the evolution splitting binary_c argument for supernovae kick repeating.&quot;</span><span class="p">,</span>  <span class="c1"># TODO: make sure this is used.</span>
     <span class="s2">&quot;evolution_type&quot;</span><span class="p">:</span> <span class="s2">&quot;Variable containing the type of evolution used of the grid. Multiprocessing or linear processing&quot;</span><span class="p">,</span>
-    <span class="s2">&quot;combine_ensemble_with_thread_joining&quot;</span><span class="p">:</span> <span class="s2">&quot;BOolean flag on whether to combine everything and return it to the user or if false: write it to data_dir/ensemble_output_</span><span class="si">{popuation_id}</span><span class="s2">_</span><span class="si">{thread_id}</span><span class="s2">.json&quot;</span><span class="p">,</span>
-    <span class="s2">&quot;log_runtime_systems&quot;</span><span class="p">:</span> <span class="s2">&quot;Whether to log the runtime of the systems . Each systems run by the thread is logged to a file and is stored in the tmp_dir. (1 file per thread). Don&#39;t use this if you are planning to run alot of systems. This is mostly for debugging and finding systems that take long to run. Integer, default = 0. if value is 1 then the systems are logged&quot;</span><span class="p">,</span>
+    <span class="s2">&quot;combine_ensemble_with_thread_joining&quot;</span><span class="p">:</span> <span class="s2">&quot;Boolean flag on whether to combine everything and return it to the user or if false: write it to data_dir/ensemble_output_</span><span class="si">{population_id}</span><span class="s2">_</span><span class="si">{thread_id}</span><span class="s2">.json&quot;</span><span class="p">,</span>
+    <span class="s2">&quot;log_runtime_systems&quot;</span><span class="p">:</span> <span class="s2">&quot;Whether to log the runtime of the systems . Each systems run by the thread is logged to a file and is stored in the tmp_dir. (1 file per thread). Don&#39;t use this if you are planning to run a lot of systems. This is mostly for debugging and finding systems that take long to run. Integer, default = 0. if value is 1 then the systems are logged&quot;</span><span class="p">,</span>
     <span class="s2">&quot;_total_mass_run&quot;</span><span class="p">:</span> <span class="s2">&quot;To count the total mass that thread/process has ran&quot;</span><span class="p">,</span>
     <span class="s2">&quot;_total_probability_weighted_mass_run&quot;</span><span class="p">:</span> <span class="s2">&quot;To count the total mass * probability for each system that thread/process has ran&quot;</span><span class="p">,</span>
     <span class="s2">&quot;_actually_evolve_system&quot;</span><span class="p">:</span> <span class="s2">&quot;Whether to actually evolve the systems of just act as if. for testing. used in _process_run_population_grid&quot;</span><span class="p">,</span>
     <span class="s2">&quot;max_queue_size&quot;</span><span class="p">:</span> <span class="s2">&quot;Maximum size of the queue that is used to feed the processes. Don&#39;t make this too big! Default: 1000. Input: int&quot;</span><span class="p">,</span>
     <span class="s2">&quot;_set_ms_grid&quot;</span><span class="p">:</span> <span class="s2">&quot;Internal flag whether the M&amp;S grid has been loaded&quot;</span><span class="p">,</span>
-    <span class="s2">&quot;run_zero_probability_system&quot;</span><span class="p">:</span> <span class="s2">&quot;Whether to run the zero probability systems. Default: True. Input: boolean&quot;</span><span class="p">,</span>
+    <span class="s2">&quot;run_zero_probability_system&quot;</span><span class="p">:</span> <span class="s2">&quot;Whether to run the zero probability systems. Default: True. Input: Boolean&quot;</span><span class="p">,</span>
     <span class="s2">&quot;_zero_prob_stars_skipped&quot;</span><span class="p">:</span> <span class="s2">&quot;Internal counter to track how many systems are skipped because they have 0 probability&quot;</span><span class="p">,</span>
     <span class="s2">&quot;ensemble_factor_in_probability_weighted_mass&quot;</span><span class="p">:</span> <span class="s2">&quot;Flag to multiply all the ensemble results with 1/probability_weighted_mass&quot;</span><span class="p">,</span>
     <span class="s2">&quot;multiplicity_fraction_function&quot;</span><span class="p">:</span> <span class="s2">&quot;Which multiplicity fraction function to use. 0: None, 1: Arenou 2010, 2: Rhagavan 2010, 3: M&amp;S 2017&quot;</span><span class="p">,</span>
     <span class="s2">&quot;m&amp;s_options&quot;</span><span class="p">:</span> <span class="s2">&quot;Internal variable that holds the M&amp;S options. Don&#39;t write to this your self&quot;</span><span class="p">,</span>
     <span class="s2">&quot;_loaded_ms_data&quot;</span><span class="p">:</span> <span class="s2">&quot;Internal variable storing whether the M&amp;S data has been loaded into memory&quot;</span><span class="p">,</span>
+    <span class="s2">&quot;do_dry_run&quot;</span><span class="p">:</span> <span class="s2">&quot;Whether to do a dry run to calculate the total probability for this run&quot;</span><span class="p">,</span>
 <span class="p">}</span>
 
 <span class="c1">###</span>
 <span class="c1">#</span>
 
-<span class="c1"># Default options for the Moe &amp; Distefano grid</span>
-<span class="n">moe_distefano_default_options</span> <span class="o">=</span> <span class="p">{</span>
+<span class="c1"># Default options for the Moe &amp; di Stefano grid</span>
+<span class="n">moe_di_stefano_default_options</span> <span class="o">=</span> <span class="p">{</span>
     <span class="s2">&quot;resolutions&quot;</span><span class="p">:</span> <span class="p">{</span>
         <span class="s2">&quot;M&quot;</span><span class="p">:</span> <span class="p">[</span>
             <span class="mi">20</span><span class="p">,</span>  <span class="c1"># M1</span>
@@ -689,7 +696,7 @@
 
     <span class="c1"># multiplicity model (as a function of log10M1)</span>
     <span class="c1">#</span>
-    <span class="c1"># You can use &#39;Poisson&#39; which uses the system multiplicty</span>
+    <span class="c1"># You can use &#39;Poisson&#39; which uses the system multiplicity</span>
     <span class="c1"># given by Moe and maps this to single/binary/triple/quad</span>
     <span class="c1"># fractions.</span>
     <span class="c1">#</span>
@@ -712,16 +719,16 @@
         <span class="mi">0</span><span class="p">,</span>  <span class="c1"># triple</span>
         <span class="mi">0</span><span class="p">,</span>  <span class="c1"># quadruple</span>
     <span class="p">],</span>
-    <span class="c1"># given a mix of multiplities, you can either (noting that</span>
+    <span class="c1"># given a mix of multiplicities, you can either (noting that</span>
     <span class="c1"># here (S,B,T,Q) = appropriate modulator * model(S,B,T,Q) )</span>
     <span class="c1">#</span>
-    <span class="c1"># &#39;norm&#39;  : normalize so the whole population is 1.0</span>
+    <span class="c1"># &#39;norm&#39;  : normalise so the whole population is 1.0</span>
     <span class="c1">#           after implementing the appropriate fractions</span>
     <span class="c1">#           S/(S+B+T+Q), B/(S+B+T+Q), T/(S+B+T+Q), Q/(S+B+T+Q)</span>
     <span class="c1">#</span>
     <span class="c1"># &#39;raw&#39;   : stick to what is predicted, i.e.</span>
     <span class="c1">#           S/(S+B+T+Q), B/(S+B+T+Q), T/(S+B+T+Q), Q/(S+B+T+Q)</span>
-    <span class="c1">#           without normalization</span>
+    <span class="c1">#           without normalisation</span>
     <span class="c1">#           (in which case the total probability &lt; 1.0 unless</span>
     <span class="c1">#            all you use single, binary, triple and quadruple)</span>
     <span class="c1">#</span>
@@ -736,7 +743,7 @@
     <span class="c1">#</span>
     <span class="c1">#</span>
     <span class="c1"># note: if you only set one multiplicity_modulator</span>
-    <span class="c1"># to 1, and all the others to 0, then normalizing</span>
+    <span class="c1"># to 1, and all the others to 0, then normalising</span>
     <span class="c1"># will mean that you effectively have the same number</span>
     <span class="c1"># of stars as single, binary, triple or quad (whichever</span>
     <span class="c1"># is non-zero) i.e. the multiplicity fraction is ignored.</span>
@@ -748,14 +755,14 @@
     <span class="s2">&quot;q_high_extrapolation_method&quot;</span><span class="p">:</span> <span class="s2">&quot;linear&quot;</span><span class="p">,</span>
 <span class="p">}</span>
 
-<span class="n">moe_distefano_default_options_description</span> <span class="o">=</span> <span class="p">{</span>
+<span class="n">moe_di_stefano_default_options_description</span> <span class="o">=</span> <span class="p">{</span>
     <span class="s2">&quot;resolutions&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
     <span class="s2">&quot;ranges&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
     <span class="s2">&quot;Mmin&quot;</span><span class="p">:</span> <span class="s2">&quot;Minimum stellar mass&quot;</span><span class="p">,</span>
     <span class="s2">&quot;multiplicity_model&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;&quot;</span>
 <span class="s2">multiplicity model (as a function of log10M1)</span>
 
-<span class="s2">You can use &#39;Poisson&#39; which uses the system multiplicty</span>
+<span class="s2">You can use &#39;Poisson&#39; which uses the system multiplicity</span>
 <span class="s2">given by Moe and maps this to single/binary/triple/quad</span>
 <span class="s2">fractions.</span>
 
@@ -772,13 +779,13 @@
 <span class="s2">defaults to [1,1,0,0] i.e. singles and binaries</span>
 <span class="s2">&quot;&quot;&quot;</span><span class="p">,</span>
     <span class="s2">&quot;normalize_multiplicities&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;&quot;</span>
-<span class="s2">&#39;norm&#39;: normalize so the whole population is 1.0</span>
+<span class="s2">&#39;norm&#39;: normalise so the whole population is 1.0</span>
 <span class="s2">        after implementing the appropriate fractions</span>
 <span class="s2">        S/(S+B+T+Q), B/(S+B+T+Q), T/(S+B+T+Q), Q/(S+B+T+Q)</span>
-<span class="s2">        given a mix of multiplities, you can either (noting that</span>
+<span class="s2">        given a mix of multiplicities, you can either (noting that</span>
 <span class="s2">        here (S,B,T,Q) = appropriate modulator * model(S,B,T,Q) )</span>
 <span class="s2">        note: if you only set one multiplicity_modulator</span>
-<span class="s2">        to 1, and all the others to 0, then normalizing</span>
+<span class="s2">        to 1, and all the others to 0, then normalising</span>
 <span class="s2">        will mean that you effectively have the same number</span>
 <span class="s2">        of stars as single, binary, triple or quad (whichever</span>
 <span class="s2">        is non-zero) i.e. the multiplicity fraction is ignored.</span>
@@ -787,7 +794,7 @@
 
 <span class="s2">&#39;raw&#39;   : stick to what is predicted, i.e.</span>
 <span class="s2">          S/(S+B+T+Q), B/(S+B+T+Q), T/(S+B+T+Q), Q/(S+B+T+Q)</span>
-<span class="s2">          without normalization</span>
+<span class="s2">          without normalisation</span>
 <span class="s2">          (in which case the total probability &lt; 1.0 unless</span>
 <span class="s2">          all you use single, binary, triple and quadruple)</span>
 
@@ -827,7 +834,7 @@
 <span class="sd">        option: which option you want to have the description of</span>
 
 <span class="sd">    returns:</span>
-<span class="sd">        dict containg the option, the description if its there, otherwise empty string. And if the key doesnt exist, the dict is empty</span>
+<span class="sd">        dict containing the option, the description if its there, otherwise empty string. And if the key doesnt exist, the dict is empty</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
     <span class="n">option_keys</span> <span class="o">=</span> <span class="n">grid_options_defaults_dict</span><span class="o">.</span><span class="n">keys</span><span class="p">()</span>
@@ -890,7 +897,7 @@
 <span class="sd">    Function that writes the descriptions of the grid options to a rst file</span>
 
 <span class="sd">    Tasks:</span>
-<span class="sd">        TODO: seperate things into private and public options</span>
+<span class="sd">        TODO: separate things into private and public options</span>
 
 <span class="sd">    Args:</span>
 <span class="sd">        output_file: target file where the grid options descriptions are written to</span>
@@ -936,12 +943,12 @@
             <span class="s2">&quot;The following options are meant to be changed by the user.&quot;</span><span class="p">,</span>
         <span class="p">)</span>
 
-        <span class="c1"># Moe &amp; Distefano options:</span>
+        <span class="c1"># Moe &amp; di Stefano options:</span>
         <span class="n">print_option_descriptions</span><span class="p">(</span>
             <span class="n">f</span><span class="p">,</span>
-            <span class="n">moe_distefano_default_options</span><span class="p">,</span>
-            <span class="n">moe_distefano_default_options_description</span><span class="p">,</span>
-            <span class="s2">&quot;Moe &amp; Distefano sampler options&quot;</span><span class="p">,</span>
+            <span class="n">moe_di_stefano_default_options</span><span class="p">,</span>
+            <span class="n">moe_di_stefano_default_options_description</span><span class="p">,</span>
+            <span class="s2">&quot;Moe &amp; di Stefano sampler options&quot;</span><span class="p">,</span>
             <span class="s2">&quot;The following options are meant to be changed by the user.&quot;</span><span class="p">,</span>
         <span class="p">)</span>
 
@@ -1000,9 +1007,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/_modules/binarycpython/utils/plot_functions.html b/docs/build/html/_modules/binarycpython/utils/plot_functions.html
index d27308913f72033bb63161d66c3eacc716213cd3..c0bd299b7a175c7bb273270217ea5c18deb5498e 100644
--- a/docs/build/html/_modules/binarycpython/utils/plot_functions.html
+++ b/docs/build/html/_modules/binarycpython/utils/plot_functions.html
@@ -30,6 +30,9 @@
         <script src="../../../_static/underscore.js"></script>
         <script src="../../../_static/doctools.js"></script>
         <script src="../../../_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="../../../_static/js/theme.js"></script>
 
@@ -84,7 +87,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../readme_link.html">Python module for binary_c</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../modules.html">Binarycpython code</a></li>
-<li class="toctree-l1"><a class="reference internal" href="../../../examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -164,12 +167,12 @@
 <span class="sd">    plotting functions</span>
 <span class="sd">    master function: plot_system</span>
 
-<span class="sd">All the loose components here can ofcourse be used in other routines if you want.</span>
+<span class="sd">All the loose components here can of course be used in other routines if you want.</span>
 
-<span class="sd">There is no preloaded matplotlib rc, you should do that yourself</span>
+<span class="sd">There is no pre loaded matplotlib rc, you should do that yourself</span>
 
-<span class="sd">These plotting routines are designed for binary systems, and admittingly they are here mostly for </span>
-<span class="sd">inspirational purposes, since one would problably want to customize the plots. </span>
+<span class="sd">These plotting routines are designed for binary systems, and admittedly they are here mostly for </span>
+<span class="sd">inspirational purposes, since one would probably want to customise the plots. </span>
 <span class="sd">Regardless, having some plotting routines in here seemed like a nice idea</span>
 
 <span class="sd">Tasks</span>
@@ -826,9 +829,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/_modules/binarycpython/utils/run_system_wrapper.html b/docs/build/html/_modules/binarycpython/utils/run_system_wrapper.html
index 45ea5478f70ee9363d69b888eabd0ad8e72cd09d..52de49e394afa73603617c7bb11fc105b359707f 100644
--- a/docs/build/html/_modules/binarycpython/utils/run_system_wrapper.html
+++ b/docs/build/html/_modules/binarycpython/utils/run_system_wrapper.html
@@ -30,6 +30,9 @@
         <script src="../../../_static/underscore.js"></script>
         <script src="../../../_static/doctools.js"></script>
         <script src="../../../_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="../../../_static/js/theme.js"></script>
 
@@ -84,7 +87,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../readme_link.html">Python module for binary_c</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../modules.html">Binarycpython code</a></li>
-<li class="toctree-l1"><a class="reference internal" href="../../../examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -179,7 +182,7 @@
 <span class="sd">    Examples:</span>
 <span class="sd">        - run_system(M_1=10): will run a system with ZAMS mass 1 = 10</span>
 <span class="sd">        - run_system(M_1=10, log_filename=&quot;~/example_log.txt&quot;): Will run a system</span>
-<span class="sd">            and write the logfile too</span>
+<span class="sd">            and write the log file too</span>
 <span class="sd">        - run_system(M_1=10, parse_function=fancy_parsing_function)</span>
 
 <span class="sd">    Tasks:</span>
@@ -192,9 +195,9 @@
 <span class="sd">    Kwargs:</span>
 <span class="sd">        custom_logging_code: Should contain a string containing the c-code for the shared library.</span>
 <span class="sd">            If this is provided binary_c will use that custom logging code to output its data</span>
-<span class="sd">        log_filename: Should contain name of the binary_c system logfile.</span>
+<span class="sd">        log_filename: Should contain name of the binary_c system log file.</span>
 <span class="sd">            Passing this will make sure that the filename gets written for a run</span>
-<span class="sd">            (its default behaviour is NOT to write a logfile for a system)</span>
+<span class="sd">            (its default behaviour is NOT to write a log file for a system)</span>
 <span class="sd">        parse_function (function): should contain a function that parses the output.</span>
 <span class="sd">            The parse function should take 1 required parameter: the output of the binaryc run</span>
 <span class="sd">            Passing this will call the parse_function by passing it the output of the binary_c call</span>
@@ -213,7 +216,7 @@
     <span class="n">func_memaddr</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span>
     <span class="n">write_logfile</span> <span class="o">=</span> <span class="mi">0</span>
 
-    <span class="c1"># Create dict to pass as argstring</span>
+    <span class="c1"># Create dict to pass as arg string</span>
     <span class="n">binary_c_args</span> <span class="o">=</span> <span class="p">{}</span>
 
     <span class="c1"># Check which binary_c arguments have been passed and put them into a dict</span>
@@ -225,7 +228,7 @@
         <span class="k">else</span><span class="p">:</span>
             <span class="k">if</span> <span class="ow">not</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">other_keywords</span><span class="p">:</span>
                 <span class="nb">print</span><span class="p">(</span>
-                    <span class="s2">&quot;The following keyword was not recognized and wont be used:</span><span class="se">\n\t</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+                    <span class="s2">&quot;The following keyword was not recognised and wont be used:</span><span class="se">\n\t</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                         <span class="n">key</span>
                     <span class="p">)</span>
                 <span class="p">)</span>
@@ -284,9 +287,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/_modules/binarycpython/utils/spacing_functions.html b/docs/build/html/_modules/binarycpython/utils/spacing_functions.html
index b2e20f0406d135ad49cca2156d7f78bd19ff492f..ae925983e3bfeae8ecaa57c3e09faf70b235d174 100644
--- a/docs/build/html/_modules/binarycpython/utils/spacing_functions.html
+++ b/docs/build/html/_modules/binarycpython/utils/spacing_functions.html
@@ -30,6 +30,9 @@
         <script src="../../../_static/underscore.js"></script>
         <script src="../../../_static/doctools.js"></script>
         <script src="../../../_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="../../../_static/js/theme.js"></script>
 
@@ -84,7 +87,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../readme_link.html">Python module for binary_c</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../modules.html">Binarycpython code</a></li>
-<li class="toctree-l1"><a class="reference internal" href="../../../examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -206,9 +209,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/_modules/binarycpython/utils/useful_funcs.html b/docs/build/html/_modules/binarycpython/utils/useful_funcs.html
index 9fe021016a584544105928dbbc8b261cf1a801d0..f7eda30338dfc263c512a7da17f734cd64619e03 100644
--- a/docs/build/html/_modules/binarycpython/utils/useful_funcs.html
+++ b/docs/build/html/_modules/binarycpython/utils/useful_funcs.html
@@ -30,6 +30,9 @@
         <script src="../../../_static/underscore.js"></script>
         <script src="../../../_static/doctools.js"></script>
         <script src="../../../_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="../../../_static/js/theme.js"></script>
 
@@ -84,7 +87,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../readme_link.html">Python module for binary_c</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../modules.html">Binarycpython code</a></li>
-<li class="toctree-l1"><a class="reference internal" href="../../../examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -165,10 +168,13 @@
 <span class="sd">    - ZAMS_collision(m1, m2, e, sep, z) returns 1 if stars collide on the ZAMS</span>
 <span class="sd">    - roche_lobe(q): returns roche lobe radius in units of separation</span>
 <span class="sd">    - ragb(m, z): radius at first thermal pulse</span>
+<span class="sd">    - minimum_period_for_RLOF(M1, M2, metallicity, store_memaddr=-1): function to calculate the minimum period that leads to RLOF on ZAMS</span>
+<span class="sd">    - minimum_separation_for_RLOF(M1, M2, metallicity, store_memaddr=-1): function to calculate the minimum period that leads to RLOF on ZAMS</span>
+<span class="sd">    - maximum_mass_ratio_for_RLOF(M1, orbital_period, store_memaddr=None): Function to calculate the maximum mass ratio that leads to RLOF on ZAMS</span>
 
 <span class="sd">Tasks:</span>
 <span class="sd">    - TODO: check whether these functions are correct</span>
-<span class="sd">    - TODO: add unittest for maximum_mass_ratio_for_RLOF</span>
+<span class="sd">    - TODO: add unit test for maximum_mass_ratio_for_RLOF</span>
 <span class="sd">&quot;&quot;&quot;</span>
 
 <span class="kn">import</span> <span class="nn">math</span>
@@ -186,13 +192,13 @@
     <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">    Wrapper function for _binary_c_bindings.return_minimum_orbit_for_RLOF</span>
 
-<span class="sd">    Handles the output and returns the minimum orbital period at which RLOF just does not occur at zams</span>
+<span class="sd">    Handles the output and returns the minimum orbital period at which RLOF just does not occur at ZAMS</span>
 
 <span class="sd">    Args:</span>
 <span class="sd">        M1: Primary mass in solar mass</span>
 <span class="sd">        M2: Secondary mass in solar mass</span>
 <span class="sd">        metallicity: metallicity</span>
-<span class="sd">        store_memaddr (optional): store memory adress</span>
+<span class="sd">        store_memaddr (optional): store memory address</span>
 <span class="sd">    Returns:</span>
 <span class="sd">        minimum orbital_period that just does not cause a RLOF at ZAMS</span>
 
@@ -560,9 +566,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/_modules/index.html b/docs/build/html/_modules/index.html
index 191639de419f1f892361c50bfc35fbe6b9e04fd9..a432647e0709e1451a47c43e2eca7dbd9037ac43 100644
--- a/docs/build/html/_modules/index.html
+++ b/docs/build/html/_modules/index.html
@@ -30,6 +30,9 @@
         <script src="../_static/underscore.js"></script>
         <script src="../_static/doctools.js"></script>
         <script src="../_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="../_static/js/theme.js"></script>
 
@@ -84,7 +87,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../readme_link.html">Python module for binary_c</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../modules.html">Binarycpython code</a></li>
-<li class="toctree-l1"><a class="reference internal" href="../examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -186,9 +189,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/_sources/binary_c_parameters.rst.txt b/docs/build/html/_sources/binary_c_parameters.rst.txt
index cdca213e0895c0790c4f7097c7731afe40b9e315..96a16995f44edbe0c9af9b78993e06515eaadf1b 100644
--- a/docs/build/html/_sources/binary_c_parameters.rst.txt
+++ b/docs/build/html/_sources/binary_c_parameters.rst.txt
@@ -4,7 +4,7 @@ The following chapter contains all the parameters that the current version of bi
 
 
 This information was obtained by the following binary_c build:
-	**binary_c git branch**: branch_david	**binary_c git revision**: 6044:20210720:d1ed5b6c1	**Built on**: Jul 20 2021 13:54:45
+	**binary_c git branch**: branch_david	**binary_c git revision**: 6101:20210807:c5232be5c	**Built on**: Aug  7 2021 17:32:06
 
 
 Section: stars
diff --git a/docs/build/html/_sources/example_notebooks.rst.txt b/docs/build/html/_sources/example_notebooks.rst.txt
new file mode 100644
index 0000000000000000000000000000000000000000..7e2eef403ef98e8f4cf2785691ed1aadca497439
--- /dev/null
+++ b/docs/build/html/_sources/example_notebooks.rst.txt
@@ -0,0 +1,15 @@
+Example notebooks
+=================
+We have a set of notebooks that explain and show the usage of the binarycpython features. The notebooks are also stored in the examples/ directory in the `repository <https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/master/examples>`_
+
+The order of the notebooks below is more or less the recommended order to read.
+
+.. toctree::
+    :maxdepth: 2
+    :caption: Contents:
+    
+    notebook_individual_systems.ipynb
+    notebook_custom_logging.ipynb
+    notebook_population.ipynb
+    notebook_extra_features.ipynb
+    notebook_api_functionality.ipynb
\ No newline at end of file
diff --git a/docs/build/html/_sources/examples.rst.txt b/docs/build/html/_sources/examples.rst.txt
deleted file mode 100644
index ab58720d9b5a670eb13d8468daa687e72ab86e52..0000000000000000000000000000000000000000
--- a/docs/build/html/_sources/examples.rst.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Examples
-========
-This chapter contains the source code of example scripts which show the way of using certain functions
-
-.. toctree::                                                                    
-   :hidden:                                                                     
-
-   general_examples
-   population_example
\ No newline at end of file
diff --git a/docs/build/html/_sources/general_examples.rst.txt b/docs/build/html/_sources/general_examples.rst.txt
deleted file mode 100644
index 8509de5b72faf82bc026ed2b785b2d72b4ccc702..0000000000000000000000000000000000000000
--- a/docs/build/html/_sources/general_examples.rst.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Examples
-========
-The source code of the general examples.
-
-.. literalinclude:: ../../examples/examples.py
-    :language: python
-    :linenos:
\ No newline at end of file
diff --git a/docs/build/html/_sources/grid_options_descriptions.rst.txt b/docs/build/html/_sources/grid_options_descriptions.rst.txt
index 5a77792e1c16a5d29844979038458f27e145a08d..319b8d56a6d616f55498ec2c10fbc358a8de8183 100644
--- a/docs/build/html/_sources/grid_options_descriptions.rst.txt
+++ b/docs/build/html/_sources/grid_options_descriptions.rst.txt
@@ -13,19 +13,21 @@ The following options are meant to be changed by the user.
 
 | **C_logging_code**: Variable to store the exact code that is used for the custom_logging. In this way the user can do more complex logging, as well as putting these logging strings in files.
 
-| **amt_cores**: The amount of cores that the population grid will use. The multiprocessing is useful but make sure to figure out how many logical cores the machine has. The core is multiprocessed, not multithreaded, and will gain no extra speed when amt_cores exceeds the amount of logical cores. Input: int
+| **amt_cores**: The amount of cores that the population grid will use. The multiprocessing is useful but make sure to figure out how many logical cores the machine has. The core is multi processed, not multi threaded, and will gain no extra speed when amt_cores exceeds the amount of logical cores. Input: int
 
-| **combine_ensemble_with_thread_joining**: BOolean flag on whether to combine everything and return it to the user or if false: write it to data_dir/ensemble_output_{popuation_id}_{thread_id}.json
+| **combine_ensemble_with_thread_joining**: Boolean flag on whether to combine everything and return it to the user or if false: write it to data_dir/ensemble_output_{population_id}_{thread_id}.json
 
 | **condor**: Int flag whether to use a condor type population evolution. Not implemented yet.
 
-| **custom_logging_func_memaddr**: Memory adress where the custom_logging_function is stored. Input: int
+| **custom_logging_func_memaddr**: Memory address where the custom_logging_function is stored. Input: int
+
+| **do_dry_run**: Whether to do a dry run to calculate the total probability for this run
 
 | **ensemble_factor_in_probability_weighted_mass**: Flag to multiply all the ensemble results with 1/probability_weighted_mass
 
 | **evolution_type**: Variable containing the type of evolution used of the grid. Multiprocessing or linear processing
 
-| **failed_systems_threshold**: Variable storing the maximum amount of systems that are allowed to fail before logging their commandline arguments to failed_systems log files
+| **failed_systems_threshold**: Variable storing the maximum amount of systems that are allowed to fail before logging their command line arguments to failed_systems log files
 
 | **gridcode_filename**: Filename for the grid code. Set and used by the population object. TODO: allow the user to provide their own function, rather than only a generated function.
 
@@ -35,7 +37,7 @@ The following options are meant to be changed by the user.
 
 | **log_file**: Log file for the population object. Unused
 
-| **log_runtime_systems**: Whether to log the runtime of the systems . Each systems run by the thread is logged to a file and is stored in the tmp_dir. (1 file per thread). Don't use this if you are planning to run alot of systems. This is mostly for debugging and finding systems that take long to run. Integer, default = 0. if value is 1 then the systems are logged
+| **log_runtime_systems**: Whether to log the runtime of the systems . Each systems run by the thread is logged to a file and is stored in the tmp_dir. (1 file per thread). Don't use this if you are planning to run a lot of systems. This is mostly for debugging and finding systems that take long to run. Integer, default = 0. if value is 1 then the systems are logged
 
 | **m&s_options**: Internal variable that holds the M&S options. Don't write to this your self
 
@@ -49,20 +51,20 @@ The following options are meant to be changed by the user.
 
 | **repeat**: Factor of how many times a system should be repeated. Consider the evolution splitting binary_c argument for supernovae kick repeating.
 
-| **run_zero_probability_system**: Whether to run the zero probability systems. Default: True. Input: boolean
+| **run_zero_probability_system**: Whether to run the zero probability systems. Default: True. Input: Boolean
 
-| **slurm**: Int flag whether to use a slurm type population evolution.
+| **slurm**: Int flag whether to use a Slurm type population evolution.
 
-| **source_file_filename**: Variable containing the source file containing lines of binary_c commandline calls. These all have to start with binary_c.
+| **source_file_filename**: Variable containing the source file containing lines of binary_c command line calls. These all have to start with binary_c.
 
 | **tmp_dir**: Directory where certain types of output are stored. The grid code is stored in that directory, as well as the custom logging libraries. Log files and other diagnostics will usually be written to this location, unless specified otherwise
 
 | **verbosity**: Verbosity of the population code. Default is 0, by which only errors will be printed. Higher values will show more output, which is good for debugging.
 
-| **weight**: Weight factor for each system. The calculated probability is mulitplied by this. If the user wants each system to be repeated several times, then this variable should not be changed, rather change the _repeat variable instead, as that handles the reduction in probability per system. This is useful for systems that have a process with some random element in it.
+| **weight**: Weight factor for each system. The calculated probability is multiplied by this. If the user wants each system to be repeated several times, then this variable should not be changed, rather change the _repeat variable instead, as that handles the reduction in probability per system. This is useful for systems that have a process with some random element in it.
 
-Moe & Distefano sampler options
--------------------------------
+Moe & di Stefano sampler options
+--------------------------------
 The following options are meant to be changed by the user.
 
 
@@ -71,7 +73,7 @@ The following options are meant to be changed by the user.
 | **multiplicity_model**: 
 	multiplicity model (as a function of log10M1)
 	
-	You can use 'Poisson' which uses the system multiplicty
+	You can use 'Poisson' which uses the system multiplicity
 	given by Moe and maps this to single/binary/triple/quad
 	fractions.
 	
@@ -90,13 +92,13 @@ The following options are meant to be changed by the user.
 	
 
 | **normalize_multiplicities**: 
-	'norm': normalize so the whole population is 1.0
+	'norm': normalise so the whole population is 1.0
 	        after implementing the appropriate fractions
 	        S/(S+B+T+Q), B/(S+B+T+Q), T/(S+B+T+Q), Q/(S+B+T+Q)
-	        given a mix of multiplities, you can either (noting that
+	        given a mix of multiplicities, you can either (noting that
 	        here (S,B,T,Q) = appropriate modulator * model(S,B,T,Q) )
 	        note: if you only set one multiplicity_modulator
-	        to 1, and all the others to 0, then normalizing
+	        to 1, and all the others to 0, then normalising
 	        will mean that you effectively have the same number
 	        of stars as single, binary, triple or quad (whichever
 	        is non-zero) i.e. the multiplicity fraction is ignored.
@@ -105,7 +107,7 @@ The following options are meant to be changed by the user.
 	
 	'raw'   : stick to what is predicted, i.e.
 	          S/(S+B+T+Q), B/(S+B+T+Q), T/(S+B+T+Q), Q/(S+B+T+Q)
-	          without normalization
+	          without normalisation
 	          (in which case the total probability < 1.0 unless
 	          all you use single, binary, triple and quadruple)
 	
@@ -160,9 +162,9 @@ The following options are not meant to be changed by the user, as these options
 
 | **_end_time_evolution**: Variable storing the end timestamp of the population evolution. Set by the object itself
 
-| **_errors_exceeded**: Variable storing a boolean flag whether the amount of errors was higher than the set threshold (failed_systems_threshold). If True, then the commandline arguments of the failing systems will not be stored in the failed_system_log files.
+| **_errors_exceeded**: Variable storing a Boolean flag whether the amount of errors was higher than the set threshold (failed_systems_threshold). If True, then the command line arguments of the failing systems will not be stored in the failed_system_log files.
 
-| **_errors_found**: Variable storing a boolean flag whether errors by binary_c are encountered.
+| **_errors_found**: Variable storing a Boolean flag whether errors by binary_c are encountered.
 
 | **_evolution_type_options**: List containing the evolution type options.
 
@@ -186,9 +188,9 @@ The following options are not meant to be changed by the user, as these options
 
 | **_start_time_evolution**: Variable storing the start timestamp of the population evolution. Set by the object itself.
 
-| **_store_memaddr**: Memory adress of the store object for binary_c.
+| **_store_memaddr**: Memory address of the store object for binary_c.
 
-| **_system_generator**: Function object that contains the system generator function. This can be from a grid, or a source file, or a montecarlo grid.
+| **_system_generator**: Function object that contains the system generator function. This can be from a grid, or a source file, or a Monte Carlo grid.
 
 | **_total_mass_run**: To count the total mass that thread/process has ran
 
diff --git a/docs/build/html/_sources/index.rst.txt b/docs/build/html/_sources/index.rst.txt
index b07d6ec3c6040192693d6609004c48afc362d124..dd3e4bb0cd3a29294bc3d9a19cc70e9470cdd746 100644
--- a/docs/build/html/_sources/index.rst.txt
+++ b/docs/build/html/_sources/index.rst.txt
@@ -14,7 +14,7 @@ Welcome to binary_c-python's documentation!
 
    readme_link
    modules
-   examples
+   example_notebooks
    binary_c_parameters
    grid_options_descriptions
    Visit the GitLab repo <https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python>
diff --git a/docs/build/html/_sources/notebook_api_functionality.ipynb.txt b/docs/build/html/_sources/notebook_api_functionality.ipynb.txt
new file mode 100644
index 0000000000000000000000000000000000000000..d81c31711bfc5d6de3159fd8958df96dd145ded0
--- /dev/null
+++ b/docs/build/html/_sources/notebook_api_functionality.ipynb.txt
@@ -0,0 +1,951 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "cb9d00f5-9613-471e-a4bb-6181311bf73b",
+   "metadata": {},
+   "source": [
+    "# Using the API functionality of binarycpython\n",
+    "This notebook shows how to use the API functions that interface with binary_c. It usually is better to use wrapper functions that internally use these API functions, because most of the output here is very raw\n",
+    "\n",
+    "Binarycpython uses the Python-C extension framework to interface Python with C. The sourcecode for this is contained in `src/binary_c_python.c`, and the functions are available via `from binarycpython import _binary_c_bindings`.\n",
+    "\n",
+    "The following functions are available through the API: (run cell below)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "id": "ded7eaf6-e1ba-46c2-9f6f-9ebcb14a264d",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Help on module binarycpython._binary_c_bindings in binarycpython:\n",
+      "\n",
+      "NAME\n",
+      "    binarycpython._binary_c_bindings - Module to interface the Binary_c API with python.\n",
+      "\n",
+      "FUNCTIONS\n",
+      "    free_persistent_data_memaddr_and_return_json_output(...)\n",
+      "        Frees the persistent_data memory and returns the json output\n",
+      "    \n",
+      "    free_store_memaddr(...)\n",
+      "        Frees the store memaddr\n",
+      "    \n",
+      "    return_arglines(...)\n",
+      "        Return the default args for a binary_c system\n",
+      "    \n",
+      "    return_help(...)\n",
+      "        Return the help info for a given parameter\n",
+      "    \n",
+      "    return_help_all(...)\n",
+      "        Return an overview of all the parameters, their description, categorized in sections\n",
+      "    \n",
+      "    return_maximum_mass_ratio_for_RLOF(...)\n",
+      "        Returns a string containing the maximum mass ratio for which a binary system does not RLOF at zams. Optionally accepts a store_capsule. Please use the wrapper functions in utils for this except when you know what you're doing\n",
+      "    \n",
+      "    return_minimum_orbit_for_RLOF(...)\n",
+      "        Returns a string containing the minimum orbit and separation for which a binary system does not RLOF at zams. Please use the wrapper functions in utils for this except when you know what you're doing\n",
+      "    \n",
+      "    return_persistent_data_memaddr(...)\n",
+      "        Return the store memory adress that will be passed to run_population\n",
+      "    \n",
+      "    return_store_memaddr(...)\n",
+      "        Return the store memory adress that will be passed to run_population\n",
+      "    \n",
+      "    return_version_info(...)\n",
+      "        Return the version information of the used binary_c build\n",
+      "    \n",
+      "    run_system(...)\n",
+      "        Function to run a system. This is a general function that will be able to handle different kinds of situations: single system run with different settings, population run with different settings, etc. To avoid having too many functions doing slightly different things. \n",
+      "        \n",
+      "        Arguments:\n",
+      "                argstring: argument string for binary_c\n",
+      "                (opt) custom_logging_func_memaddr: memory address value for custom logging function. Default = -1 (None)\n",
+      "                (opt) store_memaddr: memory adress of the store. Default = -1 (None)\n",
+      "                (opt) write_logfile: Boolean (in int form) for whether to enable the writing of the log function. Default = 0\n",
+      "                (opt) population: Boolean (in int form) for whether this system is part of a population run. Default = 0.\n",
+      "    \n",
+      "    test_func(...)\n",
+      "        Function that contains random snippets. Do not expect this to remain available, or reliable. i.e. dont use it.\n",
+      "\n",
+      "FILE\n",
+      "    /home/david/.pyenv/versions/3.6.4/envs/dev-binarycpython3.6.4/lib/python3.6/site-packages/binarycpython/_binary_c_bindings.cpython-36m-x86_64-linux-gnu.so\n",
+      "\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "from binarycpython import _binary_c_bindings\n",
+    "help(_binary_c_bindings)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "7ddede71-ffaa-4b24-aece-e94128a60d7f",
+   "metadata": {},
+   "source": [
+    "There are three main categories of functions:\n",
+    "\n",
+    "- Functions to get information from binary_c: these can be used to evolve systems, and get utility information from binary_c.\n",
+    "    - run_system\n",
+    "    - return_minimum_orbit_for_RLOF\n",
+    "    - return_maximum_mass_ratio_for_RLOF\n",
+    "    - return_help\n",
+    "    - return_help_all\n",
+    "    - return_arglines\n",
+    "\n",
+    "- Memory creation functions: these can be used to have binary_c allocate memory which is used or written to by binary_c\n",
+    "    - return_persistent_data_memaddr\n",
+    "    - return_store_memaddr\n",
+    "\n",
+    "- Memory freeing functions: These can be used to free the allocated memory, and in the case of persistent memory it will also return the contents of the ensemble\n",
+    "    - free_persistent_data_memaddr_and_return_json_output\n",
+    "    - free_store_memaddr"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "0dd3e115-1571-42f7-9ab9-cf7688fa28c1",
+   "metadata": {},
+   "source": [
+    "## Example usage:"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "c5015daa-35ab-4736-a04d-f3cbe661638c",
+   "metadata": {},
+   "source": [
+    "### Setting up, using and freeing store"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 10,
+   "id": "10a74d5a-a3d5-4543-a5bc-20d1fe885bb4",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "<capsule object \"STORE\" at 0x7f163859d0c0>\n",
+      "SINGLE_STAR_LIFETIME 10 27.7358\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# allocating store memory\n",
+    "store_memaddr = _binary_c_bindings.return_store_memaddr()\n",
+    "print(store_memaddr)\n",
+    "\n",
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=10,\n",
+    "    orbital_period=4500,\n",
+    "    eccentricity=0.0,\n",
+    "    metallicity=0.02,\n",
+    "    max_evolution_time=15000,\n",
+    ").strip()\n",
+    "\n",
+    "#\n",
+    "output = _binary_c_bindings.run_system(argstring, store_memaddr=store_memaddr)\n",
+    "print(output)\n",
+    "\n",
+    "# Freeing store\n",
+    "_binary_c_bindings.free_store_memaddr(store_memaddr)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "e9da5fc6-e680-483c-982e-4819767ed5b2",
+   "metadata": {},
+   "source": [
+    "### Getting information from binary_c"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "24f7ffe5-0076-459d-a37f-254e10d0d9f9",
+   "metadata": {},
+   "source": [
+    "We can get information for a parameter via return_help(parameter_name):\n",
+    "This will return an unparsed output"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 11,
+   "id": "318874f6-7acf-49bb-9786-299d4dffc0b3",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "binary_c help for variable : M_1 <Float>\n",
+      "\n",
+      "The initial mass of star one (in solar units, internally this is star index 0).\n",
+      "\n",
+      "Default : 0\n",
+      "\n",
+      "\n",
+      "\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(_binary_c_bindings.return_help('M_1'))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f7fafce6-a522-43ac-a0c2-15a3db393b49",
+   "metadata": {},
+   "source": [
+    "We can get information on all available parameters via return_help(parameter_name):"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 16,
+   "id": "d7e757ae-579c-42a2-a310-f0401b7800e8",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "\n",
+      "############################################################\n",
+      "##### Section Stars\n",
+      "############################################################\n",
+      "metallicity : This sets the metallicity of the stars, i.e. the amount (by mass) of matter which is not hydrogen or helium. If you are using the BSE algorithm, this must be 1e-4 <= metallicity <= 0.03. See also nucsyn_metallicity and effective_metallicity. : (null)\n",
+      "effective_metallicity : This sets effective metallicity of stars as used in routines like the Schneider wind loss. If not set, or set to DEFAULT_TO_METALLICITY (==-1, the default), this is just the same as metallicity. The main difference between effective_metallicity and metallicity is the range of validity: 0 <= effective_metallicity <= 1, while metallicity's range of validity is limited by the stellar evolution algorithm (so, for BSE, is 1e-4 <= metallicity <= 0.03). : (null)\n",
+      "M_1 : The initial mass of star one (in solar units, internally this is star index 0). : (null)\n",
+      "M_2 : The initial mass of star two (in solar units, internally this is star index 1). : (null)\n",
+      "M_3 : The initial mass of star three (in solar units, internally this is star index 2). : (null)\n",
+      "M_4 : The initial mass of star four (in solar units, internally this is star index 3). : (null)\n",
+      "vrot1 : The initial equatorial rotational velocity of star one (in km/s, internally this is star index 0). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot2,3,4. : (null)\n",
+      "vrot2 : The initial equatorial rotational velocity of star two (in km/s, internally this is star index 1). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,3,4. : (null)\n",
+      "vrot3 : The initial equatorial rotational velocity of star three (in km/s, internally this is star index 2). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,2,4. : (null)\n",
+      "vrot4 : The initial equatorial rotational velocity of star four (in km/s, internally this is star index 3). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,2,3. : (null)\n",
+      "Prot1 : The initial equatorial rotational velocity of star one (in km/s, internally this is star index 0). See also Prot2,3,4. : (null)\n",
+      "Prot2 : The initial equatorial rotational velocity of star two (in km/s, internally this is star index 1). See also Prot1,3,4. : (null)\n",
+      "Prot3 : The initial equatorial rotational period of star three (in days, internally this is star index 2). See also Prot1,2,4. : (null)\n",
+      "Prot4 : The initial equatorial rotational period of star four (in days, internally this is star index 3). See also Prot1,2,3. : (null)\n",
+      "inclination1 : The initial inclination of star one (in degrees). : (null)\n",
+      "inclination2 : The initial inclination of star two (in degrees). : (null)\n",
+      "inclination3 : The initial inclination of star three (in degrees). : (null)\n",
+      "inclination4 : The initial inclination of star four (in degrees). : (null)\n",
+      "B_1 : The initial magnetic field of star one (in Gauss, internally this is star index 0). : (null)\n",
+      "B_2 : The initial magnetic field of star two (in Gauss, internally this is star index 1). : (null)\n",
+      "B_3 : The initial magnetic field of star three (in Gauss, internally this is star index 2). : (null)\n",
+      "B_4 : The initial magnetic field of star four (in Gauss, internally this is star index 3). : (null)\n",
+      "B_inclination1 : The initial inclination of the magnetic field of star one (in degrees). : (null)\n",
+      "B_inclination2 : The initial inclination of the magnetic field of star two (in degrees). : (null)\n",
+      "B_inclination3 : The initial inclination of the magnetic field of star three (in degrees). : (null)\n",
+      "B_inclination4 : The initial inclination of the magnetic field of star four (in degrees). : (null)\n",
+      "stellar_type_1 : Set the stellar type of star 1 (internal index 0), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "stellar_type_2 : Set the stellar type of star 2 (internal index 1), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "stellar_type_3 : Set the stellar type of star 3 (internal index 2), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "stellar_type_4 : Set the stellar type of star 4 (internal index 3), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "max_stellar_type_1 : The maximum stellar type of star 1 (internal index 0). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value. \n",
+      " : (null)\n",
+      "max_stellar_type_2 : The maximum stellar type of star 2 (internal index 1). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.\n",
+      " : (null)\n",
+      "max_stellar_type_3 : The maximum stellar type of star 3 (internal index 2). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.\n",
+      " : (null)\n",
+      "max_stellar_type_4 : The maximum stellar type of star 4 (internal index 3). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.\n",
+      " : (null)\n",
+      "probability : The probability is a weighting applied to the star based on, say, the initial mass function. When running a grid of stars to simulate *all* stars, the summed probability of all the stars should be 1.0. : (null)\n",
+      "phasevol : The system's phase volume, used by binary_grid. : (null)\n",
+      "stellar_structure_algorithm : Set the stellar structure algorithm. 0=modified BSE (default), 1=none, 2=external function (must be defined by the calling code), 3=binary_c (not yet implemented). : (null)\n",
+      "solver : The type of solver. Default is the Forward-Euler (0), but could be RK2 (1), RK4 (2) or a predictor-corretor (3). : (null)\n",
+      "max_evolution_time : Set the maximum age for the stars (Myr). : (null)\n",
+      "max_model_number : Set the maximum number of models, ignored if 0 (default is 0). : (null)\n",
+      "monte_carlo_kicks : Turn on Monte-Carlo SN kicks. On (True) by default, and indeed other algorithms are probably broken. : (null)\n",
+      "disable_debug : Disables debug output. Only has an effect when DEBUG is 1, which probably requires a rebuild. Default FALSE. : (null)\n",
+      "timestep_logging : Turn on timestep logging (default is False). : (null)\n",
+      "rejects_in_log : Show timestep rejections in the main log (default is False). : (null)\n",
+      "vandenHeuvel_logging : Turn on van den Heuvel logging (default is False). : (null)\n",
+      "evolution_splitting : If True, turn on splitting of an evolutionary run if splitpoint (e.g. supernova) occurs. : (null)\n",
+      "disable_events : Whether to disable the new events code (defaults to False, so we use events by default)\n",
+      " : (null)\n",
+      "evolution_splitting_sn_eccentricity_threshold : Threshold eccentricity above which evolution splitting happens in a system with no SN kick. (0.01) : (null)\n",
+      "evolution_splitting_sn_n : Number of runs to split into when a SN occurs. : (null)\n",
+      "evolution_splitting_maxdepth : Max number of splits in an evolutionary run. : (null)\n",
+      "equation_of_state_algorithm : Set the equation of state algorithm. 0 = Paczynski. : (null)\n",
+      "opacity_algorithm : Set the opacity algorithm. 0 = Paczynski, 1 = Ferguson/Opal. : (null)\n",
+      "wind_mass_loss : Defines the algorithm used for stellar winds. 0 = none, 1 = Hurley et al. (2002), 2 = Schneider (2018). : 0\n",
+      "gbwind : Wind prescription for first red giant branch stars.  0=Reimers (Hurley et al 2000/2002; choose gb_reimers_eta=0.5 for their mass loss rate), 1=Schroeder+Cuntz 2005 (set gb_reimers_eta=1.0 for their mass loss rate). : (null)\n",
+      "mattsson_Orich_tpagbwind : Experimental : turns on Mattsson's TPAGB wind when the star is oxygen rich. Requires MATTSSON_MASS_LOSS. : (null)\n",
+      "magnetic_braking_factor : Multiplier for the magnetic braking angular momentum loss rate. : (null)\n",
+      "magnetic_braking_gamma : gamma factor in Rappaport style magnetic braking expression. : (null)\n",
+      "magnetic_braking_algorithm : Algorithm for the magnetic braking angular momentum loss rate. 0 = Hurley et al. 2002, 1 = Andronov, Pinnsonneault and Sills 2003, 2 = Barnes and Kim 2010  : (null)\n",
+      "helium_flash_mass_loss : Mass to be lost at the helium flash. : (null)\n",
+      "gb_reimers_eta : First red giant branch wind multiplication factor, cf. eta in Reimers' mass loss formula. (This multiplies the 4e-13 in Reimers' formula, or the 8e-14 in Schroeder and Cuntz.) : (null)\n",
+      "gbwindfac : Multiplier for the giant branch wind mass loss rate : (null)\n",
+      "tpagbwindfac : Multiplier for the TPAGB wind mass loss rate : (null)\n",
+      "eagbwindfac : Multiplier for the EAGB wind mass loss rate : (null)\n",
+      "nieuwenhuijzen_windfac : Multiplier for the Nieuwenhuijzen & de Jager wind mass loss rate : (null)\n",
+      "tpagbwind : Wind prescription during the TPAGB. 0=Karakas 2002 (a modified Vassiliadis and Wood 1993), 1=Hurley et al 2000/2002 (Vassiliadis and Wood 1993), 2=Reimers, 3=Bloecker, 4=Van Loon,  5=Rob's C-wind (broken?), 6,7=Vassiliadis and Wood 1993 (Karakas,Hurley variants respectively) when C/O>1, 8=Mattsson, 9 = Goldman et al. (2017), 10 = Beasor et al. (2020). : (null)\n",
+      "eagbwind : Wind prescription during the EAGB. 0=BSE (Hurley+2002, based on VW93), 1 = Goldman et al. (2017), 2 = Beasor et al. (2020). : (null)\n",
+      "wind_gas_to_dust_ratio : Gas to dust ratio used in wind calculations (e.g. Goldman et al. 2017). Typically 200 (Milky Way)-500 (Magellanic Clouds). Default is 200, approximately as in MW stars. : (null)\n",
+      "vwind_multiplier : Multiplier for the stellar wind velocity. : (null)\n",
+      "vwind_beta : Beta for stellar wind speed calculations, where vwind=sqrt(beta) * escape velocity. Default 0.125 (from BSE, Hurley et al. 2002).  : (null)\n",
+      "superwind_mira_switchon : In the Vassiliadis and Wood (1993) AGB wind prescription, the superwind is turned on at a given Mira period, usually 500 days. You can vary when this switch-on happens with this parameter. : (null)\n",
+      "vw93_mira_shift : In the Vassiliadis and Wood (1993) AGB wind prescription, the wind loss rate depends on the Mira period plus this offset. Requires VW93_MIRA_SHIFT. : (null)\n",
+      "vw93_multiplier : In the Vassiliadis and Wood (1993) AGB wind prescription, the wind loss rate is multiplied by this factor. Requires VW93_MULTIPLIER. : (null)\n",
+      "tpagb_reimers_eta : TPAGB Reimers wind multiplication factor, cf. eta in Reimers' mass loss formula. (This multiplies the 4e-13 in Reimers' formula, or the 8e-14 in Schroeder and Cuntz.) Note that Reimers is not the default TPAGB wind prescription. See also tpagbwind. : (null)\n",
+      "artificial_mass_accretion_rate%d : Constant mass accretion rate for star <n>. : (null)\n",
+      "artificial_angular_momentum_accretion_rate%d : Constant angular momentum accretion for star <n>. : (null)\n",
+      "artificial_orbital_angular_momentum_accretion_rate : Constant angular momentum accretion rate on the orbit. : (null)\n",
+      "artificial_accretion_start_time : Time at which artificial accretion stars. Ignored if <0 (default is -1). : (null)\n",
+      "artificial_accretion_end_time : Time at which artificial accretion ends. Ignored if <0 (default is -1). : (null)\n",
+      "wr_wind : Massive-star (WR) wind prescription. 0 = Hurley et al 2000/2002, 1=Maeder and Meynet, 2=Nugis and Lamers, 3=John Eldridge's version of Vink's early-2000s wind (See Lynnette Dray's thesis, or John Eldridge's thesis) : (null)\n",
+      "wr_wind_fac : Massive-star (WR) wind multiplication factor. : (null)\n",
+      "wrwindfac : Massive-star (WR) wind multiplication factor. Synonymous with wr_wind_fac (which you should use instead). : (null)\n",
+      "BH_prescription : Black hole mass prescrition: relates the mass of a newly formed black hole to its progenitor's (CO) core mass. 0=Hurley et al 2000/2002, 1=Belczynski (early 2000s). : (null)\n",
+      "PPISN_prescription : (Pulsational) Pair-Instability Supernova prescription: Relates initial helium core mass of star to whether the star undergoes PPISN or PISN. Requires PPISN flag to be True (see binary_c_parameters.h). 0=no ppisn, 1=Farmer et al 2019. : Ignore\n",
+      "sn_kick_distribution_II : Set the distribution of speeds applied to kick type II core collapse supernova systems. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_ECAP : Set the distribution of speeds applied to the remnants of electron-capture supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_NS_NS : Set the distribution of speeds applied to kick neutron stars and black holes that survive a NS-NS merger. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_IBC : Set the distribution of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_GRB_COLLAPSAR : Set the distribution of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova which is also a collapsar. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_TZ : Set the distribution of speeds applied to kick newly-born neutron stars and black holes at the death of a Thorne-Zytkow object. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_AIC_BH : Set the distribution of speeds applied to kick newly-born neutron stars black holes after accretion induced collapse of a neutron star. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_BH_BH : Set the distribution of speeds applied to black holes formed by the merger of two black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_BH_NS : Set the distribution of speeds applied to black holes formed by the merger of a neutron star and a black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_IA_Hybrid_HeCOWD : Set the distribution of speeds applied to any survivor of a hybrid He-COWD SNIa explosion. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_IA_Hybrid_HeCOWD_subluminous : Set the distribution of speeds applied to any survivor of a subluminous hybrid He-COWD SNIa explosion. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_PPISN : Set the distribution of speeds applied to PPISN supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_PISN : Set the distribution of speeds applied to PISN supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_PHDIS : Set the distribution of speeds applied to PHDIS supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_II : Set the dispersion of speeds applied to kick type II core collapse supernova systems. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_ECAP : Set the dispersion of speeds applied to the remnants of electron-capture supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_NS_NS : Set the dispersion of speeds applied to kick neutron stars and black holes that survive a NS-NS merger. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_IBC : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_GRB_COLLAPSAR : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova which is also a collapsar. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_TZ : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes at the death of a Thorne-Zytkow object. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_AIC_BH : Set the dispersion of speeds applied to kick newly-born neutron stars black holes after accretion induced collapse of a neutron star. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_BH_BH : Set the dispersion of speeds applied to black holes formed by the merger of two black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_BH_NS : Set the dispersion of speeds applied to black holes formed by the merger of a neutron star and a black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_IA_Hybrid_HeCOWD : Set the dispersion of speeds applied to the survivor of a SNIa explosion of a hybrid He-COWD. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_IA_Hybrid_HeCOWD_subluminous : Set the dispersion of speeds applied to the survivor of a subluminous SNIa explosion of a hybrid He-COWD. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_PPISN : Set the dispersion of speeds applied to the survivor of a PPISN supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_PISN : Set the dispersion of speeds applied to the survivor of a PISN supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_PHDIS : Set the dispersion of speeds applied to the survivor of a PHDIS supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_companion_IA_He : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia He supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_ELD : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia ELD (sub-Mch) supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_CHAND : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia Mch supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_AIC : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when an accretion induced collapse (supernova) occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_ECAP : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when an electron capture supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_He_Coal : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia helium merger supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_CHAND_Coal : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia Mch merger supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_NS_NS : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a neutron-star neutron-star merger. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_GRB_COLLAPSAR : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a GRB Collapsar (rapidly rotating SN Ibc) supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_HeStarIa : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a He-star Ia supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IBC : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a type Ib/c supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_II : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a type II supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IIa : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a type IIa supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_WDKICK : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a WD is kicked. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_TZ : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Thorne-Zytkow object is formed. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_AIC_BH : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a neutron star collapses to a black hole. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_BH_BH : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when two black holes merge. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_BH_NS : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a black hole merges with a neutron star. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_Hybrid_HeCOWD : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a hybrid He-COWD type Ia explosion. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_Hybrid_HeCOWD_subluminous : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a subluminous hybrid He-COWD type Ia explosion. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_PPISN : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a PPISN supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_PISN : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a PISN supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_PHDIS : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a PHDIS supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "wd_sigma : Set the speed at which white dwarfs are kicked when they form, in km/s. Default is zero (i.e. no kick). Requires WD_KICKS. : (null)\n",
+      "wd_kick_direction : Set the direction of white dwarf kicks. 0 = random, 1 = up, 2 = forward, 3 = backward, 4 = inward, 5 = outward. Requires WD_KICKS. : (null)\n",
+      "wd_kick_when : Decide when to kick a white dwarf. 0=at birth, 1=at first RLOF, 2=at given pulse number (see wd_kick_pulse_number), 3 at every pulse Requires WD_KICKS. : (null)\n",
+      "wd_kick_pulse_number : Apply a kick to a star at a desired pulse number on the TPAGB (i.e. pre-WD). Requires WD_KICKS. : (null)\n",
+      "minimum_helium_ignition_core_mass : Minimum helium core mass required to ignite helium in the case that the hydrogen envelope is stripped on the giant branch, e.g. to make an sdB or sdO star. Typically 0.4, if 0.0 then the BSE algorithm (based on the total mass) is used. : (null)\n",
+      "minimum_CO_core_mass_for_carbon_ignition : Minimum CO core mass for carbon ignition, assuming Mc,bagb>1.6Msun. Typically around 1.08Msun (Pols+1998). : (null)\n",
+      "minimum_CO_core_mass_for_neon_ignition : Minimum CO core mass for neon ignition. Typically around 1.42Msun. Stars that have cores that ignite carbon, but not neon explode in electon-capture supernovae. : (null)\n",
+      "minimum_mcbagb_for_nondegenerate_carbon_ignition : Minimum Mc,bagb (core mass at the base of the AGB) for non-degenerate carbon ignition. Typically around 2.25Msun (Pols+1998). : (null)\n",
+      "maximum_mcbagb_for_degenerate_carbon_ignition : Maximum Mc,bagb (core mass at the base of the AGB) for degenerate carbon ignition. Typically around 1.6Msun (Pols+1998). : (null)\n",
+      "max_neutron_star_mass : Maximum mass of a neutron star before it collapses to a black hole. Typically around 2Msun. : (null)\n",
+      "chandrasekhar_mass : The Chandrasekhar mass, usually 1.44Msun : (null)\n",
+      "delta_mcmin : A parameter to reduce the minimum core mass for third dredge up to occur on the TPAGB. As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. : (null)\n",
+      "lambda_min : A parameter to increase the efficiency of third dredge up on the TPAGB. The efficiency is lambda * lambda_mult, and setting lambda_min>0 implies that, once Mc>Mcmin (see delta_mcmin) lambda=Max(lambda(fit to Karakas), lambda_min). As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. See also lambda_multiplier. : (null)\n",
+      "lambda_multiplier : A parameter to increase the efficiency of third dredge up on the TPAGB. The efficiency is lambda * lambda_mult, and setting lambda_min>0 implies that, once Mc>Mcmin (see delta_mcmin) lambda=Max(lambda(fit to Karakas), lambda_min). As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. : (null)\n",
+      "minimum_envelope_mass_for_third_dredgeup : The minimum envelope mass for third dredge up on the TPAGB. Early, solar metallicity models by Straniero et al suggested 0.5Msun is typical. However, circumstantial evidence (Izzard et al 2009) as well as newer models by Stancliffe and Karakas suggest that at low metallicity a value nearer zero is more appropriate. : (null)\n",
+      "mass_of_pmz : The mass in the partial mixing zone of a TPAGB star, using the Karakas 2012 tables. Ask Carlo Abate for more details, or see the series of papers Abate et al 2012, 2013, 2014. Requires NUCSYN and USE_TABULAR_INTERSHELL_ABUNDANCES_KARAKAS_2012. : (null)\n",
+      "c13_eff : The \"efficiency\" of partial mixing in a TPAGB star intershell region, when using the s-process tables of Gallino, Busso, Lugaro et al. as provided by Maria Lugaro for the Izzard et al. 2009 paper. Requires NUCSYN and NUCSYN_S_PROCESS. : (null)\n",
+      "mc13_pocket_multiplier : Multiplies the mass in the partial mixing zone of a TPAGB star, when using the s-process tables of Gallino, Busso, Lugaro et al. as provided by Maria Lugaro for the Izzard et al. 2009 paper. Requires NUCSYN and NUCSYN_S_PROCESS. : (null)\n",
+      "tides_convective_damping : Tidal convective damping algorithm. 0=TIDES_HURLEY2002 Zahn 197x timescales + Hut, as in Hurley et al (2002), 1 = TIDES_ZAHN1989 : Zahn 1989 lambdas + Hut. : (null)\n",
+      "E2_prescription : Choose how to calculate the E2 structural parameter (used in tidal timescale calculations). 0=Hurley 1=Izzard (see Siess et al 2013). : (null)\n",
+      "dtfac : A parameter to decrease the timestep ONLY during the TPAGB phase. : (null)\n",
+      "hbbtfac : A parameter to modulate the temperature at the base of the hot-bottom burning zone in TPAGB stars. (Works only if NUCSYN is defined) : (null)\n",
+      "wind_multiplier_%d : Wind multiplier for the stellar type specified by the intger %d. By default these are all 1.0. : (null)\n",
+      "wind_type_multiplier_%d : Wind multiplier for different types of wind (MS, GB, AGB, WR, LBV, OTHER), given by the integer %d. By default these are all 1.0. : (null)\n",
+      "pre_main_sequence : Set to True to turn on pre-main sequence evolution. Currently this is not a special stellar type, rather the first (small) fraction of the main sequence has increased radii to match the Railton et al 2014 fits to Tout's pre-main sequence stars. Requires PRE_MAIN_SEQUENCE. See also pre_main_sequence_fit_lobes. : (null)\n",
+      "pre_main_sequence_fit_lobes : Set to True force a pre-main sequence star into its Roche lobe. This is done by artificially aging it. Requires PRE_MAIN_SEQUENCE : (null)\n",
+      "small_envelope_method : Choose the method used to determine the stellar radius when the envelope mass is very thin. 0 = Hurley et al. (2002), 1 = Miller Bertolami et al. (2016+) for GB and AGB stars only. : (null)\n",
+      "timestep_modulator : Multiplier applied to the global timestep. Requires TIMESTEP_MODULATION. : (null)\n",
+      "timestep_multiplier%d : Multiplier applied to timestep limit <n>. : (null)\n",
+      "maximum_timestep : The maximum timestep (MYr). : (null)\n",
+      "zoomfac_multiplier_decrease : When a timestep is rejected, decrease the timestep by this factor (0.5). : (null)\n",
+      "zoomfac_multiplier_increase : When a timestep is rejected, zooms, then succeeds, increase the timestep by this factor (1.2). : (null)\n",
+      "maximum_timestep_factor : The maximum factor between two subsequent timesteps (1.2). : (null)\n",
+      "maximum_nuclear_burning_timestep : The maximum timestep (MYr) in any nuclear burning phase. : (null)\n",
+      "nova_retention_method : Algorithm used to calculate the amount of mass retained during a nova explosion. 0=use nova_retention_fraction. (other methods pending) : (null)\n",
+      "MINT_metallicity : This sets the metallicity for MINT. It is ignored if set to -1.0, the default, in which case the normal metallicity parameter is used. : (null)\n",
+      "gaia_Teff_binwidth : log10(Effective temperature) bin width used to make Gaia-like HRDs\n",
+      " : (null)\n",
+      "gaia_L_binwidth : log10(luminosity) bin width used to make Gaia-like HRDs\n",
+      " : (null)\n",
+      "gaia_colour_transform_method : Use this to select the method used to transform to Gaia colours from other colour schemes. GAIA_CONVERSION_UBVRI_UNIVARIATE_JORDI2010 = 0 Jordi et al.'s univariate UBVRI fits, GAIA_CONVERSION_UBVRI_BIVARIATE_JORDI2010 = 1 Jordi et al.'s bivariate UBVRI fits, GAIA_CONVERSION_ugriz_UNIVARIATE_JORDI2010 = 2 Jordi et al.'s univariate UBVRI fits, GAIA_CONVERSION_ugriz_BIVARIATE_JORDI2010 = 3 Jordi et al.'s univariate ugriv fits, GAIA_CONVERSION_UBVRI_UNIVARIATE_EVANS2018 = 4 Evans et al. (2018, DR2) fits, GAIA_CONVERSION_ugriz_UNIVARIATE_EVANS2018 = 5 Evans et al. (2018, DR2) fits, GAIA_CONVERSION_UBVRI_RIELLO2020 = 6 Riello et al. (2020, DR3) fits, GAIA_CONVERSION_ugriz_RIELLO2020 = 7 Riello et al. (2020, DR3) fits. : (null)\n",
+      "rotationally_enhanced_mass_loss : Set to 1 to enable rotationally enhanced mass loss rate algorithms: 0= none, 1=formula cf. Langer models (=ROTATIONALLY_ENHANCED_MASSLOSS_LANGER_FORMULA), 2=limit accretion rate before wind loss is applied, 3 = both 1 and 2. See also rotationally_enhanced_exponent : (null)\n",
+      "AGB_core_algorithm : Algorithm to use for calculating AGB core masses. 0=Hurley et al. 2002 if no NUCSYN, Karakas 2002 if NUCSYN is defined; 1=Hurley et al. 2002 (overshooting models); 1=Karakas 2002 (non-overshooting models). : (null)\n",
+      "AGB_radius_algorithm : Algorithm to use for calculating radii on the TPAGB. : (null)\n",
+      "AGB_luminosity_algorithm : Algorithm to use for calculating luminosities on the TPAGB. : (null)\n",
+      "AGB_3dup_algorithm : Algorithm to use for calculating third dredge up efficiency on the TPAGB. : (null)\n",
+      "overspin_algorithm : Algorithm to determine what we do when a star is rotating at its breakup velocity. OVERSPIN_BSE (0) conservatively transfers the angular momentum back to the orbit. OVERSPIN_MASSLOSS uses the rotationally_enhanced_massloss parameter to lose mass which carries away the angular momentum. : (null)\n",
+      "rotationally_enhanced_exponent : The exponent (power) by which rotationally enhanced mass loss is raised. Requires ROTATIONALLY_ENHANCED_MASS_LOSS. See also rotationally_enhanced_mass_loss. : (null)\n",
+      "batchmode : Set the batchmode control variable. Use only if you know what you are doing! : (null)\n",
+      "speedtests : If True, turns on speedtests during version information (off by default). : (null)\n",
+      "use_fixed_timestep_%d : Set to True to use fixed timestep <n>, False to turn off. Fixed timesteps are on (this is True) by default. : (null)\n",
+      "task%d : Control tasks to be performed by binary_c. By default, these are all TRUE. For more information see binary_c_macros.h, particularly the BINARY_C_TASK_* macros. : (null)\n",
+      "orbiting_object : Usage: --orbiting_object mass,spinrate,central_object,period. : 1.0\n",
+      "orbiting_objects_log : If True, turn on orbiting-object log. : (null)\n",
+      "orbiting_objects_log : If True, turn on orbiting-object log. : (null)\n",
+      "orbiting_objects_wind_accretion_multiplier : Multiplier for wind accretion on orbiting objects. Hurley et al 2002 use 1.5, which is the default. : (null)\n",
+      "orbiting_objects_close_pc_threshold : How close are orbiting objects allowed to be? Set this to be the absolute percentage difference minimum. : (null)\n",
+      "orbiting_objects_tides_multiplier : Multiplier for tidal torques on orbiting objects. : (null)\n",
+      "evaporate_escaped_orbiting_objects : If True, evaporate orbiting objects that have escaped the system. : (null)\n",
+      "RLOF_transition_objects_escape : If True, objects that escape their Roche lobe are ejected from the system, otherwise they are placed just outside the minimum stable orbit. : (null)\n",
+      "PN_resolve : If True, the timestep will be shortened to resolve better the PN phase (FALSE). : (null)\n",
+      "PN_resolve_minimum_luminosity : The luminosity above which extra time resolution for PNe is applied (see PN_resolve). : (null)\n",
+      "PN_resolve_maximum_envelope_mass : The envelope mass below which extra time resolution for PNe is applied (see PN_resolve). : (null)\n",
+      "PN_resolve_minimum_effective_temperature : The minimum effective temperature above which extra time resolution for PNe is applied (see PN_resolve). : (null)\n",
+      "PN_fast_wind : If True, thin-envelope PNe will have fast winds (FALSE). : (null)\n",
+      "PN_fast_wind_dm_GB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_GB) : (null)\n",
+      "PN_fast_wind_mdot_GB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_GB) : (null)\n",
+      "PN_fast_wind_dm_AGB : The envelope mass below which fast wind used during the AGB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_AGB) : (null)\n",
+      "PN_fast_wind_mdot_AGB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_AGB) : (null)\n",
+      "HeWD_HeWD_ignition_mass : HeWD-HeWD mergers above this mass reignite helium. (0.3) : (null)\n",
+      "wind_Nieuwenhuijzen_luminosity_lower_limit : Above this luminosity we activate the Nieuwenhuijzen and de Jager wind (4e3 Lsun). : (null)\n",
+      "wind_LBV_luminosity_lower_limit : Above this luminosity we activate the LBV wind (6e5 Lsun). : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Binary\n",
+      "############################################################\n",
+      "separation : Set the orbital separation (actually the semi-major axis) of the binary (internal index 0, stellar indices 0 and 1) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)\n",
+      "separation_triple : Set the orbital separation (actually the semi-major axis) of the triple (internal index 1) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)\n",
+      "separation_quadruple : Set the orbital separation (actually the semi-major axis) of the quadruple (internal index 2) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)\n",
+      "orbital_period : Set the initial orbital period of the binary, stars 1 and 2 (internal indices 0 and 1) in days. See also separation. : (null)\n",
+      "orbital_period_triple : Set the initial orbital period of the triple in days. See also separation. : (null)\n",
+      "orbital_period_quadruple : Set the orbital period of the outer binary in a quadrulple (stars 3 and 4, internal indices 2 and 3) in days. See also separation. : (null)\n",
+      "eccentricity : Set the initial eccentricity of the binary orbit (stars 1 and 2, internal indices 0 and 1). : (null)\n",
+      "eccentricity_triple : Set the initial eccentricity of the triple orbit. : (null)\n",
+      "eccentricity_quadruple : Set the initial eccentricity of the outer binary of a quadruple (stars 3 and 4, internal indices 2 and 3). : (null)\n",
+      "incliniation : Set the initial orbital_inclination of the binary relative to zero. : (null)\n",
+      "incliniation_triple : Set the initial orbital_inclination of the triple orbit relative to zero. : (null)\n",
+      "incliniation_quadruple : Set the initial orbital_inclinationy of the quadruple orbit relative to zero. : (null)\n",
+      "orbital_phase : Set the initial orbital phase of the binary orbit. : (null)\n",
+      "orbital_phase_triple : Set the initial orbital phase of the triple orbit. : (null)\n",
+      "orbital_phase_quadruple : Set the initial orbital phase of the quadruple orbit. : (null)\n",
+      "argument_of_periastron : Set the initial argument of periastron of the binary orbit. : (null)\n",
+      "argument_of_periastron_triple : Set the initial argument of periastron of the triple orbit. : (null)\n",
+      "argument_of_periastron_quadruple : Set the initial argument of periastron of the quadruple orbit. : (null)\n",
+      "disc_timestep_factor : Factor that multiplies the natural timestep of a disc. : (null)\n",
+      "white_dwarf_cooling_model : White dwarf cooling model, relates age to luminosity. WHITE_DWARF_COOLING_MESTEL = 0 is Mestel's model, WHITE_DWARF_COOLING_MESTEL_MODIFIED = 1 is Hurley's modified Mestel model, WHITE_DWARF_COOLING_CARRASCO2014 = 2 is based on Carrasco (2014) tables.   : (null)\n",
+      "white_dwarf_radius_model : White dwarf radius model, radius to mass (and perhaps age). WHITE_DWARF_RADIUS_NAUENBERG1972 = 0 Nauenberg (1972), WHITE_DWARF_RADIUS_MU = 1 mu-dependent variant, WHITE_DWARF_RADIUS_CARRASCO2014 = 2 is based on Carrasco (2014) tables. : (null)\n",
+      "cbdisc_mass_loss_inner_viscous_accretion_method : Chooses where the mass that is accreted from the inner edge of a circumbinary disc goes, i.e. to which star. 0 = Young and Clarke 2015, 1 = Gerosa et al 2015, 2 = 50:50 (i.e. not dependence on mass). : (null)\n",
+      "cbdisc_inner_edge_stripping : If True, allow inner edge mass stripping. : (null)\n",
+      "cbdisc_end_evolution_after_disc : If True, stop evolution when a disc evaporates. : (null)\n",
+      "cbdisc_no_wind_if_cbdisc : If True, disable stellar winds when there is a circumbinary disc. : (null)\n",
+      "cbdisc_outer_edge_stripping : If True, allow outer edge mass stripping. : (null)\n",
+      "disc_n_monte_carlo_guesses : Number of monte carlo guesses to try in the disc solver if the normal list of guesses fails (0). : (null)\n",
+      "disc_log : If 1, turn on the disc log. Requires DISC_LOG to be defined on build. : (null)\n",
+      "disc_log2d : If 1, turn on the 2d disc log. Requires DISC_LOG to be defined on build. : (null)\n",
+      "disc_log_dt : If non-zero, only allows disc log output every disc_log_dt Myr. : (null)\n",
+      "disc_log_directory : Directory into which disc logging is sent (must exist!). : /tmp/\n",
+      "post_ce_adaptive_menv : If TRUE, and if post_ce_objects_have_envelopes is TRUE, then the envelope mass of a post-CE star is such that it sits just inside its Roche lobe. If FALSE then a fixed (thin) envelope mass is applied that depends on the stellar type (see macros POST_CE_ENVELOPE_DM_GB, POST_CE_ENVELOPE_DM_EAGB and POST_CE_ENVELOPE_DM_TPAGB). : (null)\n",
+      "post_ce_objects_have_envelopes : If TRUE then post-common-envelope objects have thin envelopes. You need this if you are to have post-CE post-AGB stars. Note that this *may* be unstable, i.e. you may end up having many CEEs. The mass in the envelope is controlled by post_ce_adaptive_menv. TRUE by default. : (null)\n",
+      "PN_comenv_transition_time : post-common envelope transition time in years (1e2).  This is the time taken to move from CEE ejection to Teff > 30e4 K. Hall et al. (2013) suggest ~100 years. : (null)\n",
+      "minimum_time_between_PNe : The minimum time (Myr) between planetary nebula detections. This prevents multiple, fast common envelopes triggering two PNe (0.1). : (null)\n",
+      "PN_Hall_fading_time_algorithm : In stars with low mass (<0.45Msun) cores, you can choose to set the PN fading time to either the minimum (PN_HALL_FADING_TIME_ALGORITHM_MINIMUM) or maximum (PN_HALL_FADING_TIME_ALGORITHM_MAXIMUM) as shown in Fig. 6 of Hall et al. (2013). : (null)\n",
+      "PPN_envelope_mass : Desired pre-planetary nebula (post-AGB) envelope mass. : (null)\n",
+      "cbdisc_eccentricity_pumping_method : Select from various eccentricity-pumping methods when there is a circumbinary disc. Requires DISCS. 0 = off. : (null)\n",
+      "cbdisc_viscous_photoevaporative_coupling : Set to 1 to turn on viscous-photoevaporative coupling in circumbinary discs. Requires DISCS. 0 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_NONE = off, 1 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_INSTANT instant, 2 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_VISCOUS slow, viscous wind. : (null)\n",
+      "cbdisc_inner_edge_stripping_timescale : Defines the timescale for mass loss from by inner edge stripping. 0 = instant, 1 = very long, 2 = viscous at Revap_in, 3 = orbital at Revap_in. : (null)\n",
+      "cbdisc_outer_edge_stripping_timescale : Defines the timescale for mass loss from by outer edge stripping. 0 = instant, 1 = very long, 2 = viscous at Revap_in, 3 = orbital at Revap_out. : (null)\n",
+      "cbdisc_viscous_L2_coupling : Set to 1 to turn on viscous-L2-loss coupling in circumbinary discs. Requires DISCS. 0 = off. : (null)\n",
+      "gravitational_radiation_model : Model for gravitational radiation from the system. 0=Hurley et al 2002 (Landau and Lifshitz 1951). 1 = as 0 but only when there is no RLOF. 2 = none. : (null)\n",
+      "nova_irradiation_multiplier : Multiplier for nova-radiative induced mass loss. (Shara+1986) : (null)\n",
+      "gravitational_radiation_modulator_J : Modulator for gravitational wave radiation angular momentum loss rate (1.0). : (null)\n",
+      "gravitational_radiation_modulator_e : Modulator for gravitational wave radiation eccentricity pumping rate (1.0). : (null)\n",
+      "nova_faml_multiplier : Nova friction-induced angular momentum loss multiplier. (Shara+1986) : (null)\n",
+      "RLOF_angular_momentum_transfer_model : Choose angular momentum transfer model in RLOF. 0=BSE (with discs), 1=conservative : (null)\n",
+      "post_SN_orbit_method : Method by which the post-SN orbit is calculated. 0=BSE, 1=Tauris&Taken 1998. : (null)\n",
+      "multiplicity : Multiplicity: 1=single star, 2=binary, 3=triple, 4=quadruple. : (null)\n",
+      "accretion_limit_eddington_steady_multiplier : Steady accretion is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_steady_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)\n",
+      "accretion_limit_eddington_LMMS_multiplier : Accretion from a low-mass, convective, main_sequence star is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_LMMS_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)\n",
+      "accretion_limit_eddington_WD_to_remnant_multiplier : Accretion from a WD onto a remnant star (e.g. another white dwarf, neutron star or black hole) is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_WD_to_remnant_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)\n",
+      "accretion_limit_thermal_multiplier : Mass transfer onto a MS, HG or CHeB star is limited by the accretor's thermal rate times this multiplier. : (null)\n",
+      "accretion_limit_dynamical_multiplier : Mass transfer is limited by the accretor's dynamical rate times this multiplier. : (null)\n",
+      "donor_limit_envelope_multiplier : Mass transfer by RLOF is limited by this fraction of the donor's envelope mass per timestep : (null)\n",
+      "donor_limit_thermal_multiplier : Mass transfer by RLOF is limited by the accretor's thermal rate times this multiplier. : (null)\n",
+      "donor_limit_dynamical_multiplier : Mass transfer by RLOF is limited by the donor's dynamical rate times this multiplier. : (null)\n",
+      "Bondi_Hoyle_accretion_factor : Wind accretion rate, as calculated by the Bondi-Hoyle-Littleton formula, multiplcation factor. Hurley et al 2002 use 1.5, which is the default. : (null)\n",
+      "tidal_strength_factor : A modulator for the tidal strength. If this factor > 1 then tides are stronger, i.e. tidal timescales are reduced. : (null)\n",
+      "hachisu_qcrit : Critical q=Maccretor/Mdonor above which Hachisu's disk wind turns on. : (null)\n",
+      "hachisu_disk_wind : Set to True to turn on Hachisu's disk wind when material accretes too fast onto a white dwarf. This helps to make more SNeIa. See also hachisu_qcrit. : (null)\n",
+      "mass_accretion_for_eld : The mass that must be accreted onto a COWD for it to ignite as an edge-lit detonation SNIa. : (null)\n",
+      "WDWD_merger_algorithm : Algorithm to be used when merging two white dwarfs. 0 = Hurley et al. (2002), 1 = Perets+ (2019), 2 = Chen+ (2016, todo)  : (null)\n",
+      "type_Ia_MCh_supernova_algorithm : Algorithm to be used when calculating type Ia yields from Chandrasekhar-mass exploders. 0 = DD7 (Iwamoto 1999), 1 = Seitenzahl 2013 3D hydro yields (you must also set Seitenzahl2013_model)  : (null)\n",
+      "Seitenzahl2013_model : Which of Seitenzahl et al. 2013's models to use? One of N1,N3,N5,N10,N20,N40,N100L,N100,N100H,N150,N200,N300C,N1600,N1600C,N100_Z0.5,N100_Z0.1,N100_Z0.01 (defaults to N100). : N1\n",
+      "type_Ia_sub_MCh_supernova_algorithm : Algorithm to be used when calculating type Ia yields from sub-Chandrasekhar-mass exploders. (Currently unused.) : (null)\n",
+      "max_HeWD_mass : The maximum mass a HeWD can have before it ignites helium (0.7). : (null)\n",
+      "merger_mass_loss_fraction : Fraction of the total mass which is lost when stars merge. : (null)\n",
+      "merger_angular_momentum_factor : When two stars merge the resulting single star retains a fraction of the total system angular momentum (or the critical spin angular momentum, if it is smaller) multiplied by this factor. : (null)\n",
+      "wind_angular_momentum_loss : Prescription for losing angular momentum in a stellar wind. 0=Hurley et al 2002 ('Tout') prescription, 1=lw i.e. a factor multiplying the specific orbital angular momentum, 2=lw hybrid for fast winds. Set wind_djorb_fac to the desired factor.. : (null)\n",
+      "wind_djorb_fac : Factor multiplying angular momentum loss in a stellar wind when wind_angular_momentum_loss=0 (the Tout/Hurley et al 2002 prescription). See wind_angular_momentum_loss. : (null)\n",
+      "lw : Factor multiplying angular momentum loss in a stellar wind when wind_angular_momentum_loss=1,2 (the 'lw' prescription). See wind_angular_momentum_loss. : (null)\n",
+      "VW93_EAGB_wind_speed : Activate this to use Vassiliadis and Wood (1993) wind speed during the EAGB. : (null)\n",
+      "VW93_TPAGB_wind_speed : Activate this to use Vassiliadis and Wood (1993) wind speed during the EAGB. : (null)\n",
+      "use_periastron_Roche_radius : Set this to True to use the Roche lobe radius at periastron, rather than (the default to) assume a circular orbit. This will be useful one day when we treat RLOF in eccentric orbits properly, hopefully. : (null)\n",
+      "qcrit_LMMS : Apply critical q=Mdonor/Maccretor value for low-mass main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_MS : Apply critical q=Mdonor/Maccretor value for (non-low mass) main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HG : Apply critical q=Mdonor/Maccretor value for Hertzsprung gap stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_GB : Apply critical q=Mdonor/Maccretor value for first red giant branch stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_CHeB : Apply critical q=Mdonor/Maccretor value for core helium burning stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_EAGB : Apply critical q=Mdonor/Maccretor value for early-AGB stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_TPAGB : Apply critical q=Mdonor/Maccretor value for TP-AGB stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeMS : Apply critical q=Mdonor/Maccretor value for helium main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeHG : Apply critical q=Mdonor/Maccretor value for helium Hertzsprung gap stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeGB : Apply critical q=Mdonor/Maccretor value for helium red giant stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeWD : Apply critical q=Mdonor/Maccretor value for helium white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_COWD : Apply critical q=Mdonor/Maccretor value for carbon-oxygen white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_ONeWD : Apply critical q=Mdonor/Maccretor value for oxygen-neon white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_NS : Apply critical q=Mdonor/Maccretor value for neutron stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_BH : Apply critical q=Mdonor/Maccretor value for black holes to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_LMMS : Apply critical q=Mdonor/Maccretor value for (low mass) main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_MS : Apply critical q=Mdonor/Maccretor value for (non-low mass) main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HG : Apply critical q=Mdonor/Maccretor value for Hertzsprung gap stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_GB : Apply critical q=Mdonor/Maccretor value for first red giant branch stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_CHeB : Apply critical q=Mdonor/Maccretor value for core helium burning stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_EAGB : Apply critical q=Mdonor/Maccretor value for early-AGB stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_TPAGB : Apply critical q=Mdonor/Maccretor value for TP-AGB stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeMS : Apply critical q=Mdonor/Maccretor value for helium main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeHG : Apply critical q=Mdonor/Maccretor value for helium Hertzsprung gap stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeGB : Apply critical q=Mdonor/Maccretor value for helium red giant stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeWD : Apply critical q=Mdonor/Maccretor value for helium white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_COWD : Apply critical q=Mdonor/Maccretor value for carbon-oxygen white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_ONeWD : Apply critical q=Mdonor/Maccretor value for oxygen-neon white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_NS : Apply critical q=Mdonor/Maccretor value for neutron stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_BH : Apply critical q=Mdonor/Maccretor value for black holes to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "mass_for_Hestar_Ia_upper : Only helium stars below this mass can explode as SNIa. Default is zero, i.e. it never happens. See also mass_for_Hestar_Ia_lower. : (null)\n",
+      "mass_for_Hestar_Ia_lower : Only helium stars above this mass can explode as SNIa. Default is zero, i.e. it never happens. See also mass_for_Hestar_Ia_upper. : (null)\n",
+      "alphaCB : Circumbinary disk viscosity parameter, alpha. : (null)\n",
+      "minimum_donor_menv_for_comenv : Minimum donor envelope mass for common envelope evolution to be triggered (Msun). Default 0. : (null)\n",
+      "comenv_prescription : Use this to choose which common envelope prescription you should use. 0=Hurley et al 2002 (based on the Paczyński energy model) or 1=Nelemans and Tout (angular momentum model). See also alpha_ce, comenv_ms_accretion_mass, comenv_ms_accretion_fraction, comenv_ns_accretion_fraction, comenv_ns_accretion_mass, nelemans_gamma, nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs, lambda_ce, lambda_ionisation. : (null)\n",
+      "comenv_prescription%d : Use this to choose which common envelope prescription you should use. 0=Hurley et al 2002 (based on the Paczyński energy model) or 1=Nelemans and Tout (angular momentum model). See also alpha_ce, comenv_ms_accretion_mass, comenv_ms_accretion_fraction, comenv_ns_accretion_fraction, comenv_ns_accretion_mass, nelemans_gamma, nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs, lambda_ce, lambda_ionisation. : (null)\n",
+      "comenv_ejection_spin_method : When a common envelope is ejected, we need to decide how fast the stars are left spinning. COMENV_EJECTION_SPIN_METHOD_DO_NOTHING (0) is the default, this just leaves the stars/stellar cores spinning with the same spin rate (omega = angular velocity) with which they entered the common envelope phase. COMENV_EJECTION_SPIN_METHOD_SYCHRONIZE instead tidally synchronizes the stars with their new orbital angular velocity. : (null)\n",
+      "comenv_merger_spin_method : When a common envelope binary merges, we need to decide how fast the resulting single star is left spinning. COMENV_MERGER_SPIN_METHOD_SPECIFIC (0) is the default, this preserves angular momentum but limits the specific angular momentum of the merged star to the specific angular momentum of the system at the onset of common envelope evolution. COMENV_MERGER_SPIN_METHOD_CONSERVE_ANGMOM (1) sets the merger's angular momentum to be that of the system at the onset of common envelope evolution (which means the star may be rotating supercritically). COMENV_MERGER_SPIN_METHOD_CONSERVE_OMEGA (2) sets the spin rate (angular frequency = omega) of the merged star to be that of the orbit just at the onset of common envelope evolution. : (null)\n",
+      "comenv_ms_accretion_mass : Experimental. During common envelope evolution, a main sequence star may accrete some of the envelope's mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_fraction. : (null)\n",
+      "comenv_ms_accretion_fraction : Experimental. During common envelope evolution, a main sequence may accrete a fraction of the envelope's mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_mass. : (null)\n",
+      "comenv_ns_accretion_mass : Experimental. During common envelope evolution, a neutron star may accrete some of the envelope's mass. Requires COMENV_NS_ACCRETION. See also comenv_ns_accretion_fraction. : (null)\n",
+      "comenv_ns_accretion_fraction : Experimental. During common envelope evolution, a neutron star may accrete a fraction of the envelope's mass. Requires COMENV_NS_ACCRETION. See also comenv_ns_accretion_mass. : (null)\n",
+      "alpha_ce : Common envelope energy formalism parameter. A fraction alpha of the orbital energy is used to eject the envelope. See Hurley et al 2002 for details. : (null)\n",
+      "alpha_ce%d : Common envelope energy formalism parameter. A fraction alpha of the orbital energy is used to eject the envelope. See Hurley et al 2002 for details. : (null)\n",
+      "lambda_ce : Common envelope parameter. The binding energy of the common envelope is G*M*Menv/(lambda*R). Typically this is taken to be 0.5, but if set to -1 binary_c uses the Dewi and Tauris fits instead, -2 uses the formalism of Wang, Jia and Li (2016) and if -3 then a polytropic formalism is used (see also comenv_splitmass). : (null)\n",
+      "lambda_ce%d : Common envelope parameter. The binding energy of the common envelope is G*M*Menv/(lambda*R). Typically this is taken to be 0.5, but if set to -1 binary_c uses the Dewi and Tauris fits instead, -2 uses the formalism of Wang, Jia and Li (2016) and if -3 then a polytropic formalism is used (see also comenv_splitmass). : (null)\n",
+      "comenv_splitmass : When lambda_ce=-2, the envelope binding energy, lambda, is calculated using a polytropic formalism. The comenv_splitmass defines the point, in the units of the core mass, above which material is ejected. : (null)\n",
+      "nelemans_recalc_eccentricity : If True, recalculate the eccentricity after angular momentum is removed.  : (null)\n",
+      "comenv_post_eccentricity : Eccentricity remaining after common envelope ejection. : (null)\n",
+      "nelemans_gamma : Set the fraction of the orbital specific angular momentum that is used to eject the common envelope according to the Nelemans and Tout prescription. See also nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs. : (null)\n",
+      "nelemans_minq : Only activate the Nelemans and Tout common envelope prescription for q>nelemans_minq. See also nelemans_gamma, nelemans_max_frac_j_change, nelemans_n_comenvs. : (null)\n",
+      "nelemans_max_frac_j_change : Maximum fractional angular momentum change in the Nelemans and Tout common envelope prescription. See also nelemans_gamma, nelemans_minq, nelemans_n_comenvs. : (null)\n",
+      "nelemans_n_comenvs : Set the maximum number of common envelope ejections allowed to follow the Nelemans and Tout prescription, after which the standard alpha prescription is used. : (null)\n",
+      "lambda_ionisation : A fraction lambda_ionisation of the recombination energy in the common envelope goes into ejecting the envelope. This is usually 0.0, but a positive value can make a big difference to the outcome of common envelope evolution. : (null)\n",
+      "lambda_ionisation%d : A fraction lambda_ionisation of the recombination energy in the common envelope goes into ejecting the envelope. This is usually 0.0, but a positive value can make a big difference to the outcome of common envelope evolution. : (null)\n",
+      "lambda_enthalpy : A fraction of the enthalpy to be included in the common envelope evolution binding energy. Only used for the Wang 2016 prescription (so far). : (null)\n",
+      "lambda_enthalpy%d : A fraction of the enthalpy to be included in the common envelope evolution binding energy. Only used for the Wang 2016 prescription (so far). : (null)\n",
+      "cbdisc_albedo : Circumbinary-disc albedo. Requires DISCS. : (null)\n",
+      "cbdisc_gamma : Circumbinary disc gamma (equation of state) parameter. Requires DISCS. : (null)\n",
+      "cbdisc_alpha : Circumbinary disc alpha (viscosity) parameter. Requires DISCS. : (null)\n",
+      "cbdisc_kappa : Circumbinary disc kappa (opacity) parameter. Requires DISCS. : (null)\n",
+      "cbdisc_minimum_evaporation_timescale : Circumbinary disc minimum evaporation timescale (years). If (slow, not edge stripped) mass loss would evaporate the disc on a timescale less than this, simply evaporate the disc immediated. Usually set to 1y, ignore if zero. Requires DISCS. : (null)\n",
+      "cbdisc_torquef : Circumbinary disc binary torque multiplier. Requires DISCS. : (null)\n",
+      "cbdisc_max_lifetime : Circumbinary disc maximum lifetime (years, ignored if 0). Requires DISCS. : (null)\n",
+      "cbdisc_init_dM : On cbdisc start, reduce mass by a fraction dM if it won't converge. Requires DISCS. : (null)\n",
+      "cbdisc_init_dJdM : On cbdisc start, reduce angular momentum by a fraction dJ/dM*dM if it won't converge. Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_constant_rate : Circumbinary disc constant mass loss rate (Msun/year). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_FUV_multiplier : Circumbinary disc FUV mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_Xray_multiplier : Circumbinary disc X-ray mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_ISM_ram_pressure_multiplier : Circumbinary disc interstellar medium ram pressure stripping mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_ISM_pressure : Circumbinary disc interstellar medium ram pressure in units of Boltzmann constant per Kelvin (I think...). Requires DISCS. Typically 3000.0. See e.g. http://www.astronomy.ohio-state.edu/~pogge/Ast871/Notes/Intro.pdf page 15 or https://arxiv.org/pdf/0902.0820.pdf Fig. 1 (left panel). : (null)\n",
+      "cbdisc_mass_loss_inner_viscous_multiplier : Circumbinary disc inner edge viscous mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_inner_viscous_angular_momentum_multiplier : Circumbinary disc inner edge viscous angular momentum multiplier (no units). The inner edge angular momentum Requires DISCS. : (null)\n",
+      "cbdisc_resonance_multiplier : Circumbinary disc resonant interaction multiplier, affects eccentricity pumping and angular momentum rates. Requires DISCS. : (null)\n",
+      "cbdisc_resonance_damping : Circumbinary disc resonant interaction damping: should be on (True) to damp the l=1, m=2 resonance when the disc inner edge lies outside the resonance location. Requires DISCS. : (null)\n",
+      "cbdisc_fail_ring_inside_separation : If True, while converging on a structure, circumbinary discs with Rring < the binary separation are immediately failed. : (null)\n",
+      "cbdisc_mass_loss_inner_L2_cross_multiplier : Circumbinary disc inner edge L2-crossing mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_minimum_luminosity : Circumbinary disc minimum luminosity. If the disc becomes dimmer than this, the disc is evaporated instantly. Requires DISCS. : (null)\n",
+      "cbdisc_minimum_mass : Circumbinary disc minimum mass. If the disc becomes less massive than this, the disc is evaporated instantly. Requires DISCS. : (null)\n",
+      "cbdisc_minimum_fRing : Circumbinary disc minimum fRing. If the disc becomes a ring, and fRing = |Rout/Rin-1| < this value (and this value is non-zero), the disc is evaporated instantly. Requires DISCS. : (null)\n",
+      "comenv_disc_angmom_fraction : If >0 Fraction of the common envelope's angular momentum that goes into the circumbinary disc. If -1 then uses the moments of inertia to calculate (deprecated), if -2 use the common envelope's specific angular momentum, if -3 uses the L2 point at the end of the common envelope to set the angular momentum. Requires DISCS and DISCS_CIRCUMBINARY_FROM_COMENV. : (null)\n",
+      "comenv_disc_mass_fraction : Fraction of the common envelope's mass that goes into the circumbinary disc. Requires DISCS and DISCS_CIRCUMBINARY_FROM_COMENV. : (null)\n",
+      "wind_disc_angmom_fraction : If >0 Fraction of the wind envelope's angular momentum that goes into the circumbinary disc. If -1 then uses the L2 point's specific angular momentum. Requires DISCS and DISCS_CIRCUMBINARY_FROM_WIND. : (null)\n",
+      "wind_disc_mass_fraction : Fraction of the stellar wind's mass that goes into the circumbinary disc. Requires DISCS and DISCS_CIRCUMBINARY_FROM_WIND. : (null)\n",
+      "WRLOF_method : Choose whether and how to apply wind-Roche-lobe-overflow. 0=none, 1=q-dependent, 2=quadratic See Abate et al 2013/14 for details. Requires WRLOF_MASS_TRANSFER. : (null)\n",
+      "minimum_timestep : The minimum timestep (Myr). : (null)\n",
+      "timestep_solver_factor : Factor applied in timestep_limits, e.g. to prevent X changing too fast by comparing to X/dX/dt, which is usually 1 but can be higher to lengthen timesteps when using an alternative solver. : (null)\n",
+      "RLOF_mdot_factor : Multiplier applied to the mass transfer rate during Roche-lobe overflow. Requires RLOF_MDOT_MODULATION. : (null)\n",
+      "RLOF_f : Factor to enlarge a Roche lobe, nominally because of radiation pressure (see Dermine et al paper). Requires RLOF_RADIATION_CORRECTION. : (null)\n",
+      "minimum_separation_for_instant_RLOF : If True, instead of evolving the system just report the minimum separation (on the zero-age main sequence) that would lead to instant RLOF. Used by binary_grid. See also minimum_orbital_period_for_instant_RLOF and maximum_mass_ratio_for_instant_RLOF. : (null)\n",
+      "minimum_orbital_period_for_instant_RLOF : If True, instead of evolving the system just report the minimum orbital period (on the zero-age main sequence) that would lead to instant RLOF. Used by binary_grid. See also minimum_separation_for_instant_RLOF and maximum_mass_ratio_for_instant_RLOF. : (null)\n",
+      "maximum_mass_ratio_for_instant_RLOF : If True, instead of evolving the system just report the maximum mass ratio (on the zero-age main sequence) that would lead to instant RLOF, given M1 and orbital period. Used by binary_grid. See also minimum_separation_for_instant_RLOF and minimum_orbital_period_for_instant_RLOF. : (null)\n",
+      "RLOF_method : Use RLOF_method to choose the algorithm you use for Roche-lobe overflow mass loss rate calculations. 0=Hurley et al 2002, 1=Adaptive (for radiative stars) R=RL method, 2=Ritter (probably broken), 3=Claeys etal 2014 variant on Hurley et al 2002. : (null)\n",
+      "RLOF_interpolation_method : When a star overflows its Roche lobe, it always has R>RL because of the limited time resolution of the simulation. Binary_c then uses an algorithm to get back to when R~RL (within a desired tolerance, set in RLOF_ENTRY_THRESHOLD which is usually 1.02, i.e. overflow of 2%). You can choose algorithm 0, the Hurley et al 2002 method which reverses time (i.e. uses a Newton-like scheme), or 1 to use the binary_c method which rejects a timestep (and hence does no logging on that timestep) and repeats with half the timestep until R~RL. The latter is now the default, because this means there are no negative timesteps which break various other algorithms (e.g. nucleosynthesis). : (null)\n",
+      "nova_retention_fraction : The mass accreted during a nova as fraction of mass transferred : (null)\n",
+      "beta_reverse_nova : The fraction of mass ejected in a nova explosion which is accreted back onto the companion star. Set to -1 to automatically calculate based on a geometric argument, or 0 or positive to set the value. : (null)\n",
+      "WD_accretion_rate_novae_upper_limit_hydrogen_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is hydrogen rich : above this rate the mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_novae_upper_limit_helium_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is helium rich : above this rate the mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_novae_upper_limit_other_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is neither hydrogen nor helium rich : above this rate the mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_new_giant_envelope_lower_limit_hydrogen_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope with a hydrogen-rich donor. Below this mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_new_giant_envelope_lower_limit_helium_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope with a helium-rich donor. Below this mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_new_giant_envelope_lower_limit_other_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope when the donor is neither hydrogen nor helium rich. Below this mass transfer leads to stable burning. : (null)\n",
+      "CRAP_parameter : Tidally enhanced mass loss parameter. See Tout and Eggleton's paper on the subject. (Was the parameter bb). : (null)\n",
+      "individual_novae : If individual_novae is True, novae are resolved such that each explosion is performed separtaely. : (null)\n",
+      "nova_timestep_accelerator_num : The nova timestep is accelerated if the nova number exceeds nova_timestep_accelerator_num. If zero or negative, acceleration is off. See also nova_timestep_accelerator_index and nova_timestep_accelerator_max. Only used if individual_novae is on.\n",
+      " : (null)\n",
+      "nova_timestep_accelerator_index : The index at which the nova timestep is accelerated. A larger value gives longer timesteps. See also nova_timestep_accelerator_num and nova_timestep_accelerator_max. Only used if individual_novae is on.\n",
+      " : (null)\n",
+      "nova_timestep_accelerator_max : The nova timestep is accelerated by a factor that is capped at nova_timestep_accelerator_max. This parameter is ignored if it is zero or negative. See also nova_timestep_accelerator_num and nova_timestep_accelerator_index. Only used if individual_novae is on.\n",
+      " : (null)\n",
+      "nonconservative_angmom_gamma : Mass lost from the system (but NOT from a stellar wind) takes a fraction gamma of the orbital angular momentum with it. Set to -1 to take the specific angular momentum of the donor star. Set to -2 to take super-Eddington, nova and disk-wind angular momenta as if a wind from the accretor. : (null)\n",
+      "max_stellar_angmom_change : Maxmimum fractional change in stellar angular momentum allowed before a timestep is rejected (0.05). : (null)\n",
+      "comenv_ms_accretion_mass : Experimental. During common envelope evolution, a main sequence star may accrete some of the envelope's mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_fraction. : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Nucsyn\n",
+      "############################################################\n",
+      "third_dup : If True, enables third dredge up. Requires NUCSYN and NUCSYN_THIRD_DREDGE_UP. : (null)\n",
+      "third_dup_multiplier : Usage: --third_dup_multiplier <i> <f>. Multiplies the abundance of element <i> by <f> during third dredge up. : 1.0\n",
+      "NeNaMgAl : Enables NeNaMgAl reaction network. Requires NUCSYN and NUCSYN_HBB. : Ignore\n",
+      "nucsyn_network%d : Usage: --nucsyn_network%d <boolean>. Turn a nuclear network on or off. : (null)\n",
+      "nucsyn_network_error%d : Usage: --nucsyn_network_error%d <f>. Threshold error in nuclear network solver for network %d. : (null)\n",
+      "nucreacmult%d : Usage: --nucreacmult%d <f>. Multiply nuclear reaction given by the integer %d (integer) by f (float).  : (null)\n",
+      "nucsyn_metallicity : This sets the metallicity of the nucleosynthesis algorithms, i.e. the amount (by mass) of matter which is not hydrogen or helium. Usually you'd just set this with the metallicity parameter, but if you want the nucleosynthesis to be outside the range of the stellar evolution algorithm (e.g. Z=0 or Z=0.04) then you need to use nucsyn_metallicity. That said, it's also outside the range of some of the nucleosynthesis algorithms as well, so you have been warned! : (null)\n",
+      "nucsyn_solver : Choose the solver used in nuclear burning. 0 = KAPS_RENTROP is a Kaps-Rentrop scheme (fast, not great for stiff problems), 1 = LSODA (Adams/BSF switcher), 2 = CVODE library (https://computing.llnl.gov/projects/sundials. Default 0.  : 0\n",
+      "initial_abundance_mix : initial abundance mixture: 0=AG89, 1=Karakas 2002, 2=Lodders 2003, 3=Asplund 2005 (not available?), 4=Garcia Berro, 5=Grevesse Noels 1993 : 0\n",
+      "init_abund : Usage: --init_abund <i> <X>. Sets the initial abundance of isotope number <i> to mass fraction <X>. : 0.02\n",
+      "init_abund_mult : Usage: --init_abund_mult <i> <f>. Multiplies the initial abundance of isotope number <i> by <f>. : 1.0\n",
+      "init_abund_dex : Usage: --init_abund_dex <i> <f>. Changes the initial abundance of isotope number <i> by <f> dex. : 0.0\n",
+      "init_abunds_only : If True, outputs only the initial abundances, then exits. : (null)\n",
+      "initial_abunds_only : If True, outputs only the initial abundances, then exits. : (null)\n",
+      "no_thermohaline_mixing : If True, disables thermohaline mixing. : (null)\n",
+      "lithium_GB_post_Heflash : Sets the lithium abundances after the helium flash. Requires NUCSYN and LITHIUM_TABLES. : (null)\n",
+      "lithium_GB_post_1DUP : Sets the lithium abundance after first dredge up. Requires NUCSYN and LITHIUM_TABLES. : (null)\n",
+      "lithium_hbb_multiplier : Multiplies the lithium abundances on the AGB during HBB (based on Karakas/Fishlock et al models).Requires NUCSYN and LITHIUM_TABLES. : (null)\n",
+      "angelou_lithium_decay_function : Functional form which describes Li7 decay. Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Choices are : 0 expoential (see angelou_lithium_decay_time). : (null)\n",
+      "angelou_lithium_LMMS_time : Time at which lithium manufacture is triggered in a low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_MS_time : Time at which lithium manufacture is triggered on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_HG_time : Time at which lithium manufacture is triggered on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_GB_time : Time at which lithium manufacture is triggered on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_CHeB_time : Time at which lithium manufacture is triggered during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_EAGB_time : Time at which lithium manufacture is triggered on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_TPAGB_time : Time at which lithium manufacture is triggered on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_LMMS_decay_time : Decay time for surface lithium abundance during the low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_MS_decay_time : Decay time for surface lithium abundance on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_HG_decay_time : Decay time for surface lithium abundance on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_GB_decay_time : Decay time for surface lithium abundance on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_CHeB_decay_time : Decay time for surface lithium abundance during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_EAGB_decay_time : Decay time for surface lithium abundance on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_TPAGB_decay_time : Decay time for surface lithium abundance on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_LMMS_massfrac : Lithium mass fraction when its manufacture is triggered during the low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_MS_massfrac : Lithium mass fraction when its manufacture is triggered on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_HG_massfrac : Lithium mass fraction when its manufacture is triggered on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_GB_massfrac : Lithium mass fraction when its manufacture is triggered on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_CHeB_massfrac : Lithium mass fraction when its manufacture is triggered during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_EAGB_massfrac : Lithium mass fraction when its manufacture is triggered on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_TPAGB_massfrac : Lithium mass fraction when its manufacture is triggered on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_vrot_trigger : Equatorial rotational velocity at which lithium manufacture is triggered (km/s). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0.\n",
+      " : (null)\n",
+      "angelou_lithium_vrotfrac_trigger : Fraction of Keplerian (breakup) equatorial rotational velocity at which lithium manufacture is triggered (must be <1, ignored if 0). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0.\n",
+      " : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Output\n",
+      "############################################################\n",
+      "david_logging_function : Function to choose which kind of information gets logged Requires DAVID. Choices are: 0= None, >0 for custom logging functions : Ignore\n",
+      "cf_amanda_log : Enable logging to compare to Amanda's models. : (null)\n",
+      "float_overflow_checks : Turn on to enable floating-point overflow checks at the end of each timestep, if they are available. 0=off, 1=warn (stderr) on failure, 2=exit on failure (0) : (null)\n",
+      "save_pre_events_stardata : Enable this to save a copy of stardata to stardata->pre_events_stardata just before an event. : (null)\n",
+      "disable_end_logging : Disable the logging that happens at the end of the evolution. : (null)\n",
+      "ensemble : Turn on ensemble calculations and output. : (null)\n",
+      "ensemble_filters_off : Sets all ensemble filters to be off (FALSE) - these can then be enabled one-by-one with --ensemble_filter_[...] TRUE. : (null)\n",
+      "ensemble_filter_%d : Turn on or off ensemble filter <n>. For a list of filters, see ensemble_macros.h. : (null)\n",
+      "ensemble_legacy_ensemble : Turn on ensemble legacy population output. : (null)\n",
+      "legacy_yields : Turn on ensemble legacy yield output. : (null)\n",
+      "ensemble_defer : Defer ensemble output. : (null)\n",
+      "ensemble_dt : When doing ensemble calculations, data are stored and/or output every ensemble_dt Myr. See also ensemble, ensemble_logdt, ensemble_startlogtime. : (null)\n",
+      "ensemble_logdt : When doing ensemble calculations, and when logensembletimes is set, the ensemble is stored/output every ensemble_logdt Myr. See also ensemble, ensemble_dt, ensemble_startlogtime. : (null)\n",
+      "ensemble_startlogtime : Start log ensemble data storage/calculations/output at ensemble_startlogtime. See also ensemble, ensemble_dt, ensemble_startlogtime. : (null)\n",
+      "ensemble_logtimes : When doing ensemble calculations/output, set this to act at log times rather than linear times. : (null)\n",
+      "postagb_legacy_logging : Turn on post-AGB legacy logging. : (null)\n",
+      "disc_legacy_logging : Turn on disc legacy logging. : (null)\n",
+      "EMP_logg_maximum : Maximum logg that EMP stars are allowed to have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_minimum_age. : (null)\n",
+      "EMP_minimum_age : Minimum age that EMP stars are required to have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_logg_maximum. : (null)\n",
+      "EMP_feh_maximum : Maximum [Fe/H] that an EMP stars may have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default -2.0. : (null)\n",
+      "CEMP_cfe_minimum : Minimum [C/Fe] that CEMP stars are required to have. See Izzard et al 2009. See also NEMP_cfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default 0.7. : (null)\n",
+      "NEMP_cfe_minimum : Minimum [N/Fe] that NEMP stars are required to have. See Izzard et al 2009, Pols et al. 2012. See also CEMP_cfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default 1.0. : (null)\n",
+      "thick_disc_start_age : Lookback time for the start of the thick disc star formation, e.g. 13e3 Myr. Units = Myr. : (null)\n",
+      "thick_disc_end_age : Lookback time for the end of the thick disc star formation, e.g. 4e3 Myr. Units = Myr. : (null)\n",
+      "thick_disc_logg_min : Minimum logg for thick disc giants to be logged. : (null)\n",
+      "thick_disc_logg_max : Maximum logg for thick disc giants to be logged. : (null)\n",
+      "escape_velocity : A parameter used in constructing galactic chemical evolution (GCE) models. If the stellar wind velocity exceeds this value, any chemical yield from the wind is ignored, i.e. assumed lost. (km/s) Requires NUCSYN_GCE_OUTFLOW_CHECKS. Default 1e9 km/s. See also escape_fraction. : (null)\n",
+      "escape_fraction : A parameter used in constructing galactic chemical evolution (GCE) models. If the stellar wind velocity exceeds this value, any chemical yield from the wind is ignored, i.e. assumed lost. (km/s) Requires NUCSYN_GCE_OUTFLOW_CHECKS. Default 0.0. See also escape_velocity. : (null)\n",
+      "colour_log : If set to True, thelog is coloured with ANSI colour formatting. Requires FILE_LOG to be defined. : \n",
+      "log_filename : Location of the output logging filename. If set to \"/dev/null\" then there is no logging. : \n",
+      "stopfile : File which, when it exists, will stop the current binary_c repeat run. : \n",
+      "stardata_dump_filename : Location of the stardata dump file. : \n",
+      "stardata_load_filename : Location of the stardata file to load. : \n",
+      "api_log_filename_prefix : Location of the output logging filename prefix for the API. If set to \"/dev/null\" then there is no logging. : 0\n",
+      "hrdiag_output : Set to True to output high time-resolution Hertzstrpung-Russell diagram information. Requires HRDIAG. : (null)\n",
+      "internal_buffering : Experimental. Set to non-zero values to implement internal buffering prior to output. For use with binary_grid, you shouldn't really be playing with this. : (null)\n",
+      "eccentric_RLOF_model : Chooses which model is used to handle eccentric RLOF. Default is RLOF_ECCENTRIC_AS_CIRCULAR, i.e. ignore the eccentricity. Note: requires force_corotation_of_primary_and_orbit to be FALSE.\n",
+      " : (null)\n",
+      "force_circularization_on_RLOF : If True forces circularization of stars and orbit when RLOF starts, this is as in the BSE algorithm. (True) : (null)\n",
+      "wtts_log : If True, enables log file output for WTTS2. : (null)\n",
+      "fabian_imf_log_time : Time at which to output for Fabian Schneider's IMF project. Requires FABIAN_IMF_LOG : Ignore\n",
+      "fabian_imf_log_timestep : Timestep for Fabian Schneider's IMF project logging. Requires FABIAN_IMF_LOG : Ignore\n",
+      "version : Display binary_c version and build information. Also performs timing tests. : Ignore\n",
+      "dumpversion : Display binary_c version number (short format). : Ignore\n",
+      "version_only : Display binary_c version number and build information, but do not perform timing tests or anything that requires stardata to be non-NULL. : Ignore\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Input\n",
+      "############################################################\n",
+      "MINT_dir : Location of MINT algorithm data. : \n",
+      "MINT_data_cleanup : Activate checks on incoming data to try to account for problems. Will make data-loading slower, but may fix a few things. : \n",
+      "MINT_MS_rejuvenation : Turn on or off (hydrogen) main-sequence rejuvenation. : \n",
+      "MINT_remesh : Turn on or off MINT's remeshing. : \n",
+      "MINT_use_ZAMS_profiles : Use chemical profiles at the ZAMS if MINT_use_ZAMS_profiles is TRUE, otherwise set homogeneous abundances. (Default is TRUE, so we use the profiles if they are available.) : \n",
+      "MINT_disable_grid_load_warnings : Use this to explicitly disable MINT's warnings when loading a grid with, e.g., missing or too much data. : \n",
+      "MINT_Kippenhahn : Turn on or off MINT's Kippenhahn diagrams. If 0, off, if 1, output star 1 (index 0), if 2 output star 2 (index 1). Default 0. : \n",
+      "MINT_Kippenhahn_stellar_type : Stellar type selector for Kippenhahn plots. Set to -1 to ignore, otherwise the stellar type number for which Kippenhahn plot data should be output. : \n",
+      "MINT_Kippenhahn_companion_stellar_type : Companion stellar type selector for Kippenhahn plots. Set to -1 to ignore, otherwise the stellar type number for the companion for which Kippenhahn plot data should be output. : \n",
+      "MINT_nuclear_burning : Turn on or off MINT's nuclear burning algorithm. : \n",
+      "MINT_minimum_shell_mass : Minimum shell mass in MINT's nuclear burning routines. : \n",
+      "MINT_maximum_shell_mass : Maximum shell mass in MINT's nuclear burning routines. : \n",
+      "\n",
+      "############################################################\n",
+      "##### Section I/O\n",
+      "############################################################\n",
+      "go : batchmode control command : Ignore\n",
+      "gogo : batchmode control command : Ignore\n",
+      "reset_stars : Reset the star structures. Used in batchmode : Ignore\n",
+      "reset_stars_defaults : Reset the star structures and set defaults. Used in batchmode : Ignore\n",
+      "defaults : Reset all defaults. Used in batchmode : Ignore\n",
+      "echo : Activate batchmode command echoing, i.e. when you enter a command, binary_c repeats the command then executes it. : Ignore\n",
+      "noecho : Deactivate batchmode command echoing. See 'echo'. : Ignore\n",
+      "noechonow : Deactivate batchmode command echoing. See 'echo'. : Ignore\n",
+      "bye : Quit binary_c. Used in batchmode. : Ignore\n",
+      "fin : batchmode control command : Ignore\n",
+      "reset_prefs : Reset preferences struct. Used in batchmode : Ignore\n",
+      "status : Output batchmode status information. : Ignore\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Algorithms\n",
+      "############################################################\n",
+      "repeat : If > 1, repeats the system as many times as required. Handy if you're using Monte-Carlo kicks and want to sample the parameter space well. Also, if you are running speed tests this is good to give a statistically more reasonable result. (See e.g. 'tbse pgo'). : (null)\n",
+      "random_systems : Experimental. Use this to apply random initial system parameters (masses, separations, etc.). Useful for testing only. : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Misc\n",
+      "############################################################\n",
+      "random_seed : Random number seed, usually a (possibly negative) integer. Useful for exactly reproducing the evolution of a system which involves a kick (which is a Monte-Carlo, i.e. pseudorandom, process). : (null)\n",
+      "random_systems_seed : Random number seed for the generation of random systems. See random_systems and random_seed. : (null)\n",
+      "random_skip : Skip the first <random_seed> random numbers that are generated. Usually this is 0 so they are all used. : (null)\n",
+      "idum : [NB: deprecated, please use 'random_seed' instead.] Random number seed, usually a (possibly negative) integer. Useful for exactly reproducing the evolution of a system which involves a kick (which is a Monte-Carlo, i.e. pseudorandom, process). : (null)\n",
+      "reverse_time : Make time go backwards. To be considered very experimental! : (null)\n",
+      "start_time : Start time for the simulation. : (null)\n",
+      "warmup_cpu : Uses the CPU at maximum power the given number of seconds, prior to running normal stellar evolution. : Ignore\n",
+      "help : Display help pages. Usage: --help <help topic>. : Ignore\n",
+      "argopts : Display argument options. Usage: --argopts <argument>. : Ignore\n",
+      "help_all : Display all help pages. : Ignore\n",
+      "list_args : Display list of arguments with their default values. Useful for batchmode. : Ignore\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(_binary_c_bindings.return_help_all())"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "bfec32cf-7240-4a82-ac30-b3d99a018a28",
+   "metadata": {},
+   "source": [
+    "We can get all the parameter names and their default values with return_arglines(): (abridged output)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 20,
+   "id": "3d29ca9d-ac66-4f9e-81cf-2edd14a98b79",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "__ARG_BEGIN\n",
+      "metallicity = 0.02\n",
+      "effective_metallicity = -1\n",
+      "M_1 = 0\n"
+     ]
+    }
+   ],
+   "source": [
+    "print('\\n'.join(_binary_c_bindings.return_arglines().splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "e8b1c8b6-a878-43f4-bc36-1b20b3e66c6f",
+   "metadata": {},
+   "source": [
+    "Lastly, we can ask binary_c to determine the minimum period or maximum mass for RLOF at the ZAMS: Both of them need an argstring as input"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "e517f561-09c6-419d-ba89-d9cb61e6ebab",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MINIMUM SEPARATION 0.31\n",
+      "MINIMUM PERIOD 0.00632092\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=10,\n",
+    "    orbital_period=4500,\n",
+    "    eccentricity=0.0,\n",
+    "    metallicity=0.02,\n",
+    "    max_evolution_time=15000,\n",
+    ").strip()\n",
+    "\n",
+    "#\n",
+    "output = _binary_c_bindings.return_minimum_orbit_for_RLOF(argstring, store_capsule=store_memaddr)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 46,
+   "id": "7da75a95-8831-4346-a584-e042ced75249",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MAXIMUM MASS RATIO 0.0141\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=5,\n",
+    "    M_2=1,\n",
+    "    orbital_period=0.0001,\n",
+    "    eccentricity=0.0,\n",
+    "    metallicity=0.02,\n",
+    "    max_evolution_time=15000,\n",
+    ").strip()\n",
+    "\n",
+    "#\n",
+    "output = _binary_c_bindings.return_maximum_mass_ratio_for_RLOF(argstring)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "id": "5fe52d8e-1721-4796-a856-002cf4525d96",
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/build/html/_sources/notebook_custom_logging.ipynb.txt b/docs/build/html/_sources/notebook_custom_logging.ipynb.txt
new file mode 100644
index 0000000000000000000000000000000000000000..e84895375014ce29b29a572a9a264d1505eb1db9
--- /dev/null
+++ b/docs/build/html/_sources/notebook_custom_logging.ipynb.txt
@@ -0,0 +1,517 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "879b596b-d70c-4f90-b668-563b4ad93ffc",
+   "metadata": {},
+   "source": [
+    "# Notebook custom logging\n",
+    "In this notebook you'll learn how to use the custom logging functionality"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 37,
+   "id": "696ecbb9-1efd-48f4-a57e-2cf6dfe416f1",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from binarycpython import _binary_c_bindings\n",
+    "from binarycpython.utils.custom_logging_functions import (\n",
+    "    autogen_C_logging_code,\n",
+    "    binary_c_log_code,\n",
+    "    create_and_load_logging_function,\n",
+    ")\n",
+    "from binarycpython.utils.run_system_wrapper import run_system\n",
+    "from binarycpython.utils.grid import Population"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "d4d721cc-df4f-4ac2-b6f9-62e85ca0c1e5",
+   "metadata": {},
+   "source": [
+    "The custom logging functionality allows us to decide the output of binary_c _without_ modifying the actual sourcecode of binary_c (i.e. editing `src/logging/log_every_timestep` in binary_c). Rather, we can create a logging routine from within python.\n",
+    "\n",
+    "Technically, the following steps are taken:\n",
+    "- User creates a logging print statement from within python\n",
+    "- The logging print statement string gets wrapped into a proper c-function by `binary_c_log_code`\n",
+    "- The c-function string gets compiled and loaded into memory by `create_and_load_logging_function`\n",
+    "- The memory adress of the compiled and loaded print function can now be passed to C\n",
+    "- binary_c uses the custom print function \n",
+    "\n",
+    "The custom logging functionality can be used when running systems via `run_system()`, via `Population.evolve()` and `Population.evolve_single()`, and directly via the API\n",
+    "\n",
+    "Within the logging statement we can access information from the stardata object, as well as use logical statements to determine when to log information. What we cannot do, however, is access functions that are not _publicly available_. For very elaborate printing routines it is still advised to actually hardcode the print statement into binary_c itself."
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "be137151-bb57-43d7-bab1-0167512ac727",
+   "metadata": {},
+   "source": [
+    "## Usage"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ac4e5f4c-81e6-4980-b852-aca84ca74f4c",
+   "metadata": {},
+   "source": [
+    "There are two methods to create the C-code that will be compiled:\n",
+    "- Automatically generate the print statement and use the wrapper to generate the full function string, by using `autogen_C_logging_code`\n",
+    "- Create your custom print statement and use the wrapper to generate the full function string, by writing out the print statement. Here the logging statement obviously has to be valid C code"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "236cf821-09ac-4237-9b8f-6e36d2edf446",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Printf(\"MY_STELLAR_DATA %g %g\\n\",((double)stardata->model.time),((double)stardata->star[0].mass));\n"
+     ]
+    }
+   ],
+   "source": [
+    "# generate logging lines. Here you can choose whatever you want to have logged, and with what header\n",
+    "# this generates working print statements\n",
+    "logging_line = autogen_C_logging_code(\n",
+    "    {\n",
+    "        \"MY_STELLAR_DATA\": [\"model.time\", \"star[0].mass\"],\n",
+    "    }\n",
+    ")\n",
+    "print(logging_line)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 30,
+   "id": "feb423d5-5cc3-433c-9801-f8017abbc03a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Printf(\"MY_STELLAR_DATA time=%g mass=%g\\n\", stardata->model.time, stardata->star[0].mass)\n"
+     ]
+    }
+   ],
+   "source": [
+    "# You can also decide to `write` your own logging_line, which allows you to write a more complex logging statement with conditionals.\n",
+    "logging_line = 'Printf(\"MY_STELLAR_DATA time=%g mass=%g\\\\n\", stardata->model.time, stardata->star[0].mass)'\n",
+    "print(logging_line)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 31,
+   "id": "2f5defbf-c623-49ed-a238-fba52a563a58",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "#pragma push_macro(\"Max\")\n",
+      "#pragma push_macro(\"Min\")\n",
+      "#undef Max\n",
+      "#undef Min\n",
+      "#include \"binary_c.h\"\n",
+      "\n",
+      "// add visibility __attribute__ ((visibility (\"default\"))) to it \n",
+      "void binary_c_API_function custom_output_function(struct stardata_t * stardata);\n",
+      "void binary_c_API_function custom_output_function(struct stardata_t * stardata)\n",
+      "{\n",
+      "    // struct stardata_t * stardata = (struct stardata_t *)x;\n",
+      "    Printf(\"MY_STELLAR_DATA time=%g mass=%g\\n\", stardata->model.time, stardata->star[0].mass);\n",
+      "}\n",
+      "\n",
+      "#undef Max \n",
+      "#undef Min\n",
+      "#pragma pop_macro(\"Min\")\n",
+      "#pragma pop_macro(\"Max\")    \n"
+     ]
+    }
+   ],
+   "source": [
+    "# Generate the entire 'script' by wrapping the logging line\n",
+    "custom_logging_code = binary_c_log_code(logging_line)\n",
+    "print(custom_logging_code)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "efa7f1e9-247e-4196-a883-bcff05265d02",
+   "metadata": {},
+   "source": [
+    "Combining the above with e.g. run_system() (see notebook_individual_systems for more examples):"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 32,
+   "id": "dcd74bbc-478b-43e4-b495-8c456e8d1d88",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MY_STELLAR_DATA time=0 mass=2\n",
+      "MY_STELLAR_DATA time=0 mass=2\n",
+      "MY_STELLAR_DATA time=1e-06 mass=2\n",
+      "MY_STELLAR_DATA time=2e-06 mass=2\n"
+     ]
+    }
+   ],
+   "source": [
+    "# logging statement\n",
+    "logging_line = 'Printf(\"MY_STELLAR_DATA time=%g mass=%g\\\\n\", stardata->model.time, stardata->star[0].mass)'\n",
+    "\n",
+    "# Entire script\n",
+    "custom_logging_code = binary_c_log_code(logging_line)\n",
+    "\n",
+    "# Run system\n",
+    "output = run_system(M_1=2, custom_logging_code=custom_logging_code)\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print(\"\\n\".join(output.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "1998ee8f-8c0a-462b-b1e0-54f5963902cc",
+   "metadata": {},
+   "source": [
+    "### Using custom logging with the population object\n",
+    "Custom logging can be used for a whole population by setting the print statement (so not the entire logging script) in `C_logging_code`"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 33,
+   "id": "77bd09b0-1a94-499d-97db-a1f991c67c12",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "EXAMPLE_ABOVE_MS             1.041660877905e+02 4.99198 4.99198 6.1357 6.1357 2 1\n",
+      "EXAMPLE_ABOVE_MS             1.041662558619e+02 4.99198 4.99198 6.14057 6.1357 2 2\n",
+      "EXAMPLE_ABOVE_MS             1.041662560111e+02 4.99198 4.99198 6.14057 6.14057 2 2\n",
+      "EXAMPLE_ABOVE_MS             1.041662564579e+02 4.99198 4.99198 6.14059 6.14057 2 2\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Set up population\n",
+    "pop = Population()\n",
+    "\n",
+    "# Set some BSE parameters\n",
+    "pop.set(\n",
+    "    M_1=5\n",
+    ")\n",
+    "\n",
+    "# Example logging that prints only if the star is post main-sequence\n",
+    "example_logging_string_post_MS = \"\"\"\n",
+    "if(stardata->star[0].stellar_type>MS)\n",
+    "{\n",
+    "    Printf(\"EXAMPLE_ABOVE_MS %30.12e %g %g %g %g %d %d\\\\n\",\n",
+    "        // \n",
+    "        stardata->model.time, // 1\n",
+    "\n",
+    "        stardata->star[0].mass, //2\n",
+    "        stardata->previous_stardata->star[0].mass, //3\n",
+    "\n",
+    "        stardata->star[0].radius, //4\n",
+    "        stardata->previous_stardata->star[0].radius, //5\n",
+    "\n",
+    "        stardata->star[0].stellar_type, //6\n",
+    "        stardata->previous_stardata->star[0].stellar_type //7\n",
+    "  );\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "# Set the logging\n",
+    "pop.set(\n",
+    "    C_logging_code=example_logging_string_post_MS\n",
+    ")\n",
+    "out = pop.evolve_single()\n",
+    "\n",
+    "# Print (abridged) output\n",
+    "print('\\n'.join(out.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "93397ff3-9b71-470d-8bc4-08fe5b1a5dca",
+   "metadata": {},
+   "source": [
+    "### Using custom logging when running directly from the API\n",
+    "When running a system directly with the API we need to manually load the custom logging into memory (via `create_and_load_logging_function`) and pass the memory address to the binary_c binding via `_binary_c_bindings.run_system(argstring, custom_logging_func_memaddr=custom_logging_memaddr)`"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 40,
+   "id": "30142286-34ce-433e-82c8-565e2160ff5b",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MY_STELLAR_DATA 0 15\n",
+      "MY_STELLAR_DATA 0 15\n",
+      "MY_STELLAR_DATA 1e-06 15\n",
+      "MY_STELLAR_DATA 2e-06 15\n"
+     ]
+    }
+   ],
+   "source": [
+    "# generate logging lines\n",
+    "logging_line = autogen_C_logging_code(\n",
+    "    {\n",
+    "        \"MY_STELLAR_DATA\": [\"model.time\", \"star[0].mass\"],\n",
+    "    }\n",
+    ")\n",
+    "\n",
+    "# Generate code around logging lines\n",
+    "custom_logging_code = binary_c_log_code(logging_line)\n",
+    "\n",
+    "# Generate library and get memaddr\n",
+    "custom_logging_memaddr, shared_lib_filename = create_and_load_logging_function(\n",
+    "    custom_logging_code\n",
+    ")\n",
+    "\n",
+    "#\n",
+    "m1 = 15.0  # Msun\n",
+    "m2 = 14.0  # Msun\n",
+    "separation = 0  # 0 = ignored, use period\n",
+    "orbital_period = 4530.0  # days\n",
+    "eccentricity = 0.0\n",
+    "metallicity = 0.02\n",
+    "max_evolution_time = 15000\n",
+    "argstring = \"binary_c M_1 {0:g} M_2 {1:g} separation {2:g} orbital_period {3:g} eccentricity {4:g} metallicity {5:g} max_evolution_time {6:g}\".format(\n",
+    "    m1,\n",
+    "    m2,\n",
+    "    separation,\n",
+    "    orbital_period,\n",
+    "    eccentricity,\n",
+    "    metallicity,\n",
+    "    max_evolution_time,\n",
+    ")\n",
+    "output = _binary_c_bindings.run_system(\n",
+    "    argstring, custom_logging_func_memaddr=custom_logging_memaddr\n",
+    ")\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print('\\n'.join(output.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "39c76b1d-d968-4eef-b5ae-2542ed9557c3",
+   "metadata": {},
+   "source": [
+    "## Examples of logging strings\n",
+    "Below are some examples of logging strings"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "2ac4af72-6dab-4cc9-986e-5b5b1fa31b73",
+   "metadata": {},
+   "source": [
+    "### Compact object\n",
+    "This logging will print the timestep when the star becomes a compact object. After it does, we change the maximum time to be the current time, effectively terminating the evolution"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 42,
+   "id": "6f0edc65-a788-4706-a0c5-2ace030765ec",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "SINGLE_STAR_LIFETIME 10 27.7358\n",
+      "EXAMPLE_LOG_CO             2.773581245005e+01 1.33524 9.19314 1.72498e-05 730.446 13 5\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_logging_string_CO = \"\"\"\n",
+    "if(stardata->star[0].stellar_type>=NS)\n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"EXAMPLE_LOG_CO %30.12e %g %g %g %g %d %d\\\\n\",\n",
+    "            // \n",
+    "            stardata->model.time, // 1\n",
+    "\n",
+    "            stardata->star[0].mass, //2\n",
+    "            stardata->previous_stardata->star[0].mass, //3\n",
+    "\n",
+    "            stardata->star[0].radius, //4\n",
+    "            stardata->previous_stardata->star[0].radius, //5\n",
+    "\n",
+    "            stardata->star[0].stellar_type, //6\n",
+    "            stardata->previous_stardata->star[0].stellar_type //7\n",
+    "      );\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "# Entire script\n",
+    "custom_logging_code = binary_c_log_code(example_logging_string_CO)\n",
+    "\n",
+    "# Run system\n",
+    "output = run_system(M_1=10, custom_logging_code=custom_logging_code)\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print(\"\\n\".join(output.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "51c51592-6406-43bd-a879-10ace64aaf28",
+   "metadata": {},
+   "source": [
+    "### Logging mass evolution and the supernova\n",
+    "This logging code prints the mass evolution and the moment the star goes supernova"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 47,
+   "id": "8f58fdf9-3e76-4c18-a1c5-eed0980d4133",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "EXAMPLE_MASSLOSS             9.878236827680e+00 1.61349 8.38063 20 13 1\n",
+      "EXAMPLE_SN             9.878236827680e+00 1.61349 8.38063 20 12 13 5 1 6.74037 4.92267 6.74037 0 0\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_logging_string_CO = \"\"\"\n",
+    "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %g %d %g\\\\n\",\n",
+    "    // \n",
+    "    stardata->model.time, // 1\n",
+    "    stardata->star[0].mass, //2\n",
+    "    stardata->previous_stardata->star[0].mass, //3\n",
+    "    stardata->common.zero_age.mass[0], //4\n",
+    "\n",
+    "    stardata->star[0].stellar_type, //5\n",
+    "    stardata->model.probability //6\n",
+    ");\n",
+    "if(stardata->star[0].SN_type != SN_NONE)\n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        if(stardata->pre_events_stardata != NULL)\n",
+    "        {\n",
+    "            Printf(\"EXAMPLE_SN %30.12e \" // 1\n",
+    "                \"%g %g %g %d \" // 2-5\n",
+    "                \"%d %d %g %g \" // 6-9\n",
+    "                \"%g %g %g %g\\\\n\", // 10-13\n",
+    "\n",
+    "                // \n",
+    "                stardata->model.time, // 1\n",
+    "\n",
+    "                stardata->star[0].mass, //2\n",
+    "                stardata->pre_events_stardata->star[0].mass, //3\n",
+    "                stardata->common.zero_age.mass[0], //4\n",
+    "                stardata->star[0].SN_type, //5\n",
+    "\n",
+    "                stardata->star[0].stellar_type, //6\n",
+    "                stardata->pre_events_stardata->star[0].stellar_type, //7\n",
+    "                stardata->model.probability, //8\n",
+    "                stardata->pre_events_stardata->star[0].core_mass[ID_core(stardata->pre_events_stardata->star[0].stellar_type)],           // 9\n",
+    "\n",
+    "                stardata->pre_events_stardata->star[0].core_mass[CORE_CO],     // 10\n",
+    "                stardata->pre_events_stardata->star[0].core_mass[CORE_He],    // 11\n",
+    "                stardata->star[0].fallback, // 12\n",
+    "                stardata->star[0].fallback_mass // 13\n",
+    "            );\n",
+    "        }\n",
+    "        else\n",
+    "        {\n",
+    "            Printf(\"EXAMPLE_SN %30.12e \" // 1\n",
+    "                \"%g %g %g %d \" // 2-5\n",
+    "                \"%d %d %g %g \" // 6-9\n",
+    "                \"%g %g %g %g\\\\n\", // 10-13\n",
+    "\n",
+    "                // \n",
+    "                stardata->model.time, // 1\n",
+    "\n",
+    "                stardata->star[0].mass, //2\n",
+    "                stardata->previous_stardata->star[0].mass, //3\n",
+    "                stardata->common.zero_age.mass[0], //4\n",
+    "                stardata->star[0].SN_type, //5\n",
+    "\n",
+    "                stardata->star[0].stellar_type, //6\n",
+    "                stardata->previous_stardata->star[0].stellar_type, //7\n",
+    "                stardata->model.probability, //8\n",
+    "                stardata->previous_stardata->star[0].core_mass[ID_core(stardata->previous_stardata->star[0].stellar_type)],           // 9\n",
+    "\n",
+    "                stardata->previous_stardata->star[0].core_mass[CORE_CO],     // 10\n",
+    "                stardata->previous_stardata->star[0].core_mass[CORE_He],    // 11\n",
+    "                stardata->star[0].fallback, // 12\n",
+    "                stardata->star[0].fallback_mass // 13\n",
+    "            );\n",
+    "        }\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "# Entire script\n",
+    "custom_logging_code = binary_c_log_code(example_logging_string_CO)\n",
+    "\n",
+    "# Run system\n",
+    "output = run_system(M_1=20, custom_logging_code=custom_logging_code)\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print(\"\\n\".join(output.splitlines()[-2:]))"
+   ]
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/build/html/_sources/notebook_extra_features.ipynb.txt b/docs/build/html/_sources/notebook_extra_features.ipynb.txt
new file mode 100644
index 0000000000000000000000000000000000000000..d453a6f5bef5a661a59491fde19511cee3f6c579
--- /dev/null
+++ b/docs/build/html/_sources/notebook_extra_features.ipynb.txt
@@ -0,0 +1,44 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "d5c04b77-f0be-4b33-8c03-c72eb846527c",
+   "metadata": {},
+   "source": [
+    "# Extra features and functionality of binarycpython\n",
+    "In this notebook we'll go over some of the extra features and functionality that was not covered in the other notebooks.\n",
+    "\n",
+    "TODO"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "id": "0020f1bc-2a23-455c-8216-9e63e6e038ae",
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/build/html/_sources/notebook_individual_systems.ipynb.txt b/docs/build/html/_sources/notebook_individual_systems.ipynb.txt
new file mode 100644
index 0000000000000000000000000000000000000000..19c2d29fbd316324eb39a361e897be2b835955e8
--- /dev/null
+++ b/docs/build/html/_sources/notebook_individual_systems.ipynb.txt
@@ -0,0 +1,563 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "a544d28c-c2e1-4c6a-b55b-8caec440743f",
+   "metadata": {},
+   "source": [
+    "# Running individual systems with binarycpython\n",
+    "This notebook will show you how to run single systems and analyze their results.\n",
+    "\n",
+    "It can be useful to have some functions to quickly run a single system to e.g. inspect what evolutionary steps a specific system goes through, to plot the mass loss evolution of a single star, etc. "
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "dd5d9ec7-5791-45f1-afbd-225947e2a583",
+   "metadata": {},
+   "source": [
+    "## Single system with run_wrapper\n",
+    "The simplest method to run a single system is to use the run_system wrapper. This function deals with setting up the argument string, makes sure all the required parameters are included and handles setting and cleaning up the custom logging functionality (see notebook_custom_logging).\n",
+    "\n",
+    "As arguments to this function we can add any of the parameters that binary_c itself actually knows, as well as:\n",
+    "- custom_logging_code: string containing a print statement that binary_c can use to print information\n",
+    "- log_filename: path of the logfile that binary_c generates\n",
+    "- parse_function: function that handles parsing the output of binary-c"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "id": "425efed3-d8e3-432d-829e-41d8ebe05162",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from binarycpython.utils.run_system_wrapper import run_system\n",
+    "# help(run_system) # Uncomment to see the docstring"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "id": "b2abab48-433d-4936-8434-14804c52c9f6",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "SINGLE_STAR_LIFETIME 1 12462\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "output = run_system(M_1=1)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f127a5e4-dc01-4472-9130-8a943c92e8a7",
+   "metadata": {},
+   "source": [
+    "Lets try adding a log filename now:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
+   "id": "029fc3f2-f09a-49af-a32b-248505738f2e",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "      TIME      M1       M2   K1  K2           SEP   ECC  R1/ROL1 R2/ROL2  TYPE RANDOM_SEED=67365 RANDOM_COUNT=0\n",
+      "     0.0000    1.000    0.000  1  15            -1 -1.00   0.000   0.000  \"INITIAL \"\n",
+      " 11003.1302    1.000    0.000  2  15            -1 -1.00   0.000   0.000  \"OFF_MS\"\n",
+      " 11003.1302    1.000    0.000  2  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 11582.2424    1.000    0.000  3  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12325.1085    0.817    0.000  4  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12457.1300    0.783    0.000  5  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12460.8955    0.774    0.000  6  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12460.8955    0.774    0.000  6  15            -1 -1.00   0.000   0.000  \"shrinkAGB\"\n",
+      " 12461.9514    0.523    0.000 11  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 15000.0000    0.523    0.000 11  15            -1 -1.00   0.000   0.000  \"MAX_TIME\"\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "output = run_system(M_1=1, log_filename='/tmp/test_logfile.txt')\n",
+    "with open('/tmp/test_logfile.txt', 'r') as f:\n",
+    "    print(f.read())"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "606670f2-3e0a-43c7-a885-006b92fac9d2",
+   "metadata": {},
+   "source": [
+    "To get more useful output we can include a custom_logging snippet (see notebook_custom_logging):"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 6,
+   "id": "e6a23b55-ca42-440d-83ac-e76a24a83a67",
+   "metadata": {
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "['EXAMPLE_MASSLOSS             0.000000000000e+00 1 1 1', 'EXAMPLE_MASSLOSS             0.000000000000e+00 1 1 1', 'EXAMPLE_MASSLOSS             1.000000000000e-06 1 1 1', 'EXAMPLE_MASSLOSS             2.000000000000e-06 1 1 1']\n"
+     ]
+    }
+   ],
+   "source": [
+    "from binarycpython.utils.custom_logging_functions import binary_c_log_code\n",
+    "\n",
+    "# Create the print statement\n",
+    "custom_logging_print_statement = \"\"\"\n",
+    "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %d\\\\n\",\n",
+    "    // \n",
+    "    stardata->model.time, // 1\n",
+    "    stardata->star[0].mass, //2\n",
+    "    stardata->common.zero_age.mass[0], //4\n",
+    "\n",
+    "    stardata->star[0].stellar_type //5\n",
+    ");\n",
+    "\"\"\"\n",
+    "\n",
+    "# Generate entire shared lib code around logging lines\n",
+    "custom_logging_code = binary_c_log_code(custom_logging_print_statement)\n",
+    "\n",
+    "output = run_system(M_1=1, custom_logging_code=custom_logging_code)\n",
+    "print(output.splitlines()[:4])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "4c885143-db79-4fed-b4c4-0bd846e24f7d",
+   "metadata": {},
+   "source": [
+    "Now we have some actual output, it is time to create a parse_function which parses the output. Adding a parse_function to the run_system will make run_system run the output of binary_c through the parse_function."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "3822721f-217a-495b-962e-d57137b9e290",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "[['time', 'mass', 'initial_mass', 'stellar_type'], [0.0, 1.0, 1.0, 1.0], [0.0, 1.0, 1.0, 1.0]]\n"
+     ]
+    }
+   ],
+   "source": [
+    "def parse_function(output):\n",
+    "    \"\"\"\n",
+    "    Example function to parse the output of binary_c\n",
+    "    \"\"\"\n",
+    "\n",
+    "    # \n",
+    "    column_names = ['time', 'mass', 'initial_mass', 'stellar_type']\n",
+    "    value_lines = [column_names]\n",
+    "    \n",
+    "    # Loop over output\n",
+    "    for line in output.splitlines():\n",
+    "        \n",
+    "        # Select the lines starting with the header we chose\n",
+    "        if line.startswith(\"EXAMPLE_MASSLOSS\"):\n",
+    "        \n",
+    "        # Split the output and fetch the data\n",
+    "            split_line = line.split()\n",
+    "            values = [float(el) for el in split_line[1:]]\n",
+    "            value_lines.append(values)\n",
+    "\n",
+    "    return value_lines\n",
+    "\n",
+    "# Catch output\n",
+    "output = run_system(M_1=1, custom_logging_code=custom_logging_code, parse_function=parse_function)\n",
+    "print(output[:3])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "a551f07f-2eff-4425-9375-267579a581b3",
+   "metadata": {},
+   "source": [
+    "This output can now be turned into e.g. an Numpy array or Pandas dataframe (my favorite: makes querying the data very easy)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 8,
+   "id": "654a07ed-2a88-46ff-9da0-b7759580f9f3",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "0        time      mass initial_mass stellar_type\n",
+      "1           0         1            1            1\n",
+      "2           0         1            1            1\n",
+      "3       1e-06         1            1            1\n",
+      "4       2e-06         1            1            1\n",
+      "5       3e-06         1            1            1\n",
+      "...       ...       ...          ...          ...\n",
+      "1612  12461.8  0.577754            1            6\n",
+      "1613    12462  0.522806            1           11\n",
+      "1614    13462  0.522806            1           11\n",
+      "1615    14462  0.522806            1           11\n",
+      "1616    15000  0.522806            1           11\n",
+      "\n",
+      "[1616 rows x 4 columns]\n"
+     ]
+    }
+   ],
+   "source": [
+    "import pandas as pd\n",
+    "\n",
+    "# Load data into dataframe\n",
+    "example_df = pd.DataFrame(output)\n",
+    "\n",
+    "# Fix column headers\n",
+    "example_df.columns = example_df.iloc[0]\n",
+    "example_df = example_df.drop(example_df.index[0])\n",
+    "\n",
+    "print(example_df)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "325c2ce6-f9a1-46b7-937f-84040e1252cf",
+   "metadata": {
+    "tags": []
+   },
+   "source": [
+    "## Single system via population object\n",
+    "When setting up your population object (see notebook_population), and configuring all the parameters, it is possible to run a single system using that same configuration. It will use the parse_function if set, and running a single system is a good method to test if everything works accordingly."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 9,
+   "id": "4a98ffca-1b72-4bb8-8df1-3bf3187d882f",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from binarycpython.utils.grid import Population\n",
+    "# help(Population) # Uncomment to see the docstring"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "7e2c2ef0-3db2-46a6-8c85-9b6cf720eb6a",
+   "metadata": {},
+   "source": [
+    "First, let's try this without any custom logging or parsing functionality"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 10,
+   "id": "bff1cc2e-6b32-4ba0-879f-879ffbabd223",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: M_1=10 to BSE_options\n",
+      "Creating and loading custom logging functionality\n",
+      "Running binary_c M_1 10\n",
+      "Cleaning up the custom logging stuff. type: single\n",
+      "SINGLE_STAR_LIFETIME 10 27.7358\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Create the population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# Set some parameters\n",
+    "example_pop.set(\n",
+    "    verbosity=1\n",
+    ")\n",
+    "example_pop.set(\n",
+    "    M_1=10\n",
+    ")\n",
+    "\n",
+    "# get output and print\n",
+    "output = example_pop.evolve_single()\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ae01fa35-f8b1-4a40-bfb2-b9e872cae0e7",
+   "metadata": {},
+   "source": [
+    "Now lets add some actual output with the custom logging"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 13,
+   "id": "dd748bab-b57e-4129-8350-9ea11fa179d0",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: C_logging_code=\n",
+      "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %g %d\\n\",\n",
+      "    // \n",
+      "    stardata->model.time, // 1\n",
+      "    stardata->star[0].mass, //2\n",
+      "    stardata->previous_stardata->star[0].mass, //3\n",
+      "    stardata->common.zero_age.mass[0], //4\n",
+      "\n",
+      "    stardata->star[0].stellar_type //5\n",
+      ");\n",
+      " to grid_options\n",
+      "Creating and loading custom logging functionality\n",
+      "Running binary_c M_1 10\n",
+      "Cleaning up the custom logging stuff. type: single\n",
+      "Removed /tmp/binary_c_python/custom_logging/libcustom_logging_eac2dfc438a14e5a9f5be98b1b6b4294.so\n",
+      "['EXAMPLE_MASSLOSS             0.000000000000e+00 10 0 10 1', 'EXAMPLE_MASSLOSS             0.000000000000e+00 10 10 10 1', 'EXAMPLE_MASSLOSS             1.000000000000e-06 10 10 10 1', 'EXAMPLE_MASSLOSS             2.000000000000e-06 10 10 10 1']\n"
+     ]
+    }
+   ],
+   "source": [
+    "custom_logging_print_statement = \"\"\"\n",
+    "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %g %d\\\\n\",\n",
+    "    // \n",
+    "    stardata->model.time, // 1\n",
+    "    stardata->star[0].mass, //2\n",
+    "    stardata->previous_stardata->star[0].mass, //3\n",
+    "    stardata->common.zero_age.mass[0], //4\n",
+    "\n",
+    "    stardata->star[0].stellar_type //5\n",
+    ");\n",
+    "\"\"\"   \n",
+    "\n",
+    "example_pop.set(C_logging_code=custom_logging_print_statement)\n",
+    "\n",
+    "# get output and print\n",
+    "output = example_pop.evolve_single()\n",
+    "print(output.splitlines()[:4])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "588a7d9e-9d64-4b3b-8907-656b905286e8",
+   "metadata": {},
+   "source": [
+    "Lastly we can add a parse_function to handle parsing the output again. \n",
+    "\n",
+    "Because the parse_function will now be part of the population object, it can access information of the object. We need to make a new parse function that is fit for an object: we the arguments now need to be (self, output). Returning the data is useful when running evolve_single(), but won't be used in a population evolution."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 14,
+   "id": "fec39154-cce6-438c-8c2c-509d76b00f34",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "import os\n",
+    "import json\n",
+    "import numpy as np\n",
+    "\n",
+    "def object_parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parse function that can be added to the population object\n",
+    "    \"\"\"\n",
+    "\n",
+    "    # We can access object instance information now. \n",
+    "    # In this way we can store the results in a file for example. \n",
+    "    output_file = os.path.join(self.custom_options['output_dir'], 'example_output.json')\n",
+    "    \n",
+    "    # \n",
+    "    column_names = ['time', 'mass', 'initial_mass', 'stellar_type']\n",
+    "    value_lines = [column_names]\n",
+    "    \n",
+    "    # Loop over output\n",
+    "    for line in output.splitlines():\n",
+    "        \n",
+    "        # Select the lines starting with the header we chose\n",
+    "        if line.startswith(\"EXAMPLE_MASSLOSS\"):\n",
+    "        \n",
+    "        # Split the output and fetch the data\n",
+    "            split_line = line.split()\n",
+    "            values = [float(el) for el in split_line[1:]]\n",
+    "            value_lines.append(values)\n",
+    "\n",
+    "    # Turn into an array\n",
+    "    values_array = np.array(value_lines[1:])\n",
+    "    \n",
+    "    # make dict and fill\n",
+    "    output_dict = {}\n",
+    "    for i in range(len(column_names)):\n",
+    "        output_dict[column_names[i]] = list(values_array[:,i])\n",
+    "\n",
+    "    # Write to file\n",
+    "    with open(output_file, 'w') as f:\n",
+    "        f.write(json.dumps(output_dict, indent=4))\n",
+    "        \n",
+    "    # Return something anyway\n",
+    "    return value_lines"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 15,
+   "id": "57347512-fd4a-434b-b13c-5e6dbd3ac415",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: parse_function=<function object_parse_function at 0x7f9265091598> to grid_options\n",
+      "<<<< Warning: Key does not match previously known parameter:                     adding: output_dir=/tmp/ to custom_options >>>>\n",
+      "Creating and loading custom logging functionality\n",
+      "Running binary_c M_1 10\n",
+      "Cleaning up the custom logging stuff. type: single\n",
+      "Removed /tmp/binary_c_python/custom_logging/libcustom_logging_e9c2bec7f15541eb847fc6013e48e7ed.so\n",
+      "[['time', 'mass', 'initial_mass', 'stellar_type'], [0.0, 10.0, 0.0, 10.0, 1.0], [0.0, 10.0, 10.0, 10.0, 1.0], [1e-06, 10.0, 10.0, 10.0, 1.0]]\n",
+      "dict_keys(['time', 'mass', 'initial_mass', 'stellar_type'])\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_pop.set(\n",
+    "    parse_function=object_parse_function,\n",
+    "    output_dir='/tmp/'\n",
+    ")\n",
+    "output = example_pop.evolve_single()\n",
+    "print(output[:4])\n",
+    "\n",
+    "# Example of loading the data that was written\n",
+    "with open(os.path.join(example_pop.custom_options['output_dir'], 'example_output.json')) as f:\n",
+    "    written_data = json.loads(f.read())\n",
+    "\n",
+    "print(written_data.keys())"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ddc06da3-fc68-4c6f-8067-14ea862b964d",
+   "metadata": {},
+   "source": [
+    "## Single system via API functionality\n",
+    "It is possible to construct your own functionality to run a single system by directly calling the API function to run a system. Under the hood all the other functions and wrappers actually use this API.\n",
+    "\n",
+    "There are less failsafes for this method, so this make sure the input is correct and binary_c knows all the arguments you pass in.\n",
+    "\n",
+    "for more details on this API function see `notebook_api_functions`"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "56886792-d379-4eac-b0d4-54508edb39c7",
+   "metadata": {},
+   "source": [
+    "First we must construct the argument string that we pass to binary_c"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 16,
+   "id": "ec48125c-6bf5-48f4-9357-8261800b5d8b",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "SINGLE_STAR_LIFETIME 15 14.2383\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# For a binary system we need to pass in these arguments\n",
+    "M_1 = 15.0  # Msun\n",
+    "M_2 = 14.0  # Msun\n",
+    "separation = 0  # 0 = ignored, use period\n",
+    "orbital_period = 4530.0  # days\n",
+    "eccentricity = 0.0\n",
+    "metallicity = 0.02\n",
+    "max_evolution_time = 15000  # Myr. You need to include this argument.\n",
+    "\n",
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} M_2 {M_2} separation {separation} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=M_1,\n",
+    "    M_2=M_2,\n",
+    "    separation=separation,\n",
+    "    orbital_period=orbital_period,\n",
+    "    eccentricity=eccentricity,\n",
+    "    metallicity=metallicity,\n",
+    "    max_evolution_time=max_evolution_time,\n",
+    ").strip()\n",
+    "\n",
+    "from binarycpython import _binary_c_bindings\n",
+    "\n",
+    "output = _binary_c_bindings.run_system(argstring)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "55c8ea24-0fc0-452c-8121-1e7667433479",
+   "metadata": {},
+   "source": [
+    "As we can see above, the output is rather empty. But if SINGLE_STAR_LIFETIME is printed we know we caught the output correctly. To get actual output we should have timesteps printed in the `log_every_timestep.c` in binary_c, or add some custom_logging (see notebook_custom_logging). "
+   ]
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/build/html/_sources/notebook_population.ipynb.txt b/docs/build/html/_sources/notebook_population.ipynb.txt
new file mode 100644
index 0000000000000000000000000000000000000000..56f3b153c23064e82863f188906d50243e795715
--- /dev/null
+++ b/docs/build/html/_sources/notebook_population.ipynb.txt
@@ -0,0 +1,1213 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "bbbaafbb-fd7d-4b73-a970-93506ba35d71",
+   "metadata": {},
+   "source": [
+    "# Running populations with binarycpython\n",
+    "This notebook will show you how to evolve a population of stars\n",
+    "\n",
+    "Much of the code in the binarycpython package is written to evolve a population of stars through the Population object, rather than running a single system. Let's go through the functionality of this object step by step and set up some example populations. \n",
+    "\n",
+    "At the bottom of this notebook there are some complete example scripts"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "id": "bf6b8673-a2b5-4b50-ad1b-e90671f57470",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "import os\n",
+    "from binarycpython.utils.custom_logging_functions import temp_dir\n",
+    "from binarycpython.utils.grid import Population\n",
+    "\n",
+    "# help(Population) # Uncomment to see the public functions of this object"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "a081ab23-7822-4971-aa82-991548534714",
+   "metadata": {},
+   "source": [
+    "- running ensemble\n",
+    "- using M&S grid"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f268eff3-4e08-4f6b-8b59-f22dba4d2074",
+   "metadata": {},
+   "source": [
+    "## Setting up the Population object\n",
+    "To set up and configure the population object we need to make an object instance of the `Population` object, and add configuration via the `.set()` function.\n",
+    "\n",
+    "There are three categories of options that the Population object can set:\n",
+    "- BSE options: these options will be used for the binary_c calls, and are recognized by comparing the arguments to a known list of available arguments of binary_c. To see which options are available, see section [`binary_c parameters` in the documentation](https://ri0005.pages.surrey.ac.uk/binary_c-python/binary_c_parameters.html). You can access these through `population.bse_options['<bse option name>']` after you have set them. \n",
+    "\n",
+    "- Grid options: these options will be used to configure the behaviour of the Population object. To see which options are available, see section [`Population grid code options` in the documentation](https://ri0005.pages.surrey.ac.uk/binary_c-python/grid_options_descriptions.html). They can be accessed via `population.grid_options['<grid option name>']` after you have set them. \n",
+    "\n",
+    "- Custom options: these options are not recognized as either of the above, so they will be stored in the custom_options, and can be accessed via `population.custom_options['<custom option name>']`"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "id": "79ab50b7-591f-4883-af09-116d1835a751",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: M_1=10 to BSE_options\n",
+      "adding: orbital_period=45000000080 to BSE_options\n",
+      "adding: max_evolution_time=15000 to BSE_options\n",
+      "adding: eccentricity=0.02 to BSE_options\n",
+      "adding: amt_cores=2 to grid_options\n",
+      "<<<< Warning: Key does not match previously known parameter:                     adding: data_dir=/tmp/binary_c_python/example_python_population_result to custom_options >>>>\n",
+      "<<<< Warning: Key does not match previously known parameter:                     adding: base_filename=example_pop.dat to custom_options >>>>\n",
+      "1\n",
+      "example_pop.dat\n",
+      "10\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Create population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# If you want verbosity, set this before other things\n",
+    "example_pop.set(verbosity=1)\n",
+    "\n",
+    "# Setting values can be done via .set(<parameter_name>=<value>)\n",
+    "# Values that are known to be binary_c_parameters are loaded into bse_options.\n",
+    "# Those that are present in the default grid_options are set in grid_options\n",
+    "# All other values that you set are put in a custom_options dict\n",
+    "example_pop.set(\n",
+    "    # binary_c physics options\n",
+    "    M_1=10,  # bse_options\n",
+    "    orbital_period=45000000080,  # bse_options\n",
+    "    max_evolution_time=15000,  # bse_options\n",
+    "    eccentricity=0.02,  # bse_options\n",
+    "\n",
+    "\n",
+    "    # grid_options\n",
+    "    amt_cores=2,  # grid_options\n",
+    "    \n",
+    "    # Custom options # TODO: need to be set in grid_options probably\n",
+    "    data_dir=os.path.join(\n",
+    "        temp_dir(), \"example_python_population_result\"\n",
+    "    ),  # custom_options\n",
+    "    base_filename=\"example_pop.dat\",  # custom_options\n",
+    ")\n",
+    "\n",
+    "# We can use the options through\n",
+    "print(example_pop.grid_options['verbosity'])\n",
+    "print(example_pop.custom_options['base_filename'])\n",
+    "print(example_pop.bse_options['M_1'])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f8d46d19-633d-4911-821d-a59daed31816",
+   "metadata": {},
+   "source": [
+    "After configuring the population, but before running the actual population, its usually a good idea to export the full configuration (including version info of binary_c and all the parameters) to a file. To do this we use `example_pop.export_all_info()`.\n",
+    "\n",
+    "On default this exports everything, each of the sections can be disabled:\n",
+    "  - population settings (bse_options, grid_options, custom_options), turn off with include_population\n",
+    "      settings=False\n",
+    "  - binary_c_defaults (all the commandline arguments that binary c accepts, and their defaults).\n",
+    "      turn off with include_binary_c_defaults=False\n",
+    "  - include_binary_c_version_info (all the compilation info, and information about the compiled\n",
+    "      parameters), turn off with include_binary_c_version_info=False\n",
+    "  - include_binary_c_help_all (all the help information for all the binary_c parameters),\n",
+    "      turn off with include_binary_c_help_all=Fase\n",
+    "      \n",
+    "On default it will write this to the custom_options['data_dir'], but that can be overriden by setting use_datadir=False and providing an outfile=<>"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
+   "id": "b9c2471a-a5b0-48b7-a50b-2f0d22100926",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Writing settings to /tmp/binary_c_python/example_python_population_result/example_pop_settings.json\n"
+     ]
+    },
+    {
+     "data": {
+      "text/plain": [
+       "'/tmp/binary_c_python/example_python_population_result/example_pop_settings.json'"
+      ]
+     },
+     "execution_count": 3,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "example_pop.export_all_info()"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f9a65554-36ab-4a04-96ca-9f1422c307fd",
+   "metadata": {},
+   "source": [
+    "## Adding grid variables\n",
+    "The main purpose of the Population object is to handle the population synthesis side of running a set of stars. The main method to do this with binarycpython, as is the case with Perl binarygrid, is to use grid variables. These are loops over a predefined range of values, where a probability will be assigned to the systems based on the chosen probability distributions.\n",
+    "\n",
+    "Usually we use either 1 mass grid variable, or a trio of mass, mass ratio and period (See below for full examples of all of these). We can, however, also add grid sampling for e.g. eccentricity, metallicity or other parameters. \n",
+    "\n",
+    "In some cases it could be easier to set up a for loop that sets that parameter and calls the evolve function several times, e.g. when you want to vary a prescription (usually a discrete, unweighted parameter) \n",
+    "\n",
+    "\n",
+    "A notable special type of grid variable is that of the Moe & di Stefano 2017 dataset (see further down in the notebook).\n",
+    "\n",
+    "To add a grid variable to the population object we use `example_pop.add_grid_variable` (see next cell)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 4,
+   "id": "68c84521-9ae8-4020-af7a-5334173db969",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Help on method add_grid_variable in module binarycpython.utils.grid:\n",
+      "\n",
+      "add_grid_variable(name:str, longname:str, valuerange:Union[list, str], resolution:str, spacingfunc:str, probdist:str, dphasevol:Union[str, int], parameter_name:str, gridtype:str='edge', branchpoint:int=0, precode:Union[str, NoneType]=None, condition:Union[str, NoneType]=None) -> None method of binarycpython.utils.grid.Population instance\n",
+      "    Function to add grid variables to the grid_options.\n",
+      "    \n",
+      "    The execution of the grid generation will be through a nested for loop.\n",
+      "    Each of the grid variables will get create a deeper for loop.\n",
+      "    \n",
+      "    The real function that generates the numbers will get written to a new file in the TMP_DIR,\n",
+      "    and then loaded imported and evaluated.\n",
+      "    beware that if you insert some destructive piece of code, it will be executed anyway.\n",
+      "    Use at own risk.\n",
+      "    \n",
+      "    Tasks:\n",
+      "        - TODO: Fix this complex function.\n",
+      "    \n",
+      "    Args:\n",
+      "        name:\n",
+      "            name of parameter. This is evaluated as a parameter and you can use it throughout\n",
+      "            the rest of the function\n",
+      "            \n",
+      "            Examples:\n",
+      "                name = 'lnm1'\n",
+      "        longname:\n",
+      "            Long name of parameter\n",
+      "            \n",
+      "            Examples:\n",
+      "                longname = 'Primary mass'\n",
+      "        range:\n",
+      "            Range of values to take. Does not get used really, the spacingfunction is used to\n",
+      "            get the values from\n",
+      "            \n",
+      "            Examples:\n",
+      "                range = [math.log(m_min), math.log(m_max)]\n",
+      "        resolution:\n",
+      "            Resolution of the sampled range (amount of samples).\n",
+      "            TODO: check if this is used anywhere\n",
+      "    \n",
+      "            Examples: \n",
+      "                resolution = resolution[\"M_1\"]\n",
+      "        spacingfunction:\n",
+      "            Function determining how the range is sampled. You can either use a real function,\n",
+      "            or a string representation of a function call. Will get written to a file and\n",
+      "            then evaluated.\n",
+      "    \n",
+      "            Examples:\n",
+      "                spacingfunction = \"const(math.log(m_min), math.log(m_max), {})\".format(resolution['M_1'])\n",
+      "    \n",
+      "        precode:\n",
+      "            Extra room for some code. This code will be evaluated within the loop of the\n",
+      "            sampling function (i.e. a value for lnm1 is chosen already)\n",
+      "            \n",
+      "            Examples:\n",
+      "                precode = 'M_1=math.exp(lnm1);'\n",
+      "        probdist:\n",
+      "            Function determining the probability that gets assigned to the sampled parameter\n",
+      "            \n",
+      "            Examples:\n",
+      "                probdist = 'Kroupa2001(M_1)*M_1'\n",
+      "        dphasevol:\n",
+      "            part of the parameter space that the total probability is calculated with. Put to -1\n",
+      "            if you want to ignore any dphasevol calculations and set the value to 1\n",
+      "            Examples:\n",
+      "                dphasevol = 'dlnm1'\n",
+      "        condition:\n",
+      "            condition that has to be met in order for the grid generation to continue\n",
+      "            Examples:\n",
+      "                condition = 'self.grid_options['binary']==1'\n",
+      "        gridtype:\n",
+      "            Method on how the value range is sampled. Can be either 'edge' (steps starting at\n",
+      "            the lower edge of the value range) or 'center'\n",
+      "            (steps starting at lower edge + 0.5 * stepsize).\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "help(example_pop.add_grid_variable)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "bd75cebe-2152-4025-b680-dc020b80889b",
+   "metadata": {},
+   "source": [
+    "All the distribution functions that we can use are stored in the `binarycpython.utils.distribution_functions` or `binarycpython/utils/distribution_functions.py` on git. If you uncomment the help statement below you can see which functions are available now:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 5,
+   "id": "048db541-3e92-4c5d-a25c-9c5a34b9c857",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [],
+   "source": [
+    "# import binarycpython.utils.distribution_functions\n",
+    "# help(binarycpython.utils.distribution_functions)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "1b3a007b-5c17-42a7-a981-7e268e6f545c",
+   "metadata": {},
+   "source": [
+    "The next cell contains an example of adding the mass grid variable, but sampling in log mass. The commented grid variables are examples of the mass ratio sampling and the period sampling."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 6,
+   "id": "47979841-2c26-4b26-8945-603d013dc93a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Added grid variable: {\n",
+      "    \"name\": \"lnm1\",\n",
+      "    \"longname\": \"Primary mass\",\n",
+      "    \"valuerange\": [\n",
+      "        2,\n",
+      "        150\n",
+      "    ],\n",
+      "    \"resolution\": \"20\",\n",
+      "    \"spacingfunc\": \"const(math.log(2), math.log(150), 20)\",\n",
+      "    \"precode\": \"M_1=math.exp(lnm1)\",\n",
+      "    \"probdist\": \"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+      "    \"dphasevol\": \"dlnm1\",\n",
+      "    \"parameter_name\": \"M_1\",\n",
+      "    \"condition\": \"\",\n",
+      "    \"gridtype\": \"edge\",\n",
+      "    \"branchpoint\": 0,\n",
+      "    \"grid_variable_number\": 0\n",
+      "}\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Add grid variables\n",
+    "resolution = {\"M_1\": 20, \"q\": 20, \"per\": 40}\n",
+    "\n",
+    "# Mass\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"lnm1\",\n",
+    "    longname=\"Primary mass\",\n",
+    "    valuerange=[2, 150],\n",
+    "    resolution=\"{}\".format(resolution[\"M_1\"]),\n",
+    "    spacingfunc=\"const(math.log(2), math.log(150), {})\".format(resolution[\"M_1\"]),\n",
+    "    precode=\"M_1=math.exp(lnm1)\",\n",
+    "    probdist=\"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+    "    dphasevol=\"dlnm1\",\n",
+    "    parameter_name=\"M_1\",\n",
+    "    condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    ")\n",
+    "\n",
+    "# # Mass ratio\n",
+    "# test_pop.add_grid_variable(\n",
+    "#     name=\"q\",\n",
+    "#     longname=\"Mass ratio\",\n",
+    "#     valuerange=[\"0.1/M_1\", 1],\n",
+    "#     resolution=\"{}\".format(resolution['q']),\n",
+    "#     spacingfunc=\"const(0.1/M_1, 1, {})\".format(resolution['q']),\n",
+    "#     probdist=\"flatsections(q, [{'min': 0.1/M_1, 'max': 1.0, 'height': 1}])\",\n",
+    "#     dphasevol=\"dq\",\n",
+    "#     precode=\"M_2 = q * M_1\",\n",
+    "#     parameter_name=\"M_2\",\n",
+    "#     condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    "# )\n",
+    "\n",
+    "# #\n",
+    "# test_pop.add_grid_variable(\n",
+    "#    name=\"log10per\", # in days\n",
+    "#    longname=\"log10(Orbital_Period)\",\n",
+    "#    valuerange=[0.15, 5.5],\n",
+    "#    resolution=\"{}\".format(resolution[\"per\"]),\n",
+    "#    spacingfunc=\"const(0.15, 5.5, {})\".format(resolution[\"per\"]),\n",
+    "#    precode=\"\"\"orbital_period = 10** log10per\n",
+    "# sep = calc_sep_from_period(M_1, M_2, orbital_period)\n",
+    "# sep_min = calc_sep_from_period(M_1, M_2, 10**0.15)\n",
+    "# sep_max = calc_sep_from_period(M_1, M_2, 10**5.5)\"\"\",\n",
+    "#    probdist=\"sana12(M_1, M_2, sep, orbital_period, sep_min, sep_max, math.log10(10**0.15), math.log10(10**5.5), -0.55)\",\n",
+    "#    parameter_name=\"orbital_period\",\n",
+    "#    dphasevol=\"dlog10per\",\n",
+    "# )\n"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "163f13ae-fec1-4ee8-b9d4-c1b75c19ff39",
+   "metadata": {},
+   "source": [
+    "## Setting logging and handling the output\n",
+    "On default, binary_c will not output anything (except for 'SINGLE STAR LIFETIME'). It is up to us to determine what will be printed. We can either do that by hardcoding the print statements into `binary_c` (see documentation binary_c). Or, we can use the custom logging functionality of binarycpython (see notebook `notebook_custom_logging.ipynb`), which is faster to set up and requires no recompilation of binary_c, but is somewhat more limited in its functionality. \n",
+    "\n",
+    "After configuring what will be printed, we need to make a function to parse the output. This can be done by setting the parse_function parameter in the population object (see also notebook `notebook_individual_systems.ipynb`). \n",
+    "\n",
+    "In the code below we will set up both the custom logging, and a parse function to handle that output"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "0c986215-93b1-4e30-ad79-f7c397e9ff7d",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: C_logging_code=\n",
+      "if(stardata->star[0].stellar_type >= 13)    \n",
+      "{\n",
+      "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+      "    {\n",
+      "        Printf(\"EXAMPLE_COMPACT_OBJECT %30.12e %g %g %g %d\\n\",\n",
+      "            // \n",
+      "            stardata->model.time, // 1\n",
+      "            stardata->star[0].mass, // 2\n",
+      "            stardata->common.zero_age.mass[0], // 3\n",
+      "            stardata->model.probability, // 4\n",
+      "            stardata->star[0].stellar_type // 5\n",
+      "      );\n",
+      "    };\n",
+      "    /* Kill the simulation to save time */\n",
+      "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+      "};\n",
+      " to grid_options\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Create custom logging statement: in this case we will log when the star turns into a compact object, and then terminate the evolution.\n",
+    "custom_logging_statement = \"\"\"\n",
+    "if(stardata->star[0].stellar_type >= 13)    \n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"EXAMPLE_COMPACT_OBJECT %30.12e %g %g %g %d\\\\n\",\n",
+    "            // \n",
+    "            stardata->model.time, // 1\n",
+    "            stardata->star[0].mass, // 2\n",
+    "            stardata->common.zero_age.mass[0], // 3\n",
+    "            stardata->model.probability, // 4\n",
+    "            stardata->star[0].stellar_type // 5\n",
+    "      );\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "example_pop.set(\n",
+    "    C_logging_code=custom_logging_statement\n",
+    ")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ae1f1f0c-1f8b-42d8-b051-cbf8c6b51514",
+   "metadata": {},
+   "source": [
+    "The parse function must now catch lines that start with \"EXAMPLE_COMPACT_OBJECT\", and write that line to a file"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 8,
+   "id": "fd197154-a8ce-4865-8929-008d3483101a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: parse_function=<function parse_function at 0x7ff3bdf79620> to grid_options\n"
+     ]
+    }
+   ],
+   "source": [
+    "def parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parse function\n",
+    "    \"\"\"\n",
+    "    \n",
+    "    # get info from the population instance\n",
+    "    data_dir = self.custom_options[\"data_dir\"]\n",
+    "    base_filename = self.custom_options[\"base_filename\"]\n",
+    "\n",
+    "    # Check directory, make if necessary\n",
+    "    os.makedirs(data_dir, exist_ok=True)\n",
+    "\n",
+    "    seperator = \" \"\n",
+    "\n",
+    "    # Create filename\n",
+    "    outfilename = os.path.join(data_dir, base_filename)\n",
+    "\n",
+    "    parameters = [\"time\", \"mass\", \"zams_mass\", \"probability\", \"stellar_type\"]\n",
+    "\n",
+    "    # Go over the output.\n",
+    "    for line in output.splitlines():\n",
+    "        headerline = line.split()[0]\n",
+    "\n",
+    "        # CHeck the header and act accordingly\n",
+    "        if headerline == \"EXAMPLE_COMPACT_OBJECT\":\n",
+    "            values = line.split()[1:]\n",
+    "            print(line)\n",
+    "            \n",
+    "            if not len(parameters) == len(values):\n",
+    "                print(\"Amount of column names isnt equal to amount of columns\")\n",
+    "                raise ValueError\n",
+    "\n",
+    "            if not os.path.exists(outfilename):\n",
+    "                with open(outfilename, \"w\") as f:\n",
+    "                    f.write(seperator.join(parameters) + \"\\n\")\n",
+    "\n",
+    "            with open(outfilename, \"a\") as f:\n",
+    "                f.write(seperator.join(values) + \"\\n\")\n",
+    "\n",
+    "# Add the parsing function\n",
+    "example_pop.set(\n",
+    "    parse_function=parse_function,\n",
+    ")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "91509ce5-ffe7-4937-aa87-6d7baac9ac04",
+   "metadata": {},
+   "source": [
+    "## Evolving the grid\n",
+    "Now that we configured all the main parts of the population object, we can actually run the population! Doing this is straightforward: `example_pop.evolve()`\n",
+    "\n",
+    "This will start up the processing of all the systems. We can control how many cores are used by settings `amt_cores`. By setting the `verbosity` of the population object to a higher value we can get a lot of verbose information about the run, but for now we will set it to 0.\n",
+    "\n",
+    "There are many grid_options that can lead to different behaviour of the evolution of the grid. Please do have a look at those: [grid options docs](https://ri0005.pages.surrey.ac.uk/binary_c-python/grid_options_descriptions.html), and try  "
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 9,
+   "id": "8ea376c1-1e92-45af-8cab-9d7fdca564eb",
+   "metadata": {
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: verbosity=0 to grid_options\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Grid has handled 20 stars\n",
+      "with a total probability of 0.05150046619238192\n",
+      "Total starcount for this run will be: 20\n",
+      "EXAMPLE_COMPACT_OBJECT             2.867655467480e+01 1.33079 9.81391 0.00167028 13\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "EXAMPLE_COMPACT_OBJECT             1.931266944719e+01 1.3933 12.3177 0.00124307 13\n",
+      "EXAMPLE_COMPACT_OBJECT             4.439623364590e+01 1.38004 7.81906 0.00224431 13\n",
+      "EXAMPLE_COMPACT_OBJECT             1.364277535630e+01 1.47961 15.4603 0.000925128 13\n",
+      "EXAMPLE_COMPACT_OBJECT             1.017435498578e+01 1.59052 19.4046 0.000688507 13\n",
+      "EXAMPLE_COMPACT_OBJECT             8.294870923827e+00 1.7197 24.3552 0.000512406 13\n",
+      "EXAMPLE_COMPACT_OBJECT             6.802132608769e+00 1.84162 30.5689 0.000381347 13\n",
+      "EXAMPLE_COMPACT_OBJECT             5.723570798020e+00 1.99471 38.3678 0.00028381 13\n",
+      "EXAMPLE_COMPACT_OBJECT             4.933751523833e+00 2.15875 48.1564 0.000211219 13\n",
+      "EXAMPLE_COMPACT_OBJECT             4.337250536639e+00 2.35209 60.4424 0.000157195 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.862081089332e+00 2.56776 75.8628 0.000116989 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.449960890183e+00 2.80457 95.2174 8.70668e-05 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.172196856333e+00 3.05193 119.51 6.47976e-05 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.069627290216e+00 3.27563 150 4.82242e-05 14\n",
+      "Population-2a7732d03e594ef4b5dfe9051b41d9c0 finished! The total probability was: 0.05150046619238191. It took a total of 0.7797017097473145s to run 20 systems on 2 cores\n",
+      "There were no errors found in this run.\n"
+     ]
+    }
+   ],
+   "source": [
+    "# change verbosity\n",
+    "example_pop.set(verbosity=0)\n",
+    "\n",
+    "## Executing a population\n",
+    "## This uses the values generated by the grid_variables\n",
+    "analytics = example_pop.evolve()  # TODO: update this function call"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "91ab45c7-7d31-4543-aee4-127ab58e891f",
+   "metadata": {},
+   "source": [
+    "After the run is complete, some technical report on the run is returned. I stored that in `analytics`. As we can see below, this dictionary is like a status report of the evolution. Useful for e.g. debugging."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 10,
+   "id": "e1f0464b-0424-4022-b34b-5b744bc2c59d",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "{'population_name': '2a7732d03e594ef4b5dfe9051b41d9c0', 'evolution_type': 'grid', 'failed_count': 0, 'failed_prob': 0, 'failed_systems_error_codes': [], 'errors_exceeded': False, 'errors_found': False, 'total_probability': 0.05150046619238191, 'total_count': 20, 'start_timestamp': 1628444120.234709, 'end_timestamp': 1628444121.0144107, 'total_mass_run': 730.1048014407228, 'total_probability_weighted_mass_run': 0.2983275843337705, 'zero_prob_stars_skipped': 0}\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(analytics)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "6460df56-9fba-4817-9a1e-593ef15d98c1",
+   "metadata": {},
+   "source": [
+    "## Noteworthy functionality\n",
+    "Some extra features that are available from via the population object are:\n",
+    "- write_binary_c_calls_to_file: Function to write the calls that would be passed to binary_c to a file"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 11,
+   "id": "83f8e519-4f7c-474a-ad95-f175a34fae81",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Help on method write_binary_c_calls_to_file in module binarycpython.utils.grid:\n",
+      "\n",
+      "write_binary_c_calls_to_file(output_dir:Union[str, NoneType]=None, output_filename:Union[str, NoneType]=None, include_defaults:bool=False) -> None method of binarycpython.utils.grid.Population instance\n",
+      "    Function that loops over the grid code and writes the generated parameters to a file.\n",
+      "    In the form of a command line call\n",
+      "    \n",
+      "    Only useful when you have a variable grid as system_generator. MC wouldn't be that useful\n",
+      "    \n",
+      "    Also, make sure that in this export there are the basic parameters\n",
+      "    like m1,m2,sep, orb-per, ecc, probability etc.\n",
+      "    \n",
+      "    On default this will write to the datadir, if it exists\n",
+      "    \n",
+      "    Tasks:\n",
+      "        - TODO: test this function\n",
+      "        - TODO: make sure the binary_c_python .. output file has a unique name\n",
+      "    \n",
+      "    Args:\n",
+      "        output_dir: (optional, default = None) directory where to write the file to. If custom_options['data_dir'] is present, then that one will be used first, and then the output_dir\n",
+      "        output_filename: (optional, default = None) filename of the output. If not set it will be called \"binary_c_calls.txt\"\n",
+      "        include_defaults: (optional, default = None) whether to include the defaults of binary_c in the lines that are written. Beware that this will result in very long lines, and it might be better to just export the binary_c defaults and keep them in a separate file.\n",
+      "    \n",
+      "    Returns:\n",
+      "        filename: filename that was used to write the calls to\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "help(example_pop.write_binary_c_calls_to_file)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 12,
+   "id": "dacfed75-dfe3-4afd-a0ff-a4be17746021",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Generating grid code\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Saving grid code to grid_options\n",
+      "Writing grid code to /tmp/binary_c_python/binary_c_grid_2a7732d03e594ef4b5dfe9051b41d9c0.py\n",
+      "Loading grid code function from /tmp/binary_c_python/binary_c_grid_2a7732d03e594ef4b5dfe9051b41d9c0.py\n",
+      "Grid code loaded\n",
+      "Writing binary_c calls to /tmp/binary_c_python/example_python_population_result/binary_c_calls.txt\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "Grid has handled 20 stars\n",
+      "with a total probability of 0.05150046619238192\n",
+      "/tmp/binary_c_python/example_python_population_result/binary_c_calls.txt\n",
+      "binary_c M_1 2.0 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.013208238029791246\n",
+      "binary_c M_1 2.5102526289471614 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.009829948023831718\n",
+      "binary_c M_1 3.1506841305680684 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.0073157281034221516\n",
+      "binary_c M_1 3.9545065608702976 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.005444573822104362\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_pop.set(verbosity=10)\n",
+    "calls_filename = example_pop.write_binary_c_calls_to_file()\n",
+    "print(calls_filename)\n",
+    "\n",
+    "with open(calls_filename, 'r') as f:\n",
+    "    print('\\n'.join(f.read().splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "60359eb1-4d0c-4d2d-8265-ec5171b944a2",
+   "metadata": {},
+   "source": [
+    "## Full examples of population scripts\n",
+    "Below is a full setup for a population of single stars"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 13,
+   "id": "7212b6be-9787-4122-a7f1-86538cf38179",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Grid has handled 20 stars\n",
+      "with a total probability of 0.05150046619238192\n",
+      "Total starcount for this run will be: 20\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Population-3680f3882c0a449c944462abffea2447 finished! The total probability was: 0.05150046619238191. It took a total of 0.6246354579925537s to run 20 systems on 2 cores\n",
+      "There were no errors found in this run.\n",
+      "\n",
+      "\n",
+      "time mass zams_mass probability radius stellar_type\n",
+      "2.867655467480e+01 1.33079 9.81391 0.00167028 1.72498e-05 13\n",
+      "1.931266944719e+01 1.3933 12.3177 0.00124307 1.72498e-05 13\n",
+      "4.439623364590e+01 1.38004 7.81906 0.00224431 1.72498e-05 13\n",
+      "1.364277535630e+01 1.47961 15.4603 0.000925128 1.72498e-05 13\n",
+      "1.017435498578e+01 1.59052 19.4046 0.000688507 1.72498e-05 13\n",
+      "8.294870923827e+00 1.7197 24.3552 0.000512406 1.72498e-05 13\n",
+      "6.802132608769e+00 1.84162 30.5689 0.000381347 1.72498e-05 13\n",
+      "5.723570798020e+00 1.99471 38.3678 0.00028381 1.72498e-05 13\n",
+      "4.933751523833e+00 2.15875 48.1564 0.000211219 1.72498e-05 13\n",
+      "4.337250536639e+00 2.35209 60.4424 0.000157195 9.97286e-06 14\n",
+      "3.862081089332e+00 2.56776 75.8628 0.000116989 1.08873e-05 14\n",
+      "3.449960890183e+00 2.80457 95.2174 8.70668e-05 1.18914e-05 14\n",
+      "3.172196856333e+00 3.05193 119.51 6.47976e-05 1.29402e-05 14\n",
+      "3.069627290216e+00 3.27563 150 4.82242e-05 1.38887e-05 14\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "import os\n",
+    "\n",
+    "from binarycpython.utils.grid import Population\n",
+    "from binarycpython.utils.custom_logging_functions import temp_dir\n",
+    "\n",
+    "def parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parsing function\n",
+    "    \"\"\"\n",
+    "    \n",
+    "    # extract info from the population instance\n",
+    "\n",
+    "    # Get some information from the\n",
+    "    data_dir = self.custom_options[\"data_dir\"]\n",
+    "    base_filename = self.custom_options[\"base_filename\"]\n",
+    "\n",
+    "    # Check directory, make if necessary\n",
+    "    os.makedirs(data_dir, exist_ok=True)\n",
+    "\n",
+    "    #\n",
+    "    seperator = \" \"\n",
+    "\n",
+    "    # Create filename\n",
+    "    outfilename = os.path.join(data_dir, base_filename)\n",
+    "\n",
+    "    # The header columns matching this \n",
+    "    parameters = [\"time\", \"mass\", \"zams_mass\", \"probability\", \"radius\", \"stellar_type\"]\n",
+    "\n",
+    "    # Go over the output.\n",
+    "    for el in output.splitlines():\n",
+    "        headerline = el.split()[0]\n",
+    "\n",
+    "        # CHeck the header and act accordingly\n",
+    "        if headerline == \"MY_STELLAR_DATA\":\n",
+    "            values = el.split()[1:]\n",
+    "\n",
+    "            if not len(parameters) == len(values):\n",
+    "                print(\"Amount of column names isnt equal to amount of columns\")\n",
+    "                raise ValueError\n",
+    "\n",
+    "            if not os.path.exists(outfilename):\n",
+    "                with open(outfilename, \"w\") as f:\n",
+    "                    f.write(seperator.join(parameters) + \"\\n\")\n",
+    "\n",
+    "            with open(outfilename, \"a\") as f:\n",
+    "                f.write(seperator.join(values) + \"\\n\")\n",
+    "\n",
+    "\n",
+    "# Create population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# If you want verbosity, set this before other things\n",
+    "example_pop.set(verbosity=0)\n",
+    "\n",
+    "# Setting values can be done via .set(<parameter_name>=<value>)\n",
+    "example_pop.set(\n",
+    "    # binary_c physics options\n",
+    "    M_1=10,  # bse_options\n",
+    "    separation=0,  # bse_options\n",
+    "    orbital_period=45000000080,  # bse_options\n",
+    "    max_evolution_time=15000,  # bse_options\n",
+    "    eccentricity=0.02,  # bse_options\n",
+    "    \n",
+    "    # grid_options\n",
+    "    amt_cores=2,  # grid_options\n",
+    "\n",
+    "    # Custom options: the data directory and the output filename\n",
+    "    data_dir=os.path.join(\n",
+    "        temp_dir(), \"example_python_population_result\"\n",
+    "    ),  # custom_options\n",
+    "    base_filename=\"example_pop.dat\",  # custom_options\n",
+    ")\n",
+    "\n",
+    "# Creating a parsing function\n",
+    "example_pop.set(\n",
+    "    parse_function=parse_function,  # Setting the parse function thats used in the evolve_population\n",
+    ")\n",
+    "\n",
+    "### Custom logging\n",
+    "# Log the moment when the star turns into neutron\n",
+    "example_pop.set(\n",
+    "    C_logging_code=\"\"\"\n",
+    "if(stardata->star[0].stellar_type >= 13)    \n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"MY_STELLAR_DATA %30.12e %g %g %g %g %d\\\\n\",\n",
+    "            // \n",
+    "            stardata->model.time, // 1\n",
+    "            stardata->star[0].mass, // 2\n",
+    "            stardata->common.zero_age.mass[0], // 4\n",
+    "            stardata->model.probability, // 5\n",
+    "            stardata->star[0].radius, // 6\n",
+    "            stardata->star[0].stellar_type // 7\n",
+    "      );\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    ")\n",
+    "\n",
+    "# Add grid variables\n",
+    "resolution = {\"M_1\": 20}\n",
+    "\n",
+    "# Mass\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"lnm1\",\n",
+    "    longname=\"Primary mass\",\n",
+    "    valuerange=[2, 150],\n",
+    "    resolution=\"{}\".format(resolution[\"M_1\"]),\n",
+    "    spacingfunc=\"const(math.log(2), math.log(150), {})\".format(resolution[\"M_1\"]),\n",
+    "    precode=\"M_1=math.exp(lnm1)\",\n",
+    "    probdist=\"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+    "    dphasevol=\"dlnm1\",\n",
+    "    parameter_name=\"M_1\",\n",
+    "    condition=\"\",\n",
+    ")\n",
+    "\n",
+    "# Exporting of all the settings can be done with .export_all_info()\n",
+    "example_pop.export_all_info()\n",
+    "\n",
+    "# remove the result file if it exists\n",
+    "if os.path.isfile(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\")):\n",
+    "    os.remove(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"))\n",
+    "\n",
+    "\n",
+    "# Evolve the population\n",
+    "example_pop.evolve()\n",
+    "\n",
+    "# \n",
+    "with open(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"), 'r') as f:\n",
+    "    output = f.read()\n",
+    "print(\"\\n\")\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "c2ab0979-6575-481d-9c1c-ca98517b2437",
+   "metadata": {},
+   "source": [
+    "We can also set up a population that samples biinary systems, by adding extra grid variables. Below is an example of a full script that runs a binary population and registers when a double compact object is formed. The logging is rather compact and should be expanded top be more useful"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 14,
+   "id": "79acdbb2-7dd6-45c4-9609-80994f03619a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Constructing/adding: q\n",
+      "Constructing/adding: log10per\n",
+      "Grid has handled 125 stars\n",
+      "with a total probability of 0.0862478164626921\n",
+      "Total starcount for this run will be: 125\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Constructing/adding: q\n",
+      "Constructing/adding: log10per\n",
+      "Population-d20a4c74d20a43b881c0c9e5def5f76c finished! The total probability was: 0.08624781646269201. It took a total of 8.561265707015991s to run 125 systems on 2 cores\n",
+      "There were no errors found in this run.\n",
+      "\n",
+      "\n",
+      "time mass_1 zams_mass_1 mass_2 zams_mass_2 stellar_type_1 prev_stellar_type_1 stellar_type_2 prev_stellar_type_2 metallicity probability\n",
+      "8.863377990313e+01 1.29444 5.88566 0 2.99283 13 5 15 15 0.02 0.000627913\n",
+      "1.146421815741e+02 0 5.88566 1.33062 4.43925 15 15 13 5 0.02 0.000627913\n",
+      "7.222715508467e+01 1.34922 5.88566 0 5.88566 13 5 15 15 0.02 0.000627913\n",
+      "1.350021848285e+01 1.48488 17.3205 0 0.1 13 5 15 15 0.02 0.000154349\n",
+      "1.171108213270e+01 1.53113 17.3205 0 0.1 13 5 15 15 0.02 0.000154349\n",
+      "1.171086983243e+01 1.53177 17.3205 0 0.1 13 9 15 15 0.02 0.000154349\n",
+      "1.170770599495e+01 1.53176 17.3205 0 4.40513 13 5 15 15 0.02 0.000172877\n",
+      "1.230407246199e+01 1.59499 17.3205 0 4.40513 13 5 15 15 0.02 0.000610573\n",
+      "1.108751340926e+01 1.70319 17.3205 0 8.71025 13 4 15 15 0.02 0.000610573\n",
+      "1.941017702765e+01 1.34903 17.3205 1.65097 8.71025 13 13 13 5 0.02 0.000172877\n",
+      "1.980988739731e+01 1.36979 17.3205 1.60808 8.71025 13 13 13 5 0.02 0.000121486\n",
+      "3.571858031651e+01 1.53174 17.3205 1.30504 8.71025 13 13 13 5 0.02 8.42148e-05\n",
+      "3.459153942631e+01 1.53176 17.3205 1.31004 8.71025 13 13 13 5 0.02 9.8162e-05\n",
+      "1.687368550125e+01 1.34937 17.3205 1.73856 13.0154 13 13 13 8 0.02 0.000172877\n",
+      "1.194842917007e+01 1.78096 17.3205 0 13.0154 13 8 15 15 0.02 0.000610573\n",
+      "1.733614170983e+01 1.53184 17.3205 1.42375 13.0154 13 13 13 5 0.02 9.8162e-05\n",
+      "1.723547465714e+01 1.38403 17.3205 1.71288 13.0154 13 13 13 8 0.02 0.000121486\n",
+      "1.764340254985e+01 1.53174 17.3205 1.41264 13.0154 13 13 13 5 0.02 8.42148e-05\n",
+      "1.170425790780e+01 1.52963 17.3205 0 17.3205 13 5 15 15 0.02 0.000172877\n",
+      "8.922967341481e+00 1.85486 17.3205 0 17.3205 13 8 15 15 0.02 0.000610573\n",
+      "1.232906623449e+01 1.41074 17.3205 1.34281 17.3205 13 13 13 8 0.02 0.000121486\n",
+      "1.170775828562e+01 1.53183 17.3205 1.53183 17.3205 13 5 13 5 0.02 9.8162e-05\n",
+      "1.170770422321e+01 1.53175 17.3205 1.53175 17.3205 13 5 13 5 0.02 8.42148e-05\n",
+      "5.075844624794e+00 2.12303 50.9713 0 0.1 13 8 15 15 0.02 3.79411e-05\n",
+      "4.766606588165e+00 2.20484 50.9713 0 0.1 14 8 15 15 0.02 3.79411e-05\n",
+      "4.768305081494e+00 2.18838 50.9713 0 0.1 13 8 15 15 0.02 3.79411e-05\n",
+      "4.458869865939e+00 2.29864 50.9713 0 12.8178 14 8 15 15 0.02 0.000150087\n",
+      "1.806014211040e+01 2.10446 50.9713 1.40749 12.8178 13 13 13 5 0.02 2.9863e-05\n",
+      "4.797342083485e+00 2.10328 50.9713 0 12.8178 13 13 15 1 0.02 4.24954e-05\n",
+      "1.721374713429e+01 2.21673 50.9713 1.42212 12.8178 14 14 13 5 0.02 2.41295e-05\n",
+      "4.055645404546e+00 2.47276 50.9713 0 25.5357 14 7 15 15 0.02 0.000150087\n",
+      "1.806123543037e+01 2.21893 50.9713 1.40745 12.8178 14 14 13 5 0.02 2.07011e-05\n",
+      "8.117519147635e+00 2.10433 50.9713 2.21473 25.5357 13 13 14 8 0.02 4.24954e-05\n",
+      "8.315554923168e+00 2.15343 50.9713 2.08519 25.5357 13 13 13 8 0.02 2.9863e-05\n",
+      "7.917420996633e+00 2.21892 50.9713 1.7431 25.5357 14 14 13 8 0.02 2.07011e-05\n",
+      "7.693213405973e+00 2.21805 50.9713 1.78384 25.5357 14 14 13 8 0.02 2.41295e-05\n",
+      "3.753837732894e+00 2.62517 50.9713 0 38.2535 14 7 15 15 0.02 0.000150087\n",
+      "7.087296558990e+00 2.10417 50.9713 2.40935 38.2535 13 13 14 8 0.02 4.24954e-05\n",
+      "7.007109286263e+00 2.15854 50.9713 2.28672 38.2535 13 13 14 8 0.02 2.9863e-05\n",
+      "5.653200958306e+00 2.21878 50.9713 2.0587 38.2535 14 14 13 8 0.02 2.41295e-05\n",
+      "5.733794947644e+00 2.21892 50.9713 1.99255 38.2535 14 14 13 8 0.02 2.07011e-05\n",
+      "3.513216011269e+00 2.76647 50.9713 0 50.9713 14 7 15 15 0.02 0.000150087\n",
+      "4.750574783854e+00 2.27442 50.9713 0 50.9713 14 8 15 15 0.02 4.24954e-05\n",
+      "7.278384712062e+00 1.29678 50.9713 2.09216 50.9713 13 8 13 13 0.02 2.9863e-05\n",
+      "4.765996194699e+00 2.20787 50.9713 2.20787 50.9713 14 8 14 8 0.02 2.07011e-05\n",
+      "4.765535914728e+00 2.21331 50.9713 2.21331 50.9713 14 8 14 8 0.02 2.41295e-05\n",
+      "3.104706358826e+00 3.17639 150 0 0.1 14 7 15 15 0.02 9.32641e-06\n",
+      "3.069363482023e+00 3.27572 150 0 0.1 14 7 15 15 0.02 9.32641e-06\n",
+      "3.047074050271e+00 3.3836 150 0 37.575 14 7 15 15 0.02 3.68933e-05\n",
+      "5.974759306305e+00 3.23604 150 2.53922 37.575 14 14 14 7 0.02 1.04459e-05\n",
+      "6.074084349384e+00 3.30145 150 2.13876 37.575 14 14 13 8 0.02 7.34071e-06\n",
+      "5.733865371895e+00 3.29994 150 2.00498 37.575 14 14 13 8 0.02 5.93135e-06\n",
+      "3.027099358410e+00 3.53631 150 0 75.05 14 7 15 15 0.02 3.68933e-05\n",
+      "5.807147339697e+00 3.30197 150 1.9791 37.575 14 14 13 8 0.02 5.08861e-06\n",
+      "4.862942347290e+00 3.25294 150 2.97823 75.05 14 14 14 7 0.02 1.04459e-05\n",
+      "4.556479830908e+00 3.29942 150 2.73221 75.05 14 14 14 7 0.02 7.34071e-06\n",
+      "3.853070305680e+00 3.29977 150 2.62486 75.05 14 14 14 7 0.02 5.93135e-06\n",
+      "3.881529045940e+00 3.30149 150 2.55924 75.05 14 14 14 7 0.02 5.08861e-06\n",
+      "3.015033359333e+00 3.64419 150 0 112.525 14 7 15 15 0.02 3.68933e-05\n",
+      "4.126828648362e+00 3.32047 150 0 112.525 14 14 15 3 0.02 1.04459e-05\n",
+      "3.990017992944e+00 3.3032 150 2.94027 112.525 14 14 14 7 0.02 7.34071e-06\n",
+      "3.206771867883e+00 3.07671 150 3.11282 112.525 14 14 14 7 0.02 5.93135e-06\n",
+      "3.006827156705e+00 3.72638 150 0 150 14 7 15 15 0.02 3.68933e-05\n",
+      "3.218786094847e+00 3.30337 150 3.01344 112.525 14 14 14 7 0.02 5.08861e-06\n",
+      "4.527722847382e+00 1.42238 150 0 150 13 5 15 15 0.02 1.04459e-05\n",
+      "3.069567332611e+00 3.27804 150 3.27804 150 14 7 14 7 0.02 5.93135e-06\n",
+      "5.726405299909e+00 1.29746 150 3.22759 150 13 8 14 14 0.02 7.34071e-06\n",
+      "3.069626478211e+00 3.27565 150 3.27565 150 14 7 14 7 0.02 5.08861e-06\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "import os\n",
+    "\n",
+    "from binarycpython.utils.grid import Population\n",
+    "from binarycpython.utils.custom_logging_functions import temp_dir\n",
+    "\n",
+    "def parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parsing function\n",
+    "    \"\"\"\n",
+    "    \n",
+    "    # extract info from the population instance\n",
+    "\n",
+    "    # Get some information from the\n",
+    "    data_dir = self.custom_options[\"data_dir\"]\n",
+    "    base_filename = self.custom_options[\"base_filename\"]\n",
+    "\n",
+    "    # Check directory, make if necessary\n",
+    "    os.makedirs(data_dir, exist_ok=True)\n",
+    "\n",
+    "    #\n",
+    "    seperator = \" \"\n",
+    "\n",
+    "    # Create filename\n",
+    "    outfilename = os.path.join(data_dir, base_filename)\n",
+    "\n",
+    "    # The header columns matching this \n",
+    "    parameters = [\n",
+    "        \"time\", \n",
+    "        \"mass_1\", \"zams_mass_1\", \"mass_2\", \"zams_mass_2\",\n",
+    "        \"stellar_type_1\", \"prev_stellar_type_1\", \"stellar_type_2\", \"prev_stellar_type_2\", \n",
+    "        \"metallicity\", \"probability\"\n",
+    "    ]\n",
+    "    \n",
+    "    # Go over the output.\n",
+    "    for el in output.splitlines():\n",
+    "        headerline = el.split()[0]\n",
+    "\n",
+    "        # CHeck the header and act accordingly\n",
+    "        if headerline == \"EXAMPLE_DCO\":\n",
+    "            values = el.split()[1:]\n",
+    "\n",
+    "            if not len(parameters) == len(values):\n",
+    "                print(\"Amount of column names isnt equal to amount of columns\")\n",
+    "                raise ValueError\n",
+    "\n",
+    "            if not os.path.exists(outfilename):\n",
+    "                with open(outfilename, \"w\") as f:\n",
+    "                    f.write(seperator.join(parameters) + \"\\n\")\n",
+    "\n",
+    "            with open(outfilename, \"a\") as f:\n",
+    "                f.write(seperator.join(values) + \"\\n\")\n",
+    "\n",
+    "\n",
+    "# Create population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# If you want verbosity, set this before other things\n",
+    "example_pop.set(verbosity=0)\n",
+    "\n",
+    "# Setting values can be done via .set(<parameter_name>=<value>)\n",
+    "example_pop.set(\n",
+    "    # binary_c physics options\n",
+    "    M_1=10,  # bse_options\n",
+    "    separation=0,  # bse_options\n",
+    "    orbital_period=45000000080,  # bse_options\n",
+    "    max_evolution_time=15000,  # bse_options\n",
+    "    eccentricity=0.02,  # bse_options\n",
+    "    \n",
+    "    # grid_options\n",
+    "    amt_cores=2,  # grid_options\n",
+    "\n",
+    "    # Custom options: the data directory and the output filename\n",
+    "    data_dir=os.path.join(\n",
+    "        temp_dir(), \"example_python_population_result\"\n",
+    "    ),  # custom_options\n",
+    "    base_filename=\"example_pop.dat\",  # custom_options\n",
+    ")\n",
+    "\n",
+    "# Creating a parsing function\n",
+    "example_pop.set(\n",
+    "    parse_function=parse_function,  # Setting the parse function thats used in the evolve_population\n",
+    ")\n",
+    "\n",
+    "### Custom logging\n",
+    "# Log the moment when the star turns into neutron\n",
+    "example_pop.set(\n",
+    "    C_logging_code=\"\"\"\n",
+    "// logger to find gravitational wave progenitors\n",
+    "if(stardata->star[0].stellar_type>=NS && stardata->star[1].stellar_type>=NS)\n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"EXAMPLE_DCO %30.12e \" // 1\n",
+    "            \"%g %g %g %g \" // 2-5\n",
+    "            \"%d %d %d %d \" // 6-9\n",
+    "            \"%g %g\\\\n\", // 10-11\n",
+    "\n",
+    "            stardata->model.time, // 1\n",
+    "\n",
+    "            stardata->star[0].mass, //2\n",
+    "            stardata->common.zero_age.mass[0], //3\n",
+    "            stardata->star[1].mass, //4\n",
+    "            stardata->common.zero_age.mass[1], //5\n",
+    "\n",
+    "            stardata->star[0].stellar_type, //6\n",
+    "            stardata->previous_stardata->star[0].stellar_type, //7\n",
+    "            stardata->star[1].stellar_type, //8\n",
+    "            stardata->previous_stardata->star[1].stellar_type, //9\n",
+    "\n",
+    "            // model stuff\n",
+    "            stardata->common.metallicity, //10\n",
+    "            stardata->model.probability //11\n",
+    "        );\n",
+    "    }\n",
+    "    /* Kill the simulation to safe time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "}\n",
+    "\"\"\"\n",
+    ")\n",
+    "\n",
+    "# Add grid variables\n",
+    "resolution = {\"M_1\": 5, \"q\": 5, \"per\": 5}\n",
+    "\n",
+    "# Mass\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"lnm1\",\n",
+    "    longname=\"Primary mass\",\n",
+    "    valuerange=[2, 150],\n",
+    "    resolution=\"{}\".format(resolution[\"M_1\"]),\n",
+    "    spacingfunc=\"const(math.log(2), math.log(150), {})\".format(resolution[\"M_1\"]),\n",
+    "    precode=\"M_1=math.exp(lnm1)\",\n",
+    "    probdist=\"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+    "    dphasevol=\"dlnm1\",\n",
+    "    parameter_name=\"M_1\",\n",
+    "    condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    ")\n",
+    "\n",
+    "# Mass ratio\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"q\",\n",
+    "    longname=\"Mass ratio\",\n",
+    "    valuerange=[\"0.1/M_1\", 1],\n",
+    "    resolution=\"{}\".format(resolution['q']),\n",
+    "    spacingfunc=\"const(0.1/M_1, 1, {})\".format(resolution['q']),\n",
+    "    probdist=\"flatsections(q, [{'min': 0.1/M_1, 'max': 1.0, 'height': 1}])\",\n",
+    "    dphasevol=\"dq\",\n",
+    "    precode=\"M_2 = q * M_1\",\n",
+    "    parameter_name=\"M_2\",\n",
+    "    condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    ")\n",
+    "\n",
+    "#\n",
+    "example_pop.add_grid_variable(\n",
+    "   name=\"log10per\", # in days\n",
+    "   longname=\"log10(Orbital_Period)\",\n",
+    "   valuerange=[0.15, 5.5],\n",
+    "   resolution=\"{}\".format(resolution[\"per\"]),\n",
+    "   spacingfunc=\"const(0.15, 5.5, {})\".format(resolution[\"per\"]),\n",
+    "   precode=\"\"\"orbital_period = 10** log10per\n",
+    "sep = calc_sep_from_period(M_1, M_2, orbital_period)\n",
+    "sep_min = calc_sep_from_period(M_1, M_2, 10**0.15)\n",
+    "sep_max = calc_sep_from_period(M_1, M_2, 10**5.5)\"\"\",\n",
+    "   probdist=\"sana12(M_1, M_2, sep, orbital_period, sep_min, sep_max, math.log10(10**0.15), math.log10(10**5.5), -0.55)\",\n",
+    "   parameter_name=\"orbital_period\",\n",
+    "   dphasevol=\"dlog10per\",\n",
+    ")\n",
+    "\n",
+    "# Exporting of all the settings can be done with .export_all_info()\n",
+    "example_pop.export_all_info()\n",
+    "\n",
+    "# remove the result file if it exists\n",
+    "if os.path.isfile(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\")):\n",
+    "    os.remove(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"))\n",
+    "\n",
+    "# Evolve the population\n",
+    "example_pop.evolve()\n",
+    "\n",
+    "# \n",
+    "with open(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"), 'r') as f:\n",
+    "    output = f.read()\n",
+    "print(\"\\n\")\n",
+    "print(output)"
+   ]
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/build/html/_sources/population_example.rst.txt b/docs/build/html/_sources/population_example.rst.txt
deleted file mode 100644
index 192372d019133d818c4ba6ad207c5dc09989de62..0000000000000000000000000000000000000000
--- a/docs/build/html/_sources/population_example.rst.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Example of population script
-============================
-The source code of a script to run a population of stars. 
-
-.. literalinclude:: ../../examples/example_population.py
-    :language: python
-    :linenos:
\ No newline at end of file
diff --git a/docs/build/html/binary_c_parameters.html b/docs/build/html/binary_c_parameters.html
index 9993c622ef77e4b90f5f229bb241f35e246c84d6..afc5c2ce71cae53196ee37d8fa3b80f2ffa51ced 100644
--- a/docs/build/html/binary_c_parameters.html
+++ b/docs/build/html/binary_c_parameters.html
@@ -30,6 +30,9 @@
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="_static/js/theme.js"></script>
 
@@ -37,7 +40,7 @@
     <link rel="index" title="Index" href="genindex.html" />
     <link rel="search" title="Search" href="search.html" />
     <link rel="next" title="Population grid code options" href="grid_options_descriptions.html" />
-    <link rel="prev" title="Example of population script" href="population_example.html" /> 
+    <link rel="prev" title="Using the API functionality of binarycpython" href="notebook_api_functionality.html" /> 
 </head>
 
 <body class="wy-body-for-nav">
@@ -86,7 +89,7 @@
 <ul class="current">
 <li class="toctree-l1"><a class="reference internal" href="readme_link.html">Python module for binary_c</a></li>
 <li class="toctree-l1"><a class="reference internal" href="modules.html">Binarycpython code</a></li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1 current"><a class="current reference internal" href="#">Binary_c parameters</a><ul>
 <li class="toctree-l2"><a class="reference internal" href="#section-stars">Section: stars</a></li>
 <li class="toctree-l2"><a class="reference internal" href="#section-binary">Section: binary</a></li>
@@ -166,11 +169,35 @@
           <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
            <div itemprop="articleBody">
             
-  <div class="section" id="binary-c-parameters">
+  
+<style>
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="binary-c-parameters">
 <h1>Binary_c parameters<a class="headerlink" href="#binary-c-parameters" title="Permalink to this headline">¶</a></h1>
 <p>The following chapter contains all the parameters that the current version of binary_c can handle, along with their descriptions and other properties.</p>
 <dl class="simple">
-<dt>This information was obtained by the following binary_c build:</dt><dd><p><strong>binary_c git branch</strong>: branch_david   <strong>binary_c git revision</strong>: 6044:20210720:d1ed5b6c1      <strong>Built on</strong>: Jul 20 2021 13:54:45</p>
+<dt>This information was obtained by the following binary_c build:</dt><dd><p><strong>binary_c git branch</strong>: branch_david   <strong>binary_c git revision</strong>: 6101:20210807:c5232be5c      <strong>Built on</strong>: Aug  7 2021 17:32:06</p>
 </dd>
 </dl>
 <div class="section" id="section-stars">
@@ -3433,7 +3460,7 @@
         <a href="grid_options_descriptions.html" class="btn btn-neutral float-right" title="Population grid code options" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
       
       
-        <a href="population_example.html" class="btn btn-neutral float-left" title="Example of population script" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+        <a href="notebook_api_functionality.html" class="btn btn-neutral float-left" title="Using the API functionality of binarycpython" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
       
     </div>
   
@@ -3456,9 +3483,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/custom_logging_functions.html b/docs/build/html/custom_logging_functions.html
index 3a5d93579b899bc01758d50501befcbbbb6a1707..ab21c59032571bb6f8a4ddb622d12f18dafae0d8 100644
--- a/docs/build/html/custom_logging_functions.html
+++ b/docs/build/html/custom_logging_functions.html
@@ -30,6 +30,9 @@
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="_static/js/theme.js"></script>
 
@@ -99,7 +102,7 @@
 <li class="toctree-l2"><a class="reference internal" href="useful_funcs.html">useful_funcs module</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -171,17 +174,41 @@
           <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
            <div itemprop="articleBody">
             
-  <div class="section" id="module-binarycpython.utils.custom_logging_functions">
+  
+<style>
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="module-binarycpython.utils.custom_logging_functions">
 <span id="custom-logging-functions-module"></span><h1>custom_logging_functions module<a class="headerlink" href="#module-binarycpython.utils.custom_logging_functions" title="Permalink to this headline">¶</a></h1>
 <p>Module containing functions for the custom logging functionality.
 The functions here make it possible for the user to define binaryc output logs on runtime</p>
 <dl class="py function">
 <dt id="binarycpython.utils.custom_logging_functions.autogen_C_logging_code">
-<code class="sig-prename descclassname">binarycpython.utils.custom_logging_functions.</code><code class="sig-name descname">autogen_C_logging_code</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">logging_dict</span></em>, <em class="sig-param"><span class="n">verbose</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/custom_logging_functions.html#autogen_C_logging_code"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.custom_logging_functions.autogen_C_logging_code" title="Permalink to this definition">¶</a></dt>
-<dd><p>Function that autogenerates PRINTF statements for binaryc.
+<code class="sig-prename descclassname">binarycpython.utils.custom_logging_functions.</code><code class="sig-name descname">autogen_C_logging_code</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">logging_dict</span></em>, <em class="sig-param"><span class="n">verbosity</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/custom_logging_functions.html#autogen_C_logging_code"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.custom_logging_functions.autogen_C_logging_code" title="Permalink to this definition">¶</a></dt>
+<dd><p>Function that auto-generates PRINTF statements for binaryc.
 Input is a dictionary where the key is the header of that logging line
 and items which are lists of parameters that will be put in that logging line</p>
-<p>The list elements are all appended to ‘stardata-&gt;’ in the autogenerated code.</p>
+<p>The list elements are all appended to ‘stardata-&gt;’ in the auto-generated code.</p>
 <p class="rubric">Example</p>
 <p>Input dictionary should look like this:</p>
 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="s1">&#39;MY_STELLAR_DATA&#39;</span><span class="p">:</span>
@@ -198,7 +225,7 @@ and items which are lists of parameters that will be put in that logging line</p
 <dt class="field-odd">Parameters</dt>
 <dd class="field-odd"><ul class="simple">
 <li><p><strong>logging_dict</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code>) – Dictionary containing lists of parameters that binary_c has to output. The keys are used by binary_c as start of the sentence.</p></li>
-<li><p><strong>verbose</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>) – Level of verbosity. Defaults to zero if not set explicilty.</p></li>
+<li><p><strong>verbose</strong> – Level of verbosity. Defaults to zero if not set explicitly.</p></li>
 </ul>
 </dd>
 <dt class="field-even">Return type</dt>
@@ -212,7 +239,7 @@ and items which are lists of parameters that will be put in that logging line</p
 
 <dl class="py function">
 <dt id="binarycpython.utils.custom_logging_functions.binary_c_log_code">
-<code class="sig-prename descclassname">binarycpython.utils.custom_logging_functions.</code><code class="sig-name descname">binary_c_log_code</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">code</span></em>, <em class="sig-param"><span class="n">verbose</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/custom_logging_functions.html#binary_c_log_code"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.custom_logging_functions.binary_c_log_code" title="Permalink to this definition">¶</a></dt>
+<code class="sig-prename descclassname">binarycpython.utils.custom_logging_functions.</code><code class="sig-name descname">binary_c_log_code</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">code</span></em>, <em class="sig-param"><span class="n">verbosity</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/custom_logging_functions.html#binary_c_log_code"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.custom_logging_functions.binary_c_log_code" title="Permalink to this definition">¶</a></dt>
 <dd><p>Function to construct the code to construct the custom logging function</p>
 <p class="rubric">Example</p>
 <p>Code to log and terminate evolution when the primary star becomes a NS:</p>
@@ -243,7 +270,7 @@ and items which are lists of parameters that will be put in that logging line</p
 <dt class="field-odd">Parameters</dt>
 <dd class="field-odd"><ul class="simple">
 <li><p><strong>code</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – Exact c-statement to output information in binary_c. Can be wrapped in logical statements.</p></li>
-<li><p><strong>verbose</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>) – Level of verbosity. Defaults to zero if not set explicilty.</p></li>
+<li><p><strong>verbosity</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>) – Level of verbosity. Defaults to zero if not set explicitly.</p></li>
 </ul>
 </dd>
 <dt class="field-even">Return type</dt>
@@ -257,14 +284,14 @@ and items which are lists of parameters that will be put in that logging line</p
 
 <dl class="py function">
 <dt id="binarycpython.utils.custom_logging_functions.binary_c_write_log_code">
-<code class="sig-prename descclassname">binarycpython.utils.custom_logging_functions.</code><code class="sig-name descname">binary_c_write_log_code</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">code</span></em>, <em class="sig-param"><span class="n">filename</span></em>, <em class="sig-param"><span class="n">verbose</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/custom_logging_functions.html#binary_c_write_log_code"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.custom_logging_functions.binary_c_write_log_code" title="Permalink to this definition">¶</a></dt>
+<code class="sig-prename descclassname">binarycpython.utils.custom_logging_functions.</code><code class="sig-name descname">binary_c_write_log_code</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">code</span></em>, <em class="sig-param"><span class="n">filename</span></em>, <em class="sig-param"><span class="n">verbosity</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/custom_logging_functions.html#binary_c_write_log_code"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.custom_logging_functions.binary_c_write_log_code" title="Permalink to this definition">¶</a></dt>
 <dd><p>Function to write the generated logging code to a file</p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
 <dd class="field-odd"><ul class="simple">
 <li><p><strong>code</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – string containing the custom logging code to write to a file.</p></li>
 <li><p><strong>filename</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – target filename.</p></li>
-<li><p><strong>verbose</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>) – Level of verbosity. Defaults to zero if not set explicilty.</p></li>
+<li><p><strong>verbosity</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>) – Level of verbosity. Defaults to zero if not set explicitly.</p></li>
 </ul>
 </dd>
 <dt class="field-even">Return type</dt>
@@ -275,7 +302,7 @@ and items which are lists of parameters that will be put in that logging line</p
 
 <dl class="py function">
 <dt id="binarycpython.utils.custom_logging_functions.compile_shared_lib">
-<code class="sig-prename descclassname">binarycpython.utils.custom_logging_functions.</code><code class="sig-name descname">compile_shared_lib</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">code</span></em>, <em class="sig-param"><span class="n">sourcefile_name</span></em>, <em class="sig-param"><span class="n">outfile_name</span></em>, <em class="sig-param"><span class="n">verbose</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/custom_logging_functions.html#compile_shared_lib"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.custom_logging_functions.compile_shared_lib" title="Permalink to this definition">¶</a></dt>
+<code class="sig-prename descclassname">binarycpython.utils.custom_logging_functions.</code><code class="sig-name descname">compile_shared_lib</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">code</span></em>, <em class="sig-param"><span class="n">sourcefile_name</span></em>, <em class="sig-param"><span class="n">outfile_name</span></em>, <em class="sig-param"><span class="n">verbosity</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/custom_logging_functions.html#compile_shared_lib"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.custom_logging_functions.compile_shared_lib" title="Permalink to this definition">¶</a></dt>
 <dd><p>Function to write the custom logging code to a file and then compile it.</p>
 <p>TODO: nicely put in the -fPIC
 TODO: consider returning a status</p>
@@ -285,7 +312,7 @@ TODO: consider returning a status</p>
 <li><p><strong>code</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – string containing the custom logging code</p></li>
 <li><p><strong>sourcefile_name</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – name of the file that will contain the code</p></li>
 <li><p><strong>outfile_name</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – name of the file that will be the shared library</p></li>
-<li><p><strong>verbose</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>) – Level of verbosity. Defaults to zero if not set explicilty.</p></li>
+<li><p><strong>verbosity</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>) – Level of verbosity. Defaults to zero if not set explicitly.</p></li>
 </ul>
 </dd>
 <dt class="field-even">Return type</dt>
@@ -296,7 +323,7 @@ TODO: consider returning a status</p>
 
 <dl class="py function">
 <dt id="binarycpython.utils.custom_logging_functions.create_and_load_logging_function">
-<code class="sig-prename descclassname">binarycpython.utils.custom_logging_functions.</code><code class="sig-name descname">create_and_load_logging_function</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">custom_logging_code</span></em>, <em class="sig-param"><span class="n">verbose</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">custom_tmp_dir</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/custom_logging_functions.html#create_and_load_logging_function"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.custom_logging_functions.create_and_load_logging_function" title="Permalink to this definition">¶</a></dt>
+<code class="sig-prename descclassname">binarycpython.utils.custom_logging_functions.</code><code class="sig-name descname">create_and_load_logging_function</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">custom_logging_code</span></em>, <em class="sig-param"><span class="n">verbosity</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">custom_tmp_dir</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/custom_logging_functions.html#create_and_load_logging_function"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.custom_logging_functions.create_and_load_logging_function" title="Permalink to this definition">¶</a></dt>
 <dd><p>Function to automatically compile the shared library with the given
 custom logging code and load it with ctypes.</p>
 <p>This function is more or less the main function of this module and unless you know what you’re doing with the other functions
@@ -305,14 +332,14 @@ I recommend using this in function in combination with a function that generates
 <dt class="field-odd">Parameters</dt>
 <dd class="field-odd"><ul class="simple">
 <li><p><strong>custom_logging_code</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – string containing the custom logging code</p></li>
-<li><p><strong>verbose</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>) – Level of verbosity. Defaults to zero if not set explicilty.</p></li>
+<li><p><strong>verbosity</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>) – Level of verbosity. Defaults to zero if not set explicitly.</p></li>
 </ul>
 </dd>
 <dt class="field-even">Return type</dt>
 <dd class="field-even"><p><code class="xref py py-data docutils literal notranslate"><span class="pre">Tuple</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]</p>
 </dd>
 <dt class="field-odd">Returns</dt>
-<dd class="field-odd"><p>memory adress of the custom logging function in a int type.</p>
+<dd class="field-odd"><p>memory address of the custom logging function in a capsule.</p>
 </dd>
 </dl>
 </dd></dl>
@@ -339,14 +366,14 @@ I recommend using this in function in combination with a function that generates
 
 <dl class="py function">
 <dt id="binarycpython.utils.custom_logging_functions.return_compilation_dict">
-<code class="sig-prename descclassname">binarycpython.utils.custom_logging_functions.</code><code class="sig-name descname">return_compilation_dict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">verbose</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/custom_logging_functions.html#return_compilation_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.custom_logging_functions.return_compilation_dict" title="Permalink to this definition">¶</a></dt>
+<code class="sig-prename descclassname">binarycpython.utils.custom_logging_functions.</code><code class="sig-name descname">return_compilation_dict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">verbosity</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/custom_logging_functions.html#return_compilation_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.custom_logging_functions.return_compilation_dict" title="Permalink to this definition">¶</a></dt>
 <dd><p>Function to build the compile command for the shared library</p>
-<p>Inspired by binary_c_inline_config command in perl</p>
-<p>TODO: this function still has some cleaning up to do wrt default values for the compile command
+<p>Inspired by binary_c_inline_config command in Perl</p>
+<p>TODO: this function still has some cleaning up to do w.r.t. default values for the compile command
 # <a class="reference external" href="https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/">https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/</a></p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
-<dd class="field-odd"><p><strong>verbose</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>) – Level of verbosity. Defaults to zero if not set explicilty.</p>
+<dd class="field-odd"><p><strong>verbosity</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>) – Level of verbosity. Defaults to zero if not set explicitly.</p>
 </dd>
 <dt class="field-even">Return type</dt>
 <dd class="field-even"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></p>
@@ -393,9 +420,9 @@ I recommend using this in function in combination with a function that generates
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/distribution_functions.html b/docs/build/html/distribution_functions.html
index 98fb7a3d044283c17d55ec1cb1bc76b5e7e9e1dd..7f5ad7906962abaf6fde311bca275cfd07fbd953 100644
--- a/docs/build/html/distribution_functions.html
+++ b/docs/build/html/distribution_functions.html
@@ -30,6 +30,9 @@
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="_static/js/theme.js"></script>
 
@@ -99,7 +102,7 @@
 <li class="toctree-l2"><a class="reference internal" href="useful_funcs.html">useful_funcs module</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -171,7 +174,31 @@
           <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
            <div itemprop="articleBody">
             
-  <div class="section" id="module-binarycpython.utils.distribution_functions">
+  
+<style>
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="module-binarycpython.utils.distribution_functions">
 <span id="distribution-functions-module"></span><h1>distribution_functions module<a class="headerlink" href="#module-binarycpython.utils.distribution_functions" title="Permalink to this headline">¶</a></h1>
 <p>Module containing the predefined distribution functions</p>
 <p>The user can use any of these distribution functions to
@@ -186,7 +213,7 @@ generate probability distributions for sampling populations</p>
 </dd>
 <dt>Tasks:</dt><dd><ul class="simple">
 <li><dl class="simple">
-<dt>TODO: make some things globally present? rob does this in his module..i guess it saves</dt><dd><p>calculations but not sure if im gonna do that now</p>
+<dt>TODO: make some things globally present? rob does this in his module..i guess it saves</dt><dd><p>calculations but not sure if I’m gonna do that now</p>
 </dd>
 </dl>
 </li>
@@ -194,7 +221,7 @@ generate probability distributions for sampling populations</p>
 <li><p>TODO: Add SFH distributions depending on redshift</p></li>
 <li><p>TODO: Add metallicity distributions depending on redshift</p></li>
 <li><p>TODO: Add initial rotational velocity distributions</p></li>
-<li><p>TODO: make an n-part powerlaw thats general enough to fix the three part and the 4 part</p></li>
+<li><p>TODO: make an n-part power law that’s general enough to fix the three part and the 4 part</p></li>
 </ul>
 </dd>
 </dl>
@@ -246,7 +273,7 @@ and Sana’s power law (as a function of logP) at high mass</p>
 <dl class="py function">
 <dt id="binarycpython.utils.distribution_functions.Kroupa2001">
 <code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">Kroupa2001</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">m</span></em>, <em class="sig-param"><span class="n">newopts</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#Kroupa2001"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.Kroupa2001" title="Permalink to this definition">¶</a></dt>
-<dd><p>Probability distribution function for kroupa 2001 IMF, where the default values to the
+<dd><p>Probability distribution function for Kroupa 2001 IMF, where the default values to the
 three_part_powerlaw are: default = {“m0”: 0.1, “m1”: 0.5, “m2”: 1, “mmax”: 100, “p1”: -1.3, “p2”: -2.3,”p3”: -2.3}</p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
@@ -265,10 +292,10 @@ three_part_powerlaw are: default = {“m0”: 0.1, “m1”: 0.5, “m2”: 1, 
 </dd></dl>
 
 <dl class="py function">
-<dt id="binarycpython.utils.distribution_functions.Moe_de_Stefano_2017_multiplicity_fractions">
-<code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">Moe_de_Stefano_2017_multiplicity_fractions</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">options</span></em>, <em class="sig-param"><span class="n">verbosity</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#Moe_de_Stefano_2017_multiplicity_fractions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.Moe_de_Stefano_2017_multiplicity_fractions" title="Permalink to this definition">¶</a></dt>
+<dt id="binarycpython.utils.distribution_functions.Moe_di_Stefano_2017_multiplicity_fractions">
+<code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">Moe_di_Stefano_2017_multiplicity_fractions</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">options</span></em>, <em class="sig-param"><span class="n">verbosity</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#Moe_di_Stefano_2017_multiplicity_fractions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.Moe_di_Stefano_2017_multiplicity_fractions" title="Permalink to this definition">¶</a></dt>
 <dd><p>Function that creates a list of probability fractions and
-normalizes and merges them according to the users choice.</p>
+normalises and merges them according to the users choice.</p>
 <p>TODO: make an extrapolation functionality in this. log10(1.6e1)
 is low, we can probably go a bit further</p>
 <p>The default result that is returned when sampling the mass outside
@@ -277,9 +304,9 @@ of the mass range is now the last known value</p>
 </dd></dl>
 
 <dl class="py function">
-<dt id="binarycpython.utils.distribution_functions.Moe_de_Stefano_2017_pdf">
-<code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">Moe_de_Stefano_2017_pdf</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">options</span></em>, <em class="sig-param"><span class="n">verbosity</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#Moe_de_Stefano_2017_pdf"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.Moe_de_Stefano_2017_pdf" title="Permalink to this definition">¶</a></dt>
-<dd><p>Moe &amp; distefano function to calculate the probability density.</p>
+<dt id="binarycpython.utils.distribution_functions.Moe_di_Stefano_2017_pdf">
+<code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">Moe_di_Stefano_2017_pdf</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">options</span></em>, <em class="sig-param"><span class="n">verbosity</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#Moe_di_Stefano_2017_pdf"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.Moe_di_Stefano_2017_pdf" title="Permalink to this definition">¶</a></dt>
+<dd><p>Moe &amp; diStefano function to calculate the probability density.</p>
 <p>takes a dictionary as input (in options) with options:</p>
 <p>M1, M2, M3, M4 =&gt; masses (Msun) [M1 required, rest optional]
 P, P2, P3 =&gt; periods (days) [number: none=binary, 2=triple, 3=quadruple]
@@ -297,14 +324,14 @@ mmax =&gt; maximum allowed stellar mass (default 80.0)</p>
 <dt id="binarycpython.utils.distribution_functions.calc_P_integral">
 <code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">calc_P_integral</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">options</span></em>, <em class="sig-param"><span class="n">min_P</span></em>, <em class="sig-param"><span class="n">integrals_string</span></em>, <em class="sig-param"><span class="n">interpolator_name</span></em>, <em class="sig-param"><span class="n">mass_string</span></em>, <em class="sig-param"><span class="n">verbosity</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#calc_P_integral"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.calc_P_integral" title="Permalink to this definition">¶</a></dt>
 <dd><p>Function to calculate the P integral</p>
-<p>We need to renormalize this because min_per &gt; 0, and not all periods should be included</p>
+<p>We need to renormalise this because min_per &gt; 0, and not all periods should be included</p>
 </dd></dl>
 
 <dl class="py function">
 <dt id="binarycpython.utils.distribution_functions.calc_e_integral">
 <code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">calc_e_integral</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">options</span></em>, <em class="sig-param"><span class="n">integrals_string</span></em>, <em class="sig-param"><span class="n">interpolator_name</span></em>, <em class="sig-param"><span class="n">mass_string</span></em>, <em class="sig-param"><span class="n">period_string</span></em>, <em class="sig-param"><span class="n">verbosity</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#calc_e_integral"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.calc_e_integral" title="Permalink to this definition">¶</a></dt>
 <dd><p>Function to calculate the P integral</p>
-<p>We need to renormalize this because min_per &gt; 0, and not all periods should be included</p>
+<p>We need to renormalise this because min_per &gt; 0, and not all periods should be included</p>
 </dd></dl>
 
 <dl class="py function">
@@ -316,8 +343,8 @@ mmax =&gt; maximum allowed stellar mass (default 80.0)</p>
 <dl class="py function">
 <dt id="binarycpython.utils.distribution_functions.calculate_constants_three_part_powerlaw">
 <code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">calculate_constants_three_part_powerlaw</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">m0</span></em>, <em class="sig-param"><span class="n">m1</span></em>, <em class="sig-param"><span class="n">m2</span></em>, <em class="sig-param"><span class="n">m_max</span></em>, <em class="sig-param"><span class="n">p1</span></em>, <em class="sig-param"><span class="n">p2</span></em>, <em class="sig-param"><span class="n">p3</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#calculate_constants_three_part_powerlaw"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.calculate_constants_three_part_powerlaw" title="Permalink to this definition">¶</a></dt>
-<dd><p>Function to calculate the constants for a three-part powerlaw</p>
-<p>TODO: use the powerlaw_constant function to calculate all these values</p>
+<dd><p>Function to calculate the constants for a three-part power law</p>
+<p>TODO: use the power law_constant function to calculate all these values</p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
 <dd class="field-odd"><ul class="simple">
@@ -368,7 +395,7 @@ mmax =&gt; maximum allowed stellar mass (default 80.0)</p>
 <dd class="field-odd"><p><strong>z</strong> – redshift</p>
 </dd>
 <dt class="field-even">Returns</dt>
-<dd class="field-even"><p>Cosmic star formation rate in Solarmass year^-1 megaparsec^-3</p>
+<dd class="field-even"><p>Cosmic star formation rate in Solar mass year^-1 mega parsec^-3</p>
 </dd>
 </dl>
 </dd></dl>
@@ -393,7 +420,7 @@ mmax =&gt; maximum allowed stellar mass (default 80.0)</p>
 <dl class="py function">
 <dt id="binarycpython.utils.distribution_functions.fill_data">
 <code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">fill_data</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sample_values</span></em>, <em class="sig-param"><span class="n">data_dict</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#fill_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.fill_data" title="Permalink to this definition">¶</a></dt>
-<dd><p>Function that returns the normalized array of values for given logmass and logperiod
+<dd><p>Function that returns the normalised array of values for given logmass and logperiod
 used for the e and q values</p>
 <p>TODO: make sure we do the correct thing with the dstep</p>
 </dd></dl>
@@ -440,8 +467,8 @@ used for the e and q values</p>
 <dt class="field-odd">Parameters</dt>
 <dd class="field-odd"><ul class="simple">
 <li><p><strong>x</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – location at which to evaluate the distribution</p></li>
-<li><p><strong>mean</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – mean of the gaussian</p></li>
-<li><p><strong>sigma</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – standard deviation of the gaussian</p></li>
+<li><p><strong>mean</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – mean of the Gaussian</p></li>
+<li><p><strong>sigma</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – standard deviation of the Gaussian</p></li>
 <li><p><strong>gmin</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – lower bound of the range to calculate the probabilities in</p></li>
 <li><p><strong>gmax</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – upper bound of the range to calculate the probabilities in</p></li>
 </ul>
@@ -450,7 +477,7 @@ used for the e and q values</p>
 <dd class="field-even"><p><code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]</p>
 </dd>
 <dt class="field-odd">Returns</dt>
-<dd class="field-odd"><p>‘probability’ of the gaussian distribution between the boundaries, evaluated at x</p>
+<dd class="field-odd"><p>‘probability’ of the Gaussian distribution between the boundaries, evaluated at x</p>
 </dd>
 </dl>
 </dd></dl>
@@ -458,20 +485,20 @@ used for the e and q values</p>
 <dl class="py function">
 <dt id="binarycpython.utils.distribution_functions.gaussian_func">
 <code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">gaussian_func</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">x</span></em>, <em class="sig-param"><span class="n">mean</span></em>, <em class="sig-param"><span class="n">sigma</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#gaussian_func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.gaussian_func" title="Permalink to this definition">¶</a></dt>
-<dd><p>Function to evaluate a gaussian at a given point, but this time without any boundaries.</p>
+<dd><p>Function to evaluate a Gaussian at a given point, but this time without any boundaries.</p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
 <dd class="field-odd"><ul class="simple">
 <li><p><strong>x</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – location at which to evaluate the distribution</p></li>
-<li><p><strong>mean</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – mean of the gaussian</p></li>
-<li><p><strong>sigma</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – standard deviation of the gaussian</p></li>
+<li><p><strong>mean</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – mean of the Gaussian</p></li>
+<li><p><strong>sigma</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – standard deviation of the Gaussian</p></li>
 </ul>
 </dd>
 <dt class="field-even">Return type</dt>
 <dd class="field-even"><p><code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]</p>
 </dd>
 <dt class="field-odd">Returns</dt>
-<dd class="field-odd"><p>value of the gaussian at x</p>
+<dd class="field-odd"><p>value of the Gaussian at x</p>
 </dd>
 </dl>
 </dd></dl>
@@ -479,12 +506,12 @@ used for the e and q values</p>
 <dl class="py function">
 <dt id="binarycpython.utils.distribution_functions.gaussian_normalizing_const">
 <code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">gaussian_normalizing_const</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mean</span></em>, <em class="sig-param"><span class="n">sigma</span></em>, <em class="sig-param"><span class="n">gmin</span></em>, <em class="sig-param"><span class="n">gmax</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#gaussian_normalizing_const"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.gaussian_normalizing_const" title="Permalink to this definition">¶</a></dt>
-<dd><p>Function to calculate the normalisation constant for the gaussian</p>
+<dd><p>Function to calculate the normalisation constant for the Gaussian</p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
 <dd class="field-odd"><ul class="simple">
-<li><p><strong>mean</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – mean of the gaussian</p></li>
-<li><p><strong>sigma</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – standard deviation of the gaussian</p></li>
+<li><p><strong>mean</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – mean of the Gaussian</p></li>
+<li><p><strong>sigma</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – standard deviation of the Gaussian</p></li>
 <li><p><strong>gmin</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – lower bound of the range to calculate the probabilities in</p></li>
 <li><p><strong>gmax</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – upper bound of the range to calculate the probabilities in</p></li>
 </ul>
@@ -493,7 +520,7 @@ used for the e and q values</p>
 <dd class="field-even"><p><code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]</p>
 </dd>
 <dt class="field-odd">Returns</dt>
-<dd class="field-odd"><p>normalisation constant for the gaussian distribution(mean, sigma) between gmin and gmax</p>
+<dd class="field-odd"><p>normalisation constant for the Gaussian distribution(mean, sigma) between gmin and gmax</p>
 </dd>
 </dl>
 </dd></dl>
@@ -547,7 +574,7 @@ used for the e and q values</p>
 <dl class="py function">
 <dt id="binarycpython.utils.distribution_functions.imf_scalo1998">
 <code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">imf_scalo1998</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">m</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#imf_scalo1998"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.imf_scalo1998" title="Permalink to this definition">¶</a></dt>
-<dd><p>From scalo 1998</p>
+<dd><p>From Scalo 1998</p>
 <p>Probability distribution function for Scalo 1998 IMF (defined up until 80Msol): three_part_powerlaw(m, 0.1, 1.0, 10.0, 80.0, -1.2, -2.7, -2.3)</p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
@@ -565,7 +592,7 @@ used for the e and q values</p>
 <dl class="py function">
 <dt id="binarycpython.utils.distribution_functions.imf_tinsley1980">
 <code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">imf_tinsley1980</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">m</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#imf_tinsley1980"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.imf_tinsley1980" title="Permalink to this definition">¶</a></dt>
-<dd><p>Probability distribution function for tinsley 1980 IMF (defined up until 80Msol): three_part_powerlaw(m, 0.1, 2.0, 10.0, 80.0, -2.0, -2.3, -3.3)</p>
+<dd><p>Probability distribution function for Tinsley 1980 IMF (defined up until 80Msol): three_part_powerlaw(m, 0.1, 2.0, 10.0, 80.0, -2.0, -2.3, -3.3)</p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
 <dd class="field-odd"><p><strong>m</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – mass to evaluate the distribution at</p>
@@ -647,7 +674,7 @@ low: at 1.15</p>
 <dl class="py function">
 <dt id="binarycpython.utils.distribution_functions.normalize_dict">
 <code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">normalize_dict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">result_dict</span></em>, <em class="sig-param"><span class="n">verbosity</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#normalize_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.normalize_dict" title="Permalink to this definition">¶</a></dt>
-<dd><p>Function to normalize a dictionary</p>
+<dd><p>Function to normalise a dictionary</p>
 </dd></dl>
 
 <dl class="py function">
@@ -670,19 +697,19 @@ low: at 1.15</p>
 <dl class="py function">
 <dt id="binarycpython.utils.distribution_functions.poisson">
 <code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">poisson</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">lambda_val</span></em>, <em class="sig-param"><span class="n">n</span></em>, <em class="sig-param"><span class="n">nmax</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">verbosity</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#poisson"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.poisson" title="Permalink to this definition">¶</a></dt>
-<dd><p>Function that calculates the poisson value and normalizes
+<dd><p>Function that calculates the Poisson value and normalises
 TODO: improve the description</p>
 </dd></dl>
 
 <dl class="py function">
 <dt id="binarycpython.utils.distribution_functions.powerlaw">
 <code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">powerlaw</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">min_val</span></em>, <em class="sig-param"><span class="n">max_val</span></em>, <em class="sig-param"><span class="n">k</span></em>, <em class="sig-param"><span class="n">x</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#powerlaw"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.powerlaw" title="Permalink to this definition">¶</a></dt>
-<dd><p>Single powerlaw with index k at x from min to max</p>
+<dd><p>Single power law with index k at x from min to max</p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
 <dd class="field-odd"><ul class="simple">
-<li><p><strong>min_val</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – lower bound of the powerlaw</p></li>
-<li><p><strong>max_val</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – upper bound of the powerlaw</p></li>
+<li><p><strong>min_val</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – lower bound of the power law</p></li>
+<li><p><strong>max_val</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – upper bound of the power law</p></li>
 <li><p><strong>k</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – slope of the power law</p></li>
 <li><p><strong>x</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – position at which we want to evaluate</p></li>
 </ul>
@@ -699,21 +726,21 @@ TODO: improve the description</p>
 <dl class="py function">
 <dt id="binarycpython.utils.distribution_functions.powerlaw_constant">
 <code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">powerlaw_constant</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">min_val</span></em>, <em class="sig-param"><span class="n">max_val</span></em>, <em class="sig-param"><span class="n">k</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#powerlaw_constant"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.powerlaw_constant" title="Permalink to this definition">¶</a></dt>
-<dd><p>Function that returns the constant to normalise a powerlaw</p>
+<dd><p>Function that returns the constant to normalise a power law</p>
 <p>TODO: what if k is -1?</p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
 <dd class="field-odd"><ul class="simple">
 <li><p><strong>min_val</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – lower bound of the range</p></li>
 <li><p><strong>max_val</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – upper bound of the range</p></li>
-<li><p><strong>k</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – powerlaw slope</p></li>
+<li><p><strong>k</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – power law slope</p></li>
 </ul>
 </dd>
 <dt class="field-even">Return type</dt>
 <dd class="field-even"><p><code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]</p>
 </dd>
 <dt class="field-odd">Returns</dt>
-<dd class="field-odd"><p>constant to normalize the given powerlaw between the min_val and max_val range</p>
+<dd class="field-odd"><p>constant to normalise the given power law between the min_val and max_val range</p>
 </dd>
 </dl>
 </dd></dl>
@@ -721,7 +748,7 @@ TODO: improve the description</p>
 <dl class="py function">
 <dt id="binarycpython.utils.distribution_functions.powerlaw_extrapolation_q">
 <code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">powerlaw_extrapolation_q</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">qdata</span></em>, <em class="sig-param"><span class="n">qs</span></em>, <em class="sig-param"><span class="n">indices</span></em>, <em class="sig-param"><span class="n">verbosity</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#powerlaw_extrapolation_q"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.powerlaw_extrapolation_q" title="Permalink to this definition">¶</a></dt>
-<dd><p>Function to do the powerlaw extrapolation at the lower end of the q range</p>
+<dd><p>Function to do the power law extrapolation at the lower end of the q range</p>
 </dd></dl>
 
 <dl class="py function">
@@ -729,11 +756,11 @@ TODO: improve the description</p>
 <code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">prepare_dict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">global_dict</span></em>, <em class="sig-param"><span class="n">list_of_sub_keys</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#prepare_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.prepare_dict" title="Permalink to this definition">¶</a></dt>
 <dd><p>Function that makes sure that the global dict is prepared to have a value set there.
 This dictionary will store values and factors for the distribution functions,
-so that they dont have to be calculated each time.</p>
+so that they don’t have to be calculated each time.</p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
 <dd class="field-odd"><ul class="simple">
-<li><p><strong>global_dict</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code>) – globablly acessible dictionary where factors are stored in</p></li>
+<li><p><strong>global_dict</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code>) – globally accessible dictionary where factors are stored in</p></li>
 <li><p><strong>list_of_sub_keys</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code>) – List of keys that must become be(come) present in the global_dict</p></li>
 </ul>
 </dd>
@@ -789,7 +816,7 @@ and is be given by dp/dlogP ~ (logP)^p for all other binary configurations (defa
 <li><p><strong>amax</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – maximum separation of the distribution (upper bound of the range)</p></li>
 <li><p><strong>x0</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – log of minimum period of the distribution (lower bound of the range)</p></li>
 <li><p><strong>x1</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – log of maximum period of the distribution (upper bound of the range)</p></li>
-<li><p><strong>p</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – slope of the distributoon</p></li>
+<li><p><strong>p</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]) – slope of the distribution</p></li>
 </ul>
 </dd>
 <dt class="field-even">Return type</dt>
@@ -825,7 +852,7 @@ and is be given by dp/dlogP ~ (logP)^p for all other binary configurations (defa
 <dl class="py function">
 <dt id="binarycpython.utils.distribution_functions.three_part_powerlaw">
 <code class="sig-prename descclassname">binarycpython.utils.distribution_functions.</code><code class="sig-name descname">three_part_powerlaw</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">m</span></em>, <em class="sig-param"><span class="n">m0</span></em>, <em class="sig-param"><span class="n">m1</span></em>, <em class="sig-param"><span class="n">m2</span></em>, <em class="sig-param"><span class="n">m_max</span></em>, <em class="sig-param"><span class="n">p1</span></em>, <em class="sig-param"><span class="n">p2</span></em>, <em class="sig-param"><span class="n">p3</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/distribution_functions.html#three_part_powerlaw"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.distribution_functions.three_part_powerlaw" title="Permalink to this definition">¶</a></dt>
-<dd><p>Generalized three-part power law, usually used for mass distributions</p>
+<dd><p>Generalised three-part power law, usually used for mass distributions</p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
 <dd class="field-odd"><ul class="simple">
@@ -884,9 +911,9 @@ and is be given by dp/dlogP ~ (logP)^p for all other binary configurations (defa
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/example_notebooks.html b/docs/build/html/example_notebooks.html
new file mode 100644
index 0000000000000000000000000000000000000000..e089e287635d37b63b99ac3588b528c57f29046d
--- /dev/null
+++ b/docs/build/html/example_notebooks.html
@@ -0,0 +1,291 @@
+
+
+<!DOCTYPE html>
+<html class="writer-html5" lang="en" >
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Example notebooks &mdash; binary_c-python  documentation</title>
+  
+
+  
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+
+  
+  
+  
+  
+
+  
+  <!--[if lt IE 9]>
+    <script src="_static/js/html5shiv.min.js"></script>
+  <![endif]-->
+  
+    
+      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
+        <script src="_static/jquery.js"></script>
+        <script src="_static/underscore.js"></script>
+        <script src="_static/doctools.js"></script>
+        <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
+    
+    <script type="text/javascript" src="_static/js/theme.js"></script>
+
+    
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Running individual systems with binarycpython" href="notebook_individual_systems.html" />
+    <link rel="prev" title="useful_funcs module" href="useful_funcs.html" /> 
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search" >
+          
+
+          
+            <a href="index.html" class="icon icon-home" alt="Documentation Home"> binary_c-python
+          
+
+          
+          </a>
+
+          
+            
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="readme_link.html">Python module for binary_c</a></li>
+<li class="toctree-l1"><a class="reference internal" href="modules.html">Binarycpython code</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Example notebooks</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="notebook_individual_systems.html">Running individual systems with binarycpython</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_custom_logging.html">Notebook custom logging</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_population.html">Running populations with binarycpython</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_extra_features.html">Extra features and functionality of binarycpython</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_api_functionality.html">Using the API functionality of binarycpython</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
+<li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
+<li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
+<li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/issues/new">Submit an issue</a></li>
+</ul>
+
+            
+          
+        </div>
+        
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="index.html">binary_c-python</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
+        
+      <li>Example notebooks</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="_sources/example_notebooks.rst.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  
+<style>
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="example-notebooks">
+<h1>Example notebooks<a class="headerlink" href="#example-notebooks" title="Permalink to this headline">¶</a></h1>
+<p>We have a set of notebooks that explain and show the usage of the binarycpython features. The notebooks are also stored in the examples/ directory in the <a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/master/examples">repository</a></p>
+<p>The order of the notebooks below is more or less the recommended order to read.</p>
+<div class="toctree-wrapper compound">
+<p class="caption"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="notebook_individual_systems.html">Running individual systems with binarycpython</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="notebook_individual_systems.html#Single-system-with-run_wrapper">Single system with run_wrapper</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_individual_systems.html#Single-system-via-population-object">Single system via population object</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_individual_systems.html#Single-system-via-API-functionality">Single system via API functionality</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="notebook_custom_logging.html">Notebook custom logging</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="notebook_custom_logging.html#Usage">Usage</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_custom_logging.html#Examples-of-logging-strings">Examples of logging strings</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="notebook_population.html">Running populations with binarycpython</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="notebook_population.html#Setting-up-the-Population-object">Setting up the Population object</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_population.html#Adding-grid-variables">Adding grid variables</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_population.html#Setting-logging-and-handling-the-output">Setting logging and handling the output</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_population.html#Evolving-the-grid">Evolving the grid</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_population.html#Noteworthy-functionality">Noteworthy functionality</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_population.html#Full-examples-of-population-scripts">Full examples of population scripts</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="notebook_extra_features.html">Extra features and functionality of binarycpython</a></li>
+<li class="toctree-l1"><a class="reference internal" href="notebook_api_functionality.html">Using the API functionality of binarycpython</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="notebook_api_functionality.html#Example-usage:">Example usage:</a></li>
+</ul>
+</li>
+</ul>
+</div>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="notebook_individual_systems.html" class="btn btn-neutral float-right" title="Running individual systems with binarycpython" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="useful_funcs.html" class="btn btn-neutral float-left" title="useful_funcs module" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        
+        &copy; Copyright 2021, David Hendriks, Robert Izzard
+
+    </p>
+  </div>
+    
+    
+    
+    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
+    
+    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
+    
+    provided by <a href="https://readthedocs.org">Read the Docs</a>.
+<br><br>
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
+<br><br>
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+
+
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script>
+
+  
+  
+    
+   
+
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/build/html/examples.html b/docs/build/html/examples.html
deleted file mode 100644
index 305fa05bec0932483bb154627702bccb92baa35a..0000000000000000000000000000000000000000
--- a/docs/build/html/examples.html
+++ /dev/null
@@ -1,232 +0,0 @@
-
-
-<!DOCTYPE html>
-<html class="writer-html5" lang="en" >
-<head>
-  <meta charset="utf-8">
-  
-  <meta name="viewport" content="width=device-width, initial-scale=1.0">
-  
-  <title>Examples &mdash; binary_c-python  documentation</title>
-  
-
-  
-  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
-  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
-
-  
-  
-  
-  
-
-  
-  <!--[if lt IE 9]>
-    <script src="_static/js/html5shiv.min.js"></script>
-  <![endif]-->
-  
-    
-      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
-        <script src="_static/jquery.js"></script>
-        <script src="_static/underscore.js"></script>
-        <script src="_static/doctools.js"></script>
-        <script src="_static/language_data.js"></script>
-    
-    <script type="text/javascript" src="_static/js/theme.js"></script>
-
-    
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
-    <link rel="next" title="Examples" href="general_examples.html" />
-    <link rel="prev" title="useful_funcs module" href="useful_funcs.html" /> 
-</head>
-
-<body class="wy-body-for-nav">
-
-   
-  <div class="wy-grid-for-nav">
-    
-    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
-      <div class="wy-side-scroll">
-        <div class="wy-side-nav-search" >
-          
-
-          
-            <a href="index.html" class="icon icon-home" alt="Documentation Home"> binary_c-python
-          
-
-          
-          </a>
-
-          
-            
-            
-          
-
-          
-<div role="search">
-  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
-    <input type="text" name="q" placeholder="Search docs" />
-    <input type="hidden" name="check_keywords" value="yes" />
-    <input type="hidden" name="area" value="default" />
-  </form>
-</div>
-
-          
-        </div>
-
-        
-        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
-          
-            
-            
-              
-            
-            
-              <p class="caption"><span class="caption-text">Contents:</span></p>
-<ul class="current">
-<li class="toctree-l1"><a class="reference internal" href="readme_link.html">Python module for binary_c</a></li>
-<li class="toctree-l1"><a class="reference internal" href="modules.html">Binarycpython code</a></li>
-<li class="toctree-l1 current"><a class="current reference internal" href="#">Examples</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="general_examples.html">Examples</a></li>
-<li class="toctree-l2"><a class="reference internal" href="population_example.html">Example of population script</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
-<li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
-<li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
-<li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/issues/new">Submit an issue</a></li>
-</ul>
-
-            
-          
-        </div>
-        
-      </div>
-    </nav>
-
-    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
-
-      
-      <nav class="wy-nav-top" aria-label="top navigation">
-        
-          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
-          <a href="index.html">binary_c-python</a>
-        
-      </nav>
-
-
-      <div class="wy-nav-content">
-        
-        <div class="rst-content">
-        
-          
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div role="navigation" aria-label="breadcrumbs navigation">
-
-  <ul class="wy-breadcrumbs">
-    
-      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
-        
-      <li>Examples</li>
-    
-    
-      <li class="wy-breadcrumbs-aside">
-        
-            
-            <a href="_sources/examples.rst.txt" rel="nofollow"> View page source</a>
-          
-        
-      </li>
-    
-  </ul>
-
-  
-  <hr/>
-</div>
-          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
-           <div itemprop="articleBody">
-            
-  <div class="section" id="examples">
-<h1>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h1>
-<p>This chapter contains the source code of example scripts which show the way of using certain functions</p>
-<div class="toctree-wrapper compound">
-</div>
-</div>
-
-
-           </div>
-           
-          </div>
-          <footer>
-  
-    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
-      
-        <a href="general_examples.html" class="btn btn-neutral float-right" title="Examples" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
-      
-      
-        <a href="useful_funcs.html" class="btn btn-neutral float-left" title="useful_funcs module" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
-      
-    </div>
-  
-
-  <hr/>
-
-  <div role="contentinfo">
-    <p>
-        
-        &copy; Copyright 2021, David Hendriks, Robert Izzard
-
-    </p>
-  </div>
-    
-    
-    
-    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
-    
-    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
-    
-    provided by <a href="https://readthedocs.org">Read the Docs</a>.
-<br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
-<br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
-
-
-
-</footer>
-
-        </div>
-      </div>
-
-    </section>
-
-  </div>
-  
-
-  <script type="text/javascript">
-      jQuery(function () {
-          SphinxRtdTheme.Navigation.enable(true);
-      });
-  </script>
-
-  
-  
-    
-   
-
-</body>
-</html>
\ No newline at end of file
diff --git a/docs/build/html/functions.html b/docs/build/html/functions.html
index 8c75c527e5afa6406ac1779aa1b61fa8d6bc78ce..6fb57785b457f49c1a3f714f6d7a15dca6b76514 100644
--- a/docs/build/html/functions.html
+++ b/docs/build/html/functions.html
@@ -30,6 +30,9 @@
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="_static/js/theme.js"></script>
 
@@ -99,7 +102,7 @@
 <li class="toctree-l2"><a class="reference internal" href="useful_funcs.html">useful_funcs module</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -171,7 +174,31 @@
           <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
            <div itemprop="articleBody">
             
-  <div class="section" id="module-binarycpython.utils.functions">
+  
+<style>
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="module-binarycpython.utils.functions">
 <span id="functions-module"></span><h1>functions module<a class="headerlink" href="#module-binarycpython.utils.functions" title="Permalink to this headline">¶</a></h1>
 <p>Module containing most of the utility functions for the binarycpython package</p>
 <p>Functions here are mostly functions used in other classes/functions, or
@@ -190,7 +217,7 @@ useful functions for the user</p>
 <dl class="py method">
 <dt id="binarycpython.utils.functions.BinaryCEncoder.default">
 <code class="sig-name descname">default</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">o</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/functions.html#BinaryCEncoder.default"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.functions.BinaryCEncoder.default" title="Permalink to this definition">¶</a></dt>
-<dd><p>Converting function. Well, could be more precise. look at the json module</p>
+<dd><p>Converting function. Well, could be more precise. look at the JSON module</p>
 </dd></dl>
 
 </dd></dl>
@@ -230,12 +257,12 @@ useful functions for the user</p>
 <dl class="py function">
 <dt id="binarycpython.utils.functions.binaryc_json_serializer">
 <code class="sig-prename descclassname">binarycpython.utils.functions.</code><code class="sig-name descname">binaryc_json_serializer</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/functions.html#binaryc_json_serializer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.functions.binaryc_json_serializer" title="Permalink to this definition">¶</a></dt>
-<dd><p>Custom serializer for binary_c to use when functions are present in the dictionary
+<dd><p>Custom serialiser for binary_c to use when functions are present in the dictionary
 that we want to export.</p>
 <p>Function objects will be turned into str representations of themselves</p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
-<dd class="field-odd"><p><strong>obj</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Any</span></code>) – The object that might not be serializable</p>
+<dd class="field-odd"><p><strong>obj</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Any</span></code>) – The object that might not be serialisable</p>
 </dd>
 <dt class="field-even">Return type</dt>
 <dd class="field-even"><p><code class="xref py py-data docutils literal notranslate"><span class="pre">Any</span></code></p>
@@ -330,7 +357,7 @@ This string is missing the ‘binary_c ‘ at the start.</p>
 </ul>
 </dd>
 </dl>
-<p>TODO: fix missing settingsfiles</p>
+<p>TODO: fix missing settings files</p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
 <dd class="field-odd"><ul class="simple">
@@ -363,7 +390,7 @@ detailed. Custom functions can be easier:</p>
 <p>This function works in two cases:
 if the caught line contains output like ‘example_header time=12.32 mass=0.94 ..’
 or if the line contains output like ‘example_header 12.32 0.94’
-Please dont the two cases.</p>
+Please don’t the two cases.</p>
 <p>You can give a ‘selected_header’ to catch any line that starts with that.
 Then the values will be put into a dictionary.</p>
 <dl class="simple">
@@ -403,7 +430,7 @@ process)</p></li>
 <dd class="field-even"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></p>
 </dd>
 <dt class="field-odd">Returns</dt>
-<dd class="field-odd"><p>json dictionary with the parsed ENSEMBLE_JSON data</p>
+<dd class="field-odd"><p>JSON dictionary with the parsed ENSEMBLE_JSON data</p>
 </dd>
 </dl>
 </dd></dl>
@@ -415,7 +442,7 @@ process)</p></li>
 <p>This function is called by get_defaults()</p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
-<dd class="field-odd"><p><strong>arg_dict</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code>) – dictionary containing the argument + default keypairs of binary_c</p>
+<dd class="field-odd"><p><strong>arg_dict</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code>) – dictionary containing the argument + default key pairs of binary_c</p>
 </dd>
 <dt class="field-even">Return type</dt>
 <dd class="field-even"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></p>
@@ -500,10 +527,10 @@ valid parameter name</p></li>
 <dl class="py function">
 <dt id="binarycpython.utils.functions.get_help_all">
 <code class="sig-prename descclassname">binarycpython.utils.functions.</code><code class="sig-name descname">get_help_all</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">print_help</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/functions.html#get_help_all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.functions.get_help_all" title="Permalink to this definition">¶</a></dt>
-<dd><p>Function that reads out the output of the return_help_all api call to binary_c. This return_help_all binary_c returns all the information for the parameters, their descriptions and other properties. The output is categorized in sections.</p>
+<dd><p>Function that reads out the output of the return_help_all API call to binary_c. This return_help_all binary_c returns all the information for the parameters, their descriptions and other properties. The output is categorised in sections.</p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
-<dd class="field-odd"><p><strong>print_help</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code>) – (optional, default = Tru) prints all the parameters and their descriptions.</p>
+<dd class="field-odd"><p><strong>print_help</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code>) – (optional, default = True) prints all the parameters and their descriptions.</p>
 </dd>
 <dt class="field-even">Return type</dt>
 <dd class="field-even"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></p>
@@ -536,9 +563,9 @@ the help function to get as much information as possible.</p>
 </dd></dl>
 
 <dl class="py function">
-<dt id="binarycpython.utils.functions.get_moe_distefano_dataset">
-<code class="sig-prename descclassname">binarycpython.utils.functions.</code><code class="sig-name descname">get_moe_distefano_dataset</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">options</span></em>, <em class="sig-param"><span class="n">verbosity</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/functions.html#get_moe_distefano_dataset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.functions.get_moe_distefano_dataset" title="Permalink to this definition">¶</a></dt>
-<dd><p>Function to get the default moe and Distefano dataset or accept a userinput.</p>
+<dt id="binarycpython.utils.functions.get_moe_di_stefano_dataset">
+<code class="sig-prename descclassname">binarycpython.utils.functions.</code><code class="sig-name descname">get_moe_di_stefano_dataset</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">options</span></em>, <em class="sig-param"><span class="n">verbosity</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/functions.html#get_moe_di_stefano_dataset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.functions.get_moe_di_stefano_dataset" title="Permalink to this definition">¶</a></dt>
+<dd><p>Function to get the default moe and di Stefano dataset or accept a user input.</p>
 </dd></dl>
 
 <dl class="py function">
@@ -606,7 +633,7 @@ it will return the type of what the value would be in the input_dict</p>
 <dl class="py function">
 <dt id="binarycpython.utils.functions.load_logfile">
 <code class="sig-prename descclassname">binarycpython.utils.functions.</code><code class="sig-name descname">load_logfile</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">logfile</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/functions.html#load_logfile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.functions.load_logfile" title="Permalink to this definition">¶</a></dt>
-<dd><p>Experimental function that parses the generated logfile of binary_c.</p>
+<dd><p>Experimental function that parses the generated log file of binary_c.</p>
 <p>This function is not finished and shouldn’t be used yet.</p>
 <dl class="simple">
 <dt>Tasks:</dt><dd><ul class="simple">
@@ -616,7 +643,7 @@ it will return the type of what the value would be in the input_dict</p>
 </dl>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
-<dd class="field-odd"><p><strong>logfile</strong> (<em>-</em>) – filename of the logfile you want to parse</p>
+<dd class="field-odd"><p><strong>logfile</strong> (<em>-</em>) – filename of the log file you want to parse</p>
 </dd>
 </dl>
 <p>Returns:</p>
@@ -685,7 +712,7 @@ it will return the type of what the value would be in the input_dict</p>
 <dl class="py function">
 <dt id="binarycpython.utils.functions.output_lines">
 <code class="sig-prename descclassname">binarycpython.utils.functions.</code><code class="sig-name descname">output_lines</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">output</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/functions.html#output_lines"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.functions.output_lines" title="Permalink to this definition">¶</a></dt>
-<dd><p>Function that outputs the lines that were recieved from the binary_c run, but now as an iterator.</p>
+<dd><p>Function that outputs the lines that were received from the binary_c run, but now as an iterator.</p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
 <dd class="field-odd"><p><strong>output</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – raw binary_c output</p>
@@ -738,7 +765,7 @@ Does not work with lists as values</p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
 <dd class="field-odd"><ul class="simple">
-<li><p><strong>file</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – full filepath to the file that will be removed.</p></li>
+<li><p><strong>file</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – full file path to the file that will be removed.</p></li>
 <li><p><strong>verbosity</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>) – current verbosity level (Optional)</p></li>
 </ul>
 </dd>
@@ -746,7 +773,7 @@ Does not work with lists as values</p>
 <dd class="field-even"><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></p>
 </dd>
 <dt class="field-odd">Returns</dt>
-<dd class="field-odd"><p>the path of a subdirectory called binary_c_python in the TMP of the filesystem</p>
+<dd class="field-odd"><p>the path of a sub directory called binary_c_python in the TMP of the file system</p>
 </dd>
 </dl>
 </dd></dl>
@@ -782,7 +809,7 @@ dictionary</p>
 <li><p>If the types are both dictionaries: call this function with the subdicts</p></li>
 </ul>
 </dd>
-<dt>WHen the keys are not of the same type:</dt><dd><ul class="simple">
+<dt>When the keys are not of the same type:</dt><dd><ul class="simple">
 <li><p>if the keys are all of numerical types</p></li>
 </ul>
 </dd>
@@ -819,7 +846,7 @@ If that results in an empty dict, the dict will be removed too.</p>
 <dl class="py function">
 <dt id="binarycpython.utils.functions.temp_dir">
 <code class="sig-prename descclassname">binarycpython.utils.functions.</code><code class="sig-name descname">temp_dir</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/functions.html#temp_dir"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.functions.temp_dir" title="Permalink to this definition">¶</a></dt>
-<dd><p>Function to create directory within the TMP directory of the filesystem</p>
+<dd><p>Function to create directory within the TMP directory of the file system</p>
 <p>Makes use of os.makedirs exist_ok which requires python 3.2+</p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
@@ -829,7 +856,7 @@ If that results in an empty dict, the dict will be removed too.</p>
 <dd class="field-even"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></p>
 </dd>
 <dt class="field-odd">Returns</dt>
-<dd class="field-odd"><p>the path of a subdirectory called binary_c_python in the TMP of the filesystem</p>
+<dd class="field-odd"><p>the path of a sub directory called binary_c_python in the TMP of the file system</p>
 </dd>
 </dl>
 </dd></dl>
@@ -903,7 +930,7 @@ Writes the results to a .rst file that can be included in the docs.</p>
 </dl>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
-<dd class="field-odd"><p><strong>output_file</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – name of the output .rst faile containing the ReStructuredText formatted output
+<dd class="field-odd"><p><strong>output_file</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – name of the output .rst file containing the ReStructuredText formatted output
 of all the binary_c parameters.</p>
 </dd>
 <dt class="field-even">Return type</dt>
@@ -948,9 +975,9 @@ of all the binary_c parameters.</p>
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/general_examples.html b/docs/build/html/general_examples.html
deleted file mode 100644
index d6937f484e5d5ca8e9eba24caaf0c6049461155d..0000000000000000000000000000000000000000
--- a/docs/build/html/general_examples.html
+++ /dev/null
@@ -1,691 +0,0 @@
-
-
-<!DOCTYPE html>
-<html class="writer-html5" lang="en" >
-<head>
-  <meta charset="utf-8">
-  
-  <meta name="viewport" content="width=device-width, initial-scale=1.0">
-  
-  <title>Examples &mdash; binary_c-python  documentation</title>
-  
-
-  
-  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
-  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
-
-  
-  
-  
-  
-
-  
-  <!--[if lt IE 9]>
-    <script src="_static/js/html5shiv.min.js"></script>
-  <![endif]-->
-  
-    
-      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
-        <script src="_static/jquery.js"></script>
-        <script src="_static/underscore.js"></script>
-        <script src="_static/doctools.js"></script>
-        <script src="_static/language_data.js"></script>
-    
-    <script type="text/javascript" src="_static/js/theme.js"></script>
-
-    
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
-    <link rel="next" title="Example of population script" href="population_example.html" />
-    <link rel="prev" title="Examples" href="examples.html" /> 
-</head>
-
-<body class="wy-body-for-nav">
-
-   
-  <div class="wy-grid-for-nav">
-    
-    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
-      <div class="wy-side-scroll">
-        <div class="wy-side-nav-search" >
-          
-
-          
-            <a href="index.html" class="icon icon-home" alt="Documentation Home"> binary_c-python
-          
-
-          
-          </a>
-
-          
-            
-            
-          
-
-          
-<div role="search">
-  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
-    <input type="text" name="q" placeholder="Search docs" />
-    <input type="hidden" name="check_keywords" value="yes" />
-    <input type="hidden" name="area" value="default" />
-  </form>
-</div>
-
-          
-        </div>
-
-        
-        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
-          
-            
-            
-              
-            
-            
-              <p class="caption"><span class="caption-text">Contents:</span></p>
-<ul class="current">
-<li class="toctree-l1"><a class="reference internal" href="readme_link.html">Python module for binary_c</a></li>
-<li class="toctree-l1"><a class="reference internal" href="modules.html">Binarycpython code</a></li>
-<li class="toctree-l1 current"><a class="reference internal" href="examples.html">Examples</a><ul class="current">
-<li class="toctree-l2 current"><a class="current reference internal" href="#">Examples</a></li>
-<li class="toctree-l2"><a class="reference internal" href="population_example.html">Example of population script</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
-<li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
-<li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
-<li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/issues/new">Submit an issue</a></li>
-</ul>
-
-            
-          
-        </div>
-        
-      </div>
-    </nav>
-
-    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
-
-      
-      <nav class="wy-nav-top" aria-label="top navigation">
-        
-          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
-          <a href="index.html">binary_c-python</a>
-        
-      </nav>
-
-
-      <div class="wy-nav-content">
-        
-        <div class="rst-content">
-        
-          
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div role="navigation" aria-label="breadcrumbs navigation">
-
-  <ul class="wy-breadcrumbs">
-    
-      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
-        
-          <li><a href="examples.html">Examples</a> &raquo;</li>
-        
-      <li>Examples</li>
-    
-    
-      <li class="wy-breadcrumbs-aside">
-        
-            
-            <a href="_sources/general_examples.rst.txt" rel="nofollow"> View page source</a>
-          
-        
-      </li>
-    
-  </ul>
-
-  
-  <hr/>
-</div>
-          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
-           <div itemprop="articleBody">
-            
-  <div class="section" id="examples">
-<h1>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h1>
-<p>The source code of the general examples.</p>
-<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>  1
-  2
-  3
-  4
-  5
-  6
-  7
-  8
-  9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="ch">#!/usr/bin/python3</span>
-<span class="kn">import</span> <span class="nn">os</span>
-<span class="kn">import</span> <span class="nn">sys</span>
-
-<span class="kn">from</span> <span class="nn">binarycpython</span> <span class="kn">import</span> <span class="n">_binary_c_bindings</span>
-
-<span class="kn">from</span> <span class="nn">binarycpython.utils.functions</span> <span class="kn">import</span> <span class="n">example_parse_output</span>
-<span class="kn">from</span> <span class="nn">binarycpython.utils.custom_logging_functions</span> <span class="kn">import</span> <span class="p">(</span>
-    <span class="n">autogen_C_logging_code</span><span class="p">,</span>
-    <span class="n">binary_c_log_code</span><span class="p">,</span>
-    <span class="n">create_and_load_logging_function</span><span class="p">,</span>
-<span class="p">)</span>
-<span class="kn">from</span> <span class="nn">binarycpython.utils.run_system_wrapper</span> <span class="kn">import</span> <span class="n">run_system</span>
-
-<span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">Very basic scripts to run a binary system and print the output.</span>
-
-<span class="sd">Use these as inspiration/base.</span>
-<span class="sd">&quot;&quot;&quot;</span>
-
-
-<span class="k">def</span> <span class="nf">run_example_binary</span><span class="p">():</span>
-    <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Function to run a binary system. Very basic approach which directly adresses the run_system(..) python-c wrapper function.</span>
-<span class="sd">    &quot;&quot;&quot;</span>
-
-    <span class="n">m1</span> <span class="o">=</span> <span class="mf">15.0</span>  <span class="c1"># Msun</span>
-    <span class="n">m2</span> <span class="o">=</span> <span class="mf">14.0</span>  <span class="c1"># Msun</span>
-    <span class="n">separation</span> <span class="o">=</span> <span class="mi">0</span>  <span class="c1"># 0 = ignored, use period</span>
-    <span class="n">orbital_period</span> <span class="o">=</span> <span class="mf">4530.0</span>  <span class="c1"># days</span>
-    <span class="n">eccentricity</span> <span class="o">=</span> <span class="mf">0.0</span>
-    <span class="n">metallicity</span> <span class="o">=</span> <span class="mf">0.02</span>
-    <span class="n">max_evolution_time</span> <span class="o">=</span> <span class="mi">15000</span>  <span class="c1"># Myr. You need to include this argument.</span>
-
-    <span class="c1">#</span>
-    <span class="n">argstring</span> <span class="o">=</span> <span class="s2">&quot;binary_c M_1 </span><span class="si">{m1}</span><span class="s2"> M_2 </span><span class="si">{m2}</span><span class="s2"> separation </span><span class="si">{separation}</span><span class="s2"> orbital_period </span><span class="si">{orbital_period}</span><span class="s2"> </span><span class="se">\</span>
-<span class="s2">        eccentricity </span><span class="si">{eccentricity}</span><span class="s2"> metallicity </span><span class="si">{metallicity}</span><span class="s2"> </span><span class="se">\</span>
-<span class="s2">        max_evolution_time </span><span class="si">{max_evolution_time}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
-        <span class="n">m1</span><span class="o">=</span><span class="n">m1</span><span class="p">,</span>
-        <span class="n">m2</span><span class="o">=</span><span class="n">m2</span><span class="p">,</span>
-        <span class="n">separation</span><span class="o">=</span><span class="n">separation</span><span class="p">,</span>
-        <span class="n">orbital_period</span><span class="o">=</span><span class="n">orbital_period</span><span class="p">,</span>
-        <span class="n">eccentricity</span><span class="o">=</span><span class="n">eccentricity</span><span class="p">,</span>
-        <span class="n">metallicity</span><span class="o">=</span><span class="n">metallicity</span><span class="p">,</span>
-        <span class="n">max_evolution_time</span><span class="o">=</span><span class="n">max_evolution_time</span><span class="p">,</span>
-    <span class="p">)</span>
-    <span class="n">output</span> <span class="o">=</span> <span class="n">_binary_c_bindings</span><span class="o">.</span><span class="n">run_system</span><span class="p">(</span><span class="n">argstring</span><span class="p">)</span>
-    <span class="nb">print</span><span class="p">(</span><span class="n">output</span><span class="p">)</span>
-
-
-<span class="n">run_example_binary</span><span class="p">()</span>
-
-
-<span class="k">def</span> <span class="nf">run_example_binary_with_run_system</span><span class="p">():</span>
-    <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    This function serves as an example on the function run_system and parse_output.</span>
-<span class="sd">    There is more functionality with this method and several tasks are done behind the scene.</span>
-
-<span class="sd">    Requires pandas, numpy to run.</span>
-
-<span class="sd">    run_system: mostly just makes passing arguments to the function easier. It also loads all the necessary defaults in the background</span>
-<span class="sd">    parse_output: Takes the raw output of binary_c and selects those lines that start with the given header.</span>
-<span class="sd">    Note, if you dont use the custom_logging functionality binary_c should be configured to have output that starts with that given header</span>
-
-<span class="sd">    The parsing of the output only works correctly if either all of the values are described inline like `mass=&lt;number&gt;&#39; or none of them are.</span>
-<span class="sd">    &quot;&quot;&quot;</span>
-
-    <span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>
-    <span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
-
-    <span class="c1"># Run system. all arguments can be given as optional arguments.</span>
-    <span class="n">output</span> <span class="o">=</span> <span class="n">run_system</span><span class="p">(</span><span class="n">M_1</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">M_2</span><span class="o">=</span><span class="mi">20</span><span class="p">,</span> <span class="n">separation</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">orbital_period</span><span class="o">=</span><span class="mi">100000000000</span><span class="p">)</span>
-
-    <span class="c1"># print(output)</span>
-
-    <span class="c1"># Catch results that start with a given header. (Mind that binary_c has to be configured to print them if your not using a custom logging function)</span>
-    <span class="n">result_example_header_1</span> <span class="o">=</span> <span class="n">example_parse_output</span><span class="p">(</span>
-        <span class="n">output</span><span class="p">,</span> <span class="n">selected_header</span><span class="o">=</span><span class="s2">&quot;example_header_1&quot;</span>
-    <span class="p">)</span>
-    <span class="n">result_example_header_2</span> <span class="o">=</span> <span class="n">example_parse_output</span><span class="p">(</span>
-        <span class="n">output</span><span class="p">,</span> <span class="n">selected_header</span><span class="o">=</span><span class="s2">&quot;example_header_2&quot;</span>
-    <span class="p">)</span>
-
-    <span class="c1"># print(result_example_header_1)</span>
-
-    <span class="c1">#### Now do whatever you want with it:</span>
-    <span class="c1"># Put it in numpy arrays</span>
-    <span class="c1"># t_res = np.asarray(result_example_header[&#39;t&#39;], dtype=np.float64, order=&#39;C&#39;)</span>
-    <span class="c1"># m_res = np.asarray(result_example_header[&#39;mass&#39;], dtype=np.float64, order=&#39;C&#39;)</span>
-
-    <span class="c1"># Or put them into a pandas array</span>
-
-    <span class="c1"># Cast the data into a dataframe.</span>
-    <span class="c1"># This example automatically catches the column names because the binary_c output line is constructed as &#39;example_header_1 time=&lt;number&gt;..&#39;</span>
-    <span class="nb">print</span><span class="p">(</span><span class="n">result_example_header_1</span><span class="p">)</span>
-    <span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="o">.</span><span class="n">from_dict</span><span class="p">(</span><span class="n">result_example_header_1</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">float64</span><span class="p">)</span>
-    <span class="nb">print</span><span class="p">(</span><span class="n">df</span><span class="p">)</span>
-
-    <span class="c1"># This example has column headers which are numbered, but we can override that with custom headers.</span>
-    <span class="n">df2</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="o">.</span><span class="n">from_dict</span><span class="p">(</span><span class="n">result_example_header_2</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">float64</span><span class="p">)</span>
-    <span class="n">df2</span><span class="o">.</span><span class="n">columns</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;time&quot;</span><span class="p">,</span> <span class="s2">&quot;mass_1&quot;</span><span class="p">,</span> <span class="s2">&quot;mass_2&quot;</span><span class="p">,</span> <span class="s2">&quot;st1&quot;</span><span class="p">,</span> <span class="s2">&quot;st2&quot;</span><span class="p">,</span> <span class="s2">&quot;sep&quot;</span><span class="p">,</span> <span class="s2">&quot;ecc&quot;</span><span class="p">]</span>
-    <span class="nb">print</span><span class="p">(</span><span class="n">df2</span><span class="p">)</span>
-
-    <span class="c1"># print(df)</span>
-    <span class="c1"># sliced_df = df[df.t &lt; 1000] # Cut off late parts of evolution</span>
-    <span class="c1"># print(sliced_df[[&quot;t&quot;,&quot;m1&quot;]])</span>
-
-    <span class="c1"># Some routine to plot.</span>
-
-
-<span class="c1"># run_example_binary_with_run_system()</span>
-
-
-<span class="k">def</span> <span class="nf">run_example_custom_logging_autogenerated</span><span class="p">():</span>
-    <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    This is an example function for the autogeneration of logging codes that binary_c uses.</span>
-<span class="sd">    &quot;&quot;&quot;</span>
-
-    <span class="c1"># generate logging lines</span>
-    <span class="n">logging_line</span> <span class="o">=</span> <span class="n">autogen_C_logging_code</span><span class="p">(</span>
-        <span class="p">{</span>
-            <span class="s2">&quot;MY_STELLAR_DATA&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;model.time&quot;</span><span class="p">,</span> <span class="s2">&quot;star[0].mass&quot;</span><span class="p">],</span>
-            <span class="s2">&quot;my_sss2&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;model.time&quot;</span><span class="p">,</span> <span class="s2">&quot;star[1].mass&quot;</span><span class="p">],</span>
-        <span class="p">}</span>
-    <span class="p">)</span>
-
-    <span class="c1"># Generate code around logging lines</span>
-    <span class="n">custom_logging_code</span> <span class="o">=</span> <span class="n">binary_c_log_code</span><span class="p">(</span><span class="n">logging_line</span><span class="p">)</span>
-
-    <span class="c1"># Generate library and get memaddr</span>
-    <span class="n">func_memaddr</span><span class="p">,</span> <span class="n">shared_lib_filename</span> <span class="o">=</span> <span class="n">create_and_load_logging_function</span><span class="p">(</span>
-        <span class="n">custom_logging_code</span>
-    <span class="p">)</span>
-
-    <span class="c1">#</span>
-    <span class="n">m1</span> <span class="o">=</span> <span class="mf">15.0</span>  <span class="c1"># Msun</span>
-    <span class="n">m2</span> <span class="o">=</span> <span class="mf">14.0</span>  <span class="c1"># Msun</span>
-    <span class="n">separation</span> <span class="o">=</span> <span class="mi">0</span>  <span class="c1"># 0 = ignored, use period</span>
-    <span class="n">orbital_period</span> <span class="o">=</span> <span class="mf">4530.0</span>  <span class="c1"># days</span>
-    <span class="n">eccentricity</span> <span class="o">=</span> <span class="mf">0.0</span>
-    <span class="n">metallicity</span> <span class="o">=</span> <span class="mf">0.02</span>
-    <span class="n">max_evolution_time</span> <span class="o">=</span> <span class="mi">15000</span>
-    <span class="n">argstring</span> <span class="o">=</span> <span class="s2">&quot;binary_c M_1 </span><span class="si">{0:g}</span><span class="s2"> M_2 </span><span class="si">{1:g}</span><span class="s2"> separation </span><span class="si">{2:g}</span><span class="s2"> orbital_period </span><span class="si">{3:g}</span><span class="s2"> eccentricity </span><span class="si">{4:g}</span><span class="s2"> metallicity </span><span class="si">{5:g}</span><span class="s2"> max_evolution_time </span><span class="si">{6:g}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
-        <span class="n">m1</span><span class="p">,</span>
-        <span class="n">m2</span><span class="p">,</span>
-        <span class="n">separation</span><span class="p">,</span>
-        <span class="n">orbital_period</span><span class="p">,</span>
-        <span class="n">eccentricity</span><span class="p">,</span>
-        <span class="n">metallicity</span><span class="p">,</span>
-        <span class="n">max_evolution_time</span><span class="p">,</span>
-    <span class="p">)</span>
-    <span class="n">output</span> <span class="o">=</span> <span class="n">_binary_c_bindings</span><span class="o">.</span><span class="n">run_system</span><span class="p">(</span>
-        <span class="n">argstring</span><span class="p">,</span> <span class="n">custom_logging_func_memaddr</span><span class="o">=</span><span class="n">func_memaddr</span>
-    <span class="p">)</span>
-    <span class="nb">print</span><span class="p">(</span><span class="n">output</span><span class="p">)</span>
-
-
-<span class="c1"># run_example_custom_logging_autogenerated()</span>
-
-
-<span class="k">def</span> <span class="nf">run_example_binary_with_custom_logging</span><span class="p">():</span>
-    <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Function that will use a automatically generated piece of logging code. Compile it, load it</span>
-<span class="sd">    into memory and run a binary system. See run_system on how several things are done in the background here.</span>
-<span class="sd">    &quot;&quot;&quot;</span>
-
-    <span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>
-    <span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
-
-    <span class="c1"># generate logging lines. Here you can choose whatever you want to have logged, and with what header</span>
-    <span class="c1"># this generates working print statements</span>
-    <span class="n">logging_line</span> <span class="o">=</span> <span class="n">autogen_C_logging_code</span><span class="p">(</span>
-        <span class="p">{</span>
-            <span class="s2">&quot;MY_STELLAR_DATA&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;model.time&quot;</span><span class="p">,</span> <span class="s2">&quot;star[0].mass&quot;</span><span class="p">],</span>
-        <span class="p">}</span>
-    <span class="p">)</span>
-    <span class="c1"># OR</span>
-    <span class="c1"># You can also decide to `write` your own logging_line, which allows you to write a more complex logging statement with conditionals.</span>
-    <span class="n">logging_line</span> <span class="o">=</span> <span class="s1">&#39;Printf(&quot;MY_STELLAR_DATA time=</span><span class="si">%g</span><span class="s1"> mass=</span><span class="si">%g</span><span class="se">\\</span><span class="s1">n&quot;, stardata-&gt;model.time, stardata-&gt;star[0].mass)&#39;</span>
-
-    <span class="c1"># Generate entire shared lib code around logging lines</span>
-    <span class="n">custom_logging_code</span> <span class="o">=</span> <span class="n">binary_c_log_code</span><span class="p">(</span><span class="n">logging_line</span><span class="p">)</span>
-
-    <span class="c1"># Run system. all arguments can be given as optional arguments. the custom_logging_code is one of them and will be processed automatically.</span>
-    <span class="n">output</span> <span class="o">=</span> <span class="n">run_system</span><span class="p">(</span>
-        <span class="n">M_1</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
-        <span class="n">metallicity</span><span class="o">=</span><span class="mf">0.002</span><span class="p">,</span>
-        <span class="n">M_2</span><span class="o">=</span><span class="mf">0.1</span><span class="p">,</span>
-        <span class="n">separation</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span>
-        <span class="n">orbital_period</span><span class="o">=</span><span class="mi">100000000000</span><span class="p">,</span>
-        <span class="n">custom_logging_code</span><span class="o">=</span><span class="n">custom_logging_code</span><span class="p">,</span>
-    <span class="p">)</span>
-
-    <span class="nb">print</span><span class="p">(</span><span class="n">output</span><span class="p">)</span>
-
-    <span class="c1"># Catch results that start with a given header. (Mind that binary_c has to be configured to print them if your not using a custom logging function)</span>
-    <span class="c1"># DOESNT WORK YET if you have the line autogenerated.</span>
-    <span class="n">result_example_header</span> <span class="o">=</span> <span class="n">parse_output</span><span class="p">(</span><span class="n">output</span><span class="p">,</span> <span class="s2">&quot;MY_STELLAR_DATA&quot;</span><span class="p">)</span>
-
-    <span class="c1"># Cast the data into a dataframe.</span>
-    <span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="o">.</span><span class="n">from_dict</span><span class="p">(</span><span class="n">result_example_header</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">float64</span><span class="p">)</span>
-
-    <span class="c1"># Do whatever you like with the dataframe.</span>
-    <span class="nb">print</span><span class="p">(</span><span class="n">df</span><span class="p">)</span>
-
-
-<span class="c1"># run_example_binary_with_custom_logging()</span>
-
-
-<span class="k">def</span> <span class="nf">run_example_binary_with_writing_logfile</span><span class="p">():</span>
-    <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Same as above but when giving the log_filename argument the log filename will be written</span>
-<span class="sd">    &quot;&quot;&quot;</span>
-
-    <span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>
-    <span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
-    <span class="kn">import</span> <span class="nn">tempfile</span>
-
-    <span class="c1"># Run system. all arguments can be given as optional arguments.</span>
-    <span class="n">output</span> <span class="o">=</span> <span class="n">run_system</span><span class="p">(</span>
-        <span class="n">M_1</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span>
-        <span class="n">M_2</span><span class="o">=</span><span class="mi">20</span><span class="p">,</span>
-        <span class="n">separation</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span>
-        <span class="n">orbital_period</span><span class="o">=</span><span class="mi">100000000000</span><span class="p">,</span>
-        <span class="n">log_filename</span><span class="o">=</span><span class="n">tempfile</span><span class="o">.</span><span class="n">gettempdir</span><span class="p">()</span> <span class="o">+</span> <span class="s2">&quot;/test_log.txt&quot;</span><span class="p">,</span>
-    <span class="p">)</span>
-
-
-<span class="n">run_example_binary_with_writing_logfile</span><span class="p">()</span>
-</pre></div>
-</td></tr></table></div>
-</div>
-
-
-           </div>
-           
-          </div>
-          <footer>
-  
-    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
-      
-        <a href="population_example.html" class="btn btn-neutral float-right" title="Example of population script" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
-      
-      
-        <a href="examples.html" class="btn btn-neutral float-left" title="Examples" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
-      
-    </div>
-  
-
-  <hr/>
-
-  <div role="contentinfo">
-    <p>
-        
-        &copy; Copyright 2021, David Hendriks, Robert Izzard
-
-    </p>
-  </div>
-    
-    
-    
-    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
-    
-    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
-    
-    provided by <a href="https://readthedocs.org">Read the Docs</a>.
-<br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
-<br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
-
-
-
-</footer>
-
-        </div>
-      </div>
-
-    </section>
-
-  </div>
-  
-
-  <script type="text/javascript">
-      jQuery(function () {
-          SphinxRtdTheme.Navigation.enable(true);
-      });
-  </script>
-
-  
-  
-    
-   
-
-</body>
-</html>
\ No newline at end of file
diff --git a/docs/build/html/genindex.html b/docs/build/html/genindex.html
index 1a2f3c368278e4a138d560247dea2634ec62f7e4..99325fce36daf25649d5d4bd1837da05a0741346 100644
--- a/docs/build/html/genindex.html
+++ b/docs/build/html/genindex.html
@@ -30,6 +30,9 @@
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="_static/js/theme.js"></script>
 
@@ -84,7 +87,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="readme_link.html">Python module for binary_c</a></li>
 <li class="toctree-l1"><a class="reference internal" href="modules.html">Binarycpython code</a></li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -382,8 +385,6 @@
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%; vertical-align: top;"><ul>
       <li><a href="grid.html#binarycpython.utils.grid.Population.evolve">evolve() (binarycpython.utils.grid.Population method)</a>
-</li>
-      <li><a href="grid.html#binarycpython.utils.grid.Population.evolve_population">evolve_population() (binarycpython.utils.grid.Population method)</a>
 </li>
       <li><a href="grid.html#binarycpython.utils.grid.Population.evolve_single">evolve_single() (binarycpython.utils.grid.Population method)</a>
 </li>
@@ -443,11 +444,9 @@
 </li>
       <li><a href="distribution_functions.html#binarycpython.utils.distribution_functions.get_max_multiplicity">get_max_multiplicity() (in module binarycpython.utils.distribution_functions)</a>
 </li>
-      <li><a href="functions.html#binarycpython.utils.functions.get_moe_distefano_dataset">get_moe_distefano_dataset() (in module binarycpython.utils.functions)</a>
+      <li><a href="functions.html#binarycpython.utils.functions.get_moe_di_stefano_dataset">get_moe_di_stefano_dataset() (in module binarycpython.utils.functions)</a>
 </li>
       <li><a href="functions.html#binarycpython.utils.functions.get_size">get_size() (in module binarycpython.utils.functions)</a>
-</li>
-      <li><a href="grid.html#binarycpython.utils.grid.Population.get_stream_logger">get_stream_logger() (binarycpython.utils.grid.Population method)</a>
 </li>
       <li><a href="grid_options_defaults.html#binarycpython.utils.grid_options_defaults.grid_options_description_checker">grid_options_description_checker() (in module binarycpython.utils.grid_options_defaults)</a>
 </li>
@@ -505,12 +504,10 @@
 <h2 id="L">L</h2>
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%; vertical-align: top;"><ul>
-      <li><a href="grid.html#binarycpython.utils.grid.Population.last_grid_variable">last_grid_variable() (binarycpython.utils.grid.Population method)</a>
+      <li><a href="distribution_functions.html#binarycpython.utils.distribution_functions.linear_extrapolation_q">linear_extrapolation_q() (in module binarycpython.utils.distribution_functions)</a>
 </li>
   </ul></td>
   <td style="width: 33%; vertical-align: top;"><ul>
-      <li><a href="distribution_functions.html#binarycpython.utils.distribution_functions.linear_extrapolation_q">linear_extrapolation_q() (in module binarycpython.utils.distribution_functions)</a>
-</li>
       <li><a href="functions.html#binarycpython.utils.functions.load_logfile">load_logfile() (in module binarycpython.utils.functions)</a>
 </li>
   </ul></td>
@@ -560,11 +557,11 @@
       </ul></li>
   </ul></td>
   <td style="width: 33%; vertical-align: top;"><ul>
-      <li><a href="grid.html#binarycpython.utils.grid.Population.Moe_de_Stefano_2017">Moe_de_Stefano_2017() (binarycpython.utils.grid.Population method)</a>
+      <li><a href="grid.html#binarycpython.utils.grid.Population.Moe_di_Stefano_2017">Moe_di_Stefano_2017() (binarycpython.utils.grid.Population method)</a>
 </li>
-      <li><a href="distribution_functions.html#binarycpython.utils.distribution_functions.Moe_de_Stefano_2017_multiplicity_fractions">Moe_de_Stefano_2017_multiplicity_fractions() (in module binarycpython.utils.distribution_functions)</a>
+      <li><a href="distribution_functions.html#binarycpython.utils.distribution_functions.Moe_di_Stefano_2017_multiplicity_fractions">Moe_di_Stefano_2017_multiplicity_fractions() (in module binarycpython.utils.distribution_functions)</a>
 </li>
-      <li><a href="distribution_functions.html#binarycpython.utils.distribution_functions.Moe_de_Stefano_2017_pdf">Moe_de_Stefano_2017_pdf() (in module binarycpython.utils.distribution_functions)</a>
+      <li><a href="distribution_functions.html#binarycpython.utils.distribution_functions.Moe_di_Stefano_2017_pdf">Moe_di_Stefano_2017_pdf() (in module binarycpython.utils.distribution_functions)</a>
 </li>
       <li><a href="functions.html#binarycpython.utils.functions.multiply_values_dict">multiply_values_dict() (in module binarycpython.utils.functions)</a>
 </li>
@@ -645,11 +642,17 @@
       <li><a href="functions.html#binarycpython.utils.functions.remove_file">remove_file() (in module binarycpython.utils.functions)</a>
 </li>
       <li><a href="grid.html#binarycpython.utils.grid.Population.return_all_info">return_all_info() (binarycpython.utils.grid.Population method)</a>
+</li>
+      <li><a href="grid.html#binarycpython.utils.grid.Population.return_binary_c_defaults">return_binary_c_defaults() (binarycpython.utils.grid.Population method)</a>
 </li>
   </ul></td>
   <td style="width: 33%; vertical-align: top;"><ul>
-      <li><a href="functions.html#binarycpython.utils.functions.return_binary_c_version_info">return_binary_c_version_info() (in module binarycpython.utils.functions)</a>
+      <li><a href="grid.html#binarycpython.utils.grid.Population.return_binary_c_version_info">return_binary_c_version_info() (binarycpython.utils.grid.Population method)</a>
+
+      <ul>
+        <li><a href="functions.html#binarycpython.utils.functions.return_binary_c_version_info">(in module binarycpython.utils.functions)</a>
 </li>
+      </ul></li>
       <li><a href="custom_logging_functions.html#binarycpython.utils.custom_logging_functions.return_compilation_dict">return_compilation_dict() (in module binarycpython.utils.custom_logging_functions)</a>
 </li>
       <li><a href="grid.html#binarycpython.utils.grid.Population.return_population_settings">return_population_settings() (binarycpython.utils.grid.Population method)</a>
@@ -669,16 +672,14 @@
       <li><a href="distribution_functions.html#binarycpython.utils.distribution_functions.sana12">sana12() (in module binarycpython.utils.distribution_functions)</a>
 </li>
       <li><a href="grid.html#binarycpython.utils.grid.Population.set">set() (binarycpython.utils.grid.Population method)</a>
-</li>
-      <li><a href="grid.html#binarycpython.utils.grid.Population.set_moe_distefano_settings">set_moe_distefano_settings() (binarycpython.utils.grid.Population method)</a>
 </li>
   </ul></td>
   <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="grid.html#binarycpython.utils.grid.Population.set_moe_di_stefano_settings">set_moe_di_stefano_settings() (binarycpython.utils.grid.Population method)</a>
+</li>
       <li><a href="distribution_functions.html#binarycpython.utils.distribution_functions.set_opts">set_opts() (in module binarycpython.utils.distribution_functions)</a>
 </li>
       <li><a href="functions.html#binarycpython.utils.functions.subtract_dicts">subtract_dicts() (in module binarycpython.utils.functions)</a>
-</li>
-      <li><a href="grid.html#binarycpython.utils.grid.Population.system_queue_filler">system_queue_filler() (binarycpython.utils.grid.Population method)</a>
 </li>
   </ul></td>
 </tr></table>
@@ -759,9 +760,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/grid.html b/docs/build/html/grid.html
index c894bac07a591f9319773aed58619f9a06e31f30..678f92ce05829d11539e825533709c8e9239b57e 100644
--- a/docs/build/html/grid.html
+++ b/docs/build/html/grid.html
@@ -30,6 +30,9 @@
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="_static/js/theme.js"></script>
 
@@ -99,7 +102,7 @@
 <li class="toctree-l2"><a class="reference internal" href="useful_funcs.html">useful_funcs module</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -171,7 +174,31 @@
           <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
            <div itemprop="articleBody">
             
-  <div class="section" id="module-binarycpython.utils.grid">
+  
+<style>
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="module-binarycpython.utils.grid">
 <span id="grid-class-module"></span><h1>grid_class module<a class="headerlink" href="#module-binarycpython.utils.grid" title="Permalink to this headline">¶</a></h1>
 <p>Module containing the Population grid class object.</p>
 <p>Here all the functionality of a Population object is defined.</p>
@@ -204,11 +231,11 @@ but copying functionality isn’t recommended except if you know what you are do
 <p>Population Object. Contains all the necessary functions to set up, run and process a
 population of systems</p>
 <dl class="py method">
-<dt id="binarycpython.utils.grid.Population.Moe_de_Stefano_2017">
-<code class="sig-name descname">Moe_de_Stefano_2017</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">options</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid.html#Population.Moe_de_Stefano_2017"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid.Population.Moe_de_Stefano_2017" title="Permalink to this definition">¶</a></dt>
+<dt id="binarycpython.utils.grid.Population.Moe_di_Stefano_2017">
+<code class="sig-name descname">Moe_di_Stefano_2017</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">options</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid.html#Population.Moe_di_Stefano_2017"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid.Population.Moe_di_Stefano_2017" title="Permalink to this definition">¶</a></dt>
 <dd><p>Function to handle setting the user input settings,
 set up the data and load that into interpolators and
-and then set the distribution functions</p>
+then set the distribution functions</p>
 <p>Takes a dictionary as its only argument</p>
 </dd></dl>
 
@@ -216,7 +243,7 @@ and then set the distribution functions</p>
 <dt id="binarycpython.utils.grid.Population.add_grid_variable">
 <code class="sig-name descname">add_grid_variable</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em>, <em class="sig-param"><span class="n">longname</span></em>, <em class="sig-param"><span class="n">valuerange</span></em>, <em class="sig-param"><span class="n">resolution</span></em>, <em class="sig-param"><span class="n">spacingfunc</span></em>, <em class="sig-param"><span class="n">probdist</span></em>, <em class="sig-param"><span class="n">dphasevol</span></em>, <em class="sig-param"><span class="n">parameter_name</span></em>, <em class="sig-param"><span class="n">gridtype</span><span class="o">=</span><span class="default_value">'edge'</span></em>, <em class="sig-param"><span class="n">branchpoint</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">precode</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">condition</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid.html#Population.add_grid_variable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid.Population.add_grid_variable" title="Permalink to this definition">¶</a></dt>
 <dd><p>Function to add grid variables to the grid_options.</p>
-<p>The execution of the grid generation will be through a nested forloop.
+<p>The execution of the grid generation will be through a nested for loop.
 Each of the grid variables will get create a deeper for loop.</p>
 <p>The real function that generates the numbers will get written to a new file in the TMP_DIR,
 and then loaded imported and evaluated.
@@ -261,7 +288,7 @@ sampling function (i.e. a value for lnm1 is chosen already)</p>
 <p class="rubric">Examples</p>
 <p>precode = ‘M_1=math.exp(lnm1);’</p>
 </p></li>
-<li><p><strong>probdist</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – <p>FUnction determining the probability that gets asigned to the sampled parameter</p>
+<li><p><strong>probdist</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – <p>Function determining the probability that gets assigned to the sampled parameter</p>
 <p class="rubric">Examples</p>
 <p>probdist = ‘Kroupa2001(M_1)*M_1’</p>
 </p></li>
@@ -288,12 +315,12 @@ the lower edge of the value range) or ‘center’
 <dl class="py method">
 <dt id="binarycpython.utils.grid.Population.evolve">
 <code class="sig-name descname">evolve</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid.html#Population.evolve"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid.Population.evolve" title="Permalink to this definition">¶</a></dt>
-<dd><p>Entrypoint function of the whole object. From here, based on the settings,
+<dd><p>Entry point function of the whole object. From here, based on the settings,
 we set up a SLURM or CONDOR grid, or if no setting is given we go straight
 to evolving the population</p>
 <dl class="simple">
-<dt>There are no direct arguments to this function, rather it is based on the grid_options settings:</dt><dd><p>grid_options[‘slurm’]: integer boolean whether to use a slurm_grid evolution
-grid_options[‘condor’]: integer boolean whether to use a condor_grid evolution</p>
+<dt>There are no direct arguments to this function, rather it is based on the grid_options settings:</dt><dd><p>grid_options[‘slurm’]: integer Boolean whether to use a slurm_grid evolution
+grid_options[‘condor’]: integer Boolean whether to use a condor_grid evolution</p>
 </dd>
 </dl>
 <p>If neither of the above is set, we continue without using HPC routines
@@ -307,22 +334,6 @@ TODO: change the way this is done. Slurm &amp; CONDOR should probably do this di
 </dl>
 </dd></dl>
 
-<dl class="py method">
-<dt id="binarycpython.utils.grid.Population.evolve_population">
-<code class="sig-name descname">evolve_population</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid.html#Population.evolve_population"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid.Population.evolve_population" title="Permalink to this definition">¶</a></dt>
-<dd><p>Function to evolve populations. This handles the setting up, evolving
-and cleaning up of a population of stars.</p>
-<dl class="simple">
-<dt>Choices here are:</dt><dd><p>to evolve a population via multiprocessing or linearly on 1 core.
-NOT IMPLEMENTED YET to evolve a population via a variable grid, a source file or MC</p>
-</dd>
-<dt>Tasks:</dt><dd><ul class="simple">
-<li><p>TODO: include options for different ways of generating a population here. (i.e. MC or source file)</p></li>
-</ul>
-</dd>
-</dl>
-</dd></dl>
-
 <dl class="py method">
 <dt id="binarycpython.utils.grid.Population.evolve_single">
 <code class="sig-name descname">evolve_single</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">clean_up_custom_logging_files</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid.html#Population.evolve_single"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid.Population.evolve_single" title="Permalink to this definition">¶</a></dt>
@@ -344,17 +355,17 @@ NOT IMPLEMENTED YET to evolve a population via a variable grid, a source file or
 <dl class="py method">
 <dt id="binarycpython.utils.grid.Population.export_all_info">
 <code class="sig-name descname">export_all_info</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">use_datadir</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">outfile</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">include_population_settings</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">include_binary_c_defaults</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">include_binary_c_version_info</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">include_binary_c_help_all</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid.html#Population.export_all_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid.Population.export_all_info" title="Permalink to this definition">¶</a></dt>
-<dd><p>Function that exports the all_info to a json file</p>
+<dd><p>Function that exports the all_info to a JSON file</p>
 <dl class="simple">
 <dt>Tasks:</dt><dd><ul class="simple">
 <li><dl class="simple">
-<dt>TODO: if any of the values in the dicts here is of a not-serializable form, then we</dt><dd><p>need to change that to a string or something so, use a recursive function that
+<dt>TODO: if any of the values in the dicts here is of a not-serialisable form, then we</dt><dd><p>need to change that to a string or something so, use a recursive function that
 goes over the all_info dict and finds those that fit</p>
 </dd>
 </dl>
 </li>
 <li><p>TODO: Fix to write things to the directory. which options do which etc</p></li>
-<li><p>TODO: theres flawed logic here. rewrite this part pls</p></li>
+<li><p>TODO: there’s flawed logic here. rewrite this part pls</p></li>
 <li><dl class="simple">
 <dt>TODO: consider actually just removing the whole ‘output to file’ part and let the</dt><dd><p>user do this.</p>
 </dd>
@@ -374,7 +385,7 @@ and their default values</p></li>
 version info (see return_binary_c_version_info)</p></li>
 <li><p><strong>include_binary_c_help_all</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code>) – whether to include a dict containing all the information
 about the binary_c parameters (see get_help_all)</p></li>
-<li><p><strong>use_datadir</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code>) – boolean whether to use the custom_options[‘data_dir’] to write the file to.
+<li><p><strong>use_datadir</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code>) – Boolean whether to use the custom_options[‘data_dir’] to write the file to.
 If the  custom_options[“base_filename”] is set, the output file will be called
 &lt;custom_options[“base_filename”]&gt;_settings.json. Otherwise a file called
 simulation_&lt;date+time&gt;_settings.json will be created</p></li>
@@ -397,19 +408,6 @@ simulation_&lt;date+time&gt;_settings.json will be created</p></li>
 </dl>
 </dd></dl>
 
-<dl class="py method">
-<dt id="binarycpython.utils.grid.Population.get_stream_logger">
-<code class="sig-name descname">get_stream_logger</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">level</span><span class="o">=</span><span class="default_value">10</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid.html#Population.get_stream_logger"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid.Population.get_stream_logger" title="Permalink to this definition">¶</a></dt>
-<dd><p>Return logger with configured StreamHandler.</p>
-</dd></dl>
-
-<dl class="py method">
-<dt id="binarycpython.utils.grid.Population.last_grid_variable">
-<code class="sig-name descname">last_grid_variable</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid.html#Population.last_grid_variable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid.Population.last_grid_variable" title="Permalink to this definition">¶</a></dt>
-<dd><p>Functon that returns the last grid variable
-(i.e. the one with the highest grid_variable_number)</p>
-</dd></dl>
-
 <dl class="py method">
 <dt id="binarycpython.utils.grid.Population.parse_cmdline">
 <code class="sig-name descname">parse_cmdline</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid.html#Population.parse_cmdline"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid.Population.parse_cmdline" title="Permalink to this definition">¶</a></dt>
@@ -459,11 +457,23 @@ the binary_c parameters (see get_help_all)</p></li>
 </dl>
 </dd></dl>
 
+<dl class="py method">
+<dt id="binarycpython.utils.grid.Population.return_binary_c_defaults">
+<code class="sig-name descname">return_binary_c_defaults</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid.html#Population.return_binary_c_defaults"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid.Population.return_binary_c_defaults" title="Permalink to this definition">¶</a></dt>
+<dd><p>Function that returns the defaults of the binary_c version that is used.</p>
+</dd></dl>
+
+<dl class="py method">
+<dt id="binarycpython.utils.grid.Population.return_binary_c_version_info">
+<code class="sig-name descname">return_binary_c_version_info</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">parsed</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid.html#Population.return_binary_c_version_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid.Population.return_binary_c_version_info" title="Permalink to this definition">¶</a></dt>
+<dd><p>Function that returns the version information of binary_c</p>
+</dd></dl>
+
 <dl class="py method">
 <dt id="binarycpython.utils.grid.Population.return_population_settings">
 <code class="sig-name descname">return_population_settings</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid.html#Population.return_population_settings"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid.Population.return_population_settings" title="Permalink to this definition">¶</a></dt>
 <dd><p>Function that returns all the options that have been set.</p>
-<p>Can be combined with json to make a nice file.</p>
+<p>Can be combined with JSON to make a nice file.</p>
 <dl class="field-list simple">
 <dt class="field-odd">Return type</dt>
 <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></p>
@@ -498,30 +508,21 @@ in the self.grid_options</p>
 </dd></dl>
 
 <dl class="py method">
-<dt id="binarycpython.utils.grid.Population.set_moe_distefano_settings">
-<code class="sig-name descname">set_moe_distefano_settings</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">options</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid.html#Population.set_moe_distefano_settings"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid.Population.set_moe_distefano_settings" title="Permalink to this definition">¶</a></dt>
-<dd><p>Function to set user input configurations for the moe &amp; distefano methods</p>
+<dt id="binarycpython.utils.grid.Population.set_moe_di_stefano_settings">
+<code class="sig-name descname">set_moe_di_stefano_settings</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">options</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid.html#Population.set_moe_di_stefano_settings"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid.Population.set_moe_di_stefano_settings" title="Permalink to this definition">¶</a></dt>
+<dd><p>Function to set user input configurations for the moe &amp; di Stefano methods</p>
 <p>If nothing is passed then we just use the default options</p>
 </dd></dl>
 
-<dl class="py method">
-<dt id="binarycpython.utils.grid.Population.system_queue_filler">
-<code class="sig-name descname">system_queue_filler</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">job_queue</span></em>, <em class="sig-param"><span class="n">amt_cores</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid.html#Population.system_queue_filler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid.Population.system_queue_filler" title="Permalink to this definition">¶</a></dt>
-<dd><p>Function that is responsible for keeping the queue filled.</p>
-<p>This will generate the systems until it is full, and then keeps trying to fill it.
-Will have to play with the size of this.</p>
-</dd></dl>
-
 <dl class="py method">
 <dt id="binarycpython.utils.grid.Population.write_binary_c_calls_to_file">
 <code class="sig-name descname">write_binary_c_calls_to_file</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">output_dir</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">output_filename</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">include_defaults</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid.html#Population.write_binary_c_calls_to_file"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid.Population.write_binary_c_calls_to_file" title="Permalink to this definition">¶</a></dt>
-<dd><p>Function that loops over the gridcode and writes the generated parameters to a file.
-In the form of a commandline call</p>
-<p>Only useful when you have a variable grid as system_generator. MC wouldnt be that useful</p>
+<dd><p>Function that loops over the grid code and writes the generated parameters to a file.
+In the form of a command line call</p>
+<p>Only useful when you have a variable grid as system_generator. MC wouldn’t be that useful</p>
 <p>Also, make sure that in this export there are the basic parameters
 like m1,m2,sep, orb-per, ecc, probability etc.</p>
 <p>On default this will write to the datadir, if it exists</p>
-<p>WARNING; dont use yet. not fully tested.</p>
 <dl class="simple">
 <dt>Tasks:</dt><dd><ul class="simple">
 <li><p>TODO: test this function</p></li>
@@ -534,11 +535,14 @@ like m1,m2,sep, orb-per, ecc, probability etc.</p>
 <dd class="field-odd"><ul class="simple">
 <li><p><strong>output_dir</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]) – (optional, default = None) directory where to write the file to. If custom_options[‘data_dir’] is present, then that one will be used first, and then the output_dir</p></li>
 <li><p><strong>output_filename</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]) – (optional, default = None) filename of the output. If not set it will be called “binary_c_calls.txt”</p></li>
-<li><p><strong>include_defaults</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code>) – (optional, default = None) whether to include the defaults of binary_c in the lines that are written. Beware that this will result in very long lines, and it might be better to just export the binary_c defaults and keep them in a seperate file.</p></li>
+<li><p><strong>include_defaults</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code>) – (optional, default = None) whether to include the defaults of binary_c in the lines that are written. Beware that this will result in very long lines, and it might be better to just export the binary_c defaults and keep them in a separate file.</p></li>
 </ul>
 </dd>
-<dt class="field-even">Return type</dt>
-<dd class="field-even"><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></p>
+<dt class="field-even">Returns</dt>
+<dd class="field-even"><p>filename that was used to write the calls to</p>
+</dd>
+<dt class="field-odd">Return type</dt>
+<dd class="field-odd"><p>filename</p>
 </dd>
 </dl>
 </dd></dl>
@@ -581,9 +585,9 @@ like m1,m2,sep, orb-per, ecc, probability etc.</p>
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/grid_options_defaults.html b/docs/build/html/grid_options_defaults.html
index b4e515035f2461c8c183a046a0648126f8502234..112c791bf510891b0067ec103dc535438e0efb95 100644
--- a/docs/build/html/grid_options_defaults.html
+++ b/docs/build/html/grid_options_defaults.html
@@ -30,6 +30,9 @@
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="_static/js/theme.js"></script>
 
@@ -99,7 +102,7 @@
 <li class="toctree-l2"><a class="reference internal" href="useful_funcs.html">useful_funcs module</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -171,7 +174,31 @@
           <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
            <div itemprop="articleBody">
             
-  <div class="section" id="module-binarycpython.utils.grid_options_defaults">
+  
+<style>
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="module-binarycpython.utils.grid_options_defaults">
 <span id="grid-options-and-descriptions"></span><h1>Grid options and descriptions<a class="headerlink" href="#module-binarycpython.utils.grid_options_defaults" title="Permalink to this headline">¶</a></h1>
 <dl class="simple">
 <dt>Module that contains the default options for the population grid code along with the description for these options, in the form of dictionaries:</dt><dd><ul class="simple">
@@ -217,7 +244,7 @@
 <dd class="field-even"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></p>
 </dd>
 <dt class="field-odd">Returns</dt>
-<dd class="field-odd"><p>dict containg the option, the description if its there, otherwise empty string. And if the key doesnt exist, the dict is empty</p>
+<dd class="field-odd"><p>dict containing the option, the description if its there, otherwise empty string. And if the key doesnt exist, the dict is empty</p>
 </dd>
 </dl>
 </dd></dl>
@@ -232,7 +259,7 @@
 <code class="sig-prename descclassname">binarycpython.utils.grid_options_defaults.</code><code class="sig-name descname">write_grid_options_to_rst_file</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">output_file</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/grid_options_defaults.html#write_grid_options_to_rst_file"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.grid_options_defaults.write_grid_options_to_rst_file" title="Permalink to this definition">¶</a></dt>
 <dd><p>Function that writes the descriptions of the grid options to a rst file</p>
 <dl class="simple">
-<dt>Tasks:</dt><dd><p>TODO: seperate things into private and public options</p>
+<dt>Tasks:</dt><dd><p>TODO: separate things into private and public options</p>
 </dd>
 </dl>
 <dl class="field-list simple">
@@ -281,9 +308,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/grid_options_descriptions.html b/docs/build/html/grid_options_descriptions.html
index ea8f9712755293c3950581d36e31bd6f885ac1a6..a007d6ba10ab3d7ab81db60616e80ca71c394d9e 100644
--- a/docs/build/html/grid_options_descriptions.html
+++ b/docs/build/html/grid_options_descriptions.html
@@ -30,6 +30,9 @@
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="_static/js/theme.js"></script>
 
@@ -85,11 +88,11 @@
 <ul class="current">
 <li class="toctree-l1"><a class="reference internal" href="readme_link.html">Python module for binary_c</a></li>
 <li class="toctree-l1"><a class="reference internal" href="modules.html">Binarycpython code</a></li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1 current"><a class="current reference internal" href="#">Population grid code options</a><ul>
 <li class="toctree-l2"><a class="reference internal" href="#public-options">Public options</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#moe-distefano-sampler-options">Moe &amp; Distefano sampler options</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#moe-di-stefano-sampler-options">Moe &amp; di Stefano sampler options</a></li>
 <li class="toctree-l2"><a class="reference internal" href="#private-options">Private options</a></li>
 </ul>
 </li>
@@ -160,7 +163,31 @@
           <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
            <div itemprop="articleBody">
             
-  <div class="section" id="population-grid-code-options">
+  
+<style>
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="population-grid-code-options">
 <h1>Population grid code options<a class="headerlink" href="#population-grid-code-options" title="Permalink to this headline">¶</a></h1>
 <p>The following chapter contains all grid code options, along with their descriptions
 There are 1 options that are not described yet.</p>
@@ -174,16 +201,19 @@ There are 1 options that are not described yet.</p>
 <div class="line"><strong>C_logging_code</strong>: Variable to store the exact code that is used for the custom_logging. In this way the user can do more complex logging, as well as putting these logging strings in files.</div>
 </div>
 <div class="line-block">
-<div class="line"><strong>amt_cores</strong>: The amount of cores that the population grid will use. The multiprocessing is useful but make sure to figure out how many logical cores the machine has. The core is multiprocessed, not multithreaded, and will gain no extra speed when amt_cores exceeds the amount of logical cores. Input: int</div>
+<div class="line"><strong>amt_cores</strong>: The amount of cores that the population grid will use. The multiprocessing is useful but make sure to figure out how many logical cores the machine has. The core is multi processed, not multi threaded, and will gain no extra speed when amt_cores exceeds the amount of logical cores. Input: int</div>
 </div>
 <div class="line-block">
-<div class="line"><strong>combine_ensemble_with_thread_joining</strong>: BOolean flag on whether to combine everything and return it to the user or if false: write it to data_dir/ensemble_output_{popuation_id}_{thread_id}.json</div>
+<div class="line"><strong>combine_ensemble_with_thread_joining</strong>: Boolean flag on whether to combine everything and return it to the user or if false: write it to data_dir/ensemble_output_{population_id}_{thread_id}.json</div>
 </div>
 <div class="line-block">
 <div class="line"><strong>condor</strong>: Int flag whether to use a condor type population evolution. Not implemented yet.</div>
 </div>
 <div class="line-block">
-<div class="line"><strong>custom_logging_func_memaddr</strong>: Memory adress where the custom_logging_function is stored. Input: int</div>
+<div class="line"><strong>custom_logging_func_memaddr</strong>: Memory address where the custom_logging_function is stored. Input: int</div>
+</div>
+<div class="line-block">
+<div class="line"><strong>do_dry_run</strong>: Whether to do a dry run to calculate the total probability for this run</div>
 </div>
 <div class="line-block">
 <div class="line"><strong>ensemble_factor_in_probability_weighted_mass</strong>: Flag to multiply all the ensemble results with 1/probability_weighted_mass</div>
@@ -192,7 +222,7 @@ There are 1 options that are not described yet.</p>
 <div class="line"><strong>evolution_type</strong>: Variable containing the type of evolution used of the grid. Multiprocessing or linear processing</div>
 </div>
 <div class="line-block">
-<div class="line"><strong>failed_systems_threshold</strong>: Variable storing the maximum amount of systems that are allowed to fail before logging their commandline arguments to failed_systems log files</div>
+<div class="line"><strong>failed_systems_threshold</strong>: Variable storing the maximum amount of systems that are allowed to fail before logging their command line arguments to failed_systems log files</div>
 </div>
 <div class="line-block">
 <div class="line"><strong>gridcode_filename</strong>: Filename for the grid code. Set and used by the population object. TODO: allow the user to provide their own function, rather than only a generated function.</div>
@@ -207,7 +237,7 @@ There are 1 options that are not described yet.</p>
 <div class="line"><strong>log_file</strong>: Log file for the population object. Unused</div>
 </div>
 <div class="line-block">
-<div class="line"><strong>log_runtime_systems</strong>: Whether to log the runtime of the systems . Each systems run by the thread is logged to a file and is stored in the tmp_dir. (1 file per thread). Don’t use this if you are planning to run alot of systems. This is mostly for debugging and finding systems that take long to run. Integer, default = 0. if value is 1 then the systems are logged</div>
+<div class="line"><strong>log_runtime_systems</strong>: Whether to log the runtime of the systems . Each systems run by the thread is logged to a file and is stored in the tmp_dir. (1 file per thread). Don’t use this if you are planning to run a lot of systems. This is mostly for debugging and finding systems that take long to run. Integer, default = 0. if value is 1 then the systems are logged</div>
 </div>
 <div class="line-block">
 <div class="line"><strong>m&amp;s_options</strong>: Internal variable that holds the M&amp;S options. Don’t write to this your self</div>
@@ -228,13 +258,13 @@ There are 1 options that are not described yet.</p>
 <div class="line"><strong>repeat</strong>: Factor of how many times a system should be repeated. Consider the evolution splitting binary_c argument for supernovae kick repeating.</div>
 </div>
 <div class="line-block">
-<div class="line"><strong>run_zero_probability_system</strong>: Whether to run the zero probability systems. Default: True. Input: boolean</div>
+<div class="line"><strong>run_zero_probability_system</strong>: Whether to run the zero probability systems. Default: True. Input: Boolean</div>
 </div>
 <div class="line-block">
-<div class="line"><strong>slurm</strong>: Int flag whether to use a slurm type population evolution.</div>
+<div class="line"><strong>slurm</strong>: Int flag whether to use a Slurm type population evolution.</div>
 </div>
 <div class="line-block">
-<div class="line"><strong>source_file_filename</strong>: Variable containing the source file containing lines of binary_c commandline calls. These all have to start with binary_c.</div>
+<div class="line"><strong>source_file_filename</strong>: Variable containing the source file containing lines of binary_c command line calls. These all have to start with binary_c.</div>
 </div>
 <div class="line-block">
 <div class="line"><strong>tmp_dir</strong>: Directory where certain types of output are stored. The grid code is stored in that directory, as well as the custom logging libraries. Log files and other diagnostics will usually be written to this location, unless specified otherwise</div>
@@ -243,11 +273,11 @@ There are 1 options that are not described yet.</p>
 <div class="line"><strong>verbosity</strong>: Verbosity of the population code. Default is 0, by which only errors will be printed. Higher values will show more output, which is good for debugging.</div>
 </div>
 <div class="line-block">
-<div class="line"><strong>weight</strong>: Weight factor for each system. The calculated probability is mulitplied by this. If the user wants each system to be repeated several times, then this variable should not be changed, rather change the _repeat variable instead, as that handles the reduction in probability per system. This is useful for systems that have a process with some random element in it.</div>
+<div class="line"><strong>weight</strong>: Weight factor for each system. The calculated probability is multiplied by this. If the user wants each system to be repeated several times, then this variable should not be changed, rather change the _repeat variable instead, as that handles the reduction in probability per system. This is useful for systems that have a process with some random element in it.</div>
 </div>
 </div>
-<div class="section" id="moe-distefano-sampler-options">
-<h2>Moe &amp; Distefano sampler options<a class="headerlink" href="#moe-distefano-sampler-options" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="moe-di-stefano-sampler-options">
+<h2>Moe &amp; di Stefano sampler options<a class="headerlink" href="#moe-di-stefano-sampler-options" title="Permalink to this headline">¶</a></h2>
 <p>The following options are meant to be changed by the user.</p>
 <div class="line-block">
 <div class="line"><strong>Mmin</strong>: Minimum stellar mass</div>
@@ -257,7 +287,7 @@ There are 1 options that are not described yet.</p>
 multiplicity model (as a function of log10M1)</div>
 </div>
 <blockquote>
-<div><p>You can use ‘Poisson’ which uses the system multiplicty
+<div><p>You can use ‘Poisson’ which uses the system multiplicity
 given by Moe and maps this to single/binary/triple/quad
 fractions.</p>
 <p>Alternatively, ‘data’ takes the fractions directly
@@ -277,13 +307,13 @@ combined (and there are NO quadruples).</p>
 </div></blockquote>
 <div class="line-block">
 <div class="line"><strong>normalize_multiplicities</strong>:
-‘norm’: normalize so the whole population is 1.0
+‘norm’: normalise so the whole population is 1.0
         after implementing the appropriate fractions
         S/(S+B+T+Q), B/(S+B+T+Q), T/(S+B+T+Q), Q/(S+B+T+Q)
-        given a mix of multiplities, you can either (noting that
+        given a mix of multiplicities, you can either (noting that
         here (S,B,T,Q) = appropriate modulator * model(S,B,T,Q) )
         note: if you only set one multiplicity_modulator
-        to 1, and all the others to 0, then normalizing
+        to 1, and all the others to 0, then normalising
         will mean that you effectively have the same number
         of stars as single, binary, triple or quad (whichever
         is non-zero) i.e. the multiplicity fraction is ignored.
@@ -293,7 +323,7 @@ combined (and there are NO quadruples).</p>
 <blockquote>
 <div><dl>
 <dt>‘raw’<span class="classifier">stick to what is predicted, i.e.</span></dt><dd><p>S/(S+B+T+Q), B/(S+B+T+Q), T/(S+B+T+Q), Q/(S+B+T+Q)
-without normalization
+without normalisation
 (in which case the total probability &lt; 1.0 unless
 all you use single, binary, triple and quadruple)</p>
 </dd>
@@ -358,10 +388,10 @@ q extrapolation (below 0.15) method
 <div class="line"><strong>_end_time_evolution</strong>: Variable storing the end timestamp of the population evolution. Set by the object itself</div>
 </div>
 <div class="line-block">
-<div class="line"><strong>_errors_exceeded</strong>: Variable storing a boolean flag whether the amount of errors was higher than the set threshold (failed_systems_threshold). If True, then the commandline arguments of the failing systems will not be stored in the failed_system_log files.</div>
+<div class="line"><strong>_errors_exceeded</strong>: Variable storing a Boolean flag whether the amount of errors was higher than the set threshold (failed_systems_threshold). If True, then the command line arguments of the failing systems will not be stored in the failed_system_log files.</div>
 </div>
 <div class="line-block">
-<div class="line"><strong>_errors_found</strong>: Variable storing a boolean flag whether errors by binary_c are encountered.</div>
+<div class="line"><strong>_errors_found</strong>: Variable storing a Boolean flag whether errors by binary_c are encountered.</div>
 </div>
 <div class="line-block">
 <div class="line"><strong>_evolution_type_options</strong>: List containing the evolution type options.</div>
@@ -397,10 +427,10 @@ q extrapolation (below 0.15) method
 <div class="line"><strong>_start_time_evolution</strong>: Variable storing the start timestamp of the population evolution. Set by the object itself.</div>
 </div>
 <div class="line-block">
-<div class="line"><strong>_store_memaddr</strong>: Memory adress of the store object for binary_c.</div>
+<div class="line"><strong>_store_memaddr</strong>: Memory address of the store object for binary_c.</div>
 </div>
 <div class="line-block">
-<div class="line"><strong>_system_generator</strong>: Function object that contains the system generator function. This can be from a grid, or a source file, or a montecarlo grid.</div>
+<div class="line"><strong>_system_generator</strong>: Function object that contains the system generator function. This can be from a grid, or a source file, or a Monte Carlo grid.</div>
 </div>
 <div class="line-block">
 <div class="line"><strong>_total_mass_run</strong>: To count the total mass that thread/process has ran</div>
@@ -449,9 +479,9 @@ q extrapolation (below 0.15) method
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/hpc_functions.html b/docs/build/html/hpc_functions.html
index abc4fe870430b2038715a873b93e7684901b0107..2449b34111da6e6dced939c75514f5fa93324df6 100644
--- a/docs/build/html/hpc_functions.html
+++ b/docs/build/html/hpc_functions.html
@@ -30,6 +30,9 @@
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="_static/js/theme.js"></script>
 
@@ -99,7 +102,7 @@
 <li class="toctree-l2"><a class="reference internal" href="useful_funcs.html">useful_funcs module</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -171,10 +174,34 @@
           <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
            <div itemprop="articleBody">
             
-  <div class="section" id="module-binarycpython.utils.hpc_functions">
+  
+<style>
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="module-binarycpython.utils.hpc_functions">
 <span id="hpc-functions-module"></span><h1>hpc_functions module<a class="headerlink" href="#module-binarycpython.utils.hpc_functions" title="Permalink to this headline">¶</a></h1>
 <p>File containing functions for HPC computing, distributed tasks on clusters etc.</p>
-<p>Functions that the slurm and condor subroutines of the population object use.</p>
+<p>Functions that the Slurm and Condor subroutines of the population object use.</p>
 <p>Mainly divided in 2 sections: Slurm and Condor</p>
 </div>
 
@@ -212,9 +239,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/index.html b/docs/build/html/index.html
index 43b32b8fef3b5c77e0c831bce6a8197b64a99a24..3cd491f71d4643a7b5c97a1090a9f6e73bc91ab0 100644
--- a/docs/build/html/index.html
+++ b/docs/build/html/index.html
@@ -30,6 +30,9 @@
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="_static/js/theme.js"></script>
 
@@ -85,7 +88,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="readme_link.html">Python module for binary_c</a></li>
 <li class="toctree-l1"><a class="reference internal" href="modules.html">Binarycpython code</a></li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -155,7 +158,31 @@
           <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
            <div itemprop="articleBody">
             
-  <div class="section" id="welcome-to-binary-c-python-s-documentation">
+  
+<style>
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="welcome-to-binary-c-python-s-documentation">
 <h1>Welcome to binary_c-python’s documentation!<a class="headerlink" href="#welcome-to-binary-c-python-s-documentation" title="Permalink to this headline">¶</a></h1>
 </div>
 <div class="section" id="python-module-for-binary-c">
@@ -283,7 +310,14 @@
 <li class="toctree-l2"><a class="reference internal" href="useful_funcs.html">useful_funcs module</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="notebook_individual_systems.html">Running individual systems with binarycpython</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_custom_logging.html">Notebook custom logging</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_population.html">Running populations with binarycpython</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_extra_features.html">Extra features and functionality of binarycpython</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_api_functionality.html">Using the API functionality of binarycpython</a></li>
+</ul>
+</li>
 <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a><ul>
 <li class="toctree-l2"><a class="reference internal" href="binary_c_parameters.html#section-stars">Section: stars</a></li>
 <li class="toctree-l2"><a class="reference internal" href="binary_c_parameters.html#section-binary">Section: binary</a></li>
@@ -297,7 +331,7 @@
 </li>
 <li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a><ul>
 <li class="toctree-l2"><a class="reference internal" href="grid_options_descriptions.html#public-options">Public options</a></li>
-<li class="toctree-l2"><a class="reference internal" href="grid_options_descriptions.html#moe-distefano-sampler-options">Moe &amp; Distefano sampler options</a></li>
+<li class="toctree-l2"><a class="reference internal" href="grid_options_descriptions.html#moe-di-stefano-sampler-options">Moe &amp; di Stefano sampler options</a></li>
 <li class="toctree-l2"><a class="reference internal" href="grid_options_descriptions.html#private-options">Private options</a></li>
 </ul>
 </li>
@@ -348,9 +382,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/modules.html b/docs/build/html/modules.html
index 17ba62ad59eafe2f147c730b1634f684b3d2c769..b15b9715b205cc11da2ff7fce27eb8fbda9eebfe 100644
--- a/docs/build/html/modules.html
+++ b/docs/build/html/modules.html
@@ -30,6 +30,9 @@
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="_static/js/theme.js"></script>
 
@@ -99,7 +102,7 @@
 <li class="toctree-l2"><a class="reference internal" href="useful_funcs.html">useful_funcs module</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -169,7 +172,31 @@
           <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
            <div itemprop="articleBody">
             
-  <div class="section" id="binarycpython-code">
+  
+<style>
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="binarycpython-code">
 <h1>Binarycpython code<a class="headerlink" href="#binarycpython-code" title="Permalink to this headline">¶</a></h1>
 <p>This chapter contains the (auto)documentation for all the functions and modules in the source code of binarycpython</p>
 <div class="toctree-wrapper compound">
@@ -223,9 +250,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/notebook_api_functionality.html b/docs/build/html/notebook_api_functionality.html
new file mode 100644
index 0000000000000000000000000000000000000000..7b56c0572c2e05ea64eafb5aece5542bad323598
--- /dev/null
+++ b/docs/build/html/notebook_api_functionality.html
@@ -0,0 +1,1378 @@
+
+
+<!DOCTYPE html>
+<html class="writer-html5" lang="en" >
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Using the API functionality of binarycpython &mdash; binary_c-python  documentation</title>
+  
+
+  
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+
+  
+  
+  
+  
+
+  
+  <!--[if lt IE 9]>
+    <script src="_static/js/html5shiv.min.js"></script>
+  <![endif]-->
+  
+    
+      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
+        <script src="_static/jquery.js"></script>
+        <script src="_static/underscore.js"></script>
+        <script src="_static/doctools.js"></script>
+        <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
+    
+    <script type="text/javascript" src="_static/js/theme.js"></script>
+
+    
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Binary_c parameters" href="binary_c_parameters.html" />
+    <link rel="prev" title="Extra features and functionality of binarycpython" href="notebook_extra_features.html" /> 
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search" >
+          
+
+          
+            <a href="index.html" class="icon icon-home" alt="Documentation Home"> binary_c-python
+          
+
+          
+          </a>
+
+          
+            
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="readme_link.html">Python module for binary_c</a></li>
+<li class="toctree-l1"><a class="reference internal" href="modules.html">Binarycpython code</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="example_notebooks.html">Example notebooks</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="notebook_individual_systems.html">Running individual systems with binarycpython</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_custom_logging.html">Notebook custom logging</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_population.html">Running populations with binarycpython</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_extra_features.html">Extra features and functionality of binarycpython</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Using the API functionality of binarycpython</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="#Example-usage:">Example usage:</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="#Setting-up,-using-and-freeing-store">Setting up, using and freeing store</a></li>
+<li class="toctree-l4"><a class="reference internal" href="#Getting-information-from-binary_c">Getting information from binary_c</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
+<li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
+<li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
+<li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/issues/new">Submit an issue</a></li>
+</ul>
+
+            
+          
+        </div>
+        
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="index.html">binary_c-python</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
+        
+          <li><a href="example_notebooks.html">Example notebooks</a> &raquo;</li>
+        
+      <li>Using the API functionality of binarycpython</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="_sources/notebook_api_functionality.ipynb.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  
+<style>
+/* CSS for nbsphinx extension */
+
+/* remove conflicting styling from Sphinx themes */
+div.nbinput.container div.prompt *,
+div.nboutput.container div.prompt *,
+div.nbinput.container div.input_area pre,
+div.nboutput.container div.output_area pre,
+div.nbinput.container div.input_area .highlight,
+div.nboutput.container div.output_area .highlight {
+    border: none;
+    padding: 0;
+    margin: 0;
+    box-shadow: none;
+}
+
+div.nbinput.container > div[class*=highlight],
+div.nboutput.container > div[class*=highlight] {
+    margin: 0;
+}
+
+div.nbinput.container div.prompt *,
+div.nboutput.container div.prompt * {
+    background: none;
+}
+
+div.nboutput.container div.output_area .highlight,
+div.nboutput.container div.output_area pre {
+    background: unset;
+}
+
+div.nboutput.container div.output_area div.highlight {
+    color: unset;  /* override Pygments text color */
+}
+
+/* avoid gaps between output lines */
+div.nboutput.container div[class*=highlight] pre {
+    line-height: normal;
+}
+
+/* input/output containers */
+div.nbinput.container,
+div.nboutput.container {
+    display: -webkit-flex;
+    display: flex;
+    align-items: flex-start;
+    margin: 0;
+    width: 100%;
+}
+@media (max-width: 540px) {
+    div.nbinput.container,
+    div.nboutput.container {
+        flex-direction: column;
+    }
+}
+
+/* input container */
+div.nbinput.container {
+    padding-top: 5px;
+}
+
+/* last container */
+div.nblast.container {
+    padding-bottom: 5px;
+}
+
+/* input prompt */
+div.nbinput.container div.prompt pre {
+    color: #307FC1;
+}
+
+/* output prompt */
+div.nboutput.container div.prompt pre {
+    color: #BF5B3D;
+}
+
+/* all prompts */
+div.nbinput.container div.prompt,
+div.nboutput.container div.prompt {
+    width: 4.5ex;
+    padding-top: 5px;
+    position: relative;
+    user-select: none;
+}
+
+div.nbinput.container div.prompt > div,
+div.nboutput.container div.prompt > div {
+    position: absolute;
+    right: 0;
+    margin-right: 0.3ex;
+}
+
+@media (max-width: 540px) {
+    div.nbinput.container div.prompt,
+    div.nboutput.container div.prompt {
+        width: unset;
+        text-align: left;
+        padding: 0.4em;
+    }
+    div.nboutput.container div.prompt.empty {
+        padding: 0;
+    }
+
+    div.nbinput.container div.prompt > div,
+    div.nboutput.container div.prompt > div {
+        position: unset;
+    }
+}
+
+/* disable scrollbars on prompts */
+div.nbinput.container div.prompt pre,
+div.nboutput.container div.prompt pre {
+    overflow: hidden;
+}
+
+/* input/output area */
+div.nbinput.container div.input_area,
+div.nboutput.container div.output_area {
+    -webkit-flex: 1;
+    flex: 1;
+    overflow: auto;
+}
+@media (max-width: 540px) {
+    div.nbinput.container div.input_area,
+    div.nboutput.container div.output_area {
+        width: 100%;
+    }
+}
+
+/* input area */
+div.nbinput.container div.input_area {
+    border: 1px solid #e0e0e0;
+    border-radius: 2px;
+    /*background: #f5f5f5;*/
+}
+
+/* override MathJax center alignment in output cells */
+div.nboutput.container div[class*=MathJax] {
+    text-align: left !important;
+}
+
+/* override sphinx.ext.imgmath center alignment in output cells */
+div.nboutput.container div.math p {
+    text-align: left;
+}
+
+/* standard error */
+div.nboutput.container div.output_area.stderr {
+    background: #fdd;
+}
+
+/* ANSI colors */
+.ansi-black-fg { color: #3E424D; }
+.ansi-black-bg { background-color: #3E424D; }
+.ansi-black-intense-fg { color: #282C36; }
+.ansi-black-intense-bg { background-color: #282C36; }
+.ansi-red-fg { color: #E75C58; }
+.ansi-red-bg { background-color: #E75C58; }
+.ansi-red-intense-fg { color: #B22B31; }
+.ansi-red-intense-bg { background-color: #B22B31; }
+.ansi-green-fg { color: #00A250; }
+.ansi-green-bg { background-color: #00A250; }
+.ansi-green-intense-fg { color: #007427; }
+.ansi-green-intense-bg { background-color: #007427; }
+.ansi-yellow-fg { color: #DDB62B; }
+.ansi-yellow-bg { background-color: #DDB62B; }
+.ansi-yellow-intense-fg { color: #B27D12; }
+.ansi-yellow-intense-bg { background-color: #B27D12; }
+.ansi-blue-fg { color: #208FFB; }
+.ansi-blue-bg { background-color: #208FFB; }
+.ansi-blue-intense-fg { color: #0065CA; }
+.ansi-blue-intense-bg { background-color: #0065CA; }
+.ansi-magenta-fg { color: #D160C4; }
+.ansi-magenta-bg { background-color: #D160C4; }
+.ansi-magenta-intense-fg { color: #A03196; }
+.ansi-magenta-intense-bg { background-color: #A03196; }
+.ansi-cyan-fg { color: #60C6C8; }
+.ansi-cyan-bg { background-color: #60C6C8; }
+.ansi-cyan-intense-fg { color: #258F8F; }
+.ansi-cyan-intense-bg { background-color: #258F8F; }
+.ansi-white-fg { color: #C5C1B4; }
+.ansi-white-bg { background-color: #C5C1B4; }
+.ansi-white-intense-fg { color: #A1A6B2; }
+.ansi-white-intense-bg { background-color: #A1A6B2; }
+
+.ansi-default-inverse-fg { color: #FFFFFF; }
+.ansi-default-inverse-bg { background-color: #000000; }
+
+.ansi-bold { font-weight: bold; }
+.ansi-underline { text-decoration: underline; }
+
+
+div.nbinput.container div.input_area div[class*=highlight] > pre,
+div.nboutput.container div.output_area div[class*=highlight] > pre,
+div.nboutput.container div.output_area div[class*=highlight].math,
+div.nboutput.container div.output_area.rendered_html,
+div.nboutput.container div.output_area > div.output_javascript,
+div.nboutput.container div.output_area:not(.rendered_html) > img{
+    padding: 5px;
+    margin: 0;
+}
+
+/* fix copybtn overflow problem in chromium (needed for 'sphinx_copybutton') */
+div.nbinput.container div.input_area > div[class^='highlight'],
+div.nboutput.container div.output_area > div[class^='highlight']{
+    overflow-y: hidden;
+}
+
+/* hide copybtn icon on prompts (needed for 'sphinx_copybutton') */
+.prompt a.copybtn {
+    display: none;
+}
+
+/* Some additional styling taken form the Jupyter notebook CSS */
+div.rendered_html table {
+  border: none;
+  border-collapse: collapse;
+  border-spacing: 0;
+  color: black;
+  font-size: 12px;
+  table-layout: fixed;
+}
+div.rendered_html thead {
+  border-bottom: 1px solid black;
+  vertical-align: bottom;
+}
+div.rendered_html tr,
+div.rendered_html th,
+div.rendered_html td {
+  text-align: right;
+  vertical-align: middle;
+  padding: 0.5em 0.5em;
+  line-height: normal;
+  white-space: normal;
+  max-width: none;
+  border: none;
+}
+div.rendered_html th {
+  font-weight: bold;
+}
+div.rendered_html tbody tr:nth-child(odd) {
+  background: #f5f5f5;
+}
+div.rendered_html tbody tr:hover {
+  background: rgba(66, 165, 245, 0.2);
+}
+
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="Using-the-API-functionality-of-binarycpython">
+<h1>Using the API functionality of binarycpython<a class="headerlink" href="#Using-the-API-functionality-of-binarycpython" title="Permalink to this headline">¶</a></h1>
+<p>This notebook shows how to use the API functions that interface with binary_c. It usually is better to use wrapper functions that internally use these API functions, because most of the output here is very raw</p>
+<p>Binarycpython uses the Python-C extension framework to interface Python with C. The sourcecode for this is contained in <code class="docutils literal notranslate"><span class="pre">src/binary_c_python.c</span></code>, and the functions are available via <code class="docutils literal notranslate"><span class="pre">from</span> <span class="pre">binarycpython</span> <span class="pre">import</span> <span class="pre">_binary_c_bindings</span></code>.</p>
+<p>The following functions are available through the API: (run cell below)</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[2]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="kn">from</span> <span class="nn">binarycpython</span> <span class="kn">import</span> <span class="n">_binary_c_bindings</span>
+<span class="n">help</span><span class="p">(</span><span class="n">_binary_c_bindings</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+Help on module binarycpython._binary_c_bindings in binarycpython:
+
+NAME
+    binarycpython._binary_c_bindings - Module to interface the Binary_c API with python.
+
+FUNCTIONS
+    free_persistent_data_memaddr_and_return_json_output(...)
+        Frees the persistent_data memory and returns the json output
+
+    free_store_memaddr(...)
+        Frees the store memaddr
+
+    return_arglines(...)
+        Return the default args for a binary_c system
+
+    return_help(...)
+        Return the help info for a given parameter
+
+    return_help_all(...)
+        Return an overview of all the parameters, their description, categorized in sections
+
+    return_maximum_mass_ratio_for_RLOF(...)
+        Returns a string containing the maximum mass ratio for which a binary system does not RLOF at zams. Optionally accepts a store_capsule. Please use the wrapper functions in utils for this except when you know what you&#39;re doing
+
+    return_minimum_orbit_for_RLOF(...)
+        Returns a string containing the minimum orbit and separation for which a binary system does not RLOF at zams. Please use the wrapper functions in utils for this except when you know what you&#39;re doing
+
+    return_persistent_data_memaddr(...)
+        Return the store memory adress that will be passed to run_population
+
+    return_store_memaddr(...)
+        Return the store memory adress that will be passed to run_population
+
+    return_version_info(...)
+        Return the version information of the used binary_c build
+
+    run_system(...)
+        Function to run a system. This is a general function that will be able to handle different kinds of situations: single system run with different settings, population run with different settings, etc. To avoid having too many functions doing slightly different things.
+
+        Arguments:
+                argstring: argument string for binary_c
+                (opt) custom_logging_func_memaddr: memory address value for custom logging function. Default = -1 (None)
+                (opt) store_memaddr: memory adress of the store. Default = -1 (None)
+                (opt) write_logfile: Boolean (in int form) for whether to enable the writing of the log function. Default = 0
+                (opt) population: Boolean (in int form) for whether this system is part of a population run. Default = 0.
+
+    test_func(...)
+        Function that contains random snippets. Do not expect this to remain available, or reliable. i.e. dont use it.
+
+FILE
+    /home/david/.pyenv/versions/3.6.4/envs/dev-binarycpython3.6.4/lib/python3.6/site-packages/binarycpython/_binary_c_bindings.cpython-36m-x86_64-linux-gnu.so
+
+
+</pre></div></div>
+</div>
+<p>There are three main categories of functions:</p>
+<ul class="simple">
+<li><p>Functions to get information from binary_c: these can be used to evolve systems, and get utility information from binary_c.</p>
+<ul>
+<li><p>run_system</p></li>
+<li><p>return_minimum_orbit_for_RLOF</p></li>
+<li><p>return_maximum_mass_ratio_for_RLOF</p></li>
+<li><p>return_help</p></li>
+<li><p>return_help_all</p></li>
+<li><p>return_arglines</p></li>
+</ul>
+</li>
+<li><p>Memory creation functions: these can be used to have binary_c allocate memory which is used or written to by binary_c</p>
+<ul>
+<li><p>return_persistent_data_memaddr</p></li>
+<li><p>return_store_memaddr</p></li>
+</ul>
+</li>
+<li><p>Memory freeing functions: These can be used to free the allocated memory, and in the case of persistent memory it will also return the contents of the ensemble</p>
+<ul>
+<li><p>free_persistent_data_memaddr_and_return_json_output</p></li>
+<li><p>free_store_memaddr</p></li>
+</ul>
+</li>
+</ul>
+<div class="section" id="Example-usage:">
+<h2>Example usage:<a class="headerlink" href="#Example-usage:" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="Setting-up,-using-and-freeing-store">
+<h3>Setting up, using and freeing store<a class="headerlink" href="#Setting-up,-using-and-freeing-store" title="Permalink to this headline">¶</a></h3>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[10]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="c1"># allocating store memory</span>
+<span class="n">store_memaddr</span> <span class="o">=</span> <span class="n">_binary_c_bindings</span><span class="o">.</span><span class="n">return_store_memaddr</span><span class="p">()</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">store_memaddr</span><span class="p">)</span>
+
+<span class="c1"># Here we set up the argument string that is passed to the bindings</span>
+<span class="n">argstring</span> <span class="o">=</span> <span class="s2">&quot;&quot;&quot;</span>
+<span class="s2">binary_c M_1 </span><span class="si">{M_1}</span><span class="s2"> orbital_period </span><span class="si">{orbital_period}</span><span class="s2"> eccentricity </span><span class="si">{eccentricity}</span><span class="s2"> metallicity </span><span class="si">{metallicity}</span><span class="s2"> max_evolution_time </span><span class="si">{max_evolution_time}</span><span class="s2"></span>
+<span class="s2">&quot;&quot;&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+    <span class="n">M_1</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span>
+    <span class="n">orbital_period</span><span class="o">=</span><span class="mi">4500</span><span class="p">,</span>
+    <span class="n">eccentricity</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span>
+    <span class="n">metallicity</span><span class="o">=</span><span class="mf">0.02</span><span class="p">,</span>
+    <span class="n">max_evolution_time</span><span class="o">=</span><span class="mi">15000</span><span class="p">,</span>
+<span class="p">)</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span>
+
+<span class="c1">#</span>
+<span class="n">output</span> <span class="o">=</span> <span class="n">_binary_c_bindings</span><span class="o">.</span><span class="n">run_system</span><span class="p">(</span><span class="n">argstring</span><span class="p">,</span> <span class="n">store_memaddr</span><span class="o">=</span><span class="n">store_memaddr</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">output</span><span class="p">)</span>
+
+<span class="c1"># Freeing store</span>
+<span class="n">_binary_c_bindings</span><span class="o">.</span><span class="n">free_store_memaddr</span><span class="p">(</span><span class="n">store_memaddr</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+&lt;capsule object &#34;STORE&#34; at 0x7f163859d0c0&gt;
+SINGLE_STAR_LIFETIME 10 27.7358
+
+</pre></div></div>
+</div>
+</div>
+<div class="section" id="Getting-information-from-binary_c">
+<h3>Getting information from binary_c<a class="headerlink" href="#Getting-information-from-binary_c" title="Permalink to this headline">¶</a></h3>
+<p>We can get information for a parameter via return_help(parameter_name): This will return an unparsed output</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[11]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="nb">print</span><span class="p">(</span><span class="n">_binary_c_bindings</span><span class="o">.</span><span class="n">return_help</span><span class="p">(</span><span class="s1">&#39;M_1&#39;</span><span class="p">))</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+binary_c help for variable : M_1 &lt;Float&gt;
+
+The initial mass of star one (in solar units, internally this is star index 0).
+
+Default : 0
+
+
+
+
+</pre></div></div>
+</div>
+<p>We can get information on all available parameters via return_help(parameter_name):</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[16]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="nb">print</span><span class="p">(</span><span class="n">_binary_c_bindings</span><span class="o">.</span><span class="n">return_help_all</span><span class="p">())</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+
+############################################################
+##### Section Stars
+############################################################
+metallicity : This sets the metallicity of the stars, i.e. the amount (by mass) of matter which is not hydrogen or helium. If you are using the BSE algorithm, this must be 1e-4 &lt;= metallicity &lt;= 0.03. See also nucsyn_metallicity and effective_metallicity. : (null)
+effective_metallicity : This sets effective metallicity of stars as used in routines like the Schneider wind loss. If not set, or set to DEFAULT_TO_METALLICITY (==-1, the default), this is just the same as metallicity. The main difference between effective_metallicity and metallicity is the range of validity: 0 &lt;= effective_metallicity &lt;= 1, while metallicity&#39;s range of validity is limited by the stellar evolution algorithm (so, for BSE, is 1e-4 &lt;= metallicity &lt;= 0.03). : (null)
+M_1 : The initial mass of star one (in solar units, internally this is star index 0). : (null)
+M_2 : The initial mass of star two (in solar units, internally this is star index 1). : (null)
+M_3 : The initial mass of star three (in solar units, internally this is star index 2). : (null)
+M_4 : The initial mass of star four (in solar units, internally this is star index 3). : (null)
+vrot1 : The initial equatorial rotational velocity of star one (in km/s, internally this is star index 0). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot2,3,4. : (null)
+vrot2 : The initial equatorial rotational velocity of star two (in km/s, internally this is star index 1). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,3,4. : (null)
+vrot3 : The initial equatorial rotational velocity of star three (in km/s, internally this is star index 2). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,2,4. : (null)
+vrot4 : The initial equatorial rotational velocity of star four (in km/s, internally this is star index 3). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,2,3. : (null)
+Prot1 : The initial equatorial rotational velocity of star one (in km/s, internally this is star index 0). See also Prot2,3,4. : (null)
+Prot2 : The initial equatorial rotational velocity of star two (in km/s, internally this is star index 1). See also Prot1,3,4. : (null)
+Prot3 : The initial equatorial rotational period of star three (in days, internally this is star index 2). See also Prot1,2,4. : (null)
+Prot4 : The initial equatorial rotational period of star four (in days, internally this is star index 3). See also Prot1,2,3. : (null)
+inclination1 : The initial inclination of star one (in degrees). : (null)
+inclination2 : The initial inclination of star two (in degrees). : (null)
+inclination3 : The initial inclination of star three (in degrees). : (null)
+inclination4 : The initial inclination of star four (in degrees). : (null)
+B_1 : The initial magnetic field of star one (in Gauss, internally this is star index 0). : (null)
+B_2 : The initial magnetic field of star two (in Gauss, internally this is star index 1). : (null)
+B_3 : The initial magnetic field of star three (in Gauss, internally this is star index 2). : (null)
+B_4 : The initial magnetic field of star four (in Gauss, internally this is star index 3). : (null)
+B_inclination1 : The initial inclination of the magnetic field of star one (in degrees). : (null)
+B_inclination2 : The initial inclination of the magnetic field of star two (in degrees). : (null)
+B_inclination3 : The initial inclination of the magnetic field of star three (in degrees). : (null)
+B_inclination4 : The initial inclination of the magnetic field of star four (in degrees). : (null)
+stellar_type_1 : Set the stellar type of star 1 (internal index 0), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)
+stellar_type_2 : Set the stellar type of star 2 (internal index 1), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)
+stellar_type_3 : Set the stellar type of star 3 (internal index 2), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)
+stellar_type_4 : Set the stellar type of star 4 (internal index 3), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)
+max_stellar_type_1 : The maximum stellar type of star 1 (internal index 0). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.
+ : (null)
+max_stellar_type_2 : The maximum stellar type of star 2 (internal index 1). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.
+ : (null)
+max_stellar_type_3 : The maximum stellar type of star 3 (internal index 2). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.
+ : (null)
+max_stellar_type_4 : The maximum stellar type of star 4 (internal index 3). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.
+ : (null)
+probability : The probability is a weighting applied to the star based on, say, the initial mass function. When running a grid of stars to simulate *all* stars, the summed probability of all the stars should be 1.0. : (null)
+phasevol : The system&#39;s phase volume, used by binary_grid. : (null)
+stellar_structure_algorithm : Set the stellar structure algorithm. 0=modified BSE (default), 1=none, 2=external function (must be defined by the calling code), 3=binary_c (not yet implemented). : (null)
+solver : The type of solver. Default is the Forward-Euler (0), but could be RK2 (1), RK4 (2) or a predictor-corretor (3). : (null)
+max_evolution_time : Set the maximum age for the stars (Myr). : (null)
+max_model_number : Set the maximum number of models, ignored if 0 (default is 0). : (null)
+monte_carlo_kicks : Turn on Monte-Carlo SN kicks. On (True) by default, and indeed other algorithms are probably broken. : (null)
+disable_debug : Disables debug output. Only has an effect when DEBUG is 1, which probably requires a rebuild. Default FALSE. : (null)
+timestep_logging : Turn on timestep logging (default is False). : (null)
+rejects_in_log : Show timestep rejections in the main log (default is False). : (null)
+vandenHeuvel_logging : Turn on van den Heuvel logging (default is False). : (null)
+evolution_splitting : If True, turn on splitting of an evolutionary run if splitpoint (e.g. supernova) occurs. : (null)
+disable_events : Whether to disable the new events code (defaults to False, so we use events by default)
+ : (null)
+evolution_splitting_sn_eccentricity_threshold : Threshold eccentricity above which evolution splitting happens in a system with no SN kick. (0.01) : (null)
+evolution_splitting_sn_n : Number of runs to split into when a SN occurs. : (null)
+evolution_splitting_maxdepth : Max number of splits in an evolutionary run. : (null)
+equation_of_state_algorithm : Set the equation of state algorithm. 0 = Paczynski. : (null)
+opacity_algorithm : Set the opacity algorithm. 0 = Paczynski, 1 = Ferguson/Opal. : (null)
+wind_mass_loss : Defines the algorithm used for stellar winds. 0 = none, 1 = Hurley et al. (2002), 2 = Schneider (2018). : 0
+gbwind : Wind prescription for first red giant branch stars.  0=Reimers (Hurley et al 2000/2002; choose gb_reimers_eta=0.5 for their mass loss rate), 1=Schroeder+Cuntz 2005 (set gb_reimers_eta=1.0 for their mass loss rate). : (null)
+mattsson_Orich_tpagbwind : Experimental : turns on Mattsson&#39;s TPAGB wind when the star is oxygen rich. Requires MATTSSON_MASS_LOSS. : (null)
+magnetic_braking_factor : Multiplier for the magnetic braking angular momentum loss rate. : (null)
+magnetic_braking_gamma : gamma factor in Rappaport style magnetic braking expression. : (null)
+magnetic_braking_algorithm : Algorithm for the magnetic braking angular momentum loss rate. 0 = Hurley et al. 2002, 1 = Andronov, Pinnsonneault and Sills 2003, 2 = Barnes and Kim 2010  : (null)
+helium_flash_mass_loss : Mass to be lost at the helium flash. : (null)
+gb_reimers_eta : First red giant branch wind multiplication factor, cf. eta in Reimers&#39; mass loss formula. (This multiplies the 4e-13 in Reimers&#39; formula, or the 8e-14 in Schroeder and Cuntz.) : (null)
+gbwindfac : Multiplier for the giant branch wind mass loss rate : (null)
+tpagbwindfac : Multiplier for the TPAGB wind mass loss rate : (null)
+eagbwindfac : Multiplier for the EAGB wind mass loss rate : (null)
+nieuwenhuijzen_windfac : Multiplier for the Nieuwenhuijzen &amp; de Jager wind mass loss rate : (null)
+tpagbwind : Wind prescription during the TPAGB. 0=Karakas 2002 (a modified Vassiliadis and Wood 1993), 1=Hurley et al 2000/2002 (Vassiliadis and Wood 1993), 2=Reimers, 3=Bloecker, 4=Van Loon,  5=Rob&#39;s C-wind (broken?), 6,7=Vassiliadis and Wood 1993 (Karakas,Hurley variants respectively) when C/O&gt;1, 8=Mattsson, 9 = Goldman et al. (2017), 10 = Beasor et al. (2020). : (null)
+eagbwind : Wind prescription during the EAGB. 0=BSE (Hurley+2002, based on VW93), 1 = Goldman et al. (2017), 2 = Beasor et al. (2020). : (null)
+wind_gas_to_dust_ratio : Gas to dust ratio used in wind calculations (e.g. Goldman et al. 2017). Typically 200 (Milky Way)-500 (Magellanic Clouds). Default is 200, approximately as in MW stars. : (null)
+vwind_multiplier : Multiplier for the stellar wind velocity. : (null)
+vwind_beta : Beta for stellar wind speed calculations, where vwind=sqrt(beta) * escape velocity. Default 0.125 (from BSE, Hurley et al. 2002).  : (null)
+superwind_mira_switchon : In the Vassiliadis and Wood (1993) AGB wind prescription, the superwind is turned on at a given Mira period, usually 500 days. You can vary when this switch-on happens with this parameter. : (null)
+vw93_mira_shift : In the Vassiliadis and Wood (1993) AGB wind prescription, the wind loss rate depends on the Mira period plus this offset. Requires VW93_MIRA_SHIFT. : (null)
+vw93_multiplier : In the Vassiliadis and Wood (1993) AGB wind prescription, the wind loss rate is multiplied by this factor. Requires VW93_MULTIPLIER. : (null)
+tpagb_reimers_eta : TPAGB Reimers wind multiplication factor, cf. eta in Reimers&#39; mass loss formula. (This multiplies the 4e-13 in Reimers&#39; formula, or the 8e-14 in Schroeder and Cuntz.) Note that Reimers is not the default TPAGB wind prescription. See also tpagbwind. : (null)
+artificial_mass_accretion_rate%d : Constant mass accretion rate for star &lt;n&gt;. : (null)
+artificial_angular_momentum_accretion_rate%d : Constant angular momentum accretion for star &lt;n&gt;. : (null)
+artificial_orbital_angular_momentum_accretion_rate : Constant angular momentum accretion rate on the orbit. : (null)
+artificial_accretion_start_time : Time at which artificial accretion stars. Ignored if &lt;0 (default is -1). : (null)
+artificial_accretion_end_time : Time at which artificial accretion ends. Ignored if &lt;0 (default is -1). : (null)
+wr_wind : Massive-star (WR) wind prescription. 0 = Hurley et al 2000/2002, 1=Maeder and Meynet, 2=Nugis and Lamers, 3=John Eldridge&#39;s version of Vink&#39;s early-2000s wind (See Lynnette Dray&#39;s thesis, or John Eldridge&#39;s thesis) : (null)
+wr_wind_fac : Massive-star (WR) wind multiplication factor. : (null)
+wrwindfac : Massive-star (WR) wind multiplication factor. Synonymous with wr_wind_fac (which you should use instead). : (null)
+BH_prescription : Black hole mass prescrition: relates the mass of a newly formed black hole to its progenitor&#39;s (CO) core mass. 0=Hurley et al 2000/2002, 1=Belczynski (early 2000s). : (null)
+PPISN_prescription : (Pulsational) Pair-Instability Supernova prescription: Relates initial helium core mass of star to whether the star undergoes PPISN or PISN. Requires PPISN flag to be True (see binary_c_parameters.h). 0=no ppisn, 1=Farmer et al 2019. : Ignore
+sn_kick_distribution_II : Set the distribution of speeds applied to kick type II core collapse supernova systems. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_distribution_ECAP : Set the distribution of speeds applied to the remnants of electron-capture supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_distribution_NS_NS : Set the distribution of speeds applied to kick neutron stars and black holes that survive a NS-NS merger. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_distribution_IBC : Set the distribution of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_distribution_GRB_COLLAPSAR : Set the distribution of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova which is also a collapsar. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_distribution_TZ : Set the distribution of speeds applied to kick newly-born neutron stars and black holes at the death of a Thorne-Zytkow object. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_distribution_AIC_BH : Set the distribution of speeds applied to kick newly-born neutron stars black holes after accretion induced collapse of a neutron star. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_distribution_BH_BH : Set the distribution of speeds applied to black holes formed by the merger of two black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_distribution_BH_NS : Set the distribution of speeds applied to black holes formed by the merger of a neutron star and a black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_distribution_IA_Hybrid_HeCOWD : Set the distribution of speeds applied to any survivor of a hybrid He-COWD SNIa explosion. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_distribution_IA_Hybrid_HeCOWD_subluminous : Set the distribution of speeds applied to any survivor of a subluminous hybrid He-COWD SNIa explosion. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_distribution_PPISN : Set the distribution of speeds applied to PPISN supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_distribution_PISN : Set the distribution of speeds applied to PISN supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_distribution_PHDIS : Set the distribution of speeds applied to PHDIS supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_dispersion_II : Set the dispersion of speeds applied to kick type II core collapse supernova systems. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_dispersion_ECAP : Set the dispersion of speeds applied to the remnants of electron-capture supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_dispersion_NS_NS : Set the dispersion of speeds applied to kick neutron stars and black holes that survive a NS-NS merger. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_dispersion_IBC : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_dispersion_GRB_COLLAPSAR : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova which is also a collapsar. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_dispersion_TZ : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes at the death of a Thorne-Zytkow object. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_dispersion_AIC_BH : Set the dispersion of speeds applied to kick newly-born neutron stars black holes after accretion induced collapse of a neutron star. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_dispersion_BH_BH : Set the dispersion of speeds applied to black holes formed by the merger of two black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_dispersion_BH_NS : Set the dispersion of speeds applied to black holes formed by the merger of a neutron star and a black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_dispersion_IA_Hybrid_HeCOWD : Set the dispersion of speeds applied to the survivor of a SNIa explosion of a hybrid He-COWD. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_dispersion_IA_Hybrid_HeCOWD_subluminous : Set the dispersion of speeds applied to the survivor of a subluminous SNIa explosion of a hybrid He-COWD. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_dispersion_PPISN : Set the dispersion of speeds applied to the survivor of a PPISN supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_dispersion_PISN : Set the dispersion of speeds applied to the survivor of a PISN supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_dispersion_PHDIS : Set the dispersion of speeds applied to the survivor of a PHDIS supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)
+sn_kick_companion_IA_He : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the, kick on the companion when a Ia He supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_IA_ELD : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the, kick on the companion when a Ia ELD (sub-Mch) supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_IA_CHAND : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the, kick on the companion when a Ia Mch supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_AIC : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the, kick on the companion when an accretion induced collapse (supernova) occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_ECAP : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the, kick on the companion when an electron capture supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_IA_He_Coal : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the, kick on the companion when a Ia helium merger supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_IA_CHAND_Coal : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the, kick on the companion when a Ia Mch merger supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_NS_NS : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the, kick on the companion when a neutron-star neutron-star merger. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_GRB_COLLAPSAR : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the, kick on the companion when a GRB Collapsar (rapidly rotating SN Ibc) supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_HeStarIa : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the, kick on the companion when a He-star Ia supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_IBC : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the, kick on the companion when a type Ib/c supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_II : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the, kick on the companion when a type II supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_IIa : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the, kick on the companion when a type IIa supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_WDKICK : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the, kick on the companion when a WD is kicked. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_TZ : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the, kick on the companion when a Thorne-Zytkow object is formed. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_AIC_BH : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the, kick on the companion when a neutron star collapses to a black hole. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_BH_BH : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the, kick on the companion when two black holes merge. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_BH_NS : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the, kick on the companion when a black hole merges with a neutron star. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_IA_Hybrid_HeCOWD : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the kick on the companion, if it survives, in a hybrid He-COWD type Ia explosion. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_IA_Hybrid_HeCOWD_subluminous : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the kick on the companion, if it survives, in a subluminous hybrid He-COWD type Ia explosion. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_PPISN : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the kick on the companion, if it survives, in a PPISN supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_PISN : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the kick on the companion, if it survives, in a PISN supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+sn_kick_companion_PHDIS : Set the speed (if &gt;=0) of, or the algothim (if &lt;0) used to calculate the kick on the companion, if it survives, in a PHDIS supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)
+wd_sigma : Set the speed at which white dwarfs are kicked when they form, in km/s. Default is zero (i.e. no kick). Requires WD_KICKS. : (null)
+wd_kick_direction : Set the direction of white dwarf kicks. 0 = random, 1 = up, 2 = forward, 3 = backward, 4 = inward, 5 = outward. Requires WD_KICKS. : (null)
+wd_kick_when : Decide when to kick a white dwarf. 0=at birth, 1=at first RLOF, 2=at given pulse number (see wd_kick_pulse_number), 3 at every pulse Requires WD_KICKS. : (null)
+wd_kick_pulse_number : Apply a kick to a star at a desired pulse number on the TPAGB (i.e. pre-WD). Requires WD_KICKS. : (null)
+minimum_helium_ignition_core_mass : Minimum helium core mass required to ignite helium in the case that the hydrogen envelope is stripped on the giant branch, e.g. to make an sdB or sdO star. Typically 0.4, if 0.0 then the BSE algorithm (based on the total mass) is used. : (null)
+minimum_CO_core_mass_for_carbon_ignition : Minimum CO core mass for carbon ignition, assuming Mc,bagb&gt;1.6Msun. Typically around 1.08Msun (Pols+1998). : (null)
+minimum_CO_core_mass_for_neon_ignition : Minimum CO core mass for neon ignition. Typically around 1.42Msun. Stars that have cores that ignite carbon, but not neon explode in electon-capture supernovae. : (null)
+minimum_mcbagb_for_nondegenerate_carbon_ignition : Minimum Mc,bagb (core mass at the base of the AGB) for non-degenerate carbon ignition. Typically around 2.25Msun (Pols+1998). : (null)
+maximum_mcbagb_for_degenerate_carbon_ignition : Maximum Mc,bagb (core mass at the base of the AGB) for degenerate carbon ignition. Typically around 1.6Msun (Pols+1998). : (null)
+max_neutron_star_mass : Maximum mass of a neutron star before it collapses to a black hole. Typically around 2Msun. : (null)
+chandrasekhar_mass : The Chandrasekhar mass, usually 1.44Msun : (null)
+delta_mcmin : A parameter to reduce the minimum core mass for third dredge up to occur on the TPAGB. As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. : (null)
+lambda_min : A parameter to increase the efficiency of third dredge up on the TPAGB. The efficiency is lambda * lambda_mult, and setting lambda_min&gt;0 implies that, once Mc&gt;Mcmin (see delta_mcmin) lambda=Max(lambda(fit to Karakas), lambda_min). As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. See also lambda_multiplier. : (null)
+lambda_multiplier : A parameter to increase the efficiency of third dredge up on the TPAGB. The efficiency is lambda * lambda_mult, and setting lambda_min&gt;0 implies that, once Mc&gt;Mcmin (see delta_mcmin) lambda=Max(lambda(fit to Karakas), lambda_min). As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. : (null)
+minimum_envelope_mass_for_third_dredgeup : The minimum envelope mass for third dredge up on the TPAGB. Early, solar metallicity models by Straniero et al suggested 0.5Msun is typical. However, circumstantial evidence (Izzard et al 2009) as well as newer models by Stancliffe and Karakas suggest that at low metallicity a value nearer zero is more appropriate. : (null)
+mass_of_pmz : The mass in the partial mixing zone of a TPAGB star, using the Karakas 2012 tables. Ask Carlo Abate for more details, or see the series of papers Abate et al 2012, 2013, 2014. Requires NUCSYN and USE_TABULAR_INTERSHELL_ABUNDANCES_KARAKAS_2012. : (null)
+c13_eff : The &#34;efficiency&#34; of partial mixing in a TPAGB star intershell region, when using the s-process tables of Gallino, Busso, Lugaro et al. as provided by Maria Lugaro for the Izzard et al. 2009 paper. Requires NUCSYN and NUCSYN_S_PROCESS. : (null)
+mc13_pocket_multiplier : Multiplies the mass in the partial mixing zone of a TPAGB star, when using the s-process tables of Gallino, Busso, Lugaro et al. as provided by Maria Lugaro for the Izzard et al. 2009 paper. Requires NUCSYN and NUCSYN_S_PROCESS. : (null)
+tides_convective_damping : Tidal convective damping algorithm. 0=TIDES_HURLEY2002 Zahn 197x timescales + Hut, as in Hurley et al (2002), 1 = TIDES_ZAHN1989 : Zahn 1989 lambdas + Hut. : (null)
+E2_prescription : Choose how to calculate the E2 structural parameter (used in tidal timescale calculations). 0=Hurley 1=Izzard (see Siess et al 2013). : (null)
+dtfac : A parameter to decrease the timestep ONLY during the TPAGB phase. : (null)
+hbbtfac : A parameter to modulate the temperature at the base of the hot-bottom burning zone in TPAGB stars. (Works only if NUCSYN is defined) : (null)
+wind_multiplier_%d : Wind multiplier for the stellar type specified by the intger %d. By default these are all 1.0. : (null)
+wind_type_multiplier_%d : Wind multiplier for different types of wind (MS, GB, AGB, WR, LBV, OTHER), given by the integer %d. By default these are all 1.0. : (null)
+pre_main_sequence : Set to True to turn on pre-main sequence evolution. Currently this is not a special stellar type, rather the first (small) fraction of the main sequence has increased radii to match the Railton et al 2014 fits to Tout&#39;s pre-main sequence stars. Requires PRE_MAIN_SEQUENCE. See also pre_main_sequence_fit_lobes. : (null)
+pre_main_sequence_fit_lobes : Set to True force a pre-main sequence star into its Roche lobe. This is done by artificially aging it. Requires PRE_MAIN_SEQUENCE : (null)
+small_envelope_method : Choose the method used to determine the stellar radius when the envelope mass is very thin. 0 = Hurley et al. (2002), 1 = Miller Bertolami et al. (2016+) for GB and AGB stars only. : (null)
+timestep_modulator : Multiplier applied to the global timestep. Requires TIMESTEP_MODULATION. : (null)
+timestep_multiplier%d : Multiplier applied to timestep limit &lt;n&gt;. : (null)
+maximum_timestep : The maximum timestep (MYr). : (null)
+zoomfac_multiplier_decrease : When a timestep is rejected, decrease the timestep by this factor (0.5). : (null)
+zoomfac_multiplier_increase : When a timestep is rejected, zooms, then succeeds, increase the timestep by this factor (1.2). : (null)
+maximum_timestep_factor : The maximum factor between two subsequent timesteps (1.2). : (null)
+maximum_nuclear_burning_timestep : The maximum timestep (MYr) in any nuclear burning phase. : (null)
+nova_retention_method : Algorithm used to calculate the amount of mass retained during a nova explosion. 0=use nova_retention_fraction. (other methods pending) : (null)
+MINT_metallicity : This sets the metallicity for MINT. It is ignored if set to -1.0, the default, in which case the normal metallicity parameter is used. : (null)
+gaia_Teff_binwidth : log10(Effective temperature) bin width used to make Gaia-like HRDs
+ : (null)
+gaia_L_binwidth : log10(luminosity) bin width used to make Gaia-like HRDs
+ : (null)
+gaia_colour_transform_method : Use this to select the method used to transform to Gaia colours from other colour schemes. GAIA_CONVERSION_UBVRI_UNIVARIATE_JORDI2010 = 0 Jordi et al.&#39;s univariate UBVRI fits, GAIA_CONVERSION_UBVRI_BIVARIATE_JORDI2010 = 1 Jordi et al.&#39;s bivariate UBVRI fits, GAIA_CONVERSION_ugriz_UNIVARIATE_JORDI2010 = 2 Jordi et al.&#39;s univariate UBVRI fits, GAIA_CONVERSION_ugriz_BIVARIATE_JORDI2010 = 3 Jordi et al.&#39;s univariate ugriv fits, GAIA_CONVERSION_UBVRI_UNIVARIATE_EVANS2018 = 4 Evans et al. (2018, DR2) fits, GAIA_CONVERSION_ugriz_UNIVARIATE_EVANS2018 = 5 Evans et al. (2018, DR2) fits, GAIA_CONVERSION_UBVRI_RIELLO2020 = 6 Riello et al. (2020, DR3) fits, GAIA_CONVERSION_ugriz_RIELLO2020 = 7 Riello et al. (2020, DR3) fits. : (null)
+rotationally_enhanced_mass_loss : Set to 1 to enable rotationally enhanced mass loss rate algorithms: 0= none, 1=formula cf. Langer models (=ROTATIONALLY_ENHANCED_MASSLOSS_LANGER_FORMULA), 2=limit accretion rate before wind loss is applied, 3 = both 1 and 2. See also rotationally_enhanced_exponent : (null)
+AGB_core_algorithm : Algorithm to use for calculating AGB core masses. 0=Hurley et al. 2002 if no NUCSYN, Karakas 2002 if NUCSYN is defined; 1=Hurley et al. 2002 (overshooting models); 1=Karakas 2002 (non-overshooting models). : (null)
+AGB_radius_algorithm : Algorithm to use for calculating radii on the TPAGB. : (null)
+AGB_luminosity_algorithm : Algorithm to use for calculating luminosities on the TPAGB. : (null)
+AGB_3dup_algorithm : Algorithm to use for calculating third dredge up efficiency on the TPAGB. : (null)
+overspin_algorithm : Algorithm to determine what we do when a star is rotating at its breakup velocity. OVERSPIN_BSE (0) conservatively transfers the angular momentum back to the orbit. OVERSPIN_MASSLOSS uses the rotationally_enhanced_massloss parameter to lose mass which carries away the angular momentum. : (null)
+rotationally_enhanced_exponent : The exponent (power) by which rotationally enhanced mass loss is raised. Requires ROTATIONALLY_ENHANCED_MASS_LOSS. See also rotationally_enhanced_mass_loss. : (null)
+batchmode : Set the batchmode control variable. Use only if you know what you are doing! : (null)
+speedtests : If True, turns on speedtests during version information (off by default). : (null)
+use_fixed_timestep_%d : Set to True to use fixed timestep &lt;n&gt;, False to turn off. Fixed timesteps are on (this is True) by default. : (null)
+task%d : Control tasks to be performed by binary_c. By default, these are all TRUE. For more information see binary_c_macros.h, particularly the BINARY_C_TASK_* macros. : (null)
+orbiting_object : Usage: --orbiting_object mass,spinrate,central_object,period. : 1.0
+orbiting_objects_log : If True, turn on orbiting-object log. : (null)
+orbiting_objects_log : If True, turn on orbiting-object log. : (null)
+orbiting_objects_wind_accretion_multiplier : Multiplier for wind accretion on orbiting objects. Hurley et al 2002 use 1.5, which is the default. : (null)
+orbiting_objects_close_pc_threshold : How close are orbiting objects allowed to be? Set this to be the absolute percentage difference minimum. : (null)
+orbiting_objects_tides_multiplier : Multiplier for tidal torques on orbiting objects. : (null)
+evaporate_escaped_orbiting_objects : If True, evaporate orbiting objects that have escaped the system. : (null)
+RLOF_transition_objects_escape : If True, objects that escape their Roche lobe are ejected from the system, otherwise they are placed just outside the minimum stable orbit. : (null)
+PN_resolve : If True, the timestep will be shortened to resolve better the PN phase (FALSE). : (null)
+PN_resolve_minimum_luminosity : The luminosity above which extra time resolution for PNe is applied (see PN_resolve). : (null)
+PN_resolve_maximum_envelope_mass : The envelope mass below which extra time resolution for PNe is applied (see PN_resolve). : (null)
+PN_resolve_minimum_effective_temperature : The minimum effective temperature above which extra time resolution for PNe is applied (see PN_resolve). : (null)
+PN_fast_wind : If True, thin-envelope PNe will have fast winds (FALSE). : (null)
+PN_fast_wind_dm_GB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_GB) : (null)
+PN_fast_wind_mdot_GB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_GB) : (null)
+PN_fast_wind_dm_AGB : The envelope mass below which fast wind used during the AGB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_AGB) : (null)
+PN_fast_wind_mdot_AGB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_AGB) : (null)
+HeWD_HeWD_ignition_mass : HeWD-HeWD mergers above this mass reignite helium. (0.3) : (null)
+wind_Nieuwenhuijzen_luminosity_lower_limit : Above this luminosity we activate the Nieuwenhuijzen and de Jager wind (4e3 Lsun). : (null)
+wind_LBV_luminosity_lower_limit : Above this luminosity we activate the LBV wind (6e5 Lsun). : (null)
+
+############################################################
+##### Section Binary
+############################################################
+separation : Set the orbital separation (actually the semi-major axis) of the binary (internal index 0, stellar indices 0 and 1) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)
+separation_triple : Set the orbital separation (actually the semi-major axis) of the triple (internal index 1) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)
+separation_quadruple : Set the orbital separation (actually the semi-major axis) of the quadruple (internal index 2) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)
+orbital_period : Set the initial orbital period of the binary, stars 1 and 2 (internal indices 0 and 1) in days. See also separation. : (null)
+orbital_period_triple : Set the initial orbital period of the triple in days. See also separation. : (null)
+orbital_period_quadruple : Set the orbital period of the outer binary in a quadrulple (stars 3 and 4, internal indices 2 and 3) in days. See also separation. : (null)
+eccentricity : Set the initial eccentricity of the binary orbit (stars 1 and 2, internal indices 0 and 1). : (null)
+eccentricity_triple : Set the initial eccentricity of the triple orbit. : (null)
+eccentricity_quadruple : Set the initial eccentricity of the outer binary of a quadruple (stars 3 and 4, internal indices 2 and 3). : (null)
+incliniation : Set the initial orbital_inclination of the binary relative to zero. : (null)
+incliniation_triple : Set the initial orbital_inclination of the triple orbit relative to zero. : (null)
+incliniation_quadruple : Set the initial orbital_inclinationy of the quadruple orbit relative to zero. : (null)
+orbital_phase : Set the initial orbital phase of the binary orbit. : (null)
+orbital_phase_triple : Set the initial orbital phase of the triple orbit. : (null)
+orbital_phase_quadruple : Set the initial orbital phase of the quadruple orbit. : (null)
+argument_of_periastron : Set the initial argument of periastron of the binary orbit. : (null)
+argument_of_periastron_triple : Set the initial argument of periastron of the triple orbit. : (null)
+argument_of_periastron_quadruple : Set the initial argument of periastron of the quadruple orbit. : (null)
+disc_timestep_factor : Factor that multiplies the natural timestep of a disc. : (null)
+white_dwarf_cooling_model : White dwarf cooling model, relates age to luminosity. WHITE_DWARF_COOLING_MESTEL = 0 is Mestel&#39;s model, WHITE_DWARF_COOLING_MESTEL_MODIFIED = 1 is Hurley&#39;s modified Mestel model, WHITE_DWARF_COOLING_CARRASCO2014 = 2 is based on Carrasco (2014) tables.   : (null)
+white_dwarf_radius_model : White dwarf radius model, radius to mass (and perhaps age). WHITE_DWARF_RADIUS_NAUENBERG1972 = 0 Nauenberg (1972), WHITE_DWARF_RADIUS_MU = 1 mu-dependent variant, WHITE_DWARF_RADIUS_CARRASCO2014 = 2 is based on Carrasco (2014) tables. : (null)
+cbdisc_mass_loss_inner_viscous_accretion_method : Chooses where the mass that is accreted from the inner edge of a circumbinary disc goes, i.e. to which star. 0 = Young and Clarke 2015, 1 = Gerosa et al 2015, 2 = 50:50 (i.e. not dependence on mass). : (null)
+cbdisc_inner_edge_stripping : If True, allow inner edge mass stripping. : (null)
+cbdisc_end_evolution_after_disc : If True, stop evolution when a disc evaporates. : (null)
+cbdisc_no_wind_if_cbdisc : If True, disable stellar winds when there is a circumbinary disc. : (null)
+cbdisc_outer_edge_stripping : If True, allow outer edge mass stripping. : (null)
+disc_n_monte_carlo_guesses : Number of monte carlo guesses to try in the disc solver if the normal list of guesses fails (0). : (null)
+disc_log : If 1, turn on the disc log. Requires DISC_LOG to be defined on build. : (null)
+disc_log2d : If 1, turn on the 2d disc log. Requires DISC_LOG to be defined on build. : (null)
+disc_log_dt : If non-zero, only allows disc log output every disc_log_dt Myr. : (null)
+disc_log_directory : Directory into which disc logging is sent (must exist!). : /tmp/
+post_ce_adaptive_menv : If TRUE, and if post_ce_objects_have_envelopes is TRUE, then the envelope mass of a post-CE star is such that it sits just inside its Roche lobe. If FALSE then a fixed (thin) envelope mass is applied that depends on the stellar type (see macros POST_CE_ENVELOPE_DM_GB, POST_CE_ENVELOPE_DM_EAGB and POST_CE_ENVELOPE_DM_TPAGB). : (null)
+post_ce_objects_have_envelopes : If TRUE then post-common-envelope objects have thin envelopes. You need this if you are to have post-CE post-AGB stars. Note that this *may* be unstable, i.e. you may end up having many CEEs. The mass in the envelope is controlled by post_ce_adaptive_menv. TRUE by default. : (null)
+PN_comenv_transition_time : post-common envelope transition time in years (1e2).  This is the time taken to move from CEE ejection to Teff &gt; 30e4 K. Hall et al. (2013) suggest ~100 years. : (null)
+minimum_time_between_PNe : The minimum time (Myr) between planetary nebula detections. This prevents multiple, fast common envelopes triggering two PNe (0.1). : (null)
+PN_Hall_fading_time_algorithm : In stars with low mass (&lt;0.45Msun) cores, you can choose to set the PN fading time to either the minimum (PN_HALL_FADING_TIME_ALGORITHM_MINIMUM) or maximum (PN_HALL_FADING_TIME_ALGORITHM_MAXIMUM) as shown in Fig. 6 of Hall et al. (2013). : (null)
+PPN_envelope_mass : Desired pre-planetary nebula (post-AGB) envelope mass. : (null)
+cbdisc_eccentricity_pumping_method : Select from various eccentricity-pumping methods when there is a circumbinary disc. Requires DISCS. 0 = off. : (null)
+cbdisc_viscous_photoevaporative_coupling : Set to 1 to turn on viscous-photoevaporative coupling in circumbinary discs. Requires DISCS. 0 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_NONE = off, 1 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_INSTANT instant, 2 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_VISCOUS slow, viscous wind. : (null)
+cbdisc_inner_edge_stripping_timescale : Defines the timescale for mass loss from by inner edge stripping. 0 = instant, 1 = very long, 2 = viscous at Revap_in, 3 = orbital at Revap_in. : (null)
+cbdisc_outer_edge_stripping_timescale : Defines the timescale for mass loss from by outer edge stripping. 0 = instant, 1 = very long, 2 = viscous at Revap_in, 3 = orbital at Revap_out. : (null)
+cbdisc_viscous_L2_coupling : Set to 1 to turn on viscous-L2-loss coupling in circumbinary discs. Requires DISCS. 0 = off. : (null)
+gravitational_radiation_model : Model for gravitational radiation from the system. 0=Hurley et al 2002 (Landau and Lifshitz 1951). 1 = as 0 but only when there is no RLOF. 2 = none. : (null)
+nova_irradiation_multiplier : Multiplier for nova-radiative induced mass loss. (Shara+1986) : (null)
+gravitational_radiation_modulator_J : Modulator for gravitational wave radiation angular momentum loss rate (1.0). : (null)
+gravitational_radiation_modulator_e : Modulator for gravitational wave radiation eccentricity pumping rate (1.0). : (null)
+nova_faml_multiplier : Nova friction-induced angular momentum loss multiplier. (Shara+1986) : (null)
+RLOF_angular_momentum_transfer_model : Choose angular momentum transfer model in RLOF. 0=BSE (with discs), 1=conservative : (null)
+post_SN_orbit_method : Method by which the post-SN orbit is calculated. 0=BSE, 1=Tauris&amp;Taken 1998. : (null)
+multiplicity : Multiplicity: 1=single star, 2=binary, 3=triple, 4=quadruple. : (null)
+accretion_limit_eddington_steady_multiplier : Steady accretion is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_steady_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)
+accretion_limit_eddington_LMMS_multiplier : Accretion from a low-mass, convective, main_sequence star is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_LMMS_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)
+accretion_limit_eddington_WD_to_remnant_multiplier : Accretion from a WD onto a remnant star (e.g. another white dwarf, neutron star or black hole) is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_WD_to_remnant_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)
+accretion_limit_thermal_multiplier : Mass transfer onto a MS, HG or CHeB star is limited by the accretor&#39;s thermal rate times this multiplier. : (null)
+accretion_limit_dynamical_multiplier : Mass transfer is limited by the accretor&#39;s dynamical rate times this multiplier. : (null)
+donor_limit_envelope_multiplier : Mass transfer by RLOF is limited by this fraction of the donor&#39;s envelope mass per timestep : (null)
+donor_limit_thermal_multiplier : Mass transfer by RLOF is limited by the accretor&#39;s thermal rate times this multiplier. : (null)
+donor_limit_dynamical_multiplier : Mass transfer by RLOF is limited by the donor&#39;s dynamical rate times this multiplier. : (null)
+Bondi_Hoyle_accretion_factor : Wind accretion rate, as calculated by the Bondi-Hoyle-Littleton formula, multiplcation factor. Hurley et al 2002 use 1.5, which is the default. : (null)
+tidal_strength_factor : A modulator for the tidal strength. If this factor &gt; 1 then tides are stronger, i.e. tidal timescales are reduced. : (null)
+hachisu_qcrit : Critical q=Maccretor/Mdonor above which Hachisu&#39;s disk wind turns on. : (null)
+hachisu_disk_wind : Set to True to turn on Hachisu&#39;s disk wind when material accretes too fast onto a white dwarf. This helps to make more SNeIa. See also hachisu_qcrit. : (null)
+mass_accretion_for_eld : The mass that must be accreted onto a COWD for it to ignite as an edge-lit detonation SNIa. : (null)
+WDWD_merger_algorithm : Algorithm to be used when merging two white dwarfs. 0 = Hurley et al. (2002), 1 = Perets+ (2019), 2 = Chen+ (2016, todo)  : (null)
+type_Ia_MCh_supernova_algorithm : Algorithm to be used when calculating type Ia yields from Chandrasekhar-mass exploders. 0 = DD7 (Iwamoto 1999), 1 = Seitenzahl 2013 3D hydro yields (you must also set Seitenzahl2013_model)  : (null)
+Seitenzahl2013_model : Which of Seitenzahl et al. 2013&#39;s models to use? One of N1,N3,N5,N10,N20,N40,N100L,N100,N100H,N150,N200,N300C,N1600,N1600C,N100_Z0.5,N100_Z0.1,N100_Z0.01 (defaults to N100). : N1
+type_Ia_sub_MCh_supernova_algorithm : Algorithm to be used when calculating type Ia yields from sub-Chandrasekhar-mass exploders. (Currently unused.) : (null)
+max_HeWD_mass : The maximum mass a HeWD can have before it ignites helium (0.7). : (null)
+merger_mass_loss_fraction : Fraction of the total mass which is lost when stars merge. : (null)
+merger_angular_momentum_factor : When two stars merge the resulting single star retains a fraction of the total system angular momentum (or the critical spin angular momentum, if it is smaller) multiplied by this factor. : (null)
+wind_angular_momentum_loss : Prescription for losing angular momentum in a stellar wind. 0=Hurley et al 2002 (&#39;Tout&#39;) prescription, 1=lw i.e. a factor multiplying the specific orbital angular momentum, 2=lw hybrid for fast winds. Set wind_djorb_fac to the desired factor.. : (null)
+wind_djorb_fac : Factor multiplying angular momentum loss in a stellar wind when wind_angular_momentum_loss=0 (the Tout/Hurley et al 2002 prescription). See wind_angular_momentum_loss. : (null)
+lw : Factor multiplying angular momentum loss in a stellar wind when wind_angular_momentum_loss=1,2 (the &#39;lw&#39; prescription). See wind_angular_momentum_loss. : (null)
+VW93_EAGB_wind_speed : Activate this to use Vassiliadis and Wood (1993) wind speed during the EAGB. : (null)
+VW93_TPAGB_wind_speed : Activate this to use Vassiliadis and Wood (1993) wind speed during the EAGB. : (null)
+use_periastron_Roche_radius : Set this to True to use the Roche lobe radius at periastron, rather than (the default to) assume a circular orbit. This will be useful one day when we treat RLOF in eccentric orbits properly, hopefully. : (null)
+qcrit_LMMS : Apply critical q=Mdonor/Maccretor value for low-mass main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_MS : Apply critical q=Mdonor/Maccretor value for (non-low mass) main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_HG : Apply critical q=Mdonor/Maccretor value for Hertzsprung gap stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_GB : Apply critical q=Mdonor/Maccretor value for first red giant branch stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_CHeB : Apply critical q=Mdonor/Maccretor value for core helium burning stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_EAGB : Apply critical q=Mdonor/Maccretor value for early-AGB stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_TPAGB : Apply critical q=Mdonor/Maccretor value for TP-AGB stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_HeMS : Apply critical q=Mdonor/Maccretor value for helium main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_HeHG : Apply critical q=Mdonor/Maccretor value for helium Hertzsprung gap stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_HeGB : Apply critical q=Mdonor/Maccretor value for helium red giant stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_HeWD : Apply critical q=Mdonor/Maccretor value for helium white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_COWD : Apply critical q=Mdonor/Maccretor value for carbon-oxygen white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_ONeWD : Apply critical q=Mdonor/Maccretor value for oxygen-neon white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_NS : Apply critical q=Mdonor/Maccretor value for neutron stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_BH : Apply critical q=Mdonor/Maccretor value for black holes to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_degenerate_LMMS : Apply critical q=Mdonor/Maccretor value for (low mass) main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_degenerate_MS : Apply critical q=Mdonor/Maccretor value for (non-low mass) main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_degenerate_HG : Apply critical q=Mdonor/Maccretor value for Hertzsprung gap stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_degenerate_GB : Apply critical q=Mdonor/Maccretor value for first red giant branch stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_degenerate_CHeB : Apply critical q=Mdonor/Maccretor value for core helium burning stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_degenerate_EAGB : Apply critical q=Mdonor/Maccretor value for early-AGB stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_degenerate_TPAGB : Apply critical q=Mdonor/Maccretor value for TP-AGB stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_degenerate_HeMS : Apply critical q=Mdonor/Maccretor value for helium main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_degenerate_HeHG : Apply critical q=Mdonor/Maccretor value for helium Hertzsprung gap stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_degenerate_HeGB : Apply critical q=Mdonor/Maccretor value for helium red giant stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_degenerate_HeWD : Apply critical q=Mdonor/Maccretor value for helium white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_degenerate_COWD : Apply critical q=Mdonor/Maccretor value for carbon-oxygen white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_degenerate_ONeWD : Apply critical q=Mdonor/Maccretor value for oxygen-neon white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_degenerate_NS : Apply critical q=Mdonor/Maccretor value for neutron stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+qcrit_degenerate_BH : Apply critical q=Mdonor/Maccretor value for black holes to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)
+mass_for_Hestar_Ia_upper : Only helium stars below this mass can explode as SNIa. Default is zero, i.e. it never happens. See also mass_for_Hestar_Ia_lower. : (null)
+mass_for_Hestar_Ia_lower : Only helium stars above this mass can explode as SNIa. Default is zero, i.e. it never happens. See also mass_for_Hestar_Ia_upper. : (null)
+alphaCB : Circumbinary disk viscosity parameter, alpha. : (null)
+minimum_donor_menv_for_comenv : Minimum donor envelope mass for common envelope evolution to be triggered (Msun). Default 0. : (null)
+comenv_prescription : Use this to choose which common envelope prescription you should use. 0=Hurley et al 2002 (based on the Paczyński energy model) or 1=Nelemans and Tout (angular momentum model). See also alpha_ce, comenv_ms_accretion_mass, comenv_ms_accretion_fraction, comenv_ns_accretion_fraction, comenv_ns_accretion_mass, nelemans_gamma, nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs, lambda_ce, lambda_ionisation. : (null)
+comenv_prescription%d : Use this to choose which common envelope prescription you should use. 0=Hurley et al 2002 (based on the Paczyński energy model) or 1=Nelemans and Tout (angular momentum model). See also alpha_ce, comenv_ms_accretion_mass, comenv_ms_accretion_fraction, comenv_ns_accretion_fraction, comenv_ns_accretion_mass, nelemans_gamma, nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs, lambda_ce, lambda_ionisation. : (null)
+comenv_ejection_spin_method : When a common envelope is ejected, we need to decide how fast the stars are left spinning. COMENV_EJECTION_SPIN_METHOD_DO_NOTHING (0) is the default, this just leaves the stars/stellar cores spinning with the same spin rate (omega = angular velocity) with which they entered the common envelope phase. COMENV_EJECTION_SPIN_METHOD_SYCHRONIZE instead tidally synchronizes the stars with their new orbital angular velocity. : (null)
+comenv_merger_spin_method : When a common envelope binary merges, we need to decide how fast the resulting single star is left spinning. COMENV_MERGER_SPIN_METHOD_SPECIFIC (0) is the default, this preserves angular momentum but limits the specific angular momentum of the merged star to the specific angular momentum of the system at the onset of common envelope evolution. COMENV_MERGER_SPIN_METHOD_CONSERVE_ANGMOM (1) sets the merger&#39;s angular momentum to be that of the system at the onset of common envelope evolution (which means the star may be rotating supercritically). COMENV_MERGER_SPIN_METHOD_CONSERVE_OMEGA (2) sets the spin rate (angular frequency = omega) of the merged star to be that of the orbit just at the onset of common envelope evolution. : (null)
+comenv_ms_accretion_mass : Experimental. During common envelope evolution, a main sequence star may accrete some of the envelope&#39;s mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_fraction. : (null)
+comenv_ms_accretion_fraction : Experimental. During common envelope evolution, a main sequence may accrete a fraction of the envelope&#39;s mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_mass. : (null)
+comenv_ns_accretion_mass : Experimental. During common envelope evolution, a neutron star may accrete some of the envelope&#39;s mass. Requires COMENV_NS_ACCRETION. See also comenv_ns_accretion_fraction. : (null)
+comenv_ns_accretion_fraction : Experimental. During common envelope evolution, a neutron star may accrete a fraction of the envelope&#39;s mass. Requires COMENV_NS_ACCRETION. See also comenv_ns_accretion_mass. : (null)
+alpha_ce : Common envelope energy formalism parameter. A fraction alpha of the orbital energy is used to eject the envelope. See Hurley et al 2002 for details. : (null)
+alpha_ce%d : Common envelope energy formalism parameter. A fraction alpha of the orbital energy is used to eject the envelope. See Hurley et al 2002 for details. : (null)
+lambda_ce : Common envelope parameter. The binding energy of the common envelope is G*M*Menv/(lambda*R). Typically this is taken to be 0.5, but if set to -1 binary_c uses the Dewi and Tauris fits instead, -2 uses the formalism of Wang, Jia and Li (2016) and if -3 then a polytropic formalism is used (see also comenv_splitmass). : (null)
+lambda_ce%d : Common envelope parameter. The binding energy of the common envelope is G*M*Menv/(lambda*R). Typically this is taken to be 0.5, but if set to -1 binary_c uses the Dewi and Tauris fits instead, -2 uses the formalism of Wang, Jia and Li (2016) and if -3 then a polytropic formalism is used (see also comenv_splitmass). : (null)
+comenv_splitmass : When lambda_ce=-2, the envelope binding energy, lambda, is calculated using a polytropic formalism. The comenv_splitmass defines the point, in the units of the core mass, above which material is ejected. : (null)
+nelemans_recalc_eccentricity : If True, recalculate the eccentricity after angular momentum is removed.  : (null)
+comenv_post_eccentricity : Eccentricity remaining after common envelope ejection. : (null)
+nelemans_gamma : Set the fraction of the orbital specific angular momentum that is used to eject the common envelope according to the Nelemans and Tout prescription. See also nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs. : (null)
+nelemans_minq : Only activate the Nelemans and Tout common envelope prescription for q&gt;nelemans_minq. See also nelemans_gamma, nelemans_max_frac_j_change, nelemans_n_comenvs. : (null)
+nelemans_max_frac_j_change : Maximum fractional angular momentum change in the Nelemans and Tout common envelope prescription. See also nelemans_gamma, nelemans_minq, nelemans_n_comenvs. : (null)
+nelemans_n_comenvs : Set the maximum number of common envelope ejections allowed to follow the Nelemans and Tout prescription, after which the standard alpha prescription is used. : (null)
+lambda_ionisation : A fraction lambda_ionisation of the recombination energy in the common envelope goes into ejecting the envelope. This is usually 0.0, but a positive value can make a big difference to the outcome of common envelope evolution. : (null)
+lambda_ionisation%d : A fraction lambda_ionisation of the recombination energy in the common envelope goes into ejecting the envelope. This is usually 0.0, but a positive value can make a big difference to the outcome of common envelope evolution. : (null)
+lambda_enthalpy : A fraction of the enthalpy to be included in the common envelope evolution binding energy. Only used for the Wang 2016 prescription (so far). : (null)
+lambda_enthalpy%d : A fraction of the enthalpy to be included in the common envelope evolution binding energy. Only used for the Wang 2016 prescription (so far). : (null)
+cbdisc_albedo : Circumbinary-disc albedo. Requires DISCS. : (null)
+cbdisc_gamma : Circumbinary disc gamma (equation of state) parameter. Requires DISCS. : (null)
+cbdisc_alpha : Circumbinary disc alpha (viscosity) parameter. Requires DISCS. : (null)
+cbdisc_kappa : Circumbinary disc kappa (opacity) parameter. Requires DISCS. : (null)
+cbdisc_minimum_evaporation_timescale : Circumbinary disc minimum evaporation timescale (years). If (slow, not edge stripped) mass loss would evaporate the disc on a timescale less than this, simply evaporate the disc immediated. Usually set to 1y, ignore if zero. Requires DISCS. : (null)
+cbdisc_torquef : Circumbinary disc binary torque multiplier. Requires DISCS. : (null)
+cbdisc_max_lifetime : Circumbinary disc maximum lifetime (years, ignored if 0). Requires DISCS. : (null)
+cbdisc_init_dM : On cbdisc start, reduce mass by a fraction dM if it won&#39;t converge. Requires DISCS. : (null)
+cbdisc_init_dJdM : On cbdisc start, reduce angular momentum by a fraction dJ/dM*dM if it won&#39;t converge. Requires DISCS. : (null)
+cbdisc_mass_loss_constant_rate : Circumbinary disc constant mass loss rate (Msun/year). Requires DISCS. : (null)
+cbdisc_mass_loss_FUV_multiplier : Circumbinary disc FUV mass loss rate multiplier (no units). Requires DISCS. : (null)
+cbdisc_mass_loss_Xray_multiplier : Circumbinary disc X-ray mass loss rate multiplier (no units). Requires DISCS. : (null)
+cbdisc_mass_loss_ISM_ram_pressure_multiplier : Circumbinary disc interstellar medium ram pressure stripping mass loss rate multiplier (no units). Requires DISCS. : (null)
+cbdisc_mass_loss_ISM_pressure : Circumbinary disc interstellar medium ram pressure in units of Boltzmann constant per Kelvin (I think...). Requires DISCS. Typically 3000.0. See e.g. http://www.astronomy.ohio-state.edu/~pogge/Ast871/Notes/Intro.pdf page 15 or https://arxiv.org/pdf/0902.0820.pdf Fig. 1 (left panel). : (null)
+cbdisc_mass_loss_inner_viscous_multiplier : Circumbinary disc inner edge viscous mass loss rate multiplier (no units). Requires DISCS. : (null)
+cbdisc_mass_loss_inner_viscous_angular_momentum_multiplier : Circumbinary disc inner edge viscous angular momentum multiplier (no units). The inner edge angular momentum Requires DISCS. : (null)
+cbdisc_resonance_multiplier : Circumbinary disc resonant interaction multiplier, affects eccentricity pumping and angular momentum rates. Requires DISCS. : (null)
+cbdisc_resonance_damping : Circumbinary disc resonant interaction damping: should be on (True) to damp the l=1, m=2 resonance when the disc inner edge lies outside the resonance location. Requires DISCS. : (null)
+cbdisc_fail_ring_inside_separation : If True, while converging on a structure, circumbinary discs with Rring &lt; the binary separation are immediately failed. : (null)
+cbdisc_mass_loss_inner_L2_cross_multiplier : Circumbinary disc inner edge L2-crossing mass loss rate multiplier (no units). Requires DISCS. : (null)
+cbdisc_minimum_luminosity : Circumbinary disc minimum luminosity. If the disc becomes dimmer than this, the disc is evaporated instantly. Requires DISCS. : (null)
+cbdisc_minimum_mass : Circumbinary disc minimum mass. If the disc becomes less massive than this, the disc is evaporated instantly. Requires DISCS. : (null)
+cbdisc_minimum_fRing : Circumbinary disc minimum fRing. If the disc becomes a ring, and fRing = |Rout/Rin-1| &lt; this value (and this value is non-zero), the disc is evaporated instantly. Requires DISCS. : (null)
+comenv_disc_angmom_fraction : If &gt;0 Fraction of the common envelope&#39;s angular momentum that goes into the circumbinary disc. If -1 then uses the moments of inertia to calculate (deprecated), if -2 use the common envelope&#39;s specific angular momentum, if -3 uses the L2 point at the end of the common envelope to set the angular momentum. Requires DISCS and DISCS_CIRCUMBINARY_FROM_COMENV. : (null)
+comenv_disc_mass_fraction : Fraction of the common envelope&#39;s mass that goes into the circumbinary disc. Requires DISCS and DISCS_CIRCUMBINARY_FROM_COMENV. : (null)
+wind_disc_angmom_fraction : If &gt;0 Fraction of the wind envelope&#39;s angular momentum that goes into the circumbinary disc. If -1 then uses the L2 point&#39;s specific angular momentum. Requires DISCS and DISCS_CIRCUMBINARY_FROM_WIND. : (null)
+wind_disc_mass_fraction : Fraction of the stellar wind&#39;s mass that goes into the circumbinary disc. Requires DISCS and DISCS_CIRCUMBINARY_FROM_WIND. : (null)
+WRLOF_method : Choose whether and how to apply wind-Roche-lobe-overflow. 0=none, 1=q-dependent, 2=quadratic See Abate et al 2013/14 for details. Requires WRLOF_MASS_TRANSFER. : (null)
+minimum_timestep : The minimum timestep (Myr). : (null)
+timestep_solver_factor : Factor applied in timestep_limits, e.g. to prevent X changing too fast by comparing to X/dX/dt, which is usually 1 but can be higher to lengthen timesteps when using an alternative solver. : (null)
+RLOF_mdot_factor : Multiplier applied to the mass transfer rate during Roche-lobe overflow. Requires RLOF_MDOT_MODULATION. : (null)
+RLOF_f : Factor to enlarge a Roche lobe, nominally because of radiation pressure (see Dermine et al paper). Requires RLOF_RADIATION_CORRECTION. : (null)
+minimum_separation_for_instant_RLOF : If True, instead of evolving the system just report the minimum separation (on the zero-age main sequence) that would lead to instant RLOF. Used by binary_grid. See also minimum_orbital_period_for_instant_RLOF and maximum_mass_ratio_for_instant_RLOF. : (null)
+minimum_orbital_period_for_instant_RLOF : If True, instead of evolving the system just report the minimum orbital period (on the zero-age main sequence) that would lead to instant RLOF. Used by binary_grid. See also minimum_separation_for_instant_RLOF and maximum_mass_ratio_for_instant_RLOF. : (null)
+maximum_mass_ratio_for_instant_RLOF : If True, instead of evolving the system just report the maximum mass ratio (on the zero-age main sequence) that would lead to instant RLOF, given M1 and orbital period. Used by binary_grid. See also minimum_separation_for_instant_RLOF and minimum_orbital_period_for_instant_RLOF. : (null)
+RLOF_method : Use RLOF_method to choose the algorithm you use for Roche-lobe overflow mass loss rate calculations. 0=Hurley et al 2002, 1=Adaptive (for radiative stars) R=RL method, 2=Ritter (probably broken), 3=Claeys etal 2014 variant on Hurley et al 2002. : (null)
+RLOF_interpolation_method : When a star overflows its Roche lobe, it always has R&gt;RL because of the limited time resolution of the simulation. Binary_c then uses an algorithm to get back to when R~RL (within a desired tolerance, set in RLOF_ENTRY_THRESHOLD which is usually 1.02, i.e. overflow of 2%). You can choose algorithm 0, the Hurley et al 2002 method which reverses time (i.e. uses a Newton-like scheme), or 1 to use the binary_c method which rejects a timestep (and hence does no logging on that timestep) and repeats with half the timestep until R~RL. The latter is now the default, because this means there are no negative timesteps which break various other algorithms (e.g. nucleosynthesis). : (null)
+nova_retention_fraction : The mass accreted during a nova as fraction of mass transferred : (null)
+beta_reverse_nova : The fraction of mass ejected in a nova explosion which is accreted back onto the companion star. Set to -1 to automatically calculate based on a geometric argument, or 0 or positive to set the value. : (null)
+WD_accretion_rate_novae_upper_limit_hydrogen_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is hydrogen rich : above this rate the mass transfer leads to stable burning. : (null)
+WD_accretion_rate_novae_upper_limit_helium_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is helium rich : above this rate the mass transfer leads to stable burning. : (null)
+WD_accretion_rate_novae_upper_limit_other_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is neither hydrogen nor helium rich : above this rate the mass transfer leads to stable burning. : (null)
+WD_accretion_rate_new_giant_envelope_lower_limit_hydrogen_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope with a hydrogen-rich donor. Below this mass transfer leads to stable burning. : (null)
+WD_accretion_rate_new_giant_envelope_lower_limit_helium_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope with a helium-rich donor. Below this mass transfer leads to stable burning. : (null)
+WD_accretion_rate_new_giant_envelope_lower_limit_other_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope when the donor is neither hydrogen nor helium rich. Below this mass transfer leads to stable burning. : (null)
+CRAP_parameter : Tidally enhanced mass loss parameter. See Tout and Eggleton&#39;s paper on the subject. (Was the parameter bb). : (null)
+individual_novae : If individual_novae is True, novae are resolved such that each explosion is performed separtaely. : (null)
+nova_timestep_accelerator_num : The nova timestep is accelerated if the nova number exceeds nova_timestep_accelerator_num. If zero or negative, acceleration is off. See also nova_timestep_accelerator_index and nova_timestep_accelerator_max. Only used if individual_novae is on.
+ : (null)
+nova_timestep_accelerator_index : The index at which the nova timestep is accelerated. A larger value gives longer timesteps. See also nova_timestep_accelerator_num and nova_timestep_accelerator_max. Only used if individual_novae is on.
+ : (null)
+nova_timestep_accelerator_max : The nova timestep is accelerated by a factor that is capped at nova_timestep_accelerator_max. This parameter is ignored if it is zero or negative. See also nova_timestep_accelerator_num and nova_timestep_accelerator_index. Only used if individual_novae is on.
+ : (null)
+nonconservative_angmom_gamma : Mass lost from the system (but NOT from a stellar wind) takes a fraction gamma of the orbital angular momentum with it. Set to -1 to take the specific angular momentum of the donor star. Set to -2 to take super-Eddington, nova and disk-wind angular momenta as if a wind from the accretor. : (null)
+max_stellar_angmom_change : Maxmimum fractional change in stellar angular momentum allowed before a timestep is rejected (0.05). : (null)
+comenv_ms_accretion_mass : Experimental. During common envelope evolution, a main sequence star may accrete some of the envelope&#39;s mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_fraction. : (null)
+
+############################################################
+##### Section Nucsyn
+############################################################
+third_dup : If True, enables third dredge up. Requires NUCSYN and NUCSYN_THIRD_DREDGE_UP. : (null)
+third_dup_multiplier : Usage: --third_dup_multiplier &lt;i&gt; &lt;f&gt;. Multiplies the abundance of element &lt;i&gt; by &lt;f&gt; during third dredge up. : 1.0
+NeNaMgAl : Enables NeNaMgAl reaction network. Requires NUCSYN and NUCSYN_HBB. : Ignore
+nucsyn_network%d : Usage: --nucsyn_network%d &lt;boolean&gt;. Turn a nuclear network on or off. : (null)
+nucsyn_network_error%d : Usage: --nucsyn_network_error%d &lt;f&gt;. Threshold error in nuclear network solver for network %d. : (null)
+nucreacmult%d : Usage: --nucreacmult%d &lt;f&gt;. Multiply nuclear reaction given by the integer %d (integer) by f (float).  : (null)
+nucsyn_metallicity : This sets the metallicity of the nucleosynthesis algorithms, i.e. the amount (by mass) of matter which is not hydrogen or helium. Usually you&#39;d just set this with the metallicity parameter, but if you want the nucleosynthesis to be outside the range of the stellar evolution algorithm (e.g. Z=0 or Z=0.04) then you need to use nucsyn_metallicity. That said, it&#39;s also outside the range of some of the nucleosynthesis algorithms as well, so you have been warned! : (null)
+nucsyn_solver : Choose the solver used in nuclear burning. 0 = KAPS_RENTROP is a Kaps-Rentrop scheme (fast, not great for stiff problems), 1 = LSODA (Adams/BSF switcher), 2 = CVODE library (https://computing.llnl.gov/projects/sundials. Default 0.  : 0
+initial_abundance_mix : initial abundance mixture: 0=AG89, 1=Karakas 2002, 2=Lodders 2003, 3=Asplund 2005 (not available?), 4=Garcia Berro, 5=Grevesse Noels 1993 : 0
+init_abund : Usage: --init_abund &lt;i&gt; &lt;X&gt;. Sets the initial abundance of isotope number &lt;i&gt; to mass fraction &lt;X&gt;. : 0.02
+init_abund_mult : Usage: --init_abund_mult &lt;i&gt; &lt;f&gt;. Multiplies the initial abundance of isotope number &lt;i&gt; by &lt;f&gt;. : 1.0
+init_abund_dex : Usage: --init_abund_dex &lt;i&gt; &lt;f&gt;. Changes the initial abundance of isotope number &lt;i&gt; by &lt;f&gt; dex. : 0.0
+init_abunds_only : If True, outputs only the initial abundances, then exits. : (null)
+initial_abunds_only : If True, outputs only the initial abundances, then exits. : (null)
+no_thermohaline_mixing : If True, disables thermohaline mixing. : (null)
+lithium_GB_post_Heflash : Sets the lithium abundances after the helium flash. Requires NUCSYN and LITHIUM_TABLES. : (null)
+lithium_GB_post_1DUP : Sets the lithium abundance after first dredge up. Requires NUCSYN and LITHIUM_TABLES. : (null)
+lithium_hbb_multiplier : Multiplies the lithium abundances on the AGB during HBB (based on Karakas/Fishlock et al models).Requires NUCSYN and LITHIUM_TABLES. : (null)
+angelou_lithium_decay_function : Functional form which describes Li7 decay. Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Choices are : 0 expoential (see angelou_lithium_decay_time). : (null)
+angelou_lithium_LMMS_time : Time at which lithium manufacture is triggered in a low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_MS_time : Time at which lithium manufacture is triggered on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_HG_time : Time at which lithium manufacture is triggered on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_GB_time : Time at which lithium manufacture is triggered on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_CHeB_time : Time at which lithium manufacture is triggered during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_EAGB_time : Time at which lithium manufacture is triggered on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_TPAGB_time : Time at which lithium manufacture is triggered on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_LMMS_decay_time : Decay time for surface lithium abundance during the low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_MS_decay_time : Decay time for surface lithium abundance on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_HG_decay_time : Decay time for surface lithium abundance on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_GB_decay_time : Decay time for surface lithium abundance on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_CHeB_decay_time : Decay time for surface lithium abundance during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_EAGB_decay_time : Decay time for surface lithium abundance on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_TPAGB_decay_time : Decay time for surface lithium abundance on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_LMMS_massfrac : Lithium mass fraction when its manufacture is triggered during the low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_MS_massfrac : Lithium mass fraction when its manufacture is triggered on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_HG_massfrac : Lithium mass fraction when its manufacture is triggered on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_GB_massfrac : Lithium mass fraction when its manufacture is triggered on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_CHeB_massfrac : Lithium mass fraction when its manufacture is triggered during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_EAGB_massfrac : Lithium mass fraction when its manufacture is triggered on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_TPAGB_massfrac : Lithium mass fraction when its manufacture is triggered on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).
+ : (null)
+angelou_lithium_vrot_trigger : Equatorial rotational velocity at which lithium manufacture is triggered (km/s). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0.
+ : (null)
+angelou_lithium_vrotfrac_trigger : Fraction of Keplerian (breakup) equatorial rotational velocity at which lithium manufacture is triggered (must be &lt;1, ignored if 0). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0.
+ : (null)
+
+############################################################
+##### Section Output
+############################################################
+david_logging_function : Function to choose which kind of information gets logged Requires DAVID. Choices are: 0= None, &gt;0 for custom logging functions : Ignore
+cf_amanda_log : Enable logging to compare to Amanda&#39;s models. : (null)
+float_overflow_checks : Turn on to enable floating-point overflow checks at the end of each timestep, if they are available. 0=off, 1=warn (stderr) on failure, 2=exit on failure (0) : (null)
+save_pre_events_stardata : Enable this to save a copy of stardata to stardata-&gt;pre_events_stardata just before an event. : (null)
+disable_end_logging : Disable the logging that happens at the end of the evolution. : (null)
+ensemble : Turn on ensemble calculations and output. : (null)
+ensemble_filters_off : Sets all ensemble filters to be off (FALSE) - these can then be enabled one-by-one with --ensemble_filter_[...] TRUE. : (null)
+ensemble_filter_%d : Turn on or off ensemble filter &lt;n&gt;. For a list of filters, see ensemble_macros.h. : (null)
+ensemble_legacy_ensemble : Turn on ensemble legacy population output. : (null)
+legacy_yields : Turn on ensemble legacy yield output. : (null)
+ensemble_defer : Defer ensemble output. : (null)
+ensemble_dt : When doing ensemble calculations, data are stored and/or output every ensemble_dt Myr. See also ensemble, ensemble_logdt, ensemble_startlogtime. : (null)
+ensemble_logdt : When doing ensemble calculations, and when logensembletimes is set, the ensemble is stored/output every ensemble_logdt Myr. See also ensemble, ensemble_dt, ensemble_startlogtime. : (null)
+ensemble_startlogtime : Start log ensemble data storage/calculations/output at ensemble_startlogtime. See also ensemble, ensemble_dt, ensemble_startlogtime. : (null)
+ensemble_logtimes : When doing ensemble calculations/output, set this to act at log times rather than linear times. : (null)
+postagb_legacy_logging : Turn on post-AGB legacy logging. : (null)
+disc_legacy_logging : Turn on disc legacy logging. : (null)
+EMP_logg_maximum : Maximum logg that EMP stars are allowed to have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_minimum_age. : (null)
+EMP_minimum_age : Minimum age that EMP stars are required to have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_logg_maximum. : (null)
+EMP_feh_maximum : Maximum [Fe/H] that an EMP stars may have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default -2.0. : (null)
+CEMP_cfe_minimum : Minimum [C/Fe] that CEMP stars are required to have. See Izzard et al 2009. See also NEMP_cfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default 0.7. : (null)
+NEMP_cfe_minimum : Minimum [N/Fe] that NEMP stars are required to have. See Izzard et al 2009, Pols et al. 2012. See also CEMP_cfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default 1.0. : (null)
+thick_disc_start_age : Lookback time for the start of the thick disc star formation, e.g. 13e3 Myr. Units = Myr. : (null)
+thick_disc_end_age : Lookback time for the end of the thick disc star formation, e.g. 4e3 Myr. Units = Myr. : (null)
+thick_disc_logg_min : Minimum logg for thick disc giants to be logged. : (null)
+thick_disc_logg_max : Maximum logg for thick disc giants to be logged. : (null)
+escape_velocity : A parameter used in constructing galactic chemical evolution (GCE) models. If the stellar wind velocity exceeds this value, any chemical yield from the wind is ignored, i.e. assumed lost. (km/s) Requires NUCSYN_GCE_OUTFLOW_CHECKS. Default 1e9 km/s. See also escape_fraction. : (null)
+escape_fraction : A parameter used in constructing galactic chemical evolution (GCE) models. If the stellar wind velocity exceeds this value, any chemical yield from the wind is ignored, i.e. assumed lost. (km/s) Requires NUCSYN_GCE_OUTFLOW_CHECKS. Default 0.0. See also escape_velocity. : (null)
+colour_log : If set to True, thelog is coloured with ANSI colour formatting. Requires FILE_LOG to be defined. :
+log_filename : Location of the output logging filename. If set to &#34;/dev/null&#34; then there is no logging. :
+stopfile : File which, when it exists, will stop the current binary_c repeat run. :
+stardata_dump_filename : Location of the stardata dump file. :
+stardata_load_filename : Location of the stardata file to load. :
+api_log_filename_prefix : Location of the output logging filename prefix for the API. If set to &#34;/dev/null&#34; then there is no logging. : 0
+hrdiag_output : Set to True to output high time-resolution Hertzstrpung-Russell diagram information. Requires HRDIAG. : (null)
+internal_buffering : Experimental. Set to non-zero values to implement internal buffering prior to output. For use with binary_grid, you shouldn&#39;t really be playing with this. : (null)
+eccentric_RLOF_model : Chooses which model is used to handle eccentric RLOF. Default is RLOF_ECCENTRIC_AS_CIRCULAR, i.e. ignore the eccentricity. Note: requires force_corotation_of_primary_and_orbit to be FALSE.
+ : (null)
+force_circularization_on_RLOF : If True forces circularization of stars and orbit when RLOF starts, this is as in the BSE algorithm. (True) : (null)
+wtts_log : If True, enables log file output for WTTS2. : (null)
+fabian_imf_log_time : Time at which to output for Fabian Schneider&#39;s IMF project. Requires FABIAN_IMF_LOG : Ignore
+fabian_imf_log_timestep : Timestep for Fabian Schneider&#39;s IMF project logging. Requires FABIAN_IMF_LOG : Ignore
+version : Display binary_c version and build information. Also performs timing tests. : Ignore
+dumpversion : Display binary_c version number (short format). : Ignore
+version_only : Display binary_c version number and build information, but do not perform timing tests or anything that requires stardata to be non-NULL. : Ignore
+
+############################################################
+##### Section Input
+############################################################
+MINT_dir : Location of MINT algorithm data. :
+MINT_data_cleanup : Activate checks on incoming data to try to account for problems. Will make data-loading slower, but may fix a few things. :
+MINT_MS_rejuvenation : Turn on or off (hydrogen) main-sequence rejuvenation. :
+MINT_remesh : Turn on or off MINT&#39;s remeshing. :
+MINT_use_ZAMS_profiles : Use chemical profiles at the ZAMS if MINT_use_ZAMS_profiles is TRUE, otherwise set homogeneous abundances. (Default is TRUE, so we use the profiles if they are available.) :
+MINT_disable_grid_load_warnings : Use this to explicitly disable MINT&#39;s warnings when loading a grid with, e.g., missing or too much data. :
+MINT_Kippenhahn : Turn on or off MINT&#39;s Kippenhahn diagrams. If 0, off, if 1, output star 1 (index 0), if 2 output star 2 (index 1). Default 0. :
+MINT_Kippenhahn_stellar_type : Stellar type selector for Kippenhahn plots. Set to -1 to ignore, otherwise the stellar type number for which Kippenhahn plot data should be output. :
+MINT_Kippenhahn_companion_stellar_type : Companion stellar type selector for Kippenhahn plots. Set to -1 to ignore, otherwise the stellar type number for the companion for which Kippenhahn plot data should be output. :
+MINT_nuclear_burning : Turn on or off MINT&#39;s nuclear burning algorithm. :
+MINT_minimum_shell_mass : Minimum shell mass in MINT&#39;s nuclear burning routines. :
+MINT_maximum_shell_mass : Maximum shell mass in MINT&#39;s nuclear burning routines. :
+
+############################################################
+##### Section I/O
+############################################################
+go : batchmode control command : Ignore
+gogo : batchmode control command : Ignore
+reset_stars : Reset the star structures. Used in batchmode : Ignore
+reset_stars_defaults : Reset the star structures and set defaults. Used in batchmode : Ignore
+defaults : Reset all defaults. Used in batchmode : Ignore
+echo : Activate batchmode command echoing, i.e. when you enter a command, binary_c repeats the command then executes it. : Ignore
+noecho : Deactivate batchmode command echoing. See &#39;echo&#39;. : Ignore
+noechonow : Deactivate batchmode command echoing. See &#39;echo&#39;. : Ignore
+bye : Quit binary_c. Used in batchmode. : Ignore
+fin : batchmode control command : Ignore
+reset_prefs : Reset preferences struct. Used in batchmode : Ignore
+status : Output batchmode status information. : Ignore
+
+############################################################
+##### Section Algorithms
+############################################################
+repeat : If &gt; 1, repeats the system as many times as required. Handy if you&#39;re using Monte-Carlo kicks and want to sample the parameter space well. Also, if you are running speed tests this is good to give a statistically more reasonable result. (See e.g. &#39;tbse pgo&#39;). : (null)
+random_systems : Experimental. Use this to apply random initial system parameters (masses, separations, etc.). Useful for testing only. : (null)
+
+############################################################
+##### Section Misc
+############################################################
+random_seed : Random number seed, usually a (possibly negative) integer. Useful for exactly reproducing the evolution of a system which involves a kick (which is a Monte-Carlo, i.e. pseudorandom, process). : (null)
+random_systems_seed : Random number seed for the generation of random systems. See random_systems and random_seed. : (null)
+random_skip : Skip the first &lt;random_seed&gt; random numbers that are generated. Usually this is 0 so they are all used. : (null)
+idum : [NB: deprecated, please use &#39;random_seed&#39; instead.] Random number seed, usually a (possibly negative) integer. Useful for exactly reproducing the evolution of a system which involves a kick (which is a Monte-Carlo, i.e. pseudorandom, process). : (null)
+reverse_time : Make time go backwards. To be considered very experimental! : (null)
+start_time : Start time for the simulation. : (null)
+warmup_cpu : Uses the CPU at maximum power the given number of seconds, prior to running normal stellar evolution. : Ignore
+help : Display help pages. Usage: --help &lt;help topic&gt;. : Ignore
+argopts : Display argument options. Usage: --argopts &lt;argument&gt;. : Ignore
+help_all : Display all help pages. : Ignore
+list_args : Display list of arguments with their default values. Useful for batchmode. : Ignore
+
+</pre></div></div>
+</div>
+<p>We can get all the parameter names and their default values with return_arglines(): (abridged output)</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[20]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="nb">print</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">_binary_c_bindings</span><span class="o">.</span><span class="n">return_arglines</span><span class="p">()</span><span class="o">.</span><span class="n">splitlines</span><span class="p">()[:</span><span class="mi">4</span><span class="p">]))</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+__ARG_BEGIN
+metallicity = 0.02
+effective_metallicity = -1
+M_1 = 0
+</pre></div></div>
+</div>
+<p>Lastly, we can ask binary_c to determine the minimum period or maximum mass for RLOF at the ZAMS: Both of them need an argstring as input</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[7]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="c1"># Here we set up the argument string that is passed to the bindings</span>
+<span class="n">argstring</span> <span class="o">=</span> <span class="s2">&quot;&quot;&quot;</span>
+<span class="s2">binary_c M_1 </span><span class="si">{M_1}</span><span class="s2"> orbital_period </span><span class="si">{orbital_period}</span><span class="s2"> eccentricity </span><span class="si">{eccentricity}</span><span class="s2"> metallicity </span><span class="si">{metallicity}</span><span class="s2"> max_evolution_time </span><span class="si">{max_evolution_time}</span><span class="s2"></span>
+<span class="s2">&quot;&quot;&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+    <span class="n">M_1</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span>
+    <span class="n">orbital_period</span><span class="o">=</span><span class="mi">4500</span><span class="p">,</span>
+    <span class="n">eccentricity</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span>
+    <span class="n">metallicity</span><span class="o">=</span><span class="mf">0.02</span><span class="p">,</span>
+    <span class="n">max_evolution_time</span><span class="o">=</span><span class="mi">15000</span><span class="p">,</span>
+<span class="p">)</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span>
+
+<span class="c1">#</span>
+<span class="n">output</span> <span class="o">=</span> <span class="n">_binary_c_bindings</span><span class="o">.</span><span class="n">return_minimum_orbit_for_RLOF</span><span class="p">(</span><span class="n">argstring</span><span class="p">,</span> <span class="n">store_capsule</span><span class="o">=</span><span class="n">store_memaddr</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">output</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+MINIMUM SEPARATION 0.31
+MINIMUM PERIOD 0.00632092
+
+</pre></div></div>
+</div>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[46]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="c1"># Here we set up the argument string that is passed to the bindings</span>
+<span class="n">argstring</span> <span class="o">=</span> <span class="s2">&quot;&quot;&quot;</span>
+<span class="s2">binary_c M_1 </span><span class="si">{M_1}</span><span class="s2"> orbital_period </span><span class="si">{orbital_period}</span><span class="s2"> eccentricity </span><span class="si">{eccentricity}</span><span class="s2"> metallicity </span><span class="si">{metallicity}</span><span class="s2"> max_evolution_time </span><span class="si">{max_evolution_time}</span><span class="s2"></span>
+<span class="s2">&quot;&quot;&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+    <span class="n">M_1</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span>
+    <span class="n">M_2</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
+    <span class="n">orbital_period</span><span class="o">=</span><span class="mf">0.0001</span><span class="p">,</span>
+    <span class="n">eccentricity</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span>
+    <span class="n">metallicity</span><span class="o">=</span><span class="mf">0.02</span><span class="p">,</span>
+    <span class="n">max_evolution_time</span><span class="o">=</span><span class="mi">15000</span><span class="p">,</span>
+<span class="p">)</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span>
+
+<span class="c1">#</span>
+<span class="n">output</span> <span class="o">=</span> <span class="n">_binary_c_bindings</span><span class="o">.</span><span class="n">return_maximum_mass_ratio_for_RLOF</span><span class="p">(</span><span class="n">argstring</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">output</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+MAXIMUM MASS RATIO 0.0141
+
+</pre></div></div>
+</div>
+<div class="nbinput nblast docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[ ]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span>
+</pre></div>
+</div>
+</div>
+</div>
+</div>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="binary_c_parameters.html" class="btn btn-neutral float-right" title="Binary_c parameters" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="notebook_extra_features.html" class="btn btn-neutral float-left" title="Extra features and functionality of binarycpython" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        
+        &copy; Copyright 2021, David Hendriks, Robert Izzard
+
+    </p>
+  </div>
+    
+    
+    
+    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
+    
+    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
+    
+    provided by <a href="https://readthedocs.org">Read the Docs</a>.
+<br><br>
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
+<br><br>
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+
+
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script>
+
+  
+  
+    
+   
+
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/build/html/notebook_api_functionality.ipynb b/docs/build/html/notebook_api_functionality.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..d81c31711bfc5d6de3159fd8958df96dd145ded0
--- /dev/null
+++ b/docs/build/html/notebook_api_functionality.ipynb
@@ -0,0 +1,951 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "cb9d00f5-9613-471e-a4bb-6181311bf73b",
+   "metadata": {},
+   "source": [
+    "# Using the API functionality of binarycpython\n",
+    "This notebook shows how to use the API functions that interface with binary_c. It usually is better to use wrapper functions that internally use these API functions, because most of the output here is very raw\n",
+    "\n",
+    "Binarycpython uses the Python-C extension framework to interface Python with C. The sourcecode for this is contained in `src/binary_c_python.c`, and the functions are available via `from binarycpython import _binary_c_bindings`.\n",
+    "\n",
+    "The following functions are available through the API: (run cell below)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "id": "ded7eaf6-e1ba-46c2-9f6f-9ebcb14a264d",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Help on module binarycpython._binary_c_bindings in binarycpython:\n",
+      "\n",
+      "NAME\n",
+      "    binarycpython._binary_c_bindings - Module to interface the Binary_c API with python.\n",
+      "\n",
+      "FUNCTIONS\n",
+      "    free_persistent_data_memaddr_and_return_json_output(...)\n",
+      "        Frees the persistent_data memory and returns the json output\n",
+      "    \n",
+      "    free_store_memaddr(...)\n",
+      "        Frees the store memaddr\n",
+      "    \n",
+      "    return_arglines(...)\n",
+      "        Return the default args for a binary_c system\n",
+      "    \n",
+      "    return_help(...)\n",
+      "        Return the help info for a given parameter\n",
+      "    \n",
+      "    return_help_all(...)\n",
+      "        Return an overview of all the parameters, their description, categorized in sections\n",
+      "    \n",
+      "    return_maximum_mass_ratio_for_RLOF(...)\n",
+      "        Returns a string containing the maximum mass ratio for which a binary system does not RLOF at zams. Optionally accepts a store_capsule. Please use the wrapper functions in utils for this except when you know what you're doing\n",
+      "    \n",
+      "    return_minimum_orbit_for_RLOF(...)\n",
+      "        Returns a string containing the minimum orbit and separation for which a binary system does not RLOF at zams. Please use the wrapper functions in utils for this except when you know what you're doing\n",
+      "    \n",
+      "    return_persistent_data_memaddr(...)\n",
+      "        Return the store memory adress that will be passed to run_population\n",
+      "    \n",
+      "    return_store_memaddr(...)\n",
+      "        Return the store memory adress that will be passed to run_population\n",
+      "    \n",
+      "    return_version_info(...)\n",
+      "        Return the version information of the used binary_c build\n",
+      "    \n",
+      "    run_system(...)\n",
+      "        Function to run a system. This is a general function that will be able to handle different kinds of situations: single system run with different settings, population run with different settings, etc. To avoid having too many functions doing slightly different things. \n",
+      "        \n",
+      "        Arguments:\n",
+      "                argstring: argument string for binary_c\n",
+      "                (opt) custom_logging_func_memaddr: memory address value for custom logging function. Default = -1 (None)\n",
+      "                (opt) store_memaddr: memory adress of the store. Default = -1 (None)\n",
+      "                (opt) write_logfile: Boolean (in int form) for whether to enable the writing of the log function. Default = 0\n",
+      "                (opt) population: Boolean (in int form) for whether this system is part of a population run. Default = 0.\n",
+      "    \n",
+      "    test_func(...)\n",
+      "        Function that contains random snippets. Do not expect this to remain available, or reliable. i.e. dont use it.\n",
+      "\n",
+      "FILE\n",
+      "    /home/david/.pyenv/versions/3.6.4/envs/dev-binarycpython3.6.4/lib/python3.6/site-packages/binarycpython/_binary_c_bindings.cpython-36m-x86_64-linux-gnu.so\n",
+      "\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "from binarycpython import _binary_c_bindings\n",
+    "help(_binary_c_bindings)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "7ddede71-ffaa-4b24-aece-e94128a60d7f",
+   "metadata": {},
+   "source": [
+    "There are three main categories of functions:\n",
+    "\n",
+    "- Functions to get information from binary_c: these can be used to evolve systems, and get utility information from binary_c.\n",
+    "    - run_system\n",
+    "    - return_minimum_orbit_for_RLOF\n",
+    "    - return_maximum_mass_ratio_for_RLOF\n",
+    "    - return_help\n",
+    "    - return_help_all\n",
+    "    - return_arglines\n",
+    "\n",
+    "- Memory creation functions: these can be used to have binary_c allocate memory which is used or written to by binary_c\n",
+    "    - return_persistent_data_memaddr\n",
+    "    - return_store_memaddr\n",
+    "\n",
+    "- Memory freeing functions: These can be used to free the allocated memory, and in the case of persistent memory it will also return the contents of the ensemble\n",
+    "    - free_persistent_data_memaddr_and_return_json_output\n",
+    "    - free_store_memaddr"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "0dd3e115-1571-42f7-9ab9-cf7688fa28c1",
+   "metadata": {},
+   "source": [
+    "## Example usage:"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "c5015daa-35ab-4736-a04d-f3cbe661638c",
+   "metadata": {},
+   "source": [
+    "### Setting up, using and freeing store"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 10,
+   "id": "10a74d5a-a3d5-4543-a5bc-20d1fe885bb4",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "<capsule object \"STORE\" at 0x7f163859d0c0>\n",
+      "SINGLE_STAR_LIFETIME 10 27.7358\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# allocating store memory\n",
+    "store_memaddr = _binary_c_bindings.return_store_memaddr()\n",
+    "print(store_memaddr)\n",
+    "\n",
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=10,\n",
+    "    orbital_period=4500,\n",
+    "    eccentricity=0.0,\n",
+    "    metallicity=0.02,\n",
+    "    max_evolution_time=15000,\n",
+    ").strip()\n",
+    "\n",
+    "#\n",
+    "output = _binary_c_bindings.run_system(argstring, store_memaddr=store_memaddr)\n",
+    "print(output)\n",
+    "\n",
+    "# Freeing store\n",
+    "_binary_c_bindings.free_store_memaddr(store_memaddr)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "e9da5fc6-e680-483c-982e-4819767ed5b2",
+   "metadata": {},
+   "source": [
+    "### Getting information from binary_c"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "24f7ffe5-0076-459d-a37f-254e10d0d9f9",
+   "metadata": {},
+   "source": [
+    "We can get information for a parameter via return_help(parameter_name):\n",
+    "This will return an unparsed output"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 11,
+   "id": "318874f6-7acf-49bb-9786-299d4dffc0b3",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "binary_c help for variable : M_1 <Float>\n",
+      "\n",
+      "The initial mass of star one (in solar units, internally this is star index 0).\n",
+      "\n",
+      "Default : 0\n",
+      "\n",
+      "\n",
+      "\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(_binary_c_bindings.return_help('M_1'))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f7fafce6-a522-43ac-a0c2-15a3db393b49",
+   "metadata": {},
+   "source": [
+    "We can get information on all available parameters via return_help(parameter_name):"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 16,
+   "id": "d7e757ae-579c-42a2-a310-f0401b7800e8",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "\n",
+      "############################################################\n",
+      "##### Section Stars\n",
+      "############################################################\n",
+      "metallicity : This sets the metallicity of the stars, i.e. the amount (by mass) of matter which is not hydrogen or helium. If you are using the BSE algorithm, this must be 1e-4 <= metallicity <= 0.03. See also nucsyn_metallicity and effective_metallicity. : (null)\n",
+      "effective_metallicity : This sets effective metallicity of stars as used in routines like the Schneider wind loss. If not set, or set to DEFAULT_TO_METALLICITY (==-1, the default), this is just the same as metallicity. The main difference between effective_metallicity and metallicity is the range of validity: 0 <= effective_metallicity <= 1, while metallicity's range of validity is limited by the stellar evolution algorithm (so, for BSE, is 1e-4 <= metallicity <= 0.03). : (null)\n",
+      "M_1 : The initial mass of star one (in solar units, internally this is star index 0). : (null)\n",
+      "M_2 : The initial mass of star two (in solar units, internally this is star index 1). : (null)\n",
+      "M_3 : The initial mass of star three (in solar units, internally this is star index 2). : (null)\n",
+      "M_4 : The initial mass of star four (in solar units, internally this is star index 3). : (null)\n",
+      "vrot1 : The initial equatorial rotational velocity of star one (in km/s, internally this is star index 0). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot2,3,4. : (null)\n",
+      "vrot2 : The initial equatorial rotational velocity of star two (in km/s, internally this is star index 1). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,3,4. : (null)\n",
+      "vrot3 : The initial equatorial rotational velocity of star three (in km/s, internally this is star index 2). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,2,4. : (null)\n",
+      "vrot4 : The initial equatorial rotational velocity of star four (in km/s, internally this is star index 3). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,2,3. : (null)\n",
+      "Prot1 : The initial equatorial rotational velocity of star one (in km/s, internally this is star index 0). See also Prot2,3,4. : (null)\n",
+      "Prot2 : The initial equatorial rotational velocity of star two (in km/s, internally this is star index 1). See also Prot1,3,4. : (null)\n",
+      "Prot3 : The initial equatorial rotational period of star three (in days, internally this is star index 2). See also Prot1,2,4. : (null)\n",
+      "Prot4 : The initial equatorial rotational period of star four (in days, internally this is star index 3). See also Prot1,2,3. : (null)\n",
+      "inclination1 : The initial inclination of star one (in degrees). : (null)\n",
+      "inclination2 : The initial inclination of star two (in degrees). : (null)\n",
+      "inclination3 : The initial inclination of star three (in degrees). : (null)\n",
+      "inclination4 : The initial inclination of star four (in degrees). : (null)\n",
+      "B_1 : The initial magnetic field of star one (in Gauss, internally this is star index 0). : (null)\n",
+      "B_2 : The initial magnetic field of star two (in Gauss, internally this is star index 1). : (null)\n",
+      "B_3 : The initial magnetic field of star three (in Gauss, internally this is star index 2). : (null)\n",
+      "B_4 : The initial magnetic field of star four (in Gauss, internally this is star index 3). : (null)\n",
+      "B_inclination1 : The initial inclination of the magnetic field of star one (in degrees). : (null)\n",
+      "B_inclination2 : The initial inclination of the magnetic field of star two (in degrees). : (null)\n",
+      "B_inclination3 : The initial inclination of the magnetic field of star three (in degrees). : (null)\n",
+      "B_inclination4 : The initial inclination of the magnetic field of star four (in degrees). : (null)\n",
+      "stellar_type_1 : Set the stellar type of star 1 (internal index 0), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "stellar_type_2 : Set the stellar type of star 2 (internal index 1), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "stellar_type_3 : Set the stellar type of star 3 (internal index 2), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "stellar_type_4 : Set the stellar type of star 4 (internal index 3), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "max_stellar_type_1 : The maximum stellar type of star 1 (internal index 0). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value. \n",
+      " : (null)\n",
+      "max_stellar_type_2 : The maximum stellar type of star 2 (internal index 1). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.\n",
+      " : (null)\n",
+      "max_stellar_type_3 : The maximum stellar type of star 3 (internal index 2). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.\n",
+      " : (null)\n",
+      "max_stellar_type_4 : The maximum stellar type of star 4 (internal index 3). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.\n",
+      " : (null)\n",
+      "probability : The probability is a weighting applied to the star based on, say, the initial mass function. When running a grid of stars to simulate *all* stars, the summed probability of all the stars should be 1.0. : (null)\n",
+      "phasevol : The system's phase volume, used by binary_grid. : (null)\n",
+      "stellar_structure_algorithm : Set the stellar structure algorithm. 0=modified BSE (default), 1=none, 2=external function (must be defined by the calling code), 3=binary_c (not yet implemented). : (null)\n",
+      "solver : The type of solver. Default is the Forward-Euler (0), but could be RK2 (1), RK4 (2) or a predictor-corretor (3). : (null)\n",
+      "max_evolution_time : Set the maximum age for the stars (Myr). : (null)\n",
+      "max_model_number : Set the maximum number of models, ignored if 0 (default is 0). : (null)\n",
+      "monte_carlo_kicks : Turn on Monte-Carlo SN kicks. On (True) by default, and indeed other algorithms are probably broken. : (null)\n",
+      "disable_debug : Disables debug output. Only has an effect when DEBUG is 1, which probably requires a rebuild. Default FALSE. : (null)\n",
+      "timestep_logging : Turn on timestep logging (default is False). : (null)\n",
+      "rejects_in_log : Show timestep rejections in the main log (default is False). : (null)\n",
+      "vandenHeuvel_logging : Turn on van den Heuvel logging (default is False). : (null)\n",
+      "evolution_splitting : If True, turn on splitting of an evolutionary run if splitpoint (e.g. supernova) occurs. : (null)\n",
+      "disable_events : Whether to disable the new events code (defaults to False, so we use events by default)\n",
+      " : (null)\n",
+      "evolution_splitting_sn_eccentricity_threshold : Threshold eccentricity above which evolution splitting happens in a system with no SN kick. (0.01) : (null)\n",
+      "evolution_splitting_sn_n : Number of runs to split into when a SN occurs. : (null)\n",
+      "evolution_splitting_maxdepth : Max number of splits in an evolutionary run. : (null)\n",
+      "equation_of_state_algorithm : Set the equation of state algorithm. 0 = Paczynski. : (null)\n",
+      "opacity_algorithm : Set the opacity algorithm. 0 = Paczynski, 1 = Ferguson/Opal. : (null)\n",
+      "wind_mass_loss : Defines the algorithm used for stellar winds. 0 = none, 1 = Hurley et al. (2002), 2 = Schneider (2018). : 0\n",
+      "gbwind : Wind prescription for first red giant branch stars.  0=Reimers (Hurley et al 2000/2002; choose gb_reimers_eta=0.5 for their mass loss rate), 1=Schroeder+Cuntz 2005 (set gb_reimers_eta=1.0 for their mass loss rate). : (null)\n",
+      "mattsson_Orich_tpagbwind : Experimental : turns on Mattsson's TPAGB wind when the star is oxygen rich. Requires MATTSSON_MASS_LOSS. : (null)\n",
+      "magnetic_braking_factor : Multiplier for the magnetic braking angular momentum loss rate. : (null)\n",
+      "magnetic_braking_gamma : gamma factor in Rappaport style magnetic braking expression. : (null)\n",
+      "magnetic_braking_algorithm : Algorithm for the magnetic braking angular momentum loss rate. 0 = Hurley et al. 2002, 1 = Andronov, Pinnsonneault and Sills 2003, 2 = Barnes and Kim 2010  : (null)\n",
+      "helium_flash_mass_loss : Mass to be lost at the helium flash. : (null)\n",
+      "gb_reimers_eta : First red giant branch wind multiplication factor, cf. eta in Reimers' mass loss formula. (This multiplies the 4e-13 in Reimers' formula, or the 8e-14 in Schroeder and Cuntz.) : (null)\n",
+      "gbwindfac : Multiplier for the giant branch wind mass loss rate : (null)\n",
+      "tpagbwindfac : Multiplier for the TPAGB wind mass loss rate : (null)\n",
+      "eagbwindfac : Multiplier for the EAGB wind mass loss rate : (null)\n",
+      "nieuwenhuijzen_windfac : Multiplier for the Nieuwenhuijzen & de Jager wind mass loss rate : (null)\n",
+      "tpagbwind : Wind prescription during the TPAGB. 0=Karakas 2002 (a modified Vassiliadis and Wood 1993), 1=Hurley et al 2000/2002 (Vassiliadis and Wood 1993), 2=Reimers, 3=Bloecker, 4=Van Loon,  5=Rob's C-wind (broken?), 6,7=Vassiliadis and Wood 1993 (Karakas,Hurley variants respectively) when C/O>1, 8=Mattsson, 9 = Goldman et al. (2017), 10 = Beasor et al. (2020). : (null)\n",
+      "eagbwind : Wind prescription during the EAGB. 0=BSE (Hurley+2002, based on VW93), 1 = Goldman et al. (2017), 2 = Beasor et al. (2020). : (null)\n",
+      "wind_gas_to_dust_ratio : Gas to dust ratio used in wind calculations (e.g. Goldman et al. 2017). Typically 200 (Milky Way)-500 (Magellanic Clouds). Default is 200, approximately as in MW stars. : (null)\n",
+      "vwind_multiplier : Multiplier for the stellar wind velocity. : (null)\n",
+      "vwind_beta : Beta for stellar wind speed calculations, where vwind=sqrt(beta) * escape velocity. Default 0.125 (from BSE, Hurley et al. 2002).  : (null)\n",
+      "superwind_mira_switchon : In the Vassiliadis and Wood (1993) AGB wind prescription, the superwind is turned on at a given Mira period, usually 500 days. You can vary when this switch-on happens with this parameter. : (null)\n",
+      "vw93_mira_shift : In the Vassiliadis and Wood (1993) AGB wind prescription, the wind loss rate depends on the Mira period plus this offset. Requires VW93_MIRA_SHIFT. : (null)\n",
+      "vw93_multiplier : In the Vassiliadis and Wood (1993) AGB wind prescription, the wind loss rate is multiplied by this factor. Requires VW93_MULTIPLIER. : (null)\n",
+      "tpagb_reimers_eta : TPAGB Reimers wind multiplication factor, cf. eta in Reimers' mass loss formula. (This multiplies the 4e-13 in Reimers' formula, or the 8e-14 in Schroeder and Cuntz.) Note that Reimers is not the default TPAGB wind prescription. See also tpagbwind. : (null)\n",
+      "artificial_mass_accretion_rate%d : Constant mass accretion rate for star <n>. : (null)\n",
+      "artificial_angular_momentum_accretion_rate%d : Constant angular momentum accretion for star <n>. : (null)\n",
+      "artificial_orbital_angular_momentum_accretion_rate : Constant angular momentum accretion rate on the orbit. : (null)\n",
+      "artificial_accretion_start_time : Time at which artificial accretion stars. Ignored if <0 (default is -1). : (null)\n",
+      "artificial_accretion_end_time : Time at which artificial accretion ends. Ignored if <0 (default is -1). : (null)\n",
+      "wr_wind : Massive-star (WR) wind prescription. 0 = Hurley et al 2000/2002, 1=Maeder and Meynet, 2=Nugis and Lamers, 3=John Eldridge's version of Vink's early-2000s wind (See Lynnette Dray's thesis, or John Eldridge's thesis) : (null)\n",
+      "wr_wind_fac : Massive-star (WR) wind multiplication factor. : (null)\n",
+      "wrwindfac : Massive-star (WR) wind multiplication factor. Synonymous with wr_wind_fac (which you should use instead). : (null)\n",
+      "BH_prescription : Black hole mass prescrition: relates the mass of a newly formed black hole to its progenitor's (CO) core mass. 0=Hurley et al 2000/2002, 1=Belczynski (early 2000s). : (null)\n",
+      "PPISN_prescription : (Pulsational) Pair-Instability Supernova prescription: Relates initial helium core mass of star to whether the star undergoes PPISN or PISN. Requires PPISN flag to be True (see binary_c_parameters.h). 0=no ppisn, 1=Farmer et al 2019. : Ignore\n",
+      "sn_kick_distribution_II : Set the distribution of speeds applied to kick type II core collapse supernova systems. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_ECAP : Set the distribution of speeds applied to the remnants of electron-capture supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_NS_NS : Set the distribution of speeds applied to kick neutron stars and black holes that survive a NS-NS merger. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_IBC : Set the distribution of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_GRB_COLLAPSAR : Set the distribution of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova which is also a collapsar. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_TZ : Set the distribution of speeds applied to kick newly-born neutron stars and black holes at the death of a Thorne-Zytkow object. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_AIC_BH : Set the distribution of speeds applied to kick newly-born neutron stars black holes after accretion induced collapse of a neutron star. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_BH_BH : Set the distribution of speeds applied to black holes formed by the merger of two black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_BH_NS : Set the distribution of speeds applied to black holes formed by the merger of a neutron star and a black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_IA_Hybrid_HeCOWD : Set the distribution of speeds applied to any survivor of a hybrid He-COWD SNIa explosion. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_IA_Hybrid_HeCOWD_subluminous : Set the distribution of speeds applied to any survivor of a subluminous hybrid He-COWD SNIa explosion. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_PPISN : Set the distribution of speeds applied to PPISN supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_PISN : Set the distribution of speeds applied to PISN supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_PHDIS : Set the distribution of speeds applied to PHDIS supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_II : Set the dispersion of speeds applied to kick type II core collapse supernova systems. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_ECAP : Set the dispersion of speeds applied to the remnants of electron-capture supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_NS_NS : Set the dispersion of speeds applied to kick neutron stars and black holes that survive a NS-NS merger. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_IBC : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_GRB_COLLAPSAR : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova which is also a collapsar. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_TZ : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes at the death of a Thorne-Zytkow object. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_AIC_BH : Set the dispersion of speeds applied to kick newly-born neutron stars black holes after accretion induced collapse of a neutron star. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_BH_BH : Set the dispersion of speeds applied to black holes formed by the merger of two black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_BH_NS : Set the dispersion of speeds applied to black holes formed by the merger of a neutron star and a black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_IA_Hybrid_HeCOWD : Set the dispersion of speeds applied to the survivor of a SNIa explosion of a hybrid He-COWD. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_IA_Hybrid_HeCOWD_subluminous : Set the dispersion of speeds applied to the survivor of a subluminous SNIa explosion of a hybrid He-COWD. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_PPISN : Set the dispersion of speeds applied to the survivor of a PPISN supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_PISN : Set the dispersion of speeds applied to the survivor of a PISN supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_PHDIS : Set the dispersion of speeds applied to the survivor of a PHDIS supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_companion_IA_He : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia He supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_ELD : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia ELD (sub-Mch) supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_CHAND : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia Mch supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_AIC : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when an accretion induced collapse (supernova) occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_ECAP : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when an electron capture supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_He_Coal : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia helium merger supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_CHAND_Coal : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia Mch merger supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_NS_NS : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a neutron-star neutron-star merger. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_GRB_COLLAPSAR : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a GRB Collapsar (rapidly rotating SN Ibc) supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_HeStarIa : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a He-star Ia supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IBC : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a type Ib/c supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_II : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a type II supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IIa : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a type IIa supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_WDKICK : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a WD is kicked. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_TZ : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Thorne-Zytkow object is formed. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_AIC_BH : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a neutron star collapses to a black hole. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_BH_BH : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when two black holes merge. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_BH_NS : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a black hole merges with a neutron star. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_Hybrid_HeCOWD : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a hybrid He-COWD type Ia explosion. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_Hybrid_HeCOWD_subluminous : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a subluminous hybrid He-COWD type Ia explosion. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_PPISN : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a PPISN supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_PISN : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a PISN supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_PHDIS : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a PHDIS supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "wd_sigma : Set the speed at which white dwarfs are kicked when they form, in km/s. Default is zero (i.e. no kick). Requires WD_KICKS. : (null)\n",
+      "wd_kick_direction : Set the direction of white dwarf kicks. 0 = random, 1 = up, 2 = forward, 3 = backward, 4 = inward, 5 = outward. Requires WD_KICKS. : (null)\n",
+      "wd_kick_when : Decide when to kick a white dwarf. 0=at birth, 1=at first RLOF, 2=at given pulse number (see wd_kick_pulse_number), 3 at every pulse Requires WD_KICKS. : (null)\n",
+      "wd_kick_pulse_number : Apply a kick to a star at a desired pulse number on the TPAGB (i.e. pre-WD). Requires WD_KICKS. : (null)\n",
+      "minimum_helium_ignition_core_mass : Minimum helium core mass required to ignite helium in the case that the hydrogen envelope is stripped on the giant branch, e.g. to make an sdB or sdO star. Typically 0.4, if 0.0 then the BSE algorithm (based on the total mass) is used. : (null)\n",
+      "minimum_CO_core_mass_for_carbon_ignition : Minimum CO core mass for carbon ignition, assuming Mc,bagb>1.6Msun. Typically around 1.08Msun (Pols+1998). : (null)\n",
+      "minimum_CO_core_mass_for_neon_ignition : Minimum CO core mass for neon ignition. Typically around 1.42Msun. Stars that have cores that ignite carbon, but not neon explode in electon-capture supernovae. : (null)\n",
+      "minimum_mcbagb_for_nondegenerate_carbon_ignition : Minimum Mc,bagb (core mass at the base of the AGB) for non-degenerate carbon ignition. Typically around 2.25Msun (Pols+1998). : (null)\n",
+      "maximum_mcbagb_for_degenerate_carbon_ignition : Maximum Mc,bagb (core mass at the base of the AGB) for degenerate carbon ignition. Typically around 1.6Msun (Pols+1998). : (null)\n",
+      "max_neutron_star_mass : Maximum mass of a neutron star before it collapses to a black hole. Typically around 2Msun. : (null)\n",
+      "chandrasekhar_mass : The Chandrasekhar mass, usually 1.44Msun : (null)\n",
+      "delta_mcmin : A parameter to reduce the minimum core mass for third dredge up to occur on the TPAGB. As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. : (null)\n",
+      "lambda_min : A parameter to increase the efficiency of third dredge up on the TPAGB. The efficiency is lambda * lambda_mult, and setting lambda_min>0 implies that, once Mc>Mcmin (see delta_mcmin) lambda=Max(lambda(fit to Karakas), lambda_min). As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. See also lambda_multiplier. : (null)\n",
+      "lambda_multiplier : A parameter to increase the efficiency of third dredge up on the TPAGB. The efficiency is lambda * lambda_mult, and setting lambda_min>0 implies that, once Mc>Mcmin (see delta_mcmin) lambda=Max(lambda(fit to Karakas), lambda_min). As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. : (null)\n",
+      "minimum_envelope_mass_for_third_dredgeup : The minimum envelope mass for third dredge up on the TPAGB. Early, solar metallicity models by Straniero et al suggested 0.5Msun is typical. However, circumstantial evidence (Izzard et al 2009) as well as newer models by Stancliffe and Karakas suggest that at low metallicity a value nearer zero is more appropriate. : (null)\n",
+      "mass_of_pmz : The mass in the partial mixing zone of a TPAGB star, using the Karakas 2012 tables. Ask Carlo Abate for more details, or see the series of papers Abate et al 2012, 2013, 2014. Requires NUCSYN and USE_TABULAR_INTERSHELL_ABUNDANCES_KARAKAS_2012. : (null)\n",
+      "c13_eff : The \"efficiency\" of partial mixing in a TPAGB star intershell region, when using the s-process tables of Gallino, Busso, Lugaro et al. as provided by Maria Lugaro for the Izzard et al. 2009 paper. Requires NUCSYN and NUCSYN_S_PROCESS. : (null)\n",
+      "mc13_pocket_multiplier : Multiplies the mass in the partial mixing zone of a TPAGB star, when using the s-process tables of Gallino, Busso, Lugaro et al. as provided by Maria Lugaro for the Izzard et al. 2009 paper. Requires NUCSYN and NUCSYN_S_PROCESS. : (null)\n",
+      "tides_convective_damping : Tidal convective damping algorithm. 0=TIDES_HURLEY2002 Zahn 197x timescales + Hut, as in Hurley et al (2002), 1 = TIDES_ZAHN1989 : Zahn 1989 lambdas + Hut. : (null)\n",
+      "E2_prescription : Choose how to calculate the E2 structural parameter (used in tidal timescale calculations). 0=Hurley 1=Izzard (see Siess et al 2013). : (null)\n",
+      "dtfac : A parameter to decrease the timestep ONLY during the TPAGB phase. : (null)\n",
+      "hbbtfac : A parameter to modulate the temperature at the base of the hot-bottom burning zone in TPAGB stars. (Works only if NUCSYN is defined) : (null)\n",
+      "wind_multiplier_%d : Wind multiplier for the stellar type specified by the intger %d. By default these are all 1.0. : (null)\n",
+      "wind_type_multiplier_%d : Wind multiplier for different types of wind (MS, GB, AGB, WR, LBV, OTHER), given by the integer %d. By default these are all 1.0. : (null)\n",
+      "pre_main_sequence : Set to True to turn on pre-main sequence evolution. Currently this is not a special stellar type, rather the first (small) fraction of the main sequence has increased radii to match the Railton et al 2014 fits to Tout's pre-main sequence stars. Requires PRE_MAIN_SEQUENCE. See also pre_main_sequence_fit_lobes. : (null)\n",
+      "pre_main_sequence_fit_lobes : Set to True force a pre-main sequence star into its Roche lobe. This is done by artificially aging it. Requires PRE_MAIN_SEQUENCE : (null)\n",
+      "small_envelope_method : Choose the method used to determine the stellar radius when the envelope mass is very thin. 0 = Hurley et al. (2002), 1 = Miller Bertolami et al. (2016+) for GB and AGB stars only. : (null)\n",
+      "timestep_modulator : Multiplier applied to the global timestep. Requires TIMESTEP_MODULATION. : (null)\n",
+      "timestep_multiplier%d : Multiplier applied to timestep limit <n>. : (null)\n",
+      "maximum_timestep : The maximum timestep (MYr). : (null)\n",
+      "zoomfac_multiplier_decrease : When a timestep is rejected, decrease the timestep by this factor (0.5). : (null)\n",
+      "zoomfac_multiplier_increase : When a timestep is rejected, zooms, then succeeds, increase the timestep by this factor (1.2). : (null)\n",
+      "maximum_timestep_factor : The maximum factor between two subsequent timesteps (1.2). : (null)\n",
+      "maximum_nuclear_burning_timestep : The maximum timestep (MYr) in any nuclear burning phase. : (null)\n",
+      "nova_retention_method : Algorithm used to calculate the amount of mass retained during a nova explosion. 0=use nova_retention_fraction. (other methods pending) : (null)\n",
+      "MINT_metallicity : This sets the metallicity for MINT. It is ignored if set to -1.0, the default, in which case the normal metallicity parameter is used. : (null)\n",
+      "gaia_Teff_binwidth : log10(Effective temperature) bin width used to make Gaia-like HRDs\n",
+      " : (null)\n",
+      "gaia_L_binwidth : log10(luminosity) bin width used to make Gaia-like HRDs\n",
+      " : (null)\n",
+      "gaia_colour_transform_method : Use this to select the method used to transform to Gaia colours from other colour schemes. GAIA_CONVERSION_UBVRI_UNIVARIATE_JORDI2010 = 0 Jordi et al.'s univariate UBVRI fits, GAIA_CONVERSION_UBVRI_BIVARIATE_JORDI2010 = 1 Jordi et al.'s bivariate UBVRI fits, GAIA_CONVERSION_ugriz_UNIVARIATE_JORDI2010 = 2 Jordi et al.'s univariate UBVRI fits, GAIA_CONVERSION_ugriz_BIVARIATE_JORDI2010 = 3 Jordi et al.'s univariate ugriv fits, GAIA_CONVERSION_UBVRI_UNIVARIATE_EVANS2018 = 4 Evans et al. (2018, DR2) fits, GAIA_CONVERSION_ugriz_UNIVARIATE_EVANS2018 = 5 Evans et al. (2018, DR2) fits, GAIA_CONVERSION_UBVRI_RIELLO2020 = 6 Riello et al. (2020, DR3) fits, GAIA_CONVERSION_ugriz_RIELLO2020 = 7 Riello et al. (2020, DR3) fits. : (null)\n",
+      "rotationally_enhanced_mass_loss : Set to 1 to enable rotationally enhanced mass loss rate algorithms: 0= none, 1=formula cf. Langer models (=ROTATIONALLY_ENHANCED_MASSLOSS_LANGER_FORMULA), 2=limit accretion rate before wind loss is applied, 3 = both 1 and 2. See also rotationally_enhanced_exponent : (null)\n",
+      "AGB_core_algorithm : Algorithm to use for calculating AGB core masses. 0=Hurley et al. 2002 if no NUCSYN, Karakas 2002 if NUCSYN is defined; 1=Hurley et al. 2002 (overshooting models); 1=Karakas 2002 (non-overshooting models). : (null)\n",
+      "AGB_radius_algorithm : Algorithm to use for calculating radii on the TPAGB. : (null)\n",
+      "AGB_luminosity_algorithm : Algorithm to use for calculating luminosities on the TPAGB. : (null)\n",
+      "AGB_3dup_algorithm : Algorithm to use for calculating third dredge up efficiency on the TPAGB. : (null)\n",
+      "overspin_algorithm : Algorithm to determine what we do when a star is rotating at its breakup velocity. OVERSPIN_BSE (0) conservatively transfers the angular momentum back to the orbit. OVERSPIN_MASSLOSS uses the rotationally_enhanced_massloss parameter to lose mass which carries away the angular momentum. : (null)\n",
+      "rotationally_enhanced_exponent : The exponent (power) by which rotationally enhanced mass loss is raised. Requires ROTATIONALLY_ENHANCED_MASS_LOSS. See also rotationally_enhanced_mass_loss. : (null)\n",
+      "batchmode : Set the batchmode control variable. Use only if you know what you are doing! : (null)\n",
+      "speedtests : If True, turns on speedtests during version information (off by default). : (null)\n",
+      "use_fixed_timestep_%d : Set to True to use fixed timestep <n>, False to turn off. Fixed timesteps are on (this is True) by default. : (null)\n",
+      "task%d : Control tasks to be performed by binary_c. By default, these are all TRUE. For more information see binary_c_macros.h, particularly the BINARY_C_TASK_* macros. : (null)\n",
+      "orbiting_object : Usage: --orbiting_object mass,spinrate,central_object,period. : 1.0\n",
+      "orbiting_objects_log : If True, turn on orbiting-object log. : (null)\n",
+      "orbiting_objects_log : If True, turn on orbiting-object log. : (null)\n",
+      "orbiting_objects_wind_accretion_multiplier : Multiplier for wind accretion on orbiting objects. Hurley et al 2002 use 1.5, which is the default. : (null)\n",
+      "orbiting_objects_close_pc_threshold : How close are orbiting objects allowed to be? Set this to be the absolute percentage difference minimum. : (null)\n",
+      "orbiting_objects_tides_multiplier : Multiplier for tidal torques on orbiting objects. : (null)\n",
+      "evaporate_escaped_orbiting_objects : If True, evaporate orbiting objects that have escaped the system. : (null)\n",
+      "RLOF_transition_objects_escape : If True, objects that escape their Roche lobe are ejected from the system, otherwise they are placed just outside the minimum stable orbit. : (null)\n",
+      "PN_resolve : If True, the timestep will be shortened to resolve better the PN phase (FALSE). : (null)\n",
+      "PN_resolve_minimum_luminosity : The luminosity above which extra time resolution for PNe is applied (see PN_resolve). : (null)\n",
+      "PN_resolve_maximum_envelope_mass : The envelope mass below which extra time resolution for PNe is applied (see PN_resolve). : (null)\n",
+      "PN_resolve_minimum_effective_temperature : The minimum effective temperature above which extra time resolution for PNe is applied (see PN_resolve). : (null)\n",
+      "PN_fast_wind : If True, thin-envelope PNe will have fast winds (FALSE). : (null)\n",
+      "PN_fast_wind_dm_GB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_GB) : (null)\n",
+      "PN_fast_wind_mdot_GB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_GB) : (null)\n",
+      "PN_fast_wind_dm_AGB : The envelope mass below which fast wind used during the AGB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_AGB) : (null)\n",
+      "PN_fast_wind_mdot_AGB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_AGB) : (null)\n",
+      "HeWD_HeWD_ignition_mass : HeWD-HeWD mergers above this mass reignite helium. (0.3) : (null)\n",
+      "wind_Nieuwenhuijzen_luminosity_lower_limit : Above this luminosity we activate the Nieuwenhuijzen and de Jager wind (4e3 Lsun). : (null)\n",
+      "wind_LBV_luminosity_lower_limit : Above this luminosity we activate the LBV wind (6e5 Lsun). : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Binary\n",
+      "############################################################\n",
+      "separation : Set the orbital separation (actually the semi-major axis) of the binary (internal index 0, stellar indices 0 and 1) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)\n",
+      "separation_triple : Set the orbital separation (actually the semi-major axis) of the triple (internal index 1) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)\n",
+      "separation_quadruple : Set the orbital separation (actually the semi-major axis) of the quadruple (internal index 2) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)\n",
+      "orbital_period : Set the initial orbital period of the binary, stars 1 and 2 (internal indices 0 and 1) in days. See also separation. : (null)\n",
+      "orbital_period_triple : Set the initial orbital period of the triple in days. See also separation. : (null)\n",
+      "orbital_period_quadruple : Set the orbital period of the outer binary in a quadrulple (stars 3 and 4, internal indices 2 and 3) in days. See also separation. : (null)\n",
+      "eccentricity : Set the initial eccentricity of the binary orbit (stars 1 and 2, internal indices 0 and 1). : (null)\n",
+      "eccentricity_triple : Set the initial eccentricity of the triple orbit. : (null)\n",
+      "eccentricity_quadruple : Set the initial eccentricity of the outer binary of a quadruple (stars 3 and 4, internal indices 2 and 3). : (null)\n",
+      "incliniation : Set the initial orbital_inclination of the binary relative to zero. : (null)\n",
+      "incliniation_triple : Set the initial orbital_inclination of the triple orbit relative to zero. : (null)\n",
+      "incliniation_quadruple : Set the initial orbital_inclinationy of the quadruple orbit relative to zero. : (null)\n",
+      "orbital_phase : Set the initial orbital phase of the binary orbit. : (null)\n",
+      "orbital_phase_triple : Set the initial orbital phase of the triple orbit. : (null)\n",
+      "orbital_phase_quadruple : Set the initial orbital phase of the quadruple orbit. : (null)\n",
+      "argument_of_periastron : Set the initial argument of periastron of the binary orbit. : (null)\n",
+      "argument_of_periastron_triple : Set the initial argument of periastron of the triple orbit. : (null)\n",
+      "argument_of_periastron_quadruple : Set the initial argument of periastron of the quadruple orbit. : (null)\n",
+      "disc_timestep_factor : Factor that multiplies the natural timestep of a disc. : (null)\n",
+      "white_dwarf_cooling_model : White dwarf cooling model, relates age to luminosity. WHITE_DWARF_COOLING_MESTEL = 0 is Mestel's model, WHITE_DWARF_COOLING_MESTEL_MODIFIED = 1 is Hurley's modified Mestel model, WHITE_DWARF_COOLING_CARRASCO2014 = 2 is based on Carrasco (2014) tables.   : (null)\n",
+      "white_dwarf_radius_model : White dwarf radius model, radius to mass (and perhaps age). WHITE_DWARF_RADIUS_NAUENBERG1972 = 0 Nauenberg (1972), WHITE_DWARF_RADIUS_MU = 1 mu-dependent variant, WHITE_DWARF_RADIUS_CARRASCO2014 = 2 is based on Carrasco (2014) tables. : (null)\n",
+      "cbdisc_mass_loss_inner_viscous_accretion_method : Chooses where the mass that is accreted from the inner edge of a circumbinary disc goes, i.e. to which star. 0 = Young and Clarke 2015, 1 = Gerosa et al 2015, 2 = 50:50 (i.e. not dependence on mass). : (null)\n",
+      "cbdisc_inner_edge_stripping : If True, allow inner edge mass stripping. : (null)\n",
+      "cbdisc_end_evolution_after_disc : If True, stop evolution when a disc evaporates. : (null)\n",
+      "cbdisc_no_wind_if_cbdisc : If True, disable stellar winds when there is a circumbinary disc. : (null)\n",
+      "cbdisc_outer_edge_stripping : If True, allow outer edge mass stripping. : (null)\n",
+      "disc_n_monte_carlo_guesses : Number of monte carlo guesses to try in the disc solver if the normal list of guesses fails (0). : (null)\n",
+      "disc_log : If 1, turn on the disc log. Requires DISC_LOG to be defined on build. : (null)\n",
+      "disc_log2d : If 1, turn on the 2d disc log. Requires DISC_LOG to be defined on build. : (null)\n",
+      "disc_log_dt : If non-zero, only allows disc log output every disc_log_dt Myr. : (null)\n",
+      "disc_log_directory : Directory into which disc logging is sent (must exist!). : /tmp/\n",
+      "post_ce_adaptive_menv : If TRUE, and if post_ce_objects_have_envelopes is TRUE, then the envelope mass of a post-CE star is such that it sits just inside its Roche lobe. If FALSE then a fixed (thin) envelope mass is applied that depends on the stellar type (see macros POST_CE_ENVELOPE_DM_GB, POST_CE_ENVELOPE_DM_EAGB and POST_CE_ENVELOPE_DM_TPAGB). : (null)\n",
+      "post_ce_objects_have_envelopes : If TRUE then post-common-envelope objects have thin envelopes. You need this if you are to have post-CE post-AGB stars. Note that this *may* be unstable, i.e. you may end up having many CEEs. The mass in the envelope is controlled by post_ce_adaptive_menv. TRUE by default. : (null)\n",
+      "PN_comenv_transition_time : post-common envelope transition time in years (1e2).  This is the time taken to move from CEE ejection to Teff > 30e4 K. Hall et al. (2013) suggest ~100 years. : (null)\n",
+      "minimum_time_between_PNe : The minimum time (Myr) between planetary nebula detections. This prevents multiple, fast common envelopes triggering two PNe (0.1). : (null)\n",
+      "PN_Hall_fading_time_algorithm : In stars with low mass (<0.45Msun) cores, you can choose to set the PN fading time to either the minimum (PN_HALL_FADING_TIME_ALGORITHM_MINIMUM) or maximum (PN_HALL_FADING_TIME_ALGORITHM_MAXIMUM) as shown in Fig. 6 of Hall et al. (2013). : (null)\n",
+      "PPN_envelope_mass : Desired pre-planetary nebula (post-AGB) envelope mass. : (null)\n",
+      "cbdisc_eccentricity_pumping_method : Select from various eccentricity-pumping methods when there is a circumbinary disc. Requires DISCS. 0 = off. : (null)\n",
+      "cbdisc_viscous_photoevaporative_coupling : Set to 1 to turn on viscous-photoevaporative coupling in circumbinary discs. Requires DISCS. 0 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_NONE = off, 1 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_INSTANT instant, 2 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_VISCOUS slow, viscous wind. : (null)\n",
+      "cbdisc_inner_edge_stripping_timescale : Defines the timescale for mass loss from by inner edge stripping. 0 = instant, 1 = very long, 2 = viscous at Revap_in, 3 = orbital at Revap_in. : (null)\n",
+      "cbdisc_outer_edge_stripping_timescale : Defines the timescale for mass loss from by outer edge stripping. 0 = instant, 1 = very long, 2 = viscous at Revap_in, 3 = orbital at Revap_out. : (null)\n",
+      "cbdisc_viscous_L2_coupling : Set to 1 to turn on viscous-L2-loss coupling in circumbinary discs. Requires DISCS. 0 = off. : (null)\n",
+      "gravitational_radiation_model : Model for gravitational radiation from the system. 0=Hurley et al 2002 (Landau and Lifshitz 1951). 1 = as 0 but only when there is no RLOF. 2 = none. : (null)\n",
+      "nova_irradiation_multiplier : Multiplier for nova-radiative induced mass loss. (Shara+1986) : (null)\n",
+      "gravitational_radiation_modulator_J : Modulator for gravitational wave radiation angular momentum loss rate (1.0). : (null)\n",
+      "gravitational_radiation_modulator_e : Modulator for gravitational wave radiation eccentricity pumping rate (1.0). : (null)\n",
+      "nova_faml_multiplier : Nova friction-induced angular momentum loss multiplier. (Shara+1986) : (null)\n",
+      "RLOF_angular_momentum_transfer_model : Choose angular momentum transfer model in RLOF. 0=BSE (with discs), 1=conservative : (null)\n",
+      "post_SN_orbit_method : Method by which the post-SN orbit is calculated. 0=BSE, 1=Tauris&Taken 1998. : (null)\n",
+      "multiplicity : Multiplicity: 1=single star, 2=binary, 3=triple, 4=quadruple. : (null)\n",
+      "accretion_limit_eddington_steady_multiplier : Steady accretion is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_steady_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)\n",
+      "accretion_limit_eddington_LMMS_multiplier : Accretion from a low-mass, convective, main_sequence star is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_LMMS_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)\n",
+      "accretion_limit_eddington_WD_to_remnant_multiplier : Accretion from a WD onto a remnant star (e.g. another white dwarf, neutron star or black hole) is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_WD_to_remnant_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)\n",
+      "accretion_limit_thermal_multiplier : Mass transfer onto a MS, HG or CHeB star is limited by the accretor's thermal rate times this multiplier. : (null)\n",
+      "accretion_limit_dynamical_multiplier : Mass transfer is limited by the accretor's dynamical rate times this multiplier. : (null)\n",
+      "donor_limit_envelope_multiplier : Mass transfer by RLOF is limited by this fraction of the donor's envelope mass per timestep : (null)\n",
+      "donor_limit_thermal_multiplier : Mass transfer by RLOF is limited by the accretor's thermal rate times this multiplier. : (null)\n",
+      "donor_limit_dynamical_multiplier : Mass transfer by RLOF is limited by the donor's dynamical rate times this multiplier. : (null)\n",
+      "Bondi_Hoyle_accretion_factor : Wind accretion rate, as calculated by the Bondi-Hoyle-Littleton formula, multiplcation factor. Hurley et al 2002 use 1.5, which is the default. : (null)\n",
+      "tidal_strength_factor : A modulator for the tidal strength. If this factor > 1 then tides are stronger, i.e. tidal timescales are reduced. : (null)\n",
+      "hachisu_qcrit : Critical q=Maccretor/Mdonor above which Hachisu's disk wind turns on. : (null)\n",
+      "hachisu_disk_wind : Set to True to turn on Hachisu's disk wind when material accretes too fast onto a white dwarf. This helps to make more SNeIa. See also hachisu_qcrit. : (null)\n",
+      "mass_accretion_for_eld : The mass that must be accreted onto a COWD for it to ignite as an edge-lit detonation SNIa. : (null)\n",
+      "WDWD_merger_algorithm : Algorithm to be used when merging two white dwarfs. 0 = Hurley et al. (2002), 1 = Perets+ (2019), 2 = Chen+ (2016, todo)  : (null)\n",
+      "type_Ia_MCh_supernova_algorithm : Algorithm to be used when calculating type Ia yields from Chandrasekhar-mass exploders. 0 = DD7 (Iwamoto 1999), 1 = Seitenzahl 2013 3D hydro yields (you must also set Seitenzahl2013_model)  : (null)\n",
+      "Seitenzahl2013_model : Which of Seitenzahl et al. 2013's models to use? One of N1,N3,N5,N10,N20,N40,N100L,N100,N100H,N150,N200,N300C,N1600,N1600C,N100_Z0.5,N100_Z0.1,N100_Z0.01 (defaults to N100). : N1\n",
+      "type_Ia_sub_MCh_supernova_algorithm : Algorithm to be used when calculating type Ia yields from sub-Chandrasekhar-mass exploders. (Currently unused.) : (null)\n",
+      "max_HeWD_mass : The maximum mass a HeWD can have before it ignites helium (0.7). : (null)\n",
+      "merger_mass_loss_fraction : Fraction of the total mass which is lost when stars merge. : (null)\n",
+      "merger_angular_momentum_factor : When two stars merge the resulting single star retains a fraction of the total system angular momentum (or the critical spin angular momentum, if it is smaller) multiplied by this factor. : (null)\n",
+      "wind_angular_momentum_loss : Prescription for losing angular momentum in a stellar wind. 0=Hurley et al 2002 ('Tout') prescription, 1=lw i.e. a factor multiplying the specific orbital angular momentum, 2=lw hybrid for fast winds. Set wind_djorb_fac to the desired factor.. : (null)\n",
+      "wind_djorb_fac : Factor multiplying angular momentum loss in a stellar wind when wind_angular_momentum_loss=0 (the Tout/Hurley et al 2002 prescription). See wind_angular_momentum_loss. : (null)\n",
+      "lw : Factor multiplying angular momentum loss in a stellar wind when wind_angular_momentum_loss=1,2 (the 'lw' prescription). See wind_angular_momentum_loss. : (null)\n",
+      "VW93_EAGB_wind_speed : Activate this to use Vassiliadis and Wood (1993) wind speed during the EAGB. : (null)\n",
+      "VW93_TPAGB_wind_speed : Activate this to use Vassiliadis and Wood (1993) wind speed during the EAGB. : (null)\n",
+      "use_periastron_Roche_radius : Set this to True to use the Roche lobe radius at periastron, rather than (the default to) assume a circular orbit. This will be useful one day when we treat RLOF in eccentric orbits properly, hopefully. : (null)\n",
+      "qcrit_LMMS : Apply critical q=Mdonor/Maccretor value for low-mass main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_MS : Apply critical q=Mdonor/Maccretor value for (non-low mass) main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HG : Apply critical q=Mdonor/Maccretor value for Hertzsprung gap stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_GB : Apply critical q=Mdonor/Maccretor value for first red giant branch stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_CHeB : Apply critical q=Mdonor/Maccretor value for core helium burning stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_EAGB : Apply critical q=Mdonor/Maccretor value for early-AGB stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_TPAGB : Apply critical q=Mdonor/Maccretor value for TP-AGB stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeMS : Apply critical q=Mdonor/Maccretor value for helium main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeHG : Apply critical q=Mdonor/Maccretor value for helium Hertzsprung gap stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeGB : Apply critical q=Mdonor/Maccretor value for helium red giant stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeWD : Apply critical q=Mdonor/Maccretor value for helium white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_COWD : Apply critical q=Mdonor/Maccretor value for carbon-oxygen white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_ONeWD : Apply critical q=Mdonor/Maccretor value for oxygen-neon white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_NS : Apply critical q=Mdonor/Maccretor value for neutron stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_BH : Apply critical q=Mdonor/Maccretor value for black holes to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_LMMS : Apply critical q=Mdonor/Maccretor value for (low mass) main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_MS : Apply critical q=Mdonor/Maccretor value for (non-low mass) main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HG : Apply critical q=Mdonor/Maccretor value for Hertzsprung gap stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_GB : Apply critical q=Mdonor/Maccretor value for first red giant branch stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_CHeB : Apply critical q=Mdonor/Maccretor value for core helium burning stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_EAGB : Apply critical q=Mdonor/Maccretor value for early-AGB stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_TPAGB : Apply critical q=Mdonor/Maccretor value for TP-AGB stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeMS : Apply critical q=Mdonor/Maccretor value for helium main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeHG : Apply critical q=Mdonor/Maccretor value for helium Hertzsprung gap stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeGB : Apply critical q=Mdonor/Maccretor value for helium red giant stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeWD : Apply critical q=Mdonor/Maccretor value for helium white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_COWD : Apply critical q=Mdonor/Maccretor value for carbon-oxygen white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_ONeWD : Apply critical q=Mdonor/Maccretor value for oxygen-neon white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_NS : Apply critical q=Mdonor/Maccretor value for neutron stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_BH : Apply critical q=Mdonor/Maccretor value for black holes to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "mass_for_Hestar_Ia_upper : Only helium stars below this mass can explode as SNIa. Default is zero, i.e. it never happens. See also mass_for_Hestar_Ia_lower. : (null)\n",
+      "mass_for_Hestar_Ia_lower : Only helium stars above this mass can explode as SNIa. Default is zero, i.e. it never happens. See also mass_for_Hestar_Ia_upper. : (null)\n",
+      "alphaCB : Circumbinary disk viscosity parameter, alpha. : (null)\n",
+      "minimum_donor_menv_for_comenv : Minimum donor envelope mass for common envelope evolution to be triggered (Msun). Default 0. : (null)\n",
+      "comenv_prescription : Use this to choose which common envelope prescription you should use. 0=Hurley et al 2002 (based on the Paczyński energy model) or 1=Nelemans and Tout (angular momentum model). See also alpha_ce, comenv_ms_accretion_mass, comenv_ms_accretion_fraction, comenv_ns_accretion_fraction, comenv_ns_accretion_mass, nelemans_gamma, nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs, lambda_ce, lambda_ionisation. : (null)\n",
+      "comenv_prescription%d : Use this to choose which common envelope prescription you should use. 0=Hurley et al 2002 (based on the Paczyński energy model) or 1=Nelemans and Tout (angular momentum model). See also alpha_ce, comenv_ms_accretion_mass, comenv_ms_accretion_fraction, comenv_ns_accretion_fraction, comenv_ns_accretion_mass, nelemans_gamma, nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs, lambda_ce, lambda_ionisation. : (null)\n",
+      "comenv_ejection_spin_method : When a common envelope is ejected, we need to decide how fast the stars are left spinning. COMENV_EJECTION_SPIN_METHOD_DO_NOTHING (0) is the default, this just leaves the stars/stellar cores spinning with the same spin rate (omega = angular velocity) with which they entered the common envelope phase. COMENV_EJECTION_SPIN_METHOD_SYCHRONIZE instead tidally synchronizes the stars with their new orbital angular velocity. : (null)\n",
+      "comenv_merger_spin_method : When a common envelope binary merges, we need to decide how fast the resulting single star is left spinning. COMENV_MERGER_SPIN_METHOD_SPECIFIC (0) is the default, this preserves angular momentum but limits the specific angular momentum of the merged star to the specific angular momentum of the system at the onset of common envelope evolution. COMENV_MERGER_SPIN_METHOD_CONSERVE_ANGMOM (1) sets the merger's angular momentum to be that of the system at the onset of common envelope evolution (which means the star may be rotating supercritically). COMENV_MERGER_SPIN_METHOD_CONSERVE_OMEGA (2) sets the spin rate (angular frequency = omega) of the merged star to be that of the orbit just at the onset of common envelope evolution. : (null)\n",
+      "comenv_ms_accretion_mass : Experimental. During common envelope evolution, a main sequence star may accrete some of the envelope's mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_fraction. : (null)\n",
+      "comenv_ms_accretion_fraction : Experimental. During common envelope evolution, a main sequence may accrete a fraction of the envelope's mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_mass. : (null)\n",
+      "comenv_ns_accretion_mass : Experimental. During common envelope evolution, a neutron star may accrete some of the envelope's mass. Requires COMENV_NS_ACCRETION. See also comenv_ns_accretion_fraction. : (null)\n",
+      "comenv_ns_accretion_fraction : Experimental. During common envelope evolution, a neutron star may accrete a fraction of the envelope's mass. Requires COMENV_NS_ACCRETION. See also comenv_ns_accretion_mass. : (null)\n",
+      "alpha_ce : Common envelope energy formalism parameter. A fraction alpha of the orbital energy is used to eject the envelope. See Hurley et al 2002 for details. : (null)\n",
+      "alpha_ce%d : Common envelope energy formalism parameter. A fraction alpha of the orbital energy is used to eject the envelope. See Hurley et al 2002 for details. : (null)\n",
+      "lambda_ce : Common envelope parameter. The binding energy of the common envelope is G*M*Menv/(lambda*R). Typically this is taken to be 0.5, but if set to -1 binary_c uses the Dewi and Tauris fits instead, -2 uses the formalism of Wang, Jia and Li (2016) and if -3 then a polytropic formalism is used (see also comenv_splitmass). : (null)\n",
+      "lambda_ce%d : Common envelope parameter. The binding energy of the common envelope is G*M*Menv/(lambda*R). Typically this is taken to be 0.5, but if set to -1 binary_c uses the Dewi and Tauris fits instead, -2 uses the formalism of Wang, Jia and Li (2016) and if -3 then a polytropic formalism is used (see also comenv_splitmass). : (null)\n",
+      "comenv_splitmass : When lambda_ce=-2, the envelope binding energy, lambda, is calculated using a polytropic formalism. The comenv_splitmass defines the point, in the units of the core mass, above which material is ejected. : (null)\n",
+      "nelemans_recalc_eccentricity : If True, recalculate the eccentricity after angular momentum is removed.  : (null)\n",
+      "comenv_post_eccentricity : Eccentricity remaining after common envelope ejection. : (null)\n",
+      "nelemans_gamma : Set the fraction of the orbital specific angular momentum that is used to eject the common envelope according to the Nelemans and Tout prescription. See also nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs. : (null)\n",
+      "nelemans_minq : Only activate the Nelemans and Tout common envelope prescription for q>nelemans_minq. See also nelemans_gamma, nelemans_max_frac_j_change, nelemans_n_comenvs. : (null)\n",
+      "nelemans_max_frac_j_change : Maximum fractional angular momentum change in the Nelemans and Tout common envelope prescription. See also nelemans_gamma, nelemans_minq, nelemans_n_comenvs. : (null)\n",
+      "nelemans_n_comenvs : Set the maximum number of common envelope ejections allowed to follow the Nelemans and Tout prescription, after which the standard alpha prescription is used. : (null)\n",
+      "lambda_ionisation : A fraction lambda_ionisation of the recombination energy in the common envelope goes into ejecting the envelope. This is usually 0.0, but a positive value can make a big difference to the outcome of common envelope evolution. : (null)\n",
+      "lambda_ionisation%d : A fraction lambda_ionisation of the recombination energy in the common envelope goes into ejecting the envelope. This is usually 0.0, but a positive value can make a big difference to the outcome of common envelope evolution. : (null)\n",
+      "lambda_enthalpy : A fraction of the enthalpy to be included in the common envelope evolution binding energy. Only used for the Wang 2016 prescription (so far). : (null)\n",
+      "lambda_enthalpy%d : A fraction of the enthalpy to be included in the common envelope evolution binding energy. Only used for the Wang 2016 prescription (so far). : (null)\n",
+      "cbdisc_albedo : Circumbinary-disc albedo. Requires DISCS. : (null)\n",
+      "cbdisc_gamma : Circumbinary disc gamma (equation of state) parameter. Requires DISCS. : (null)\n",
+      "cbdisc_alpha : Circumbinary disc alpha (viscosity) parameter. Requires DISCS. : (null)\n",
+      "cbdisc_kappa : Circumbinary disc kappa (opacity) parameter. Requires DISCS. : (null)\n",
+      "cbdisc_minimum_evaporation_timescale : Circumbinary disc minimum evaporation timescale (years). If (slow, not edge stripped) mass loss would evaporate the disc on a timescale less than this, simply evaporate the disc immediated. Usually set to 1y, ignore if zero. Requires DISCS. : (null)\n",
+      "cbdisc_torquef : Circumbinary disc binary torque multiplier. Requires DISCS. : (null)\n",
+      "cbdisc_max_lifetime : Circumbinary disc maximum lifetime (years, ignored if 0). Requires DISCS. : (null)\n",
+      "cbdisc_init_dM : On cbdisc start, reduce mass by a fraction dM if it won't converge. Requires DISCS. : (null)\n",
+      "cbdisc_init_dJdM : On cbdisc start, reduce angular momentum by a fraction dJ/dM*dM if it won't converge. Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_constant_rate : Circumbinary disc constant mass loss rate (Msun/year). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_FUV_multiplier : Circumbinary disc FUV mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_Xray_multiplier : Circumbinary disc X-ray mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_ISM_ram_pressure_multiplier : Circumbinary disc interstellar medium ram pressure stripping mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_ISM_pressure : Circumbinary disc interstellar medium ram pressure in units of Boltzmann constant per Kelvin (I think...). Requires DISCS. Typically 3000.0. See e.g. http://www.astronomy.ohio-state.edu/~pogge/Ast871/Notes/Intro.pdf page 15 or https://arxiv.org/pdf/0902.0820.pdf Fig. 1 (left panel). : (null)\n",
+      "cbdisc_mass_loss_inner_viscous_multiplier : Circumbinary disc inner edge viscous mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_inner_viscous_angular_momentum_multiplier : Circumbinary disc inner edge viscous angular momentum multiplier (no units). The inner edge angular momentum Requires DISCS. : (null)\n",
+      "cbdisc_resonance_multiplier : Circumbinary disc resonant interaction multiplier, affects eccentricity pumping and angular momentum rates. Requires DISCS. : (null)\n",
+      "cbdisc_resonance_damping : Circumbinary disc resonant interaction damping: should be on (True) to damp the l=1, m=2 resonance when the disc inner edge lies outside the resonance location. Requires DISCS. : (null)\n",
+      "cbdisc_fail_ring_inside_separation : If True, while converging on a structure, circumbinary discs with Rring < the binary separation are immediately failed. : (null)\n",
+      "cbdisc_mass_loss_inner_L2_cross_multiplier : Circumbinary disc inner edge L2-crossing mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_minimum_luminosity : Circumbinary disc minimum luminosity. If the disc becomes dimmer than this, the disc is evaporated instantly. Requires DISCS. : (null)\n",
+      "cbdisc_minimum_mass : Circumbinary disc minimum mass. If the disc becomes less massive than this, the disc is evaporated instantly. Requires DISCS. : (null)\n",
+      "cbdisc_minimum_fRing : Circumbinary disc minimum fRing. If the disc becomes a ring, and fRing = |Rout/Rin-1| < this value (and this value is non-zero), the disc is evaporated instantly. Requires DISCS. : (null)\n",
+      "comenv_disc_angmom_fraction : If >0 Fraction of the common envelope's angular momentum that goes into the circumbinary disc. If -1 then uses the moments of inertia to calculate (deprecated), if -2 use the common envelope's specific angular momentum, if -3 uses the L2 point at the end of the common envelope to set the angular momentum. Requires DISCS and DISCS_CIRCUMBINARY_FROM_COMENV. : (null)\n",
+      "comenv_disc_mass_fraction : Fraction of the common envelope's mass that goes into the circumbinary disc. Requires DISCS and DISCS_CIRCUMBINARY_FROM_COMENV. : (null)\n",
+      "wind_disc_angmom_fraction : If >0 Fraction of the wind envelope's angular momentum that goes into the circumbinary disc. If -1 then uses the L2 point's specific angular momentum. Requires DISCS and DISCS_CIRCUMBINARY_FROM_WIND. : (null)\n",
+      "wind_disc_mass_fraction : Fraction of the stellar wind's mass that goes into the circumbinary disc. Requires DISCS and DISCS_CIRCUMBINARY_FROM_WIND. : (null)\n",
+      "WRLOF_method : Choose whether and how to apply wind-Roche-lobe-overflow. 0=none, 1=q-dependent, 2=quadratic See Abate et al 2013/14 for details. Requires WRLOF_MASS_TRANSFER. : (null)\n",
+      "minimum_timestep : The minimum timestep (Myr). : (null)\n",
+      "timestep_solver_factor : Factor applied in timestep_limits, e.g. to prevent X changing too fast by comparing to X/dX/dt, which is usually 1 but can be higher to lengthen timesteps when using an alternative solver. : (null)\n",
+      "RLOF_mdot_factor : Multiplier applied to the mass transfer rate during Roche-lobe overflow. Requires RLOF_MDOT_MODULATION. : (null)\n",
+      "RLOF_f : Factor to enlarge a Roche lobe, nominally because of radiation pressure (see Dermine et al paper). Requires RLOF_RADIATION_CORRECTION. : (null)\n",
+      "minimum_separation_for_instant_RLOF : If True, instead of evolving the system just report the minimum separation (on the zero-age main sequence) that would lead to instant RLOF. Used by binary_grid. See also minimum_orbital_period_for_instant_RLOF and maximum_mass_ratio_for_instant_RLOF. : (null)\n",
+      "minimum_orbital_period_for_instant_RLOF : If True, instead of evolving the system just report the minimum orbital period (on the zero-age main sequence) that would lead to instant RLOF. Used by binary_grid. See also minimum_separation_for_instant_RLOF and maximum_mass_ratio_for_instant_RLOF. : (null)\n",
+      "maximum_mass_ratio_for_instant_RLOF : If True, instead of evolving the system just report the maximum mass ratio (on the zero-age main sequence) that would lead to instant RLOF, given M1 and orbital period. Used by binary_grid. See also minimum_separation_for_instant_RLOF and minimum_orbital_period_for_instant_RLOF. : (null)\n",
+      "RLOF_method : Use RLOF_method to choose the algorithm you use for Roche-lobe overflow mass loss rate calculations. 0=Hurley et al 2002, 1=Adaptive (for radiative stars) R=RL method, 2=Ritter (probably broken), 3=Claeys etal 2014 variant on Hurley et al 2002. : (null)\n",
+      "RLOF_interpolation_method : When a star overflows its Roche lobe, it always has R>RL because of the limited time resolution of the simulation. Binary_c then uses an algorithm to get back to when R~RL (within a desired tolerance, set in RLOF_ENTRY_THRESHOLD which is usually 1.02, i.e. overflow of 2%). You can choose algorithm 0, the Hurley et al 2002 method which reverses time (i.e. uses a Newton-like scheme), or 1 to use the binary_c method which rejects a timestep (and hence does no logging on that timestep) and repeats with half the timestep until R~RL. The latter is now the default, because this means there are no negative timesteps which break various other algorithms (e.g. nucleosynthesis). : (null)\n",
+      "nova_retention_fraction : The mass accreted during a nova as fraction of mass transferred : (null)\n",
+      "beta_reverse_nova : The fraction of mass ejected in a nova explosion which is accreted back onto the companion star. Set to -1 to automatically calculate based on a geometric argument, or 0 or positive to set the value. : (null)\n",
+      "WD_accretion_rate_novae_upper_limit_hydrogen_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is hydrogen rich : above this rate the mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_novae_upper_limit_helium_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is helium rich : above this rate the mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_novae_upper_limit_other_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is neither hydrogen nor helium rich : above this rate the mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_new_giant_envelope_lower_limit_hydrogen_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope with a hydrogen-rich donor. Below this mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_new_giant_envelope_lower_limit_helium_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope with a helium-rich donor. Below this mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_new_giant_envelope_lower_limit_other_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope when the donor is neither hydrogen nor helium rich. Below this mass transfer leads to stable burning. : (null)\n",
+      "CRAP_parameter : Tidally enhanced mass loss parameter. See Tout and Eggleton's paper on the subject. (Was the parameter bb). : (null)\n",
+      "individual_novae : If individual_novae is True, novae are resolved such that each explosion is performed separtaely. : (null)\n",
+      "nova_timestep_accelerator_num : The nova timestep is accelerated if the nova number exceeds nova_timestep_accelerator_num. If zero or negative, acceleration is off. See also nova_timestep_accelerator_index and nova_timestep_accelerator_max. Only used if individual_novae is on.\n",
+      " : (null)\n",
+      "nova_timestep_accelerator_index : The index at which the nova timestep is accelerated. A larger value gives longer timesteps. See also nova_timestep_accelerator_num and nova_timestep_accelerator_max. Only used if individual_novae is on.\n",
+      " : (null)\n",
+      "nova_timestep_accelerator_max : The nova timestep is accelerated by a factor that is capped at nova_timestep_accelerator_max. This parameter is ignored if it is zero or negative. See also nova_timestep_accelerator_num and nova_timestep_accelerator_index. Only used if individual_novae is on.\n",
+      " : (null)\n",
+      "nonconservative_angmom_gamma : Mass lost from the system (but NOT from a stellar wind) takes a fraction gamma of the orbital angular momentum with it. Set to -1 to take the specific angular momentum of the donor star. Set to -2 to take super-Eddington, nova and disk-wind angular momenta as if a wind from the accretor. : (null)\n",
+      "max_stellar_angmom_change : Maxmimum fractional change in stellar angular momentum allowed before a timestep is rejected (0.05). : (null)\n",
+      "comenv_ms_accretion_mass : Experimental. During common envelope evolution, a main sequence star may accrete some of the envelope's mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_fraction. : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Nucsyn\n",
+      "############################################################\n",
+      "third_dup : If True, enables third dredge up. Requires NUCSYN and NUCSYN_THIRD_DREDGE_UP. : (null)\n",
+      "third_dup_multiplier : Usage: --third_dup_multiplier <i> <f>. Multiplies the abundance of element <i> by <f> during third dredge up. : 1.0\n",
+      "NeNaMgAl : Enables NeNaMgAl reaction network. Requires NUCSYN and NUCSYN_HBB. : Ignore\n",
+      "nucsyn_network%d : Usage: --nucsyn_network%d <boolean>. Turn a nuclear network on or off. : (null)\n",
+      "nucsyn_network_error%d : Usage: --nucsyn_network_error%d <f>. Threshold error in nuclear network solver for network %d. : (null)\n",
+      "nucreacmult%d : Usage: --nucreacmult%d <f>. Multiply nuclear reaction given by the integer %d (integer) by f (float).  : (null)\n",
+      "nucsyn_metallicity : This sets the metallicity of the nucleosynthesis algorithms, i.e. the amount (by mass) of matter which is not hydrogen or helium. Usually you'd just set this with the metallicity parameter, but if you want the nucleosynthesis to be outside the range of the stellar evolution algorithm (e.g. Z=0 or Z=0.04) then you need to use nucsyn_metallicity. That said, it's also outside the range of some of the nucleosynthesis algorithms as well, so you have been warned! : (null)\n",
+      "nucsyn_solver : Choose the solver used in nuclear burning. 0 = KAPS_RENTROP is a Kaps-Rentrop scheme (fast, not great for stiff problems), 1 = LSODA (Adams/BSF switcher), 2 = CVODE library (https://computing.llnl.gov/projects/sundials. Default 0.  : 0\n",
+      "initial_abundance_mix : initial abundance mixture: 0=AG89, 1=Karakas 2002, 2=Lodders 2003, 3=Asplund 2005 (not available?), 4=Garcia Berro, 5=Grevesse Noels 1993 : 0\n",
+      "init_abund : Usage: --init_abund <i> <X>. Sets the initial abundance of isotope number <i> to mass fraction <X>. : 0.02\n",
+      "init_abund_mult : Usage: --init_abund_mult <i> <f>. Multiplies the initial abundance of isotope number <i> by <f>. : 1.0\n",
+      "init_abund_dex : Usage: --init_abund_dex <i> <f>. Changes the initial abundance of isotope number <i> by <f> dex. : 0.0\n",
+      "init_abunds_only : If True, outputs only the initial abundances, then exits. : (null)\n",
+      "initial_abunds_only : If True, outputs only the initial abundances, then exits. : (null)\n",
+      "no_thermohaline_mixing : If True, disables thermohaline mixing. : (null)\n",
+      "lithium_GB_post_Heflash : Sets the lithium abundances after the helium flash. Requires NUCSYN and LITHIUM_TABLES. : (null)\n",
+      "lithium_GB_post_1DUP : Sets the lithium abundance after first dredge up. Requires NUCSYN and LITHIUM_TABLES. : (null)\n",
+      "lithium_hbb_multiplier : Multiplies the lithium abundances on the AGB during HBB (based on Karakas/Fishlock et al models).Requires NUCSYN and LITHIUM_TABLES. : (null)\n",
+      "angelou_lithium_decay_function : Functional form which describes Li7 decay. Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Choices are : 0 expoential (see angelou_lithium_decay_time). : (null)\n",
+      "angelou_lithium_LMMS_time : Time at which lithium manufacture is triggered in a low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_MS_time : Time at which lithium manufacture is triggered on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_HG_time : Time at which lithium manufacture is triggered on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_GB_time : Time at which lithium manufacture is triggered on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_CHeB_time : Time at which lithium manufacture is triggered during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_EAGB_time : Time at which lithium manufacture is triggered on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_TPAGB_time : Time at which lithium manufacture is triggered on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_LMMS_decay_time : Decay time for surface lithium abundance during the low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_MS_decay_time : Decay time for surface lithium abundance on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_HG_decay_time : Decay time for surface lithium abundance on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_GB_decay_time : Decay time for surface lithium abundance on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_CHeB_decay_time : Decay time for surface lithium abundance during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_EAGB_decay_time : Decay time for surface lithium abundance on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_TPAGB_decay_time : Decay time for surface lithium abundance on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_LMMS_massfrac : Lithium mass fraction when its manufacture is triggered during the low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_MS_massfrac : Lithium mass fraction when its manufacture is triggered on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_HG_massfrac : Lithium mass fraction when its manufacture is triggered on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_GB_massfrac : Lithium mass fraction when its manufacture is triggered on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_CHeB_massfrac : Lithium mass fraction when its manufacture is triggered during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_EAGB_massfrac : Lithium mass fraction when its manufacture is triggered on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_TPAGB_massfrac : Lithium mass fraction when its manufacture is triggered on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_vrot_trigger : Equatorial rotational velocity at which lithium manufacture is triggered (km/s). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0.\n",
+      " : (null)\n",
+      "angelou_lithium_vrotfrac_trigger : Fraction of Keplerian (breakup) equatorial rotational velocity at which lithium manufacture is triggered (must be <1, ignored if 0). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0.\n",
+      " : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Output\n",
+      "############################################################\n",
+      "david_logging_function : Function to choose which kind of information gets logged Requires DAVID. Choices are: 0= None, >0 for custom logging functions : Ignore\n",
+      "cf_amanda_log : Enable logging to compare to Amanda's models. : (null)\n",
+      "float_overflow_checks : Turn on to enable floating-point overflow checks at the end of each timestep, if they are available. 0=off, 1=warn (stderr) on failure, 2=exit on failure (0) : (null)\n",
+      "save_pre_events_stardata : Enable this to save a copy of stardata to stardata->pre_events_stardata just before an event. : (null)\n",
+      "disable_end_logging : Disable the logging that happens at the end of the evolution. : (null)\n",
+      "ensemble : Turn on ensemble calculations and output. : (null)\n",
+      "ensemble_filters_off : Sets all ensemble filters to be off (FALSE) - these can then be enabled one-by-one with --ensemble_filter_[...] TRUE. : (null)\n",
+      "ensemble_filter_%d : Turn on or off ensemble filter <n>. For a list of filters, see ensemble_macros.h. : (null)\n",
+      "ensemble_legacy_ensemble : Turn on ensemble legacy population output. : (null)\n",
+      "legacy_yields : Turn on ensemble legacy yield output. : (null)\n",
+      "ensemble_defer : Defer ensemble output. : (null)\n",
+      "ensemble_dt : When doing ensemble calculations, data are stored and/or output every ensemble_dt Myr. See also ensemble, ensemble_logdt, ensemble_startlogtime. : (null)\n",
+      "ensemble_logdt : When doing ensemble calculations, and when logensembletimes is set, the ensemble is stored/output every ensemble_logdt Myr. See also ensemble, ensemble_dt, ensemble_startlogtime. : (null)\n",
+      "ensemble_startlogtime : Start log ensemble data storage/calculations/output at ensemble_startlogtime. See also ensemble, ensemble_dt, ensemble_startlogtime. : (null)\n",
+      "ensemble_logtimes : When doing ensemble calculations/output, set this to act at log times rather than linear times. : (null)\n",
+      "postagb_legacy_logging : Turn on post-AGB legacy logging. : (null)\n",
+      "disc_legacy_logging : Turn on disc legacy logging. : (null)\n",
+      "EMP_logg_maximum : Maximum logg that EMP stars are allowed to have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_minimum_age. : (null)\n",
+      "EMP_minimum_age : Minimum age that EMP stars are required to have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_logg_maximum. : (null)\n",
+      "EMP_feh_maximum : Maximum [Fe/H] that an EMP stars may have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default -2.0. : (null)\n",
+      "CEMP_cfe_minimum : Minimum [C/Fe] that CEMP stars are required to have. See Izzard et al 2009. See also NEMP_cfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default 0.7. : (null)\n",
+      "NEMP_cfe_minimum : Minimum [N/Fe] that NEMP stars are required to have. See Izzard et al 2009, Pols et al. 2012. See also CEMP_cfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default 1.0. : (null)\n",
+      "thick_disc_start_age : Lookback time for the start of the thick disc star formation, e.g. 13e3 Myr. Units = Myr. : (null)\n",
+      "thick_disc_end_age : Lookback time for the end of the thick disc star formation, e.g. 4e3 Myr. Units = Myr. : (null)\n",
+      "thick_disc_logg_min : Minimum logg for thick disc giants to be logged. : (null)\n",
+      "thick_disc_logg_max : Maximum logg for thick disc giants to be logged. : (null)\n",
+      "escape_velocity : A parameter used in constructing galactic chemical evolution (GCE) models. If the stellar wind velocity exceeds this value, any chemical yield from the wind is ignored, i.e. assumed lost. (km/s) Requires NUCSYN_GCE_OUTFLOW_CHECKS. Default 1e9 km/s. See also escape_fraction. : (null)\n",
+      "escape_fraction : A parameter used in constructing galactic chemical evolution (GCE) models. If the stellar wind velocity exceeds this value, any chemical yield from the wind is ignored, i.e. assumed lost. (km/s) Requires NUCSYN_GCE_OUTFLOW_CHECKS. Default 0.0. See also escape_velocity. : (null)\n",
+      "colour_log : If set to True, thelog is coloured with ANSI colour formatting. Requires FILE_LOG to be defined. : \n",
+      "log_filename : Location of the output logging filename. If set to \"/dev/null\" then there is no logging. : \n",
+      "stopfile : File which, when it exists, will stop the current binary_c repeat run. : \n",
+      "stardata_dump_filename : Location of the stardata dump file. : \n",
+      "stardata_load_filename : Location of the stardata file to load. : \n",
+      "api_log_filename_prefix : Location of the output logging filename prefix for the API. If set to \"/dev/null\" then there is no logging. : 0\n",
+      "hrdiag_output : Set to True to output high time-resolution Hertzstrpung-Russell diagram information. Requires HRDIAG. : (null)\n",
+      "internal_buffering : Experimental. Set to non-zero values to implement internal buffering prior to output. For use with binary_grid, you shouldn't really be playing with this. : (null)\n",
+      "eccentric_RLOF_model : Chooses which model is used to handle eccentric RLOF. Default is RLOF_ECCENTRIC_AS_CIRCULAR, i.e. ignore the eccentricity. Note: requires force_corotation_of_primary_and_orbit to be FALSE.\n",
+      " : (null)\n",
+      "force_circularization_on_RLOF : If True forces circularization of stars and orbit when RLOF starts, this is as in the BSE algorithm. (True) : (null)\n",
+      "wtts_log : If True, enables log file output for WTTS2. : (null)\n",
+      "fabian_imf_log_time : Time at which to output for Fabian Schneider's IMF project. Requires FABIAN_IMF_LOG : Ignore\n",
+      "fabian_imf_log_timestep : Timestep for Fabian Schneider's IMF project logging. Requires FABIAN_IMF_LOG : Ignore\n",
+      "version : Display binary_c version and build information. Also performs timing tests. : Ignore\n",
+      "dumpversion : Display binary_c version number (short format). : Ignore\n",
+      "version_only : Display binary_c version number and build information, but do not perform timing tests or anything that requires stardata to be non-NULL. : Ignore\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Input\n",
+      "############################################################\n",
+      "MINT_dir : Location of MINT algorithm data. : \n",
+      "MINT_data_cleanup : Activate checks on incoming data to try to account for problems. Will make data-loading slower, but may fix a few things. : \n",
+      "MINT_MS_rejuvenation : Turn on or off (hydrogen) main-sequence rejuvenation. : \n",
+      "MINT_remesh : Turn on or off MINT's remeshing. : \n",
+      "MINT_use_ZAMS_profiles : Use chemical profiles at the ZAMS if MINT_use_ZAMS_profiles is TRUE, otherwise set homogeneous abundances. (Default is TRUE, so we use the profiles if they are available.) : \n",
+      "MINT_disable_grid_load_warnings : Use this to explicitly disable MINT's warnings when loading a grid with, e.g., missing or too much data. : \n",
+      "MINT_Kippenhahn : Turn on or off MINT's Kippenhahn diagrams. If 0, off, if 1, output star 1 (index 0), if 2 output star 2 (index 1). Default 0. : \n",
+      "MINT_Kippenhahn_stellar_type : Stellar type selector for Kippenhahn plots. Set to -1 to ignore, otherwise the stellar type number for which Kippenhahn plot data should be output. : \n",
+      "MINT_Kippenhahn_companion_stellar_type : Companion stellar type selector for Kippenhahn plots. Set to -1 to ignore, otherwise the stellar type number for the companion for which Kippenhahn plot data should be output. : \n",
+      "MINT_nuclear_burning : Turn on or off MINT's nuclear burning algorithm. : \n",
+      "MINT_minimum_shell_mass : Minimum shell mass in MINT's nuclear burning routines. : \n",
+      "MINT_maximum_shell_mass : Maximum shell mass in MINT's nuclear burning routines. : \n",
+      "\n",
+      "############################################################\n",
+      "##### Section I/O\n",
+      "############################################################\n",
+      "go : batchmode control command : Ignore\n",
+      "gogo : batchmode control command : Ignore\n",
+      "reset_stars : Reset the star structures. Used in batchmode : Ignore\n",
+      "reset_stars_defaults : Reset the star structures and set defaults. Used in batchmode : Ignore\n",
+      "defaults : Reset all defaults. Used in batchmode : Ignore\n",
+      "echo : Activate batchmode command echoing, i.e. when you enter a command, binary_c repeats the command then executes it. : Ignore\n",
+      "noecho : Deactivate batchmode command echoing. See 'echo'. : Ignore\n",
+      "noechonow : Deactivate batchmode command echoing. See 'echo'. : Ignore\n",
+      "bye : Quit binary_c. Used in batchmode. : Ignore\n",
+      "fin : batchmode control command : Ignore\n",
+      "reset_prefs : Reset preferences struct. Used in batchmode : Ignore\n",
+      "status : Output batchmode status information. : Ignore\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Algorithms\n",
+      "############################################################\n",
+      "repeat : If > 1, repeats the system as many times as required. Handy if you're using Monte-Carlo kicks and want to sample the parameter space well. Also, if you are running speed tests this is good to give a statistically more reasonable result. (See e.g. 'tbse pgo'). : (null)\n",
+      "random_systems : Experimental. Use this to apply random initial system parameters (masses, separations, etc.). Useful for testing only. : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Misc\n",
+      "############################################################\n",
+      "random_seed : Random number seed, usually a (possibly negative) integer. Useful for exactly reproducing the evolution of a system which involves a kick (which is a Monte-Carlo, i.e. pseudorandom, process). : (null)\n",
+      "random_systems_seed : Random number seed for the generation of random systems. See random_systems and random_seed. : (null)\n",
+      "random_skip : Skip the first <random_seed> random numbers that are generated. Usually this is 0 so they are all used. : (null)\n",
+      "idum : [NB: deprecated, please use 'random_seed' instead.] Random number seed, usually a (possibly negative) integer. Useful for exactly reproducing the evolution of a system which involves a kick (which is a Monte-Carlo, i.e. pseudorandom, process). : (null)\n",
+      "reverse_time : Make time go backwards. To be considered very experimental! : (null)\n",
+      "start_time : Start time for the simulation. : (null)\n",
+      "warmup_cpu : Uses the CPU at maximum power the given number of seconds, prior to running normal stellar evolution. : Ignore\n",
+      "help : Display help pages. Usage: --help <help topic>. : Ignore\n",
+      "argopts : Display argument options. Usage: --argopts <argument>. : Ignore\n",
+      "help_all : Display all help pages. : Ignore\n",
+      "list_args : Display list of arguments with their default values. Useful for batchmode. : Ignore\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(_binary_c_bindings.return_help_all())"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "bfec32cf-7240-4a82-ac30-b3d99a018a28",
+   "metadata": {},
+   "source": [
+    "We can get all the parameter names and their default values with return_arglines(): (abridged output)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 20,
+   "id": "3d29ca9d-ac66-4f9e-81cf-2edd14a98b79",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "__ARG_BEGIN\n",
+      "metallicity = 0.02\n",
+      "effective_metallicity = -1\n",
+      "M_1 = 0\n"
+     ]
+    }
+   ],
+   "source": [
+    "print('\\n'.join(_binary_c_bindings.return_arglines().splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "e8b1c8b6-a878-43f4-bc36-1b20b3e66c6f",
+   "metadata": {},
+   "source": [
+    "Lastly, we can ask binary_c to determine the minimum period or maximum mass for RLOF at the ZAMS: Both of them need an argstring as input"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "e517f561-09c6-419d-ba89-d9cb61e6ebab",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MINIMUM SEPARATION 0.31\n",
+      "MINIMUM PERIOD 0.00632092\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=10,\n",
+    "    orbital_period=4500,\n",
+    "    eccentricity=0.0,\n",
+    "    metallicity=0.02,\n",
+    "    max_evolution_time=15000,\n",
+    ").strip()\n",
+    "\n",
+    "#\n",
+    "output = _binary_c_bindings.return_minimum_orbit_for_RLOF(argstring, store_capsule=store_memaddr)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 46,
+   "id": "7da75a95-8831-4346-a584-e042ced75249",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MAXIMUM MASS RATIO 0.0141\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=5,\n",
+    "    M_2=1,\n",
+    "    orbital_period=0.0001,\n",
+    "    eccentricity=0.0,\n",
+    "    metallicity=0.02,\n",
+    "    max_evolution_time=15000,\n",
+    ").strip()\n",
+    "\n",
+    "#\n",
+    "output = _binary_c_bindings.return_maximum_mass_ratio_for_RLOF(argstring)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "id": "5fe52d8e-1721-4796-a856-002cf4525d96",
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/build/html/notebook_custom_logging.html b/docs/build/html/notebook_custom_logging.html
new file mode 100644
index 0000000000000000000000000000000000000000..7639278a2d9b6be98a1c6cf744bb210fc29eb2e1
--- /dev/null
+++ b/docs/build/html/notebook_custom_logging.html
@@ -0,0 +1,933 @@
+
+
+<!DOCTYPE html>
+<html class="writer-html5" lang="en" >
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Notebook custom logging &mdash; binary_c-python  documentation</title>
+  
+
+  
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+
+  
+  
+  
+  
+
+  
+  <!--[if lt IE 9]>
+    <script src="_static/js/html5shiv.min.js"></script>
+  <![endif]-->
+  
+    
+      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
+        <script src="_static/jquery.js"></script>
+        <script src="_static/underscore.js"></script>
+        <script src="_static/doctools.js"></script>
+        <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
+    
+    <script type="text/javascript" src="_static/js/theme.js"></script>
+
+    
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Running populations with binarycpython" href="notebook_population.html" />
+    <link rel="prev" title="Running individual systems with binarycpython" href="notebook_individual_systems.html" /> 
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search" >
+          
+
+          
+            <a href="index.html" class="icon icon-home" alt="Documentation Home"> binary_c-python
+          
+
+          
+          </a>
+
+          
+            
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="readme_link.html">Python module for binary_c</a></li>
+<li class="toctree-l1"><a class="reference internal" href="modules.html">Binarycpython code</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="example_notebooks.html">Example notebooks</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="notebook_individual_systems.html">Running individual systems with binarycpython</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Notebook custom logging</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="#Usage">Usage</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="#Using-custom-logging-with-the-population-object">Using custom logging with the population object</a></li>
+<li class="toctree-l4"><a class="reference internal" href="#Using-custom-logging-when-running-directly-from-the-API">Using custom logging when running directly from the API</a></li>
+</ul>
+</li>
+<li class="toctree-l3"><a class="reference internal" href="#Examples-of-logging-strings">Examples of logging strings</a><ul>
+<li class="toctree-l4"><a class="reference internal" href="#Compact-object">Compact object</a></li>
+<li class="toctree-l4"><a class="reference internal" href="#Logging-mass-evolution-and-the-supernova">Logging mass evolution and the supernova</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_population.html">Running populations with binarycpython</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_extra_features.html">Extra features and functionality of binarycpython</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_api_functionality.html">Using the API functionality of binarycpython</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
+<li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
+<li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
+<li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/issues/new">Submit an issue</a></li>
+</ul>
+
+            
+          
+        </div>
+        
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="index.html">binary_c-python</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
+        
+          <li><a href="example_notebooks.html">Example notebooks</a> &raquo;</li>
+        
+      <li>Notebook custom logging</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="_sources/notebook_custom_logging.ipynb.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  
+<style>
+/* CSS for nbsphinx extension */
+
+/* remove conflicting styling from Sphinx themes */
+div.nbinput.container div.prompt *,
+div.nboutput.container div.prompt *,
+div.nbinput.container div.input_area pre,
+div.nboutput.container div.output_area pre,
+div.nbinput.container div.input_area .highlight,
+div.nboutput.container div.output_area .highlight {
+    border: none;
+    padding: 0;
+    margin: 0;
+    box-shadow: none;
+}
+
+div.nbinput.container > div[class*=highlight],
+div.nboutput.container > div[class*=highlight] {
+    margin: 0;
+}
+
+div.nbinput.container div.prompt *,
+div.nboutput.container div.prompt * {
+    background: none;
+}
+
+div.nboutput.container div.output_area .highlight,
+div.nboutput.container div.output_area pre {
+    background: unset;
+}
+
+div.nboutput.container div.output_area div.highlight {
+    color: unset;  /* override Pygments text color */
+}
+
+/* avoid gaps between output lines */
+div.nboutput.container div[class*=highlight] pre {
+    line-height: normal;
+}
+
+/* input/output containers */
+div.nbinput.container,
+div.nboutput.container {
+    display: -webkit-flex;
+    display: flex;
+    align-items: flex-start;
+    margin: 0;
+    width: 100%;
+}
+@media (max-width: 540px) {
+    div.nbinput.container,
+    div.nboutput.container {
+        flex-direction: column;
+    }
+}
+
+/* input container */
+div.nbinput.container {
+    padding-top: 5px;
+}
+
+/* last container */
+div.nblast.container {
+    padding-bottom: 5px;
+}
+
+/* input prompt */
+div.nbinput.container div.prompt pre {
+    color: #307FC1;
+}
+
+/* output prompt */
+div.nboutput.container div.prompt pre {
+    color: #BF5B3D;
+}
+
+/* all prompts */
+div.nbinput.container div.prompt,
+div.nboutput.container div.prompt {
+    width: 4.5ex;
+    padding-top: 5px;
+    position: relative;
+    user-select: none;
+}
+
+div.nbinput.container div.prompt > div,
+div.nboutput.container div.prompt > div {
+    position: absolute;
+    right: 0;
+    margin-right: 0.3ex;
+}
+
+@media (max-width: 540px) {
+    div.nbinput.container div.prompt,
+    div.nboutput.container div.prompt {
+        width: unset;
+        text-align: left;
+        padding: 0.4em;
+    }
+    div.nboutput.container div.prompt.empty {
+        padding: 0;
+    }
+
+    div.nbinput.container div.prompt > div,
+    div.nboutput.container div.prompt > div {
+        position: unset;
+    }
+}
+
+/* disable scrollbars on prompts */
+div.nbinput.container div.prompt pre,
+div.nboutput.container div.prompt pre {
+    overflow: hidden;
+}
+
+/* input/output area */
+div.nbinput.container div.input_area,
+div.nboutput.container div.output_area {
+    -webkit-flex: 1;
+    flex: 1;
+    overflow: auto;
+}
+@media (max-width: 540px) {
+    div.nbinput.container div.input_area,
+    div.nboutput.container div.output_area {
+        width: 100%;
+    }
+}
+
+/* input area */
+div.nbinput.container div.input_area {
+    border: 1px solid #e0e0e0;
+    border-radius: 2px;
+    /*background: #f5f5f5;*/
+}
+
+/* override MathJax center alignment in output cells */
+div.nboutput.container div[class*=MathJax] {
+    text-align: left !important;
+}
+
+/* override sphinx.ext.imgmath center alignment in output cells */
+div.nboutput.container div.math p {
+    text-align: left;
+}
+
+/* standard error */
+div.nboutput.container div.output_area.stderr {
+    background: #fdd;
+}
+
+/* ANSI colors */
+.ansi-black-fg { color: #3E424D; }
+.ansi-black-bg { background-color: #3E424D; }
+.ansi-black-intense-fg { color: #282C36; }
+.ansi-black-intense-bg { background-color: #282C36; }
+.ansi-red-fg { color: #E75C58; }
+.ansi-red-bg { background-color: #E75C58; }
+.ansi-red-intense-fg { color: #B22B31; }
+.ansi-red-intense-bg { background-color: #B22B31; }
+.ansi-green-fg { color: #00A250; }
+.ansi-green-bg { background-color: #00A250; }
+.ansi-green-intense-fg { color: #007427; }
+.ansi-green-intense-bg { background-color: #007427; }
+.ansi-yellow-fg { color: #DDB62B; }
+.ansi-yellow-bg { background-color: #DDB62B; }
+.ansi-yellow-intense-fg { color: #B27D12; }
+.ansi-yellow-intense-bg { background-color: #B27D12; }
+.ansi-blue-fg { color: #208FFB; }
+.ansi-blue-bg { background-color: #208FFB; }
+.ansi-blue-intense-fg { color: #0065CA; }
+.ansi-blue-intense-bg { background-color: #0065CA; }
+.ansi-magenta-fg { color: #D160C4; }
+.ansi-magenta-bg { background-color: #D160C4; }
+.ansi-magenta-intense-fg { color: #A03196; }
+.ansi-magenta-intense-bg { background-color: #A03196; }
+.ansi-cyan-fg { color: #60C6C8; }
+.ansi-cyan-bg { background-color: #60C6C8; }
+.ansi-cyan-intense-fg { color: #258F8F; }
+.ansi-cyan-intense-bg { background-color: #258F8F; }
+.ansi-white-fg { color: #C5C1B4; }
+.ansi-white-bg { background-color: #C5C1B4; }
+.ansi-white-intense-fg { color: #A1A6B2; }
+.ansi-white-intense-bg { background-color: #A1A6B2; }
+
+.ansi-default-inverse-fg { color: #FFFFFF; }
+.ansi-default-inverse-bg { background-color: #000000; }
+
+.ansi-bold { font-weight: bold; }
+.ansi-underline { text-decoration: underline; }
+
+
+div.nbinput.container div.input_area div[class*=highlight] > pre,
+div.nboutput.container div.output_area div[class*=highlight] > pre,
+div.nboutput.container div.output_area div[class*=highlight].math,
+div.nboutput.container div.output_area.rendered_html,
+div.nboutput.container div.output_area > div.output_javascript,
+div.nboutput.container div.output_area:not(.rendered_html) > img{
+    padding: 5px;
+    margin: 0;
+}
+
+/* fix copybtn overflow problem in chromium (needed for 'sphinx_copybutton') */
+div.nbinput.container div.input_area > div[class^='highlight'],
+div.nboutput.container div.output_area > div[class^='highlight']{
+    overflow-y: hidden;
+}
+
+/* hide copybtn icon on prompts (needed for 'sphinx_copybutton') */
+.prompt a.copybtn {
+    display: none;
+}
+
+/* Some additional styling taken form the Jupyter notebook CSS */
+div.rendered_html table {
+  border: none;
+  border-collapse: collapse;
+  border-spacing: 0;
+  color: black;
+  font-size: 12px;
+  table-layout: fixed;
+}
+div.rendered_html thead {
+  border-bottom: 1px solid black;
+  vertical-align: bottom;
+}
+div.rendered_html tr,
+div.rendered_html th,
+div.rendered_html td {
+  text-align: right;
+  vertical-align: middle;
+  padding: 0.5em 0.5em;
+  line-height: normal;
+  white-space: normal;
+  max-width: none;
+  border: none;
+}
+div.rendered_html th {
+  font-weight: bold;
+}
+div.rendered_html tbody tr:nth-child(odd) {
+  background: #f5f5f5;
+}
+div.rendered_html tbody tr:hover {
+  background: rgba(66, 165, 245, 0.2);
+}
+
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="Notebook-custom-logging">
+<h1>Notebook custom logging<a class="headerlink" href="#Notebook-custom-logging" title="Permalink to this headline">¶</a></h1>
+<p>In this notebook you’ll learn how to use the custom logging functionality</p>
+<div class="nbinput nblast docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[37]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="kn">from</span> <span class="nn">binarycpython</span> <span class="kn">import</span> <span class="n">_binary_c_bindings</span>
+<span class="kn">from</span> <span class="nn">binarycpython.utils.custom_logging_functions</span> <span class="kn">import</span> <span class="p">(</span>
+    <span class="n">autogen_C_logging_code</span><span class="p">,</span>
+    <span class="n">binary_c_log_code</span><span class="p">,</span>
+    <span class="n">create_and_load_logging_function</span><span class="p">,</span>
+<span class="p">)</span>
+<span class="kn">from</span> <span class="nn">binarycpython.utils.run_system_wrapper</span> <span class="kn">import</span> <span class="n">run_system</span>
+<span class="kn">from</span> <span class="nn">binarycpython.utils.grid</span> <span class="kn">import</span> <span class="n">Population</span>
+</pre></div>
+</div>
+</div>
+<p>The custom logging functionality allows us to decide the output of binary_c <em>without</em> modifying the actual sourcecode of binary_c (i.e. editing <code class="docutils literal notranslate"><span class="pre">src/logging/log_every_timestep</span></code> in binary_c). Rather, we can create a logging routine from within python.</p>
+<p>Technically, the following steps are taken: - User creates a logging print statement from within python - The logging print statement string gets wrapped into a proper c-function by <code class="docutils literal notranslate"><span class="pre">binary_c_log_code</span></code> - The c-function string gets compiled and loaded into memory by <code class="docutils literal notranslate"><span class="pre">create_and_load_logging_function</span></code> - The memory adress of the compiled and loaded print function can now be passed to C - binary_c uses the custom print function</p>
+<p>The custom logging functionality can be used when running systems via <code class="docutils literal notranslate"><span class="pre">run_system()</span></code>, via <code class="docutils literal notranslate"><span class="pre">Population.evolve()</span></code> and <code class="docutils literal notranslate"><span class="pre">Population.evolve_single()</span></code>, and directly via the API</p>
+<p>Within the logging statement we can access information from the stardata object, as well as use logical statements to determine when to log information. What we cannot do, however, is access functions that are not <em>publicly available</em>. For very elaborate printing routines it is still advised to actually hardcode the print statement into binary_c itself.</p>
+<div class="section" id="Usage">
+<h2>Usage<a class="headerlink" href="#Usage" title="Permalink to this headline">¶</a></h2>
+<p>There are two methods to create the C-code that will be compiled: - Automatically generate the print statement and use the wrapper to generate the full function string, by using <code class="docutils literal notranslate"><span class="pre">autogen_C_logging_code</span></code> - Create your custom print statement and use the wrapper to generate the full function string, by writing out the print statement. Here the logging statement obviously has to be valid C code</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[7]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="c1"># generate logging lines. Here you can choose whatever you want to have logged, and with what header</span>
+<span class="c1"># this generates working print statements</span>
+<span class="n">logging_line</span> <span class="o">=</span> <span class="n">autogen_C_logging_code</span><span class="p">(</span>
+    <span class="p">{</span>
+        <span class="s2">&quot;MY_STELLAR_DATA&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;model.time&quot;</span><span class="p">,</span> <span class="s2">&quot;star[0].mass&quot;</span><span class="p">],</span>
+    <span class="p">}</span>
+<span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">logging_line</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+Printf(&#34;MY_STELLAR_DATA %g %g\n&#34;,((double)stardata-&gt;model.time),((double)stardata-&gt;star[0].mass));
+</pre></div></div>
+</div>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[30]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="c1"># You can also decide to `write` your own logging_line, which allows you to write a more complex logging statement with conditionals.</span>
+<span class="n">logging_line</span> <span class="o">=</span> <span class="s1">&#39;Printf(&quot;MY_STELLAR_DATA time=</span><span class="si">%g</span><span class="s1"> mass=</span><span class="si">%g</span><span class="se">\\</span><span class="s1">n&quot;, stardata-&gt;model.time, stardata-&gt;star[0].mass)&#39;</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">logging_line</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+Printf(&#34;MY_STELLAR_DATA time=%g mass=%g\n&#34;, stardata-&gt;model.time, stardata-&gt;star[0].mass)
+</pre></div></div>
+</div>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[31]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="c1"># Generate the entire &#39;script&#39; by wrapping the logging line</span>
+<span class="n">custom_logging_code</span> <span class="o">=</span> <span class="n">binary_c_log_code</span><span class="p">(</span><span class="n">logging_line</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">custom_logging_code</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+#pragma push_macro(&#34;Max&#34;)
+#pragma push_macro(&#34;Min&#34;)
+#undef Max
+#undef Min
+#include &#34;binary_c.h&#34;
+
+// add visibility __attribute__ ((visibility (&#34;default&#34;))) to it
+void binary_c_API_function custom_output_function(struct stardata_t * stardata);
+void binary_c_API_function custom_output_function(struct stardata_t * stardata)
+{
+    // struct stardata_t * stardata = (struct stardata_t *)x;
+    Printf(&#34;MY_STELLAR_DATA time=%g mass=%g\n&#34;, stardata-&gt;model.time, stardata-&gt;star[0].mass);
+}
+
+#undef Max
+#undef Min
+#pragma pop_macro(&#34;Min&#34;)
+#pragma pop_macro(&#34;Max&#34;)
+</pre></div></div>
+</div>
+<p>Combining the above with e.g. run_system() (see notebook_individual_systems for more examples):</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[32]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="c1"># logging statement</span>
+<span class="n">logging_line</span> <span class="o">=</span> <span class="s1">&#39;Printf(&quot;MY_STELLAR_DATA time=</span><span class="si">%g</span><span class="s1"> mass=</span><span class="si">%g</span><span class="se">\\</span><span class="s1">n&quot;, stardata-&gt;model.time, stardata-&gt;star[0].mass)&#39;</span>
+
+<span class="c1"># Entire script</span>
+<span class="n">custom_logging_code</span> <span class="o">=</span> <span class="n">binary_c_log_code</span><span class="p">(</span><span class="n">logging_line</span><span class="p">)</span>
+
+<span class="c1"># Run system</span>
+<span class="n">output</span> <span class="o">=</span> <span class="n">run_system</span><span class="p">(</span><span class="n">M_1</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">custom_logging_code</span><span class="o">=</span><span class="n">custom_logging_code</span><span class="p">)</span>
+
+<span class="c1"># print (abridged) output</span>
+<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">output</span><span class="o">.</span><span class="n">splitlines</span><span class="p">()[:</span><span class="mi">4</span><span class="p">]))</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+MY_STELLAR_DATA time=0 mass=2
+MY_STELLAR_DATA time=0 mass=2
+MY_STELLAR_DATA time=1e-06 mass=2
+MY_STELLAR_DATA time=2e-06 mass=2
+</pre></div></div>
+</div>
+<div class="section" id="Using-custom-logging-with-the-population-object">
+<h3>Using custom logging with the population object<a class="headerlink" href="#Using-custom-logging-with-the-population-object" title="Permalink to this headline">¶</a></h3>
+<p>Custom logging can be used for a whole population by setting the print statement (so not the entire logging script) in <code class="docutils literal notranslate"><span class="pre">C_logging_code</span></code></p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[33]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="c1"># Set up population</span>
+<span class="n">pop</span> <span class="o">=</span> <span class="n">Population</span><span class="p">()</span>
+
+<span class="c1"># Set some BSE parameters</span>
+<span class="n">pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+    <span class="n">M_1</span><span class="o">=</span><span class="mi">5</span>
+<span class="p">)</span>
+
+<span class="c1"># Example logging that prints only if the star is post main-sequence</span>
+<span class="n">example_logging_string_post_MS</span> <span class="o">=</span> <span class="s2">&quot;&quot;&quot;</span>
+<span class="s2">if(stardata-&gt;star[0].stellar_type&gt;MS)</span>
+<span class="s2">{</span>
+<span class="s2">    Printf(&quot;EXAMPLE_ABOVE_MS </span><span class="si">%30.12e</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%d</span><span class="s2"> </span><span class="si">%d</span><span class="se">\\</span><span class="s2">n&quot;,</span>
+<span class="s2">        //</span>
+<span class="s2">        stardata-&gt;model.time, // 1</span>
+
+<span class="s2">        stardata-&gt;star[0].mass, //2</span>
+<span class="s2">        stardata-&gt;previous_stardata-&gt;star[0].mass, //3</span>
+
+<span class="s2">        stardata-&gt;star[0].radius, //4</span>
+<span class="s2">        stardata-&gt;previous_stardata-&gt;star[0].radius, //5</span>
+
+<span class="s2">        stardata-&gt;star[0].stellar_type, //6</span>
+<span class="s2">        stardata-&gt;previous_stardata-&gt;star[0].stellar_type //7</span>
+<span class="s2">  );</span>
+<span class="s2">};</span>
+<span class="s2">&quot;&quot;&quot;</span>
+
+<span class="c1"># Set the logging</span>
+<span class="n">pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+    <span class="n">C_logging_code</span><span class="o">=</span><span class="n">example_logging_string_post_MS</span>
+<span class="p">)</span>
+<span class="n">out</span> <span class="o">=</span> <span class="n">pop</span><span class="o">.</span><span class="n">evolve_single</span><span class="p">()</span>
+
+<span class="c1"># Print (abridged) output</span>
+<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">out</span><span class="o">.</span><span class="n">splitlines</span><span class="p">()[:</span><span class="mi">4</span><span class="p">]))</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+EXAMPLE_ABOVE_MS             1.041660877905e+02 4.99198 4.99198 6.1357 6.1357 2 1
+EXAMPLE_ABOVE_MS             1.041662558619e+02 4.99198 4.99198 6.14057 6.1357 2 2
+EXAMPLE_ABOVE_MS             1.041662560111e+02 4.99198 4.99198 6.14057 6.14057 2 2
+EXAMPLE_ABOVE_MS             1.041662564579e+02 4.99198 4.99198 6.14059 6.14057 2 2
+</pre></div></div>
+</div>
+</div>
+<div class="section" id="Using-custom-logging-when-running-directly-from-the-API">
+<h3>Using custom logging when running directly from the API<a class="headerlink" href="#Using-custom-logging-when-running-directly-from-the-API" title="Permalink to this headline">¶</a></h3>
+<p>When running a system directly with the API we need to manually load the custom logging into memory (via <code class="docutils literal notranslate"><span class="pre">create_and_load_logging_function</span></code>) and pass the memory address to the binary_c binding via <code class="docutils literal notranslate"><span class="pre">_binary_c_bindings.run_system(argstring,</span> <span class="pre">custom_logging_func_memaddr=custom_logging_memaddr)</span></code></p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[40]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="c1"># generate logging lines</span>
+<span class="n">logging_line</span> <span class="o">=</span> <span class="n">autogen_C_logging_code</span><span class="p">(</span>
+    <span class="p">{</span>
+        <span class="s2">&quot;MY_STELLAR_DATA&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;model.time&quot;</span><span class="p">,</span> <span class="s2">&quot;star[0].mass&quot;</span><span class="p">],</span>
+    <span class="p">}</span>
+<span class="p">)</span>
+
+<span class="c1"># Generate code around logging lines</span>
+<span class="n">custom_logging_code</span> <span class="o">=</span> <span class="n">binary_c_log_code</span><span class="p">(</span><span class="n">logging_line</span><span class="p">)</span>
+
+<span class="c1"># Generate library and get memaddr</span>
+<span class="n">custom_logging_memaddr</span><span class="p">,</span> <span class="n">shared_lib_filename</span> <span class="o">=</span> <span class="n">create_and_load_logging_function</span><span class="p">(</span>
+    <span class="n">custom_logging_code</span>
+<span class="p">)</span>
+
+<span class="c1">#</span>
+<span class="n">m1</span> <span class="o">=</span> <span class="mf">15.0</span>  <span class="c1"># Msun</span>
+<span class="n">m2</span> <span class="o">=</span> <span class="mf">14.0</span>  <span class="c1"># Msun</span>
+<span class="n">separation</span> <span class="o">=</span> <span class="mi">0</span>  <span class="c1"># 0 = ignored, use period</span>
+<span class="n">orbital_period</span> <span class="o">=</span> <span class="mf">4530.0</span>  <span class="c1"># days</span>
+<span class="n">eccentricity</span> <span class="o">=</span> <span class="mf">0.0</span>
+<span class="n">metallicity</span> <span class="o">=</span> <span class="mf">0.02</span>
+<span class="n">max_evolution_time</span> <span class="o">=</span> <span class="mi">15000</span>
+<span class="n">argstring</span> <span class="o">=</span> <span class="s2">&quot;binary_c M_1 </span><span class="si">{0:g}</span><span class="s2"> M_2 </span><span class="si">{1:g}</span><span class="s2"> separation </span><span class="si">{2:g}</span><span class="s2"> orbital_period </span><span class="si">{3:g}</span><span class="s2"> eccentricity </span><span class="si">{4:g}</span><span class="s2"> metallicity </span><span class="si">{5:g}</span><span class="s2"> max_evolution_time </span><span class="si">{6:g}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+    <span class="n">m1</span><span class="p">,</span>
+    <span class="n">m2</span><span class="p">,</span>
+    <span class="n">separation</span><span class="p">,</span>
+    <span class="n">orbital_period</span><span class="p">,</span>
+    <span class="n">eccentricity</span><span class="p">,</span>
+    <span class="n">metallicity</span><span class="p">,</span>
+    <span class="n">max_evolution_time</span><span class="p">,</span>
+<span class="p">)</span>
+<span class="n">output</span> <span class="o">=</span> <span class="n">_binary_c_bindings</span><span class="o">.</span><span class="n">run_system</span><span class="p">(</span>
+    <span class="n">argstring</span><span class="p">,</span> <span class="n">custom_logging_func_memaddr</span><span class="o">=</span><span class="n">custom_logging_memaddr</span>
+<span class="p">)</span>
+
+<span class="c1"># print (abridged) output</span>
+<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">output</span><span class="o">.</span><span class="n">splitlines</span><span class="p">()[:</span><span class="mi">4</span><span class="p">]))</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+MY_STELLAR_DATA 0 15
+MY_STELLAR_DATA 0 15
+MY_STELLAR_DATA 1e-06 15
+MY_STELLAR_DATA 2e-06 15
+</pre></div></div>
+</div>
+</div>
+</div>
+<div class="section" id="Examples-of-logging-strings">
+<h2>Examples of logging strings<a class="headerlink" href="#Examples-of-logging-strings" title="Permalink to this headline">¶</a></h2>
+<p>Below are some examples of logging strings</p>
+<div class="section" id="Compact-object">
+<h3>Compact object<a class="headerlink" href="#Compact-object" title="Permalink to this headline">¶</a></h3>
+<p>This logging will print the timestep when the star becomes a compact object. After it does, we change the maximum time to be the current time, effectively terminating the evolution</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[42]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="n">example_logging_string_CO</span> <span class="o">=</span> <span class="s2">&quot;&quot;&quot;</span>
+<span class="s2">if(stardata-&gt;star[0].stellar_type&gt;=NS)</span>
+<span class="s2">{</span>
+<span class="s2">    if (stardata-&gt;model.time &lt; stardata-&gt;model.max_evolution_time)</span>
+<span class="s2">    {</span>
+<span class="s2">        Printf(&quot;EXAMPLE_LOG_CO </span><span class="si">%30.12e</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%d</span><span class="s2"> </span><span class="si">%d</span><span class="se">\\</span><span class="s2">n&quot;,</span>
+<span class="s2">            //</span>
+<span class="s2">            stardata-&gt;model.time, // 1</span>
+
+<span class="s2">            stardata-&gt;star[0].mass, //2</span>
+<span class="s2">            stardata-&gt;previous_stardata-&gt;star[0].mass, //3</span>
+
+<span class="s2">            stardata-&gt;star[0].radius, //4</span>
+<span class="s2">            stardata-&gt;previous_stardata-&gt;star[0].radius, //5</span>
+
+<span class="s2">            stardata-&gt;star[0].stellar_type, //6</span>
+<span class="s2">            stardata-&gt;previous_stardata-&gt;star[0].stellar_type //7</span>
+<span class="s2">      );</span>
+<span class="s2">    };</span>
+<span class="s2">    /* Kill the simulation to save time */</span>
+<span class="s2">    stardata-&gt;model.max_evolution_time = stardata-&gt;model.time - stardata-&gt;model.dtm;</span>
+<span class="s2">};</span>
+<span class="s2">&quot;&quot;&quot;</span>
+
+<span class="c1"># Entire script</span>
+<span class="n">custom_logging_code</span> <span class="o">=</span> <span class="n">binary_c_log_code</span><span class="p">(</span><span class="n">example_logging_string_CO</span><span class="p">)</span>
+
+<span class="c1"># Run system</span>
+<span class="n">output</span> <span class="o">=</span> <span class="n">run_system</span><span class="p">(</span><span class="n">M_1</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">custom_logging_code</span><span class="o">=</span><span class="n">custom_logging_code</span><span class="p">)</span>
+
+<span class="c1"># print (abridged) output</span>
+<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">output</span><span class="o">.</span><span class="n">splitlines</span><span class="p">()[:</span><span class="mi">4</span><span class="p">]))</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+SINGLE_STAR_LIFETIME 10 27.7358
+EXAMPLE_LOG_CO             2.773581245005e+01 1.33524 9.19314 1.72498e-05 730.446 13 5
+</pre></div></div>
+</div>
+</div>
+<div class="section" id="Logging-mass-evolution-and-the-supernova">
+<h3>Logging mass evolution and the supernova<a class="headerlink" href="#Logging-mass-evolution-and-the-supernova" title="Permalink to this headline">¶</a></h3>
+<p>This logging code prints the mass evolution and the moment the star goes supernova</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[47]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="n">example_logging_string_CO</span> <span class="o">=</span> <span class="s2">&quot;&quot;&quot;</span>
+<span class="s2">Printf(&quot;EXAMPLE_MASSLOSS </span><span class="si">%30.12e</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%d</span><span class="s2"> </span><span class="si">%g</span><span class="se">\\</span><span class="s2">n&quot;,</span>
+<span class="s2">    //</span>
+<span class="s2">    stardata-&gt;model.time, // 1</span>
+<span class="s2">    stardata-&gt;star[0].mass, //2</span>
+<span class="s2">    stardata-&gt;previous_stardata-&gt;star[0].mass, //3</span>
+<span class="s2">    stardata-&gt;common.zero_age.mass[0], //4</span>
+
+<span class="s2">    stardata-&gt;star[0].stellar_type, //5</span>
+<span class="s2">    stardata-&gt;model.probability //6</span>
+<span class="s2">);</span>
+<span class="s2">if(stardata-&gt;star[0].SN_type != SN_NONE)</span>
+<span class="s2">{</span>
+<span class="s2">    if (stardata-&gt;model.time &lt; stardata-&gt;model.max_evolution_time)</span>
+<span class="s2">    {</span>
+<span class="s2">        if(stardata-&gt;pre_events_stardata != NULL)</span>
+<span class="s2">        {</span>
+<span class="s2">            Printf(&quot;EXAMPLE_SN </span><span class="si">%30.12e</span><span class="s2"> &quot; // 1</span>
+<span class="s2">                &quot;</span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%d</span><span class="s2"> &quot; // 2-5</span>
+<span class="s2">                &quot;</span><span class="si">%d</span><span class="s2"> </span><span class="si">%d</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> &quot; // 6-9</span>
+<span class="s2">                &quot;</span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="se">\\</span><span class="s2">n&quot;, // 10-13</span>
+
+<span class="s2">                //</span>
+<span class="s2">                stardata-&gt;model.time, // 1</span>
+
+<span class="s2">                stardata-&gt;star[0].mass, //2</span>
+<span class="s2">                stardata-&gt;pre_events_stardata-&gt;star[0].mass, //3</span>
+<span class="s2">                stardata-&gt;common.zero_age.mass[0], //4</span>
+<span class="s2">                stardata-&gt;star[0].SN_type, //5</span>
+
+<span class="s2">                stardata-&gt;star[0].stellar_type, //6</span>
+<span class="s2">                stardata-&gt;pre_events_stardata-&gt;star[0].stellar_type, //7</span>
+<span class="s2">                stardata-&gt;model.probability, //8</span>
+<span class="s2">                stardata-&gt;pre_events_stardata-&gt;star[0].core_mass[ID_core(stardata-&gt;pre_events_stardata-&gt;star[0].stellar_type)],           // 9</span>
+
+<span class="s2">                stardata-&gt;pre_events_stardata-&gt;star[0].core_mass[CORE_CO],     // 10</span>
+<span class="s2">                stardata-&gt;pre_events_stardata-&gt;star[0].core_mass[CORE_He],    // 11</span>
+<span class="s2">                stardata-&gt;star[0].fallback, // 12</span>
+<span class="s2">                stardata-&gt;star[0].fallback_mass // 13</span>
+<span class="s2">            );</span>
+<span class="s2">        }</span>
+<span class="s2">        else</span>
+<span class="s2">        {</span>
+<span class="s2">            Printf(&quot;EXAMPLE_SN </span><span class="si">%30.12e</span><span class="s2"> &quot; // 1</span>
+<span class="s2">                &quot;</span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%d</span><span class="s2"> &quot; // 2-5</span>
+<span class="s2">                &quot;</span><span class="si">%d</span><span class="s2"> </span><span class="si">%d</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> &quot; // 6-9</span>
+<span class="s2">                &quot;</span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="se">\\</span><span class="s2">n&quot;, // 10-13</span>
+
+<span class="s2">                //</span>
+<span class="s2">                stardata-&gt;model.time, // 1</span>
+
+<span class="s2">                stardata-&gt;star[0].mass, //2</span>
+<span class="s2">                stardata-&gt;previous_stardata-&gt;star[0].mass, //3</span>
+<span class="s2">                stardata-&gt;common.zero_age.mass[0], //4</span>
+<span class="s2">                stardata-&gt;star[0].SN_type, //5</span>
+
+<span class="s2">                stardata-&gt;star[0].stellar_type, //6</span>
+<span class="s2">                stardata-&gt;previous_stardata-&gt;star[0].stellar_type, //7</span>
+<span class="s2">                stardata-&gt;model.probability, //8</span>
+<span class="s2">                stardata-&gt;previous_stardata-&gt;star[0].core_mass[ID_core(stardata-&gt;previous_stardata-&gt;star[0].stellar_type)],           // 9</span>
+
+<span class="s2">                stardata-&gt;previous_stardata-&gt;star[0].core_mass[CORE_CO],     // 10</span>
+<span class="s2">                stardata-&gt;previous_stardata-&gt;star[0].core_mass[CORE_He],    // 11</span>
+<span class="s2">                stardata-&gt;star[0].fallback, // 12</span>
+<span class="s2">                stardata-&gt;star[0].fallback_mass // 13</span>
+<span class="s2">            );</span>
+<span class="s2">        }</span>
+<span class="s2">    };</span>
+<span class="s2">    /* Kill the simulation to save time */</span>
+<span class="s2">    stardata-&gt;model.max_evolution_time = stardata-&gt;model.time - stardata-&gt;model.dtm;</span>
+<span class="s2">};</span>
+<span class="s2">&quot;&quot;&quot;</span>
+
+<span class="c1"># Entire script</span>
+<span class="n">custom_logging_code</span> <span class="o">=</span> <span class="n">binary_c_log_code</span><span class="p">(</span><span class="n">example_logging_string_CO</span><span class="p">)</span>
+
+<span class="c1"># Run system</span>
+<span class="n">output</span> <span class="o">=</span> <span class="n">run_system</span><span class="p">(</span><span class="n">M_1</span><span class="o">=</span><span class="mi">20</span><span class="p">,</span> <span class="n">custom_logging_code</span><span class="o">=</span><span class="n">custom_logging_code</span><span class="p">)</span>
+
+<span class="c1"># print (abridged) output</span>
+<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">output</span><span class="o">.</span><span class="n">splitlines</span><span class="p">()[</span><span class="o">-</span><span class="mi">2</span><span class="p">:]))</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+EXAMPLE_MASSLOSS             9.878236827680e+00 1.61349 8.38063 20 13 1
+EXAMPLE_SN             9.878236827680e+00 1.61349 8.38063 20 12 13 5 1 6.74037 4.92267 6.74037 0 0
+</pre></div></div>
+</div>
+</div>
+</div>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="notebook_population.html" class="btn btn-neutral float-right" title="Running populations with binarycpython" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="notebook_individual_systems.html" class="btn btn-neutral float-left" title="Running individual systems with binarycpython" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        
+        &copy; Copyright 2021, David Hendriks, Robert Izzard
+
+    </p>
+  </div>
+    
+    
+    
+    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
+    
+    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
+    
+    provided by <a href="https://readthedocs.org">Read the Docs</a>.
+<br><br>
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
+<br><br>
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+
+
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script>
+
+  
+  
+    
+   
+
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/build/html/notebook_custom_logging.ipynb b/docs/build/html/notebook_custom_logging.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..e84895375014ce29b29a572a9a264d1505eb1db9
--- /dev/null
+++ b/docs/build/html/notebook_custom_logging.ipynb
@@ -0,0 +1,517 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "879b596b-d70c-4f90-b668-563b4ad93ffc",
+   "metadata": {},
+   "source": [
+    "# Notebook custom logging\n",
+    "In this notebook you'll learn how to use the custom logging functionality"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 37,
+   "id": "696ecbb9-1efd-48f4-a57e-2cf6dfe416f1",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from binarycpython import _binary_c_bindings\n",
+    "from binarycpython.utils.custom_logging_functions import (\n",
+    "    autogen_C_logging_code,\n",
+    "    binary_c_log_code,\n",
+    "    create_and_load_logging_function,\n",
+    ")\n",
+    "from binarycpython.utils.run_system_wrapper import run_system\n",
+    "from binarycpython.utils.grid import Population"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "d4d721cc-df4f-4ac2-b6f9-62e85ca0c1e5",
+   "metadata": {},
+   "source": [
+    "The custom logging functionality allows us to decide the output of binary_c _without_ modifying the actual sourcecode of binary_c (i.e. editing `src/logging/log_every_timestep` in binary_c). Rather, we can create a logging routine from within python.\n",
+    "\n",
+    "Technically, the following steps are taken:\n",
+    "- User creates a logging print statement from within python\n",
+    "- The logging print statement string gets wrapped into a proper c-function by `binary_c_log_code`\n",
+    "- The c-function string gets compiled and loaded into memory by `create_and_load_logging_function`\n",
+    "- The memory adress of the compiled and loaded print function can now be passed to C\n",
+    "- binary_c uses the custom print function \n",
+    "\n",
+    "The custom logging functionality can be used when running systems via `run_system()`, via `Population.evolve()` and `Population.evolve_single()`, and directly via the API\n",
+    "\n",
+    "Within the logging statement we can access information from the stardata object, as well as use logical statements to determine when to log information. What we cannot do, however, is access functions that are not _publicly available_. For very elaborate printing routines it is still advised to actually hardcode the print statement into binary_c itself."
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "be137151-bb57-43d7-bab1-0167512ac727",
+   "metadata": {},
+   "source": [
+    "## Usage"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ac4e5f4c-81e6-4980-b852-aca84ca74f4c",
+   "metadata": {},
+   "source": [
+    "There are two methods to create the C-code that will be compiled:\n",
+    "- Automatically generate the print statement and use the wrapper to generate the full function string, by using `autogen_C_logging_code`\n",
+    "- Create your custom print statement and use the wrapper to generate the full function string, by writing out the print statement. Here the logging statement obviously has to be valid C code"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "236cf821-09ac-4237-9b8f-6e36d2edf446",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Printf(\"MY_STELLAR_DATA %g %g\\n\",((double)stardata->model.time),((double)stardata->star[0].mass));\n"
+     ]
+    }
+   ],
+   "source": [
+    "# generate logging lines. Here you can choose whatever you want to have logged, and with what header\n",
+    "# this generates working print statements\n",
+    "logging_line = autogen_C_logging_code(\n",
+    "    {\n",
+    "        \"MY_STELLAR_DATA\": [\"model.time\", \"star[0].mass\"],\n",
+    "    }\n",
+    ")\n",
+    "print(logging_line)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 30,
+   "id": "feb423d5-5cc3-433c-9801-f8017abbc03a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Printf(\"MY_STELLAR_DATA time=%g mass=%g\\n\", stardata->model.time, stardata->star[0].mass)\n"
+     ]
+    }
+   ],
+   "source": [
+    "# You can also decide to `write` your own logging_line, which allows you to write a more complex logging statement with conditionals.\n",
+    "logging_line = 'Printf(\"MY_STELLAR_DATA time=%g mass=%g\\\\n\", stardata->model.time, stardata->star[0].mass)'\n",
+    "print(logging_line)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 31,
+   "id": "2f5defbf-c623-49ed-a238-fba52a563a58",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "#pragma push_macro(\"Max\")\n",
+      "#pragma push_macro(\"Min\")\n",
+      "#undef Max\n",
+      "#undef Min\n",
+      "#include \"binary_c.h\"\n",
+      "\n",
+      "// add visibility __attribute__ ((visibility (\"default\"))) to it \n",
+      "void binary_c_API_function custom_output_function(struct stardata_t * stardata);\n",
+      "void binary_c_API_function custom_output_function(struct stardata_t * stardata)\n",
+      "{\n",
+      "    // struct stardata_t * stardata = (struct stardata_t *)x;\n",
+      "    Printf(\"MY_STELLAR_DATA time=%g mass=%g\\n\", stardata->model.time, stardata->star[0].mass);\n",
+      "}\n",
+      "\n",
+      "#undef Max \n",
+      "#undef Min\n",
+      "#pragma pop_macro(\"Min\")\n",
+      "#pragma pop_macro(\"Max\")    \n"
+     ]
+    }
+   ],
+   "source": [
+    "# Generate the entire 'script' by wrapping the logging line\n",
+    "custom_logging_code = binary_c_log_code(logging_line)\n",
+    "print(custom_logging_code)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "efa7f1e9-247e-4196-a883-bcff05265d02",
+   "metadata": {},
+   "source": [
+    "Combining the above with e.g. run_system() (see notebook_individual_systems for more examples):"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 32,
+   "id": "dcd74bbc-478b-43e4-b495-8c456e8d1d88",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MY_STELLAR_DATA time=0 mass=2\n",
+      "MY_STELLAR_DATA time=0 mass=2\n",
+      "MY_STELLAR_DATA time=1e-06 mass=2\n",
+      "MY_STELLAR_DATA time=2e-06 mass=2\n"
+     ]
+    }
+   ],
+   "source": [
+    "# logging statement\n",
+    "logging_line = 'Printf(\"MY_STELLAR_DATA time=%g mass=%g\\\\n\", stardata->model.time, stardata->star[0].mass)'\n",
+    "\n",
+    "# Entire script\n",
+    "custom_logging_code = binary_c_log_code(logging_line)\n",
+    "\n",
+    "# Run system\n",
+    "output = run_system(M_1=2, custom_logging_code=custom_logging_code)\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print(\"\\n\".join(output.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "1998ee8f-8c0a-462b-b1e0-54f5963902cc",
+   "metadata": {},
+   "source": [
+    "### Using custom logging with the population object\n",
+    "Custom logging can be used for a whole population by setting the print statement (so not the entire logging script) in `C_logging_code`"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 33,
+   "id": "77bd09b0-1a94-499d-97db-a1f991c67c12",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "EXAMPLE_ABOVE_MS             1.041660877905e+02 4.99198 4.99198 6.1357 6.1357 2 1\n",
+      "EXAMPLE_ABOVE_MS             1.041662558619e+02 4.99198 4.99198 6.14057 6.1357 2 2\n",
+      "EXAMPLE_ABOVE_MS             1.041662560111e+02 4.99198 4.99198 6.14057 6.14057 2 2\n",
+      "EXAMPLE_ABOVE_MS             1.041662564579e+02 4.99198 4.99198 6.14059 6.14057 2 2\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Set up population\n",
+    "pop = Population()\n",
+    "\n",
+    "# Set some BSE parameters\n",
+    "pop.set(\n",
+    "    M_1=5\n",
+    ")\n",
+    "\n",
+    "# Example logging that prints only if the star is post main-sequence\n",
+    "example_logging_string_post_MS = \"\"\"\n",
+    "if(stardata->star[0].stellar_type>MS)\n",
+    "{\n",
+    "    Printf(\"EXAMPLE_ABOVE_MS %30.12e %g %g %g %g %d %d\\\\n\",\n",
+    "        // \n",
+    "        stardata->model.time, // 1\n",
+    "\n",
+    "        stardata->star[0].mass, //2\n",
+    "        stardata->previous_stardata->star[0].mass, //3\n",
+    "\n",
+    "        stardata->star[0].radius, //4\n",
+    "        stardata->previous_stardata->star[0].radius, //5\n",
+    "\n",
+    "        stardata->star[0].stellar_type, //6\n",
+    "        stardata->previous_stardata->star[0].stellar_type //7\n",
+    "  );\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "# Set the logging\n",
+    "pop.set(\n",
+    "    C_logging_code=example_logging_string_post_MS\n",
+    ")\n",
+    "out = pop.evolve_single()\n",
+    "\n",
+    "# Print (abridged) output\n",
+    "print('\\n'.join(out.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "93397ff3-9b71-470d-8bc4-08fe5b1a5dca",
+   "metadata": {},
+   "source": [
+    "### Using custom logging when running directly from the API\n",
+    "When running a system directly with the API we need to manually load the custom logging into memory (via `create_and_load_logging_function`) and pass the memory address to the binary_c binding via `_binary_c_bindings.run_system(argstring, custom_logging_func_memaddr=custom_logging_memaddr)`"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 40,
+   "id": "30142286-34ce-433e-82c8-565e2160ff5b",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MY_STELLAR_DATA 0 15\n",
+      "MY_STELLAR_DATA 0 15\n",
+      "MY_STELLAR_DATA 1e-06 15\n",
+      "MY_STELLAR_DATA 2e-06 15\n"
+     ]
+    }
+   ],
+   "source": [
+    "# generate logging lines\n",
+    "logging_line = autogen_C_logging_code(\n",
+    "    {\n",
+    "        \"MY_STELLAR_DATA\": [\"model.time\", \"star[0].mass\"],\n",
+    "    }\n",
+    ")\n",
+    "\n",
+    "# Generate code around logging lines\n",
+    "custom_logging_code = binary_c_log_code(logging_line)\n",
+    "\n",
+    "# Generate library and get memaddr\n",
+    "custom_logging_memaddr, shared_lib_filename = create_and_load_logging_function(\n",
+    "    custom_logging_code\n",
+    ")\n",
+    "\n",
+    "#\n",
+    "m1 = 15.0  # Msun\n",
+    "m2 = 14.0  # Msun\n",
+    "separation = 0  # 0 = ignored, use period\n",
+    "orbital_period = 4530.0  # days\n",
+    "eccentricity = 0.0\n",
+    "metallicity = 0.02\n",
+    "max_evolution_time = 15000\n",
+    "argstring = \"binary_c M_1 {0:g} M_2 {1:g} separation {2:g} orbital_period {3:g} eccentricity {4:g} metallicity {5:g} max_evolution_time {6:g}\".format(\n",
+    "    m1,\n",
+    "    m2,\n",
+    "    separation,\n",
+    "    orbital_period,\n",
+    "    eccentricity,\n",
+    "    metallicity,\n",
+    "    max_evolution_time,\n",
+    ")\n",
+    "output = _binary_c_bindings.run_system(\n",
+    "    argstring, custom_logging_func_memaddr=custom_logging_memaddr\n",
+    ")\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print('\\n'.join(output.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "39c76b1d-d968-4eef-b5ae-2542ed9557c3",
+   "metadata": {},
+   "source": [
+    "## Examples of logging strings\n",
+    "Below are some examples of logging strings"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "2ac4af72-6dab-4cc9-986e-5b5b1fa31b73",
+   "metadata": {},
+   "source": [
+    "### Compact object\n",
+    "This logging will print the timestep when the star becomes a compact object. After it does, we change the maximum time to be the current time, effectively terminating the evolution"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 42,
+   "id": "6f0edc65-a788-4706-a0c5-2ace030765ec",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "SINGLE_STAR_LIFETIME 10 27.7358\n",
+      "EXAMPLE_LOG_CO             2.773581245005e+01 1.33524 9.19314 1.72498e-05 730.446 13 5\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_logging_string_CO = \"\"\"\n",
+    "if(stardata->star[0].stellar_type>=NS)\n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"EXAMPLE_LOG_CO %30.12e %g %g %g %g %d %d\\\\n\",\n",
+    "            // \n",
+    "            stardata->model.time, // 1\n",
+    "\n",
+    "            stardata->star[0].mass, //2\n",
+    "            stardata->previous_stardata->star[0].mass, //3\n",
+    "\n",
+    "            stardata->star[0].radius, //4\n",
+    "            stardata->previous_stardata->star[0].radius, //5\n",
+    "\n",
+    "            stardata->star[0].stellar_type, //6\n",
+    "            stardata->previous_stardata->star[0].stellar_type //7\n",
+    "      );\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "# Entire script\n",
+    "custom_logging_code = binary_c_log_code(example_logging_string_CO)\n",
+    "\n",
+    "# Run system\n",
+    "output = run_system(M_1=10, custom_logging_code=custom_logging_code)\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print(\"\\n\".join(output.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "51c51592-6406-43bd-a879-10ace64aaf28",
+   "metadata": {},
+   "source": [
+    "### Logging mass evolution and the supernova\n",
+    "This logging code prints the mass evolution and the moment the star goes supernova"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 47,
+   "id": "8f58fdf9-3e76-4c18-a1c5-eed0980d4133",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "EXAMPLE_MASSLOSS             9.878236827680e+00 1.61349 8.38063 20 13 1\n",
+      "EXAMPLE_SN             9.878236827680e+00 1.61349 8.38063 20 12 13 5 1 6.74037 4.92267 6.74037 0 0\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_logging_string_CO = \"\"\"\n",
+    "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %g %d %g\\\\n\",\n",
+    "    // \n",
+    "    stardata->model.time, // 1\n",
+    "    stardata->star[0].mass, //2\n",
+    "    stardata->previous_stardata->star[0].mass, //3\n",
+    "    stardata->common.zero_age.mass[0], //4\n",
+    "\n",
+    "    stardata->star[0].stellar_type, //5\n",
+    "    stardata->model.probability //6\n",
+    ");\n",
+    "if(stardata->star[0].SN_type != SN_NONE)\n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        if(stardata->pre_events_stardata != NULL)\n",
+    "        {\n",
+    "            Printf(\"EXAMPLE_SN %30.12e \" // 1\n",
+    "                \"%g %g %g %d \" // 2-5\n",
+    "                \"%d %d %g %g \" // 6-9\n",
+    "                \"%g %g %g %g\\\\n\", // 10-13\n",
+    "\n",
+    "                // \n",
+    "                stardata->model.time, // 1\n",
+    "\n",
+    "                stardata->star[0].mass, //2\n",
+    "                stardata->pre_events_stardata->star[0].mass, //3\n",
+    "                stardata->common.zero_age.mass[0], //4\n",
+    "                stardata->star[0].SN_type, //5\n",
+    "\n",
+    "                stardata->star[0].stellar_type, //6\n",
+    "                stardata->pre_events_stardata->star[0].stellar_type, //7\n",
+    "                stardata->model.probability, //8\n",
+    "                stardata->pre_events_stardata->star[0].core_mass[ID_core(stardata->pre_events_stardata->star[0].stellar_type)],           // 9\n",
+    "\n",
+    "                stardata->pre_events_stardata->star[0].core_mass[CORE_CO],     // 10\n",
+    "                stardata->pre_events_stardata->star[0].core_mass[CORE_He],    // 11\n",
+    "                stardata->star[0].fallback, // 12\n",
+    "                stardata->star[0].fallback_mass // 13\n",
+    "            );\n",
+    "        }\n",
+    "        else\n",
+    "        {\n",
+    "            Printf(\"EXAMPLE_SN %30.12e \" // 1\n",
+    "                \"%g %g %g %d \" // 2-5\n",
+    "                \"%d %d %g %g \" // 6-9\n",
+    "                \"%g %g %g %g\\\\n\", // 10-13\n",
+    "\n",
+    "                // \n",
+    "                stardata->model.time, // 1\n",
+    "\n",
+    "                stardata->star[0].mass, //2\n",
+    "                stardata->previous_stardata->star[0].mass, //3\n",
+    "                stardata->common.zero_age.mass[0], //4\n",
+    "                stardata->star[0].SN_type, //5\n",
+    "\n",
+    "                stardata->star[0].stellar_type, //6\n",
+    "                stardata->previous_stardata->star[0].stellar_type, //7\n",
+    "                stardata->model.probability, //8\n",
+    "                stardata->previous_stardata->star[0].core_mass[ID_core(stardata->previous_stardata->star[0].stellar_type)],           // 9\n",
+    "\n",
+    "                stardata->previous_stardata->star[0].core_mass[CORE_CO],     // 10\n",
+    "                stardata->previous_stardata->star[0].core_mass[CORE_He],    // 11\n",
+    "                stardata->star[0].fallback, // 12\n",
+    "                stardata->star[0].fallback_mass // 13\n",
+    "            );\n",
+    "        }\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "# Entire script\n",
+    "custom_logging_code = binary_c_log_code(example_logging_string_CO)\n",
+    "\n",
+    "# Run system\n",
+    "output = run_system(M_1=20, custom_logging_code=custom_logging_code)\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print(\"\\n\".join(output.splitlines()[-2:]))"
+   ]
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/build/html/notebook_extra_features.html b/docs/build/html/notebook_extra_features.html
new file mode 100644
index 0000000000000000000000000000000000000000..e48ab4068cdebd3f8ddfff23e3169e68ccdd635a
--- /dev/null
+++ b/docs/build/html/notebook_extra_features.html
@@ -0,0 +1,518 @@
+
+
+<!DOCTYPE html>
+<html class="writer-html5" lang="en" >
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Extra features and functionality of binarycpython &mdash; binary_c-python  documentation</title>
+  
+
+  
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+
+  
+  
+  
+  
+
+  
+  <!--[if lt IE 9]>
+    <script src="_static/js/html5shiv.min.js"></script>
+  <![endif]-->
+  
+    
+      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
+        <script src="_static/jquery.js"></script>
+        <script src="_static/underscore.js"></script>
+        <script src="_static/doctools.js"></script>
+        <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
+    
+    <script type="text/javascript" src="_static/js/theme.js"></script>
+
+    
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Using the API functionality of binarycpython" href="notebook_api_functionality.html" />
+    <link rel="prev" title="Running populations with binarycpython" href="notebook_population.html" /> 
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search" >
+          
+
+          
+            <a href="index.html" class="icon icon-home" alt="Documentation Home"> binary_c-python
+          
+
+          
+          </a>
+
+          
+            
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="readme_link.html">Python module for binary_c</a></li>
+<li class="toctree-l1"><a class="reference internal" href="modules.html">Binarycpython code</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="example_notebooks.html">Example notebooks</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="notebook_individual_systems.html">Running individual systems with binarycpython</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_custom_logging.html">Notebook custom logging</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_population.html">Running populations with binarycpython</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Extra features and functionality of binarycpython</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_api_functionality.html">Using the API functionality of binarycpython</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
+<li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
+<li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
+<li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/issues/new">Submit an issue</a></li>
+</ul>
+
+            
+          
+        </div>
+        
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="index.html">binary_c-python</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
+        
+          <li><a href="example_notebooks.html">Example notebooks</a> &raquo;</li>
+        
+      <li>Extra features and functionality of binarycpython</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="_sources/notebook_extra_features.ipynb.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  
+<style>
+/* CSS for nbsphinx extension */
+
+/* remove conflicting styling from Sphinx themes */
+div.nbinput.container div.prompt *,
+div.nboutput.container div.prompt *,
+div.nbinput.container div.input_area pre,
+div.nboutput.container div.output_area pre,
+div.nbinput.container div.input_area .highlight,
+div.nboutput.container div.output_area .highlight {
+    border: none;
+    padding: 0;
+    margin: 0;
+    box-shadow: none;
+}
+
+div.nbinput.container > div[class*=highlight],
+div.nboutput.container > div[class*=highlight] {
+    margin: 0;
+}
+
+div.nbinput.container div.prompt *,
+div.nboutput.container div.prompt * {
+    background: none;
+}
+
+div.nboutput.container div.output_area .highlight,
+div.nboutput.container div.output_area pre {
+    background: unset;
+}
+
+div.nboutput.container div.output_area div.highlight {
+    color: unset;  /* override Pygments text color */
+}
+
+/* avoid gaps between output lines */
+div.nboutput.container div[class*=highlight] pre {
+    line-height: normal;
+}
+
+/* input/output containers */
+div.nbinput.container,
+div.nboutput.container {
+    display: -webkit-flex;
+    display: flex;
+    align-items: flex-start;
+    margin: 0;
+    width: 100%;
+}
+@media (max-width: 540px) {
+    div.nbinput.container,
+    div.nboutput.container {
+        flex-direction: column;
+    }
+}
+
+/* input container */
+div.nbinput.container {
+    padding-top: 5px;
+}
+
+/* last container */
+div.nblast.container {
+    padding-bottom: 5px;
+}
+
+/* input prompt */
+div.nbinput.container div.prompt pre {
+    color: #307FC1;
+}
+
+/* output prompt */
+div.nboutput.container div.prompt pre {
+    color: #BF5B3D;
+}
+
+/* all prompts */
+div.nbinput.container div.prompt,
+div.nboutput.container div.prompt {
+    width: 4.5ex;
+    padding-top: 5px;
+    position: relative;
+    user-select: none;
+}
+
+div.nbinput.container div.prompt > div,
+div.nboutput.container div.prompt > div {
+    position: absolute;
+    right: 0;
+    margin-right: 0.3ex;
+}
+
+@media (max-width: 540px) {
+    div.nbinput.container div.prompt,
+    div.nboutput.container div.prompt {
+        width: unset;
+        text-align: left;
+        padding: 0.4em;
+    }
+    div.nboutput.container div.prompt.empty {
+        padding: 0;
+    }
+
+    div.nbinput.container div.prompt > div,
+    div.nboutput.container div.prompt > div {
+        position: unset;
+    }
+}
+
+/* disable scrollbars on prompts */
+div.nbinput.container div.prompt pre,
+div.nboutput.container div.prompt pre {
+    overflow: hidden;
+}
+
+/* input/output area */
+div.nbinput.container div.input_area,
+div.nboutput.container div.output_area {
+    -webkit-flex: 1;
+    flex: 1;
+    overflow: auto;
+}
+@media (max-width: 540px) {
+    div.nbinput.container div.input_area,
+    div.nboutput.container div.output_area {
+        width: 100%;
+    }
+}
+
+/* input area */
+div.nbinput.container div.input_area {
+    border: 1px solid #e0e0e0;
+    border-radius: 2px;
+    /*background: #f5f5f5;*/
+}
+
+/* override MathJax center alignment in output cells */
+div.nboutput.container div[class*=MathJax] {
+    text-align: left !important;
+}
+
+/* override sphinx.ext.imgmath center alignment in output cells */
+div.nboutput.container div.math p {
+    text-align: left;
+}
+
+/* standard error */
+div.nboutput.container div.output_area.stderr {
+    background: #fdd;
+}
+
+/* ANSI colors */
+.ansi-black-fg { color: #3E424D; }
+.ansi-black-bg { background-color: #3E424D; }
+.ansi-black-intense-fg { color: #282C36; }
+.ansi-black-intense-bg { background-color: #282C36; }
+.ansi-red-fg { color: #E75C58; }
+.ansi-red-bg { background-color: #E75C58; }
+.ansi-red-intense-fg { color: #B22B31; }
+.ansi-red-intense-bg { background-color: #B22B31; }
+.ansi-green-fg { color: #00A250; }
+.ansi-green-bg { background-color: #00A250; }
+.ansi-green-intense-fg { color: #007427; }
+.ansi-green-intense-bg { background-color: #007427; }
+.ansi-yellow-fg { color: #DDB62B; }
+.ansi-yellow-bg { background-color: #DDB62B; }
+.ansi-yellow-intense-fg { color: #B27D12; }
+.ansi-yellow-intense-bg { background-color: #B27D12; }
+.ansi-blue-fg { color: #208FFB; }
+.ansi-blue-bg { background-color: #208FFB; }
+.ansi-blue-intense-fg { color: #0065CA; }
+.ansi-blue-intense-bg { background-color: #0065CA; }
+.ansi-magenta-fg { color: #D160C4; }
+.ansi-magenta-bg { background-color: #D160C4; }
+.ansi-magenta-intense-fg { color: #A03196; }
+.ansi-magenta-intense-bg { background-color: #A03196; }
+.ansi-cyan-fg { color: #60C6C8; }
+.ansi-cyan-bg { background-color: #60C6C8; }
+.ansi-cyan-intense-fg { color: #258F8F; }
+.ansi-cyan-intense-bg { background-color: #258F8F; }
+.ansi-white-fg { color: #C5C1B4; }
+.ansi-white-bg { background-color: #C5C1B4; }
+.ansi-white-intense-fg { color: #A1A6B2; }
+.ansi-white-intense-bg { background-color: #A1A6B2; }
+
+.ansi-default-inverse-fg { color: #FFFFFF; }
+.ansi-default-inverse-bg { background-color: #000000; }
+
+.ansi-bold { font-weight: bold; }
+.ansi-underline { text-decoration: underline; }
+
+
+div.nbinput.container div.input_area div[class*=highlight] > pre,
+div.nboutput.container div.output_area div[class*=highlight] > pre,
+div.nboutput.container div.output_area div[class*=highlight].math,
+div.nboutput.container div.output_area.rendered_html,
+div.nboutput.container div.output_area > div.output_javascript,
+div.nboutput.container div.output_area:not(.rendered_html) > img{
+    padding: 5px;
+    margin: 0;
+}
+
+/* fix copybtn overflow problem in chromium (needed for 'sphinx_copybutton') */
+div.nbinput.container div.input_area > div[class^='highlight'],
+div.nboutput.container div.output_area > div[class^='highlight']{
+    overflow-y: hidden;
+}
+
+/* hide copybtn icon on prompts (needed for 'sphinx_copybutton') */
+.prompt a.copybtn {
+    display: none;
+}
+
+/* Some additional styling taken form the Jupyter notebook CSS */
+div.rendered_html table {
+  border: none;
+  border-collapse: collapse;
+  border-spacing: 0;
+  color: black;
+  font-size: 12px;
+  table-layout: fixed;
+}
+div.rendered_html thead {
+  border-bottom: 1px solid black;
+  vertical-align: bottom;
+}
+div.rendered_html tr,
+div.rendered_html th,
+div.rendered_html td {
+  text-align: right;
+  vertical-align: middle;
+  padding: 0.5em 0.5em;
+  line-height: normal;
+  white-space: normal;
+  max-width: none;
+  border: none;
+}
+div.rendered_html th {
+  font-weight: bold;
+}
+div.rendered_html tbody tr:nth-child(odd) {
+  background: #f5f5f5;
+}
+div.rendered_html tbody tr:hover {
+  background: rgba(66, 165, 245, 0.2);
+}
+
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="Extra-features-and-functionality-of-binarycpython">
+<h1>Extra features and functionality of binarycpython<a class="headerlink" href="#Extra-features-and-functionality-of-binarycpython" title="Permalink to this headline">¶</a></h1>
+<p>In this notebook we’ll go over some of the extra features and functionality that was not covered in the other notebooks.</p>
+<p>TODO</p>
+<div class="nbinput nblast docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[ ]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span>
+</pre></div>
+</div>
+</div>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="notebook_api_functionality.html" class="btn btn-neutral float-right" title="Using the API functionality of binarycpython" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="notebook_population.html" class="btn btn-neutral float-left" title="Running populations with binarycpython" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        
+        &copy; Copyright 2021, David Hendriks, Robert Izzard
+
+    </p>
+  </div>
+    
+    
+    
+    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
+    
+    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
+    
+    provided by <a href="https://readthedocs.org">Read the Docs</a>.
+<br><br>
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
+<br><br>
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+
+
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script>
+
+  
+  
+    
+   
+
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/build/html/notebook_extra_features.ipynb b/docs/build/html/notebook_extra_features.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..d453a6f5bef5a661a59491fde19511cee3f6c579
--- /dev/null
+++ b/docs/build/html/notebook_extra_features.ipynb
@@ -0,0 +1,44 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "d5c04b77-f0be-4b33-8c03-c72eb846527c",
+   "metadata": {},
+   "source": [
+    "# Extra features and functionality of binarycpython\n",
+    "In this notebook we'll go over some of the extra features and functionality that was not covered in the other notebooks.\n",
+    "\n",
+    "TODO"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "id": "0020f1bc-2a23-455c-8216-9e63e6e038ae",
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/build/html/notebook_individual_systems.html b/docs/build/html/notebook_individual_systems.html
new file mode 100644
index 0000000000000000000000000000000000000000..0d679203ad5e06d3c6785f2e438c217ecc454a32
--- /dev/null
+++ b/docs/build/html/notebook_individual_systems.html
@@ -0,0 +1,934 @@
+
+
+<!DOCTYPE html>
+<html class="writer-html5" lang="en" >
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Running individual systems with binarycpython &mdash; binary_c-python  documentation</title>
+  
+
+  
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+
+  
+  
+  
+  
+
+  
+  <!--[if lt IE 9]>
+    <script src="_static/js/html5shiv.min.js"></script>
+  <![endif]-->
+  
+    
+      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
+        <script src="_static/jquery.js"></script>
+        <script src="_static/underscore.js"></script>
+        <script src="_static/doctools.js"></script>
+        <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
+    
+    <script type="text/javascript" src="_static/js/theme.js"></script>
+
+    
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Notebook custom logging" href="notebook_custom_logging.html" />
+    <link rel="prev" title="Example notebooks" href="example_notebooks.html" /> 
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search" >
+          
+
+          
+            <a href="index.html" class="icon icon-home" alt="Documentation Home"> binary_c-python
+          
+
+          
+          </a>
+
+          
+            
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="readme_link.html">Python module for binary_c</a></li>
+<li class="toctree-l1"><a class="reference internal" href="modules.html">Binarycpython code</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="example_notebooks.html">Example notebooks</a><ul class="current">
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Running individual systems with binarycpython</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="#Single-system-with-run_wrapper">Single system with run_wrapper</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#Single-system-via-population-object">Single system via population object</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#Single-system-via-API-functionality">Single system via API functionality</a></li>
+</ul>
+</li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_custom_logging.html">Notebook custom logging</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_population.html">Running populations with binarycpython</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_extra_features.html">Extra features and functionality of binarycpython</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_api_functionality.html">Using the API functionality of binarycpython</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
+<li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
+<li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
+<li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/issues/new">Submit an issue</a></li>
+</ul>
+
+            
+          
+        </div>
+        
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="index.html">binary_c-python</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
+        
+          <li><a href="example_notebooks.html">Example notebooks</a> &raquo;</li>
+        
+      <li>Running individual systems with binarycpython</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="_sources/notebook_individual_systems.ipynb.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  
+<style>
+/* CSS for nbsphinx extension */
+
+/* remove conflicting styling from Sphinx themes */
+div.nbinput.container div.prompt *,
+div.nboutput.container div.prompt *,
+div.nbinput.container div.input_area pre,
+div.nboutput.container div.output_area pre,
+div.nbinput.container div.input_area .highlight,
+div.nboutput.container div.output_area .highlight {
+    border: none;
+    padding: 0;
+    margin: 0;
+    box-shadow: none;
+}
+
+div.nbinput.container > div[class*=highlight],
+div.nboutput.container > div[class*=highlight] {
+    margin: 0;
+}
+
+div.nbinput.container div.prompt *,
+div.nboutput.container div.prompt * {
+    background: none;
+}
+
+div.nboutput.container div.output_area .highlight,
+div.nboutput.container div.output_area pre {
+    background: unset;
+}
+
+div.nboutput.container div.output_area div.highlight {
+    color: unset;  /* override Pygments text color */
+}
+
+/* avoid gaps between output lines */
+div.nboutput.container div[class*=highlight] pre {
+    line-height: normal;
+}
+
+/* input/output containers */
+div.nbinput.container,
+div.nboutput.container {
+    display: -webkit-flex;
+    display: flex;
+    align-items: flex-start;
+    margin: 0;
+    width: 100%;
+}
+@media (max-width: 540px) {
+    div.nbinput.container,
+    div.nboutput.container {
+        flex-direction: column;
+    }
+}
+
+/* input container */
+div.nbinput.container {
+    padding-top: 5px;
+}
+
+/* last container */
+div.nblast.container {
+    padding-bottom: 5px;
+}
+
+/* input prompt */
+div.nbinput.container div.prompt pre {
+    color: #307FC1;
+}
+
+/* output prompt */
+div.nboutput.container div.prompt pre {
+    color: #BF5B3D;
+}
+
+/* all prompts */
+div.nbinput.container div.prompt,
+div.nboutput.container div.prompt {
+    width: 4.5ex;
+    padding-top: 5px;
+    position: relative;
+    user-select: none;
+}
+
+div.nbinput.container div.prompt > div,
+div.nboutput.container div.prompt > div {
+    position: absolute;
+    right: 0;
+    margin-right: 0.3ex;
+}
+
+@media (max-width: 540px) {
+    div.nbinput.container div.prompt,
+    div.nboutput.container div.prompt {
+        width: unset;
+        text-align: left;
+        padding: 0.4em;
+    }
+    div.nboutput.container div.prompt.empty {
+        padding: 0;
+    }
+
+    div.nbinput.container div.prompt > div,
+    div.nboutput.container div.prompt > div {
+        position: unset;
+    }
+}
+
+/* disable scrollbars on prompts */
+div.nbinput.container div.prompt pre,
+div.nboutput.container div.prompt pre {
+    overflow: hidden;
+}
+
+/* input/output area */
+div.nbinput.container div.input_area,
+div.nboutput.container div.output_area {
+    -webkit-flex: 1;
+    flex: 1;
+    overflow: auto;
+}
+@media (max-width: 540px) {
+    div.nbinput.container div.input_area,
+    div.nboutput.container div.output_area {
+        width: 100%;
+    }
+}
+
+/* input area */
+div.nbinput.container div.input_area {
+    border: 1px solid #e0e0e0;
+    border-radius: 2px;
+    /*background: #f5f5f5;*/
+}
+
+/* override MathJax center alignment in output cells */
+div.nboutput.container div[class*=MathJax] {
+    text-align: left !important;
+}
+
+/* override sphinx.ext.imgmath center alignment in output cells */
+div.nboutput.container div.math p {
+    text-align: left;
+}
+
+/* standard error */
+div.nboutput.container div.output_area.stderr {
+    background: #fdd;
+}
+
+/* ANSI colors */
+.ansi-black-fg { color: #3E424D; }
+.ansi-black-bg { background-color: #3E424D; }
+.ansi-black-intense-fg { color: #282C36; }
+.ansi-black-intense-bg { background-color: #282C36; }
+.ansi-red-fg { color: #E75C58; }
+.ansi-red-bg { background-color: #E75C58; }
+.ansi-red-intense-fg { color: #B22B31; }
+.ansi-red-intense-bg { background-color: #B22B31; }
+.ansi-green-fg { color: #00A250; }
+.ansi-green-bg { background-color: #00A250; }
+.ansi-green-intense-fg { color: #007427; }
+.ansi-green-intense-bg { background-color: #007427; }
+.ansi-yellow-fg { color: #DDB62B; }
+.ansi-yellow-bg { background-color: #DDB62B; }
+.ansi-yellow-intense-fg { color: #B27D12; }
+.ansi-yellow-intense-bg { background-color: #B27D12; }
+.ansi-blue-fg { color: #208FFB; }
+.ansi-blue-bg { background-color: #208FFB; }
+.ansi-blue-intense-fg { color: #0065CA; }
+.ansi-blue-intense-bg { background-color: #0065CA; }
+.ansi-magenta-fg { color: #D160C4; }
+.ansi-magenta-bg { background-color: #D160C4; }
+.ansi-magenta-intense-fg { color: #A03196; }
+.ansi-magenta-intense-bg { background-color: #A03196; }
+.ansi-cyan-fg { color: #60C6C8; }
+.ansi-cyan-bg { background-color: #60C6C8; }
+.ansi-cyan-intense-fg { color: #258F8F; }
+.ansi-cyan-intense-bg { background-color: #258F8F; }
+.ansi-white-fg { color: #C5C1B4; }
+.ansi-white-bg { background-color: #C5C1B4; }
+.ansi-white-intense-fg { color: #A1A6B2; }
+.ansi-white-intense-bg { background-color: #A1A6B2; }
+
+.ansi-default-inverse-fg { color: #FFFFFF; }
+.ansi-default-inverse-bg { background-color: #000000; }
+
+.ansi-bold { font-weight: bold; }
+.ansi-underline { text-decoration: underline; }
+
+
+div.nbinput.container div.input_area div[class*=highlight] > pre,
+div.nboutput.container div.output_area div[class*=highlight] > pre,
+div.nboutput.container div.output_area div[class*=highlight].math,
+div.nboutput.container div.output_area.rendered_html,
+div.nboutput.container div.output_area > div.output_javascript,
+div.nboutput.container div.output_area:not(.rendered_html) > img{
+    padding: 5px;
+    margin: 0;
+}
+
+/* fix copybtn overflow problem in chromium (needed for 'sphinx_copybutton') */
+div.nbinput.container div.input_area > div[class^='highlight'],
+div.nboutput.container div.output_area > div[class^='highlight']{
+    overflow-y: hidden;
+}
+
+/* hide copybtn icon on prompts (needed for 'sphinx_copybutton') */
+.prompt a.copybtn {
+    display: none;
+}
+
+/* Some additional styling taken form the Jupyter notebook CSS */
+div.rendered_html table {
+  border: none;
+  border-collapse: collapse;
+  border-spacing: 0;
+  color: black;
+  font-size: 12px;
+  table-layout: fixed;
+}
+div.rendered_html thead {
+  border-bottom: 1px solid black;
+  vertical-align: bottom;
+}
+div.rendered_html tr,
+div.rendered_html th,
+div.rendered_html td {
+  text-align: right;
+  vertical-align: middle;
+  padding: 0.5em 0.5em;
+  line-height: normal;
+  white-space: normal;
+  max-width: none;
+  border: none;
+}
+div.rendered_html th {
+  font-weight: bold;
+}
+div.rendered_html tbody tr:nth-child(odd) {
+  background: #f5f5f5;
+}
+div.rendered_html tbody tr:hover {
+  background: rgba(66, 165, 245, 0.2);
+}
+
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="Running-individual-systems-with-binarycpython">
+<h1>Running individual systems with binarycpython<a class="headerlink" href="#Running-individual-systems-with-binarycpython" title="Permalink to this headline">¶</a></h1>
+<p>This notebook will show you how to run single systems and analyze their results.</p>
+<p>It can be useful to have some functions to quickly run a single system to e.g. inspect what evolutionary steps a specific system goes through, to plot the mass loss evolution of a single star, etc.</p>
+<div class="section" id="Single-system-with-run_wrapper">
+<h2>Single system with run_wrapper<a class="headerlink" href="#Single-system-with-run_wrapper" title="Permalink to this headline">¶</a></h2>
+<p>The simplest method to run a single system is to use the run_system wrapper. This function deals with setting up the argument string, makes sure all the required parameters are included and handles setting and cleaning up the custom logging functionality (see notebook_custom_logging).</p>
+<p>As arguments to this function we can add any of the parameters that binary_c itself actually knows, as well as: - custom_logging_code: string containing a print statement that binary_c can use to print information - log_filename: path of the logfile that binary_c generates - parse_function: function that handles parsing the output of binary-c</p>
+<div class="nbinput nblast docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="kn">from</span> <span class="nn">binarycpython.utils.run_system_wrapper</span> <span class="kn">import</span> <span class="n">run_system</span>
+<span class="c1"># help(run_system) # Uncomment to see the docstring</span>
+</pre></div>
+</div>
+</div>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[2]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="n">output</span> <span class="o">=</span> <span class="n">run_system</span><span class="p">(</span><span class="n">M_1</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">output</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+SINGLE_STAR_LIFETIME 1 12462
+
+</pre></div></div>
+</div>
+<p>Lets try adding a log filename now:</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[3]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="n">output</span> <span class="o">=</span> <span class="n">run_system</span><span class="p">(</span><span class="n">M_1</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">log_filename</span><span class="o">=</span><span class="s1">&#39;/tmp/test_logfile.txt&#39;</span><span class="p">)</span>
+<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="s1">&#39;/tmp/test_logfile.txt&#39;</span><span class="p">,</span> <span class="s1">&#39;r&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+    <span class="nb">print</span><span class="p">(</span><span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">())</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+      TIME      M1       M2   K1  K2           SEP   ECC  R1/ROL1 R2/ROL2  TYPE RANDOM_SEED=67365 RANDOM_COUNT=0
+     0.0000    1.000    0.000  1  15            -1 -1.00   0.000   0.000  &#34;INITIAL &#34;
+ 11003.1302    1.000    0.000  2  15            -1 -1.00   0.000   0.000  &#34;OFF_MS&#34;
+ 11003.1302    1.000    0.000  2  15            -1 -1.00   0.000   0.000  &#34;TYPE_CHNGE&#34;
+ 11582.2424    1.000    0.000  3  15            -1 -1.00   0.000   0.000  &#34;TYPE_CHNGE&#34;
+ 12325.1085    0.817    0.000  4  15            -1 -1.00   0.000   0.000  &#34;TYPE_CHNGE&#34;
+ 12457.1300    0.783    0.000  5  15            -1 -1.00   0.000   0.000  &#34;TYPE_CHNGE&#34;
+ 12460.8955    0.774    0.000  6  15            -1 -1.00   0.000   0.000  &#34;TYPE_CHNGE&#34;
+ 12460.8955    0.774    0.000  6  15            -1 -1.00   0.000   0.000  &#34;shrinkAGB&#34;
+ 12461.9514    0.523    0.000 11  15            -1 -1.00   0.000   0.000  &#34;TYPE_CHNGE&#34;
+ 15000.0000    0.523    0.000 11  15            -1 -1.00   0.000   0.000  &#34;MAX_TIME&#34;
+
+</pre></div></div>
+</div>
+<p>To get more useful output we can include a custom_logging snippet (see notebook_custom_logging):</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[6]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="kn">from</span> <span class="nn">binarycpython.utils.custom_logging_functions</span> <span class="kn">import</span> <span class="n">binary_c_log_code</span>
+
+<span class="c1"># Create the print statement</span>
+<span class="n">custom_logging_print_statement</span> <span class="o">=</span> <span class="s2">&quot;&quot;&quot;</span>
+<span class="s2">Printf(&quot;EXAMPLE_MASSLOSS </span><span class="si">%30.12e</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%d</span><span class="se">\\</span><span class="s2">n&quot;,</span>
+<span class="s2">    //</span>
+<span class="s2">    stardata-&gt;model.time, // 1</span>
+<span class="s2">    stardata-&gt;star[0].mass, //2</span>
+<span class="s2">    stardata-&gt;common.zero_age.mass[0], //4</span>
+
+<span class="s2">    stardata-&gt;star[0].stellar_type //5</span>
+<span class="s2">);</span>
+<span class="s2">&quot;&quot;&quot;</span>
+
+<span class="c1"># Generate entire shared lib code around logging lines</span>
+<span class="n">custom_logging_code</span> <span class="o">=</span> <span class="n">binary_c_log_code</span><span class="p">(</span><span class="n">custom_logging_print_statement</span><span class="p">)</span>
+
+<span class="n">output</span> <span class="o">=</span> <span class="n">run_system</span><span class="p">(</span><span class="n">M_1</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">custom_logging_code</span><span class="o">=</span><span class="n">custom_logging_code</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">output</span><span class="o">.</span><span class="n">splitlines</span><span class="p">()[:</span><span class="mi">4</span><span class="p">])</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+[&#39;EXAMPLE_MASSLOSS             0.000000000000e+00 1 1 1&#39;, &#39;EXAMPLE_MASSLOSS             0.000000000000e+00 1 1 1&#39;, &#39;EXAMPLE_MASSLOSS             1.000000000000e-06 1 1 1&#39;, &#39;EXAMPLE_MASSLOSS             2.000000000000e-06 1 1 1&#39;]
+</pre></div></div>
+</div>
+<p>Now we have some actual output, it is time to create a parse_function which parses the output. Adding a parse_function to the run_system will make run_system run the output of binary_c through the parse_function.</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[7]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="k">def</span> <span class="nf">parse_function</span><span class="p">(</span><span class="n">output</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">    Example function to parse the output of binary_c</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+
+    <span class="c1">#</span>
+    <span class="n">column_names</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;time&#39;</span><span class="p">,</span> <span class="s1">&#39;mass&#39;</span><span class="p">,</span> <span class="s1">&#39;initial_mass&#39;</span><span class="p">,</span> <span class="s1">&#39;stellar_type&#39;</span><span class="p">]</span>
+    <span class="n">value_lines</span> <span class="o">=</span> <span class="p">[</span><span class="n">column_names</span><span class="p">]</span>
+
+    <span class="c1"># Loop over output</span>
+    <span class="k">for</span> <span class="n">line</span> <span class="ow">in</span> <span class="n">output</span><span class="o">.</span><span class="n">splitlines</span><span class="p">():</span>
+
+        <span class="c1"># Select the lines starting with the header we chose</span>
+        <span class="k">if</span> <span class="n">line</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;EXAMPLE_MASSLOSS&quot;</span><span class="p">):</span>
+
+        <span class="c1"># Split the output and fetch the data</span>
+            <span class="n">split_line</span> <span class="o">=</span> <span class="n">line</span><span class="o">.</span><span class="n">split</span><span class="p">()</span>
+            <span class="n">values</span> <span class="o">=</span> <span class="p">[</span><span class="nb">float</span><span class="p">(</span><span class="n">el</span><span class="p">)</span> <span class="k">for</span> <span class="n">el</span> <span class="ow">in</span> <span class="n">split_line</span><span class="p">[</span><span class="mi">1</span><span class="p">:]]</span>
+            <span class="n">value_lines</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">values</span><span class="p">)</span>
+
+    <span class="k">return</span> <span class="n">value_lines</span>
+
+<span class="c1"># Catch output</span>
+<span class="n">output</span> <span class="o">=</span> <span class="n">run_system</span><span class="p">(</span><span class="n">M_1</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">custom_logging_code</span><span class="o">=</span><span class="n">custom_logging_code</span><span class="p">,</span> <span class="n">parse_function</span><span class="o">=</span><span class="n">parse_function</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">output</span><span class="p">[:</span><span class="mi">3</span><span class="p">])</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+[[&#39;time&#39;, &#39;mass&#39;, &#39;initial_mass&#39;, &#39;stellar_type&#39;], [0.0, 1.0, 1.0, 1.0], [0.0, 1.0, 1.0, 1.0]]
+</pre></div></div>
+</div>
+<p>This output can now be turned into e.g. an Numpy array or Pandas dataframe (my favorite: makes querying the data very easy)</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[8]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>
+
+<span class="c1"># Load data into dataframe</span>
+<span class="n">example_df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">(</span><span class="n">output</span><span class="p">)</span>
+
+<span class="c1"># Fix column headers</span>
+<span class="n">example_df</span><span class="o">.</span><span class="n">columns</span> <span class="o">=</span> <span class="n">example_df</span><span class="o">.</span><span class="n">iloc</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
+<span class="n">example_df</span> <span class="o">=</span> <span class="n">example_df</span><span class="o">.</span><span class="n">drop</span><span class="p">(</span><span class="n">example_df</span><span class="o">.</span><span class="n">index</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">example_df</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+0        time      mass initial_mass stellar_type
+1           0         1            1            1
+2           0         1            1            1
+3       1e-06         1            1            1
+4       2e-06         1            1            1
+5       3e-06         1            1            1
+...       ...       ...          ...          ...
+1612  12461.8  0.577754            1            6
+1613    12462  0.522806            1           11
+1614    13462  0.522806            1           11
+1615    14462  0.522806            1           11
+1616    15000  0.522806            1           11
+
+[1616 rows x 4 columns]
+</pre></div></div>
+</div>
+</div>
+<div class="section" id="Single-system-via-population-object">
+<h2>Single system via population object<a class="headerlink" href="#Single-system-via-population-object" title="Permalink to this headline">¶</a></h2>
+<p>When setting up your population object (see notebook_population), and configuring all the parameters, it is possible to run a single system using that same configuration. It will use the parse_function if set, and running a single system is a good method to test if everything works accordingly.</p>
+<div class="nbinput nblast docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[9]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="kn">from</span> <span class="nn">binarycpython.utils.grid</span> <span class="kn">import</span> <span class="n">Population</span>
+<span class="c1"># help(Population) # Uncomment to see the docstring</span>
+</pre></div>
+</div>
+</div>
+<p>First, let’s try this without any custom logging or parsing functionality</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[10]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="c1"># Create the population object</span>
+<span class="n">example_pop</span> <span class="o">=</span> <span class="n">Population</span><span class="p">()</span>
+
+<span class="c1"># Set some parameters</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+    <span class="n">verbosity</span><span class="o">=</span><span class="mi">1</span>
+<span class="p">)</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+    <span class="n">M_1</span><span class="o">=</span><span class="mi">10</span>
+<span class="p">)</span>
+
+<span class="c1"># get output and print</span>
+<span class="n">output</span> <span class="o">=</span> <span class="n">example_pop</span><span class="o">.</span><span class="n">evolve_single</span><span class="p">()</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">output</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+adding: M_1=10 to BSE_options
+Creating and loading custom logging functionality
+Running binary_c M_1 10
+Cleaning up the custom logging stuff. type: single
+SINGLE_STAR_LIFETIME 10 27.7358
+
+</pre></div></div>
+</div>
+<p>Now lets add some actual output with the custom logging</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[13]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="n">custom_logging_print_statement</span> <span class="o">=</span> <span class="s2">&quot;&quot;&quot;</span>
+<span class="s2">Printf(&quot;EXAMPLE_MASSLOSS </span><span class="si">%30.12e</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%d</span><span class="se">\\</span><span class="s2">n&quot;,</span>
+<span class="s2">    //</span>
+<span class="s2">    stardata-&gt;model.time, // 1</span>
+<span class="s2">    stardata-&gt;star[0].mass, //2</span>
+<span class="s2">    stardata-&gt;previous_stardata-&gt;star[0].mass, //3</span>
+<span class="s2">    stardata-&gt;common.zero_age.mass[0], //4</span>
+
+<span class="s2">    stardata-&gt;star[0].stellar_type //5</span>
+<span class="s2">);</span>
+<span class="s2">&quot;&quot;&quot;</span>
+
+<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">C_logging_code</span><span class="o">=</span><span class="n">custom_logging_print_statement</span><span class="p">)</span>
+
+<span class="c1"># get output and print</span>
+<span class="n">output</span> <span class="o">=</span> <span class="n">example_pop</span><span class="o">.</span><span class="n">evolve_single</span><span class="p">()</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">output</span><span class="o">.</span><span class="n">splitlines</span><span class="p">()[:</span><span class="mi">4</span><span class="p">])</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+adding: C_logging_code=
+Printf(&#34;EXAMPLE_MASSLOSS %30.12e %g %g %g %d\n&#34;,
+    //
+    stardata-&gt;model.time, // 1
+    stardata-&gt;star[0].mass, //2
+    stardata-&gt;previous_stardata-&gt;star[0].mass, //3
+    stardata-&gt;common.zero_age.mass[0], //4
+
+    stardata-&gt;star[0].stellar_type //5
+);
+ to grid_options
+Creating and loading custom logging functionality
+Running binary_c M_1 10
+Cleaning up the custom logging stuff. type: single
+Removed /tmp/binary_c_python/custom_logging/libcustom_logging_eac2dfc438a14e5a9f5be98b1b6b4294.so
+[&#39;EXAMPLE_MASSLOSS             0.000000000000e+00 10 0 10 1&#39;, &#39;EXAMPLE_MASSLOSS             0.000000000000e+00 10 10 10 1&#39;, &#39;EXAMPLE_MASSLOSS             1.000000000000e-06 10 10 10 1&#39;, &#39;EXAMPLE_MASSLOSS             2.000000000000e-06 10 10 10 1&#39;]
+</pre></div></div>
+</div>
+<p>Lastly we can add a parse_function to handle parsing the output again.</p>
+<p>Because the parse_function will now be part of the population object, it can access information of the object. We need to make a new parse function that is fit for an object: we the arguments now need to be (self, output). Returning the data is useful when running evolve_single(), but won’t be used in a population evolution.</p>
+<div class="nbinput nblast docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[14]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="kn">import</span> <span class="nn">os</span>
+<span class="kn">import</span> <span class="nn">json</span>
+<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
+
+<span class="k">def</span> <span class="nf">object_parse_function</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">output</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">    Example parse function that can be added to the population object</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+
+    <span class="c1"># We can access object instance information now.</span>
+    <span class="c1"># In this way we can store the results in a file for example.</span>
+    <span class="n">output_file</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">custom_options</span><span class="p">[</span><span class="s1">&#39;output_dir&#39;</span><span class="p">],</span> <span class="s1">&#39;example_output.json&#39;</span><span class="p">)</span>
+
+    <span class="c1">#</span>
+    <span class="n">column_names</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;time&#39;</span><span class="p">,</span> <span class="s1">&#39;mass&#39;</span><span class="p">,</span> <span class="s1">&#39;initial_mass&#39;</span><span class="p">,</span> <span class="s1">&#39;stellar_type&#39;</span><span class="p">]</span>
+    <span class="n">value_lines</span> <span class="o">=</span> <span class="p">[</span><span class="n">column_names</span><span class="p">]</span>
+
+    <span class="c1"># Loop over output</span>
+    <span class="k">for</span> <span class="n">line</span> <span class="ow">in</span> <span class="n">output</span><span class="o">.</span><span class="n">splitlines</span><span class="p">():</span>
+
+        <span class="c1"># Select the lines starting with the header we chose</span>
+        <span class="k">if</span> <span class="n">line</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;EXAMPLE_MASSLOSS&quot;</span><span class="p">):</span>
+
+        <span class="c1"># Split the output and fetch the data</span>
+            <span class="n">split_line</span> <span class="o">=</span> <span class="n">line</span><span class="o">.</span><span class="n">split</span><span class="p">()</span>
+            <span class="n">values</span> <span class="o">=</span> <span class="p">[</span><span class="nb">float</span><span class="p">(</span><span class="n">el</span><span class="p">)</span> <span class="k">for</span> <span class="n">el</span> <span class="ow">in</span> <span class="n">split_line</span><span class="p">[</span><span class="mi">1</span><span class="p">:]]</span>
+            <span class="n">value_lines</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">values</span><span class="p">)</span>
+
+    <span class="c1"># Turn into an array</span>
+    <span class="n">values_array</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">value_lines</span><span class="p">[</span><span class="mi">1</span><span class="p">:])</span>
+
+    <span class="c1"># make dict and fill</span>
+    <span class="n">output_dict</span> <span class="o">=</span> <span class="p">{}</span>
+    <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">column_names</span><span class="p">)):</span>
+        <span class="n">output_dict</span><span class="p">[</span><span class="n">column_names</span><span class="p">[</span><span class="n">i</span><span class="p">]]</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">values_array</span><span class="p">[:,</span><span class="n">i</span><span class="p">])</span>
+
+    <span class="c1"># Write to file</span>
+    <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">output_file</span><span class="p">,</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+        <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">output_dict</span><span class="p">,</span> <span class="n">indent</span><span class="o">=</span><span class="mi">4</span><span class="p">))</span>
+
+    <span class="c1"># Return something anyway</span>
+    <span class="k">return</span> <span class="n">value_lines</span>
+</pre></div>
+</div>
+</div>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[15]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+    <span class="n">parse_function</span><span class="o">=</span><span class="n">object_parse_function</span><span class="p">,</span>
+    <span class="n">output_dir</span><span class="o">=</span><span class="s1">&#39;/tmp/&#39;</span>
+<span class="p">)</span>
+<span class="n">output</span> <span class="o">=</span> <span class="n">example_pop</span><span class="o">.</span><span class="n">evolve_single</span><span class="p">()</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">output</span><span class="p">[:</span><span class="mi">4</span><span class="p">])</span>
+
+<span class="c1"># Example of loading the data that was written</span>
+<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">example_pop</span><span class="o">.</span><span class="n">custom_options</span><span class="p">[</span><span class="s1">&#39;output_dir&#39;</span><span class="p">],</span> <span class="s1">&#39;example_output.json&#39;</span><span class="p">))</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+    <span class="n">written_data</span> <span class="o">=</span> <span class="n">json</span><span class="o">.</span><span class="n">loads</span><span class="p">(</span><span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">())</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">written_data</span><span class="o">.</span><span class="n">keys</span><span class="p">())</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+adding: parse_function=&lt;function object_parse_function at 0x7f9265091598&gt; to grid_options
+&lt;&lt;&lt;&lt; Warning: Key does not match previously known parameter:                     adding: output_dir=/tmp/ to custom_options &gt;&gt;&gt;&gt;
+Creating and loading custom logging functionality
+Running binary_c M_1 10
+Cleaning up the custom logging stuff. type: single
+Removed /tmp/binary_c_python/custom_logging/libcustom_logging_e9c2bec7f15541eb847fc6013e48e7ed.so
+[[&#39;time&#39;, &#39;mass&#39;, &#39;initial_mass&#39;, &#39;stellar_type&#39;], [0.0, 10.0, 0.0, 10.0, 1.0], [0.0, 10.0, 10.0, 10.0, 1.0], [1e-06, 10.0, 10.0, 10.0, 1.0]]
+dict_keys([&#39;time&#39;, &#39;mass&#39;, &#39;initial_mass&#39;, &#39;stellar_type&#39;])
+</pre></div></div>
+</div>
+</div>
+<div class="section" id="Single-system-via-API-functionality">
+<h2>Single system via API functionality<a class="headerlink" href="#Single-system-via-API-functionality" title="Permalink to this headline">¶</a></h2>
+<p>It is possible to construct your own functionality to run a single system by directly calling the API function to run a system. Under the hood all the other functions and wrappers actually use this API.</p>
+<p>There are less failsafes for this method, so this make sure the input is correct and binary_c knows all the arguments you pass in.</p>
+<p>for more details on this API function see <code class="docutils literal notranslate"><span class="pre">notebook_api_functions</span></code></p>
+<p>First we must construct the argument string that we pass to binary_c</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[16]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="c1"># For a binary system we need to pass in these arguments</span>
+<span class="n">M_1</span> <span class="o">=</span> <span class="mf">15.0</span>  <span class="c1"># Msun</span>
+<span class="n">M_2</span> <span class="o">=</span> <span class="mf">14.0</span>  <span class="c1"># Msun</span>
+<span class="n">separation</span> <span class="o">=</span> <span class="mi">0</span>  <span class="c1"># 0 = ignored, use period</span>
+<span class="n">orbital_period</span> <span class="o">=</span> <span class="mf">4530.0</span>  <span class="c1"># days</span>
+<span class="n">eccentricity</span> <span class="o">=</span> <span class="mf">0.0</span>
+<span class="n">metallicity</span> <span class="o">=</span> <span class="mf">0.02</span>
+<span class="n">max_evolution_time</span> <span class="o">=</span> <span class="mi">15000</span>  <span class="c1"># Myr. You need to include this argument.</span>
+
+<span class="c1"># Here we set up the argument string that is passed to the bindings</span>
+<span class="n">argstring</span> <span class="o">=</span> <span class="s2">&quot;&quot;&quot;</span>
+<span class="s2">binary_c M_1 </span><span class="si">{M_1}</span><span class="s2"> M_2 </span><span class="si">{M_2}</span><span class="s2"> separation </span><span class="si">{separation}</span><span class="s2"> orbital_period </span><span class="si">{orbital_period}</span><span class="s2"> eccentricity </span><span class="si">{eccentricity}</span><span class="s2"> metallicity </span><span class="si">{metallicity}</span><span class="s2"> max_evolution_time </span><span class="si">{max_evolution_time}</span><span class="s2"></span>
+<span class="s2">&quot;&quot;&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+    <span class="n">M_1</span><span class="o">=</span><span class="n">M_1</span><span class="p">,</span>
+    <span class="n">M_2</span><span class="o">=</span><span class="n">M_2</span><span class="p">,</span>
+    <span class="n">separation</span><span class="o">=</span><span class="n">separation</span><span class="p">,</span>
+    <span class="n">orbital_period</span><span class="o">=</span><span class="n">orbital_period</span><span class="p">,</span>
+    <span class="n">eccentricity</span><span class="o">=</span><span class="n">eccentricity</span><span class="p">,</span>
+    <span class="n">metallicity</span><span class="o">=</span><span class="n">metallicity</span><span class="p">,</span>
+    <span class="n">max_evolution_time</span><span class="o">=</span><span class="n">max_evolution_time</span><span class="p">,</span>
+<span class="p">)</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span>
+
+<span class="kn">from</span> <span class="nn">binarycpython</span> <span class="kn">import</span> <span class="n">_binary_c_bindings</span>
+
+<span class="n">output</span> <span class="o">=</span> <span class="n">_binary_c_bindings</span><span class="o">.</span><span class="n">run_system</span><span class="p">(</span><span class="n">argstring</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">output</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+SINGLE_STAR_LIFETIME 15 14.2383
+
+</pre></div></div>
+</div>
+<p>As we can see above, the output is rather empty. But if SINGLE_STAR_LIFETIME is printed we know we caught the output correctly. To get actual output we should have timesteps printed in the <code class="docutils literal notranslate"><span class="pre">log_every_timestep.c</span></code> in binary_c, or add some custom_logging (see notebook_custom_logging).</p>
+</div>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="notebook_custom_logging.html" class="btn btn-neutral float-right" title="Notebook custom logging" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="example_notebooks.html" class="btn btn-neutral float-left" title="Example notebooks" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        
+        &copy; Copyright 2021, David Hendriks, Robert Izzard
+
+    </p>
+  </div>
+    
+    
+    
+    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
+    
+    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
+    
+    provided by <a href="https://readthedocs.org">Read the Docs</a>.
+<br><br>
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
+<br><br>
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+
+
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script>
+
+  
+  
+    
+   
+
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/build/html/notebook_individual_systems.ipynb b/docs/build/html/notebook_individual_systems.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..19c2d29fbd316324eb39a361e897be2b835955e8
--- /dev/null
+++ b/docs/build/html/notebook_individual_systems.ipynb
@@ -0,0 +1,563 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "a544d28c-c2e1-4c6a-b55b-8caec440743f",
+   "metadata": {},
+   "source": [
+    "# Running individual systems with binarycpython\n",
+    "This notebook will show you how to run single systems and analyze their results.\n",
+    "\n",
+    "It can be useful to have some functions to quickly run a single system to e.g. inspect what evolutionary steps a specific system goes through, to plot the mass loss evolution of a single star, etc. "
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "dd5d9ec7-5791-45f1-afbd-225947e2a583",
+   "metadata": {},
+   "source": [
+    "## Single system with run_wrapper\n",
+    "The simplest method to run a single system is to use the run_system wrapper. This function deals with setting up the argument string, makes sure all the required parameters are included and handles setting and cleaning up the custom logging functionality (see notebook_custom_logging).\n",
+    "\n",
+    "As arguments to this function we can add any of the parameters that binary_c itself actually knows, as well as:\n",
+    "- custom_logging_code: string containing a print statement that binary_c can use to print information\n",
+    "- log_filename: path of the logfile that binary_c generates\n",
+    "- parse_function: function that handles parsing the output of binary-c"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "id": "425efed3-d8e3-432d-829e-41d8ebe05162",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from binarycpython.utils.run_system_wrapper import run_system\n",
+    "# help(run_system) # Uncomment to see the docstring"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "id": "b2abab48-433d-4936-8434-14804c52c9f6",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "SINGLE_STAR_LIFETIME 1 12462\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "output = run_system(M_1=1)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f127a5e4-dc01-4472-9130-8a943c92e8a7",
+   "metadata": {},
+   "source": [
+    "Lets try adding a log filename now:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
+   "id": "029fc3f2-f09a-49af-a32b-248505738f2e",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "      TIME      M1       M2   K1  K2           SEP   ECC  R1/ROL1 R2/ROL2  TYPE RANDOM_SEED=67365 RANDOM_COUNT=0\n",
+      "     0.0000    1.000    0.000  1  15            -1 -1.00   0.000   0.000  \"INITIAL \"\n",
+      " 11003.1302    1.000    0.000  2  15            -1 -1.00   0.000   0.000  \"OFF_MS\"\n",
+      " 11003.1302    1.000    0.000  2  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 11582.2424    1.000    0.000  3  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12325.1085    0.817    0.000  4  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12457.1300    0.783    0.000  5  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12460.8955    0.774    0.000  6  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12460.8955    0.774    0.000  6  15            -1 -1.00   0.000   0.000  \"shrinkAGB\"\n",
+      " 12461.9514    0.523    0.000 11  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 15000.0000    0.523    0.000 11  15            -1 -1.00   0.000   0.000  \"MAX_TIME\"\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "output = run_system(M_1=1, log_filename='/tmp/test_logfile.txt')\n",
+    "with open('/tmp/test_logfile.txt', 'r') as f:\n",
+    "    print(f.read())"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "606670f2-3e0a-43c7-a885-006b92fac9d2",
+   "metadata": {},
+   "source": [
+    "To get more useful output we can include a custom_logging snippet (see notebook_custom_logging):"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 6,
+   "id": "e6a23b55-ca42-440d-83ac-e76a24a83a67",
+   "metadata": {
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "['EXAMPLE_MASSLOSS             0.000000000000e+00 1 1 1', 'EXAMPLE_MASSLOSS             0.000000000000e+00 1 1 1', 'EXAMPLE_MASSLOSS             1.000000000000e-06 1 1 1', 'EXAMPLE_MASSLOSS             2.000000000000e-06 1 1 1']\n"
+     ]
+    }
+   ],
+   "source": [
+    "from binarycpython.utils.custom_logging_functions import binary_c_log_code\n",
+    "\n",
+    "# Create the print statement\n",
+    "custom_logging_print_statement = \"\"\"\n",
+    "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %d\\\\n\",\n",
+    "    // \n",
+    "    stardata->model.time, // 1\n",
+    "    stardata->star[0].mass, //2\n",
+    "    stardata->common.zero_age.mass[0], //4\n",
+    "\n",
+    "    stardata->star[0].stellar_type //5\n",
+    ");\n",
+    "\"\"\"\n",
+    "\n",
+    "# Generate entire shared lib code around logging lines\n",
+    "custom_logging_code = binary_c_log_code(custom_logging_print_statement)\n",
+    "\n",
+    "output = run_system(M_1=1, custom_logging_code=custom_logging_code)\n",
+    "print(output.splitlines()[:4])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "4c885143-db79-4fed-b4c4-0bd846e24f7d",
+   "metadata": {},
+   "source": [
+    "Now we have some actual output, it is time to create a parse_function which parses the output. Adding a parse_function to the run_system will make run_system run the output of binary_c through the parse_function."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "3822721f-217a-495b-962e-d57137b9e290",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "[['time', 'mass', 'initial_mass', 'stellar_type'], [0.0, 1.0, 1.0, 1.0], [0.0, 1.0, 1.0, 1.0]]\n"
+     ]
+    }
+   ],
+   "source": [
+    "def parse_function(output):\n",
+    "    \"\"\"\n",
+    "    Example function to parse the output of binary_c\n",
+    "    \"\"\"\n",
+    "\n",
+    "    # \n",
+    "    column_names = ['time', 'mass', 'initial_mass', 'stellar_type']\n",
+    "    value_lines = [column_names]\n",
+    "    \n",
+    "    # Loop over output\n",
+    "    for line in output.splitlines():\n",
+    "        \n",
+    "        # Select the lines starting with the header we chose\n",
+    "        if line.startswith(\"EXAMPLE_MASSLOSS\"):\n",
+    "        \n",
+    "        # Split the output and fetch the data\n",
+    "            split_line = line.split()\n",
+    "            values = [float(el) for el in split_line[1:]]\n",
+    "            value_lines.append(values)\n",
+    "\n",
+    "    return value_lines\n",
+    "\n",
+    "# Catch output\n",
+    "output = run_system(M_1=1, custom_logging_code=custom_logging_code, parse_function=parse_function)\n",
+    "print(output[:3])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "a551f07f-2eff-4425-9375-267579a581b3",
+   "metadata": {},
+   "source": [
+    "This output can now be turned into e.g. an Numpy array or Pandas dataframe (my favorite: makes querying the data very easy)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 8,
+   "id": "654a07ed-2a88-46ff-9da0-b7759580f9f3",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "0        time      mass initial_mass stellar_type\n",
+      "1           0         1            1            1\n",
+      "2           0         1            1            1\n",
+      "3       1e-06         1            1            1\n",
+      "4       2e-06         1            1            1\n",
+      "5       3e-06         1            1            1\n",
+      "...       ...       ...          ...          ...\n",
+      "1612  12461.8  0.577754            1            6\n",
+      "1613    12462  0.522806            1           11\n",
+      "1614    13462  0.522806            1           11\n",
+      "1615    14462  0.522806            1           11\n",
+      "1616    15000  0.522806            1           11\n",
+      "\n",
+      "[1616 rows x 4 columns]\n"
+     ]
+    }
+   ],
+   "source": [
+    "import pandas as pd\n",
+    "\n",
+    "# Load data into dataframe\n",
+    "example_df = pd.DataFrame(output)\n",
+    "\n",
+    "# Fix column headers\n",
+    "example_df.columns = example_df.iloc[0]\n",
+    "example_df = example_df.drop(example_df.index[0])\n",
+    "\n",
+    "print(example_df)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "325c2ce6-f9a1-46b7-937f-84040e1252cf",
+   "metadata": {
+    "tags": []
+   },
+   "source": [
+    "## Single system via population object\n",
+    "When setting up your population object (see notebook_population), and configuring all the parameters, it is possible to run a single system using that same configuration. It will use the parse_function if set, and running a single system is a good method to test if everything works accordingly."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 9,
+   "id": "4a98ffca-1b72-4bb8-8df1-3bf3187d882f",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from binarycpython.utils.grid import Population\n",
+    "# help(Population) # Uncomment to see the docstring"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "7e2c2ef0-3db2-46a6-8c85-9b6cf720eb6a",
+   "metadata": {},
+   "source": [
+    "First, let's try this without any custom logging or parsing functionality"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 10,
+   "id": "bff1cc2e-6b32-4ba0-879f-879ffbabd223",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: M_1=10 to BSE_options\n",
+      "Creating and loading custom logging functionality\n",
+      "Running binary_c M_1 10\n",
+      "Cleaning up the custom logging stuff. type: single\n",
+      "SINGLE_STAR_LIFETIME 10 27.7358\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Create the population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# Set some parameters\n",
+    "example_pop.set(\n",
+    "    verbosity=1\n",
+    ")\n",
+    "example_pop.set(\n",
+    "    M_1=10\n",
+    ")\n",
+    "\n",
+    "# get output and print\n",
+    "output = example_pop.evolve_single()\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ae01fa35-f8b1-4a40-bfb2-b9e872cae0e7",
+   "metadata": {},
+   "source": [
+    "Now lets add some actual output with the custom logging"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 13,
+   "id": "dd748bab-b57e-4129-8350-9ea11fa179d0",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: C_logging_code=\n",
+      "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %g %d\\n\",\n",
+      "    // \n",
+      "    stardata->model.time, // 1\n",
+      "    stardata->star[0].mass, //2\n",
+      "    stardata->previous_stardata->star[0].mass, //3\n",
+      "    stardata->common.zero_age.mass[0], //4\n",
+      "\n",
+      "    stardata->star[0].stellar_type //5\n",
+      ");\n",
+      " to grid_options\n",
+      "Creating and loading custom logging functionality\n",
+      "Running binary_c M_1 10\n",
+      "Cleaning up the custom logging stuff. type: single\n",
+      "Removed /tmp/binary_c_python/custom_logging/libcustom_logging_eac2dfc438a14e5a9f5be98b1b6b4294.so\n",
+      "['EXAMPLE_MASSLOSS             0.000000000000e+00 10 0 10 1', 'EXAMPLE_MASSLOSS             0.000000000000e+00 10 10 10 1', 'EXAMPLE_MASSLOSS             1.000000000000e-06 10 10 10 1', 'EXAMPLE_MASSLOSS             2.000000000000e-06 10 10 10 1']\n"
+     ]
+    }
+   ],
+   "source": [
+    "custom_logging_print_statement = \"\"\"\n",
+    "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %g %d\\\\n\",\n",
+    "    // \n",
+    "    stardata->model.time, // 1\n",
+    "    stardata->star[0].mass, //2\n",
+    "    stardata->previous_stardata->star[0].mass, //3\n",
+    "    stardata->common.zero_age.mass[0], //4\n",
+    "\n",
+    "    stardata->star[0].stellar_type //5\n",
+    ");\n",
+    "\"\"\"   \n",
+    "\n",
+    "example_pop.set(C_logging_code=custom_logging_print_statement)\n",
+    "\n",
+    "# get output and print\n",
+    "output = example_pop.evolve_single()\n",
+    "print(output.splitlines()[:4])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "588a7d9e-9d64-4b3b-8907-656b905286e8",
+   "metadata": {},
+   "source": [
+    "Lastly we can add a parse_function to handle parsing the output again. \n",
+    "\n",
+    "Because the parse_function will now be part of the population object, it can access information of the object. We need to make a new parse function that is fit for an object: we the arguments now need to be (self, output). Returning the data is useful when running evolve_single(), but won't be used in a population evolution."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 14,
+   "id": "fec39154-cce6-438c-8c2c-509d76b00f34",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "import os\n",
+    "import json\n",
+    "import numpy as np\n",
+    "\n",
+    "def object_parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parse function that can be added to the population object\n",
+    "    \"\"\"\n",
+    "\n",
+    "    # We can access object instance information now. \n",
+    "    # In this way we can store the results in a file for example. \n",
+    "    output_file = os.path.join(self.custom_options['output_dir'], 'example_output.json')\n",
+    "    \n",
+    "    # \n",
+    "    column_names = ['time', 'mass', 'initial_mass', 'stellar_type']\n",
+    "    value_lines = [column_names]\n",
+    "    \n",
+    "    # Loop over output\n",
+    "    for line in output.splitlines():\n",
+    "        \n",
+    "        # Select the lines starting with the header we chose\n",
+    "        if line.startswith(\"EXAMPLE_MASSLOSS\"):\n",
+    "        \n",
+    "        # Split the output and fetch the data\n",
+    "            split_line = line.split()\n",
+    "            values = [float(el) for el in split_line[1:]]\n",
+    "            value_lines.append(values)\n",
+    "\n",
+    "    # Turn into an array\n",
+    "    values_array = np.array(value_lines[1:])\n",
+    "    \n",
+    "    # make dict and fill\n",
+    "    output_dict = {}\n",
+    "    for i in range(len(column_names)):\n",
+    "        output_dict[column_names[i]] = list(values_array[:,i])\n",
+    "\n",
+    "    # Write to file\n",
+    "    with open(output_file, 'w') as f:\n",
+    "        f.write(json.dumps(output_dict, indent=4))\n",
+    "        \n",
+    "    # Return something anyway\n",
+    "    return value_lines"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 15,
+   "id": "57347512-fd4a-434b-b13c-5e6dbd3ac415",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: parse_function=<function object_parse_function at 0x7f9265091598> to grid_options\n",
+      "<<<< Warning: Key does not match previously known parameter:                     adding: output_dir=/tmp/ to custom_options >>>>\n",
+      "Creating and loading custom logging functionality\n",
+      "Running binary_c M_1 10\n",
+      "Cleaning up the custom logging stuff. type: single\n",
+      "Removed /tmp/binary_c_python/custom_logging/libcustom_logging_e9c2bec7f15541eb847fc6013e48e7ed.so\n",
+      "[['time', 'mass', 'initial_mass', 'stellar_type'], [0.0, 10.0, 0.0, 10.0, 1.0], [0.0, 10.0, 10.0, 10.0, 1.0], [1e-06, 10.0, 10.0, 10.0, 1.0]]\n",
+      "dict_keys(['time', 'mass', 'initial_mass', 'stellar_type'])\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_pop.set(\n",
+    "    parse_function=object_parse_function,\n",
+    "    output_dir='/tmp/'\n",
+    ")\n",
+    "output = example_pop.evolve_single()\n",
+    "print(output[:4])\n",
+    "\n",
+    "# Example of loading the data that was written\n",
+    "with open(os.path.join(example_pop.custom_options['output_dir'], 'example_output.json')) as f:\n",
+    "    written_data = json.loads(f.read())\n",
+    "\n",
+    "print(written_data.keys())"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ddc06da3-fc68-4c6f-8067-14ea862b964d",
+   "metadata": {},
+   "source": [
+    "## Single system via API functionality\n",
+    "It is possible to construct your own functionality to run a single system by directly calling the API function to run a system. Under the hood all the other functions and wrappers actually use this API.\n",
+    "\n",
+    "There are less failsafes for this method, so this make sure the input is correct and binary_c knows all the arguments you pass in.\n",
+    "\n",
+    "for more details on this API function see `notebook_api_functions`"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "56886792-d379-4eac-b0d4-54508edb39c7",
+   "metadata": {},
+   "source": [
+    "First we must construct the argument string that we pass to binary_c"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 16,
+   "id": "ec48125c-6bf5-48f4-9357-8261800b5d8b",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "SINGLE_STAR_LIFETIME 15 14.2383\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# For a binary system we need to pass in these arguments\n",
+    "M_1 = 15.0  # Msun\n",
+    "M_2 = 14.0  # Msun\n",
+    "separation = 0  # 0 = ignored, use period\n",
+    "orbital_period = 4530.0  # days\n",
+    "eccentricity = 0.0\n",
+    "metallicity = 0.02\n",
+    "max_evolution_time = 15000  # Myr. You need to include this argument.\n",
+    "\n",
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} M_2 {M_2} separation {separation} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=M_1,\n",
+    "    M_2=M_2,\n",
+    "    separation=separation,\n",
+    "    orbital_period=orbital_period,\n",
+    "    eccentricity=eccentricity,\n",
+    "    metallicity=metallicity,\n",
+    "    max_evolution_time=max_evolution_time,\n",
+    ").strip()\n",
+    "\n",
+    "from binarycpython import _binary_c_bindings\n",
+    "\n",
+    "output = _binary_c_bindings.run_system(argstring)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "55c8ea24-0fc0-452c-8121-1e7667433479",
+   "metadata": {},
+   "source": [
+    "As we can see above, the output is rather empty. But if SINGLE_STAR_LIFETIME is printed we know we caught the output correctly. To get actual output we should have timesteps printed in the `log_every_timestep.c` in binary_c, or add some custom_logging (see notebook_custom_logging). "
+   ]
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/build/html/notebook_population.html b/docs/build/html/notebook_population.html
new file mode 100644
index 0000000000000000000000000000000000000000..20d542b9002f305bd88d97a16e9a92e91cb60ef6
--- /dev/null
+++ b/docs/build/html/notebook_population.html
@@ -0,0 +1,1577 @@
+
+
+<!DOCTYPE html>
+<html class="writer-html5" lang="en" >
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Running populations with binarycpython &mdash; binary_c-python  documentation</title>
+  
+
+  
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+
+  
+  
+  
+  
+
+  
+  <!--[if lt IE 9]>
+    <script src="_static/js/html5shiv.min.js"></script>
+  <![endif]-->
+  
+    
+      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
+        <script src="_static/jquery.js"></script>
+        <script src="_static/underscore.js"></script>
+        <script src="_static/doctools.js"></script>
+        <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
+    
+    <script type="text/javascript" src="_static/js/theme.js"></script>
+
+    
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Extra features and functionality of binarycpython" href="notebook_extra_features.html" />
+    <link rel="prev" title="Notebook custom logging" href="notebook_custom_logging.html" /> 
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search" >
+          
+
+          
+            <a href="index.html" class="icon icon-home" alt="Documentation Home"> binary_c-python
+          
+
+          
+          </a>
+
+          
+            
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="readme_link.html">Python module for binary_c</a></li>
+<li class="toctree-l1"><a class="reference internal" href="modules.html">Binarycpython code</a></li>
+<li class="toctree-l1 current"><a class="reference internal" href="example_notebooks.html">Example notebooks</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="notebook_individual_systems.html">Running individual systems with binarycpython</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_custom_logging.html">Notebook custom logging</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Running populations with binarycpython</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="#Setting-up-the-Population-object">Setting up the Population object</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#Adding-grid-variables">Adding grid variables</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#Setting-logging-and-handling-the-output">Setting logging and handling the output</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#Evolving-the-grid">Evolving the grid</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#Noteworthy-functionality">Noteworthy functionality</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#Full-examples-of-population-scripts">Full examples of population scripts</a></li>
+</ul>
+</li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_extra_features.html">Extra features and functionality of binarycpython</a></li>
+<li class="toctree-l2"><a class="reference internal" href="notebook_api_functionality.html">Using the API functionality of binarycpython</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
+<li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
+<li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
+<li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/issues/new">Submit an issue</a></li>
+</ul>
+
+            
+          
+        </div>
+        
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="index.html">binary_c-python</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
+        
+          <li><a href="example_notebooks.html">Example notebooks</a> &raquo;</li>
+        
+      <li>Running populations with binarycpython</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+            
+            <a href="_sources/notebook_population.ipynb.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  
+<style>
+/* CSS for nbsphinx extension */
+
+/* remove conflicting styling from Sphinx themes */
+div.nbinput.container div.prompt *,
+div.nboutput.container div.prompt *,
+div.nbinput.container div.input_area pre,
+div.nboutput.container div.output_area pre,
+div.nbinput.container div.input_area .highlight,
+div.nboutput.container div.output_area .highlight {
+    border: none;
+    padding: 0;
+    margin: 0;
+    box-shadow: none;
+}
+
+div.nbinput.container > div[class*=highlight],
+div.nboutput.container > div[class*=highlight] {
+    margin: 0;
+}
+
+div.nbinput.container div.prompt *,
+div.nboutput.container div.prompt * {
+    background: none;
+}
+
+div.nboutput.container div.output_area .highlight,
+div.nboutput.container div.output_area pre {
+    background: unset;
+}
+
+div.nboutput.container div.output_area div.highlight {
+    color: unset;  /* override Pygments text color */
+}
+
+/* avoid gaps between output lines */
+div.nboutput.container div[class*=highlight] pre {
+    line-height: normal;
+}
+
+/* input/output containers */
+div.nbinput.container,
+div.nboutput.container {
+    display: -webkit-flex;
+    display: flex;
+    align-items: flex-start;
+    margin: 0;
+    width: 100%;
+}
+@media (max-width: 540px) {
+    div.nbinput.container,
+    div.nboutput.container {
+        flex-direction: column;
+    }
+}
+
+/* input container */
+div.nbinput.container {
+    padding-top: 5px;
+}
+
+/* last container */
+div.nblast.container {
+    padding-bottom: 5px;
+}
+
+/* input prompt */
+div.nbinput.container div.prompt pre {
+    color: #307FC1;
+}
+
+/* output prompt */
+div.nboutput.container div.prompt pre {
+    color: #BF5B3D;
+}
+
+/* all prompts */
+div.nbinput.container div.prompt,
+div.nboutput.container div.prompt {
+    width: 4.5ex;
+    padding-top: 5px;
+    position: relative;
+    user-select: none;
+}
+
+div.nbinput.container div.prompt > div,
+div.nboutput.container div.prompt > div {
+    position: absolute;
+    right: 0;
+    margin-right: 0.3ex;
+}
+
+@media (max-width: 540px) {
+    div.nbinput.container div.prompt,
+    div.nboutput.container div.prompt {
+        width: unset;
+        text-align: left;
+        padding: 0.4em;
+    }
+    div.nboutput.container div.prompt.empty {
+        padding: 0;
+    }
+
+    div.nbinput.container div.prompt > div,
+    div.nboutput.container div.prompt > div {
+        position: unset;
+    }
+}
+
+/* disable scrollbars on prompts */
+div.nbinput.container div.prompt pre,
+div.nboutput.container div.prompt pre {
+    overflow: hidden;
+}
+
+/* input/output area */
+div.nbinput.container div.input_area,
+div.nboutput.container div.output_area {
+    -webkit-flex: 1;
+    flex: 1;
+    overflow: auto;
+}
+@media (max-width: 540px) {
+    div.nbinput.container div.input_area,
+    div.nboutput.container div.output_area {
+        width: 100%;
+    }
+}
+
+/* input area */
+div.nbinput.container div.input_area {
+    border: 1px solid #e0e0e0;
+    border-radius: 2px;
+    /*background: #f5f5f5;*/
+}
+
+/* override MathJax center alignment in output cells */
+div.nboutput.container div[class*=MathJax] {
+    text-align: left !important;
+}
+
+/* override sphinx.ext.imgmath center alignment in output cells */
+div.nboutput.container div.math p {
+    text-align: left;
+}
+
+/* standard error */
+div.nboutput.container div.output_area.stderr {
+    background: #fdd;
+}
+
+/* ANSI colors */
+.ansi-black-fg { color: #3E424D; }
+.ansi-black-bg { background-color: #3E424D; }
+.ansi-black-intense-fg { color: #282C36; }
+.ansi-black-intense-bg { background-color: #282C36; }
+.ansi-red-fg { color: #E75C58; }
+.ansi-red-bg { background-color: #E75C58; }
+.ansi-red-intense-fg { color: #B22B31; }
+.ansi-red-intense-bg { background-color: #B22B31; }
+.ansi-green-fg { color: #00A250; }
+.ansi-green-bg { background-color: #00A250; }
+.ansi-green-intense-fg { color: #007427; }
+.ansi-green-intense-bg { background-color: #007427; }
+.ansi-yellow-fg { color: #DDB62B; }
+.ansi-yellow-bg { background-color: #DDB62B; }
+.ansi-yellow-intense-fg { color: #B27D12; }
+.ansi-yellow-intense-bg { background-color: #B27D12; }
+.ansi-blue-fg { color: #208FFB; }
+.ansi-blue-bg { background-color: #208FFB; }
+.ansi-blue-intense-fg { color: #0065CA; }
+.ansi-blue-intense-bg { background-color: #0065CA; }
+.ansi-magenta-fg { color: #D160C4; }
+.ansi-magenta-bg { background-color: #D160C4; }
+.ansi-magenta-intense-fg { color: #A03196; }
+.ansi-magenta-intense-bg { background-color: #A03196; }
+.ansi-cyan-fg { color: #60C6C8; }
+.ansi-cyan-bg { background-color: #60C6C8; }
+.ansi-cyan-intense-fg { color: #258F8F; }
+.ansi-cyan-intense-bg { background-color: #258F8F; }
+.ansi-white-fg { color: #C5C1B4; }
+.ansi-white-bg { background-color: #C5C1B4; }
+.ansi-white-intense-fg { color: #A1A6B2; }
+.ansi-white-intense-bg { background-color: #A1A6B2; }
+
+.ansi-default-inverse-fg { color: #FFFFFF; }
+.ansi-default-inverse-bg { background-color: #000000; }
+
+.ansi-bold { font-weight: bold; }
+.ansi-underline { text-decoration: underline; }
+
+
+div.nbinput.container div.input_area div[class*=highlight] > pre,
+div.nboutput.container div.output_area div[class*=highlight] > pre,
+div.nboutput.container div.output_area div[class*=highlight].math,
+div.nboutput.container div.output_area.rendered_html,
+div.nboutput.container div.output_area > div.output_javascript,
+div.nboutput.container div.output_area:not(.rendered_html) > img{
+    padding: 5px;
+    margin: 0;
+}
+
+/* fix copybtn overflow problem in chromium (needed for 'sphinx_copybutton') */
+div.nbinput.container div.input_area > div[class^='highlight'],
+div.nboutput.container div.output_area > div[class^='highlight']{
+    overflow-y: hidden;
+}
+
+/* hide copybtn icon on prompts (needed for 'sphinx_copybutton') */
+.prompt a.copybtn {
+    display: none;
+}
+
+/* Some additional styling taken form the Jupyter notebook CSS */
+div.rendered_html table {
+  border: none;
+  border-collapse: collapse;
+  border-spacing: 0;
+  color: black;
+  font-size: 12px;
+  table-layout: fixed;
+}
+div.rendered_html thead {
+  border-bottom: 1px solid black;
+  vertical-align: bottom;
+}
+div.rendered_html tr,
+div.rendered_html th,
+div.rendered_html td {
+  text-align: right;
+  vertical-align: middle;
+  padding: 0.5em 0.5em;
+  line-height: normal;
+  white-space: normal;
+  max-width: none;
+  border: none;
+}
+div.rendered_html th {
+  font-weight: bold;
+}
+div.rendered_html tbody tr:nth-child(odd) {
+  background: #f5f5f5;
+}
+div.rendered_html tbody tr:hover {
+  background: rgba(66, 165, 245, 0.2);
+}
+
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="Running-populations-with-binarycpython">
+<h1>Running populations with binarycpython<a class="headerlink" href="#Running-populations-with-binarycpython" title="Permalink to this headline">¶</a></h1>
+<p>This notebook will show you how to evolve a population of stars</p>
+<p>Much of the code in the binarycpython package is written to evolve a population of stars through the Population object, rather than running a single system. Let’s go through the functionality of this object step by step and set up some example populations.</p>
+<p>At the bottom of this notebook there are some complete example scripts</p>
+<div class="nbinput nblast docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="kn">import</span> <span class="nn">os</span>
+<span class="kn">from</span> <span class="nn">binarycpython.utils.custom_logging_functions</span> <span class="kn">import</span> <span class="n">temp_dir</span>
+<span class="kn">from</span> <span class="nn">binarycpython.utils.grid</span> <span class="kn">import</span> <span class="n">Population</span>
+
+<span class="c1"># help(Population) # Uncomment to see the public functions of this object</span>
+</pre></div>
+</div>
+</div>
+<ul class="simple">
+<li><p>running ensemble</p></li>
+<li><p>using M&amp;S grid</p></li>
+</ul>
+<div class="section" id="Setting-up-the-Population-object">
+<h2>Setting up the Population object<a class="headerlink" href="#Setting-up-the-Population-object" title="Permalink to this headline">¶</a></h2>
+<p>To set up and configure the population object we need to make an object instance of the <code class="docutils literal notranslate"><span class="pre">Population</span></code> object, and add configuration via the <code class="docutils literal notranslate"><span class="pre">.set()</span></code> function.</p>
+<p>There are three categories of options that the Population object can set: - BSE options: these options will be used for the binary_c calls, and are recognized by comparing the arguments to a known list of available arguments of binary_c. To see which options are available, see section <code class="docutils literal notranslate"><span class="pre">`binary_c</span> <span class="pre">parameters</span></code> in the documentation &lt;<a class="reference external" href="https://ri0005.pages.surrey.ac.uk/binary_c-python/binary_c_parameters.html">https://ri0005.pages.surrey.ac.uk/binary_c-python/binary_c_parameters.html</a>&gt;`__. You can access these through <code class="docutils literal notranslate"><span class="pre">population.bse_options['&lt;bse</span> <span class="pre">option</span> <span class="pre">name&gt;']</span></code> after
+you have set them.</p>
+<ul class="simple">
+<li><p>Grid options: these options will be used to configure the behaviour of the Population object. To see which options are available, see section <code class="docutils literal notranslate"><span class="pre">`Population</span> <span class="pre">grid</span> <span class="pre">code</span> <span class="pre">options</span></code> in the documentation &lt;<a class="reference external" href="https://ri0005.pages.surrey.ac.uk/binary_c-python/grid_options_descriptions.html">https://ri0005.pages.surrey.ac.uk/binary_c-python/grid_options_descriptions.html</a>&gt;`__. They can be accessed via <code class="docutils literal notranslate"><span class="pre">population.grid_options['&lt;grid</span> <span class="pre">option</span> <span class="pre">name&gt;']</span></code> after you have set them.</p></li>
+<li><p>Custom options: these options are not recognized as either of the above, so they will be stored in the custom_options, and can be accessed via <code class="docutils literal notranslate"><span class="pre">population.custom_options['&lt;custom</span> <span class="pre">option</span> <span class="pre">name&gt;']</span></code></p></li>
+</ul>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[2]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="c1"># Create population object</span>
+<span class="n">example_pop</span> <span class="o">=</span> <span class="n">Population</span><span class="p">()</span>
+
+<span class="c1"># If you want verbosity, set this before other things</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">verbosity</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
+
+<span class="c1"># Setting values can be done via .set(&lt;parameter_name&gt;=&lt;value&gt;)</span>
+<span class="c1"># Values that are known to be binary_c_parameters are loaded into bse_options.</span>
+<span class="c1"># Those that are present in the default grid_options are set in grid_options</span>
+<span class="c1"># All other values that you set are put in a custom_options dict</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+    <span class="c1"># binary_c physics options</span>
+    <span class="n">M_1</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span>  <span class="c1"># bse_options</span>
+    <span class="n">orbital_period</span><span class="o">=</span><span class="mi">45000000080</span><span class="p">,</span>  <span class="c1"># bse_options</span>
+    <span class="n">max_evolution_time</span><span class="o">=</span><span class="mi">15000</span><span class="p">,</span>  <span class="c1"># bse_options</span>
+    <span class="n">eccentricity</span><span class="o">=</span><span class="mf">0.02</span><span class="p">,</span>  <span class="c1"># bse_options</span>
+
+
+    <span class="c1"># grid_options</span>
+    <span class="n">amt_cores</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span>  <span class="c1"># grid_options</span>
+
+    <span class="c1"># Custom options # TODO: need to be set in grid_options probably</span>
+    <span class="n">data_dir</span><span class="o">=</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span>
+        <span class="n">temp_dir</span><span class="p">(),</span> <span class="s2">&quot;example_python_population_result&quot;</span>
+    <span class="p">),</span>  <span class="c1"># custom_options</span>
+    <span class="n">base_filename</span><span class="o">=</span><span class="s2">&quot;example_pop.dat&quot;</span><span class="p">,</span>  <span class="c1"># custom_options</span>
+<span class="p">)</span>
+
+<span class="c1"># We can use the options through</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">example_pop</span><span class="o">.</span><span class="n">grid_options</span><span class="p">[</span><span class="s1">&#39;verbosity&#39;</span><span class="p">])</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">example_pop</span><span class="o">.</span><span class="n">custom_options</span><span class="p">[</span><span class="s1">&#39;base_filename&#39;</span><span class="p">])</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">example_pop</span><span class="o">.</span><span class="n">bse_options</span><span class="p">[</span><span class="s1">&#39;M_1&#39;</span><span class="p">])</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+adding: M_1=10 to BSE_options
+adding: orbital_period=45000000080 to BSE_options
+adding: max_evolution_time=15000 to BSE_options
+adding: eccentricity=0.02 to BSE_options
+adding: amt_cores=2 to grid_options
+&lt;&lt;&lt;&lt; Warning: Key does not match previously known parameter:                     adding: data_dir=/tmp/binary_c_python/example_python_population_result to custom_options &gt;&gt;&gt;&gt;
+&lt;&lt;&lt;&lt; Warning: Key does not match previously known parameter:                     adding: base_filename=example_pop.dat to custom_options &gt;&gt;&gt;&gt;
+1
+example_pop.dat
+10
+</pre></div></div>
+</div>
+<p>After configuring the population, but before running the actual population, its usually a good idea to export the full configuration (including version info of binary_c and all the parameters) to a file. To do this we use <code class="docutils literal notranslate"><span class="pre">example_pop.export_all_info()</span></code>.</p>
+<p>On default this exports everything, each of the sections can be disabled: - population settings (bse_options, grid_options, custom_options), turn off with include_population settings=False - binary_c_defaults (all the commandline arguments that binary c accepts, and their defaults). turn off with include_binary_c_defaults=False - include_binary_c_version_info (all the compilation info, and information about the compiled parameters), turn off with
+include_binary_c_version_info=False - include_binary_c_help_all (all the help information for all the binary_c parameters), turn off with include_binary_c_help_all=Fase</p>
+<p>On default it will write this to the custom_options[‘data_dir’], but that can be overriden by setting use_datadir=False and providing an outfile=&lt;&gt;</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[3]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="n">example_pop</span><span class="o">.</span><span class="n">export_all_info</span><span class="p">()</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+Writing settings to /tmp/binary_c_python/example_python_population_result/example_pop_settings.json
+</pre></div></div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[3]:
+</pre></div>
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+&#39;/tmp/binary_c_python/example_python_population_result/example_pop_settings.json&#39;
+</pre></div></div>
+</div>
+</div>
+<div class="section" id="Adding-grid-variables">
+<h2>Adding grid variables<a class="headerlink" href="#Adding-grid-variables" title="Permalink to this headline">¶</a></h2>
+<p>The main purpose of the Population object is to handle the population synthesis side of running a set of stars. The main method to do this with binarycpython, as is the case with Perl binarygrid, is to use grid variables. These are loops over a predefined range of values, where a probability will be assigned to the systems based on the chosen probability distributions.</p>
+<p>Usually we use either 1 mass grid variable, or a trio of mass, mass ratio and period (See below for full examples of all of these). We can, however, also add grid sampling for e.g. eccentricity, metallicity or other parameters.</p>
+<p>In some cases it could be easier to set up a for loop that sets that parameter and calls the evolve function several times, e.g. when you want to vary a prescription (usually a discrete, unweighted parameter)</p>
+<p>A notable special type of grid variable is that of the Moe &amp; di Stefano 2017 dataset (see further down in the notebook).</p>
+<p>To add a grid variable to the population object we use <code class="docutils literal notranslate"><span class="pre">example_pop.add_grid_variable</span></code> (see next cell)</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[4]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="n">help</span><span class="p">(</span><span class="n">example_pop</span><span class="o">.</span><span class="n">add_grid_variable</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+Help on method add_grid_variable in module binarycpython.utils.grid:
+
+add_grid_variable(name:str, longname:str, valuerange:Union[list, str], resolution:str, spacingfunc:str, probdist:str, dphasevol:Union[str, int], parameter_name:str, gridtype:str=&#39;edge&#39;, branchpoint:int=0, precode:Union[str, NoneType]=None, condition:Union[str, NoneType]=None) -&gt; None method of binarycpython.utils.grid.Population instance
+    Function to add grid variables to the grid_options.
+
+    The execution of the grid generation will be through a nested for loop.
+    Each of the grid variables will get create a deeper for loop.
+
+    The real function that generates the numbers will get written to a new file in the TMP_DIR,
+    and then loaded imported and evaluated.
+    beware that if you insert some destructive piece of code, it will be executed anyway.
+    Use at own risk.
+
+    Tasks:
+        - TODO: Fix this complex function.
+
+    Args:
+        name:
+            name of parameter. This is evaluated as a parameter and you can use it throughout
+            the rest of the function
+
+            Examples:
+                name = &#39;lnm1&#39;
+        longname:
+            Long name of parameter
+
+            Examples:
+                longname = &#39;Primary mass&#39;
+        range:
+            Range of values to take. Does not get used really, the spacingfunction is used to
+            get the values from
+
+            Examples:
+                range = [math.log(m_min), math.log(m_max)]
+        resolution:
+            Resolution of the sampled range (amount of samples).
+            TODO: check if this is used anywhere
+
+            Examples:
+                resolution = resolution[&#34;M_1&#34;]
+        spacingfunction:
+            Function determining how the range is sampled. You can either use a real function,
+            or a string representation of a function call. Will get written to a file and
+            then evaluated.
+
+            Examples:
+                spacingfunction = &#34;const(math.log(m_min), math.log(m_max), {})&#34;.format(resolution[&#39;M_1&#39;])
+
+        precode:
+            Extra room for some code. This code will be evaluated within the loop of the
+            sampling function (i.e. a value for lnm1 is chosen already)
+
+            Examples:
+                precode = &#39;M_1=math.exp(lnm1);&#39;
+        probdist:
+            Function determining the probability that gets assigned to the sampled parameter
+
+            Examples:
+                probdist = &#39;Kroupa2001(M_1)*M_1&#39;
+        dphasevol:
+            part of the parameter space that the total probability is calculated with. Put to -1
+            if you want to ignore any dphasevol calculations and set the value to 1
+            Examples:
+                dphasevol = &#39;dlnm1&#39;
+        condition:
+            condition that has to be met in order for the grid generation to continue
+            Examples:
+                condition = &#39;self.grid_options[&#39;binary&#39;]==1&#39;
+        gridtype:
+            Method on how the value range is sampled. Can be either &#39;edge&#39; (steps starting at
+            the lower edge of the value range) or &#39;center&#39;
+            (steps starting at lower edge + 0.5 * stepsize).
+
+</pre></div></div>
+</div>
+<p>All the distribution functions that we can use are stored in the <code class="docutils literal notranslate"><span class="pre">binarycpython.utils.distribution_functions</span></code> or <code class="docutils literal notranslate"><span class="pre">binarycpython/utils/distribution_functions.py</span></code> on git. If you uncomment the help statement below you can see which functions are available now:</p>
+<div class="nbinput nblast docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[5]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="c1"># import binarycpython.utils.distribution_functions</span>
+<span class="c1"># help(binarycpython.utils.distribution_functions)</span>
+</pre></div>
+</div>
+</div>
+<p>The next cell contains an example of adding the mass grid variable, but sampling in log mass. The commented grid variables are examples of the mass ratio sampling and the period sampling.</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[6]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="c1"># Add grid variables</span>
+<span class="n">resolution</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;M_1&quot;</span><span class="p">:</span> <span class="mi">20</span><span class="p">,</span> <span class="s2">&quot;q&quot;</span><span class="p">:</span> <span class="mi">20</span><span class="p">,</span> <span class="s2">&quot;per&quot;</span><span class="p">:</span> <span class="mi">40</span><span class="p">}</span>
+
+<span class="c1"># Mass</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">add_grid_variable</span><span class="p">(</span>
+    <span class="n">name</span><span class="o">=</span><span class="s2">&quot;lnm1&quot;</span><span class="p">,</span>
+    <span class="n">longname</span><span class="o">=</span><span class="s2">&quot;Primary mass&quot;</span><span class="p">,</span>
+    <span class="n">valuerange</span><span class="o">=</span><span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">150</span><span class="p">],</span>
+    <span class="n">resolution</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">resolution</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">]),</span>
+    <span class="n">spacingfunc</span><span class="o">=</span><span class="s2">&quot;const(math.log(2), math.log(150), </span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">resolution</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">]),</span>
+    <span class="n">precode</span><span class="o">=</span><span class="s2">&quot;M_1=math.exp(lnm1)&quot;</span><span class="p">,</span>
+    <span class="n">probdist</span><span class="o">=</span><span class="s2">&quot;three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1&quot;</span><span class="p">,</span>
+    <span class="n">dphasevol</span><span class="o">=</span><span class="s2">&quot;dlnm1&quot;</span><span class="p">,</span>
+    <span class="n">parameter_name</span><span class="o">=</span><span class="s2">&quot;M_1&quot;</span><span class="p">,</span>
+    <span class="n">condition</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span>  <span class="c1"># Impose a condition on this grid variable. Mostly for a check for yourself</span>
+<span class="p">)</span>
+
+<span class="c1"># # Mass ratio</span>
+<span class="c1"># test_pop.add_grid_variable(</span>
+<span class="c1">#     name=&quot;q&quot;,</span>
+<span class="c1">#     longname=&quot;Mass ratio&quot;,</span>
+<span class="c1">#     valuerange=[&quot;0.1/M_1&quot;, 1],</span>
+<span class="c1">#     resolution=&quot;{}&quot;.format(resolution[&#39;q&#39;]),</span>
+<span class="c1">#     spacingfunc=&quot;const(0.1/M_1, 1, {})&quot;.format(resolution[&#39;q&#39;]),</span>
+<span class="c1">#     probdist=&quot;flatsections(q, [{&#39;min&#39;: 0.1/M_1, &#39;max&#39;: 1.0, &#39;height&#39;: 1}])&quot;,</span>
+<span class="c1">#     dphasevol=&quot;dq&quot;,</span>
+<span class="c1">#     precode=&quot;M_2 = q * M_1&quot;,</span>
+<span class="c1">#     parameter_name=&quot;M_2&quot;,</span>
+<span class="c1">#     condition=&quot;&quot;,  # Impose a condition on this grid variable. Mostly for a check for yourself</span>
+<span class="c1"># )</span>
+
+<span class="c1"># #</span>
+<span class="c1"># test_pop.add_grid_variable(</span>
+<span class="c1">#    name=&quot;log10per&quot;, # in days</span>
+<span class="c1">#    longname=&quot;log10(Orbital_Period)&quot;,</span>
+<span class="c1">#    valuerange=[0.15, 5.5],</span>
+<span class="c1">#    resolution=&quot;{}&quot;.format(resolution[&quot;per&quot;]),</span>
+<span class="c1">#    spacingfunc=&quot;const(0.15, 5.5, {})&quot;.format(resolution[&quot;per&quot;]),</span>
+<span class="c1">#    precode=&quot;&quot;&quot;orbital_period = 10** log10per</span>
+<span class="c1"># sep = calc_sep_from_period(M_1, M_2, orbital_period)</span>
+<span class="c1"># sep_min = calc_sep_from_period(M_1, M_2, 10**0.15)</span>
+<span class="c1"># sep_max = calc_sep_from_period(M_1, M_2, 10**5.5)&quot;&quot;&quot;,</span>
+<span class="c1">#    probdist=&quot;sana12(M_1, M_2, sep, orbital_period, sep_min, sep_max, math.log10(10**0.15), math.log10(10**5.5), -0.55)&quot;,</span>
+<span class="c1">#    parameter_name=&quot;orbital_period&quot;,</span>
+<span class="c1">#    dphasevol=&quot;dlog10per&quot;,</span>
+<span class="c1"># )</span>
+
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+Added grid variable: {
+    &#34;name&#34;: &#34;lnm1&#34;,
+    &#34;longname&#34;: &#34;Primary mass&#34;,
+    &#34;valuerange&#34;: [
+        2,
+        150
+    ],
+    &#34;resolution&#34;: &#34;20&#34;,
+    &#34;spacingfunc&#34;: &#34;const(math.log(2), math.log(150), 20)&#34;,
+    &#34;precode&#34;: &#34;M_1=math.exp(lnm1)&#34;,
+    &#34;probdist&#34;: &#34;three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1&#34;,
+    &#34;dphasevol&#34;: &#34;dlnm1&#34;,
+    &#34;parameter_name&#34;: &#34;M_1&#34;,
+    &#34;condition&#34;: &#34;&#34;,
+    &#34;gridtype&#34;: &#34;edge&#34;,
+    &#34;branchpoint&#34;: 0,
+    &#34;grid_variable_number&#34;: 0
+}
+</pre></div></div>
+</div>
+</div>
+<div class="section" id="Setting-logging-and-handling-the-output">
+<h2>Setting logging and handling the output<a class="headerlink" href="#Setting-logging-and-handling-the-output" title="Permalink to this headline">¶</a></h2>
+<p>On default, binary_c will not output anything (except for ‘SINGLE STAR LIFETIME’). It is up to us to determine what will be printed. We can either do that by hardcoding the print statements into <code class="docutils literal notranslate"><span class="pre">binary_c</span></code> (see documentation binary_c). Or, we can use the custom logging functionality of binarycpython (see notebook <code class="docutils literal notranslate"><span class="pre">notebook_custom_logging.ipynb</span></code>), which is faster to set up and requires no recompilation of binary_c, but is somewhat more limited in its functionality.</p>
+<p>After configuring what will be printed, we need to make a function to parse the output. This can be done by setting the parse_function parameter in the population object (see also notebook <code class="docutils literal notranslate"><span class="pre">notebook_individual_systems.ipynb</span></code>).</p>
+<p>In the code below we will set up both the custom logging, and a parse function to handle that output</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[7]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="c1"># Create custom logging statement: in this case we will log when the star turns into a compact object, and then terminate the evolution.</span>
+<span class="n">custom_logging_statement</span> <span class="o">=</span> <span class="s2">&quot;&quot;&quot;</span>
+<span class="s2">if(stardata-&gt;star[0].stellar_type &gt;= 13)</span>
+<span class="s2">{</span>
+<span class="s2">    if (stardata-&gt;model.time &lt; stardata-&gt;model.max_evolution_time)</span>
+<span class="s2">    {</span>
+<span class="s2">        Printf(&quot;EXAMPLE_COMPACT_OBJECT </span><span class="si">%30.12e</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%d</span><span class="se">\\</span><span class="s2">n&quot;,</span>
+<span class="s2">            //</span>
+<span class="s2">            stardata-&gt;model.time, // 1</span>
+<span class="s2">            stardata-&gt;star[0].mass, // 2</span>
+<span class="s2">            stardata-&gt;common.zero_age.mass[0], // 3</span>
+<span class="s2">            stardata-&gt;model.probability, // 4</span>
+<span class="s2">            stardata-&gt;star[0].stellar_type // 5</span>
+<span class="s2">      );</span>
+<span class="s2">    };</span>
+<span class="s2">    /* Kill the simulation to save time */</span>
+<span class="s2">    stardata-&gt;model.max_evolution_time = stardata-&gt;model.time - stardata-&gt;model.dtm;</span>
+<span class="s2">};</span>
+<span class="s2">&quot;&quot;&quot;</span>
+
+<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+    <span class="n">C_logging_code</span><span class="o">=</span><span class="n">custom_logging_statement</span>
+<span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+adding: C_logging_code=
+if(stardata-&gt;star[0].stellar_type &gt;= 13)
+{
+    if (stardata-&gt;model.time &lt; stardata-&gt;model.max_evolution_time)
+    {
+        Printf(&#34;EXAMPLE_COMPACT_OBJECT %30.12e %g %g %g %d\n&#34;,
+            //
+            stardata-&gt;model.time, // 1
+            stardata-&gt;star[0].mass, // 2
+            stardata-&gt;common.zero_age.mass[0], // 3
+            stardata-&gt;model.probability, // 4
+            stardata-&gt;star[0].stellar_type // 5
+      );
+    };
+    /* Kill the simulation to save time */
+    stardata-&gt;model.max_evolution_time = stardata-&gt;model.time - stardata-&gt;model.dtm;
+};
+ to grid_options
+</pre></div></div>
+</div>
+<p>The parse function must now catch lines that start with “EXAMPLE_COMPACT_OBJECT”, and write that line to a file</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[8]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="k">def</span> <span class="nf">parse_function</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">output</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">    Example parse function</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+
+    <span class="c1"># get info from the population instance</span>
+    <span class="n">data_dir</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">custom_options</span><span class="p">[</span><span class="s2">&quot;data_dir&quot;</span><span class="p">]</span>
+    <span class="n">base_filename</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">custom_options</span><span class="p">[</span><span class="s2">&quot;base_filename&quot;</span><span class="p">]</span>
+
+    <span class="c1"># Check directory, make if necessary</span>
+    <span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="n">data_dir</span><span class="p">,</span> <span class="n">exist_ok</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+
+    <span class="n">seperator</span> <span class="o">=</span> <span class="s2">&quot; &quot;</span>
+
+    <span class="c1"># Create filename</span>
+    <span class="n">outfilename</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">data_dir</span><span class="p">,</span> <span class="n">base_filename</span><span class="p">)</span>
+
+    <span class="n">parameters</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;time&quot;</span><span class="p">,</span> <span class="s2">&quot;mass&quot;</span><span class="p">,</span> <span class="s2">&quot;zams_mass&quot;</span><span class="p">,</span> <span class="s2">&quot;probability&quot;</span><span class="p">,</span> <span class="s2">&quot;stellar_type&quot;</span><span class="p">]</span>
+
+    <span class="c1"># Go over the output.</span>
+    <span class="k">for</span> <span class="n">line</span> <span class="ow">in</span> <span class="n">output</span><span class="o">.</span><span class="n">splitlines</span><span class="p">():</span>
+        <span class="n">headerline</span> <span class="o">=</span> <span class="n">line</span><span class="o">.</span><span class="n">split</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span>
+
+        <span class="c1"># CHeck the header and act accordingly</span>
+        <span class="k">if</span> <span class="n">headerline</span> <span class="o">==</span> <span class="s2">&quot;EXAMPLE_COMPACT_OBJECT&quot;</span><span class="p">:</span>
+            <span class="n">values</span> <span class="o">=</span> <span class="n">line</span><span class="o">.</span><span class="n">split</span><span class="p">()[</span><span class="mi">1</span><span class="p">:]</span>
+            <span class="nb">print</span><span class="p">(</span><span class="n">line</span><span class="p">)</span>
+
+            <span class="k">if</span> <span class="ow">not</span> <span class="nb">len</span><span class="p">(</span><span class="n">parameters</span><span class="p">)</span> <span class="o">==</span> <span class="nb">len</span><span class="p">(</span><span class="n">values</span><span class="p">):</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Amount of column names isnt equal to amount of columns&quot;</span><span class="p">)</span>
+                <span class="k">raise</span> <span class="ne">ValueError</span>
+
+            <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">outfilename</span><span class="p">):</span>
+                <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">outfilename</span><span class="p">,</span> <span class="s2">&quot;w&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+                    <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">seperator</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">parameters</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>
+
+            <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">outfilename</span><span class="p">,</span> <span class="s2">&quot;a&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+                <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">seperator</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">values</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>
+
+<span class="c1"># Add the parsing function</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+    <span class="n">parse_function</span><span class="o">=</span><span class="n">parse_function</span><span class="p">,</span>
+<span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+adding: parse_function=&lt;function parse_function at 0x7ff3bdf79620&gt; to grid_options
+</pre></div></div>
+</div>
+</div>
+<div class="section" id="Evolving-the-grid">
+<h2>Evolving the grid<a class="headerlink" href="#Evolving-the-grid" title="Permalink to this headline">¶</a></h2>
+<p>Now that we configured all the main parts of the population object, we can actually run the population! Doing this is straightforward: <code class="docutils literal notranslate"><span class="pre">example_pop.evolve()</span></code></p>
+<p>This will start up the processing of all the systems. We can control how many cores are used by settings <code class="docutils literal notranslate"><span class="pre">amt_cores</span></code>. By setting the <code class="docutils literal notranslate"><span class="pre">verbosity</span></code> of the population object to a higher value we can get a lot of verbose information about the run, but for now we will set it to 0.</p>
+<p>There are many grid_options that can lead to different behaviour of the evolution of the grid. Please do have a look at those: <a class="reference external" href="https://ri0005.pages.surrey.ac.uk/binary_c-python/grid_options_descriptions.html">grid options docs</a>, and try</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[9]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="c1"># change verbosity</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">verbosity</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
+
+<span class="c1">## Executing a population</span>
+<span class="c1">## This uses the values generated by the grid_variables</span>
+<span class="n">analytics</span> <span class="o">=</span> <span class="n">example_pop</span><span class="o">.</span><span class="n">evolve</span><span class="p">()</span>  <span class="c1"># TODO: update this function call</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+adding: verbosity=0 to grid_options
+Generating grid code
+Constructing/adding: lnm1
+Grid has handled 20 stars
+with a total probability of 0.05150046619238192
+Total starcount for this run will be: 20
+EXAMPLE_COMPACT_OBJECT             2.867655467480e+01 1.33079 9.81391 0.00167028 13
+Generating grid code
+Constructing/adding: lnm1
+EXAMPLE_COMPACT_OBJECT             1.931266944719e+01 1.3933 12.3177 0.00124307 13
+EXAMPLE_COMPACT_OBJECT             4.439623364590e+01 1.38004 7.81906 0.00224431 13
+EXAMPLE_COMPACT_OBJECT             1.364277535630e+01 1.47961 15.4603 0.000925128 13
+EXAMPLE_COMPACT_OBJECT             1.017435498578e+01 1.59052 19.4046 0.000688507 13
+EXAMPLE_COMPACT_OBJECT             8.294870923827e+00 1.7197 24.3552 0.000512406 13
+EXAMPLE_COMPACT_OBJECT             6.802132608769e+00 1.84162 30.5689 0.000381347 13
+EXAMPLE_COMPACT_OBJECT             5.723570798020e+00 1.99471 38.3678 0.00028381 13
+EXAMPLE_COMPACT_OBJECT             4.933751523833e+00 2.15875 48.1564 0.000211219 13
+EXAMPLE_COMPACT_OBJECT             4.337250536639e+00 2.35209 60.4424 0.000157195 14
+EXAMPLE_COMPACT_OBJECT             3.862081089332e+00 2.56776 75.8628 0.000116989 14
+EXAMPLE_COMPACT_OBJECT             3.449960890183e+00 2.80457 95.2174 8.70668e-05 14
+EXAMPLE_COMPACT_OBJECT             3.172196856333e+00 3.05193 119.51 6.47976e-05 14
+EXAMPLE_COMPACT_OBJECT             3.069627290216e+00 3.27563 150 4.82242e-05 14
+Population-2a7732d03e594ef4b5dfe9051b41d9c0 finished! The total probability was: 0.05150046619238191. It took a total of 0.7797017097473145s to run 20 systems on 2 cores
+There were no errors found in this run.
+</pre></div></div>
+</div>
+<p>After the run is complete, some technical report on the run is returned. I stored that in <code class="docutils literal notranslate"><span class="pre">analytics</span></code>. As we can see below, this dictionary is like a status report of the evolution. Useful for e.g. debugging.</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[10]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="nb">print</span><span class="p">(</span><span class="n">analytics</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+{&#39;population_name&#39;: &#39;2a7732d03e594ef4b5dfe9051b41d9c0&#39;, &#39;evolution_type&#39;: &#39;grid&#39;, &#39;failed_count&#39;: 0, &#39;failed_prob&#39;: 0, &#39;failed_systems_error_codes&#39;: [], &#39;errors_exceeded&#39;: False, &#39;errors_found&#39;: False, &#39;total_probability&#39;: 0.05150046619238191, &#39;total_count&#39;: 20, &#39;start_timestamp&#39;: 1628444120.234709, &#39;end_timestamp&#39;: 1628444121.0144107, &#39;total_mass_run&#39;: 730.1048014407228, &#39;total_probability_weighted_mass_run&#39;: 0.2983275843337705, &#39;zero_prob_stars_skipped&#39;: 0}
+</pre></div></div>
+</div>
+</div>
+<div class="section" id="Noteworthy-functionality">
+<h2>Noteworthy functionality<a class="headerlink" href="#Noteworthy-functionality" title="Permalink to this headline">¶</a></h2>
+<p>Some extra features that are available from via the population object are: - write_binary_c_calls_to_file: Function to write the calls that would be passed to binary_c to a file</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[11]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="n">help</span><span class="p">(</span><span class="n">example_pop</span><span class="o">.</span><span class="n">write_binary_c_calls_to_file</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+Help on method write_binary_c_calls_to_file in module binarycpython.utils.grid:
+
+write_binary_c_calls_to_file(output_dir:Union[str, NoneType]=None, output_filename:Union[str, NoneType]=None, include_defaults:bool=False) -&gt; None method of binarycpython.utils.grid.Population instance
+    Function that loops over the grid code and writes the generated parameters to a file.
+    In the form of a command line call
+
+    Only useful when you have a variable grid as system_generator. MC wouldn&#39;t be that useful
+
+    Also, make sure that in this export there are the basic parameters
+    like m1,m2,sep, orb-per, ecc, probability etc.
+
+    On default this will write to the datadir, if it exists
+
+    Tasks:
+        - TODO: test this function
+        - TODO: make sure the binary_c_python .. output file has a unique name
+
+    Args:
+        output_dir: (optional, default = None) directory where to write the file to. If custom_options[&#39;data_dir&#39;] is present, then that one will be used first, and then the output_dir
+        output_filename: (optional, default = None) filename of the output. If not set it will be called &#34;binary_c_calls.txt&#34;
+        include_defaults: (optional, default = None) whether to include the defaults of binary_c in the lines that are written. Beware that this will result in very long lines, and it might be better to just export the binary_c defaults and keep them in a separate file.
+
+    Returns:
+        filename: filename that was used to write the calls to
+
+</pre></div></div>
+</div>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[12]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">verbosity</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
+<span class="n">calls_filename</span> <span class="o">=</span> <span class="n">example_pop</span><span class="o">.</span><span class="n">write_binary_c_calls_to_file</span><span class="p">()</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">calls_filename</span><span class="p">)</span>
+
+<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">calls_filename</span><span class="p">,</span> <span class="s1">&#39;r&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+    <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">()</span><span class="o">.</span><span class="n">splitlines</span><span class="p">()[:</span><span class="mi">4</span><span class="p">]))</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+Generating grid code
+Generating grid code
+Constructing/adding: lnm1
+Saving grid code to grid_options
+Writing grid code to /tmp/binary_c_python/binary_c_grid_2a7732d03e594ef4b5dfe9051b41d9c0.py
+Loading grid code function from /tmp/binary_c_python/binary_c_grid_2a7732d03e594ef4b5dfe9051b41d9c0.py
+Grid code loaded
+Writing binary_c calls to /tmp/binary_c_python/example_python_population_result/binary_c_calls.txt
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.
+Grid has handled 20 stars
+with a total probability of 0.05150046619238192
+/tmp/binary_c_python/example_python_population_result/binary_c_calls.txt
+binary_c M_1 2.0 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.013208238029791246
+binary_c M_1 2.5102526289471614 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.009829948023831718
+binary_c M_1 3.1506841305680684 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.0073157281034221516
+binary_c M_1 3.9545065608702976 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.005444573822104362
+</pre></div></div>
+</div>
+</div>
+<div class="section" id="Full-examples-of-population-scripts">
+<h2>Full examples of population scripts<a class="headerlink" href="#Full-examples-of-population-scripts" title="Permalink to this headline">¶</a></h2>
+<p>Below is a full setup for a population of single stars</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[13]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="kn">import</span> <span class="nn">os</span>
+
+<span class="kn">from</span> <span class="nn">binarycpython.utils.grid</span> <span class="kn">import</span> <span class="n">Population</span>
+<span class="kn">from</span> <span class="nn">binarycpython.utils.custom_logging_functions</span> <span class="kn">import</span> <span class="n">temp_dir</span>
+
+<span class="k">def</span> <span class="nf">parse_function</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">output</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">    Example parsing function</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+
+    <span class="c1"># extract info from the population instance</span>
+
+    <span class="c1"># Get some information from the</span>
+    <span class="n">data_dir</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">custom_options</span><span class="p">[</span><span class="s2">&quot;data_dir&quot;</span><span class="p">]</span>
+    <span class="n">base_filename</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">custom_options</span><span class="p">[</span><span class="s2">&quot;base_filename&quot;</span><span class="p">]</span>
+
+    <span class="c1"># Check directory, make if necessary</span>
+    <span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="n">data_dir</span><span class="p">,</span> <span class="n">exist_ok</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+
+    <span class="c1">#</span>
+    <span class="n">seperator</span> <span class="o">=</span> <span class="s2">&quot; &quot;</span>
+
+    <span class="c1"># Create filename</span>
+    <span class="n">outfilename</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">data_dir</span><span class="p">,</span> <span class="n">base_filename</span><span class="p">)</span>
+
+    <span class="c1"># The header columns matching this</span>
+    <span class="n">parameters</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;time&quot;</span><span class="p">,</span> <span class="s2">&quot;mass&quot;</span><span class="p">,</span> <span class="s2">&quot;zams_mass&quot;</span><span class="p">,</span> <span class="s2">&quot;probability&quot;</span><span class="p">,</span> <span class="s2">&quot;radius&quot;</span><span class="p">,</span> <span class="s2">&quot;stellar_type&quot;</span><span class="p">]</span>
+
+    <span class="c1"># Go over the output.</span>
+    <span class="k">for</span> <span class="n">el</span> <span class="ow">in</span> <span class="n">output</span><span class="o">.</span><span class="n">splitlines</span><span class="p">():</span>
+        <span class="n">headerline</span> <span class="o">=</span> <span class="n">el</span><span class="o">.</span><span class="n">split</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span>
+
+        <span class="c1"># CHeck the header and act accordingly</span>
+        <span class="k">if</span> <span class="n">headerline</span> <span class="o">==</span> <span class="s2">&quot;MY_STELLAR_DATA&quot;</span><span class="p">:</span>
+            <span class="n">values</span> <span class="o">=</span> <span class="n">el</span><span class="o">.</span><span class="n">split</span><span class="p">()[</span><span class="mi">1</span><span class="p">:]</span>
+
+            <span class="k">if</span> <span class="ow">not</span> <span class="nb">len</span><span class="p">(</span><span class="n">parameters</span><span class="p">)</span> <span class="o">==</span> <span class="nb">len</span><span class="p">(</span><span class="n">values</span><span class="p">):</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Amount of column names isnt equal to amount of columns&quot;</span><span class="p">)</span>
+                <span class="k">raise</span> <span class="ne">ValueError</span>
+
+            <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">outfilename</span><span class="p">):</span>
+                <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">outfilename</span><span class="p">,</span> <span class="s2">&quot;w&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+                    <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">seperator</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">parameters</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>
+
+            <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">outfilename</span><span class="p">,</span> <span class="s2">&quot;a&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+                <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">seperator</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">values</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>
+
+
+<span class="c1"># Create population object</span>
+<span class="n">example_pop</span> <span class="o">=</span> <span class="n">Population</span><span class="p">()</span>
+
+<span class="c1"># If you want verbosity, set this before other things</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">verbosity</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
+
+<span class="c1"># Setting values can be done via .set(&lt;parameter_name&gt;=&lt;value&gt;)</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+    <span class="c1"># binary_c physics options</span>
+    <span class="n">M_1</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span>  <span class="c1"># bse_options</span>
+    <span class="n">separation</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span>  <span class="c1"># bse_options</span>
+    <span class="n">orbital_period</span><span class="o">=</span><span class="mi">45000000080</span><span class="p">,</span>  <span class="c1"># bse_options</span>
+    <span class="n">max_evolution_time</span><span class="o">=</span><span class="mi">15000</span><span class="p">,</span>  <span class="c1"># bse_options</span>
+    <span class="n">eccentricity</span><span class="o">=</span><span class="mf">0.02</span><span class="p">,</span>  <span class="c1"># bse_options</span>
+
+    <span class="c1"># grid_options</span>
+    <span class="n">amt_cores</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span>  <span class="c1"># grid_options</span>
+
+    <span class="c1"># Custom options: the data directory and the output filename</span>
+    <span class="n">data_dir</span><span class="o">=</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span>
+        <span class="n">temp_dir</span><span class="p">(),</span> <span class="s2">&quot;example_python_population_result&quot;</span>
+    <span class="p">),</span>  <span class="c1"># custom_options</span>
+    <span class="n">base_filename</span><span class="o">=</span><span class="s2">&quot;example_pop.dat&quot;</span><span class="p">,</span>  <span class="c1"># custom_options</span>
+<span class="p">)</span>
+
+<span class="c1"># Creating a parsing function</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+    <span class="n">parse_function</span><span class="o">=</span><span class="n">parse_function</span><span class="p">,</span>  <span class="c1"># Setting the parse function thats used in the evolve_population</span>
+<span class="p">)</span>
+
+<span class="c1">### Custom logging</span>
+<span class="c1"># Log the moment when the star turns into neutron</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+    <span class="n">C_logging_code</span><span class="o">=</span><span class="s2">&quot;&quot;&quot;</span>
+<span class="s2">if(stardata-&gt;star[0].stellar_type &gt;= 13)</span>
+<span class="s2">{</span>
+<span class="s2">    if (stardata-&gt;model.time &lt; stardata-&gt;model.max_evolution_time)</span>
+<span class="s2">    {</span>
+<span class="s2">        Printf(&quot;MY_STELLAR_DATA </span><span class="si">%30.12e</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%d</span><span class="se">\\</span><span class="s2">n&quot;,</span>
+<span class="s2">            //</span>
+<span class="s2">            stardata-&gt;model.time, // 1</span>
+<span class="s2">            stardata-&gt;star[0].mass, // 2</span>
+<span class="s2">            stardata-&gt;common.zero_age.mass[0], // 4</span>
+<span class="s2">            stardata-&gt;model.probability, // 5</span>
+<span class="s2">            stardata-&gt;star[0].radius, // 6</span>
+<span class="s2">            stardata-&gt;star[0].stellar_type // 7</span>
+<span class="s2">      );</span>
+<span class="s2">    };</span>
+<span class="s2">    /* Kill the simulation to save time */</span>
+<span class="s2">    stardata-&gt;model.max_evolution_time = stardata-&gt;model.time - stardata-&gt;model.dtm;</span>
+<span class="s2">};</span>
+<span class="s2">&quot;&quot;&quot;</span>
+<span class="p">)</span>
+
+<span class="c1"># Add grid variables</span>
+<span class="n">resolution</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;M_1&quot;</span><span class="p">:</span> <span class="mi">20</span><span class="p">}</span>
+
+<span class="c1"># Mass</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">add_grid_variable</span><span class="p">(</span>
+    <span class="n">name</span><span class="o">=</span><span class="s2">&quot;lnm1&quot;</span><span class="p">,</span>
+    <span class="n">longname</span><span class="o">=</span><span class="s2">&quot;Primary mass&quot;</span><span class="p">,</span>
+    <span class="n">valuerange</span><span class="o">=</span><span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">150</span><span class="p">],</span>
+    <span class="n">resolution</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">resolution</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">]),</span>
+    <span class="n">spacingfunc</span><span class="o">=</span><span class="s2">&quot;const(math.log(2), math.log(150), </span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">resolution</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">]),</span>
+    <span class="n">precode</span><span class="o">=</span><span class="s2">&quot;M_1=math.exp(lnm1)&quot;</span><span class="p">,</span>
+    <span class="n">probdist</span><span class="o">=</span><span class="s2">&quot;three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1&quot;</span><span class="p">,</span>
+    <span class="n">dphasevol</span><span class="o">=</span><span class="s2">&quot;dlnm1&quot;</span><span class="p">,</span>
+    <span class="n">parameter_name</span><span class="o">=</span><span class="s2">&quot;M_1&quot;</span><span class="p">,</span>
+    <span class="n">condition</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span>
+<span class="p">)</span>
+
+<span class="c1"># Exporting of all the settings can be done with .export_all_info()</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">export_all_info</span><span class="p">()</span>
+
+<span class="c1"># remove the result file if it exists</span>
+<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">temp_dir</span><span class="p">(),</span> <span class="s2">&quot;example_python_population_result&quot;</span><span class="p">,</span> <span class="s2">&quot;example_pop.dat&quot;</span><span class="p">)):</span>
+    <span class="n">os</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">temp_dir</span><span class="p">(),</span> <span class="s2">&quot;example_python_population_result&quot;</span><span class="p">,</span> <span class="s2">&quot;example_pop.dat&quot;</span><span class="p">))</span>
+
+
+<span class="c1"># Evolve the population</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">evolve</span><span class="p">()</span>
+
+<span class="c1">#</span>
+<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">temp_dir</span><span class="p">(),</span> <span class="s2">&quot;example_python_population_result&quot;</span><span class="p">,</span> <span class="s2">&quot;example_pop.dat&quot;</span><span class="p">),</span> <span class="s1">&#39;r&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+    <span class="n">output</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
+<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">output</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+Generating grid code
+Constructing/adding: lnm1
+Grid has handled 20 stars
+with a total probability of 0.05150046619238192
+Total starcount for this run will be: 20
+Generating grid code
+Constructing/adding: lnm1
+Population-3680f3882c0a449c944462abffea2447 finished! The total probability was: 0.05150046619238191. It took a total of 0.6246354579925537s to run 20 systems on 2 cores
+There were no errors found in this run.
+
+
+time mass zams_mass probability radius stellar_type
+2.867655467480e+01 1.33079 9.81391 0.00167028 1.72498e-05 13
+1.931266944719e+01 1.3933 12.3177 0.00124307 1.72498e-05 13
+4.439623364590e+01 1.38004 7.81906 0.00224431 1.72498e-05 13
+1.364277535630e+01 1.47961 15.4603 0.000925128 1.72498e-05 13
+1.017435498578e+01 1.59052 19.4046 0.000688507 1.72498e-05 13
+8.294870923827e+00 1.7197 24.3552 0.000512406 1.72498e-05 13
+6.802132608769e+00 1.84162 30.5689 0.000381347 1.72498e-05 13
+5.723570798020e+00 1.99471 38.3678 0.00028381 1.72498e-05 13
+4.933751523833e+00 2.15875 48.1564 0.000211219 1.72498e-05 13
+4.337250536639e+00 2.35209 60.4424 0.000157195 9.97286e-06 14
+3.862081089332e+00 2.56776 75.8628 0.000116989 1.08873e-05 14
+3.449960890183e+00 2.80457 95.2174 8.70668e-05 1.18914e-05 14
+3.172196856333e+00 3.05193 119.51 6.47976e-05 1.29402e-05 14
+3.069627290216e+00 3.27563 150 4.82242e-05 1.38887e-05 14
+
+</pre></div></div>
+</div>
+<p>We can also set up a population that samples biinary systems, by adding extra grid variables. Below is an example of a full script that runs a binary population and registers when a double compact object is formed. The logging is rather compact and should be expanded top be more useful</p>
+<div class="nbinput docutils container">
+<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[14]:
+</pre></div>
+</div>
+<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
+<span></span><span class="kn">import</span> <span class="nn">os</span>
+
+<span class="kn">from</span> <span class="nn">binarycpython.utils.grid</span> <span class="kn">import</span> <span class="n">Population</span>
+<span class="kn">from</span> <span class="nn">binarycpython.utils.custom_logging_functions</span> <span class="kn">import</span> <span class="n">temp_dir</span>
+
+<span class="k">def</span> <span class="nf">parse_function</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">output</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">    Example parsing function</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+
+    <span class="c1"># extract info from the population instance</span>
+
+    <span class="c1"># Get some information from the</span>
+    <span class="n">data_dir</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">custom_options</span><span class="p">[</span><span class="s2">&quot;data_dir&quot;</span><span class="p">]</span>
+    <span class="n">base_filename</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">custom_options</span><span class="p">[</span><span class="s2">&quot;base_filename&quot;</span><span class="p">]</span>
+
+    <span class="c1"># Check directory, make if necessary</span>
+    <span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="n">data_dir</span><span class="p">,</span> <span class="n">exist_ok</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+
+    <span class="c1">#</span>
+    <span class="n">seperator</span> <span class="o">=</span> <span class="s2">&quot; &quot;</span>
+
+    <span class="c1"># Create filename</span>
+    <span class="n">outfilename</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">data_dir</span><span class="p">,</span> <span class="n">base_filename</span><span class="p">)</span>
+
+    <span class="c1"># The header columns matching this</span>
+    <span class="n">parameters</span> <span class="o">=</span> <span class="p">[</span>
+        <span class="s2">&quot;time&quot;</span><span class="p">,</span>
+        <span class="s2">&quot;mass_1&quot;</span><span class="p">,</span> <span class="s2">&quot;zams_mass_1&quot;</span><span class="p">,</span> <span class="s2">&quot;mass_2&quot;</span><span class="p">,</span> <span class="s2">&quot;zams_mass_2&quot;</span><span class="p">,</span>
+        <span class="s2">&quot;stellar_type_1&quot;</span><span class="p">,</span> <span class="s2">&quot;prev_stellar_type_1&quot;</span><span class="p">,</span> <span class="s2">&quot;stellar_type_2&quot;</span><span class="p">,</span> <span class="s2">&quot;prev_stellar_type_2&quot;</span><span class="p">,</span>
+        <span class="s2">&quot;metallicity&quot;</span><span class="p">,</span> <span class="s2">&quot;probability&quot;</span>
+    <span class="p">]</span>
+
+    <span class="c1"># Go over the output.</span>
+    <span class="k">for</span> <span class="n">el</span> <span class="ow">in</span> <span class="n">output</span><span class="o">.</span><span class="n">splitlines</span><span class="p">():</span>
+        <span class="n">headerline</span> <span class="o">=</span> <span class="n">el</span><span class="o">.</span><span class="n">split</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span>
+
+        <span class="c1"># CHeck the header and act accordingly</span>
+        <span class="k">if</span> <span class="n">headerline</span> <span class="o">==</span> <span class="s2">&quot;EXAMPLE_DCO&quot;</span><span class="p">:</span>
+            <span class="n">values</span> <span class="o">=</span> <span class="n">el</span><span class="o">.</span><span class="n">split</span><span class="p">()[</span><span class="mi">1</span><span class="p">:]</span>
+
+            <span class="k">if</span> <span class="ow">not</span> <span class="nb">len</span><span class="p">(</span><span class="n">parameters</span><span class="p">)</span> <span class="o">==</span> <span class="nb">len</span><span class="p">(</span><span class="n">values</span><span class="p">):</span>
+                <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Amount of column names isnt equal to amount of columns&quot;</span><span class="p">)</span>
+                <span class="k">raise</span> <span class="ne">ValueError</span>
+
+            <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">outfilename</span><span class="p">):</span>
+                <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">outfilename</span><span class="p">,</span> <span class="s2">&quot;w&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+                    <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">seperator</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">parameters</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>
+
+            <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">outfilename</span><span class="p">,</span> <span class="s2">&quot;a&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+                <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">seperator</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">values</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>
+
+
+<span class="c1"># Create population object</span>
+<span class="n">example_pop</span> <span class="o">=</span> <span class="n">Population</span><span class="p">()</span>
+
+<span class="c1"># If you want verbosity, set this before other things</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">verbosity</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
+
+<span class="c1"># Setting values can be done via .set(&lt;parameter_name&gt;=&lt;value&gt;)</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+    <span class="c1"># binary_c physics options</span>
+    <span class="n">M_1</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span>  <span class="c1"># bse_options</span>
+    <span class="n">separation</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span>  <span class="c1"># bse_options</span>
+    <span class="n">orbital_period</span><span class="o">=</span><span class="mi">45000000080</span><span class="p">,</span>  <span class="c1"># bse_options</span>
+    <span class="n">max_evolution_time</span><span class="o">=</span><span class="mi">15000</span><span class="p">,</span>  <span class="c1"># bse_options</span>
+    <span class="n">eccentricity</span><span class="o">=</span><span class="mf">0.02</span><span class="p">,</span>  <span class="c1"># bse_options</span>
+
+    <span class="c1"># grid_options</span>
+    <span class="n">amt_cores</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span>  <span class="c1"># grid_options</span>
+
+    <span class="c1"># Custom options: the data directory and the output filename</span>
+    <span class="n">data_dir</span><span class="o">=</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span>
+        <span class="n">temp_dir</span><span class="p">(),</span> <span class="s2">&quot;example_python_population_result&quot;</span>
+    <span class="p">),</span>  <span class="c1"># custom_options</span>
+    <span class="n">base_filename</span><span class="o">=</span><span class="s2">&quot;example_pop.dat&quot;</span><span class="p">,</span>  <span class="c1"># custom_options</span>
+<span class="p">)</span>
+
+<span class="c1"># Creating a parsing function</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+    <span class="n">parse_function</span><span class="o">=</span><span class="n">parse_function</span><span class="p">,</span>  <span class="c1"># Setting the parse function thats used in the evolve_population</span>
+<span class="p">)</span>
+
+<span class="c1">### Custom logging</span>
+<span class="c1"># Log the moment when the star turns into neutron</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
+    <span class="n">C_logging_code</span><span class="o">=</span><span class="s2">&quot;&quot;&quot;</span>
+<span class="s2">// logger to find gravitational wave progenitors</span>
+<span class="s2">if(stardata-&gt;star[0].stellar_type&gt;=NS &amp;&amp; stardata-&gt;star[1].stellar_type&gt;=NS)</span>
+<span class="s2">{</span>
+<span class="s2">    if (stardata-&gt;model.time &lt; stardata-&gt;model.max_evolution_time)</span>
+<span class="s2">    {</span>
+<span class="s2">        Printf(&quot;EXAMPLE_DCO </span><span class="si">%30.12e</span><span class="s2"> &quot; // 1</span>
+<span class="s2">            &quot;</span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> &quot; // 2-5</span>
+<span class="s2">            &quot;</span><span class="si">%d</span><span class="s2"> </span><span class="si">%d</span><span class="s2"> </span><span class="si">%d</span><span class="s2"> </span><span class="si">%d</span><span class="s2"> &quot; // 6-9</span>
+<span class="s2">            &quot;</span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="se">\\</span><span class="s2">n&quot;, // 10-11</span>
+
+<span class="s2">            stardata-&gt;model.time, // 1</span>
+
+<span class="s2">            stardata-&gt;star[0].mass, //2</span>
+<span class="s2">            stardata-&gt;common.zero_age.mass[0], //3</span>
+<span class="s2">            stardata-&gt;star[1].mass, //4</span>
+<span class="s2">            stardata-&gt;common.zero_age.mass[1], //5</span>
+
+<span class="s2">            stardata-&gt;star[0].stellar_type, //6</span>
+<span class="s2">            stardata-&gt;previous_stardata-&gt;star[0].stellar_type, //7</span>
+<span class="s2">            stardata-&gt;star[1].stellar_type, //8</span>
+<span class="s2">            stardata-&gt;previous_stardata-&gt;star[1].stellar_type, //9</span>
+
+<span class="s2">            // model stuff</span>
+<span class="s2">            stardata-&gt;common.metallicity, //10</span>
+<span class="s2">            stardata-&gt;model.probability //11</span>
+<span class="s2">        );</span>
+<span class="s2">    }</span>
+<span class="s2">    /* Kill the simulation to safe time */</span>
+<span class="s2">    stardata-&gt;model.max_evolution_time = stardata-&gt;model.time - stardata-&gt;model.dtm;</span>
+<span class="s2">}</span>
+<span class="s2">&quot;&quot;&quot;</span>
+<span class="p">)</span>
+
+<span class="c1"># Add grid variables</span>
+<span class="n">resolution</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;M_1&quot;</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span> <span class="s2">&quot;q&quot;</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span> <span class="s2">&quot;per&quot;</span><span class="p">:</span> <span class="mi">5</span><span class="p">}</span>
+
+<span class="c1"># Mass</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">add_grid_variable</span><span class="p">(</span>
+    <span class="n">name</span><span class="o">=</span><span class="s2">&quot;lnm1&quot;</span><span class="p">,</span>
+    <span class="n">longname</span><span class="o">=</span><span class="s2">&quot;Primary mass&quot;</span><span class="p">,</span>
+    <span class="n">valuerange</span><span class="o">=</span><span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">150</span><span class="p">],</span>
+    <span class="n">resolution</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">resolution</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">]),</span>
+    <span class="n">spacingfunc</span><span class="o">=</span><span class="s2">&quot;const(math.log(2), math.log(150), </span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">resolution</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">]),</span>
+    <span class="n">precode</span><span class="o">=</span><span class="s2">&quot;M_1=math.exp(lnm1)&quot;</span><span class="p">,</span>
+    <span class="n">probdist</span><span class="o">=</span><span class="s2">&quot;three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1&quot;</span><span class="p">,</span>
+    <span class="n">dphasevol</span><span class="o">=</span><span class="s2">&quot;dlnm1&quot;</span><span class="p">,</span>
+    <span class="n">parameter_name</span><span class="o">=</span><span class="s2">&quot;M_1&quot;</span><span class="p">,</span>
+    <span class="n">condition</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span>  <span class="c1"># Impose a condition on this grid variable. Mostly for a check for yourself</span>
+<span class="p">)</span>
+
+<span class="c1"># Mass ratio</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">add_grid_variable</span><span class="p">(</span>
+    <span class="n">name</span><span class="o">=</span><span class="s2">&quot;q&quot;</span><span class="p">,</span>
+    <span class="n">longname</span><span class="o">=</span><span class="s2">&quot;Mass ratio&quot;</span><span class="p">,</span>
+    <span class="n">valuerange</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;0.1/M_1&quot;</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span>
+    <span class="n">resolution</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">resolution</span><span class="p">[</span><span class="s1">&#39;q&#39;</span><span class="p">]),</span>
+    <span class="n">spacingfunc</span><span class="o">=</span><span class="s2">&quot;const(0.1/M_1, 1, </span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">resolution</span><span class="p">[</span><span class="s1">&#39;q&#39;</span><span class="p">]),</span>
+    <span class="n">probdist</span><span class="o">=</span><span class="s2">&quot;flatsections(q, [{&#39;min&#39;: 0.1/M_1, &#39;max&#39;: 1.0, &#39;height&#39;: 1}])&quot;</span><span class="p">,</span>
+    <span class="n">dphasevol</span><span class="o">=</span><span class="s2">&quot;dq&quot;</span><span class="p">,</span>
+    <span class="n">precode</span><span class="o">=</span><span class="s2">&quot;M_2 = q * M_1&quot;</span><span class="p">,</span>
+    <span class="n">parameter_name</span><span class="o">=</span><span class="s2">&quot;M_2&quot;</span><span class="p">,</span>
+    <span class="n">condition</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span>  <span class="c1"># Impose a condition on this grid variable. Mostly for a check for yourself</span>
+<span class="p">)</span>
+
+<span class="c1">#</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">add_grid_variable</span><span class="p">(</span>
+   <span class="n">name</span><span class="o">=</span><span class="s2">&quot;log10per&quot;</span><span class="p">,</span> <span class="c1"># in days</span>
+   <span class="n">longname</span><span class="o">=</span><span class="s2">&quot;log10(Orbital_Period)&quot;</span><span class="p">,</span>
+   <span class="n">valuerange</span><span class="o">=</span><span class="p">[</span><span class="mf">0.15</span><span class="p">,</span> <span class="mf">5.5</span><span class="p">],</span>
+   <span class="n">resolution</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">resolution</span><span class="p">[</span><span class="s2">&quot;per&quot;</span><span class="p">]),</span>
+   <span class="n">spacingfunc</span><span class="o">=</span><span class="s2">&quot;const(0.15, 5.5, </span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">resolution</span><span class="p">[</span><span class="s2">&quot;per&quot;</span><span class="p">]),</span>
+   <span class="n">precode</span><span class="o">=</span><span class="s2">&quot;&quot;&quot;orbital_period = 10** log10per</span>
+<span class="s2">sep = calc_sep_from_period(M_1, M_2, orbital_period)</span>
+<span class="s2">sep_min = calc_sep_from_period(M_1, M_2, 10**0.15)</span>
+<span class="s2">sep_max = calc_sep_from_period(M_1, M_2, 10**5.5)&quot;&quot;&quot;</span><span class="p">,</span>
+   <span class="n">probdist</span><span class="o">=</span><span class="s2">&quot;sana12(M_1, M_2, sep, orbital_period, sep_min, sep_max, math.log10(10**0.15), math.log10(10**5.5), -0.55)&quot;</span><span class="p">,</span>
+   <span class="n">parameter_name</span><span class="o">=</span><span class="s2">&quot;orbital_period&quot;</span><span class="p">,</span>
+   <span class="n">dphasevol</span><span class="o">=</span><span class="s2">&quot;dlog10per&quot;</span><span class="p">,</span>
+<span class="p">)</span>
+
+<span class="c1"># Exporting of all the settings can be done with .export_all_info()</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">export_all_info</span><span class="p">()</span>
+
+<span class="c1"># remove the result file if it exists</span>
+<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">temp_dir</span><span class="p">(),</span> <span class="s2">&quot;example_python_population_result&quot;</span><span class="p">,</span> <span class="s2">&quot;example_pop.dat&quot;</span><span class="p">)):</span>
+    <span class="n">os</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">temp_dir</span><span class="p">(),</span> <span class="s2">&quot;example_python_population_result&quot;</span><span class="p">,</span> <span class="s2">&quot;example_pop.dat&quot;</span><span class="p">))</span>
+
+<span class="c1"># Evolve the population</span>
+<span class="n">example_pop</span><span class="o">.</span><span class="n">evolve</span><span class="p">()</span>
+
+<span class="c1">#</span>
+<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">temp_dir</span><span class="p">(),</span> <span class="s2">&quot;example_python_population_result&quot;</span><span class="p">,</span> <span class="s2">&quot;example_pop.dat&quot;</span><span class="p">),</span> <span class="s1">&#39;r&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+    <span class="n">output</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
+<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">output</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="nboutput nblast docutils container">
+<div class="prompt empty docutils container">
+</div>
+<div class="output_area docutils container">
+<div class="highlight"><pre>
+Generating grid code
+Constructing/adding: lnm1
+Constructing/adding: q
+Constructing/adding: log10per
+Grid has handled 125 stars
+with a total probability of 0.0862478164626921
+Total starcount for this run will be: 125
+Generating grid code
+Constructing/adding: lnm1
+Constructing/adding: q
+Constructing/adding: log10per
+Population-d20a4c74d20a43b881c0c9e5def5f76c finished! The total probability was: 0.08624781646269201. It took a total of 8.561265707015991s to run 125 systems on 2 cores
+There were no errors found in this run.
+
+
+time mass_1 zams_mass_1 mass_2 zams_mass_2 stellar_type_1 prev_stellar_type_1 stellar_type_2 prev_stellar_type_2 metallicity probability
+8.863377990313e+01 1.29444 5.88566 0 2.99283 13 5 15 15 0.02 0.000627913
+1.146421815741e+02 0 5.88566 1.33062 4.43925 15 15 13 5 0.02 0.000627913
+7.222715508467e+01 1.34922 5.88566 0 5.88566 13 5 15 15 0.02 0.000627913
+1.350021848285e+01 1.48488 17.3205 0 0.1 13 5 15 15 0.02 0.000154349
+1.171108213270e+01 1.53113 17.3205 0 0.1 13 5 15 15 0.02 0.000154349
+1.171086983243e+01 1.53177 17.3205 0 0.1 13 9 15 15 0.02 0.000154349
+1.170770599495e+01 1.53176 17.3205 0 4.40513 13 5 15 15 0.02 0.000172877
+1.230407246199e+01 1.59499 17.3205 0 4.40513 13 5 15 15 0.02 0.000610573
+1.108751340926e+01 1.70319 17.3205 0 8.71025 13 4 15 15 0.02 0.000610573
+1.941017702765e+01 1.34903 17.3205 1.65097 8.71025 13 13 13 5 0.02 0.000172877
+1.980988739731e+01 1.36979 17.3205 1.60808 8.71025 13 13 13 5 0.02 0.000121486
+3.571858031651e+01 1.53174 17.3205 1.30504 8.71025 13 13 13 5 0.02 8.42148e-05
+3.459153942631e+01 1.53176 17.3205 1.31004 8.71025 13 13 13 5 0.02 9.8162e-05
+1.687368550125e+01 1.34937 17.3205 1.73856 13.0154 13 13 13 8 0.02 0.000172877
+1.194842917007e+01 1.78096 17.3205 0 13.0154 13 8 15 15 0.02 0.000610573
+1.733614170983e+01 1.53184 17.3205 1.42375 13.0154 13 13 13 5 0.02 9.8162e-05
+1.723547465714e+01 1.38403 17.3205 1.71288 13.0154 13 13 13 8 0.02 0.000121486
+1.764340254985e+01 1.53174 17.3205 1.41264 13.0154 13 13 13 5 0.02 8.42148e-05
+1.170425790780e+01 1.52963 17.3205 0 17.3205 13 5 15 15 0.02 0.000172877
+8.922967341481e+00 1.85486 17.3205 0 17.3205 13 8 15 15 0.02 0.000610573
+1.232906623449e+01 1.41074 17.3205 1.34281 17.3205 13 13 13 8 0.02 0.000121486
+1.170775828562e+01 1.53183 17.3205 1.53183 17.3205 13 5 13 5 0.02 9.8162e-05
+1.170770422321e+01 1.53175 17.3205 1.53175 17.3205 13 5 13 5 0.02 8.42148e-05
+5.075844624794e+00 2.12303 50.9713 0 0.1 13 8 15 15 0.02 3.79411e-05
+4.766606588165e+00 2.20484 50.9713 0 0.1 14 8 15 15 0.02 3.79411e-05
+4.768305081494e+00 2.18838 50.9713 0 0.1 13 8 15 15 0.02 3.79411e-05
+4.458869865939e+00 2.29864 50.9713 0 12.8178 14 8 15 15 0.02 0.000150087
+1.806014211040e+01 2.10446 50.9713 1.40749 12.8178 13 13 13 5 0.02 2.9863e-05
+4.797342083485e+00 2.10328 50.9713 0 12.8178 13 13 15 1 0.02 4.24954e-05
+1.721374713429e+01 2.21673 50.9713 1.42212 12.8178 14 14 13 5 0.02 2.41295e-05
+4.055645404546e+00 2.47276 50.9713 0 25.5357 14 7 15 15 0.02 0.000150087
+1.806123543037e+01 2.21893 50.9713 1.40745 12.8178 14 14 13 5 0.02 2.07011e-05
+8.117519147635e+00 2.10433 50.9713 2.21473 25.5357 13 13 14 8 0.02 4.24954e-05
+8.315554923168e+00 2.15343 50.9713 2.08519 25.5357 13 13 13 8 0.02 2.9863e-05
+7.917420996633e+00 2.21892 50.9713 1.7431 25.5357 14 14 13 8 0.02 2.07011e-05
+7.693213405973e+00 2.21805 50.9713 1.78384 25.5357 14 14 13 8 0.02 2.41295e-05
+3.753837732894e+00 2.62517 50.9713 0 38.2535 14 7 15 15 0.02 0.000150087
+7.087296558990e+00 2.10417 50.9713 2.40935 38.2535 13 13 14 8 0.02 4.24954e-05
+7.007109286263e+00 2.15854 50.9713 2.28672 38.2535 13 13 14 8 0.02 2.9863e-05
+5.653200958306e+00 2.21878 50.9713 2.0587 38.2535 14 14 13 8 0.02 2.41295e-05
+5.733794947644e+00 2.21892 50.9713 1.99255 38.2535 14 14 13 8 0.02 2.07011e-05
+3.513216011269e+00 2.76647 50.9713 0 50.9713 14 7 15 15 0.02 0.000150087
+4.750574783854e+00 2.27442 50.9713 0 50.9713 14 8 15 15 0.02 4.24954e-05
+7.278384712062e+00 1.29678 50.9713 2.09216 50.9713 13 8 13 13 0.02 2.9863e-05
+4.765996194699e+00 2.20787 50.9713 2.20787 50.9713 14 8 14 8 0.02 2.07011e-05
+4.765535914728e+00 2.21331 50.9713 2.21331 50.9713 14 8 14 8 0.02 2.41295e-05
+3.104706358826e+00 3.17639 150 0 0.1 14 7 15 15 0.02 9.32641e-06
+3.069363482023e+00 3.27572 150 0 0.1 14 7 15 15 0.02 9.32641e-06
+3.047074050271e+00 3.3836 150 0 37.575 14 7 15 15 0.02 3.68933e-05
+5.974759306305e+00 3.23604 150 2.53922 37.575 14 14 14 7 0.02 1.04459e-05
+6.074084349384e+00 3.30145 150 2.13876 37.575 14 14 13 8 0.02 7.34071e-06
+5.733865371895e+00 3.29994 150 2.00498 37.575 14 14 13 8 0.02 5.93135e-06
+3.027099358410e+00 3.53631 150 0 75.05 14 7 15 15 0.02 3.68933e-05
+5.807147339697e+00 3.30197 150 1.9791 37.575 14 14 13 8 0.02 5.08861e-06
+4.862942347290e+00 3.25294 150 2.97823 75.05 14 14 14 7 0.02 1.04459e-05
+4.556479830908e+00 3.29942 150 2.73221 75.05 14 14 14 7 0.02 7.34071e-06
+3.853070305680e+00 3.29977 150 2.62486 75.05 14 14 14 7 0.02 5.93135e-06
+3.881529045940e+00 3.30149 150 2.55924 75.05 14 14 14 7 0.02 5.08861e-06
+3.015033359333e+00 3.64419 150 0 112.525 14 7 15 15 0.02 3.68933e-05
+4.126828648362e+00 3.32047 150 0 112.525 14 14 15 3 0.02 1.04459e-05
+3.990017992944e+00 3.3032 150 2.94027 112.525 14 14 14 7 0.02 7.34071e-06
+3.206771867883e+00 3.07671 150 3.11282 112.525 14 14 14 7 0.02 5.93135e-06
+3.006827156705e+00 3.72638 150 0 150 14 7 15 15 0.02 3.68933e-05
+3.218786094847e+00 3.30337 150 3.01344 112.525 14 14 14 7 0.02 5.08861e-06
+4.527722847382e+00 1.42238 150 0 150 13 5 15 15 0.02 1.04459e-05
+3.069567332611e+00 3.27804 150 3.27804 150 14 7 14 7 0.02 5.93135e-06
+5.726405299909e+00 1.29746 150 3.22759 150 13 8 14 14 0.02 7.34071e-06
+3.069626478211e+00 3.27565 150 3.27565 150 14 7 14 7 0.02 5.08861e-06
+
+</pre></div></div>
+</div>
+</div>
+</div>
+
+
+           </div>
+           
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="notebook_extra_features.html" class="btn btn-neutral float-right" title="Extra features and functionality of binarycpython" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="notebook_custom_logging.html" class="btn btn-neutral float-left" title="Notebook custom logging" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        
+        &copy; Copyright 2021, David Hendriks, Robert Izzard
+
+    </p>
+  </div>
+    
+    
+    
+    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
+    
+    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
+    
+    provided by <a href="https://readthedocs.org">Read the Docs</a>.
+<br><br>
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
+<br><br>
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+
+
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script>
+
+  
+  
+    
+   
+
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/build/html/notebook_population.ipynb b/docs/build/html/notebook_population.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..56f3b153c23064e82863f188906d50243e795715
--- /dev/null
+++ b/docs/build/html/notebook_population.ipynb
@@ -0,0 +1,1213 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "bbbaafbb-fd7d-4b73-a970-93506ba35d71",
+   "metadata": {},
+   "source": [
+    "# Running populations with binarycpython\n",
+    "This notebook will show you how to evolve a population of stars\n",
+    "\n",
+    "Much of the code in the binarycpython package is written to evolve a population of stars through the Population object, rather than running a single system. Let's go through the functionality of this object step by step and set up some example populations. \n",
+    "\n",
+    "At the bottom of this notebook there are some complete example scripts"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "id": "bf6b8673-a2b5-4b50-ad1b-e90671f57470",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "import os\n",
+    "from binarycpython.utils.custom_logging_functions import temp_dir\n",
+    "from binarycpython.utils.grid import Population\n",
+    "\n",
+    "# help(Population) # Uncomment to see the public functions of this object"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "a081ab23-7822-4971-aa82-991548534714",
+   "metadata": {},
+   "source": [
+    "- running ensemble\n",
+    "- using M&S grid"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f268eff3-4e08-4f6b-8b59-f22dba4d2074",
+   "metadata": {},
+   "source": [
+    "## Setting up the Population object\n",
+    "To set up and configure the population object we need to make an object instance of the `Population` object, and add configuration via the `.set()` function.\n",
+    "\n",
+    "There are three categories of options that the Population object can set:\n",
+    "- BSE options: these options will be used for the binary_c calls, and are recognized by comparing the arguments to a known list of available arguments of binary_c. To see which options are available, see section [`binary_c parameters` in the documentation](https://ri0005.pages.surrey.ac.uk/binary_c-python/binary_c_parameters.html). You can access these through `population.bse_options['<bse option name>']` after you have set them. \n",
+    "\n",
+    "- Grid options: these options will be used to configure the behaviour of the Population object. To see which options are available, see section [`Population grid code options` in the documentation](https://ri0005.pages.surrey.ac.uk/binary_c-python/grid_options_descriptions.html). They can be accessed via `population.grid_options['<grid option name>']` after you have set them. \n",
+    "\n",
+    "- Custom options: these options are not recognized as either of the above, so they will be stored in the custom_options, and can be accessed via `population.custom_options['<custom option name>']`"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "id": "79ab50b7-591f-4883-af09-116d1835a751",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: M_1=10 to BSE_options\n",
+      "adding: orbital_period=45000000080 to BSE_options\n",
+      "adding: max_evolution_time=15000 to BSE_options\n",
+      "adding: eccentricity=0.02 to BSE_options\n",
+      "adding: amt_cores=2 to grid_options\n",
+      "<<<< Warning: Key does not match previously known parameter:                     adding: data_dir=/tmp/binary_c_python/example_python_population_result to custom_options >>>>\n",
+      "<<<< Warning: Key does not match previously known parameter:                     adding: base_filename=example_pop.dat to custom_options >>>>\n",
+      "1\n",
+      "example_pop.dat\n",
+      "10\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Create population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# If you want verbosity, set this before other things\n",
+    "example_pop.set(verbosity=1)\n",
+    "\n",
+    "# Setting values can be done via .set(<parameter_name>=<value>)\n",
+    "# Values that are known to be binary_c_parameters are loaded into bse_options.\n",
+    "# Those that are present in the default grid_options are set in grid_options\n",
+    "# All other values that you set are put in a custom_options dict\n",
+    "example_pop.set(\n",
+    "    # binary_c physics options\n",
+    "    M_1=10,  # bse_options\n",
+    "    orbital_period=45000000080,  # bse_options\n",
+    "    max_evolution_time=15000,  # bse_options\n",
+    "    eccentricity=0.02,  # bse_options\n",
+    "\n",
+    "\n",
+    "    # grid_options\n",
+    "    amt_cores=2,  # grid_options\n",
+    "    \n",
+    "    # Custom options # TODO: need to be set in grid_options probably\n",
+    "    data_dir=os.path.join(\n",
+    "        temp_dir(), \"example_python_population_result\"\n",
+    "    ),  # custom_options\n",
+    "    base_filename=\"example_pop.dat\",  # custom_options\n",
+    ")\n",
+    "\n",
+    "# We can use the options through\n",
+    "print(example_pop.grid_options['verbosity'])\n",
+    "print(example_pop.custom_options['base_filename'])\n",
+    "print(example_pop.bse_options['M_1'])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f8d46d19-633d-4911-821d-a59daed31816",
+   "metadata": {},
+   "source": [
+    "After configuring the population, but before running the actual population, its usually a good idea to export the full configuration (including version info of binary_c and all the parameters) to a file. To do this we use `example_pop.export_all_info()`.\n",
+    "\n",
+    "On default this exports everything, each of the sections can be disabled:\n",
+    "  - population settings (bse_options, grid_options, custom_options), turn off with include_population\n",
+    "      settings=False\n",
+    "  - binary_c_defaults (all the commandline arguments that binary c accepts, and their defaults).\n",
+    "      turn off with include_binary_c_defaults=False\n",
+    "  - include_binary_c_version_info (all the compilation info, and information about the compiled\n",
+    "      parameters), turn off with include_binary_c_version_info=False\n",
+    "  - include_binary_c_help_all (all the help information for all the binary_c parameters),\n",
+    "      turn off with include_binary_c_help_all=Fase\n",
+    "      \n",
+    "On default it will write this to the custom_options['data_dir'], but that can be overriden by setting use_datadir=False and providing an outfile=<>"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
+   "id": "b9c2471a-a5b0-48b7-a50b-2f0d22100926",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Writing settings to /tmp/binary_c_python/example_python_population_result/example_pop_settings.json\n"
+     ]
+    },
+    {
+     "data": {
+      "text/plain": [
+       "'/tmp/binary_c_python/example_python_population_result/example_pop_settings.json'"
+      ]
+     },
+     "execution_count": 3,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "example_pop.export_all_info()"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f9a65554-36ab-4a04-96ca-9f1422c307fd",
+   "metadata": {},
+   "source": [
+    "## Adding grid variables\n",
+    "The main purpose of the Population object is to handle the population synthesis side of running a set of stars. The main method to do this with binarycpython, as is the case with Perl binarygrid, is to use grid variables. These are loops over a predefined range of values, where a probability will be assigned to the systems based on the chosen probability distributions.\n",
+    "\n",
+    "Usually we use either 1 mass grid variable, or a trio of mass, mass ratio and period (See below for full examples of all of these). We can, however, also add grid sampling for e.g. eccentricity, metallicity or other parameters. \n",
+    "\n",
+    "In some cases it could be easier to set up a for loop that sets that parameter and calls the evolve function several times, e.g. when you want to vary a prescription (usually a discrete, unweighted parameter) \n",
+    "\n",
+    "\n",
+    "A notable special type of grid variable is that of the Moe & di Stefano 2017 dataset (see further down in the notebook).\n",
+    "\n",
+    "To add a grid variable to the population object we use `example_pop.add_grid_variable` (see next cell)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 4,
+   "id": "68c84521-9ae8-4020-af7a-5334173db969",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Help on method add_grid_variable in module binarycpython.utils.grid:\n",
+      "\n",
+      "add_grid_variable(name:str, longname:str, valuerange:Union[list, str], resolution:str, spacingfunc:str, probdist:str, dphasevol:Union[str, int], parameter_name:str, gridtype:str='edge', branchpoint:int=0, precode:Union[str, NoneType]=None, condition:Union[str, NoneType]=None) -> None method of binarycpython.utils.grid.Population instance\n",
+      "    Function to add grid variables to the grid_options.\n",
+      "    \n",
+      "    The execution of the grid generation will be through a nested for loop.\n",
+      "    Each of the grid variables will get create a deeper for loop.\n",
+      "    \n",
+      "    The real function that generates the numbers will get written to a new file in the TMP_DIR,\n",
+      "    and then loaded imported and evaluated.\n",
+      "    beware that if you insert some destructive piece of code, it will be executed anyway.\n",
+      "    Use at own risk.\n",
+      "    \n",
+      "    Tasks:\n",
+      "        - TODO: Fix this complex function.\n",
+      "    \n",
+      "    Args:\n",
+      "        name:\n",
+      "            name of parameter. This is evaluated as a parameter and you can use it throughout\n",
+      "            the rest of the function\n",
+      "            \n",
+      "            Examples:\n",
+      "                name = 'lnm1'\n",
+      "        longname:\n",
+      "            Long name of parameter\n",
+      "            \n",
+      "            Examples:\n",
+      "                longname = 'Primary mass'\n",
+      "        range:\n",
+      "            Range of values to take. Does not get used really, the spacingfunction is used to\n",
+      "            get the values from\n",
+      "            \n",
+      "            Examples:\n",
+      "                range = [math.log(m_min), math.log(m_max)]\n",
+      "        resolution:\n",
+      "            Resolution of the sampled range (amount of samples).\n",
+      "            TODO: check if this is used anywhere\n",
+      "    \n",
+      "            Examples: \n",
+      "                resolution = resolution[\"M_1\"]\n",
+      "        spacingfunction:\n",
+      "            Function determining how the range is sampled. You can either use a real function,\n",
+      "            or a string representation of a function call. Will get written to a file and\n",
+      "            then evaluated.\n",
+      "    \n",
+      "            Examples:\n",
+      "                spacingfunction = \"const(math.log(m_min), math.log(m_max), {})\".format(resolution['M_1'])\n",
+      "    \n",
+      "        precode:\n",
+      "            Extra room for some code. This code will be evaluated within the loop of the\n",
+      "            sampling function (i.e. a value for lnm1 is chosen already)\n",
+      "            \n",
+      "            Examples:\n",
+      "                precode = 'M_1=math.exp(lnm1);'\n",
+      "        probdist:\n",
+      "            Function determining the probability that gets assigned to the sampled parameter\n",
+      "            \n",
+      "            Examples:\n",
+      "                probdist = 'Kroupa2001(M_1)*M_1'\n",
+      "        dphasevol:\n",
+      "            part of the parameter space that the total probability is calculated with. Put to -1\n",
+      "            if you want to ignore any dphasevol calculations and set the value to 1\n",
+      "            Examples:\n",
+      "                dphasevol = 'dlnm1'\n",
+      "        condition:\n",
+      "            condition that has to be met in order for the grid generation to continue\n",
+      "            Examples:\n",
+      "                condition = 'self.grid_options['binary']==1'\n",
+      "        gridtype:\n",
+      "            Method on how the value range is sampled. Can be either 'edge' (steps starting at\n",
+      "            the lower edge of the value range) or 'center'\n",
+      "            (steps starting at lower edge + 0.5 * stepsize).\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "help(example_pop.add_grid_variable)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "bd75cebe-2152-4025-b680-dc020b80889b",
+   "metadata": {},
+   "source": [
+    "All the distribution functions that we can use are stored in the `binarycpython.utils.distribution_functions` or `binarycpython/utils/distribution_functions.py` on git. If you uncomment the help statement below you can see which functions are available now:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 5,
+   "id": "048db541-3e92-4c5d-a25c-9c5a34b9c857",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [],
+   "source": [
+    "# import binarycpython.utils.distribution_functions\n",
+    "# help(binarycpython.utils.distribution_functions)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "1b3a007b-5c17-42a7-a981-7e268e6f545c",
+   "metadata": {},
+   "source": [
+    "The next cell contains an example of adding the mass grid variable, but sampling in log mass. The commented grid variables are examples of the mass ratio sampling and the period sampling."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 6,
+   "id": "47979841-2c26-4b26-8945-603d013dc93a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Added grid variable: {\n",
+      "    \"name\": \"lnm1\",\n",
+      "    \"longname\": \"Primary mass\",\n",
+      "    \"valuerange\": [\n",
+      "        2,\n",
+      "        150\n",
+      "    ],\n",
+      "    \"resolution\": \"20\",\n",
+      "    \"spacingfunc\": \"const(math.log(2), math.log(150), 20)\",\n",
+      "    \"precode\": \"M_1=math.exp(lnm1)\",\n",
+      "    \"probdist\": \"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+      "    \"dphasevol\": \"dlnm1\",\n",
+      "    \"parameter_name\": \"M_1\",\n",
+      "    \"condition\": \"\",\n",
+      "    \"gridtype\": \"edge\",\n",
+      "    \"branchpoint\": 0,\n",
+      "    \"grid_variable_number\": 0\n",
+      "}\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Add grid variables\n",
+    "resolution = {\"M_1\": 20, \"q\": 20, \"per\": 40}\n",
+    "\n",
+    "# Mass\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"lnm1\",\n",
+    "    longname=\"Primary mass\",\n",
+    "    valuerange=[2, 150],\n",
+    "    resolution=\"{}\".format(resolution[\"M_1\"]),\n",
+    "    spacingfunc=\"const(math.log(2), math.log(150), {})\".format(resolution[\"M_1\"]),\n",
+    "    precode=\"M_1=math.exp(lnm1)\",\n",
+    "    probdist=\"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+    "    dphasevol=\"dlnm1\",\n",
+    "    parameter_name=\"M_1\",\n",
+    "    condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    ")\n",
+    "\n",
+    "# # Mass ratio\n",
+    "# test_pop.add_grid_variable(\n",
+    "#     name=\"q\",\n",
+    "#     longname=\"Mass ratio\",\n",
+    "#     valuerange=[\"0.1/M_1\", 1],\n",
+    "#     resolution=\"{}\".format(resolution['q']),\n",
+    "#     spacingfunc=\"const(0.1/M_1, 1, {})\".format(resolution['q']),\n",
+    "#     probdist=\"flatsections(q, [{'min': 0.1/M_1, 'max': 1.0, 'height': 1}])\",\n",
+    "#     dphasevol=\"dq\",\n",
+    "#     precode=\"M_2 = q * M_1\",\n",
+    "#     parameter_name=\"M_2\",\n",
+    "#     condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    "# )\n",
+    "\n",
+    "# #\n",
+    "# test_pop.add_grid_variable(\n",
+    "#    name=\"log10per\", # in days\n",
+    "#    longname=\"log10(Orbital_Period)\",\n",
+    "#    valuerange=[0.15, 5.5],\n",
+    "#    resolution=\"{}\".format(resolution[\"per\"]),\n",
+    "#    spacingfunc=\"const(0.15, 5.5, {})\".format(resolution[\"per\"]),\n",
+    "#    precode=\"\"\"orbital_period = 10** log10per\n",
+    "# sep = calc_sep_from_period(M_1, M_2, orbital_period)\n",
+    "# sep_min = calc_sep_from_period(M_1, M_2, 10**0.15)\n",
+    "# sep_max = calc_sep_from_period(M_1, M_2, 10**5.5)\"\"\",\n",
+    "#    probdist=\"sana12(M_1, M_2, sep, orbital_period, sep_min, sep_max, math.log10(10**0.15), math.log10(10**5.5), -0.55)\",\n",
+    "#    parameter_name=\"orbital_period\",\n",
+    "#    dphasevol=\"dlog10per\",\n",
+    "# )\n"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "163f13ae-fec1-4ee8-b9d4-c1b75c19ff39",
+   "metadata": {},
+   "source": [
+    "## Setting logging and handling the output\n",
+    "On default, binary_c will not output anything (except for 'SINGLE STAR LIFETIME'). It is up to us to determine what will be printed. We can either do that by hardcoding the print statements into `binary_c` (see documentation binary_c). Or, we can use the custom logging functionality of binarycpython (see notebook `notebook_custom_logging.ipynb`), which is faster to set up and requires no recompilation of binary_c, but is somewhat more limited in its functionality. \n",
+    "\n",
+    "After configuring what will be printed, we need to make a function to parse the output. This can be done by setting the parse_function parameter in the population object (see also notebook `notebook_individual_systems.ipynb`). \n",
+    "\n",
+    "In the code below we will set up both the custom logging, and a parse function to handle that output"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "0c986215-93b1-4e30-ad79-f7c397e9ff7d",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: C_logging_code=\n",
+      "if(stardata->star[0].stellar_type >= 13)    \n",
+      "{\n",
+      "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+      "    {\n",
+      "        Printf(\"EXAMPLE_COMPACT_OBJECT %30.12e %g %g %g %d\\n\",\n",
+      "            // \n",
+      "            stardata->model.time, // 1\n",
+      "            stardata->star[0].mass, // 2\n",
+      "            stardata->common.zero_age.mass[0], // 3\n",
+      "            stardata->model.probability, // 4\n",
+      "            stardata->star[0].stellar_type // 5\n",
+      "      );\n",
+      "    };\n",
+      "    /* Kill the simulation to save time */\n",
+      "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+      "};\n",
+      " to grid_options\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Create custom logging statement: in this case we will log when the star turns into a compact object, and then terminate the evolution.\n",
+    "custom_logging_statement = \"\"\"\n",
+    "if(stardata->star[0].stellar_type >= 13)    \n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"EXAMPLE_COMPACT_OBJECT %30.12e %g %g %g %d\\\\n\",\n",
+    "            // \n",
+    "            stardata->model.time, // 1\n",
+    "            stardata->star[0].mass, // 2\n",
+    "            stardata->common.zero_age.mass[0], // 3\n",
+    "            stardata->model.probability, // 4\n",
+    "            stardata->star[0].stellar_type // 5\n",
+    "      );\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "example_pop.set(\n",
+    "    C_logging_code=custom_logging_statement\n",
+    ")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ae1f1f0c-1f8b-42d8-b051-cbf8c6b51514",
+   "metadata": {},
+   "source": [
+    "The parse function must now catch lines that start with \"EXAMPLE_COMPACT_OBJECT\", and write that line to a file"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 8,
+   "id": "fd197154-a8ce-4865-8929-008d3483101a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: parse_function=<function parse_function at 0x7ff3bdf79620> to grid_options\n"
+     ]
+    }
+   ],
+   "source": [
+    "def parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parse function\n",
+    "    \"\"\"\n",
+    "    \n",
+    "    # get info from the population instance\n",
+    "    data_dir = self.custom_options[\"data_dir\"]\n",
+    "    base_filename = self.custom_options[\"base_filename\"]\n",
+    "\n",
+    "    # Check directory, make if necessary\n",
+    "    os.makedirs(data_dir, exist_ok=True)\n",
+    "\n",
+    "    seperator = \" \"\n",
+    "\n",
+    "    # Create filename\n",
+    "    outfilename = os.path.join(data_dir, base_filename)\n",
+    "\n",
+    "    parameters = [\"time\", \"mass\", \"zams_mass\", \"probability\", \"stellar_type\"]\n",
+    "\n",
+    "    # Go over the output.\n",
+    "    for line in output.splitlines():\n",
+    "        headerline = line.split()[0]\n",
+    "\n",
+    "        # CHeck the header and act accordingly\n",
+    "        if headerline == \"EXAMPLE_COMPACT_OBJECT\":\n",
+    "            values = line.split()[1:]\n",
+    "            print(line)\n",
+    "            \n",
+    "            if not len(parameters) == len(values):\n",
+    "                print(\"Amount of column names isnt equal to amount of columns\")\n",
+    "                raise ValueError\n",
+    "\n",
+    "            if not os.path.exists(outfilename):\n",
+    "                with open(outfilename, \"w\") as f:\n",
+    "                    f.write(seperator.join(parameters) + \"\\n\")\n",
+    "\n",
+    "            with open(outfilename, \"a\") as f:\n",
+    "                f.write(seperator.join(values) + \"\\n\")\n",
+    "\n",
+    "# Add the parsing function\n",
+    "example_pop.set(\n",
+    "    parse_function=parse_function,\n",
+    ")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "91509ce5-ffe7-4937-aa87-6d7baac9ac04",
+   "metadata": {},
+   "source": [
+    "## Evolving the grid\n",
+    "Now that we configured all the main parts of the population object, we can actually run the population! Doing this is straightforward: `example_pop.evolve()`\n",
+    "\n",
+    "This will start up the processing of all the systems. We can control how many cores are used by settings `amt_cores`. By setting the `verbosity` of the population object to a higher value we can get a lot of verbose information about the run, but for now we will set it to 0.\n",
+    "\n",
+    "There are many grid_options that can lead to different behaviour of the evolution of the grid. Please do have a look at those: [grid options docs](https://ri0005.pages.surrey.ac.uk/binary_c-python/grid_options_descriptions.html), and try  "
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 9,
+   "id": "8ea376c1-1e92-45af-8cab-9d7fdca564eb",
+   "metadata": {
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: verbosity=0 to grid_options\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Grid has handled 20 stars\n",
+      "with a total probability of 0.05150046619238192\n",
+      "Total starcount for this run will be: 20\n",
+      "EXAMPLE_COMPACT_OBJECT             2.867655467480e+01 1.33079 9.81391 0.00167028 13\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "EXAMPLE_COMPACT_OBJECT             1.931266944719e+01 1.3933 12.3177 0.00124307 13\n",
+      "EXAMPLE_COMPACT_OBJECT             4.439623364590e+01 1.38004 7.81906 0.00224431 13\n",
+      "EXAMPLE_COMPACT_OBJECT             1.364277535630e+01 1.47961 15.4603 0.000925128 13\n",
+      "EXAMPLE_COMPACT_OBJECT             1.017435498578e+01 1.59052 19.4046 0.000688507 13\n",
+      "EXAMPLE_COMPACT_OBJECT             8.294870923827e+00 1.7197 24.3552 0.000512406 13\n",
+      "EXAMPLE_COMPACT_OBJECT             6.802132608769e+00 1.84162 30.5689 0.000381347 13\n",
+      "EXAMPLE_COMPACT_OBJECT             5.723570798020e+00 1.99471 38.3678 0.00028381 13\n",
+      "EXAMPLE_COMPACT_OBJECT             4.933751523833e+00 2.15875 48.1564 0.000211219 13\n",
+      "EXAMPLE_COMPACT_OBJECT             4.337250536639e+00 2.35209 60.4424 0.000157195 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.862081089332e+00 2.56776 75.8628 0.000116989 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.449960890183e+00 2.80457 95.2174 8.70668e-05 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.172196856333e+00 3.05193 119.51 6.47976e-05 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.069627290216e+00 3.27563 150 4.82242e-05 14\n",
+      "Population-2a7732d03e594ef4b5dfe9051b41d9c0 finished! The total probability was: 0.05150046619238191. It took a total of 0.7797017097473145s to run 20 systems on 2 cores\n",
+      "There were no errors found in this run.\n"
+     ]
+    }
+   ],
+   "source": [
+    "# change verbosity\n",
+    "example_pop.set(verbosity=0)\n",
+    "\n",
+    "## Executing a population\n",
+    "## This uses the values generated by the grid_variables\n",
+    "analytics = example_pop.evolve()  # TODO: update this function call"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "91ab45c7-7d31-4543-aee4-127ab58e891f",
+   "metadata": {},
+   "source": [
+    "After the run is complete, some technical report on the run is returned. I stored that in `analytics`. As we can see below, this dictionary is like a status report of the evolution. Useful for e.g. debugging."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 10,
+   "id": "e1f0464b-0424-4022-b34b-5b744bc2c59d",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "{'population_name': '2a7732d03e594ef4b5dfe9051b41d9c0', 'evolution_type': 'grid', 'failed_count': 0, 'failed_prob': 0, 'failed_systems_error_codes': [], 'errors_exceeded': False, 'errors_found': False, 'total_probability': 0.05150046619238191, 'total_count': 20, 'start_timestamp': 1628444120.234709, 'end_timestamp': 1628444121.0144107, 'total_mass_run': 730.1048014407228, 'total_probability_weighted_mass_run': 0.2983275843337705, 'zero_prob_stars_skipped': 0}\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(analytics)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "6460df56-9fba-4817-9a1e-593ef15d98c1",
+   "metadata": {},
+   "source": [
+    "## Noteworthy functionality\n",
+    "Some extra features that are available from via the population object are:\n",
+    "- write_binary_c_calls_to_file: Function to write the calls that would be passed to binary_c to a file"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 11,
+   "id": "83f8e519-4f7c-474a-ad95-f175a34fae81",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Help on method write_binary_c_calls_to_file in module binarycpython.utils.grid:\n",
+      "\n",
+      "write_binary_c_calls_to_file(output_dir:Union[str, NoneType]=None, output_filename:Union[str, NoneType]=None, include_defaults:bool=False) -> None method of binarycpython.utils.grid.Population instance\n",
+      "    Function that loops over the grid code and writes the generated parameters to a file.\n",
+      "    In the form of a command line call\n",
+      "    \n",
+      "    Only useful when you have a variable grid as system_generator. MC wouldn't be that useful\n",
+      "    \n",
+      "    Also, make sure that in this export there are the basic parameters\n",
+      "    like m1,m2,sep, orb-per, ecc, probability etc.\n",
+      "    \n",
+      "    On default this will write to the datadir, if it exists\n",
+      "    \n",
+      "    Tasks:\n",
+      "        - TODO: test this function\n",
+      "        - TODO: make sure the binary_c_python .. output file has a unique name\n",
+      "    \n",
+      "    Args:\n",
+      "        output_dir: (optional, default = None) directory where to write the file to. If custom_options['data_dir'] is present, then that one will be used first, and then the output_dir\n",
+      "        output_filename: (optional, default = None) filename of the output. If not set it will be called \"binary_c_calls.txt\"\n",
+      "        include_defaults: (optional, default = None) whether to include the defaults of binary_c in the lines that are written. Beware that this will result in very long lines, and it might be better to just export the binary_c defaults and keep them in a separate file.\n",
+      "    \n",
+      "    Returns:\n",
+      "        filename: filename that was used to write the calls to\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "help(example_pop.write_binary_c_calls_to_file)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 12,
+   "id": "dacfed75-dfe3-4afd-a0ff-a4be17746021",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Generating grid code\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Saving grid code to grid_options\n",
+      "Writing grid code to /tmp/binary_c_python/binary_c_grid_2a7732d03e594ef4b5dfe9051b41d9c0.py\n",
+      "Loading grid code function from /tmp/binary_c_python/binary_c_grid_2a7732d03e594ef4b5dfe9051b41d9c0.py\n",
+      "Grid code loaded\n",
+      "Writing binary_c calls to /tmp/binary_c_python/example_python_population_result/binary_c_calls.txt\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "Grid has handled 20 stars\n",
+      "with a total probability of 0.05150046619238192\n",
+      "/tmp/binary_c_python/example_python_population_result/binary_c_calls.txt\n",
+      "binary_c M_1 2.0 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.013208238029791246\n",
+      "binary_c M_1 2.5102526289471614 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.009829948023831718\n",
+      "binary_c M_1 3.1506841305680684 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.0073157281034221516\n",
+      "binary_c M_1 3.9545065608702976 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.005444573822104362\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_pop.set(verbosity=10)\n",
+    "calls_filename = example_pop.write_binary_c_calls_to_file()\n",
+    "print(calls_filename)\n",
+    "\n",
+    "with open(calls_filename, 'r') as f:\n",
+    "    print('\\n'.join(f.read().splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "60359eb1-4d0c-4d2d-8265-ec5171b944a2",
+   "metadata": {},
+   "source": [
+    "## Full examples of population scripts\n",
+    "Below is a full setup for a population of single stars"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 13,
+   "id": "7212b6be-9787-4122-a7f1-86538cf38179",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Grid has handled 20 stars\n",
+      "with a total probability of 0.05150046619238192\n",
+      "Total starcount for this run will be: 20\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Population-3680f3882c0a449c944462abffea2447 finished! The total probability was: 0.05150046619238191. It took a total of 0.6246354579925537s to run 20 systems on 2 cores\n",
+      "There were no errors found in this run.\n",
+      "\n",
+      "\n",
+      "time mass zams_mass probability radius stellar_type\n",
+      "2.867655467480e+01 1.33079 9.81391 0.00167028 1.72498e-05 13\n",
+      "1.931266944719e+01 1.3933 12.3177 0.00124307 1.72498e-05 13\n",
+      "4.439623364590e+01 1.38004 7.81906 0.00224431 1.72498e-05 13\n",
+      "1.364277535630e+01 1.47961 15.4603 0.000925128 1.72498e-05 13\n",
+      "1.017435498578e+01 1.59052 19.4046 0.000688507 1.72498e-05 13\n",
+      "8.294870923827e+00 1.7197 24.3552 0.000512406 1.72498e-05 13\n",
+      "6.802132608769e+00 1.84162 30.5689 0.000381347 1.72498e-05 13\n",
+      "5.723570798020e+00 1.99471 38.3678 0.00028381 1.72498e-05 13\n",
+      "4.933751523833e+00 2.15875 48.1564 0.000211219 1.72498e-05 13\n",
+      "4.337250536639e+00 2.35209 60.4424 0.000157195 9.97286e-06 14\n",
+      "3.862081089332e+00 2.56776 75.8628 0.000116989 1.08873e-05 14\n",
+      "3.449960890183e+00 2.80457 95.2174 8.70668e-05 1.18914e-05 14\n",
+      "3.172196856333e+00 3.05193 119.51 6.47976e-05 1.29402e-05 14\n",
+      "3.069627290216e+00 3.27563 150 4.82242e-05 1.38887e-05 14\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "import os\n",
+    "\n",
+    "from binarycpython.utils.grid import Population\n",
+    "from binarycpython.utils.custom_logging_functions import temp_dir\n",
+    "\n",
+    "def parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parsing function\n",
+    "    \"\"\"\n",
+    "    \n",
+    "    # extract info from the population instance\n",
+    "\n",
+    "    # Get some information from the\n",
+    "    data_dir = self.custom_options[\"data_dir\"]\n",
+    "    base_filename = self.custom_options[\"base_filename\"]\n",
+    "\n",
+    "    # Check directory, make if necessary\n",
+    "    os.makedirs(data_dir, exist_ok=True)\n",
+    "\n",
+    "    #\n",
+    "    seperator = \" \"\n",
+    "\n",
+    "    # Create filename\n",
+    "    outfilename = os.path.join(data_dir, base_filename)\n",
+    "\n",
+    "    # The header columns matching this \n",
+    "    parameters = [\"time\", \"mass\", \"zams_mass\", \"probability\", \"radius\", \"stellar_type\"]\n",
+    "\n",
+    "    # Go over the output.\n",
+    "    for el in output.splitlines():\n",
+    "        headerline = el.split()[0]\n",
+    "\n",
+    "        # CHeck the header and act accordingly\n",
+    "        if headerline == \"MY_STELLAR_DATA\":\n",
+    "            values = el.split()[1:]\n",
+    "\n",
+    "            if not len(parameters) == len(values):\n",
+    "                print(\"Amount of column names isnt equal to amount of columns\")\n",
+    "                raise ValueError\n",
+    "\n",
+    "            if not os.path.exists(outfilename):\n",
+    "                with open(outfilename, \"w\") as f:\n",
+    "                    f.write(seperator.join(parameters) + \"\\n\")\n",
+    "\n",
+    "            with open(outfilename, \"a\") as f:\n",
+    "                f.write(seperator.join(values) + \"\\n\")\n",
+    "\n",
+    "\n",
+    "# Create population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# If you want verbosity, set this before other things\n",
+    "example_pop.set(verbosity=0)\n",
+    "\n",
+    "# Setting values can be done via .set(<parameter_name>=<value>)\n",
+    "example_pop.set(\n",
+    "    # binary_c physics options\n",
+    "    M_1=10,  # bse_options\n",
+    "    separation=0,  # bse_options\n",
+    "    orbital_period=45000000080,  # bse_options\n",
+    "    max_evolution_time=15000,  # bse_options\n",
+    "    eccentricity=0.02,  # bse_options\n",
+    "    \n",
+    "    # grid_options\n",
+    "    amt_cores=2,  # grid_options\n",
+    "\n",
+    "    # Custom options: the data directory and the output filename\n",
+    "    data_dir=os.path.join(\n",
+    "        temp_dir(), \"example_python_population_result\"\n",
+    "    ),  # custom_options\n",
+    "    base_filename=\"example_pop.dat\",  # custom_options\n",
+    ")\n",
+    "\n",
+    "# Creating a parsing function\n",
+    "example_pop.set(\n",
+    "    parse_function=parse_function,  # Setting the parse function thats used in the evolve_population\n",
+    ")\n",
+    "\n",
+    "### Custom logging\n",
+    "# Log the moment when the star turns into neutron\n",
+    "example_pop.set(\n",
+    "    C_logging_code=\"\"\"\n",
+    "if(stardata->star[0].stellar_type >= 13)    \n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"MY_STELLAR_DATA %30.12e %g %g %g %g %d\\\\n\",\n",
+    "            // \n",
+    "            stardata->model.time, // 1\n",
+    "            stardata->star[0].mass, // 2\n",
+    "            stardata->common.zero_age.mass[0], // 4\n",
+    "            stardata->model.probability, // 5\n",
+    "            stardata->star[0].radius, // 6\n",
+    "            stardata->star[0].stellar_type // 7\n",
+    "      );\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    ")\n",
+    "\n",
+    "# Add grid variables\n",
+    "resolution = {\"M_1\": 20}\n",
+    "\n",
+    "# Mass\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"lnm1\",\n",
+    "    longname=\"Primary mass\",\n",
+    "    valuerange=[2, 150],\n",
+    "    resolution=\"{}\".format(resolution[\"M_1\"]),\n",
+    "    spacingfunc=\"const(math.log(2), math.log(150), {})\".format(resolution[\"M_1\"]),\n",
+    "    precode=\"M_1=math.exp(lnm1)\",\n",
+    "    probdist=\"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+    "    dphasevol=\"dlnm1\",\n",
+    "    parameter_name=\"M_1\",\n",
+    "    condition=\"\",\n",
+    ")\n",
+    "\n",
+    "# Exporting of all the settings can be done with .export_all_info()\n",
+    "example_pop.export_all_info()\n",
+    "\n",
+    "# remove the result file if it exists\n",
+    "if os.path.isfile(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\")):\n",
+    "    os.remove(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"))\n",
+    "\n",
+    "\n",
+    "# Evolve the population\n",
+    "example_pop.evolve()\n",
+    "\n",
+    "# \n",
+    "with open(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"), 'r') as f:\n",
+    "    output = f.read()\n",
+    "print(\"\\n\")\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "c2ab0979-6575-481d-9c1c-ca98517b2437",
+   "metadata": {},
+   "source": [
+    "We can also set up a population that samples biinary systems, by adding extra grid variables. Below is an example of a full script that runs a binary population and registers when a double compact object is formed. The logging is rather compact and should be expanded top be more useful"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 14,
+   "id": "79acdbb2-7dd6-45c4-9609-80994f03619a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Constructing/adding: q\n",
+      "Constructing/adding: log10per\n",
+      "Grid has handled 125 stars\n",
+      "with a total probability of 0.0862478164626921\n",
+      "Total starcount for this run will be: 125\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Constructing/adding: q\n",
+      "Constructing/adding: log10per\n",
+      "Population-d20a4c74d20a43b881c0c9e5def5f76c finished! The total probability was: 0.08624781646269201. It took a total of 8.561265707015991s to run 125 systems on 2 cores\n",
+      "There were no errors found in this run.\n",
+      "\n",
+      "\n",
+      "time mass_1 zams_mass_1 mass_2 zams_mass_2 stellar_type_1 prev_stellar_type_1 stellar_type_2 prev_stellar_type_2 metallicity probability\n",
+      "8.863377990313e+01 1.29444 5.88566 0 2.99283 13 5 15 15 0.02 0.000627913\n",
+      "1.146421815741e+02 0 5.88566 1.33062 4.43925 15 15 13 5 0.02 0.000627913\n",
+      "7.222715508467e+01 1.34922 5.88566 0 5.88566 13 5 15 15 0.02 0.000627913\n",
+      "1.350021848285e+01 1.48488 17.3205 0 0.1 13 5 15 15 0.02 0.000154349\n",
+      "1.171108213270e+01 1.53113 17.3205 0 0.1 13 5 15 15 0.02 0.000154349\n",
+      "1.171086983243e+01 1.53177 17.3205 0 0.1 13 9 15 15 0.02 0.000154349\n",
+      "1.170770599495e+01 1.53176 17.3205 0 4.40513 13 5 15 15 0.02 0.000172877\n",
+      "1.230407246199e+01 1.59499 17.3205 0 4.40513 13 5 15 15 0.02 0.000610573\n",
+      "1.108751340926e+01 1.70319 17.3205 0 8.71025 13 4 15 15 0.02 0.000610573\n",
+      "1.941017702765e+01 1.34903 17.3205 1.65097 8.71025 13 13 13 5 0.02 0.000172877\n",
+      "1.980988739731e+01 1.36979 17.3205 1.60808 8.71025 13 13 13 5 0.02 0.000121486\n",
+      "3.571858031651e+01 1.53174 17.3205 1.30504 8.71025 13 13 13 5 0.02 8.42148e-05\n",
+      "3.459153942631e+01 1.53176 17.3205 1.31004 8.71025 13 13 13 5 0.02 9.8162e-05\n",
+      "1.687368550125e+01 1.34937 17.3205 1.73856 13.0154 13 13 13 8 0.02 0.000172877\n",
+      "1.194842917007e+01 1.78096 17.3205 0 13.0154 13 8 15 15 0.02 0.000610573\n",
+      "1.733614170983e+01 1.53184 17.3205 1.42375 13.0154 13 13 13 5 0.02 9.8162e-05\n",
+      "1.723547465714e+01 1.38403 17.3205 1.71288 13.0154 13 13 13 8 0.02 0.000121486\n",
+      "1.764340254985e+01 1.53174 17.3205 1.41264 13.0154 13 13 13 5 0.02 8.42148e-05\n",
+      "1.170425790780e+01 1.52963 17.3205 0 17.3205 13 5 15 15 0.02 0.000172877\n",
+      "8.922967341481e+00 1.85486 17.3205 0 17.3205 13 8 15 15 0.02 0.000610573\n",
+      "1.232906623449e+01 1.41074 17.3205 1.34281 17.3205 13 13 13 8 0.02 0.000121486\n",
+      "1.170775828562e+01 1.53183 17.3205 1.53183 17.3205 13 5 13 5 0.02 9.8162e-05\n",
+      "1.170770422321e+01 1.53175 17.3205 1.53175 17.3205 13 5 13 5 0.02 8.42148e-05\n",
+      "5.075844624794e+00 2.12303 50.9713 0 0.1 13 8 15 15 0.02 3.79411e-05\n",
+      "4.766606588165e+00 2.20484 50.9713 0 0.1 14 8 15 15 0.02 3.79411e-05\n",
+      "4.768305081494e+00 2.18838 50.9713 0 0.1 13 8 15 15 0.02 3.79411e-05\n",
+      "4.458869865939e+00 2.29864 50.9713 0 12.8178 14 8 15 15 0.02 0.000150087\n",
+      "1.806014211040e+01 2.10446 50.9713 1.40749 12.8178 13 13 13 5 0.02 2.9863e-05\n",
+      "4.797342083485e+00 2.10328 50.9713 0 12.8178 13 13 15 1 0.02 4.24954e-05\n",
+      "1.721374713429e+01 2.21673 50.9713 1.42212 12.8178 14 14 13 5 0.02 2.41295e-05\n",
+      "4.055645404546e+00 2.47276 50.9713 0 25.5357 14 7 15 15 0.02 0.000150087\n",
+      "1.806123543037e+01 2.21893 50.9713 1.40745 12.8178 14 14 13 5 0.02 2.07011e-05\n",
+      "8.117519147635e+00 2.10433 50.9713 2.21473 25.5357 13 13 14 8 0.02 4.24954e-05\n",
+      "8.315554923168e+00 2.15343 50.9713 2.08519 25.5357 13 13 13 8 0.02 2.9863e-05\n",
+      "7.917420996633e+00 2.21892 50.9713 1.7431 25.5357 14 14 13 8 0.02 2.07011e-05\n",
+      "7.693213405973e+00 2.21805 50.9713 1.78384 25.5357 14 14 13 8 0.02 2.41295e-05\n",
+      "3.753837732894e+00 2.62517 50.9713 0 38.2535 14 7 15 15 0.02 0.000150087\n",
+      "7.087296558990e+00 2.10417 50.9713 2.40935 38.2535 13 13 14 8 0.02 4.24954e-05\n",
+      "7.007109286263e+00 2.15854 50.9713 2.28672 38.2535 13 13 14 8 0.02 2.9863e-05\n",
+      "5.653200958306e+00 2.21878 50.9713 2.0587 38.2535 14 14 13 8 0.02 2.41295e-05\n",
+      "5.733794947644e+00 2.21892 50.9713 1.99255 38.2535 14 14 13 8 0.02 2.07011e-05\n",
+      "3.513216011269e+00 2.76647 50.9713 0 50.9713 14 7 15 15 0.02 0.000150087\n",
+      "4.750574783854e+00 2.27442 50.9713 0 50.9713 14 8 15 15 0.02 4.24954e-05\n",
+      "7.278384712062e+00 1.29678 50.9713 2.09216 50.9713 13 8 13 13 0.02 2.9863e-05\n",
+      "4.765996194699e+00 2.20787 50.9713 2.20787 50.9713 14 8 14 8 0.02 2.07011e-05\n",
+      "4.765535914728e+00 2.21331 50.9713 2.21331 50.9713 14 8 14 8 0.02 2.41295e-05\n",
+      "3.104706358826e+00 3.17639 150 0 0.1 14 7 15 15 0.02 9.32641e-06\n",
+      "3.069363482023e+00 3.27572 150 0 0.1 14 7 15 15 0.02 9.32641e-06\n",
+      "3.047074050271e+00 3.3836 150 0 37.575 14 7 15 15 0.02 3.68933e-05\n",
+      "5.974759306305e+00 3.23604 150 2.53922 37.575 14 14 14 7 0.02 1.04459e-05\n",
+      "6.074084349384e+00 3.30145 150 2.13876 37.575 14 14 13 8 0.02 7.34071e-06\n",
+      "5.733865371895e+00 3.29994 150 2.00498 37.575 14 14 13 8 0.02 5.93135e-06\n",
+      "3.027099358410e+00 3.53631 150 0 75.05 14 7 15 15 0.02 3.68933e-05\n",
+      "5.807147339697e+00 3.30197 150 1.9791 37.575 14 14 13 8 0.02 5.08861e-06\n",
+      "4.862942347290e+00 3.25294 150 2.97823 75.05 14 14 14 7 0.02 1.04459e-05\n",
+      "4.556479830908e+00 3.29942 150 2.73221 75.05 14 14 14 7 0.02 7.34071e-06\n",
+      "3.853070305680e+00 3.29977 150 2.62486 75.05 14 14 14 7 0.02 5.93135e-06\n",
+      "3.881529045940e+00 3.30149 150 2.55924 75.05 14 14 14 7 0.02 5.08861e-06\n",
+      "3.015033359333e+00 3.64419 150 0 112.525 14 7 15 15 0.02 3.68933e-05\n",
+      "4.126828648362e+00 3.32047 150 0 112.525 14 14 15 3 0.02 1.04459e-05\n",
+      "3.990017992944e+00 3.3032 150 2.94027 112.525 14 14 14 7 0.02 7.34071e-06\n",
+      "3.206771867883e+00 3.07671 150 3.11282 112.525 14 14 14 7 0.02 5.93135e-06\n",
+      "3.006827156705e+00 3.72638 150 0 150 14 7 15 15 0.02 3.68933e-05\n",
+      "3.218786094847e+00 3.30337 150 3.01344 112.525 14 14 14 7 0.02 5.08861e-06\n",
+      "4.527722847382e+00 1.42238 150 0 150 13 5 15 15 0.02 1.04459e-05\n",
+      "3.069567332611e+00 3.27804 150 3.27804 150 14 7 14 7 0.02 5.93135e-06\n",
+      "5.726405299909e+00 1.29746 150 3.22759 150 13 8 14 14 0.02 7.34071e-06\n",
+      "3.069626478211e+00 3.27565 150 3.27565 150 14 7 14 7 0.02 5.08861e-06\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "import os\n",
+    "\n",
+    "from binarycpython.utils.grid import Population\n",
+    "from binarycpython.utils.custom_logging_functions import temp_dir\n",
+    "\n",
+    "def parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parsing function\n",
+    "    \"\"\"\n",
+    "    \n",
+    "    # extract info from the population instance\n",
+    "\n",
+    "    # Get some information from the\n",
+    "    data_dir = self.custom_options[\"data_dir\"]\n",
+    "    base_filename = self.custom_options[\"base_filename\"]\n",
+    "\n",
+    "    # Check directory, make if necessary\n",
+    "    os.makedirs(data_dir, exist_ok=True)\n",
+    "\n",
+    "    #\n",
+    "    seperator = \" \"\n",
+    "\n",
+    "    # Create filename\n",
+    "    outfilename = os.path.join(data_dir, base_filename)\n",
+    "\n",
+    "    # The header columns matching this \n",
+    "    parameters = [\n",
+    "        \"time\", \n",
+    "        \"mass_1\", \"zams_mass_1\", \"mass_2\", \"zams_mass_2\",\n",
+    "        \"stellar_type_1\", \"prev_stellar_type_1\", \"stellar_type_2\", \"prev_stellar_type_2\", \n",
+    "        \"metallicity\", \"probability\"\n",
+    "    ]\n",
+    "    \n",
+    "    # Go over the output.\n",
+    "    for el in output.splitlines():\n",
+    "        headerline = el.split()[0]\n",
+    "\n",
+    "        # CHeck the header and act accordingly\n",
+    "        if headerline == \"EXAMPLE_DCO\":\n",
+    "            values = el.split()[1:]\n",
+    "\n",
+    "            if not len(parameters) == len(values):\n",
+    "                print(\"Amount of column names isnt equal to amount of columns\")\n",
+    "                raise ValueError\n",
+    "\n",
+    "            if not os.path.exists(outfilename):\n",
+    "                with open(outfilename, \"w\") as f:\n",
+    "                    f.write(seperator.join(parameters) + \"\\n\")\n",
+    "\n",
+    "            with open(outfilename, \"a\") as f:\n",
+    "                f.write(seperator.join(values) + \"\\n\")\n",
+    "\n",
+    "\n",
+    "# Create population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# If you want verbosity, set this before other things\n",
+    "example_pop.set(verbosity=0)\n",
+    "\n",
+    "# Setting values can be done via .set(<parameter_name>=<value>)\n",
+    "example_pop.set(\n",
+    "    # binary_c physics options\n",
+    "    M_1=10,  # bse_options\n",
+    "    separation=0,  # bse_options\n",
+    "    orbital_period=45000000080,  # bse_options\n",
+    "    max_evolution_time=15000,  # bse_options\n",
+    "    eccentricity=0.02,  # bse_options\n",
+    "    \n",
+    "    # grid_options\n",
+    "    amt_cores=2,  # grid_options\n",
+    "\n",
+    "    # Custom options: the data directory and the output filename\n",
+    "    data_dir=os.path.join(\n",
+    "        temp_dir(), \"example_python_population_result\"\n",
+    "    ),  # custom_options\n",
+    "    base_filename=\"example_pop.dat\",  # custom_options\n",
+    ")\n",
+    "\n",
+    "# Creating a parsing function\n",
+    "example_pop.set(\n",
+    "    parse_function=parse_function,  # Setting the parse function thats used in the evolve_population\n",
+    ")\n",
+    "\n",
+    "### Custom logging\n",
+    "# Log the moment when the star turns into neutron\n",
+    "example_pop.set(\n",
+    "    C_logging_code=\"\"\"\n",
+    "// logger to find gravitational wave progenitors\n",
+    "if(stardata->star[0].stellar_type>=NS && stardata->star[1].stellar_type>=NS)\n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"EXAMPLE_DCO %30.12e \" // 1\n",
+    "            \"%g %g %g %g \" // 2-5\n",
+    "            \"%d %d %d %d \" // 6-9\n",
+    "            \"%g %g\\\\n\", // 10-11\n",
+    "\n",
+    "            stardata->model.time, // 1\n",
+    "\n",
+    "            stardata->star[0].mass, //2\n",
+    "            stardata->common.zero_age.mass[0], //3\n",
+    "            stardata->star[1].mass, //4\n",
+    "            stardata->common.zero_age.mass[1], //5\n",
+    "\n",
+    "            stardata->star[0].stellar_type, //6\n",
+    "            stardata->previous_stardata->star[0].stellar_type, //7\n",
+    "            stardata->star[1].stellar_type, //8\n",
+    "            stardata->previous_stardata->star[1].stellar_type, //9\n",
+    "\n",
+    "            // model stuff\n",
+    "            stardata->common.metallicity, //10\n",
+    "            stardata->model.probability //11\n",
+    "        );\n",
+    "    }\n",
+    "    /* Kill the simulation to safe time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "}\n",
+    "\"\"\"\n",
+    ")\n",
+    "\n",
+    "# Add grid variables\n",
+    "resolution = {\"M_1\": 5, \"q\": 5, \"per\": 5}\n",
+    "\n",
+    "# Mass\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"lnm1\",\n",
+    "    longname=\"Primary mass\",\n",
+    "    valuerange=[2, 150],\n",
+    "    resolution=\"{}\".format(resolution[\"M_1\"]),\n",
+    "    spacingfunc=\"const(math.log(2), math.log(150), {})\".format(resolution[\"M_1\"]),\n",
+    "    precode=\"M_1=math.exp(lnm1)\",\n",
+    "    probdist=\"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+    "    dphasevol=\"dlnm1\",\n",
+    "    parameter_name=\"M_1\",\n",
+    "    condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    ")\n",
+    "\n",
+    "# Mass ratio\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"q\",\n",
+    "    longname=\"Mass ratio\",\n",
+    "    valuerange=[\"0.1/M_1\", 1],\n",
+    "    resolution=\"{}\".format(resolution['q']),\n",
+    "    spacingfunc=\"const(0.1/M_1, 1, {})\".format(resolution['q']),\n",
+    "    probdist=\"flatsections(q, [{'min': 0.1/M_1, 'max': 1.0, 'height': 1}])\",\n",
+    "    dphasevol=\"dq\",\n",
+    "    precode=\"M_2 = q * M_1\",\n",
+    "    parameter_name=\"M_2\",\n",
+    "    condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    ")\n",
+    "\n",
+    "#\n",
+    "example_pop.add_grid_variable(\n",
+    "   name=\"log10per\", # in days\n",
+    "   longname=\"log10(Orbital_Period)\",\n",
+    "   valuerange=[0.15, 5.5],\n",
+    "   resolution=\"{}\".format(resolution[\"per\"]),\n",
+    "   spacingfunc=\"const(0.15, 5.5, {})\".format(resolution[\"per\"]),\n",
+    "   precode=\"\"\"orbital_period = 10** log10per\n",
+    "sep = calc_sep_from_period(M_1, M_2, orbital_period)\n",
+    "sep_min = calc_sep_from_period(M_1, M_2, 10**0.15)\n",
+    "sep_max = calc_sep_from_period(M_1, M_2, 10**5.5)\"\"\",\n",
+    "   probdist=\"sana12(M_1, M_2, sep, orbital_period, sep_min, sep_max, math.log10(10**0.15), math.log10(10**5.5), -0.55)\",\n",
+    "   parameter_name=\"orbital_period\",\n",
+    "   dphasevol=\"dlog10per\",\n",
+    ")\n",
+    "\n",
+    "# Exporting of all the settings can be done with .export_all_info()\n",
+    "example_pop.export_all_info()\n",
+    "\n",
+    "# remove the result file if it exists\n",
+    "if os.path.isfile(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\")):\n",
+    "    os.remove(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"))\n",
+    "\n",
+    "# Evolve the population\n",
+    "example_pop.evolve()\n",
+    "\n",
+    "# \n",
+    "with open(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"), 'r') as f:\n",
+    "    output = f.read()\n",
+    "print(\"\\n\")\n",
+    "print(output)"
+   ]
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/build/html/objects.inv b/docs/build/html/objects.inv
index 77dbc4543a4042b06b62f79925729c970f39663e..64b1bdec6107c14e1aaf414394169a9a20c202b8 100644
Binary files a/docs/build/html/objects.inv and b/docs/build/html/objects.inv differ
diff --git a/docs/build/html/plot_functions.html b/docs/build/html/plot_functions.html
index a24848261512bb924cadba61dffb142a1cb72551..d8955d7894482744de8189e7860c519f83187d8e 100644
--- a/docs/build/html/plot_functions.html
+++ b/docs/build/html/plot_functions.html
@@ -30,6 +30,9 @@
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="_static/js/theme.js"></script>
 
@@ -99,7 +102,7 @@
 <li class="toctree-l2"><a class="reference internal" href="useful_funcs.html">useful_funcs module</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -171,7 +174,31 @@
           <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
            <div itemprop="articleBody">
             
-  <div class="section" id="module-binarycpython.utils.plot_functions">
+  
+<style>
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="module-binarycpython.utils.plot_functions">
 <span id="plot-functions-module"></span><h1>plot_functions module<a class="headerlink" href="#module-binarycpython.utils.plot_functions" title="Permalink to this headline">¶</a></h1>
 <p>Module that contains functionality to plot some properties of (binary) systems.</p>
 <p>Different routines are defined here to plot orbits, masses, angular momenta etc.</p>
@@ -182,10 +209,10 @@ plotting functions
 master function: plot_system</p>
 </dd>
 </dl>
-<p>All the loose components here can ofcourse be used in other routines if you want.</p>
-<p>There is no preloaded matplotlib rc, you should do that yourself</p>
-<p>These plotting routines are designed for binary systems, and admittingly they are here mostly for
-inspirational purposes, since one would problably want to customize the plots.
+<p>All the loose components here can of course be used in other routines if you want.</p>
+<p>There is no pre loaded matplotlib rc, you should do that yourself</p>
+<p>These plotting routines are designed for binary systems, and admittedly they are here mostly for
+inspirational purposes, since one would probably want to customise the plots.
 Regardless, having some plotting routines in here seemed like a nice idea</p>
 <dl class="simple">
 <dt>Tasks</dt><dd><p>TODO: This module is not finished yet.
@@ -446,9 +473,9 @@ This is not included in all the plotting routines.</p></li>
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/population_example.html b/docs/build/html/population_example.html
deleted file mode 100644
index 647eecf5aca06d295edbc0eec7a434a3f1fddbac..0000000000000000000000000000000000000000
--- a/docs/build/html/population_example.html
+++ /dev/null
@@ -1,637 +0,0 @@
-
-
-<!DOCTYPE html>
-<html class="writer-html5" lang="en" >
-<head>
-  <meta charset="utf-8">
-  
-  <meta name="viewport" content="width=device-width, initial-scale=1.0">
-  
-  <title>Example of population script &mdash; binary_c-python  documentation</title>
-  
-
-  
-  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
-  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
-
-  
-  
-  
-  
-
-  
-  <!--[if lt IE 9]>
-    <script src="_static/js/html5shiv.min.js"></script>
-  <![endif]-->
-  
-    
-      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
-        <script src="_static/jquery.js"></script>
-        <script src="_static/underscore.js"></script>
-        <script src="_static/doctools.js"></script>
-        <script src="_static/language_data.js"></script>
-    
-    <script type="text/javascript" src="_static/js/theme.js"></script>
-
-    
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
-    <link rel="next" title="Binary_c parameters" href="binary_c_parameters.html" />
-    <link rel="prev" title="Examples" href="general_examples.html" /> 
-</head>
-
-<body class="wy-body-for-nav">
-
-   
-  <div class="wy-grid-for-nav">
-    
-    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
-      <div class="wy-side-scroll">
-        <div class="wy-side-nav-search" >
-          
-
-          
-            <a href="index.html" class="icon icon-home" alt="Documentation Home"> binary_c-python
-          
-
-          
-          </a>
-
-          
-            
-            
-          
-
-          
-<div role="search">
-  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
-    <input type="text" name="q" placeholder="Search docs" />
-    <input type="hidden" name="check_keywords" value="yes" />
-    <input type="hidden" name="area" value="default" />
-  </form>
-</div>
-
-          
-        </div>
-
-        
-        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
-          
-            
-            
-              
-            
-            
-              <p class="caption"><span class="caption-text">Contents:</span></p>
-<ul class="current">
-<li class="toctree-l1"><a class="reference internal" href="readme_link.html">Python module for binary_c</a></li>
-<li class="toctree-l1"><a class="reference internal" href="modules.html">Binarycpython code</a></li>
-<li class="toctree-l1 current"><a class="reference internal" href="examples.html">Examples</a><ul class="current">
-<li class="toctree-l2"><a class="reference internal" href="general_examples.html">Examples</a></li>
-<li class="toctree-l2 current"><a class="current reference internal" href="#">Example of population script</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
-<li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
-<li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
-<li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/issues/new">Submit an issue</a></li>
-</ul>
-
-            
-          
-        </div>
-        
-      </div>
-    </nav>
-
-    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
-
-      
-      <nav class="wy-nav-top" aria-label="top navigation">
-        
-          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
-          <a href="index.html">binary_c-python</a>
-        
-      </nav>
-
-
-      <div class="wy-nav-content">
-        
-        <div class="rst-content">
-        
-          
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div role="navigation" aria-label="breadcrumbs navigation">
-
-  <ul class="wy-breadcrumbs">
-    
-      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
-        
-          <li><a href="examples.html">Examples</a> &raquo;</li>
-        
-      <li>Example of population script</li>
-    
-    
-      <li class="wy-breadcrumbs-aside">
-        
-            
-            <a href="_sources/population_example.rst.txt" rel="nofollow"> View page source</a>
-          
-        
-      </li>
-    
-  </ul>
-
-  
-  <hr/>
-</div>
-          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
-           <div itemprop="articleBody">
-            
-  <div class="section" id="example-of-population-script">
-<h1>Example of population script<a class="headerlink" href="#example-of-population-script" title="Permalink to this headline">¶</a></h1>
-<p>The source code of a script to run a population of stars.</p>
-<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>  1
-  2
-  3
-  4
-  5
-  6
-  7
-  8
-  9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202</pre></div></td><td class="code"><div class="highlight"><pre><span></span>
-
-<span class="kn">import</span> <span class="nn">os</span>
-<span class="kn">from</span> <span class="nn">binarycpython.utils.grid</span> <span class="kn">import</span> <span class="n">Population</span>
-<span class="kn">from</span> <span class="nn">binarycpython.utils.functions</span> <span class="kn">import</span> <span class="p">(</span>
-    <span class="n">get_help_all</span><span class="p">,</span>
-    <span class="n">get_help</span><span class="p">,</span>
-    <span class="n">create_hdf5</span><span class="p">,</span>
-    <span class="n">output_lines</span><span class="p">,</span>
-<span class="p">)</span>
-<span class="kn">from</span> <span class="nn">binarycpython.utils.custom_logging_functions</span> <span class="kn">import</span> <span class="n">temp_dir</span>
-
-<span class="c1">#########################################################</span>
-<span class="c1"># This file serves as an example for running a population.</span>
-<span class="c1"># The use of help(&lt;function&gt;) is a good way to inspect what parameters are there to use</span>
-<span class="c1">#########################################################</span>
-
-
-<span class="k">def</span> <span class="nf">parse_function</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">output</span><span class="p">):</span>
-    <span class="c1"># EXAMPLE PARSE_FUNCTION</span>
-
-    <span class="c1"># extract info from the population instance</span>
-
-    <span class="c1"># Get some information from the</span>
-    <span class="n">data_dir</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">custom_options</span><span class="p">[</span><span class="s2">&quot;data_dir&quot;</span><span class="p">]</span>
-    <span class="n">base_filename</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">custom_options</span><span class="p">[</span><span class="s2">&quot;base_filename&quot;</span><span class="p">]</span>
-
-    <span class="c1"># Check directory, make if necessary</span>
-    <span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="n">data_dir</span><span class="p">,</span> <span class="n">exist_ok</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
-
-    <span class="n">seperator</span> <span class="o">=</span> <span class="s2">&quot; &quot;</span>
-
-    <span class="c1"># Create filename</span>
-    <span class="n">outfilename</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">data_dir</span><span class="p">,</span> <span class="n">base_filename</span><span class="p">)</span>
-
-    <span class="n">parameters</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;time&quot;</span><span class="p">,</span> <span class="s2">&quot;mass&quot;</span><span class="p">,</span> <span class="s2">&quot;zams_mass&quot;</span><span class="p">,</span> <span class="s2">&quot;probability&quot;</span><span class="p">,</span> <span class="s2">&quot;radius&quot;</span><span class="p">,</span> <span class="s2">&quot;stellar_type&quot;</span><span class="p">]</span>
-
-    <span class="c1"># Go over the output.</span>
-    <span class="k">for</span> <span class="n">el</span> <span class="ow">in</span> <span class="n">output_lines</span><span class="p">(</span><span class="n">output</span><span class="p">):</span>
-        <span class="n">headerline</span> <span class="o">=</span> <span class="n">el</span><span class="o">.</span><span class="n">split</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span>
-
-        <span class="c1"># CHeck the header and act accordingly</span>
-        <span class="k">if</span> <span class="n">headerline</span> <span class="o">==</span> <span class="s2">&quot;MY_STELLAR_DATA&quot;</span><span class="p">:</span>
-            <span class="n">values</span> <span class="o">=</span> <span class="n">el</span><span class="o">.</span><span class="n">split</span><span class="p">()[</span><span class="mi">1</span><span class="p">:]</span>
-            <span class="nb">print</span><span class="p">(</span><span class="n">values</span><span class="p">)</span>
-
-            <span class="k">if</span> <span class="ow">not</span> <span class="nb">len</span><span class="p">(</span><span class="n">parameters</span><span class="p">)</span> <span class="o">==</span> <span class="nb">len</span><span class="p">(</span><span class="n">values</span><span class="p">):</span>
-                <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Amount of column names isnt equal to amount of columns&quot;</span><span class="p">)</span>
-                <span class="k">raise</span> <span class="ne">ValueError</span>
-
-            <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">outfilename</span><span class="p">):</span>
-                <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">outfilename</span><span class="p">,</span> <span class="s2">&quot;w&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
-                    <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">seperator</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">parameters</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>
-
-            <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">outfilename</span><span class="p">,</span> <span class="s2">&quot;a&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
-                <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">seperator</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">values</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>
-
-
-<span class="c1"># Create population object</span>
-<span class="n">example_pop</span> <span class="o">=</span> <span class="n">Population</span><span class="p">()</span>
-
-<span class="c1"># If you want verbosity, set this before other things</span>
-<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">verbose</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
-
-<span class="c1"># Setting values can be done via .set(&lt;parameter_name&gt;=&lt;value&gt;)</span>
-<span class="c1"># Values that are known to be binary_c_parameters are loaded into bse_options.</span>
-<span class="c1"># Those that are present in the default grid_options are set in grid_options</span>
-<span class="c1"># All other values that you set are put in a custom_options dict</span>
-<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
-    <span class="c1"># binary_c physics options</span>
-    <span class="n">M_1</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span>  <span class="c1"># bse_options</span>
-    <span class="n">separation</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span>  <span class="c1"># bse_options</span>
-    <span class="n">orbital_period</span><span class="o">=</span><span class="mi">45000000080</span><span class="p">,</span>  <span class="c1"># bse_options</span>
-    <span class="n">max_evolution_time</span><span class="o">=</span><span class="mi">15000</span><span class="p">,</span>  <span class="c1"># bse_options</span>
-    <span class="n">eccentricity</span><span class="o">=</span><span class="mf">0.02</span><span class="p">,</span>  <span class="c1"># bse_options</span>
-    <span class="c1"># Set companion to low mass</span>
-    <span class="n">M_2</span><span class="o">=</span><span class="mf">0.08</span><span class="p">,</span>  <span class="c1"># Since in the example we run a single system, we should set the companion mass here. If we donm&#39;t do this, the code will complain.</span>
-    <span class="c1"># grid_options</span>
-    <span class="n">amt_cores</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span>  <span class="c1"># grid_options</span>
-    <span class="n">verbose</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>  <span class="c1"># verbosity. Not fully configured correctly yet but having it value of 1 prints alot of stuff</span>
-    <span class="c1"># Custom options # TODO: need to be set in grid_options probably</span>
-    <span class="n">data_dir</span><span class="o">=</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span>
-        <span class="n">temp_dir</span><span class="p">(),</span> <span class="s2">&quot;example_python_population_result&quot;</span>
-    <span class="p">),</span>  <span class="c1"># custom_options</span>
-    <span class="n">base_filename</span><span class="o">=</span><span class="s2">&quot;example_pop.dat&quot;</span><span class="p">,</span>  <span class="c1"># custom_options</span>
-<span class="p">)</span>
-
-<span class="c1"># Creating a parsing function</span>
-<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
-    <span class="n">parse_function</span><span class="o">=</span><span class="n">parse_function</span><span class="p">,</span>  <span class="c1"># Setting the parse function thats used in the evolve_population</span>
-<span class="p">)</span>
-
-<span class="c1">### Custom logging</span>
-
-<span class="c1">## Below example requires changing the parse function</span>
-<span class="c1">## very simple example of custom logging. Will work but need to change the parse function to handle that nicely.</span>
-<span class="c1"># example_pop.set(</span>
-<span class="c1">#     C_auto_logging={</span>
-<span class="c1">#         &quot;MY_HEADER_LINE&quot;: [&quot;star[0].mass&quot;, &quot;star[1].mass&quot;, &quot;model.probability&quot;]</span>
-<span class="c1">#     }</span>
-<span class="c1"># )</span>
-
-
-<span class="c1"># Log the moment when the star turns into neutron</span>
-<span class="n">example_pop</span><span class="o">.</span><span class="n">set</span><span class="p">(</span>
-    <span class="n">C_logging_code</span><span class="o">=</span><span class="s2">&quot;&quot;&quot;</span>
-<span class="s2">if(stardata-&gt;star[0].stellar_type &gt;= 13)    </span>
-<span class="s2">{</span>
-<span class="s2">    if (stardata-&gt;model.time &lt; stardata-&gt;model.max_evolution_time)</span>
-<span class="s2">    {</span>
-<span class="s2">        Printf(&quot;MY_STELLAR_DATA </span><span class="si">%30.12e</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%d</span><span class="se">\\</span><span class="s2">n&quot;,</span>
-<span class="s2">            // </span>
-<span class="s2">            stardata-&gt;model.time, // 1</span>
-<span class="s2">            stardata-&gt;star[0].mass, // 2</span>
-<span class="s2">            stardata-&gt;common.zero_age.mass[0], // 4</span>
-<span class="s2">            stardata-&gt;model.probability, // 5</span>
-<span class="s2">            stardata-&gt;star[0].radius, // 6</span>
-<span class="s2">            stardata-&gt;star[0].stellar_type // 7</span>
-<span class="s2">      );</span>
-<span class="s2">    };</span>
-<span class="s2">    /* Kill the simulation to save time */</span>
-<span class="s2">    stardata-&gt;model.max_evolution_time = stardata-&gt;model.time - stardata-&gt;model.dtm;</span>
-<span class="s2">};</span>
-<span class="s2">&quot;&quot;&quot;</span>
-<span class="p">)</span>
-
-<span class="c1"># Add grid variables</span>
-<span class="n">resolution</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;M_1&quot;</span><span class="p">:</span> <span class="mi">20</span><span class="p">,</span> <span class="s2">&quot;q&quot;</span><span class="p">:</span> <span class="mi">20</span><span class="p">,</span> <span class="s2">&quot;per&quot;</span><span class="p">:</span> <span class="mi">40</span><span class="p">}</span>
-
-<span class="c1"># Mass</span>
-<span class="n">example_pop</span><span class="o">.</span><span class="n">add_grid_variable</span><span class="p">(</span>
-    <span class="n">name</span><span class="o">=</span><span class="s2">&quot;lnm1&quot;</span><span class="p">,</span>
-    <span class="n">longname</span><span class="o">=</span><span class="s2">&quot;Primary mass&quot;</span><span class="p">,</span>
-    <span class="n">valuerange</span><span class="o">=</span><span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">150</span><span class="p">],</span>
-    <span class="n">resolution</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">resolution</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">]),</span>
-    <span class="n">spacingfunc</span><span class="o">=</span><span class="s2">&quot;const(math.log(2), math.log(150), </span><span class="si">{}</span><span class="s2">)&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">resolution</span><span class="p">[</span><span class="s2">&quot;M_1&quot;</span><span class="p">]),</span>
-    <span class="n">precode</span><span class="o">=</span><span class="s2">&quot;M_1=math.exp(lnm1)&quot;</span><span class="p">,</span>
-    <span class="n">probdist</span><span class="o">=</span><span class="s2">&quot;three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1&quot;</span><span class="p">,</span>
-    <span class="n">dphasevol</span><span class="o">=</span><span class="s2">&quot;dlnm1&quot;</span><span class="p">,</span>
-    <span class="n">parameter_name</span><span class="o">=</span><span class="s2">&quot;M_1&quot;</span><span class="p">,</span>
-    <span class="n">condition</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span>  <span class="c1"># Impose a condition on this grid variable. Mostly for a check for yourself</span>
-<span class="p">)</span>
-
-<span class="c1"># # Mass ratio</span>
-<span class="c1"># test_pop.add_grid_variable(</span>
-<span class="c1">#     name=&quot;q&quot;,</span>
-<span class="c1">#     longname=&quot;Mass ratio&quot;,</span>
-<span class="c1">#     valuerange=[&quot;0.1/M_1&quot;, 1],</span>
-<span class="c1">#     resolution=&quot;{}&quot;.format(resolution[&#39;q&#39;]),</span>
-<span class="c1">#     spacingfunc=&quot;const(0.1/M_1, 1, {})&quot;.format(resolution[&#39;q&#39;]),</span>
-<span class="c1">#     probdist=&quot;flatsections(q, [{&#39;min&#39;: 0.1/M_1, &#39;max&#39;: 1.0, &#39;height&#39;: 1}])&quot;,</span>
-<span class="c1">#     dphasevol=&quot;dq&quot;,</span>
-<span class="c1">#     precode=&quot;M_2 = q * M_1&quot;,</span>
-<span class="c1">#     parameter_name=&quot;M_2&quot;,</span>
-<span class="c1">#     condition=&quot;&quot;,  # Impose a condition on this grid variable. Mostly for a check for yourself</span>
-<span class="c1"># )</span>
-
-<span class="c1"># #</span>
-<span class="c1"># test_pop.add_grid_variable(</span>
-<span class="c1">#    name=&quot;log10per&quot;, # in days</span>
-<span class="c1">#    longname=&quot;log10(Orbital_Period)&quot;,</span>
-<span class="c1">#    valuerange=[0.15, 5.5],</span>
-<span class="c1">#    resolution=&quot;{}&quot;.format(resolution[&quot;per&quot;]),</span>
-<span class="c1">#    spacingfunc=&quot;const(0.15, 5.5, {})&quot;.format(resolution[&quot;per&quot;]),</span>
-<span class="c1">#    precode=&quot;&quot;&quot;orbital_period = 10** log10per</span>
-<span class="c1"># sep = calc_sep_from_period(M_1, M_2, orbital_period)</span>
-<span class="c1"># sep_min = calc_sep_from_period(M_1, M_2, 10**0.15)</span>
-<span class="c1"># sep_max = calc_sep_from_period(M_1, M_2, 10**5.5)&quot;&quot;&quot;,</span>
-<span class="c1">#    probdist=&quot;sana12(M_1, M_2, sep, orbital_period, sep_min, sep_max, math.log10(10**0.15), math.log10(10**5.5), -0.55)&quot;,</span>
-<span class="c1">#    parameter_name=&quot;orbital_period&quot;,</span>
-<span class="c1">#    dphasevol=&quot;dlog10per&quot;,</span>
-<span class="c1"># )</span>
-
-
-<span class="c1"># Exporting of all the settings can be done with .export_all_info()</span>
-<span class="c1"># on default it exports everything, but can be supressed by turning it off:</span>
-<span class="c1">#   population settings (bse_options, grid_options, custom_options), turn off with include_population</span>
-<span class="c1">#       settings=False</span>
-<span class="c1">#   binary_c_defaults (all the commandline arguments that binary c accepts, and their defaults).</span>
-<span class="c1">#       turn off with include_binary_c_defaults=False</span>
-<span class="c1">#   include_binary_c_version_info (all the compilation info, and information about the compiled</span>
-<span class="c1">#       parameters), turn off with include_binary_c_version_info=False</span>
-<span class="c1">#   include_binary_c_help_all (all the help information for all the binary_c parameters),</span>
-<span class="c1">#       turn off with include_binary_c_help_all=Fase</span>
-<span class="c1"># On default it will write this to the custom_options[&#39;data_dir&#39;], but that can be overriden by</span>
-<span class="c1">#   setting use_datadir=False and providing an outfile=&lt;&gt;</span>
-<span class="n">example_pop</span><span class="o">.</span><span class="n">export_all_info</span><span class="p">()</span>
-
-<span class="c1">## Executing a single system</span>
-<span class="c1">## This uses the M_1 orbital period etc set with the set function</span>
-<span class="c1"># output = example_pop.evolve_single()</span>
-<span class="c1"># print(output)</span>
-
-<span class="c1">## Executing a population</span>
-<span class="c1">## This uses the values generated by the grid_variables</span>
-<span class="n">example_pop</span><span class="o">.</span><span class="n">evolve</span><span class="p">()</span>  <span class="c1"># TODO: update this function call</span>
-
-<span class="c1"># Wrapping up the results to an hdf5 file can be done by using the create_hdf5</span>
-<span class="c1"># (&lt;directory containing data and settings&gt;) This function takes the settings file</span>
-<span class="c1"># (ending in _settings.json) and the data files (ending in .dat) from the data_dir</span>
-<span class="c1"># and packing them into an hdf5 file, which is then written into the same data_dir directory</span>
-<span class="n">create_hdf5</span><span class="p">(</span><span class="n">data_dir</span><span class="o">=</span><span class="n">example_pop</span><span class="o">.</span><span class="n">custom_options</span><span class="p">[</span><span class="s2">&quot;data_dir&quot;</span><span class="p">],</span> <span class="n">name</span><span class="o">=</span><span class="s2">&quot;example_pop.hdf5&quot;</span><span class="p">)</span>
-</pre></div>
-</td></tr></table></div>
-</div>
-
-
-           </div>
-           
-          </div>
-          <footer>
-  
-    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
-      
-        <a href="binary_c_parameters.html" class="btn btn-neutral float-right" title="Binary_c parameters" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
-      
-      
-        <a href="general_examples.html" class="btn btn-neutral float-left" title="Examples" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
-      
-    </div>
-  
-
-  <hr/>
-
-  <div role="contentinfo">
-    <p>
-        
-        &copy; Copyright 2021, David Hendriks, Robert Izzard
-
-    </p>
-  </div>
-    
-    
-    
-    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
-    
-    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
-    
-    provided by <a href="https://readthedocs.org">Read the Docs</a>.
-<br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
-<br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
-
-
-
-</footer>
-
-        </div>
-      </div>
-
-    </section>
-
-  </div>
-  
-
-  <script type="text/javascript">
-      jQuery(function () {
-          SphinxRtdTheme.Navigation.enable(true);
-      });
-  </script>
-
-  
-  
-    
-   
-
-</body>
-</html>
\ No newline at end of file
diff --git a/docs/build/html/py-modindex.html b/docs/build/html/py-modindex.html
index 95e0b1124fc91a4120cfe5ca0521018a863bd561..43da11415cc5827285014f94e54e0bc54fd7b808 100644
--- a/docs/build/html/py-modindex.html
+++ b/docs/build/html/py-modindex.html
@@ -30,6 +30,9 @@
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="_static/js/theme.js"></script>
 
@@ -87,7 +90,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="readme_link.html">Python module for binary_c</a></li>
 <li class="toctree-l1"><a class="reference internal" href="modules.html">Binarycpython code</a></li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -252,9 +255,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/readme_link.html b/docs/build/html/readme_link.html
index 04e576c67b05db4e1760c16aad69858c7d56375c..b846653c63d15e830fe3403e8f7733a5f7b05c6c 100644
--- a/docs/build/html/readme_link.html
+++ b/docs/build/html/readme_link.html
@@ -30,6 +30,9 @@
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="_static/js/theme.js"></script>
 
@@ -102,7 +105,7 @@
 </ul>
 </li>
 <li class="toctree-l1"><a class="reference internal" href="modules.html">Binarycpython code</a></li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -172,7 +175,31 @@
           <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
            <div itemprop="articleBody">
             
-  <div class="section" id="python-module-for-binary-c">
+  
+<style>
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="python-module-for-binary-c">
 <h1>Python module for binary_c<a class="headerlink" href="#python-module-for-binary-c" title="Permalink to this headline">¶</a></h1>
 <p>Docstring coverage:</p>
 <a class="reference external image-reference" href="./badges/docstring_coverage.svg"><img alt="docstring coverage" src="_images/docstring_coverage.svg" /></a>
@@ -307,9 +334,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/run_system_wrapper.html b/docs/build/html/run_system_wrapper.html
index cbbe4564c5b75d36b762011d0fd98ae17de2899e..eb8f48abaa4f16696ad585a356efb3deda76f21d 100644
--- a/docs/build/html/run_system_wrapper.html
+++ b/docs/build/html/run_system_wrapper.html
@@ -30,6 +30,9 @@
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="_static/js/theme.js"></script>
 
@@ -99,7 +102,7 @@
 <li class="toctree-l2"><a class="reference internal" href="useful_funcs.html">useful_funcs module</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -171,7 +174,31 @@
           <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
            <div itemprop="articleBody">
             
-  <div class="section" id="module-binarycpython.utils.run_system_wrapper">
+  
+<style>
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="module-binarycpython.utils.run_system_wrapper">
 <span id="run-system-wrapper-module"></span><h1>run_system_wrapper module<a class="headerlink" href="#module-binarycpython.utils.run_system_wrapper" title="Permalink to this headline">¶</a></h1>
 <p>Module containing the utility function run_system,
 which handles a lot of things by analysing the passed kwargs</p>
@@ -184,7 +211,7 @@ Mostly as a useful utility function that handles all the setup of argument lists
 <ul class="simple">
 <li><p>run_system(M_1=10): will run a system with ZAMS mass 1 = 10</p></li>
 <li><dl class="simple">
-<dt>run_system(M_1=10, log_filename=”~/example_log.txt”): Will run a system</dt><dd><p>and write the logfile too</p>
+<dt>run_system(M_1=10, log_filename=”~/example_log.txt”): Will run a system</dt><dd><p>and write the log file too</p>
 </dd>
 </dl>
 </li>
@@ -203,8 +230,8 @@ Several extra arguments can be passed through the kwargs:</p>
 <dt>Kwargs:</dt><dd><dl class="simple">
 <dt>custom_logging_code: Should contain a string containing the c-code for the shared library.</dt><dd><p>If this is provided binary_c will use that custom logging code to output its data</p>
 </dd>
-<dt>log_filename: Should contain name of the binary_c system logfile.</dt><dd><p>Passing this will make sure that the filename gets written for a run
-(its default behaviour is NOT to write a logfile for a system)</p>
+<dt>log_filename: Should contain name of the binary_c system log file.</dt><dd><p>Passing this will make sure that the filename gets written for a run
+(its default behaviour is NOT to write a log file for a system)</p>
 </dd>
 <dt>parse_function (function): should contain a function that parses the output.</dt><dd><p>The parse function should take 1 required parameter: the output of the binaryc run
 Passing this will call the parse_function by passing it the output of the binary_c call
@@ -256,9 +283,9 @@ and returns what the parse_function returns</p>
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/search.html b/docs/build/html/search.html
index 1de40c2f8930e348f4fcbbf004cea0e5866038a7..e620701e47189698ac404882e69a0a53eb23c560 100644
--- a/docs/build/html/search.html
+++ b/docs/build/html/search.html
@@ -31,6 +31,9 @@
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="_static/js/theme.js"></script>
 
@@ -86,7 +89,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="readme_link.html">Python module for binary_c</a></li>
 <li class="toctree-l1"><a class="reference internal" href="modules.html">Binarycpython code</a></li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -191,9 +194,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/searchindex.js b/docs/build/html/searchindex.js
index 70adfe8322f7c623ed6a27b6646c3048481a450e..f40eeb8bcdd2a9d18f919b6a612e6fa5e9d6082f 100644
--- a/docs/build/html/searchindex.js
+++ b/docs/build/html/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["binary_c_parameters","custom_logging_functions","distribution_functions","examples","functions","general_examples","grid","grid_options_defaults","grid_options_descriptions","hpc_functions","index","modules","plot_functions","population_example","readme_link","run_system_wrapper","spacing_functions","stellar_types","useful_funcs"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,"sphinx.ext.todo":2,"sphinx.ext.viewcode":1,sphinx:56},filenames:["binary_c_parameters.rst","custom_logging_functions.rst","distribution_functions.rst","examples.rst","functions.rst","general_examples.rst","grid.rst","grid_options_defaults.rst","grid_options_descriptions.rst","hpc_functions.rst","index.rst","modules.rst","plot_functions.rst","population_example.rst","readme_link.rst","run_system_wrapper.rst","spacing_functions.rst","stellar_types.rst","useful_funcs.rst"],objects:{"binarycpython.utils":{custom_logging_functions:[1,0,0,"-"],distribution_functions:[2,0,0,"-"],functions:[4,0,0,"-"],grid:[6,0,0,"-"],grid_options_defaults:[7,0,0,"-"],hpc_functions:[9,0,0,"-"],plot_functions:[12,0,0,"-"],run_system_wrapper:[15,0,0,"-"],spacing_functions:[16,0,0,"-"],stellar_types:[17,0,0,"-"],useful_funcs:[18,0,0,"-"]},"binarycpython.utils.custom_logging_functions":{autogen_C_logging_code:[1,1,1,""],binary_c_log_code:[1,1,1,""],binary_c_write_log_code:[1,1,1,""],compile_shared_lib:[1,1,1,""],create_and_load_logging_function:[1,1,1,""],from_binary_c_config:[1,1,1,""],return_compilation_dict:[1,1,1,""]},"binarycpython.utils.distribution_functions":{"const":[2,1,1,""],Arenou2010_binary_fraction:[2,1,1,""],Izzard2012_period_distribution:[2,1,1,""],Kroupa2001:[2,1,1,""],Moe_de_Stefano_2017_multiplicity_fractions:[2,1,1,""],Moe_de_Stefano_2017_pdf:[2,1,1,""],build_q_table:[2,1,1,""],calc_P_integral:[2,1,1,""],calc_e_integral:[2,1,1,""],calc_total_probdens:[2,1,1,""],calculate_constants_three_part_powerlaw:[2,1,1,""],cosmic_SFH_madau_dickinson2014:[2,1,1,""],duquennoy1991:[2,1,1,""],fill_data:[2,1,1,""],flat:[2,1,1,""],flatsections:[2,1,1,""],gaussian:[2,1,1,""],gaussian_func:[2,1,1,""],gaussian_normalizing_const:[2,1,1,""],get_integration_constant_q:[2,1,1,""],get_max_multiplicity:[2,1,1,""],imf_chabrier2003:[2,1,1,""],imf_scalo1986:[2,1,1,""],imf_scalo1998:[2,1,1,""],imf_tinsley1980:[2,1,1,""],interpolate_in_mass_izzard2012:[2,1,1,""],ktg93:[2,1,1,""],linear_extrapolation_q:[2,1,1,""],merge_multiplicities:[2,1,1,""],normalize_dict:[2,1,1,""],number:[2,1,1,""],poisson:[2,1,1,""],powerlaw:[2,1,1,""],powerlaw_constant:[2,1,1,""],powerlaw_extrapolation_q:[2,1,1,""],prepare_dict:[2,1,1,""],raghavan2010_binary_fraction:[2,1,1,""],sana12:[2,1,1,""],set_opts:[2,1,1,""],three_part_powerlaw:[2,1,1,""]},"binarycpython.utils.functions":{BinaryCEncoder:[4,2,1,""],Capturing:[4,2,1,""],binarycDecoder:[4,2,1,""],binaryc_json_serializer:[4,1,1,""],call_binary_c_config:[4,1,1,""],catchtime:[4,2,1,""],convert_bytes:[4,1,1,""],count_keys_recursive:[4,1,1,""],create_arg_string:[4,1,1,""],create_hdf5:[4,1,1,""],custom_sort_dict:[4,1,1,""],example_parse_output:[4,1,1,""],extract_ensemble_json_from_string:[4,1,1,""],filter_arg_dict:[4,1,1,""],get_arg_keys:[4,1,1,""],get_defaults:[4,1,1,""],get_help:[4,1,1,""],get_help_all:[4,1,1,""],get_help_super:[4,1,1,""],get_moe_distefano_dataset:[4,1,1,""],get_size:[4,1,1,""],handle_ensemble_string_to_json:[4,1,1,""],imports:[4,1,1,""],inspect_dict:[4,1,1,""],is_capsule:[4,1,1,""],load_logfile:[4,1,1,""],make_build_text:[4,1,1,""],merge_dicts:[4,1,1,""],multiply_values_dict:[4,1,1,""],output_lines:[4,1,1,""],parse_binary_c_version_info:[4,1,1,""],recursive_change_key_to_float:[4,1,1,""],recursive_change_key_to_string:[4,1,1,""],remove_file:[4,1,1,""],return_binary_c_version_info:[4,1,1,""],subtract_dicts:[4,1,1,""],temp_dir:[4,1,1,""],update_dicts:[4,1,1,""],verbose_print:[4,1,1,""],write_binary_c_parameter_descriptions_to_rst_file:[4,1,1,""]},"binarycpython.utils.functions.BinaryCEncoder":{"default":[4,3,1,""]},"binarycpython.utils.functions.Capturing":{__enter__:[4,3,1,""],__exit__:[4,3,1,""]},"binarycpython.utils.functions.binarycDecoder":{decode:[4,3,1,""]},"binarycpython.utils.functions.catchtime":{__enter__:[4,3,1,""],__exit__:[4,3,1,""]},"binarycpython.utils.grid":{Population:[6,2,1,""]},"binarycpython.utils.grid.Population":{Moe_de_Stefano_2017:[6,3,1,""],add_grid_variable:[6,3,1,""],evolve:[6,3,1,""],evolve_population:[6,3,1,""],evolve_single:[6,3,1,""],export_all_info:[6,3,1,""],format_ensemble_results:[6,3,1,""],get_stream_logger:[6,3,1,""],last_grid_variable:[6,3,1,""],parse_cmdline:[6,3,1,""],return_all_info:[6,3,1,""],return_population_settings:[6,3,1,""],set:[6,3,1,""],set_moe_distefano_settings:[6,3,1,""],system_queue_filler:[6,3,1,""],write_binary_c_calls_to_file:[6,3,1,""]},"binarycpython.utils.grid_options_defaults":{grid_options_description_checker:[7,1,1,""],grid_options_help:[7,1,1,""],print_option_descriptions:[7,1,1,""],write_grid_options_to_rst_file:[7,1,1,""]},"binarycpython.utils.plot_functions":{color_by_index:[12,1,1,""],dummy:[12,1,1,""],parse_function_hr_diagram:[12,1,1,""],parse_function_masses:[12,1,1,""],parse_function_orbit:[12,1,1,""],plot_HR_diagram:[12,1,1,""],plot_masses:[12,1,1,""],plot_orbit:[12,1,1,""],plot_system:[12,1,1,""]},"binarycpython.utils.run_system_wrapper":{run_system:[15,1,1,""]},"binarycpython.utils.spacing_functions":{"const":[16,1,1,""]},"binarycpython.utils.useful_funcs":{calc_period_from_sep:[18,1,1,""],calc_sep_from_period:[18,1,1,""],maximum_mass_ratio_for_RLOF:[18,1,1,""],minimum_period_for_RLOF:[18,1,1,""],minimum_separation_for_RLOF:[18,1,1,""],ragb:[18,1,1,""],roche_lobe:[18,1,1,""],rzams:[18,1,1,""],zams_collision:[18,1,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","class","Python class"],"3":["py","method","Python method"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:method"},terms:{"0001":18,"0007":2,"001":0,"002":5,"054":2,"0820":0,"08msun":0,"0902":0,"100":[0,2],"1000":[5,8],"100000000000":5,"115":2,"125":0,"12500":0,"12e":[1,13],"13e3":0,"1403":2,"150":13,"15000":[0,5,13],"15msun":2,"190":0,"1951":0,"1972":0,"1975":0,"197x":0,"1980":2,"1983":18,"1986":[0,2],"1989":0,"1991":2,"1993":0,"1996":18,"1998":[0,2],"1999":0,"1ckzg0p9":[10,14],"1e2":0,"1e9":0,"200":0,"2000":0,"2001":2,"2002":0,"2003":[0,2],"2004":0,"2005":0,"2009":0,"2010":[0,2,8],"2012":[0,2],"2013":0,"2014":[0,2],"2015":0,"2016":0,"2017":[0,8],"2018":[0,1],"2019":0,"2020":0,"2021":0,"20210720":0,"257":18,"25msun":0,"281":18,"2969346":2,"2msun":0,"3000":0,"30e4":0,"3msun":2,"4000":0,"42msun":0,"44msun":0,"45000000080":13,"4530":5,"45msun":0,"4e3":0,"500":0,"5msun":0,"600000":0,"6044":0,"625":0,"6944":0,"6e1":2,"6e5":0,"6msun":0,"7619":0,"763":2,"78125":0,"795":2,"80msol":2,"boolean":[0,4,6,8,12,18],"break":0,"case":[0,4,8],"catch":[4,5,8],"char":8,"class":[4,6],"const":[2,6,13,16],"default":[0,1,2,4,5,6,7,8,13,15],"export":[4,6,13],"float":[0,2,4,16,18],"function":[0,1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,18],"import":[4,5,6,13],"int":[0,1,2,4,6,7,8,16,18],"long":[0,4,6,8,17],"new":[0,2,4,6],"null":[0,4],"paczy\u0144ski":0,"public":[7,10],"return":[1,2,4,6,7,8,12,15,16,18],"short":[0,17],"super":0,"switch":0,"throw":[10,14],"true":[0,4,6,7,8,12,13],"try":[0,6,10,14],"while":0,And:[7,10,14,18],For:[0,4,10,12,14],Gas:0,Its:8,NOT:[0,6,15],Not:[8,13],One:0,Pms:12,That:0,The:[0,1,2,4,5,6,8,10,12,13,14,15],Then:[4,10,14],There:[2,5,6,7,8,12],These:[4,8,12],Use:[0,5,6],Used:[0,8,12],Useful:[0,6,7],Uses:[0,16],Was:0,Will:[0,4,6,13,15],With:7,__enter__:4,__exit__:4,_actually_evolve_system:8,_binary_c_bind:[4,5,18],_binary_c_config_execut:8,_binary_c_dir:8,_binary_c_execut:8,_binary_c_shared_librari:8,_commandline_input:8,_count:8,_custom_logging_shared_library_fil:8,_end_time_evolut:8,_errors_exceed:8,_errors_found:8,_evolution_type_opt:8,_failed_count:8,_failed_prob:8,_failed_systems_error_cod:8,_generate_grid_cod:8,_grid_vari:8,_loaded_ms_data:8,_main_pid:8,_population_id:8,_probtot:8,_process_run_population_grid:8,_repeat:8,_set:[6,13],_set_ms_grid:8,_start_time_evolut:8,_store_memaddr:8,_system_gener:8,_total_mass_run:8,_total_probability_weighted_mass_run:8,_total_starcount:8,_zero_prob_stars_skip:8,abat:0,abbrevi:17,about:[4,6,7,13,18],abov:[0,2,4,5,6],absolut:0,abund:0,acceler:0,accept:[4,13],access:8,accord:[0,2],accordingli:13,account:[0,8],accret:0,accretion_limit_dynamical_multipli:0,accretion_limit_eddington_lmms_multipli:0,accretion_limit_eddington_steady_multipli:0,accretion_limit_eddington_wd_to_remnant_multipli:0,accretion_limit_thermal_multipli:0,accretor:[0,18],acess:2,act:[0,8,13],activ:[0,10,14],actual:[0,4,6,8,10,12,14],adam:0,adapt:0,add:[2,4,6,8,12,13,16,18],add_grid_vari:[6,13],added:4,admittingli:12,adress:[1,5,8,18],affect:0,after:[0,6,8],ag89:0,again:[4,6,8,10,14],against:12,agb:0,agb_3dup_algorithm:0,agb_core_algorithm:0,agb_core_algorithm_default:0,agb_core_algorithm_hurlei:0,agb_core_algorithm_karaka:0,agb_luminosity_algorithm:0,agb_luminosity_algorithm_default:0,agb_luminosity_algorithm_hurlei:0,agb_luminosity_algorithm_karaka:0,agb_radius_algorithm:0,agb_radius_algorithm_default:0,agb_radius_algorithm_hurlei:0,agb_radius_algorithm_karaka:0,agb_third_dredge_up_algorithm_default:0,agb_third_dredge_up_algorithm_hurlei:0,agb_third_dredge_up_algorithm_karaka:0,agb_third_dredge_up_algorithm_stancliff:0,age:0,aging:0,albedo:0,algorithm:10,algothim:0,all:[0,1,2,4,5,6,7,8,10,11,12,13,14,15],all_info:6,allow:[0,2,4,5,8],allow_nan:4,along:[0,7,8],alot:[8,13],alpha:0,alpha_c:0,alphacb:0,alreadi:6,also:[0,4,5,6,7,10,14,18],altern:[0,8],alwai:[0,2,8],amanda:0,amax:2,amin:2,amount:[0,4,6,7,8,13,16],amt_cor:[6,8,13],analys:15,analyt:6,andrew:[10,14],andronov:0,angelou_lithium_cheb_decay_tim:0,angelou_lithium_cheb_massfrac:0,angelou_lithium_cheb_tim:0,angelou_lithium_decay_funct:0,angelou_lithium_decay_tim:0,angelou_lithium_eagb_decay_tim:0,angelou_lithium_eagb_massfrac:0,angelou_lithium_eagb_tim:0,angelou_lithium_gb_decay_tim:0,angelou_lithium_gb_massfrac:0,angelou_lithium_gb_tim:0,angelou_lithium_hg_decay_tim:0,angelou_lithium_hg_massfrac:0,angelou_lithium_hg_tim:0,angelou_lithium_lmms_decay_tim:0,angelou_lithium_lmms_massfrac:0,angelou_lithium_lmms_tim:0,angelou_lithium_ms_decay_tim:0,angelou_lithium_ms_massfrac:0,angelou_lithium_ms_tim:0,angelou_lithium_tpagb_decay_tim:0,angelou_lithium_tpagb_massfrac:0,angelou_lithium_tpagb_tim:0,angelou_lithium_vrot_trigg:0,angelou_lithium_vrotfrac_trigg:0,angular:[0,12],ani:[0,2,4,6,10,14],anoth:0,ansi:0,anyth:[0,8],anywai:6,anywher:6,api:[0,4],api_log_filename_prefix:0,append:[1,4],appli:0,approach:5,appropri:[0,8],approxim:0,aren:[2,8],arenou2010_binary_fract:2,arg:[2,4,12],arg_dict:4,argopt:0,argpair:4,argstr:5,argument:[0,2,4,5,6,8,13,15],argument_of_periastron:0,argument_of_periastron_quadrupl:0,argument_of_periastron_tripl:0,around:[0,5],arrai:[2,4,5,8],artifici:0,artificial_accretion_end_tim:0,artificial_accretion_ignor:0,artificial_accretion_start_tim:0,artificial_angular_momentum_accretion_r:0,artificial_mass_accretion_r:0,artificial_orbital_angular_momentum_accretion_r:0,arxiv:[0,2],asarrai:5,asign:6,ask:[0,18],asplund:0,assum:[0,12],ast871:0,astronomi:0,astropi:[10,12,14],atom:4,attempt:[4,6],auto:11,autogen_c_logging_cod:[1,5],autogener:[1,5],automat:[0,1,5,7,10,14],avaibl:[10,14],avail:[0,4,8,12],awai:0,axi:[0,12],b_1:0,b_2:0,b_3:0,b_4:0,b_inclination1:0,b_inclination2:0,b_inclination3:0,b_inclination4:0,back:[0,4],background:5,backward:0,bagb:0,barn:0,base:[0,2,4,5,6,10,12,14,18],base_filenam:[6,13],basic:[5,6],batchmod:0,beasor:0,becaus:[0,2,5,6,8,10,14],becom:[0,1,2,4],been:[0,6,8],befor:[0,6,8,10,13,14],behaviour:[4,15],behind:5,belczynski:0,below:[0,8,13],berro:0,bertolami:0,best:[6,8,10,14],beta:0,beta_reverse_nova:0,beta_reverse_novae_geometri:0,better:[0,4,6],between:[0,2,16],bewar:6,bh_belczynski:0,bh_fryer12_delai:0,bh_fryer12_rapid:0,bh_hurley2002:0,bh_prescript:0,bh_spera2015:0,big:[0,8],bin:[0,5,10,14],binari:[2,5,6,8,10,12,13,14,18],binary_c2:[10,14],binary_c:[1,2,4,5,6,8,12,13,15],binary_c_cal:6,binary_c_default:13,binary_c_inline_config:1,binary_c_log_cod:[1,5],binary_c_macro:0,binary_c_output:4,binary_c_paramet:[0,13],binary_c_python:[4,6],binary_c_task_:0,binary_c_write_log_cod:1,binary_grid:0,binary_star:18,binaryc:[1,4,15],binaryc_config:1,binaryc_json_seri:4,binarycdecod:4,binarycencod:4,binarycpython:[1,2,4,5,6,7,10,12,13,14,15,16,18],bind:0,birth:0,bit:2,bivari:0,black:0,black_hol:0,bloecker:0,blog:1,boltzman:12,boltzmann:0,bondi:0,bondi_hoyle_accretion_factor:0,bool:[4,6,7,12],born:0,bosswissam:4,both:[0,4],bottom:0,bound:[2,16],boundari:2,brake:0,branch:[0,4],branch_david:0,branchpoint:6,breakup:0,broken:0,bse:[0,2],bse_opt:[6,13],bsf:0,buffer:0,build:[0,1,4],build_q_tabl:2,built:[0,1,4,10,14],burn:0,busso:0,bye:0,c13_eff:0,c_auto_log:[8,13],c_log:0,c_logging_cod:[8,13],calc_e_integr:2,calc_p_integr:2,calc_period_from_sep:18,calc_sep_from_period:[13,18],calc_total_probden:2,calcul:[0,2,4,6,8,18],calculate_constants_three_part_powerlaw:2,call:[0,1,4,6,8,12,13,15],call_binary_c_config:4,can:[0,1,2,4,5,6,8,10,12,13,14,15],cannot:6,canon:8,cap:0,capsul:4,captur:[0,4],carbon:0,carbon_oxygen_white_dwarf:0,carlo:0,carrasco:0,carri:0,cast:[4,5],catchtim:4,categor:4,caught:4,caus:18,cbdisc:0,cbdisc_albedo:0,cbdisc_alpha:0,cbdisc_eccentricity_pumping_dermin:0,cbdisc_eccentricity_pumping_method:0,cbdisc_eccentricity_pumping_non:0,cbdisc_end_evolution_after_disc:0,cbdisc_fail_ring_inside_separ:0,cbdisc_gamma:0,cbdisc_init_djdm:0,cbdisc_init_dm:0,cbdisc_inner_edge_strip:0,cbdisc_inner_edge_stripping_timescal:0,cbdisc_kappa:0,cbdisc_mass_loss_constant_r:0,cbdisc_mass_loss_fuv_multipli:0,cbdisc_mass_loss_inner_l2_cross_multipli:0,cbdisc_mass_loss_inner_viscous_accretion_method:0,cbdisc_mass_loss_inner_viscous_accretion_method_equ:0,cbdisc_mass_loss_inner_viscous_accretion_method_gerosa_2015:0,cbdisc_mass_loss_inner_viscous_accretion_method_non:0,cbdisc_mass_loss_inner_viscous_accretion_method_young_clarke_2015:0,cbdisc_mass_loss_inner_viscous_angular_momentum_multipli:0,cbdisc_mass_loss_inner_viscous_multipli:0,cbdisc_mass_loss_ism_pressur:0,cbdisc_mass_loss_ism_ram_pressure_multipli:0,cbdisc_mass_loss_xray_multipli:0,cbdisc_max_lifetim:0,cbdisc_minimum_evaporation_timescal:0,cbdisc_minimum_fr:0,cbdisc_minimum_luminos:0,cbdisc_minimum_mass:0,cbdisc_no_wind_if_cbdisc:0,cbdisc_outer_edge_strip:0,cbdisc_outer_edge_stripping_timescal:0,cbdisc_resonance_damp:0,cbdisc_resonance_multipli:0,cbdisc_torquef:0,cbdisc_viscous_l2_coupl:0,cbdisc_viscous_photoevaporative_coupl:0,cbdisc_viscous_photoevaporative_coupling_inst:0,cbdisc_viscous_photoevaporative_coupling_non:0,cbdisc_viscous_photoevaporative_coupling_visc:0,cee:0,cemp:0,cemp_cfe_minimum:0,center:6,central_object:0,certain:[3,8,10,14],cf_amanda_log:0,cflag:[10,14],chabrier:2,chandrasekhar:0,chandrasekhar_mass:0,chang:[0,1,2,4,6,7,8,10,13,14],chapter:[0,3,8,11],cheb:0,check:[0,2,4,6,7,13,18],check_circular:4,chemic:0,chen:0,child:4,choic:[0,2,6,12],choos:[0,5,12],chosen:6,circular:0,circumbinari:0,circumstanti:0,claei:0,clark:0,clean:[1,6,10,14],clean_up_custom_logging_fil:6,clear:4,clock:4,clone:[10,14],close:0,cloud:0,cls:4,cluster:9,cmdline:6,code:[0,1,3,5,6,7,10,12,13,14,15],collaps:0,collapsar:0,collect:18,collid:18,color:12,color_by_index:12,colour:0,colour_log:0,column:[5,12,13],com:[1,4],combin:[1,4,6,8],combine_ensemble_with_thread_join:8,come:[2,10,14,16],comenv_bs:0,comenv_disc_angmom_fract:0,comenv_disc_mass_fract:0,comenv_ejection_spin_method:0,comenv_ejection_spin_method_do_noth:0,comenv_ejection_spin_method_sychron:0,comenv_ejection_spin_method_synchron:0,comenv_merger_spin_method:0,comenv_merger_spin_method_breakup:0,comenv_merger_spin_method_conserve_angmom:0,comenv_merger_spin_method_conserve_omega:0,comenv_merger_spin_method_specif:0,comenv_ms_accret:0,comenv_ms_accretion_fract:0,comenv_ms_accretion_mass:0,comenv_nandez2016:0,comenv_nelemans_tout:0,comenv_ns_accret:0,comenv_ns_accretion_fract:0,comenv_ns_accretion_mass:0,comenv_post_eccentr:0,comenv_prescript:0,comenv_splitmass:0,comenv_undef:0,command:[0,1,6,8,10,14],commandlin:[6,8,13],commit:4,common:[0,13],companion:[0,13],compar:[0,8],compil:[1,5,10,13,14],compile_shared_lib:1,complain:13,complex:[5,6,8,12],compon:[4,12],comput:[0,9],condit:[5,6,13],condor:[6,8,9],condor_grid:6,config:[1,4,8,10,14],config_fil:1,configur:[2,5,6,13],conserv:0,consid:[0,1,2,4,6,8,12],constant:[0,2,12],construct:[0,1,5],conta:7,contain:[0,1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17],content:[4,10],context:4,continu:6,control:0,convect:0,converg:0,convert:[2,4,6],convert_byt:4,cool:0,copi:[0,6,18],core:[0,6,8,12],core_helium_burn:0,core_mass:0,correct:[2,6,12,18],correctli:[5,10,12,13,14],correspond:12,corretor:0,cosmic:2,cosmic_sfh_madau_dickinson2014:2,could:[0,4],count:[4,8],count_keys_recurs:4,counter:8,coupl:0,coverag:[10,14],cowd:0,cpu:0,crap_paramet:0,creat:[2,4,6,13],create_and_load_logging_funct:[1,5],create_arg_str:4,create_hdf5:[4,13],critic:0,cross:0,ctype:1,cuntz:0,current:[0,4,10,14],custom:[0,1,4,5,6,8,12,13,15],custom_log:[5,6,8],custom_logging_cod:[1,5,15],custom_logging_func_memaddr:[5,8],custom_logging_funct:[5,8,10,11,13],custom_logging_info:6,custom_opt:[6,13],custom_sort_dict:4,custom_tmp_dir:1,cut:5,cvode:0,d1ed5b6c1:0,dai:[0,2,5,13,18],damp:0,dat:[0,4,13],data:[0,4,5,6,8,13,15],data_dict:2,data_dir:[4,6,8,13],datadir:6,datafram:[5,12],dataset:4,date:6,david:[0,10,14],david_logging_funct:0,dd7:0,deactiv:0,deal:4,death:0,debug:[0,8],decai:0,decid:[0,4,5],decod:4,decreas:0,deeper:6,def:[5,13],default_to_metal:0,defaultdict:4,defer:0,defin:[0,1,2,6,12],definit:[1,18],degener:0,degre:0,delta_mcmin:0,den:0,densiti:2,depend:[0,2,10,12,14],deprec:0,dermin:0,describ:[0,2,5,8],descript:[0,2,4,8,10,11],design:[6,12],desir:0,destruct:6,detail:[0,4],detect:0,determin:[0,6,18],deton:0,dev:0,develop:1,deviat:2,dewi:0,dex:0,df2:5,diagnost:8,diagram:[0,12],dickonson:2,dict2:4,dict:[1,2,4,6,7,13,17],dict_1:4,dict_2:4,dictionari:[1,2,4,6,7,8,12,17],did:[4,10,14],differ:[0,4,6,10,12,14],dimmer:0,dir:[10,14],direct:[0,6],directli:[4,5,8],director:8,directori:[0,4,6,8,10,13,14],disabl:0,disable_debug:0,disable_end_log:0,disable_ev:0,disc:0,disc_legacy_log:0,disc_log2d:0,disc_log:0,disc_log_directori:0,disc_log_dt:0,disc_log_level_non:0,disc_log_level_norm:0,disc_log_level_normal_first_disc_onli:0,disc_log_level_subtimestep:0,disc_log_level_subtimestep_first_disc_onli:0,disc_n_monte_carlo_guess:0,disc_stripping_timescale_infinit:0,disc_stripping_timescale_inst:0,disc_stripping_timescale_orbit:0,disc_stripping_timescale_visc:0,disc_timestep_factor:0,discs_circumbinary_from_comenv:0,discs_circumbinary_from_wind:0,disk:[0,6],dispers:0,displai:0,dist:[10,14],distefano:[2,4,6,10],distribut:[0,2,6,9],distribution_funct:[10,11],distributoon:2,divid:9,dlnm1:[6,13],dlog10per:13,dlogp:2,doc:[4,7,10,14],doc_fetch:2,docstr:[10,12,14],document:[4,7,8,11],doe:[0,2,4,6,8,18],doesn:[6,8],doesnt:[5,7],doing:[0,1,6,7,10,14],don:8,done:[0,4,5,6,10,13,14],donm:13,donor:[0,18],donor_limit_dynamical_multipli:0,donor_limit_envelope_multipli:0,donor_limit_thermal_multipli:0,donor_rate_algorithm_bs:0,donor_rate_algorithm_claeys2014:0,dont:[2,4,5,6],dphasevol:[6,13],dr2:0,dr3:0,drai:0,dredg:0,dstep:2,dtfac:0,dtlimit:4,dtm:[1,13],dtype:5,due:[10,14],dummi:[2,12],dump:[0,4],dumpvers:0,duquennoi:2,duquennoy1991:2,dure:0,dust:0,dwarf:0,dynam:0,e2_hurley_2002:0,e2_izzard:0,e2_mint:0,e2_prescript:0,each:[0,2,4,6,8],eagb:0,eagb_wind_beasor_etal_2020:0,eagb_wind_bs:0,eagb_wind_goldman_etal_2017:0,eagbwind:0,eagbwindfac:0,earli:0,early_asymptotic_giant_branch:0,easi:4,easier:[4,5],ecc2:2,ecc3:2,ecc:[2,5,6],eccentr:[0,2,5,12,13,18],eccentric_rlof_model:0,eccentricity_quadrupl:0,eccentricity_tripl:0,echo:0,eddington:0,edg:[0,6],edu:0,effect:[0,2,8],effective_metal:0,effici:0,egg:[10,14],eggleton:[0,18],either:[0,4,5,6,8,10,14,15],eject:0,eld:0,eldridg:0,electon:0,electron:0,element:[0,1,4,8,12],email:4,emp:0,emp_feh_maximum:0,emp_logg_maximum:0,emp_minimum_ag:0,empti:[4,7],enabl:0,encod:4,encount:8,end:[0,2,4,8,13],end_index:2,energi:0,enhanc:0,enlarg:0,enough:2,ensembl:[0,4,6,8],ensemble_def:0,ensemble_dictionari:6,ensemble_dt:0,ensemble_factor_in_probability_weighted_mass:8,ensemble_filter_:0,ensemble_filters_off:0,ensemble_json:4,ensemble_legacy_ensembl:0,ensemble_list:6,ensemble_logdt:0,ensemble_logtim:0,ensemble_macro:0,ensemble_output_:8,ensemble_startlogtim:0,ensure_ascii:4,enter:[0,10,14],enthalpi:0,entir:5,entri:4,entrypoint:6,env:[10,12,14],envelop:0,equal:[4,13],equat:0,equation_of_state_algorithm:0,equation_of_state_paczynski:0,equatori:0,equival:8,errno:[10,14],error:[0,4,8,10,14],esa:2,escap:0,escape_fract:0,escape_veloc:0,eta:0,etal:0,etc:[0,4,6,9,10,12,13,14,15],euler:0,evalu:[2,6,18],evan:0,evapor:0,evaporate_escaped_orbiting_object:0,event:0,everi:[0,10,14],everyth:[6,8,13],everytim:[10,14],evid:0,evolut:[0,1,5,6,8,12],evolution_split:0,evolution_splitting_maxdepth:0,evolution_splitting_sn_eccentricity_threshold:0,evolution_splitting_sn_n:0,evolution_typ:8,evolutionari:0,evolv:[0,6,8,13],evolve_popul:[6,13],evolve_singl:[6,13],exact:[1,4,8],exactli:0,exampl:[1,2,4,6,15],example_head:4,example_header_1:5,example_header_2:5,example_log:15,example_log_co:1,example_parse_output:[4,5],example_pop:13,example_python_population_result:13,exce:[0,8],except:[4,6,7,8,12],execut:[0,6,8,10,13,14],exist:[0,6,7,13],exist_ok:[4,13],exit:[0,4],exp:[6,13],expand:15,expect:[10,14],experiment:[0,4],explain:4,explicilti:1,explicitli:0,explod:0,explos:0,expoenti:0,expon:0,export_all_info:[6,13],express:0,extend:[10,14],extern:0,extra:[0,6,8,15],extra_text:7,extract:[4,13],extract_ensemble_json_from_str:4,extrapol:[2,8],fabian:0,fabian_imf_log:0,fabian_imf_log_tim:0,fabian_imf_log_timestep:0,factor:[0,2,4,8],fade:0,fail:[0,4,8,10,14],fail_sil:4,failed_system:8,failed_system_log:8,failed_systems_threshold:8,failur:0,fals:[0,4,6,8,12,13],fancy_parsing_funct:15,far:0,farmer:0,fase:13,fast:0,feed:8,ferguson:0,few:0,field:0,fig:[0,2],figur:[8,12],file:[0,1,4,6,7,8,9,10,12,13,14],file_log:0,filehandl:7,filenam:[0,1,4,5,6,8,13,15],filenotfounderror:[10,14],filepath:[1,4],filesystem:4,fill:6,fill_data:2,filter:[0,4],filter_arg_dict:4,filter_valu:4,fin:0,find:[4,6,8,10,14],finish:[4,12],first:[0,2,4,6,10,14,18],first_giant_branch:0,fishlock:0,fit:[0,2,4,6,18],fix:[0,2,4,6,12],flag:[0,1,4,8],flash:0,flat:[2,8],flatsect:[2,13],flaw:6,float64:5,float_overflow_check:0,flto:[10,14],fold:2,follow:[0,2,4,8,10,12,14],forc:[0,10,14],force_circularization_on_rlof:0,force_corotation_of_primary_and_orbit:0,forloop:6,form:[0,4,6,7],formal:0,format:[0,2,4,5,6,13],format_ensemble_result:6,formula:0,forward:0,found:[2,10,14],four:0,fpic:1,fraction:[0,2,8],frequenc:0,friction:0,fring:0,from:[0,2,4,5,6,8,12,13,18],from_binary_c_config:1,from_dict:5,ftz:[10,14],full:[4,6,8],full_path:4,fulli:[6,13],func_memaddr:5,functon:6,further:2,fuv:0,gaia:[0,2],gaia_colour_transform_method:0,gaia_conversion_ubvri_bivariate_jordi2010:0,gaia_conversion_ubvri_riello2020:0,gaia_conversion_ubvri_univariate_evans2018:0,gaia_conversion_ubvri_univariate_jordi2010:0,gaia_conversion_ugriz_bivariate_jordi2010:0,gaia_conversion_ugriz_riello2020:0,gaia_conversion_ugriz_univariate_evans2018:0,gaia_conversion_ugriz_univariate_jordi2010:0,gaia_l_binwidth:0,gaia_teff_binwidth:0,gain:8,galact:0,gallino:0,gamma:0,gap:0,garcia:0,gauss:0,gaussian:2,gaussian_func:2,gaussian_normalizing_const:2,gb_reimers_eta:0,gb_wind_beasor_etal_2020:0,gb_wind_goldman_etal_2017:0,gb_wind_reim:0,gb_wind_schroeder_cuntz_2005:0,gbwind:0,gbwindfac:0,gcc:[1,10,14],gce:0,gener:[0,1,2,4,5,6,7,8,12,13],general_info:4,geometr:0,gerosa:0,get:[0,2,4,5,6,7,10,13,14,15,18],get_arg_kei:4,get_default:4,get_help:[4,13],get_help_al:[4,6,13],get_help_sup:4,get_integration_constant_q:2,get_max_multipl:2,get_moe_distefano_dataset:4,get_siz:4,get_stream_logg:6,gettempdir:5,giant:0,giant_branch:0,git:[0,4],git_branch:4,git_build:4,github:4,gitlab:10,give:[0,2,4,5,18],given:[0,1,2,4,5,6,8,15,18],globablli:2,global:[0,2],global_dict:2,gmax:2,gmin:2,goe:[0,4,6,12],gogo:0,going:[10,14],goldman:0,gonna:2,good:[0,8,13,18],gov:0,gravit:0,gravitational_radiation_bs:0,gravitational_radiation_bse_when_no_rlof:0,gravitational_radiation_landau_lifshitz:0,gravitational_radiation_landau_lifshitz_when_no_rlof:0,gravitational_radiation_model:0,gravitational_radiation_modulator_:0,gravitational_radiation_modulator_j:0,gravitational_radiation_non:0,grb:0,great:0,greater:0,grevess:0,grid:[0,4,6,10,11,13],grid_class:[10,11],grid_cod:6,grid_opt:[6,8,13],grid_options_default:7,grid_options_defaults_dict:7,grid_options_descript:7,grid_options_description_check:7,grid_options_help:7,grid_vari:[8,13],grid_variable_numb:6,gridcod:6,gridcode_filenam:8,gridtyp:6,group:4,gsl:[10,14],gsl_dir:[10,14],guess:[0,2],h5py:[10,14],hachisu:0,hachisu_disk_wind:0,hachisu_ignore_qcrit:0,hachisu_qcrit:0,hack:7,had:6,half:0,hall:0,handi:0,handl:[0,4,6,8,13,15,18],handle_ensemble_string_to_json:4,happen:0,has:[0,1,4,5,6,8],have:[0,2,4,5,6,7,8,10,12,13,14],hbb:0,hbbtfac:0,hdf5:[4,13],hdf5file:4,header:[1,4,5,13],headerlin:13,headlin:8,hegb:0,hehg:0,height:[2,13],helium:0,helium_flash_mass_loss:0,helium_white_dwarf:0,help:[0,4,7,13],help_al:0,hem:0,henc:0,hendrik:[10,14],here:[1,4,5,6,8,12,13],hertzsprung:0,hertzsprung_gap:0,hertzstrpung:0,heuvel:0,hewd:0,hewd_hewd_ignition_mass:0,hex:8,high:[0,2],higher:[0,2,4,8,10,14],highest:6,his:2,histori:2,hold:8,hole:0,homogen:0,hopefulli:0,hot:0,how:[0,4,5,6,8],howev:0,hoyl:0,hpc:[6,9],hpc_function:[10,11],hr_diagram:12,hrd:0,hrdiag:0,hrdiag_output:0,html:[10,14],http:[0,1,2,4],hurlei:0,hut:0,hybrid:0,hydro:0,hydrogen:0,ibc:0,idea:12,idum:0,ignit:0,ignor:[0,5,6,8,10,14],iia:0,imf:[0,2],imf_chabrier2003:2,imf_scalo1986:2,imf_scalo1998:2,imf_tinsley1980:2,immedi:0,implement:[0,6,8],impli:0,impos:13,improv:2,inclin:0,inclination1:0,inclination2:0,inclination3:0,inclination4:0,inclini:0,incliniation_quadrupl:0,incliniation_tripl:0,includ:[0,1,2,4,5,6,10,12,14],include_binary_c_default:[6,13],include_binary_c_help_al:[6,13],include_binary_c_version_info:[6,13],include_default:6,include_popul:13,include_population_set:6,incom:0,increas:0,inde:0,indent:4,index:[0,2,10],indic:[0,2],individual_nova:0,induc:0,inertia:0,info:[4,6,10,12,13,14],inform:[0,1,4,6,7,12,13],init:6,init_abund:0,init_abund_dex:0,init_abund_mult:0,init_abunds_onli:0,initi:[0,2,6],initial_abundance_hash:6,initial_abundance_mix:0,initial_abunds_onli:0,inlin:5,inner:0,input:[1,2,4,6,8,10,12,18],input_dict:4,insert:6,insid:0,inspect:[4,12,13],inspect_dict:4,inspir:[1,5,12,18],instabl:0,instanc:[4,13],instant:0,instantli:0,instead:[0,4,8],integ:[0,6,8,18],integr:2,integrals_str:2,interact:[0,7],interfac:[4,10,14],interfer:[10,14],intern:[0,8],internal_buff:0,internal_buffering_off:0,internal_buffering_print:0,internal_buffering_stor:0,interpol:[2,6],interpolate_in_mass_izzard2012:2,interpolator_nam:2,intershel:0,interstellar:0,intger:0,intro:0,invers:18,involv:0,inward:0,is_capsul:4,isn:[4,6],isnt:13,isotop:[0,4],isotope_hash:6,isotope_list:6,item:1,iter:4,its:[0,4,6,7,10,12,14,15],itself:[4,8,10,14],iwamoto:0,izzard2012_period_distribut:2,izzard:[0,10,14],jager:0,jaschek:2,jeff:[10,14],jia:0,job_queu:6,john:0,join:13,jordi:0,json:[4,6,8,13],jsondecod:4,jsonencod:4,jul:0,jupyt:[10,14],just:[0,2,4,5,6,8,18],kap:0,kappa:0,kaps_rentrop:0,karaka:0,keep:6,kei:[1,2,4,6,7,8,12],kelvin:0,keplerian:0,keypair:4,keyword:[12,15],kick:[0,8],kick_backward:0,kick_forward:0,kick_inward:0,kick_outward:0,kick_random:0,kick_straight_up:0,kick_velocity_custom:0,kick_velocity_fix:0,kick_velocity_maxwellian:0,kill:[1,13],kim:0,kind:0,kippenhahn:0,know:[0,1,6,7],known:[0,2,6,13,15],kroupa2001:[2,6],kroupa:2,ktg93:2,kwarg:[6,12,15],lambda:0,lambda_c:0,lambda_ce_dewi_tauri:0,lambda_ce_klencki_2020:0,lambda_ce_polytrop:0,lambda_ce_wang_2016:0,lambda_enthalpi:0,lambda_ionis:0,lambda_min:0,lambda_mult:0,lambda_multipli:0,lambda_v:2,lamer:0,landau:0,langer:0,larger:0,last:[2,6],last_grid_vari:6,late:5,latter:0,law:2,lbv:0,ld_library_path:[10,14],lead:0,least:[10,14],leav:0,left:0,legaci:0,legacy_yield:0,len:13,lengthen:0,less:[0,1,2],let:6,level:[1,4,6],li7:0,lib:[5,10,14],libbinary_c:8,libgsl:[10,14],libmemo:[10,14],librari:[0,1,5,6,8,15],library_path:[10,14],librinterpol:[10,14],lies:0,lifetim:0,lifshitz:0,like:[0,1,4,5,6,8,10,12,14,16],limit:[0,12],line:[1,4,5,6,8,10,12,14],linear2:8,linear:[0,2,8],linear_extrapolation_q:2,linearli:[6,16],linker:1,linspac:16,list:[0,1,2,4,8,15,16],list_arg:0,list_of_sub_kei:2,lit:0,lithium:0,lithium_gb_post_1dup:0,lithium_gb_post_heflash:0,lithium_hbb_multipli:0,lithium_t:0,littleton:0,liu:0,llnl:0,lnm1:[6,13],load:[0,1,4,5,6,8,12,13],load_logfil:4,lobe:[0,18],local:2,locat:[0,2,8,10,14],lodder:0,log10:[0,2,13],log10m1:8,log10p:2,log10per:13,log10pmin:2,log:[0,1,2,5,6,8,10,12,13,14,15,18],log_arg:8,log_args_dir:8,log_fil:8,log_filenam:[0,5,15],log_runtime_system:8,logarithm:2,logensembletim:0,logfil:[4,10,14,15],logg:0,logger:6,logging_dict:1,logging_lin:5,logic:[1,6,8],logmass:2,logp:2,logper:2,logperiod:2,long_spectral_typ:2,longer:0,longnam:[6,13],look:[1,4,10,14],lookback:0,loon:0,loop:6,loos:12,lose:0,loss:0,lost:0,lot:[4,15],low:[0,2,13],low_mass_m:0,low_mass_main_sequ:0,lower:[0,2,6,16],lsoda:0,lsun:[0,12],lugaro:0,luminos:[0,12],luminosity_1:12,luminosity_2:12,lynnett:0,m_1:[0,5,6,13,15],m_2:[0,5,13],m_3:0,m_4:0,m_max:[2,6],m_min:6,m_re:5,maccretor:0,machin:[8,10,14],macro:[0,4],madau:2,maeder:0,magellan:0,magnet:0,magnetic_braking_algorithm:0,magnetic_braking_algorithm_andronov_2003:0,magnetic_braking_algorithm_barnes_2010:0,magnetic_braking_algorithm_hurley_2002:0,magnetic_braking_algorithm_rappaport_1983:0,magnetic_braking_factor:0,magnetic_braking_gamma:0,magnitud:4,mai:0,main:[0,1,8,10,14],main_sequ:0,mainli:9,major:0,make:[0,1,2,4,5,6,8,10,12,13,14,15],make_build_text:4,makedir:[4,13],manag:[4,10,14],mani:[0,6,8],manufactur:0,map:8,maria:0,mass:[0,1,2,4,5,6,8,12,13,15,18],mass_1:[5,12],mass_2:[5,12],mass_accretion_for_eld:0,mass_accretor:18,mass_donor:18,mass_evolut:12,mass_for_hestar_ia_low:0,mass_for_hestar_ia_upp:0,mass_of_pmz:0,mass_str:2,massiv:[0,2],massless:0,massless_remn:0,master:[8,12],match:[0,4,12],materi:0,math:[6,13],matplotlib:[10,12,14],matter:0,mattsson:0,mattsson_mass_loss:0,mattsson_orich_tpagbwind:0,max:[0,2,13],max_bound:[2,16],max_evolution_tim:[0,1,5,13],max_hewd_mass:0,max_model_numb:0,max_multipl:2,max_neutron_star_mass:0,max_queue_s:8,max_stellar_angmom_chang:0,max_stellar_type_1:0,max_stellar_type_2:0,max_stellar_type_3:0,max_stellar_type_4:0,max_val:2,maximum:[0,2,8,18],maximum_mass_ratio_for_instant_rlof:0,maximum_mass_ratio_for_rlof:18,maximum_mcbagb_for_degenerate_carbon_ignit:0,maximum_nuclear_burning_timestep:0,maximum_timestep:0,maximum_timestep_factor:0,maxmimum:0,maxwellian:0,mayb:12,mayor:2,mc13_pocket_multipli:0,mch:0,mcmin:0,mdonor:0,mean:[0,2,4,6,8,10,14],meant:8,measur:4,medium:0,megaparsec:2,memaddr:5,memori:[1,5,6,8,18],menv:0,merg:[0,2,4,8],merge_dict:4,merge_multipl:2,merger:0,merger_angular_momentum_factor:0,merger_mass_loss_fract:0,mesa:[10,14],mesasdk_init:[10,14],mesasdk_root:[10,14],messag:4,mestel:0,met:6,metal:[0,2,5,18],method:[0,5,6,8],meynet:0,might:[4,6,10,14],milki:0,miller:0,min:[2,13],min_bound:[2,16],min_p:2,min_per:2,min_val:2,mind:5,minimal_verbos:4,minimum:[0,2,4,8,18],minimum_co_core_mass_for_carbon_ignit:0,minimum_co_core_mass_for_neon_ignit:0,minimum_donor_menv_for_comenv:0,minimum_envelope_mass_for_third_dredgeup:0,minimum_helium_ignition_core_mass:0,minimum_mcbagb_for_nondegenerate_carbon_ignit:0,minimum_orbital_period_for_instant_rlof:0,minimum_period_for_rlof:18,minimum_separation_for_instant_rlof:0,minimum_separation_for_rlof:18,minimum_time_between_pn:0,minimum_timestep:0,mint:0,mint_data_cleanup:0,mint_dir:0,mint_disable_grid_load_warn:0,mint_kippenhahn:0,mint_kippenhahn_companion_stellar_typ:0,mint_kippenhahn_stellar_typ:0,mint_maximum_shell_mass:0,mint_metal:0,mint_minimum_shell_mass:0,mint_ms_rejuven:0,mint_nuclear_burn:0,mint_remesh:0,mint_use_zams_profil:0,mira:0,misc:10,miscellan:4,miss:[0,4,7],mix:[0,4,8],mixtur:0,mmax:2,mmin:[2,8],mnra:18,model:[0,1,5,8,13],modifi:0,modul:[0,7,8,11],modulo:8,moe:[2,4,6,10],moe_de_stefano_2017:6,moe_de_stefano_2017_multiplicity_fract:2,moe_de_stefano_2017_pdf:2,moment:[0,13,16],momenta:[0,12],momentum:0,mont:0,monte_carlo_kick:0,montecarlo:8,more:[0,1,4,5,6,8,10,12,14,16],most:4,mostli:[4,5,7,8,12,13,15],move:0,msun:[0,2,5],much:[0,4],mulitpli:8,multipl:[0,2,4,8],multiplc:0,multipli:[0,4,8],multiplicity_arrai:2,multiplicity_fraction_funct:8,multiplicity_model:8,multiplicity_modul:8,multiplicti:8,multiply_values_dict:4,multiprocess:[6,8],multithread:8,must:[0,2],my_header_lin:13,my_sss2:5,my_stellar_data:[1,5,13],myr:[0,5],n100:0,n100_z0:0,n100h:0,n100l:0,n10:0,n150:0,n1600:0,n1600c:0,n200:0,n20:0,n300c:0,n40:0,naked_helium_star_giant_branch:0,naked_helium_star_hertzsprung_gap:0,naked_main_sequence_helium_star:0,name:[1,4,5,6,7,13,15,17],natur:0,nauenberg:0,nearer:0,nebula:0,necessari:[4,5,6,13],need:[0,2,5,6,10,13,14],neg:[0,4],neither:[0,6],neleman:0,nelemans_gamma:0,nelemans_max_frac_j_chang:0,nelemans_minq:0,nelemans_n_comenv:0,nelemans_recalc_eccentr:0,nemp:0,nemp_cfe_minimum:0,nemp_nfe_minimum:0,nenamg:0,neon:0,nest:[4,6],network:0,neutrn:0,neutron:[0,13],neutron_star:0,never:0,newer:[0,2],newli:0,newopt:2,newton:0,next:4,nice:[1,6,12,13],nieuwenhuijzen:0,nieuwenhuijzen_windfac:0,nmax:2,no_thermohaline_mix:0,noecho:0,noechonow:0,noel:0,nolowq:8,nomin:0,non:[0,8],nonconservative_angmom_gamma:0,none:[0,1,2,4,5,6,7,8,18],nonzero:8,nor:0,norm:8,normal:[0,2,4,8],normalis:2,normalize_dict:2,normalize_multipl:8,note:[0,5,8],notebook:[10,14],noth:[6,8],notifi:15,nova:0,nova_faml_multipli:0,nova_irradiation_multipli:0,nova_retention_algorithm_claeys2014:0,nova_retention_algorithm_const:0,nova_retention_algorithm_hillman2015:0,nova_retention_fract:0,nova_retention_method:0,nova_timestep_accelerator_index:0,nova_timestep_accelerator_max:0,nova_timestep_accelerator_num:0,now:[0,2,4,5],nuclear:0,nuclear_mass_hash:6,nuclear_mass_list:6,nucleosynthesi:[0,4],nucleosynthesis_sourc:4,nucreacmult:0,nucsyn:10,nucsyn_angelou_lithium:0,nucsyn_gce_outflow_check:0,nucsyn_hbb:0,nucsyn_metal:0,nucsyn_network:0,nucsyn_network_error:0,nucsyn_s_process:0,nucsyn_solv:0,nucsyn_third_dredge_up:0,nugi:0,number:[0,2,4,5,6,8,10,14],numer:4,numpi:[4,5,10,14,16],obj:4,object:[0,4,6,8,9,12,13],object_hook:4,object_pairs_hook:4,obtain:0,occur:[0,18],ofcours:12,off:[0,5,13],offset:0,ohio:0,old:8,old_solut:[10,14],omega:0,onc:0,one:[0,4,5,6,8,12],onewd:0,onli:[0,4,5,6,8,18],onset:0,onto:[0,2],opac:0,opacity_algorithm:0,opacity_algorithm_ferguson_op:0,opacity_algorithm_paczynski:0,opacity_algorithm_star:0,opal:0,open:13,opm:2,opt:[2,4],option:[0,1,2,4,5,6,10,11,13,14,18],orb:6,orbit:[0,2,12,13,18],orbit_evolut:12,orbital_inclin:0,orbital_inclinationi:0,orbital_period:[0,5,13,18],orbital_period_quadrupl:0,orbital_period_tripl:0,orbital_phas:0,orbital_phase_quadrupl:0,orbital_phase_tripl:0,orbiting_object:0,orbiting_objects_close_pc_threshold:0,orbiting_objects_log:0,orbiting_objects_tides_multipli:0,orbiting_objects_wind_accretion_multipli:0,order:[4,5,6],ordereddict:4,org:[0,2],origin:[10,14],other:[0,1,2,4,7,8,10,12,13,14],otherwis:[0,6,7,8],out:[4,7,8],outcom:0,outer:0,outfil:[6,13],outfile_nam:1,outfilenam:13,output:[1,4,5,6,8,10,12,13,14,15,18],output_dir:6,output_fil:[4,7],output_filenam:6,output_lin:[4,13],outsid:[0,2],outward:0,over:[4,6,13],overflow:0,overlap:4,overrid:[2,5],overriden:13,overshoot:0,overspin_algorithm:0,overspin_bs:0,overspin_massloss:0,own:[5,6,8,10,14],oxygen:0,oxygen_neon_white_dwarf:0,pack:13,packag:[4,10,14,16],paczynski:0,page:[0,10,14],pair:[0,4],panda:[4,5,10,12,14],pane:12,panel:0,paper:0,param_nam:4,paramet:[1,2,4,6,7,8,10,12,13,15,16,18],parameter_nam:[4,6,13],parameter_value_input_typ:4,pars:[4,5,6,12,13,15],parse_binary_c_version_info:4,parse_cmdlin:6,parse_const:4,parse_float:4,parse_funct:[6,8,13,15],parse_function_hr_diagram:12,parse_function_mass:12,parse_function_orbit:12,parse_int:4,parse_output:5,part:[2,5,6,18],partial:0,particularli:0,pasp:2,pass:[5,6,8,10,12,14,15],path:[4,8,10,13,14],patho:[10,14],pdf:[0,2,10,14],pend:0,per:[0,4,6,8,13,18],percentag:0,peret:0,perform:0,perhap:0,periastron:0,pericent:18,period:[0,2,5,12,13,18],period_str:2,perl:1,pgo:0,phase:0,phasevol:0,phdi:0,photoevapor:0,php:2,physic:13,pick:12,piec:[5,6],pinnsonneault:0,pisn:0,pkg:[10,14],place:0,placehold:12,plai:[0,6],plan:8,planetari:0,plaw2:8,pleas:[0,4],plot:[0,5,12],plot_funct:[10,11],plot_hr_diagram:12,plot_hr_diagram_singl:12,plot_mass:12,plot_orbit:12,plot_system:12,plot_typ:12,pls:6,plu:0,pms:12,pms_mass_1:12,pms_mass_2:12,pn_comenv_transition_tim:0,pn_fast_wind:0,pn_fast_wind_dm_agb:0,pn_fast_wind_dm_gb:0,pn_fast_wind_mdot_agb:0,pn_fast_wind_mdot_gb:0,pn_hall_fading_time_algorithm:0,pn_hall_fading_time_algorithm_maximum:0,pn_hall_fading_time_algorithm_minimum:0,pn_resolv:0,pn_resolve_maximum_envelope_mass:0,pn_resolve_minimum_effective_temperatur:0,pn_resolve_minimum_luminos:0,pne:0,pogg:0,point:[0,2,4,10,14],poisson:[2,8],pol:0,polytrop:0,popuation_id:8,popul:[0,2,6,7,9,10,14,16],population_set:6,posit:[0,2],possibl:[0,1,2,4,7,10,14],post:0,post_ce_adaptive_menv:0,post_ce_envelope_dm_eagb:0,post_ce_envelope_dm_gb:0,post_ce_envelope_dm_tpagb:0,post_ce_objects_have_envelop:0,post_sn_orbit_bs:0,post_sn_orbit_method:0,post_sn_orbit_tt98:0,postagb_legacy_log:0,potenti:0,power:[0,2],powerlaw:2,powerlaw_const:2,powerlaw_extrapolation_q:2,ppisn:0,ppisn_farmer19:0,ppisn_non:0,ppisn_prescript:0,ppn_envelope_mass:0,pre:[0,12],pre_events_stardata:0,pre_main_sequ:0,pre_main_sequence_fit_lob:0,precis:4,precod:[6,13],predefin:2,predict:8,predictor:0,prefer:[0,6],prefix:0,preload:12,prepar:2,prepare_dict:2,prescript:0,prescrit:0,present:[2,4,6,13],preserv:0,preset:12,pressur:0,prevent:[0,8],previou:4,previous_stardata:1,primari:[1,2,6,13,18],print:[4,5,7,8,13],print_help:4,print_info:7,print_option_descript:7,print_structur:4,printf:[1,5,13],prior:0,privat:[6,7,10],prob_dict:2,probability_weighted_mass:8,probabl:[0,1,2,6,7,8,13],probdist:[6,13],problabl:12,problem:0,process:[0,4,5,6,8],profil:0,progenitor:0,program:[10,14],project:0,proper:7,properli:0,properti:[0,4,8,12],prot1:0,prot2:0,prot3:0,prot4:0,provid:[0,2,6,8,13,15],pseudorandom:0,puls:[0,18],pulsat:0,pump:0,purpos:[8,12],put:[1,4,5,6,8,12,13],py_rinterpol:[10,14],pyenv:[10,14],pysiz:4,pytest:[10,14],python3:[5,10,14],python:[4,5],q_high_extrapolation_method:8,q_interpol:2,q_low_extrapolation_method:8,qcrit_bh:0,qcrit_bs:0,qcrit_cheb:0,qcrit_chen_han_formula:0,qcrit_chen_han_t:0,qcrit_cowd:0,qcrit_degenerate_bh:0,qcrit_degenerate_cheb:0,qcrit_degenerate_cowd:0,qcrit_degenerate_eagb:0,qcrit_degenerate_gb:0,qcrit_degenerate_hegb:0,qcrit_degenerate_hehg:0,qcrit_degenerate_hem:0,qcrit_degenerate_hewd:0,qcrit_degenerate_hg:0,qcrit_degenerate_lmm:0,qcrit_degenerate_m:0,qcrit_degenerate_n:0,qcrit_degenerate_onewd:0,qcrit_degenerate_tpagb:0,qcrit_eagb:0,qcrit_gb:0,qcrit_gb_bs:0,qcrit_gb_chen_han_formula:0,qcrit_gb_chen_han_t:0,qcrit_gb_ge2015:0,qcrit_gb_hjellming_webbink:0,qcrit_gb_q_no_comenv:0,qcrit_gb_temmink2021:0,qcrit_gb_vos2018:0,qcrit_ge2015:0,qcrit_hegb:0,qcrit_hehg:0,qcrit_hem:0,qcrit_hewd:0,qcrit_hg:0,qcrit_hjellming_webbink:0,qcrit_lmm:0,qcrit_m:0,qcrit_n:0,qcrit_onewd:0,qcrit_q_no_comenv:0,qcrit_temmink2021:0,qcrit_tpagb:0,qcrit_vos2018:0,qcrits_:0,qcrits_degenerate_:0,qdata:2,qlimit:2,quad:8,quadrat:0,quadrulpl:0,quadrupl:[0,2,8],quantiti:12,queue:[6,8],quit:[0,4],r_l:18,radi:0,radiat:0,radii:[0,18],radiu:[0,1,12,13,18],radius_1:12,radius_2:12,ragb:18,raghavan2010_binary_fract:2,raghavan:2,rai:0,railton:0,rais:[0,4,8,13],ram:0,ran:8,random:[0,8],random_se:0,random_skip:0,random_system:0,random_systems_se:0,rang:[0,2,6,8,16],rapidli:0,rappaport:0,rate:[0,2],rather:[0,4,6,8,10,14],ratio:[0,2,13,18],raw:[4,5,6,8,12,15],raw_output:4,reach:0,reaction:0,read:4,real:6,realli:[0,6,7,8],reason:0,rebuild:[0,10,14],rebuilt:[10,14],recalcul:0,reciev:4,recombin:0,recommend:[1,6],recompil:[10,14],recurs:[4,6],recursive_change_key_to_float:4,recursive_change_key_to_str:4,red:0,redhat:1,redshift:2,reduc:0,reduct:8,regardless:12,region:0,reignit:0,reimer:0,reinstal:[10,14],reject:0,rejects_in_log:0,rejuven:0,rel:0,relat:0,releas:[4,10,14],remain:0,remesh:0,remnant:0,remov:[0,4,6],remove_fil:4,renorm:2,rentrop:0,repeat:[0,8],repo:[10,14],report:0,repres:8,represent:[4,6],reproduc:0,requir:[0,2,4,5,12,13,15],reset:0,reset_pref:0,reset_star:0,reset_stars_default:0,resolut:[0,6,8,13],resolv:0,reson:0,respect:[0,2],respons:6,rest:[2,6],restructuredtext:4,result:[0,1,2,4,5,6,8,10,13,14],result_arrai:2,result_dict:2,result_example_head:5,result_example_header_1:5,result_example_header_2:5,retain:0,rethink:4,return_all_info:6,return_binary_c_version_info:[4,6],return_compilation_dict:1,return_help_al:4,return_maximum_mass_ratio_for_rlof:18,return_minimum_orbit_for_rlof:18,return_population_set:6,return_version_info:4,revap_in:0,revap_out:0,revers:[0,12],reverse_tim:0,revis:[0,4],rewrit:6,rhagavan:8,rich:0,riello:0,rin:0,ring:0,risk:6,ritter:0,rk2:0,rk4:0,rlof:[0,18],rlof_angular_momentum_transfer_model:0,rlof_angular_momentum_transfer_model_bs:0,rlof_angular_momentum_transfer_model_conserv:0,rlof_eccentric_as_circular:0,rlof_entry_threshold:0,rlof_f:0,rlof_interpolation_binary_c:0,rlof_interpolation_bs:0,rlof_interpolation_method:0,rlof_mdot_factor:0,rlof_mdot_modul:0,rlof_method:0,rlof_method_adapt:0,rlof_method_adaptive2:0,rlof_method_bs:0,rlof_method_claei:0,rlof_method_ritt:0,rlof_nonconservative_gamma_donor:0,rlof_nonconservative_gamma_isotrop:0,rlof_radiation_correct:0,rlof_transition_objects_escap:0,rob:[0,2,18],robert:[10,14],roch:[0,18],roche_lob:18,rochelob:18,room:6,root:[10,14],rotat:[0,2],rotation:0,rotationally_enhanced_expon:0,rotationally_enhanced_mass_loss:0,rotationally_enhanced_massloss:0,rotationally_enhanced_massloss_angmom:0,rotationally_enhanced_massloss_langer_formula:0,rotationally_enhanced_massloss_langer_formula_and_angmom:0,rotationally_enhanced_massloss_non:0,rout:0,routin:[0,5,6,12],row:12,rring:0,rssd:2,rst:[4,7],rsun:12,rubric:6,run:[0,1,4,5,6,8,10,13,14,15],run_example_binari:5,run_example_binary_with_custom_log:5,run_example_binary_with_run_system:5,run_example_binary_with_writing_logfil:5,run_example_custom_logging_autogener:5,run_system:[5,12,15],run_system_wrapp:[5,10,11],run_zero_probability_system:8,runtim:[1,8],russel:0,rzam:18,s_option:8,sai:0,said:0,same:[0,4,5,8,10,13,14],sampl:[0,2,6,16],sample_valu:2,sampler:10,sana12:[2,13],sana:2,save:[0,1,2,13],save_pre_events_stardata:0,scalo:2,scanf:0,scene:5,scheme:0,schneider:0,schroeder:0,script:[3,5,10,14],sdb:0,sdist:[10,14],sdo:0,search:10,second:[0,2,4,12],secondari:[2,18],section:[2,4,9,10,14],see:[0,5,6,10,12,14],seed:0,seem:[10,12,14],seen:4,segment:16,seitenzahl2013_model:0,seitenzahl:0,select:[0,4,5],selected_head:[4,5],selector:0,self:[6,8,13],semi:0,sent:0,sentenc:1,sep:[2,5,6,13,18],sep_max:13,sep_min:13,separ:[0,2,4,5,12,13,18],separation_quadrupl:0,separation_tripl:0,separta:0,seper:[6,7,13],sequenc:0,seri:0,serial:4,serializ:[4,6],serv:[4,5,13],server:6,set:[0,1,2,4,6,7,8,10,12,13,14],set_moe_distefano_set:6,set_opt:2,settingsfil:4,setup:[10,14,15],sever:[5,7,8,12,15],sfh:2,shara:0,share:[1,5,8,15],shared_lib_filenam:5,shell:0,shorten:0,should:[0,1,2,5,6,7,8,10,12,13,14,15],shouldn:[0,4],show:[0,3,8,12],show_plot:12,show_stellar_typ:12,shown:[0,12],siess:0,sigma:2,silent:4,sill:0,simpl:13,simpli:0,simul:[0,1,13],simulation_:6,sinc:[4,12,13],singl:[0,2,6,8,12,13],sit:0,size:[4,6,8],skip:[0,4,8,10,14],skipkei:4,sliced_df:5,slope:2,slow:0,slower:0,slurm:[6,8,9],slurm_grid:6,small:0,small_envelope_method:0,small_envelope_method_bs:0,small_envelope_method_miller_bertolami:0,smaller:0,sn_impulse_liu2015:0,sn_impulse_non:0,sn_impulse_wheeler1975:0,sn_kick_companion_a:0,sn_kick_companion_aic_bh:0,sn_kick_companion_bh_bh:0,sn_kick_companion_bh_n:0,sn_kick_companion_ecap:0,sn_kick_companion_grb_collapsar:0,sn_kick_companion_hestaria:0,sn_kick_companion_ia_chand:0,sn_kick_companion_ia_chand_co:0,sn_kick_companion_ia_eld:0,sn_kick_companion_ia_h:0,sn_kick_companion_ia_he_co:0,sn_kick_companion_ia_hybrid_hecowd:0,sn_kick_companion_ia_hybrid_hecowd_sublumin:0,sn_kick_companion_ibc:0,sn_kick_companion_ii:0,sn_kick_companion_iia:0,sn_kick_companion_ns_n:0,sn_kick_companion_phdi:0,sn_kick_companion_pisn:0,sn_kick_companion_ppisn:0,sn_kick_companion_tz:0,sn_kick_companion_wdkick:0,sn_kick_dispersion_aic_bh:0,sn_kick_dispersion_bh_bh:0,sn_kick_dispersion_bh_n:0,sn_kick_dispersion_ecap:0,sn_kick_dispersion_grb_collapsar:0,sn_kick_dispersion_ia_hybrid_hecowd:0,sn_kick_dispersion_ia_hybrid_hecowd_sublumin:0,sn_kick_dispersion_ibc:0,sn_kick_dispersion_ii:0,sn_kick_dispersion_ns_n:0,sn_kick_dispersion_phdi:0,sn_kick_dispersion_pisn:0,sn_kick_dispersion_ppisn:0,sn_kick_dispersion_tz:0,sn_kick_distribution_aic_bh:0,sn_kick_distribution_bh_bh:0,sn_kick_distribution_bh_n:0,sn_kick_distribution_ecap:0,sn_kick_distribution_grb_collapsar:0,sn_kick_distribution_ia_hybrid_hecowd:0,sn_kick_distribution_ia_hybrid_hecowd_sublumin:0,sn_kick_distribution_ibc:0,sn_kick_distribution_ii:0,sn_kick_distribution_ns_n:0,sn_kick_distribution_phdi:0,sn_kick_distribution_pisn:0,sn_kick_distribution_ppisn:0,sn_kick_distribution_tz:0,sneia:0,snia:0,solar:[0,18],solarmass:2,solver:0,solver_forward_eul:0,solver_predictor_corrector:0,solver_rk2:0,solver_rk4:0,some:[0,1,2,5,6,8,10,12,13,14],someth:[0,6],soon:16,sort:4,sort_kei:4,sourc:[1,2,3,4,5,6,7,8,11,12,13,15,16,18],source_file_filenam:8,source_list:6,sourcecod:[10,14],sourcefile_nam:1,space:[0,6,16],spacing_funct:[10,11],spacingfunc:[6,13],spacingfunct:6,special:0,specif:[0,4,12],specifi:[0,8],spectral:2,speed:[0,8],speedtest:0,spent:4,spheric:0,spin:0,spinrat:0,split:[0,8,13],splitpoint:0,spread:6,sqrt:0,src:[10,14],st1:5,st2:5,stabil:0,stabl:0,stancliff:0,standard:[0,2],star:[1,2,5,6,8,10,12,13,18],star_with_no_mass:0,stardata:[0,1,5,13],stardata_dump_filenam:0,stardata_load_filenam:0,start:[0,1,4,5,6,7,8],start_tim:0,state:0,statement:[1,5],statist:0,statu:[0,1],stderr:0,stdout:4,steadi:0,stefan:12,stellar:[0,2,8,12,17],stellar_structure_algorithm:0,stellar_structure_algorithm_external_funct:0,stellar_structure_algorithm_mint:0,stellar_structure_algorithm_modified_bs:0,stellar_structure_algorithm_non:0,stellar_typ:[1,10,11,12,13],stellar_type_1:[0,12],stellar_type_2:[0,12],stellar_type_3:0,stellar_type_4:0,stellar_type_dict:17,stellar_type_dict_short:17,step:[6,12,16],stepsiz:6,stick:8,stiff:0,still:[1,8],stop:[0,4],stopfil:0,storag:0,store:[0,2,4,6,8,10,14,18],store_memaddr:18,str:[1,4,6,7,12],straight:6,straniero:0,streamhandl:6,strength:0,strict:4,string:[0,1,4,6,7,8,12,15],strip:0,stronger:0,struct:0,structur:[0,4,8,12],stuff:[4,8,12,13],style:0,sub:[0,4],subdict:4,subdirectori:4,subject:0,sublumin:0,submit:10,subroutin:9,subsequ:0,subtract:4,subtract_dict:4,succe:0,suggest:[0,10,14],suit:[10,14],sum:0,sundial:0,supercrit:0,supernova:[0,8],superwind:0,superwind_mira_switchon:0,supress:13,sure:[2,6,8,10,12,14,15],surfac:0,surviv:0,survivor:0,switcher:0,symmetr:0,synchron:0,synonym:0,synthesi:[8,10,14],sys:5,system:[0,5,6,8,10,12,13,14,15],system_gener:6,system_queue_fil:6,t_re:5,tabl:[0,2],take:[0,2,4,5,6,8,13,15],taken:[0,4],tar:[10,14],target:[1,7],task:[0,2,4,5,6,7,9,12,15,16,18],tauri:0,tbse:0,teff:[0,2],teff_1:12,teff_2:12,tell:4,temp_dir:[4,13],temperatur:[0,2,12],tempfil:5,termin:[1,10,14],test:[0,4,6,8,10,14],test_log:5,test_pop:13,text:[4,7],than:[0,2,4,8,10,14],thats:[2,13],thei:[0,2,4,6,8,12],thelog:0,them:[2,4,5,6,13],themselv:[2,4],theres:6,thermal:[0,2,18],thermally_pulsing_asymptotic_giant_branch:0,thermohalin:0,thesi:0,thi:[0,1,2,3,4,5,6,7,8,10,11,12,13,14,15,16,18],thick:0,thick_disc_end_ag:0,thick_disc_logg_max:0,thick_disc_logg_min:0,thick_disc_start_ag:0,thin:0,thing:[0,2,4,5,6,7,13,15],think:[0,4,6],third:[0,2],third_dup:0,third_dup_multipli:0,thorn:0,those:[4,5,6,10,13,14],thread:8,thread_id:8,three:[0,2],three_part_powerlaw:[2,13],threshold:[0,4,8],through:[6,12,15],throughout:6,tidal:0,tidal_strength_factor:0,tide:0,tides_convective_damp:0,tides_hurley2002:0,tides_zahn1989:0,time:[0,1,2,4,5,6,8,10,12,13,14],timescal:0,timestamp:8,timestep:0,timestep_limit:0,timestep_log:0,timestep_modul:0,timestep_multipli:0,timestep_solver_factor:0,tinslei:2,titl:7,tmp:[0,4,10,14],tmp_dir:[6,8],tmp_tabl:2,todo:[0,1,2,4,6,7,8,12,13,15,16,18],toler:0,too:[0,4,8,10,14,15],topic:0,torqu:0,total:[0,2,4,6,8,12],tout:[0,18],tpagb:0,tpagb_reimers_eta:0,tpagb_wind_beasor_etal_2020:0,tpagb_wind_bloeck:0,tpagb_wind_goldman_etal_2017:0,tpagb_wind_mattsson:0,tpagb_wind_reim:0,tpagb_wind_rob_cwind:0,tpagb_wind_van_loon:0,tpagb_wind_vw93_karaka:0,tpagb_wind_vw93_karakas_carbon_star:0,tpagb_wind_vw93_orig:0,tpagb_wind_vw93_orig_carbon_star:0,tpagbwind:0,tpagbwindfac:0,traceback:4,track:[8,12],trade:0,transfer:0,transform:[0,4],transit:0,treat:0,trigger:0,tripl:[0,2,8],tru:4,truli:0,tupl:1,turn:[0,4,13],two:[0,4,17,18],txt:[5,6,15],type:[0,1,2,4,6,7,8,12,16,17,18],type_ia_mch_supernova_algorithm:0,type_ia_sub_mch_supernova_algorithm:0,typic:0,ubvri:0,ugriv:0,uncom:6,under:16,undergo:0,understand:6,undescrib:7,uniform:2,union:[2,4,6,16,18],uniqu:[4,6,8],unit:[0,18],unittest:18,univari:0,unknown:15,unless:[1,6,8],unload:6,unrecogn:[10,14],unsign:0,unstabl:0,until:[0,2,4,6],unus:[0,8],updat:[2,4,6,10,13,14],update_dict:4,upper:[0,2,16],usag:0,use:[0,2,4,5,6,8,9,10,12,13,14,15],use_astropy_valu:12,use_datadir:[6,13],use_fixed_timestep_:0,use_periastron_roche_radiu:0,use_tabular_intershell_abundances_karakas_2012:0,used:[0,1,2,4,6,8,12,13],useful:[0,4,6,8,10,14,15,18],useful_func:[10,11],user:[1,2,4,6,7,8,15],userinput:4,uses:[0,5,8,13],using:[0,1,3,5,6,10,13,14],usr:5,usual:[0,2,8],util:[1,2,4,5,6,7,12,13,15,16,18],val:2,valid:[0,2,4],valu:[0,1,2,4,5,6,7,8,12,13],valueerror:13,valuerang:[6,13],van:0,vandenheuvel_log:0,vari:0,variabl:[0,4,6,8,13],variant:0,variou:0,vassiliadi:0,veloc:[0,2],verbos:[1,2,4,8,10,13,14],verbose_print:4,veri:[0,5,6,13,16],versa:18,version:[0,4,6,10,14],version_info:4,version_info_str:4,version_onli:0,via:[6,8,12,13],vice:18,vink:0,virtual:[10,14],virtualenviron:[10,14],viscos:0,viscou:0,visit:10,volum:0,vrot1:0,vrot2:0,vrot3:0,vrot4:0,vrot_breakup:0,vrot_bs:0,vrot_non_rot:0,vrot_sync:0,vw93:0,vw93_eagb_wind_spe:0,vw93_mira_shift:0,vw93_multipli:0,vw93_tpagb_wind_spe:0,vwind:0,vwind_beta:0,vwind_multipli:0,wai:[0,3,4,6,8,12,13],wang:0,want:[0,2,4,5,6,7,8,12,13],warmup_cpu:0,warn:[0,6],wave:0,wd_accretion_rate_new_giant_envelope_lower_limit_helium_donor:0,wd_accretion_rate_new_giant_envelope_lower_limit_hydrogen_donor:0,wd_accretion_rate_new_giant_envelope_lower_limit_other_donor:0,wd_accretion_rate_novae_upper_limit_helium_donor:0,wd_accretion_rate_novae_upper_limit_hydrogen_donor:0,wd_accretion_rate_novae_upper_limit_other_donor:0,wd_kick:0,wd_kick_at_every_puls:0,wd_kick_at_given_puls:0,wd_kick_direct:0,wd_kick_end_agb:0,wd_kick_first_rlof:0,wd_kick_pulse_numb:0,wd_kick_when:0,wd_sigma:0,wdwd_merger_algorithm:0,wdwd_merger_algorithm_bs:0,wdwd_merger_algorithm_chen2016:0,wdwd_merger_algorithm_perets2019:0,weight:[0,8],well:[0,4,8,10,14],were:4,what:[0,1,2,4,5,6,7,8,10,13,14,15],whatev:[5,6,10,14],wheeler:0,when:[0,1,2,4,5,6,7,8,10,13,14,15],whenev:[10,14],where:[0,1,2,4,6,7,8,10,14],whether:[0,2,4,6,7,8,12,18],which:[0,1,2,3,4,5,6,7,8,10,13,14,15,18],whichev:8,white:0,white_dwarf_cooling_carrasco2014:0,white_dwarf_cooling_mestel:0,white_dwarf_cooling_mestel_modifi:0,white_dwarf_cooling_model:0,white_dwarf_radius_carrasco2014:0,white_dwarf_radius_model:0,white_dwarf_radius_mu:0,white_dwarf_radius_nauenberg1972:0,whole:[6,8],width:0,wind:0,wind_algorithm_binary_c_2020:0,wind_algorithm_hurley2002:0,wind_algorithm_non:0,wind_algorithm_schneider2018:0,wind_angmom_loss_bs:0,wind_angmom_loss_lw:0,wind_angmom_loss_lw_hybrid:0,wind_angmom_loss_spherically_symmetr:0,wind_angular_momentum_loss:0,wind_disc_angmom_fract:0,wind_disc_mass_fract:0,wind_djorb_fac:0,wind_gas_to_dust_ratio:0,wind_lbv_luminosity_lower_limit:0,wind_mass_loss:0,wind_multiplier_:0,wind_nieuwenhuijzen_luminosity_lower_limit:0,wind_type_multiplier_:0,within:[0,4,6,10,14],without:[2,6,8],won:0,wood:0,work:[0,4,5,10,12,13,14],would:[0,4,12],wouldnt:6,wr_wind:0,wr_wind_bs:0,wr_wind_eldridg:0,wr_wind_fac:0,wr_wind_maeder_meynet:0,wr_wind_nugis_lam:0,wrap:[1,13],wrapper:[4,5,18],write:[1,4,5,6,7,8,13,15],write_binary_c_calls_to_fil:6,write_binary_c_parameter_descriptions_to_rst_fil:4,write_grid_options_to_rst_fil:7,written:[5,6,7,8,13,15],wrlof_mass_transf:0,wrlof_method:0,wrlof_non:0,wrlof_q_depend:0,wrlof_quadrat:0,wrong:[10,14],wrt:1,wrwindfac:0,wtts2:0,wtts_log:0,www:[0,2],year:[0,2],yet:[0,4,5,6,8,12,13],yield:0,you:[0,1,4,5,6,7,8,10,12,13,14,18],young:0,your:[5,8,10,14],yourself:[12,13],zahn:0,zam:[0,2,15,18],zams_collis:18,zams_mass:13,zero:[0,1,8],zero_ag:13,zone:0,zoom:0,zoomfac_multiplier_decreas:0,zoomfac_multiplier_increas:0,zsolar:2,zytkow:0},titles:["Binary_c parameters","custom_logging_functions module","distribution_functions module","Examples","functions module","Examples","grid_class module","Grid options and descriptions","Population grid code options","hpc_functions module","Welcome to binary_c-python\u2019s documentation!","Binarycpython code","plot_functions module","Example of population script","Python module for binary_c","run_system_wrapper module","spacing_functions module","stellar_types module","useful_funcs module"],titleterms:{"function":4,"public":8,after:[10,14],algorithm:0,binari:0,binary_c:[0,10,14],binarycpython:11,build:[10,14],code:[8,11],custom_logging_funct:1,descript:7,distefano:8,distribution_funct:2,document:[10,14],environ:[10,14],exampl:[3,5,10,13,14],faq:[10,14],from:[10,14],grid:[7,8],grid_class:6,hpc_function:9,indic:10,input:0,instal:[10,14],instruct:[10,14],issu:[10,14],misc:0,modul:[1,2,4,6,9,10,12,14,15,16,17,18],moe:8,note:[10,14],nucsyn:0,option:[7,8],output:0,paramet:0,pip:[10,14],plot_funct:12,popul:[8,13],privat:8,python:[10,14],requir:[10,14],run_system_wrapp:15,sampler:8,script:13,section:0,sourc:[10,14],spacing_funct:16,star:0,stellar_typ:17,tabl:10,usag:[10,14],useful_func:18,variabl:[10,14],via:[10,14],welcom:10}})
\ No newline at end of file
+Search.setIndex({docnames:["binary_c_parameters","custom_logging_functions","distribution_functions","example_notebooks","functions","grid","grid_options_defaults","grid_options_descriptions","hpc_functions","index","modules","notebook_api_functionality","notebook_custom_logging","notebook_extra_features","notebook_individual_systems","notebook_population","plot_functions","readme_link","run_system_wrapper","spacing_functions","stellar_types","useful_funcs"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,"sphinx.ext.todo":2,"sphinx.ext.viewcode":1,nbsphinx:3,sphinx:56},filenames:["binary_c_parameters.rst","custom_logging_functions.rst","distribution_functions.rst","example_notebooks.rst","functions.rst","grid.rst","grid_options_defaults.rst","grid_options_descriptions.rst","hpc_functions.rst","index.rst","modules.rst","notebook_api_functionality.ipynb","notebook_custom_logging.ipynb","notebook_extra_features.ipynb","notebook_individual_systems.ipynb","notebook_population.ipynb","plot_functions.rst","readme_link.rst","run_system_wrapper.rst","spacing_functions.rst","stellar_types.rst","useful_funcs.rst"],objects:{"binarycpython.utils":{custom_logging_functions:[1,0,0,"-"],distribution_functions:[2,0,0,"-"],functions:[4,0,0,"-"],grid:[5,0,0,"-"],grid_options_defaults:[6,0,0,"-"],hpc_functions:[8,0,0,"-"],plot_functions:[16,0,0,"-"],run_system_wrapper:[18,0,0,"-"],spacing_functions:[19,0,0,"-"],stellar_types:[20,0,0,"-"],useful_funcs:[21,0,0,"-"]},"binarycpython.utils.custom_logging_functions":{autogen_C_logging_code:[1,1,1,""],binary_c_log_code:[1,1,1,""],binary_c_write_log_code:[1,1,1,""],compile_shared_lib:[1,1,1,""],create_and_load_logging_function:[1,1,1,""],from_binary_c_config:[1,1,1,""],return_compilation_dict:[1,1,1,""]},"binarycpython.utils.distribution_functions":{"const":[2,1,1,""],Arenou2010_binary_fraction:[2,1,1,""],Izzard2012_period_distribution:[2,1,1,""],Kroupa2001:[2,1,1,""],Moe_di_Stefano_2017_multiplicity_fractions:[2,1,1,""],Moe_di_Stefano_2017_pdf:[2,1,1,""],build_q_table:[2,1,1,""],calc_P_integral:[2,1,1,""],calc_e_integral:[2,1,1,""],calc_total_probdens:[2,1,1,""],calculate_constants_three_part_powerlaw:[2,1,1,""],cosmic_SFH_madau_dickinson2014:[2,1,1,""],duquennoy1991:[2,1,1,""],fill_data:[2,1,1,""],flat:[2,1,1,""],flatsections:[2,1,1,""],gaussian:[2,1,1,""],gaussian_func:[2,1,1,""],gaussian_normalizing_const:[2,1,1,""],get_integration_constant_q:[2,1,1,""],get_max_multiplicity:[2,1,1,""],imf_chabrier2003:[2,1,1,""],imf_scalo1986:[2,1,1,""],imf_scalo1998:[2,1,1,""],imf_tinsley1980:[2,1,1,""],interpolate_in_mass_izzard2012:[2,1,1,""],ktg93:[2,1,1,""],linear_extrapolation_q:[2,1,1,""],merge_multiplicities:[2,1,1,""],normalize_dict:[2,1,1,""],number:[2,1,1,""],poisson:[2,1,1,""],powerlaw:[2,1,1,""],powerlaw_constant:[2,1,1,""],powerlaw_extrapolation_q:[2,1,1,""],prepare_dict:[2,1,1,""],raghavan2010_binary_fraction:[2,1,1,""],sana12:[2,1,1,""],set_opts:[2,1,1,""],three_part_powerlaw:[2,1,1,""]},"binarycpython.utils.functions":{BinaryCEncoder:[4,2,1,""],Capturing:[4,2,1,""],binarycDecoder:[4,2,1,""],binaryc_json_serializer:[4,1,1,""],call_binary_c_config:[4,1,1,""],catchtime:[4,2,1,""],convert_bytes:[4,1,1,""],count_keys_recursive:[4,1,1,""],create_arg_string:[4,1,1,""],create_hdf5:[4,1,1,""],custom_sort_dict:[4,1,1,""],example_parse_output:[4,1,1,""],extract_ensemble_json_from_string:[4,1,1,""],filter_arg_dict:[4,1,1,""],get_arg_keys:[4,1,1,""],get_defaults:[4,1,1,""],get_help:[4,1,1,""],get_help_all:[4,1,1,""],get_help_super:[4,1,1,""],get_moe_di_stefano_dataset:[4,1,1,""],get_size:[4,1,1,""],handle_ensemble_string_to_json:[4,1,1,""],imports:[4,1,1,""],inspect_dict:[4,1,1,""],is_capsule:[4,1,1,""],load_logfile:[4,1,1,""],make_build_text:[4,1,1,""],merge_dicts:[4,1,1,""],multiply_values_dict:[4,1,1,""],output_lines:[4,1,1,""],parse_binary_c_version_info:[4,1,1,""],recursive_change_key_to_float:[4,1,1,""],recursive_change_key_to_string:[4,1,1,""],remove_file:[4,1,1,""],return_binary_c_version_info:[4,1,1,""],subtract_dicts:[4,1,1,""],temp_dir:[4,1,1,""],update_dicts:[4,1,1,""],verbose_print:[4,1,1,""],write_binary_c_parameter_descriptions_to_rst_file:[4,1,1,""]},"binarycpython.utils.functions.BinaryCEncoder":{"default":[4,3,1,""]},"binarycpython.utils.functions.Capturing":{__enter__:[4,3,1,""],__exit__:[4,3,1,""]},"binarycpython.utils.functions.binarycDecoder":{decode:[4,3,1,""]},"binarycpython.utils.functions.catchtime":{__enter__:[4,3,1,""],__exit__:[4,3,1,""]},"binarycpython.utils.grid":{Population:[5,2,1,""]},"binarycpython.utils.grid.Population":{Moe_di_Stefano_2017:[5,3,1,""],add_grid_variable:[5,3,1,""],evolve:[5,3,1,""],evolve_single:[5,3,1,""],export_all_info:[5,3,1,""],format_ensemble_results:[5,3,1,""],parse_cmdline:[5,3,1,""],return_all_info:[5,3,1,""],return_binary_c_defaults:[5,3,1,""],return_binary_c_version_info:[5,3,1,""],return_population_settings:[5,3,1,""],set:[5,3,1,""],set_moe_di_stefano_settings:[5,3,1,""],write_binary_c_calls_to_file:[5,3,1,""]},"binarycpython.utils.grid_options_defaults":{grid_options_description_checker:[6,1,1,""],grid_options_help:[6,1,1,""],print_option_descriptions:[6,1,1,""],write_grid_options_to_rst_file:[6,1,1,""]},"binarycpython.utils.plot_functions":{color_by_index:[16,1,1,""],dummy:[16,1,1,""],parse_function_hr_diagram:[16,1,1,""],parse_function_masses:[16,1,1,""],parse_function_orbit:[16,1,1,""],plot_HR_diagram:[16,1,1,""],plot_masses:[16,1,1,""],plot_orbit:[16,1,1,""],plot_system:[16,1,1,""]},"binarycpython.utils.run_system_wrapper":{run_system:[18,1,1,""]},"binarycpython.utils.spacing_functions":{"const":[19,1,1,""]},"binarycpython.utils.useful_funcs":{calc_period_from_sep:[21,1,1,""],calc_sep_from_period:[21,1,1,""],maximum_mass_ratio_for_RLOF:[21,1,1,""],minimum_period_for_RLOF:[21,1,1,""],minimum_separation_for_RLOF:[21,1,1,""],ragb:[21,1,1,""],roche_lobe:[21,1,1,""],rzams:[21,1,1,""],zams_collision:[21,1,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","class","Python class"],"3":["py","method","Python method"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:method"},terms:{"000":14,"0000":14,"000000000000e":14,"0001":[11,21],"000116989":15,"000121486":15,"000150087":15,"000154349":15,"000157195":15,"000172877":15,"000211219":15,"00028381":15,"000381347":15,"000512406":15,"000610573":15,"000627913":15,"000688507":15,"0007":2,"000925128":15,"001":[0,11],"00124307":15,"00167028":15,"00224431":15,"00498":15,"005444573822104362":15,"00632092":11,"006827156705e":15,"007109286263e":15,"0073157281034221516":15,"009829948023831718":15,"013208238029791246":15,"01344":15,"0141":11,"0144107":15,"015033359333e":15,"0154":15,"017435498578e":15,"027099358410e":15,"041660877905e":12,"041662558619e":12,"041662560111e":12,"041662564579e":12,"04459e":15,"047074050271e":15,"05150046619238191":15,"05150046619238192":15,"05193":15,"054":2,"055645404546e":15,"0587":15,"069363482023e":15,"069567332611e":15,"069626478211e":15,"069627290216e":15,"07011e":15,"074084349384e":15,"075844624794e":15,"07671":15,"0820":[0,11],"08519":15,"08624781646269201":15,"0862478164626921":15,"087296558990e":15,"08861e":15,"08873e":15,"08msun":[0,11],"0902":[0,11],"09216":15,"0x7f163859d0c0":11,"0x7f9265091598":14,"0x7ff3bdf79620":15,"100":[0,2,11],"1000":7,"10328":15,"10417":15,"10433":15,"10446":15,"104706358826e":15,"1048014407228":15,"1085":14,"108751340926e":15,"11003":14,"112":15,"11282":15,"115":2,"11582":14,"117519147635e":15,"119":15,"12303":15,"12325":14,"12457":14,"12460":14,"12461":14,"12462":14,"125":[0,11,15],"12500":0,"126828648362e":15,"12e":[1,12,14,15],"1300":14,"1302":14,"13462":14,"1357":12,"13876":15,"13e3":[0,11],"1403":2,"14057":12,"14059":12,"14462":14,"146421815741e":15,"150":15,"15000":[0,11,12,14,15],"1506841305680684":15,"15343":15,"1564":15,"15854":15,"15875":15,"15msun":2,"1612":14,"1613":14,"1614":14,"1615":14,"1616":14,"1628444120":15,"1628444121":15,"170425790780e":15,"170770422321e":15,"170770599495e":15,"170775828562e":15,"171086983243e":15,"171108213270e":15,"172196856333e":15,"17639":15,"18838":15,"18914e":15,"190":0,"19314":12,"194842917007e":15,"1951":[0,11],"1972":[0,11],"1975":[0,11],"197x":[0,11],"1980":2,"1983":21,"1986":[0,2,11],"1989":[0,11],"1991":2,"1993":[0,11],"1996":21,"1998":[0,2,11],"1999":[0,11],"1ckzg0p9":[9,17],"1e2":[0,11],"1e9":[0,11],"200":[0,11],"2000":[0,11],"2001":2,"2002":[0,11],"2003":[0,2,11],"2004":[0,11],"2005":[0,11],"2009":[0,11],"2010":[0,2,7,11],"2012":[0,2,11],"2013":[0,11],"2014":[0,2,11],"2015":[0,11],"2016":[0,11],"2017":[0,7,11,15],"2018":[0,1,11],"2019":[0,11],"2020":[0,11],"2021":0,"20210807":0,"20484":15,"206771867883e":15,"20787":15,"21331":15,"21473":15,"21673":15,"2174":15,"21805":15,"21878":15,"218786094847e":15,"21892":15,"21893":15,"222715508467e":15,"22723621650191106":15,"22759":15,"230407246199e":15,"232906623449e":15,"234709":15,"23604":15,"2383":14,"2424":14,"24954e":15,"25294":15,"2535":15,"257":21,"25msun":[0,11],"27442":15,"27563":15,"27565":15,"27572":15,"27804":15,"278384712062e":15,"281":21,"28672":15,"29402e":15,"29444":15,"294870923827e":15,"29678":15,"2969346":2,"29746":15,"2983275843337705":15,"29864":15,"29942":15,"29977":15,"29994":15,"2a7732d03e594ef4b5dfe9051b41d9c0":15,"2msun":[0,11],"3000":[0,11],"30145":15,"30149":15,"30197":15,"3032":15,"30337":15,"30504":15,"30e4":[0,11],"31004":15,"315554923168e":15,"3177":15,"32047":15,"3205":15,"32641e":15,"33062":15,"33079":15,"33524":12,"337250536639e":15,"34071e":15,"34281":15,"34903":15,"34922":15,"34937":15,"350021848285e":15,"35209":15,"3552":15,"364277535630e":15,"3678":15,"3680f3882c0a449c944462abffea2447":15,"36979":15,"36m":11,"38004":15,"38063":12,"3836":15,"38403":15,"38887e":15,"3933":15,"3msun":2,"4000":0,"4046":15,"40513":15,"40745":15,"40749":15,"40935":15,"41074":15,"41264":15,"41295e":15,"42148e":15,"42212":15,"42238":15,"42375":15,"42msun":[0,11],"43925":15,"439623364590e":15,"4424":15,"446":12,"449960890183e":15,"44msun":[0,11],"4500":11,"45000000080":15,"4530":[12,14],"458869865939e":15,"459153942631e":15,"45msun":[0,11],"4603":15,"47276":15,"47961":15,"47976e":15,"48488":15,"4e3":[0,11],"500":[0,11],"5102526289471614":15,"513216011269e":15,"522806":14,"523":14,"525":15,"527722847382e":15,"52963":15,"53113":15,"53174":15,"53175":15,"53176":15,"53177":15,"53183":15,"53184":15,"5357":15,"53631":15,"53922":15,"556479830908e":15,"55924":15,"561265707015991":15,"56776":15,"5689":15,"571858031651e":15,"575":15,"577754":14,"59052":15,"59499":15,"5msun":[0,11],"600000":0,"60808":15,"6101":0,"61349":12,"6246354579925537":15,"62486":15,"625":0,"62517":15,"64419":15,"65097":15,"653200958306e":15,"67365":14,"687368550125e":15,"68933e":15,"693213405973e":15,"6944":0,"6e1":2,"6e5":[0,11],"6msun":[0,11],"70319":15,"70668e":15,"71025":15,"71288":15,"7197":15,"721374713429e":15,"723547465714e":15,"723570798020e":15,"72498e":[12,15],"72638":15,"726405299909e":15,"730":[12,15],"73221":15,"733614170983e":15,"733794947644e":15,"733865371895e":15,"7358":[11,12,14],"73856":15,"74037":12,"7431":15,"750574783854e":15,"753837732894e":15,"7619":0,"763":2,"764340254985e":15,"765535914728e":15,"765996194699e":15,"76647":15,"766606588165e":15,"768305081494e":15,"773581245005e":12,"774":14,"7797017097473145":15,"78096":15,"78125":0,"783":14,"78384":15,"79411e":15,"795":2,"797342083485e":15,"802132608769e":15,"80457":15,"806014211040e":15,"806123543037e":15,"807147339697e":15,"80msol":2,"81391":15,"8162e":15,"817":14,"8178":15,"81906":15,"82242e":15,"84162":15,"853070305680e":15,"85486":15,"862081089332e":15,"8628":15,"862942347290e":15,"863377990313e":15,"867655467480e":15,"878236827680e":12,"881529045940e":15,"88566":15,"8955":14,"917420996633e":15,"92267":12,"922967341481e":15,"931266944719e":15,"93135e":15,"933751523833e":15,"94027":15,"941017702765e":15,"9514":14,"9545065608702976":15,"9713":15,"97286e":15,"974759306305e":15,"97823":15,"9791":15,"980988739731e":15,"9863e":15,"990017992944e":15,"99198":12,"99255":15,"99283":15,"99471":15,"boolean":[0,4,5,7,11,16,21],"break":[0,11],"case":[0,4,7,11,15],"catch":[4,7,14,15],"char":7,"class":[4,5],"const":[2,5,15,19],"default":[0,1,2,4,5,6,7,11,12,15,18],"export":[4,5,15],"float":[0,2,4,11,14,19,21],"function":[0,1,2,3,5,6,7,8,9,10,12,16,17,18,19,21],"import":[4,5,11,12,14,15],"int":[0,1,2,4,5,6,7,11,15,19,21],"long":[0,4,5,7,11,15,20],"new":[0,2,4,5,11,14,15],"null":[0,4,11,12],"paczy\u0144ski":[0,11],"public":[6,9,15],"return":[1,2,4,5,6,7,11,14,15,16,18,19,21],"short":[0,11,20],"super":[0,11],"switch":[0,11],"throw":[9,17],"true":[0,4,5,6,7,11,15,16],"try":[0,9,11,14,15,17],"void":12,"while":[0,11],Added:15,Adding:[3,14],And:[6,9,17,21],But:14,Doing:15,For:[0,4,9,11,12,14,16,17],Gas:[0,11],Its:7,NOT:[0,11,18],Not:7,One:[0,11],Pms:16,That:[0,11],The:[0,1,2,3,4,5,7,9,11,12,14,15,16,17,18],Then:[4,9,17],There:[2,5,6,7,11,12,14,15,16],These:[4,7,11,15,16],Use:[0,5,11,15],Used:[0,7,11,16],Useful:[0,5,6,11,15],Uses:[0,11,19],Using:[3,9],Was:[0,11],Will:[0,4,5,11,15,18],With:6,__arg_begin:11,__attribute__:12,__enter__:4,__exit__:4,_actually_evolve_system:7,_binary_c_bind:[4,11,12,14,21],_binary_c_config_execut:7,_binary_c_dir:7,_binary_c_execut:7,_binary_c_shared_librari:7,_calculate_multiplicity_fract:15,_commandline_input:7,_count:7,_custom_logging_shared_library_fil:7,_end_time_evolut:7,_errors_exceed:7,_errors_found:7,_evolution_type_opt:7,_failed_count:7,_failed_prob:7,_failed_systems_error_cod:7,_generate_grid_cod:7,_grid_vari:7,_loaded_ms_data:7,_main_pid:7,_population_id:7,_probtot:7,_process_run_population_grid:7,_repeat:7,_set:5,_set_ms_grid:7,_start_time_evolut:7,_store_memaddr:7,_system_gener:7,_total_mass_run:7,_total_probability_weighted_mass_run:7,_total_starcount:7,_zero_prob_stars_skip:7,abat:[0,11],abbrevi:20,abl:11,about:[4,5,6,15,21],abov:[0,2,4,5,11,12,14,15],abridg:[11,12],absolut:[0,11],abund:[0,11],acceler:[0,11],accept:[4,11,15],access:[2,7,12,14,15],accord:[0,2,11],accordingli:[14,15],account:[0,7,11],accret:[0,11],accretion_limit_dynamical_multipli:[0,11],accretion_limit_eddington_lmms_multipli:[0,11],accretion_limit_eddington_steady_multipli:[0,11],accretion_limit_eddington_wd_to_remnant_multipli:[0,11],accretion_limit_thermal_multipli:[0,11],accretor:[0,11,21],act:[0,7,11,15],activ:[0,9,11,17],actual:[0,4,5,7,9,11,12,14,15,16,17],adam:[0,11],adapt:[0,11],add:[2,4,5,7,12,14,15,16,19,21],add_grid_vari:[5,15],added:[4,14],adding:[14,15],address:[1,7,11,12,21],admittedli:16,adress:[11,12,21],advis:12,affect:[0,11],after:[0,5,7,11,12,15],ag89:[0,11],again:[4,5,7,9,14,17],against:16,agb:[0,11],agb_3dup_algorithm:[0,11],agb_core_algorithm:[0,11],agb_core_algorithm_default:0,agb_core_algorithm_hurlei:0,agb_core_algorithm_karaka:0,agb_luminosity_algorithm:[0,11],agb_luminosity_algorithm_default:0,agb_luminosity_algorithm_hurlei:0,agb_luminosity_algorithm_karaka:0,agb_radius_algorithm:[0,11],agb_radius_algorithm_default:0,agb_radius_algorithm_hurlei:0,agb_radius_algorithm_karaka:0,agb_third_dredge_up_algorithm_default:0,agb_third_dredge_up_algorithm_hurlei:0,agb_third_dredge_up_algorithm_karaka:0,agb_third_dredge_up_algorithm_stancliff:0,age:[0,11],aging:[0,11],albedo:[0,11],algorithm:[9,11],algothim:[0,11],all:[0,1,2,4,5,6,7,9,10,11,14,15,16,17,18],all_info:5,alloc:11,allow:[0,2,4,7,11,12],allow_nan:4,along:[0,6,7],alpha:[0,11],alpha_c:[0,11],alphacb:[0,11],alreadi:[5,15],also:[0,3,4,5,6,9,11,12,15,17,21],altern:[0,7,11],alwai:[0,2,7,11],amanda:[0,11],amax:2,amin:2,amount:[0,4,5,6,7,11,15,19],amp:11,amt_cor:[7,15],analys:18,analyt:[5,15],analyz:14,andrew:[9,17],andronov:[0,11],angelou_lithium_cheb_decay_tim:[0,11],angelou_lithium_cheb_massfrac:[0,11],angelou_lithium_cheb_tim:[0,11],angelou_lithium_decay_funct:[0,11],angelou_lithium_decay_tim:[0,11],angelou_lithium_eagb_decay_tim:[0,11],angelou_lithium_eagb_massfrac:[0,11],angelou_lithium_eagb_tim:[0,11],angelou_lithium_gb_decay_tim:[0,11],angelou_lithium_gb_massfrac:[0,11],angelou_lithium_gb_tim:[0,11],angelou_lithium_hg_decay_tim:[0,11],angelou_lithium_hg_massfrac:[0,11],angelou_lithium_hg_tim:[0,11],angelou_lithium_lmms_decay_tim:[0,11],angelou_lithium_lmms_massfrac:[0,11],angelou_lithium_lmms_tim:[0,11],angelou_lithium_ms_decay_tim:[0,11],angelou_lithium_ms_massfrac:[0,11],angelou_lithium_ms_tim:[0,11],angelou_lithium_tpagb_decay_tim:[0,11],angelou_lithium_tpagb_massfrac:[0,11],angelou_lithium_tpagb_tim:[0,11],angelou_lithium_vrot_trigg:[0,11],angelou_lithium_vrotfrac_trigg:[0,11],angular:[0,11,16],ani:[0,2,4,5,9,11,14,15,17],anoth:[0,11],ansi:[0,11],anyth:[0,7,11,15],anywai:[5,14,15],anywher:[5,15],api:[0,3,4,9],api_log_filename_prefix:[0,11],append:[1,4,14],appli:[0,11],appropri:[0,7,11],approxim:[0,11],aren:[2,7],arenou2010_binary_fract:2,arg:[2,4,11,15,16],arg_dict:4,argopt:[0,11],argpair:4,argstr:[11,12,14],argument:[0,2,4,5,7,11,14,15,18],argument_of_periastron:[0,11],argument_of_periastron_quadrupl:[0,11],argument_of_periastron_tripl:[0,11],around:[0,11,12,14],arrai:[2,4,7,14],artifici:[0,11],artificial_accretion_end_tim:[0,11],artificial_accretion_ignor:0,artificial_accretion_start_tim:[0,11],artificial_angular_momentum_accretion_r:[0,11],artificial_mass_accretion_r:[0,11],artificial_orbital_angular_momentum_accretion_r:[0,11],arxiv:[0,2,11],ask:[0,11,21],asplund:[0,11],assign:[5,15],assum:[0,11,16],ast871:[0,11],astronomi:[0,11],astropi:[9,16,17],atom:4,attempt:[4,5],aug:0,auto:[1,10],autogen_c_logging_cod:[1,12],automat:[0,1,6,9,11,12,17],avaibl:[9,17],avail:[0,4,7,11,12,15,16],avoid:11,awai:[0,11],axi:[0,11,16],b_1:[0,11],b_2:[0,11],b_3:[0,11],b_4:[0,11],b_inclination1:[0,11],b_inclination2:[0,11],b_inclination3:[0,11],b_inclination4:[0,11],back:[0,4,11],backward:[0,11],bagb:[0,11],barn:[0,11],base:[0,2,4,5,9,11,15,16,17,21],base_filenam:[5,15],basic:[5,15],batchmod:[0,11],beasor:[0,11],becaus:[0,2,5,7,9,11,14,17],becom:[0,1,2,4,11,12],been:[0,5,7,11],befor:[0,5,7,9,11,15,17],behaviour:[4,15,18],belczynski:[0,11],below:[0,3,7,11,12,15],berro:[0,11],bertolami:[0,11],best:[5,7,9,17],beta:[0,11],beta_reverse_nova:[0,11],beta_reverse_novae_geometri:0,better:[0,4,5,11,15],between:[0,2,11,19],bewar:[5,15],bh_belczynski:0,bh_fryer12_delai:0,bh_fryer12_rapid:0,bh_hurley2002:0,bh_prescript:[0,11],bh_spera2015:0,big:[0,7,11],biinari:15,bin:[0,9,11,17],binari:[2,5,7,9,11,14,15,16,17,21],binary_c2:[9,17],binary_c:[1,2,4,5,7,12,14,15,16,18],binary_c_api_funct:12,binary_c_cal:[5,15],binary_c_default:15,binary_c_grid_2a7732d03e594ef4b5dfe9051b41d9c0:15,binary_c_inline_config:1,binary_c_log_cod:[1,12,14],binary_c_macro:[0,11],binary_c_output:4,binary_c_paramet:[0,11,15],binary_c_python:[4,5,11,14,15],binary_c_task_:[0,11],binary_c_write_log_cod:1,binary_grid:[0,11],binary_star:21,binaryc:[1,4,18],binaryc_config:1,binaryc_json_seri:4,binarycdecod:4,binarycencod:4,binarycpython3:11,binarycpython:[1,2,3,4,5,6,9,12,16,17,18,19,21],binarygrid:15,bind:[0,11,12,14],birth:[0,11],bit:2,bivari:[0,11],black:[0,11],black_hol:0,bloecker:[0,11],blog:1,boltzman:16,boltzmann:[0,11],bondi:[0,11],bondi_hoyle_accretion_factor:[0,11],bool:[4,5,6,15,16],born:[0,11],bosswissam:4,both:[0,4,11,15],bottom:[0,11,15],bound:[2,19],boundari:2,brake:[0,11],branch:[0,4,11],branch_david:0,branchpoint:[5,15],breakup:[0,11],broken:[0,11],bse:[0,2,11,12,15],bse_opt:[5,14,15],bsf:[0,11],buffer:[0,11],build:[0,1,4,11],build_q_tabl:2,built:[0,1,4,9,17],burn:[0,11],busso:[0,11],bye:[0,11],c13_eff:[0,11],c5232be5c:0,c_auto_log:7,c_log:0,c_logging_cod:[7,12,14,15],calc_e_integr:2,calc_p_integr:2,calc_period_from_sep:21,calc_sep_from_period:[15,21],calc_total_probden:2,calcul:[0,2,4,5,7,11,15,21],calculate_constants_three_part_powerlaw:2,call:[0,1,4,5,7,11,14,15,16,18],call_binary_c_config:4,calls_filenam:15,can:[0,1,2,4,5,7,9,11,12,14,15,16,17,18],cannot:[5,12],canon:7,cap:[0,11],capsul:[1,4,11],captur:[0,4,11],carbon:[0,11],carbon_oxygen_white_dwarf:0,carlo:[0,7,11],carrasco:[0,11],carri:[0,11],cast:4,catchtim:4,categor:11,categori:[11,15],categoris:4,caught:[4,14],caus:21,cbdisc:[0,11],cbdisc_albedo:[0,11],cbdisc_alpha:[0,11],cbdisc_eccentricity_pumping_dermin:0,cbdisc_eccentricity_pumping_method:[0,11],cbdisc_eccentricity_pumping_non:0,cbdisc_end_evolution_after_disc:[0,11],cbdisc_fail_ring_inside_separ:[0,11],cbdisc_gamma:[0,11],cbdisc_init_djdm:[0,11],cbdisc_init_dm:[0,11],cbdisc_inner_edge_strip:[0,11],cbdisc_inner_edge_stripping_timescal:[0,11],cbdisc_kappa:[0,11],cbdisc_mass_loss_constant_r:[0,11],cbdisc_mass_loss_fuv_multipli:[0,11],cbdisc_mass_loss_inner_l2_cross_multipli:[0,11],cbdisc_mass_loss_inner_viscous_accretion_method:[0,11],cbdisc_mass_loss_inner_viscous_accretion_method_equ:0,cbdisc_mass_loss_inner_viscous_accretion_method_gerosa_2015:0,cbdisc_mass_loss_inner_viscous_accretion_method_non:0,cbdisc_mass_loss_inner_viscous_accretion_method_young_clarke_2015:0,cbdisc_mass_loss_inner_viscous_angular_momentum_multipli:[0,11],cbdisc_mass_loss_inner_viscous_multipli:[0,11],cbdisc_mass_loss_ism_pressur:[0,11],cbdisc_mass_loss_ism_ram_pressure_multipli:[0,11],cbdisc_mass_loss_xray_multipli:[0,11],cbdisc_max_lifetim:[0,11],cbdisc_minimum_evaporation_timescal:[0,11],cbdisc_minimum_fr:[0,11],cbdisc_minimum_luminos:[0,11],cbdisc_minimum_mass:[0,11],cbdisc_no_wind_if_cbdisc:[0,11],cbdisc_outer_edge_strip:[0,11],cbdisc_outer_edge_stripping_timescal:[0,11],cbdisc_resonance_damp:[0,11],cbdisc_resonance_multipli:[0,11],cbdisc_torquef:[0,11],cbdisc_viscous_l2_coupl:[0,11],cbdisc_viscous_photoevaporative_coupl:[0,11],cbdisc_viscous_photoevaporative_coupling_inst:[0,11],cbdisc_viscous_photoevaporative_coupling_non:[0,11],cbdisc_viscous_photoevaporative_coupling_visc:[0,11],cee:[0,11],cell:[11,15],cemp:[0,11],cemp_cfe_minimum:[0,11],center:[5,15],central_object:[0,11],certain:[7,9,17],cf_amanda_log:[0,11],cflag:[9,17],chabrier:2,chandrasekhar:[0,11],chandrasekhar_mass:[0,11],chang:[0,1,2,4,5,6,7,9,11,12,15,17],chapter:[0,7,10],cheb:[0,11],check:[0,2,4,5,6,11,15,21],check_circular:4,chemic:[0,11],chen:[0,11],child:4,choic:[0,2,11,16],choos:[0,11,12,16],chose:14,chosen:[5,15],circular:[0,11],circumbinari:[0,11],circumstanti:[0,11],claei:[0,11],clark:[0,11],clean:[1,5,9,14,17],clean_up_custom_logging_fil:5,clear:4,clock:4,clone:[9,17],close:[0,11],cloud:[0,11],cls:4,cluster:8,cmdline:5,code:[0,1,5,6,9,11,12,14,15,16,17,18],collaps:[0,11],collapsar:[0,11],collect:21,collid:21,color:16,color_by_index:16,colour:[0,11],colour_log:[0,11],column:[14,15,16],column_nam:14,com:[1,4],combin:[1,4,5,7,12],combine_ensemble_with_thread_join:7,come:[2,9,17,19],comenv_bs:0,comenv_disc_angmom_fract:[0,11],comenv_disc_mass_fract:[0,11],comenv_ejection_spin_method:[0,11],comenv_ejection_spin_method_do_noth:[0,11],comenv_ejection_spin_method_sychron:[0,11],comenv_ejection_spin_method_synchron:0,comenv_merger_spin_method:[0,11],comenv_merger_spin_method_breakup:0,comenv_merger_spin_method_conserve_angmom:[0,11],comenv_merger_spin_method_conserve_omega:[0,11],comenv_merger_spin_method_specif:[0,11],comenv_ms_accret:[0,11],comenv_ms_accretion_fract:[0,11],comenv_ms_accretion_mass:[0,11],comenv_nandez2016:0,comenv_nelemans_tout:0,comenv_ns_accret:[0,11],comenv_ns_accretion_fract:[0,11],comenv_ns_accretion_mass:[0,11],comenv_post_eccentr:[0,11],comenv_prescript:[0,11],comenv_splitmass:[0,11],comenv_undef:0,command:[0,1,5,7,9,11,15,17],commandlin:15,comment:15,commit:4,common:[0,11,12,14,15],compact:15,companion:[0,11],compar:[0,7,11,15],compil:[1,9,12,15,17],compile_shared_lib:1,complet:15,complex:[5,7,12,15,16],compon:[4,16],comput:[0,8,11],condit:[5,12,15],condor:[5,7,8],condor_grid:5,config:[1,4,7,9,17],config_fil:1,configur:[2,5,14,15],conserv:[0,11],consid:[0,1,2,4,5,7,11,16],constant:[0,2,11,16],construct:[0,1,11,14,15],contain:[0,1,2,4,5,6,7,8,9,10,11,14,15,16,17,18,19,20],content:[3,4,9,11],context:4,continu:[5,15],control:[0,11,15],convect:[0,11],converg:[0,11],convert:[2,4,5],convert_byt:4,cool:[0,11],copi:[0,5,11,21],core:[0,5,7,11,15,16],core_co:12,core_h:12,core_helium_burn:0,core_mass:[0,11,12],correct:[2,5,14,16,21],correctli:[9,14,16,17],correspond:16,corretor:[0,11],cosmic:2,cosmic_sfh_madau_dickinson2014:2,could:[0,4,11,15],count:[4,7],count_keys_recurs:4,counter:7,coupl:[0,11],cours:16,cover:13,coverag:[9,17],cowd:[0,11],cpu:[0,11],cpython:11,crap_paramet:[0,11],creat:[2,4,5,12,14,15],create_and_load_logging_funct:[1,12],create_arg_str:4,create_hdf5:4,creation:11,critic:[0,11],cross:[0,11],ctype:1,cuntz:[0,11],current:[0,4,9,11,12,17],custom:[0,1,3,4,5,7,9,11,14,15,16,18],custom_log:[5,7,14],custom_logging_cod:[1,12,14,18],custom_logging_func_memaddr:[7,11,12],custom_logging_funct:[7,9,10,12,14,15],custom_logging_info:5,custom_logging_memaddr:12,custom_logging_print_stat:14,custom_logging_stat:15,custom_opt:[5,14,15],custom_output_funct:12,custom_sort_dict:4,custom_tmp_dir:1,customis:16,cvode:[0,11],d20a4c74d20a43b881c0c9e5def5f76c:15,dai:[0,2,11,12,14,15,21],damp:[0,11],dat:[0,4,15],data:[0,4,5,7,11,14,15,18],data_dict:2,data_dir:[4,5,7,15],datadir:[5,15],datafram:[14,16],dataset:[4,15],date:5,david:[0,9,11,17],david_logging_funct:[0,11],dd7:[0,11],deactiv:[0,11],deal:[4,14],death:[0,11],debug:[0,7,11,15],decai:[0,11],decid:[0,4,11,12],decod:4,decreas:[0,11],deeper:[5,15],def:[14,15],default_to_metal:[0,11],defaultdict:4,defer:[0,11],defin:[0,1,2,5,11,16],definit:[1,21],degener:[0,11],degre:[0,11],delta_mcmin:[0,11],den:[0,11],densiti:2,depend:[0,2,9,11,16,17],deprec:[0,11],dermin:[0,11],describ:[0,2,7,11],descript:[0,2,4,7,9,10,11],design:[5,16],desir:[0,11],destruct:[5,15],detail:[0,4,11,14],detect:[0,11],determin:[0,5,11,12,15,21],deton:[0,11],dev:[0,11],develop:1,deviat:2,dewi:[0,11],dex:[0,11],diagnost:7,diagram:[0,11,16],dickonson:2,dict2:4,dict:[1,2,4,5,6,14,15,20],dict_1:4,dict_2:4,dict_kei:14,dictionari:[1,2,4,5,6,7,15,16,20],did:[4,9,17],differ:[0,4,5,9,11,15,16,17],dimmer:[0,11],dir:[9,17],direct:[0,5,11],directli:[4,7,14],director:7,directori:[0,3,4,5,7,9,11,15,17],disabl:[0,11,15],disable_debug:[0,11],disable_end_log:[0,11],disable_ev:[0,11],disc:[0,11],disc_legacy_log:[0,11],disc_log2d:[0,11],disc_log:[0,11],disc_log_directori:[0,11],disc_log_dt:[0,11],disc_log_level_non:0,disc_log_level_norm:0,disc_log_level_normal_first_disc_onli:0,disc_log_level_subtimestep:0,disc_log_level_subtimestep_first_disc_onli:0,disc_n_monte_carlo_guess:[0,11],disc_stripping_timescale_infinit:0,disc_stripping_timescale_inst:0,disc_stripping_timescale_orbit:0,disc_stripping_timescale_visc:0,disc_timestep_factor:[0,11],discret:15,discs_circumbinary_from_comenv:[0,11],discs_circumbinary_from_wind:[0,11],disk:[0,5,11],dispers:[0,11],displai:[0,11],dist:[9,17],distefano:2,distribut:[0,2,5,8,11,15],distribution_funct:[9,10,15],divid:8,dlnm1:[5,15],dlog10per:15,dlogp:2,do_dry_run:7,doc:[4,6,9,15,17],doc_fetch:2,docstr:[9,14,16,17],document:[4,6,7,10,15],doe:[0,2,4,5,7,11,12,14,15,21],doesn:[5,7],doesnt:6,doing:[0,1,5,6,9,11,17],don:[2,4,7],done:[0,4,5,9,11,15,17],donor:[0,11,21],donor_limit_dynamical_multipli:[0,11],donor_limit_envelope_multipli:[0,11],donor_limit_thermal_multipli:[0,11],donor_rate_algorithm_bs:0,donor_rate_algorithm_claeys2014:0,dont:11,doubl:[12,15],down:15,dphasevol:[5,15],dr2:[0,11],dr3:[0,11],drai:[0,11],dredg:[0,11],drop:14,dry:7,dstep:2,dtfac:[0,11],dtlimit:4,dtm:[1,12,15],due:[9,17],dummi:[2,16],dump:[0,4,11,14],dumpvers:[0,11],duquennoi:2,duquennoy1991:2,dure:[0,11],dust:[0,11],dwarf:[0,11],dynam:[0,11],e2_hurley_2002:0,e2_izzard:0,e2_mint:0,e2_prescript:[0,11],each:[0,2,4,5,7,11,15],eagb:[0,11],eagb_wind_beasor_etal_2020:0,eagb_wind_bs:0,eagb_wind_goldman_etal_2017:0,eagbwind:[0,11],eagbwindfac:[0,11],earli:[0,11],early_asymptotic_giant_branch:0,easi:[4,14],easier:[4,15],ecc2:2,ecc3:2,ecc:[2,5,14,15],eccentr:[0,2,11,12,14,15,16,21],eccentric_rlof_model:[0,11],eccentricity_quadrupl:[0,11],eccentricity_tripl:[0,11],echo:[0,11],eddington:[0,11],edg:[0,5,11,15],edit:12,edu:[0,11],effect:[0,2,7,11,12],effective_metal:[0,11],effici:[0,11],egg:[9,17],eggleton:[0,11,21],either:[0,4,5,7,9,11,15,17,18],eject:[0,11],elabor:12,eld:[0,11],eldridg:[0,11],electon:[0,11],electron:[0,11],element:[0,1,4,7,11,16],els:12,email:4,emp:[0,11],emp_feh_maximum:[0,11],emp_logg_maximum:[0,11],emp_minimum_ag:[0,11],empti:[4,6,14],enabl:[0,11],encod:4,encount:7,end:[0,2,4,7,11],end_index:2,end_timestamp:15,energi:[0,11],enhanc:[0,11],enlarg:[0,11],enough:2,ensembl:[0,4,5,7,11,15],ensemble_def:[0,11],ensemble_dictionari:5,ensemble_dt:[0,11],ensemble_factor_in_probability_weighted_mass:7,ensemble_filter_:[0,11],ensemble_filters_off:[0,11],ensemble_json:4,ensemble_legacy_ensembl:[0,11],ensemble_list:5,ensemble_logdt:[0,11],ensemble_logtim:[0,11],ensemble_macro:[0,11],ensemble_output_:7,ensemble_startlogtim:[0,11],ensure_ascii:4,enter:[0,9,11,17],enthalpi:[0,11],entir:[12,14],entri:[4,5],env:[9,11,16,17],envelop:[0,11],equal:[4,15],equat:[0,11],equation_of_state_algorithm:[0,11],equation_of_state_paczynski:0,equatori:[0,11],equival:7,errno:[9,17],error:[0,4,7,9,11,15,17],errors_exceed:15,errors_found:15,esa:2,escap:[0,11],escape_fract:[0,11],escape_veloc:[0,11],eta:[0,11],etal:[0,11],etc:[0,4,5,8,9,11,14,15,16,17,18],euler:[0,11],evalu:[2,5,15,21],evan:[0,11],evapor:[0,11],evaporate_escaped_orbiting_object:[0,11],event:[0,11],everi:[0,9,11,17],everyth:[5,7,14,15],everytim:[9,17],evid:[0,11],evolut:[0,1,5,7,11,14,15,16],evolution_split:[0,11],evolution_splitting_maxdepth:[0,11],evolution_splitting_sn_eccentricity_threshold:[0,11],evolution_splitting_sn_n:[0,11],evolution_typ:[7,15],evolutionari:[0,11,14],evolv:[0,3,5,7,11,12],evolve_popul:15,evolve_singl:[5,12,14],exact:[1,4,7],exactli:[0,11],exampl:[1,2,4,5,14,18],example_above_m:12,example_compact_object:15,example_dco:15,example_df:14,example_head:4,example_log:18,example_log_co:[1,12],example_logging_string_co:12,example_logging_string_post_m:12,example_massloss:[12,14],example_output:14,example_parse_output:4,example_pop:[14,15],example_pop_set:15,example_python_population_result:15,example_sn:12,exce:[0,7,11],except:[4,5,6,7,11,15,16],execut:[0,5,7,9,11,15,17],exist:[0,5,6,11,15],exist_ok:[4,15],exit:[0,4,11],exp:[5,15],expand:[15,18],expect:[9,11,17],experiment:[0,4,11],explain:[3,4],explicitli:[0,1,11],explod:[0,11],explos:[0,11],expoenti:[0,11],expon:[0,11],export_all_info:[5,15],express:[0,11],extend:[9,17],extens:11,extern:[0,11],extra:[0,3,5,7,9,11,15,18],extra_text:6,extract:[4,15],extract_ensemble_json_from_str:4,extrapol:[2,7],fabian:[0,11],fabian_imf_log:[0,11],fabian_imf_log_tim:[0,11],fabian_imf_log_timestep:[0,11],factor:[0,2,4,7,11],fade:[0,11],fail:[0,4,7,9,11,17],fail_sil:4,failed_count:15,failed_prob:15,failed_system:7,failed_system_log:7,failed_systems_error_cod:15,failed_systems_threshold:7,failsaf:14,failur:[0,11],fallback:12,fallback_mass:12,fals:[0,4,5,7,11,15,16],fancy_parsing_funct:18,far:[0,11],farmer:[0,11],fase:15,fast:[0,11],faster:15,favorit:14,featur:[3,9,15],feed:7,ferguson:[0,11],fetch:14,few:[0,11],field:[0,11],fig:[0,2,11],figur:[7,16],file:[0,1,4,5,6,7,8,9,11,14,15,16,17,18],file_log:[0,11],filehandl:6,filenam:[0,1,4,5,7,11,14,15,18],filenotfounderror:[9,17],filepath:1,fill:14,fill_data:2,filter:[0,4,11],filter_arg_dict:4,filter_valu:4,fin:[0,11],find:[4,5,7,9,15,17],finish:[4,15,16],first:[0,2,4,5,9,11,14,15,17,21],first_giant_branch:0,fishlock:[0,11],fit:[0,2,4,5,11,14,21],fix:[0,2,4,5,11,14,15,16],flag:[0,1,4,7,11],flash:[0,11],flat:[2,7],flatsect:[2,15],flaw:5,float_overflow_check:[0,11],flto:[9,17],fold:2,follow:[0,2,4,7,9,11,12,16,17],forc:[0,9,11,17],force_circularization_on_rlof:[0,11],force_corotation_of_primary_and_orbit:[0,11],form:[0,4,5,6,11,15],formal:[0,11],format:[0,2,4,5,11,12,14,15],format_ensemble_result:5,formula:[0,11],forward:[0,11],found:[2,9,15,17],four:[0,11],fpic:1,fraction:[0,2,7,11,15],framework:11,free_persistent_data_memaddr_and_return_json_output:11,free_store_memaddr:11,frequenc:[0,11],friction:[0,11],fring:[0,11],from:[0,2,4,5,7,14,15,16,21],from_binary_c_config:1,ftz:[9,17],full:[3,4,7,12],full_path:4,further:[2,15],fuv:[0,11],gaia:[0,2,11],gaia_colour_transform_method:[0,11],gaia_conversion_ubvri_bivariate_jordi2010:[0,11],gaia_conversion_ubvri_riello2020:[0,11],gaia_conversion_ubvri_univariate_evans2018:[0,11],gaia_conversion_ubvri_univariate_jordi2010:[0,11],gaia_conversion_ugriz_bivariate_jordi2010:[0,11],gaia_conversion_ugriz_riello2020:[0,11],gaia_conversion_ugriz_univariate_evans2018:[0,11],gaia_conversion_ugriz_univariate_jordi2010:[0,11],gaia_l_binwidth:[0,11],gaia_teff_binwidth:[0,11],gain:7,galact:[0,11],gallino:[0,11],gamma:[0,11],gap:[0,11],garcia:[0,11],gauss:[0,11],gaussian:2,gaussian_func:2,gaussian_normalizing_const:2,gb_reimers_eta:[0,11],gb_wind_beasor_etal_2020:0,gb_wind_goldman_etal_2017:0,gb_wind_reim:0,gb_wind_schroeder_cuntz_2005:0,gbwind:[0,11],gbwindfac:[0,11],gcc:[1,9,17],gce:[0,11],gener:[0,1,2,4,5,6,7,11,12,14,15,16],general_info:4,generalis:2,geometr:[0,11],gerosa:[0,11],get:[0,2,4,5,6,9,12,14,15,17,18,21],get_arg_kei:4,get_default:4,get_help:4,get_help_al:[4,5],get_help_sup:4,get_integration_constant_q:2,get_max_multipl:2,get_moe_di_stefano_dataset:4,get_siz:4,giant:[0,11],giant_branch:0,git:[0,4,15],git_branch:4,git_build:4,github:4,gitlab:9,give:[0,2,4,11,21],given:[0,1,2,4,5,7,11,18,21],global:[0,2,11],global_dict:2,gmax:2,gmin:2,gnu:11,goe:[0,4,5,11,12,14,16],gogo:[0,11],going:[9,17],goldman:[0,11],gonna:2,good:[0,7,11,14,15,21],gov:[0,11],gravit:[0,11,15],gravitational_radiation_bs:0,gravitational_radiation_bse_when_no_rlof:0,gravitational_radiation_landau_lifshitz:0,gravitational_radiation_landau_lifshitz_when_no_rlof:0,gravitational_radiation_model:[0,11],gravitational_radiation_modulator_:[0,11],gravitational_radiation_modulator_j:[0,11],gravitational_radiation_non:0,grb:[0,11],great:[0,11],greater:[0,11],grevess:[0,11],grid:[0,3,4,5,9,10,11,12,14],grid_class:[9,10],grid_cod:5,grid_opt:[5,7,14,15],grid_options_default:6,grid_options_defaults_dict:6,grid_options_descript:[6,15],grid_options_description_check:6,grid_options_help:6,grid_vari:[7,15],grid_variable_numb:15,gridcode_filenam:7,gridtyp:[5,15],group:4,gsl:[9,17],gsl_dir:[9,17],guess:[0,2,11],h5py:[9,17],hachisu:[0,11],hachisu_disk_wind:[0,11],hachisu_ignore_qcrit:0,hachisu_qcrit:[0,11],hack:6,had:5,half:[0,11],hall:[0,11],handi:[0,11],handl:[0,3,4,5,7,11,14,18,21],handle_ensemble_string_to_json:4,happen:[0,11],hardcod:[12,15],has:[0,1,4,5,7,11,12,15],have:[0,2,3,4,5,6,7,9,11,12,14,15,16,17],hbb:[0,11],hbbtfac:[0,11],hdf5:4,hdf5file:4,header:[1,4,12,14,15],headerlin:15,headlin:7,hegb:0,hehg:0,height:[2,15],helium:[0,11],helium_flash_mass_loss:[0,11],helium_white_dwarf:0,help:[0,4,6,11,14,15],help_al:[0,11],hem:0,henc:[0,11],hendrik:[9,17],here:[1,4,5,7,11,12,14,16],hertzsprung:[0,11],hertzsprung_gap:0,hertzstrpung:[0,11],heuvel:[0,11],hewd:[0,11],hewd_hewd_ignition_mass:[0,11],hex:7,high:[0,2,11],higher:[0,2,4,7,9,11,15,17],his:2,histori:2,hold:7,hole:[0,11],home:11,homogen:[0,11],hood:14,hopefulli:[0,11],hot:[0,11],how:[0,4,5,7,11,12,14,15],howev:[0,11,12,15],hoyl:[0,11],hpc:[5,8],hpc_function:[9,10],hr_diagram:16,hrd:[0,11],hrdiag:[0,11],hrdiag_output:[0,11],html:[9,15,17],http:[0,1,2,4,11,15],hurlei:[0,11],hut:[0,11],hybrid:[0,11],hydro:[0,11],hydrogen:[0,11],ibc:[0,11],id_cor:12,idea:[15,16],idum:[0,11],ignit:[0,11],ignor:[0,5,7,9,11,12,14,15,17],iia:[0,11],iloc:14,imf:[0,2,11],imf_chabrier2003:2,imf_scalo1986:2,imf_scalo1998:2,imf_tinsley1980:2,immedi:[0,11],implement:[0,5,7,11],impli:[0,11],impos:15,improv:2,inclin:[0,11],inclination1:[0,11],inclination2:[0,11],inclination3:[0,11],inclination4:[0,11],inclini:[0,11],incliniation_quadrupl:[0,11],incliniation_tripl:[0,11],includ:[0,1,2,4,5,9,11,12,14,15,16,17],include_binary_c_default:[5,15],include_binary_c_help_al:[5,15],include_binary_c_version_info:[5,15],include_default:[5,15],include_popul:15,include_population_set:5,incom:[0,11],increas:[0,11],inde:[0,11],indent:[4,14],index:[0,2,9,11,14],indic:[0,2,11],individu:[3,9],individual_nova:[0,11],induc:[0,11],inertia:[0,11],info:[4,5,9,11,15,16,17],inform:[0,1,4,5,6,12,14,15,16],init:5,init_abund:[0,11],init_abund_dex:[0,11],init_abund_mult:[0,11],init_abunds_onli:[0,11],initi:[0,2,5,11,14],initial_abundance_hash:5,initial_abundance_mix:[0,11],initial_abunds_onli:[0,11],initial_mass:14,inner:[0,11],input:[1,2,4,5,7,9,11,14,16,21],input_dict:4,insert:[5,15],insid:[0,11],inspect:[4,14,16],inspect_dict:4,inspir:[1,16,21],instabl:[0,11],instanc:[4,14,15],instant:[0,11],instantli:[0,11],instead:[0,4,7,11],integ:[0,5,7,11,21],integr:2,integrals_str:2,interact:[0,6,11],interfac:[4,9,11,17],interfer:[9,17],intern:[0,7,11],internal_buff:[0,11],internal_buffering_off:0,internal_buffering_print:0,internal_buffering_stor:0,interpol:[2,5],interpolate_in_mass_izzard2012:2,interpolator_nam:2,intershel:[0,11],interstellar:[0,11],intger:[0,11],intro:[0,11],invers:21,involv:[0,11],inward:[0,11],ipynb:15,is_capsul:4,isfil:15,isn:[4,5],isnt:15,isotop:[0,4,11],isotope_hash:5,isotope_list:5,item:1,iter:4,its:[0,4,5,6,9,11,15,16,17,18],itself:[4,7,9,12,14,17],iwamoto:[0,11],izzard2012_period_distribut:2,izzard:[0,9,11,17],jager:[0,11],jaschek:2,jeff:[9,17],jia:[0,11],john:[0,11],join:[11,12,14,15],jordi:[0,11],json:[4,5,7,11,14,15],jsondecod:4,jsonencod:4,jupyt:[9,17],just:[0,2,4,5,7,11,15,21],kap:[0,11],kappa:[0,11],kaps_rentrop:[0,11],karaka:[0,11],keep:[5,15],kei:[1,2,4,5,6,7,14,15,16],kelvin:[0,11],keplerian:[0,11],keyword:[16,18],kick:[0,7,11],kick_backward:0,kick_forward:0,kick_inward:0,kick_outward:0,kick_random:0,kick_straight_up:0,kick_velocity_custom:0,kick_velocity_fix:0,kick_velocity_maxwellian:0,kill:[1,12,15],kim:[0,11],kind:[0,11],kippenhahn:[0,11],know:[0,1,5,6,11,14],known:[0,2,5,11,14,15,18],kroupa2001:[2,5,15],kroupa:2,ktg93:2,kwarg:[5,16,18],lambda:[0,11],lambda_c:[0,11],lambda_ce_dewi_tauri:0,lambda_ce_klencki_2020:0,lambda_ce_polytrop:0,lambda_ce_wang_2016:0,lambda_enthalpi:[0,11],lambda_ionis:[0,11],lambda_min:[0,11],lambda_mult:[0,11],lambda_multipli:[0,11],lambda_v:2,lamer:[0,11],landau:[0,11],langer:[0,11],larger:[0,11],last:2,lastli:[11,14],latter:[0,11],law:2,law_const:2,lbv:[0,11],ld_library_path:[9,17],lead:[0,11,15,21],learn:12,least:[9,17],leav:[0,11],left:[0,11],legaci:[0,11],legacy_yield:[0,11],len:[14,15],lengthen:[0,11],less:[0,1,2,3,11,14],let:[5,14,15],level:[1,4],li7:[0,11],lib:[9,11,14,17],libbinary_c:7,libcustom_logging_e9c2bec7f15541eb847fc6013e48e7:14,libcustom_logging_eac2dfc438a14e5a9f5be98b1b6b4294:14,libgsl:[9,17],libmemo:[9,17],librari:[0,1,5,7,11,12,18],library_path:[9,17],librinterpol:[9,17],lies:[0,11],lifetim:[0,11,15],lifshitz:[0,11],like:[0,1,4,5,7,9,11,15,16,17,19],limit:[0,11,15,16],line:[1,4,5,7,9,12,14,15,16,17],linear2:7,linear:[0,2,7,11],linear_extrapolation_q:2,linearli:19,linker:1,linspac:19,linux:11,list:[0,1,2,4,7,11,14,15,18,19],list_arg:[0,11],list_of_sub_kei:2,lit:[0,11],lithium:[0,11],lithium_gb_post_1dup:[0,11],lithium_gb_post_heflash:[0,11],lithium_hbb_multipli:[0,11],lithium_t:[0,11],littleton:[0,11],liu:[0,11],llnl:[0,11],lnm1:[5,15],load:[0,1,4,5,7,11,12,14,15,16],load_logfil:4,lobe:[0,11,21],local:2,locat:[0,2,7,9,11,17],lodder:[0,11],log10:[0,2,11,15],log10m1:7,log10p:2,log10per:15,log10pmin:2,log:[0,1,2,3,4,5,7,9,11,14,16,17,18,21],log_arg:7,log_args_dir:7,log_every_timestep:[12,14],log_fil:7,log_filenam:[0,11,14,18],log_runtime_system:7,logarithm:2,logensembletim:[0,11],logfil:[4,9,14,17],logg:[0,11],logger:15,logging_dict:1,logging_lin:12,logic:[1,5,7,12],logmass:2,logp:2,logper:2,logperiod:2,long_spectral_typ:2,longer:[0,11],longnam:[5,15],look:[1,4,9,15,17],lookback:[0,11],loon:[0,11],loop:[5,14,15],loos:16,lose:[0,11],loss:[0,11,14],lost:[0,11],lot:[4,7,15,18],low:[0,2,11],low_mass_m:0,low_mass_main_sequ:0,lower:[0,2,5,11,15,19],lsoda:[0,11],lsun:[0,11,16],lugaro:[0,11],luminos:[0,11,16],luminosity_1:16,luminosity_2:16,lynnett:[0,11],m_1:[0,5,11,12,14,15,18],m_2:[0,11,12,14,15],m_3:[0,11],m_4:[0,11],m_max:[2,5,15],m_min:[5,15],maccretor:[0,11],machin:[7,9,17],macro:[0,4,11],madau:2,maeder:[0,11],magellan:[0,11],magnet:[0,11],magnetic_braking_algorithm:[0,11],magnetic_braking_algorithm_andronov_2003:0,magnetic_braking_algorithm_barnes_2010:0,magnetic_braking_algorithm_hurley_2002:0,magnetic_braking_algorithm_rappaport_1983:0,magnetic_braking_factor:[0,11],magnetic_braking_gamma:[0,11],magnitud:4,mai:[0,11],main:[0,1,7,9,11,12,15,17],main_sequ:[0,11],mainli:8,major:[0,11],make:[0,1,2,4,5,7,9,11,14,15,16,17,18],make_build_text:4,makedir:[4,15],manag:[4,9,17],mani:[0,5,7,11,15],manual:12,manufactur:[0,11],map:7,maria:[0,11],mass:[0,1,2,4,5,7,11,14,15,16,18,21],mass_1:[15,16],mass_2:[15,16],mass_accretion_for_eld:[0,11],mass_accretor:21,mass_donor:21,mass_evolut:16,mass_for_hestar_ia_low:[0,11],mass_for_hestar_ia_upp:[0,11],mass_of_pmz:[0,11],mass_str:2,massiv:[0,2,11],massless:[0,11],massless_remn:0,master:[7,16],match:[0,4,11,14,15,16],materi:[0,11],math:[5,15],matplotlib:[9,16,17],matter:[0,11],mattsson:[0,11],mattsson_mass_loss:[0,11],mattsson_orich_tpagbwind:[0,11],max:[0,2,11,12,15],max_bound:[2,19],max_evolution_tim:[0,1,11,12,14,15],max_hewd_mass:[0,11],max_model_numb:[0,11],max_multipl:2,max_neutron_star_mass:[0,11],max_queue_s:7,max_stellar_angmom_chang:[0,11],max_stellar_type_1:[0,11],max_stellar_type_2:[0,11],max_stellar_type_3:[0,11],max_stellar_type_4:[0,11],max_tim:14,max_val:2,maximum:[0,2,7,11,12,21],maximum_mass_ratio_for_instant_rlof:[0,11],maximum_mass_ratio_for_rlof:21,maximum_mcbagb_for_degenerate_carbon_ignit:[0,11],maximum_nuclear_burning_timestep:[0,11],maximum_timestep:[0,11],maximum_timestep_factor:[0,11],maxmimum:[0,11],maxwellian:[0,11],mayb:16,mayor:2,mc13_pocket_multipli:[0,11],mch:[0,11],mcmin:[0,11],mdonor:[0,11],mean:[0,2,4,5,7,9,11,17],meant:7,measur:4,medium:[0,11],mega:2,memaddr:[11,12],memori:[1,5,7,11,12,21],menv:[0,11],merg:[0,2,4,7,11],merge_dict:4,merge_multipl:2,merger:[0,11],merger_angular_momentum_factor:[0,11],merger_mass_loss_fract:[0,11],mesa:[9,17],mesasdk_init:[9,17],mesasdk_root:[9,17],messag:4,mestel:[0,11],met:[5,15],metal:[0,2,11,12,14,15,21],method:[0,5,7,11,12,14,15],meynet:[0,11],might:[4,5,9,15,17],milki:[0,11],miller:[0,11],min:[2,12,15],min_bound:[2,19],min_p:2,min_per:2,min_val:2,minimal_verbos:4,minimum:[0,2,4,7,11,21],minimum_co_core_mass_for_carbon_ignit:[0,11],minimum_co_core_mass_for_neon_ignit:[0,11],minimum_donor_menv_for_comenv:[0,11],minimum_envelope_mass_for_third_dredgeup:[0,11],minimum_helium_ignition_core_mass:[0,11],minimum_mcbagb_for_nondegenerate_carbon_ignit:[0,11],minimum_orbital_period_for_instant_rlof:[0,11],minimum_period_for_rlof:21,minimum_separation_for_instant_rlof:[0,11],minimum_separation_for_rlof:21,minimum_time_between_pn:[0,11],minimum_timestep:[0,11],mint:[0,11],mint_data_cleanup:[0,11],mint_dir:[0,11],mint_disable_grid_load_warn:[0,11],mint_kippenhahn:[0,11],mint_kippenhahn_companion_stellar_typ:[0,11],mint_kippenhahn_stellar_typ:[0,11],mint_maximum_shell_mass:[0,11],mint_metal:[0,11],mint_minimum_shell_mass:[0,11],mint_ms_rejuven:[0,11],mint_nuclear_burn:[0,11],mint_remesh:[0,11],mint_use_zams_profil:[0,11],mira:[0,11],misc:[9,11],miscellan:4,miss:[0,4,6,11],mix:[0,4,7,11],mixtur:[0,11],mmax:2,mmin:[2,7],mnra:21,model:[0,1,7,11,12,14,15],modifi:[0,11,12],modul:[0,6,7,10,11,15],modulo:7,moe:[2,4,5,9,15],moe_di_stefano_2017:5,moe_di_stefano_2017_multiplicity_fract:2,moe_di_stefano_2017_pdf:2,moment:[0,11,12,15,19],momenta:[0,11,16],momentum:[0,11],mont:[0,7,11],monte_carlo_kick:[0,11],more:[0,1,3,4,5,7,9,11,12,14,15,16,17,19],most:[4,11],mostli:[4,6,7,15,16,18],move:[0,11],msun:[0,2,11,12,14],much:[0,4,11,15],multi:7,multipl:[0,2,4,7,11,15],multiplc:[0,11],multipli:[0,4,7,11],multiplicity_arrai:2,multiplicity_fraction_funct:7,multiplicity_model:7,multiplicity_modul:7,multiply_values_dict:4,multiprocess:7,must:[0,2,11,14,15],my_stellar_data:[1,12,15],myr:[0,11,14],n100:[0,11],n100_z0:[0,11],n100h:[0,11],n100l:[0,11],n10:[0,11],n150:[0,11],n1600:[0,11],n1600c:[0,11],n200:[0,11],n20:[0,11],n300c:[0,11],n40:[0,11],naked_helium_star_giant_branch:0,naked_helium_star_hertzsprung_gap:0,naked_main_sequence_helium_star:0,name:[1,4,5,6,11,15,18,20],natur:[0,11],nauenberg:[0,11],nearer:[0,11],nebula:[0,11],necessari:[4,5,15],need:[0,2,5,9,11,12,14,15,17],neg:[0,4,11],neither:[0,5,11],neleman:[0,11],nelemans_gamma:[0,11],nelemans_max_frac_j_chang:[0,11],nelemans_minq:[0,11],nelemans_n_comenv:[0,11],nelemans_recalc_eccentr:[0,11],nemp:[0,11],nemp_cfe_minimum:[0,11],nemp_nfe_minimum:[0,11],nenamg:[0,11],neon:[0,11],nest:[4,5,15],network:[0,11],neutrn:[0,11],neutron:[0,11,15],neutron_star:0,never:[0,11],newer:[0,2,11],newli:[0,11],newopt:2,newton:[0,11],next:[4,15],nice:[1,5,16],nieuwenhuijzen:[0,11],nieuwenhuijzen_windfac:[0,11],nmax:2,no_thermohaline_mix:[0,11],noecho:[0,11],noechonow:[0,11],noel:[0,11],nolowq:7,nomin:[0,11],non:[0,7,11],nonconservative_angmom_gamma:[0,11],none:[0,1,2,4,5,6,7,11,15,21],nonetyp:15,nonzero:7,nor:[0,11],norm:7,normal:[0,4,11],normalis:[2,7],normalize_dict:2,normalize_multipl:7,notabl:15,note:[0,7,11],notebook:[9,11,13,14,15,17],notebook_api_funct:14,notebook_custom_log:[14,15],notebook_individual_system:[12,15],notebook_popul:14,noteworthi:3,noth:[5,7],notifi:18,nova:[0,11],nova_faml_multipli:[0,11],nova_irradiation_multipli:[0,11],nova_retention_algorithm_claeys2014:0,nova_retention_algorithm_const:0,nova_retention_algorithm_hillman2015:0,nova_retention_fract:[0,11],nova_retention_method:[0,11],nova_timestep_accelerator_index:[0,11],nova_timestep_accelerator_max:[0,11],nova_timestep_accelerator_num:[0,11],now:[0,2,4,11,12,14,15],nuclear:[0,11],nuclear_mass_hash:5,nuclear_mass_list:5,nucleosynthesi:[0,4,11],nucleosynthesis_sourc:4,nucreacmult:[0,11],nucsyn:[9,11],nucsyn_angelou_lithium:[0,11],nucsyn_gce_outflow_check:[0,11],nucsyn_hbb:[0,11],nucsyn_metal:[0,11],nucsyn_network:[0,11],nucsyn_network_error:[0,11],nucsyn_s_process:[0,11],nucsyn_solv:[0,11],nucsyn_third_dredge_up:[0,11],nugi:[0,11],number:[0,2,4,5,7,9,11,15,17],numer:4,numpi:[4,9,14,17,19],obj:4,object:[0,3,4,5,7,8,11,16],object_hook:4,object_pairs_hook:4,object_parse_funct:14,obtain:0,obvious:12,occur:[0,11,21],off:[0,11,15],off_m:14,offset:[0,11],ohio:[0,11],old:7,old_solut:[9,17],omega:[0,11],onc:[0,11],one:[0,4,5,7,11,15,16],onewd:0,onli:[0,4,5,7,11,12,15,21],onset:[0,11],onto:[0,2,11],opac:[0,11],opacity_algorithm:[0,11],opacity_algorithm_ferguson_op:0,opacity_algorithm_paczynski:0,opacity_algorithm_star:0,opal:[0,11],open:[14,15],opm:2,opt:[2,4,11],option:[0,1,2,4,5,9,10,11,15,17,21],orb:[5,15],orbit:[0,2,11,16,21],orbit_evolut:16,orbital_inclin:[0,11],orbital_inclinationi:[0,11],orbital_period:[0,11,12,14,15,21],orbital_period_quadrupl:[0,11],orbital_period_tripl:[0,11],orbital_phas:[0,11],orbital_phase_quadrupl:[0,11],orbital_phase_tripl:[0,11],orbiting_object:[0,11],orbiting_objects_close_pc_threshold:[0,11],orbiting_objects_log:[0,11],orbiting_objects_tides_multipli:[0,11],orbiting_objects_wind_accretion_multipli:[0,11],order:[3,4,5,15],ordereddict:4,org:[0,2,11],origin:[9,17],other:[0,1,2,4,6,7,9,11,13,14,15,16,17],otherwis:[0,5,6,7,11],out:[4,6,7,12],outcom:[0,11],outer:[0,11],outfil:[5,15],outfile_nam:1,outfilenam:15,output:[1,3,4,5,7,9,11,12,14,16,17,18,21],output_dict:14,output_dir:[5,14,15],output_fil:[4,6,14],output_filenam:[5,15],output_lin:4,outsid:[0,2,11],outward:[0,11],over:[4,5,13,14,15],overflow:[0,11],overlap:4,overrid:2,overriden:15,overshoot:[0,11],overspin_algorithm:[0,11],overspin_bs:[0,11],overspin_massloss:[0,11],overview:11,own:[5,7,9,12,14,15,17],oxygen:[0,11],oxygen_neon_white_dwarf:0,packag:[4,9,11,15,17,19],paczynski:[0,11],page:[0,9,11,15,17],pair:[0,4,11],panda:[4,9,14,16,17],pane:16,panel:[0,11],paper:[0,11],param_nam:4,paramet:[1,2,4,5,6,7,9,11,12,14,15,16,18,19,21],parameter_nam:[4,5,11,15],parameter_value_input_typ:4,pars:[4,5,14,15,16,18],parse_binary_c_version_info:4,parse_cmdlin:5,parse_const:4,parse_float:4,parse_funct:[5,7,14,15,18],parse_function_hr_diagram:16,parse_function_mass:16,parse_function_orbit:16,parse_int:4,parsec:2,part:[2,5,11,14,15,21],partial:[0,11],particularli:[0,11],pasp:2,pass:[5,7,9,11,12,14,15,16,17,18],path:[4,7,9,14,15,17],patho:[9,17],pdf:[0,2,9,11,17],pend:[0,11],per:[0,4,5,7,11,15,21],percentag:[0,11],peret:[0,11],perform:[0,11],perhap:[0,11],periastron:[0,11],pericent:21,period:[0,2,11,12,14,15,16,21],period_str:2,perl:[1,15],persist:11,persistent_data:11,pgo:[0,11],phase:[0,11],phasevol:[0,11,15],phdi:[0,11],photoevapor:[0,11],php:2,physic:15,pick:16,piec:[5,15],pinnsonneault:[0,11],pisn:[0,11],pkg:[9,17],place:[0,11],placehold:16,plai:[0,11],plan:7,planetari:[0,11],plaw2:7,pleas:[0,4,11,15],plot:[0,11,14,16],plot_funct:[9,10],plot_hr_diagram:16,plot_hr_diagram_singl:16,plot_mass:16,plot_orbit:16,plot_system:16,plot_typ:16,pls:5,plu:[0,11],pms:16,pms_mass_1:16,pms_mass_2:16,pn_comenv_transition_tim:[0,11],pn_fast_wind:[0,11],pn_fast_wind_dm_agb:[0,11],pn_fast_wind_dm_gb:[0,11],pn_fast_wind_mdot_agb:[0,11],pn_fast_wind_mdot_gb:[0,11],pn_hall_fading_time_algorithm:[0,11],pn_hall_fading_time_algorithm_maximum:[0,11],pn_hall_fading_time_algorithm_minimum:[0,11],pn_resolv:[0,11],pn_resolve_maximum_envelope_mass:[0,11],pn_resolve_minimum_effective_temperatur:[0,11],pn_resolve_minimum_luminos:[0,11],pne:[0,11],pogg:[0,11],point:[0,2,4,5,9,11,17],poisson:[2,7],pol:[0,11],polytrop:[0,11],pop:12,pop_macro:12,popul:[0,2,3,5,6,8,9,11,17,19],population_id:7,population_nam:15,population_set:5,posit:[0,2,11],possibl:[0,1,2,4,6,9,11,14,17],post:[0,11,12],post_ce_adaptive_menv:[0,11],post_ce_envelope_dm_eagb:[0,11],post_ce_envelope_dm_gb:[0,11],post_ce_envelope_dm_tpagb:[0,11],post_ce_objects_have_envelop:[0,11],post_sn_orbit_bs:0,post_sn_orbit_method:[0,11],post_sn_orbit_tt98:0,postagb_legacy_log:[0,11],potenti:[0,11],power:[0,2,11],powerlaw:2,powerlaw_const:2,powerlaw_extrapolation_q:2,ppisn:[0,11],ppisn_farmer19:0,ppisn_non:0,ppisn_prescript:[0,11],ppn_envelope_mass:[0,11],pragma:12,pre:[0,11,16],pre_events_stardata:[0,11,12],pre_main_sequ:[0,11],pre_main_sequence_fit_lob:[0,11],precis:4,precod:[5,15],predefin:[2,15],predict:7,predictor:[0,11],prefer:[0,5,11],prefix:[0,11],prepar:2,prepare_dict:2,prescript:[0,11,15],prescrit:[0,11],present:[2,4,5,15],preserv:[0,11],preset:16,pressur:[0,11],prev_stellar_type_1:15,prev_stellar_type_2:15,prevent:[0,7,11],previou:4,previous:[14,15],previous_stardata:[1,12,14,15],primari:[1,2,5,15,21],print:[4,6,7,11,12,14,15],print_help:4,print_info:6,print_option_descript:6,print_structur:4,printf:[1,12,14,15],prior:[0,11],privat:[5,6,9],prob_dict:2,probability_weighted_mass:7,probabl:[0,1,2,5,6,7,11,12,15,16],probdist:[5,15],problem:[0,11],process:[0,4,5,7,11,15],profil:[0,11],progenitor:[0,11,15],program:[9,17],project:[0,11],proper:[6,12],properli:[0,11],properti:[0,4,7,16],prot1:[0,11],prot2:[0,11],prot3:[0,11],prot4:[0,11],provid:[0,2,5,7,11,15,18],pseudorandom:[0,11],publicli:12,puls:[0,11,21],pulsat:[0,11],pump:[0,11],purpos:[7,15,16],push_macro:12,put:[1,4,5,7,15,16],py_rinterpol:[9,17],pyenv:[9,11,17],pysiz:4,pytest:[9,17],python3:[9,11,17],python:[4,11,12,15],q_high_extrapolation_method:7,q_interpol:2,q_low_extrapolation_method:7,qcrit_bh:[0,11],qcrit_bs:0,qcrit_cheb:[0,11],qcrit_chen_han_formula:0,qcrit_chen_han_t:0,qcrit_cowd:[0,11],qcrit_degenerate_bh:[0,11],qcrit_degenerate_cheb:[0,11],qcrit_degenerate_cowd:[0,11],qcrit_degenerate_eagb:[0,11],qcrit_degenerate_gb:[0,11],qcrit_degenerate_hegb:[0,11],qcrit_degenerate_hehg:[0,11],qcrit_degenerate_hem:[0,11],qcrit_degenerate_hewd:[0,11],qcrit_degenerate_hg:[0,11],qcrit_degenerate_lmm:[0,11],qcrit_degenerate_m:[0,11],qcrit_degenerate_n:[0,11],qcrit_degenerate_onewd:[0,11],qcrit_degenerate_tpagb:[0,11],qcrit_eagb:[0,11],qcrit_gb:[0,11],qcrit_gb_bs:0,qcrit_gb_chen_han_formula:0,qcrit_gb_chen_han_t:0,qcrit_gb_ge2015:0,qcrit_gb_hjellming_webbink:0,qcrit_gb_q_no_comenv:0,qcrit_gb_temmink2021:0,qcrit_gb_vos2018:0,qcrit_ge2015:0,qcrit_hegb:[0,11],qcrit_hehg:[0,11],qcrit_hem:[0,11],qcrit_hewd:[0,11],qcrit_hg:[0,11],qcrit_hjellming_webbink:0,qcrit_lmm:[0,11],qcrit_m:[0,11],qcrit_n:[0,11],qcrit_onewd:[0,11],qcrit_q_no_comenv:0,qcrit_temmink2021:0,qcrit_tpagb:[0,11],qcrit_vos2018:0,qcrits_:[0,11],qcrits_degenerate_:[0,11],qdata:2,qlimit:2,quad:7,quadrat:[0,11],quadrulpl:[0,11],quadrupl:[0,2,7,11],quantiti:16,queri:14,queue:7,quickli:14,quit:[0,4,11],r_l:21,radi:[0,11],radiat:[0,11],radii:[0,11,21],radiu:[0,1,11,12,15,16,21],radius_1:16,radius_2:16,ragb:21,raghavan2010_binary_fract:2,raghavan:2,rai:[0,11],railton:[0,11],rais:[0,4,7,11,15],ram:[0,11],ran:7,random:[0,7,11],random_count:14,random_se:[0,11,14],random_skip:[0,11],random_system:[0,11],random_systems_se:[0,11],rang:[0,2,5,7,11,14,15,19],rapidli:[0,11],rappaport:[0,11],rate:[0,2,11],rather:[0,4,5,7,9,11,12,14,15,17],ratio:[0,2,11,15,21],raw:[4,5,7,11,16,18],raw_output:4,reach:[0,11],reaction:[0,11],read:[3,4,14,15],real:[5,15],realli:[0,5,6,7,11,15],reason:[0,11],rebuild:[0,9,11,17],rebuilt:[9,17],recalcul:[0,11],receiv:4,recogn:15,recombin:[0,11],recommend:[1,3,5],recompil:[9,15,17],recurs:[4,5],recursive_change_key_to_float:4,recursive_change_key_to_str:4,red:[0,11],redhat:1,redshift:2,reduc:[0,11],reduct:7,regardless:16,region:[0,11],regist:15,reignit:[0,11],reimer:[0,11],reinstal:[9,17],reject:[0,11],rejects_in_log:[0,11],rejuven:[0,11],rel:[0,11],relat:[0,11],releas:[4,9,17],reliabl:11,remain:[0,11],remesh:[0,11],remnant:[0,11],remov:[0,4,5,11,14,15],remove_fil:4,renormalis:2,rentrop:[0,11],repeat:[0,7,11],repo:[9,17],report:[0,11,15],repositori:3,repres:7,represent:[4,5,15],reproduc:[0,11],requir:[0,2,4,11,14,15,16,18],reset:[0,11],reset_pref:[0,11],reset_star:[0,11],reset_stars_default:[0,11],resolut:[0,5,7,11,15],resolv:[0,11],reson:[0,11],respect:[0,2,11],rest:[2,5,15],restructuredtext:4,result:[0,1,2,4,5,7,9,11,14,15,17],result_arrai:2,result_dict:2,retain:[0,11],rethink:4,return_all_info:5,return_arglin:11,return_binary_c_default:5,return_binary_c_version_info:[4,5],return_compilation_dict:1,return_help:11,return_help_al:[4,11],return_maximum_mass_ratio_for_rlof:[11,21],return_minimum_orbit_for_rlof:[11,21],return_persistent_data_memaddr:11,return_population_set:5,return_store_memaddr:11,return_version_info:[4,11],revap_in:[0,11],revap_out:[0,11],revers:[0,11,16],reverse_tim:[0,11],revis:[0,4],rewrit:5,rhagavan:7,ri0005:15,rich:[0,11],riello:[0,11],rin:[0,11],ring:[0,11],risk:[5,15],ritter:[0,11],rk2:[0,11],rk4:[0,11],rlof:[0,11,21],rlof_angular_momentum_transfer_model:[0,11],rlof_angular_momentum_transfer_model_bs:0,rlof_angular_momentum_transfer_model_conserv:0,rlof_eccentric_as_circular:[0,11],rlof_entry_threshold:[0,11],rlof_f:[0,11],rlof_interpolation_binary_c:0,rlof_interpolation_bs:0,rlof_interpolation_method:[0,11],rlof_mdot_factor:[0,11],rlof_mdot_modul:[0,11],rlof_method:[0,11],rlof_method_adapt:0,rlof_method_adaptive2:0,rlof_method_bs:0,rlof_method_claei:0,rlof_method_ritt:0,rlof_nonconservative_gamma_donor:0,rlof_nonconservative_gamma_isotrop:0,rlof_radiation_correct:[0,11],rlof_transition_objects_escap:[0,11],rob:[0,2,11,21],robert:[9,17],roch:[0,11,21],roche_lob:21,rochelob:21,rol1:14,rol2:14,room:[5,15],root:[9,17],rotat:[0,2,11],rotation:[0,11],rotationally_enhanced_expon:[0,11],rotationally_enhanced_mass_loss:[0,11],rotationally_enhanced_massloss:[0,11],rotationally_enhanced_massloss_angmom:0,rotationally_enhanced_massloss_langer_formula:[0,11],rotationally_enhanced_massloss_langer_formula_and_angmom:0,rotationally_enhanced_massloss_non:0,rout:[0,11],routin:[0,5,11,12,16],row:[14,16],rring:[0,11],rssd:2,rst:[4,6],rsun:16,rubric:5,run:[0,1,3,4,5,7,9,11,17,18],run_popul:11,run_system:[11,12,14,16,18],run_system_wrapp:[9,10,12,14],run_wrapp:3,run_zero_probability_system:7,runtim:[1,7],russel:[0,11],rzam:21,s_option:7,safe:15,sai:[0,11],said:[0,11],same:[0,4,7,9,11,14,17],sampl:[0,2,5,11,15,19],sample_valu:2,sampler:9,sana12:[2,15],sana:2,save:[0,1,2,11,12,15],save_pre_events_stardata:[0,11],scalo:2,scanf:0,scheme:[0,11],schneider:[0,11],schroeder:[0,11],script:[3,9,12,17],sdb:[0,11],sdist:[9,17],sdo:[0,11],search:9,second:[0,2,4,11,16],secondari:[2,21],section:[2,4,8,9,11,15,17],see:[0,5,9,11,12,14,15,16,17],seed:[0,11],seem:[9,16,17],seen:4,segment:19,seitenzahl2013_model:[0,11],seitenzahl:[0,11],select:[0,4,11,14],selected_head:4,selector:[0,11],self:[5,7,14,15],semi:[0,11],sent:[0,11],sentenc:1,sep:[2,5,14,15,21],sep_max:15,sep_min:15,separ:[0,2,4,5,6,11,12,14,15,16,21],separation_quadrupl:[0,11],separation_tripl:[0,11],separta:[0,11],seper:15,sequenc:[0,11,12],seri:[0,11],serialis:[4,5],serv:4,server:5,set:[0,1,2,3,4,5,6,7,9,12,14,16,17],set_moe_di_stefano_set:5,set_opt:2,setup:[9,15,17,18],sever:[6,7,15,16,18],sfh:2,shara:[0,11],share:[1,7,14,18],shared_lib_filenam:12,shell:[0,11],shorten:[0,11],should:[0,1,2,5,6,7,9,11,14,15,16,17,18],shouldn:[0,4,11],show:[0,3,7,11,14,15,16],show_plot:16,show_stellar_typ:16,shown:[0,11,16],shrinkagb:14,side:15,siess:[0,11],sigma:2,silent:4,sill:[0,11],simplest:14,simpli:[0,11],simul:[0,1,11,12,15],simulation_:5,sinc:[4,16],singl:[0,2,3,5,7,11,15,16],single_star_lifetim:[11,12,14],sit:[0,11],site:11,situat:11,size:[4,7],skip:[0,4,7,9,11,17],skipkei:4,slightli:11,slope:2,slow:[0,11],slower:[0,11],slurm:[5,7,8],slurm_grid:5,small:[0,11],small_envelope_method:[0,11],small_envelope_method_bs:0,small_envelope_method_miller_bertolami:0,smaller:[0,11],sn_impulse_liu2015:0,sn_impulse_non:0,sn_impulse_wheeler1975:0,sn_kick_companion_a:[0,11],sn_kick_companion_aic_bh:[0,11],sn_kick_companion_bh_bh:[0,11],sn_kick_companion_bh_n:[0,11],sn_kick_companion_ecap:[0,11],sn_kick_companion_grb_collapsar:[0,11],sn_kick_companion_hestaria:[0,11],sn_kick_companion_ia_chand:[0,11],sn_kick_companion_ia_chand_co:[0,11],sn_kick_companion_ia_eld:[0,11],sn_kick_companion_ia_h:[0,11],sn_kick_companion_ia_he_co:[0,11],sn_kick_companion_ia_hybrid_hecowd:[0,11],sn_kick_companion_ia_hybrid_hecowd_sublumin:[0,11],sn_kick_companion_ibc:[0,11],sn_kick_companion_ii:[0,11],sn_kick_companion_iia:[0,11],sn_kick_companion_ns_n:[0,11],sn_kick_companion_phdi:[0,11],sn_kick_companion_pisn:[0,11],sn_kick_companion_ppisn:[0,11],sn_kick_companion_tz:[0,11],sn_kick_companion_wdkick:[0,11],sn_kick_dispersion_aic_bh:[0,11],sn_kick_dispersion_bh_bh:[0,11],sn_kick_dispersion_bh_n:[0,11],sn_kick_dispersion_ecap:[0,11],sn_kick_dispersion_grb_collapsar:[0,11],sn_kick_dispersion_ia_hybrid_hecowd:[0,11],sn_kick_dispersion_ia_hybrid_hecowd_sublumin:[0,11],sn_kick_dispersion_ibc:[0,11],sn_kick_dispersion_ii:[0,11],sn_kick_dispersion_ns_n:[0,11],sn_kick_dispersion_phdi:[0,11],sn_kick_dispersion_pisn:[0,11],sn_kick_dispersion_ppisn:[0,11],sn_kick_dispersion_tz:[0,11],sn_kick_distribution_aic_bh:[0,11],sn_kick_distribution_bh_bh:[0,11],sn_kick_distribution_bh_n:[0,11],sn_kick_distribution_ecap:[0,11],sn_kick_distribution_grb_collapsar:[0,11],sn_kick_distribution_ia_hybrid_hecowd:[0,11],sn_kick_distribution_ia_hybrid_hecowd_sublumin:[0,11],sn_kick_distribution_ibc:[0,11],sn_kick_distribution_ii:[0,11],sn_kick_distribution_ns_n:[0,11],sn_kick_distribution_phdi:[0,11],sn_kick_distribution_pisn:[0,11],sn_kick_distribution_ppisn:[0,11],sn_kick_distribution_tz:[0,11],sn_none:12,sn_type:12,sneia:[0,11],snia:[0,11],snippet:[11,14],solar:[0,2,11,21],solver:[0,11],solver_forward_eul:0,solver_predictor_corrector:0,solver_rk2:0,solver_rk4:0,some:[0,1,2,5,7,9,11,12,13,14,15,16,17],someth:[0,5,11,14],somewhat:15,soon:19,sort:4,sort_kei:4,sourc:[1,2,4,5,6,7,10,16,18,19,21],source_file_filenam:7,source_list:5,sourcecod:[9,11,12,17],sourcefile_nam:1,space:[0,5,11,15,19],spacing_funct:[9,10],spacingfunc:[5,15],spacingfunct:[5,15],special:[0,11,15],specif:[0,4,11,14,16],specifi:[0,7,11],spectral:2,speed:[0,7,11],speedtest:[0,11],spent:4,spheric:[0,11],spin:[0,11],spinrat:[0,11],split:[0,7,11,14,15],split_lin:14,splitlin:[11,12,14,15],splitpoint:[0,11],spread:5,sqrt:[0,11],src:[9,11,12,17],stabil:[0,11],stabl:[0,11],stancliff:[0,11],standard:[0,2,11],star:[1,2,7,9,11,12,14,15,16,21],star_with_no_mass:0,starcount:15,stardata:[0,1,11,12,14,15],stardata_dump_filenam:[0,11],stardata_load_filenam:[0,11],stardata_t:12,start:[0,1,4,5,6,7,11,14,15],start_tim:[0,11],start_timestamp:15,startswith:14,state:[0,11],statement:[1,12,14,15],statist:[0,11],statu:[0,1,11,15],stderr:[0,11],stdout:4,steadi:[0,11],stefan:16,stefano:[4,5,9,15],stellar:[0,2,7,11,16,20],stellar_structure_algorithm:[0,11],stellar_structure_algorithm_external_funct:0,stellar_structure_algorithm_mint:0,stellar_structure_algorithm_modified_bs:0,stellar_structure_algorithm_non:0,stellar_typ:[1,9,10,12,14,15,16],stellar_type_1:[0,11,15,16],stellar_type_2:[0,11,15,16],stellar_type_3:[0,11],stellar_type_4:[0,11],stellar_type_dict:20,stellar_type_dict_short:20,step:[5,12,14,15,16,19],stepsiz:[5,15],stick:7,stiff:[0,11],still:[1,7,12],stop:[0,4,11],stopfil:[0,11],storag:[0,11],store:[0,2,3,4,5,7,9,14,15,17,21],store_capsul:11,store_memaddr:[11,21],str:[1,4,5,6,15,16],straight:5,straightforward:15,straniero:[0,11],strength:[0,11],strict:4,string:[0,1,3,4,5,6,7,11,14,15,16,18],strip:[0,11,14],stronger:[0,11],struct:[0,11,12],structur:[0,4,7,11,16],stuff:[4,7,14,15,16],style:[0,11],sub:[0,4,11],subdict:4,subject:[0,11],sublumin:[0,11],submit:9,subroutin:8,subsequ:[0,11],subtract:4,subtract_dict:4,succe:[0,11],suggest:[0,9,11,17],suit:[9,17],sum:[0,11],sundial:[0,11],supercrit:[0,11],supernova:[0,7,11],superwind:[0,11],superwind_mira_switchon:[0,11],sure:[2,5,7,9,14,15,16,17,18],surfac:[0,11],surrei:15,surviv:[0,11],survivor:[0,11],switcher:[0,11],symmetr:[0,11],synchron:[0,11],synonym:[0,11],synthesi:[7,9,15,17],system:[0,3,4,5,7,9,11,12,15,16,17,18],system_gener:[5,15],tabl:[0,2,11],take:[0,2,4,5,7,11,15,18],taken:[0,4,11,12],tar:[9,17],target:[1,6],task:[0,2,4,5,6,8,11,15,16,18,19,21],tauri:[0,11],tbse:[0,11],technic:[12,15],teff:[0,2,11],teff_1:16,teff_2:16,tell:4,temp_dir:[4,15],temperatur:[0,2,11,16],termin:[1,9,12,15,17],test:[0,4,5,7,9,11,14,15,17,21],test_func:11,test_logfil:14,test_pop:15,text:[4,6],than:[0,2,4,7,9,11,15,17],thats:15,thei:[0,2,4,5,7,11,15,16],thelog:[0,11],them:[2,4,5,11,15],themselv:[2,4],thermal:[0,2,11,21],thermally_pulsing_asymptotic_giant_branch:0,thermohalin:[0,11],thesi:[0,11],thi:[0,1,2,4,5,6,7,9,10,11,12,13,14,15,16,17,18,19,21],thick:[0,11],thick_disc_end_ag:[0,11],thick_disc_logg_max:[0,11],thick_disc_logg_min:[0,11],thick_disc_start_ag:[0,11],thin:[0,11],thing:[0,2,4,5,6,11,15,18],think:[0,4,5,11],third:[0,2,11],third_dup:[0,11],third_dup_multipli:[0,11],thorn:[0,11],those:[4,5,9,15,17],thread:7,thread_id:7,three:[0,2,11,15],three_part_powerlaw:[2,15],threshold:[0,4,7,11],through:[5,11,14,15,16,18],throughout:[5,15],tidal:[0,11],tidal_strength_factor:[0,11],tide:[0,11],tides_convective_damp:[0,11],tides_hurley2002:[0,11],tides_zahn1989:[0,11],time:[0,1,2,4,5,7,9,11,12,14,15,16,17],timescal:[0,11],timestamp:7,timestep:[0,11,12,14],timestep_limit:[0,11],timestep_log:[0,11],timestep_modul:[0,11],timestep_multipli:[0,11],timestep_solver_factor:[0,11],tinslei:2,titl:6,tmp:[0,4,9,11,14,15,17],tmp_dir:[5,7,15],tmp_tabl:2,todo:[0,1,2,4,5,6,7,11,13,15,16,18,19,21],toler:[0,11],too:[0,4,7,9,11,17,18],took:15,top:15,topic:[0,11],torqu:[0,11],total:[0,2,4,5,7,11,15,16],total_count:15,total_mass_run:15,total_prob:15,total_probability_weighted_mass_run:15,tout:[0,11,21],tpagb:[0,11],tpagb_reimers_eta:[0,11],tpagb_wind_beasor_etal_2020:0,tpagb_wind_bloeck:0,tpagb_wind_goldman_etal_2017:0,tpagb_wind_mattsson:0,tpagb_wind_reim:0,tpagb_wind_rob_cwind:0,tpagb_wind_van_loon:0,tpagb_wind_vw93_karaka:0,tpagb_wind_vw93_karakas_carbon_star:0,tpagb_wind_vw93_orig:0,tpagb_wind_vw93_orig_carbon_star:0,tpagbwind:[0,11],tpagbwindfac:[0,11],traceback:4,track:[7,16],trade:[0,11],transfer:[0,11],transform:[0,4,11],transit:[0,11],treat:[0,11],trigger:[0,11],trio:15,tripl:[0,2,7,11],truli:[0,11],tupl:1,turn:[0,4,11,14,15],two:[0,4,11,12,20,21],txt:[5,14,15,18],type:[0,1,2,4,5,6,7,11,14,15,16,19,20,21],type_chng:14,type_ia_mch_supernova_algorithm:[0,11],type_ia_sub_mch_supernova_algorithm:[0,11],typic:[0,11],ubvri:[0,11],ugriv:[0,11],uncom:[5,14,15],undef:12,under:[14,19],undergo:[0,11],understand:5,undescrib:6,uniform:2,union:[2,4,5,15,19,21],uniqu:[4,5,7,15],unit:[0,11,21],univari:[0,11],unknown:18,unless:[1,5,7],unload:5,unpars:11,unrecogn:[9,17],unsign:0,unstabl:[0,11],until:[0,2,4,11],unus:[0,7,11],unweight:15,updat:[2,4,5,9,15,17],update_dict:4,upper:[0,2,11,19],usag:[0,3],use:[0,2,4,5,7,8,9,11,12,14,15,16,17,18],use_astropy_valu:16,use_datadir:[5,15],use_fixed_timestep_:[0,11],use_periastron_roche_radiu:[0,11],use_tabular_intershell_abundances_karakas_2012:[0,11],used:[0,1,2,4,5,7,11,12,14,15,16],useful:[0,4,5,7,9,11,14,15,17,18,21],useful_func:[9,10],user:[1,2,4,5,6,7,12,18],uses:[0,7,11,12,15],using:[0,1,5,9,12,14,15,17],usual:[0,2,7,11,15],util:[1,2,4,5,6,11,12,14,15,16,18,19,21],val:2,valid:[0,2,4,11,12],valu:[0,1,2,4,5,6,7,11,14,15,16],value_lin:14,valueerror:15,valuerang:[5,15],values_arrai:14,van:[0,11],vandenheuvel_log:[0,11],vari:[0,11,15],variabl:[0,3,4,5,7,11],variant:[0,11],variou:[0,11],vassiliadi:[0,11],veloc:[0,2,11],verbos:[1,2,4,7,9,14,15,17],verbose_print:4,veri:[0,5,11,12,14,15,19],versa:21,version:[0,4,5,9,11,15,17],version_info:4,version_info_str:4,version_onli:[0,11],via:[3,5,7,11,12,15,16],vice:21,vink:[0,11],virtual:[9,17],virtualenviron:[9,17],viscos:[0,11],viscou:[0,11],visibl:12,visit:9,volum:[0,11],vrot1:[0,11],vrot2:[0,11],vrot3:[0,11],vrot4:[0,11],vrot_breakup:0,vrot_bs:0,vrot_non_rot:0,vrot_sync:0,vw93:[0,11],vw93_eagb_wind_spe:[0,11],vw93_mira_shift:[0,11],vw93_multipli:[0,11],vw93_tpagb_wind_spe:[0,11],vwind:[0,11],vwind_beta:[0,11],vwind_multipli:[0,11],wai:[0,4,5,7,11,14,16],wang:[0,11],want:[0,2,4,5,6,7,11,12,15,16],warmup_cpu:[0,11],warn:[0,11,14,15],wave:[0,11,15],wd_accretion_rate_new_giant_envelope_lower_limit_helium_donor:[0,11],wd_accretion_rate_new_giant_envelope_lower_limit_hydrogen_donor:[0,11],wd_accretion_rate_new_giant_envelope_lower_limit_other_donor:[0,11],wd_accretion_rate_novae_upper_limit_helium_donor:[0,11],wd_accretion_rate_novae_upper_limit_hydrogen_donor:[0,11],wd_accretion_rate_novae_upper_limit_other_donor:[0,11],wd_kick:[0,11],wd_kick_at_every_puls:0,wd_kick_at_given_puls:0,wd_kick_direct:[0,11],wd_kick_end_agb:0,wd_kick_first_rlof:0,wd_kick_pulse_numb:[0,11],wd_kick_when:[0,11],wd_sigma:[0,11],wdwd_merger_algorithm:[0,11],wdwd_merger_algorithm_bs:0,wdwd_merger_algorithm_chen2016:0,wdwd_merger_algorithm_perets2019:0,weight:[0,7,11],well:[0,4,7,9,11,12,14,17],were:[4,15],what:[0,1,2,4,5,6,7,9,11,12,14,15,17,18],whatev:[5,9,12,17],wheeler:[0,11],when:[0,1,2,4,5,6,7,9,11,14,15,17,18],whenev:[9,17],where:[0,1,2,4,5,6,7,9,11,15,17],whether:[0,2,4,5,6,7,11,15,16,21],which:[0,1,2,4,5,6,7,9,11,12,14,15,17,18,21],whichev:7,white:[0,11],white_dwarf_cooling_carrasco2014:[0,11],white_dwarf_cooling_mestel:[0,11],white_dwarf_cooling_mestel_modifi:[0,11],white_dwarf_cooling_model:[0,11],white_dwarf_radius_carrasco2014:[0,11],white_dwarf_radius_model:[0,11],white_dwarf_radius_mu:[0,11],white_dwarf_radius_nauenberg1972:[0,11],whole:[5,7,12],width:[0,11],wind:[0,11],wind_algorithm_binary_c_2020:0,wind_algorithm_hurley2002:0,wind_algorithm_non:0,wind_algorithm_schneider2018:0,wind_angmom_loss_bs:0,wind_angmom_loss_lw:0,wind_angmom_loss_lw_hybrid:0,wind_angmom_loss_spherically_symmetr:0,wind_angular_momentum_loss:[0,11],wind_disc_angmom_fract:[0,11],wind_disc_mass_fract:[0,11],wind_djorb_fac:[0,11],wind_gas_to_dust_ratio:[0,11],wind_lbv_luminosity_lower_limit:[0,11],wind_mass_loss:[0,11],wind_multiplier_:[0,11],wind_nieuwenhuijzen_luminosity_lower_limit:[0,11],wind_type_multiplier_:[0,11],within:[0,4,5,9,11,12,15,17],without:[2,5,7,12,14],won:[0,11,14],wood:[0,11],work:[0,4,9,11,12,14,16,17],would:[0,4,11,15,16],wouldn:[5,15],wr_wind:[0,11],wr_wind_bs:0,wr_wind_eldridg:0,wr_wind_fac:[0,11],wr_wind_maeder_meynet:0,wr_wind_nugis_lam:0,wrap:[1,12],wrapper:[4,11,12,14,21],write:[1,4,5,6,7,11,12,14,15,18],write_binary_c_calls_to_fil:[5,15],write_binary_c_parameter_descriptions_to_rst_fil:4,write_grid_options_to_rst_fil:6,write_logfil:11,written:[5,6,7,11,14,15,18],written_data:14,wrlof_mass_transf:[0,11],wrlof_method:[0,11],wrlof_non:0,wrlof_q_depend:0,wrlof_quadrat:0,wrong:[9,17],wrwindfac:[0,11],wtts2:[0,11],wtts_log:[0,11],www:[0,2,11],x86_64:11,year:[0,2,11],yet:[0,4,7,11,16],yield:[0,11],you:[0,1,4,5,6,7,9,11,12,14,15,16,17,21],young:[0,11],your:[7,9,12,14,17],yourself:[15,16],zahn:[0,11],zam:[0,2,11,18,21],zams_collis:21,zams_mass:15,zams_mass_1:15,zams_mass_2:15,zero:[0,1,7,11],zero_ag:[12,14,15],zero_prob_stars_skip:15,zone:[0,11],zoom:[0,11],zoomfac_multiplier_decreas:[0,11],zoomfac_multiplier_increas:[0,11],zsolar:2,zytkow:[0,11]},titles:["Binary_c parameters","custom_logging_functions module","distribution_functions module","Example notebooks","functions module","grid_class module","Grid options and descriptions","Population grid code options","hpc_functions module","Welcome to binary_c-python\u2019s documentation!","Binarycpython code","Using the API functionality of binarycpython","Notebook custom logging","Extra features and functionality of binarycpython","Running individual systems with binarycpython","Running populations with binarycpython","plot_functions module","Python module for binary_c","run_system_wrapper module","spacing_functions module","stellar_types module","useful_funcs module"],titleterms:{"function":[4,11,13,14,15],"public":7,Adding:15,Using:[11,12],after:[9,17],algorithm:0,api:[11,12,14],binari:0,binary_c:[0,9,11,17],binarycpython:[10,11,13,14,15],build:[9,17],code:[7,10],compact:12,custom:12,custom_logging_funct:1,descript:6,directli:12,distribution_funct:2,document:[9,17],environ:[9,17],evolut:12,evolv:15,exampl:[3,9,11,12,15,17],extra:13,faq:[9,17],featur:13,free:11,from:[9,11,12,17],full:15,get:11,grid:[6,7,15],grid_class:5,handl:15,hpc_function:8,indic:9,individu:14,inform:11,input:0,instal:[9,17],instruct:[9,17],issu:[9,17],log:[12,15],mass:12,misc:0,modul:[1,2,4,5,8,9,16,17,18,19,20,21],moe:7,note:[9,17],notebook:[3,12],noteworthi:15,nucsyn:0,object:[12,14,15],option:[6,7],output:[0,15],paramet:0,pip:[9,17],plot_funct:16,popul:[7,12,14,15],privat:7,python:[9,17],requir:[9,17],run:[12,14,15],run_system_wrapp:18,run_wrapp:14,sampler:7,script:15,section:0,set:[11,15],singl:14,sourc:[9,17],spacing_funct:19,star:0,stefano:7,stellar_typ:20,store:11,string:12,supernova:12,system:14,tabl:9,usag:[9,11,12,17],useful_func:21,using:11,variabl:[9,15,17],via:[9,14,17],welcom:9,when:12}})
\ No newline at end of file
diff --git a/docs/build/html/spacing_functions.html b/docs/build/html/spacing_functions.html
index 54326c897243395d6b69b6a975efc400578dbaeb..5543b73f89d3f1994dea222db52f2b4dc3e613f2 100644
--- a/docs/build/html/spacing_functions.html
+++ b/docs/build/html/spacing_functions.html
@@ -30,6 +30,9 @@
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="_static/js/theme.js"></script>
 
@@ -99,7 +102,7 @@
 <li class="toctree-l2"><a class="reference internal" href="useful_funcs.html">useful_funcs module</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -171,7 +174,31 @@
           <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
            <div itemprop="articleBody">
             
-  <div class="section" id="module-binarycpython.utils.spacing_functions">
+  
+<style>
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="module-binarycpython.utils.spacing_functions">
 <span id="spacing-functions-module"></span><h1>spacing_functions module<a class="headerlink" href="#module-binarycpython.utils.spacing_functions" title="Permalink to this headline">¶</a></h1>
 <p>Module containing the spacing functions for the binarycpython package. Very under-populated at the moment, but more are likely to come soon</p>
 <dl class="simple">
@@ -235,9 +262,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/stellar_types.html b/docs/build/html/stellar_types.html
index 391be9d90a2934af73f8a1a6675e58e8b0837715..5b735e30ff7b47966631d3042896b0ffbdca4035 100644
--- a/docs/build/html/stellar_types.html
+++ b/docs/build/html/stellar_types.html
@@ -30,6 +30,9 @@
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="_static/js/theme.js"></script>
 
@@ -99,7 +102,7 @@
 <li class="toctree-l2"><a class="reference internal" href="useful_funcs.html">useful_funcs module</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -171,7 +174,31 @@
           <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
            <div itemprop="articleBody">
             
-  <div class="section" id="module-binarycpython.utils.stellar_types">
+  
+<style>
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="module-binarycpython.utils.stellar_types">
 <span id="stellar-types-module"></span><h1>stellar_types module<a class="headerlink" href="#module-binarycpython.utils.stellar_types" title="Permalink to this headline">¶</a></h1>
 <dl class="simple">
 <dt>Module containing two stellar type dicts:</dt><dd><ul class="simple">
@@ -216,9 +243,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/build/html/useful_funcs.html b/docs/build/html/useful_funcs.html
index 2b4f5ddea24055f41418117a70a97c740c16e4d1..2b0dd6dc5ab0ec14cbc730e9616e61f680bebf61 100644
--- a/docs/build/html/useful_funcs.html
+++ b/docs/build/html/useful_funcs.html
@@ -30,13 +30,16 @@
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
+        <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
+        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
+        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
     
     <script type="text/javascript" src="_static/js/theme.js"></script>
 
     
     <link rel="index" title="Index" href="genindex.html" />
     <link rel="search" title="Search" href="search.html" />
-    <link rel="next" title="Examples" href="examples.html" />
+    <link rel="next" title="Example notebooks" href="example_notebooks.html" />
     <link rel="prev" title="stellar_types module" href="stellar_types.html" /> 
 </head>
 
@@ -99,7 +102,7 @@
 <li class="toctree-l2 current"><a class="current reference internal" href="#">useful_funcs module</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="example_notebooks.html">Example notebooks</a></li>
 <li class="toctree-l1"><a class="reference internal" href="binary_c_parameters.html">Binary_c parameters</a></li>
 <li class="toctree-l1"><a class="reference internal" href="grid_options_descriptions.html">Population grid code options</a></li>
 <li class="toctree-l1"><a class="reference external" href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python">Visit the GitLab repo</a></li>
@@ -171,7 +174,31 @@
           <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
            <div itemprop="articleBody">
             
-  <div class="section" id="module-binarycpython.utils.useful_funcs">
+  
+<style>
+/* CSS overrides for sphinx_rtd_theme */
+
+/* 24px margin */
+.nbinput.nblast.container,
+.nboutput.nblast.container {
+    margin-bottom: 19px;  /* padding has already 5px */
+}
+
+/* ... except between code cells! */
+.nblast.container + .nbinput.container {
+    margin-top: -19px;
+}
+
+.admonition > p:before {
+    margin-right: 4px;  /* make room for the exclamation icon */
+}
+
+/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
+.math {
+    text-align: unset;
+}
+</style>
+<div class="section" id="module-binarycpython.utils.useful_funcs">
 <span id="useful-funcs-module"></span><h1>useful_funcs module<a class="headerlink" href="#module-binarycpython.utils.useful_funcs" title="Permalink to this headline">¶</a></h1>
 <p>Collection of useful functions.</p>
 <p>Part of this is copied/inspired by Rob’s binary_stars module</p>
@@ -183,11 +210,14 @@
 <li><p>ZAMS_collision(m1, m2, e, sep, z) returns 1 if stars collide on the ZAMS</p></li>
 <li><p>roche_lobe(q): returns roche lobe radius in units of separation</p></li>
 <li><p>ragb(m, z): radius at first thermal pulse</p></li>
+<li><p>minimum_period_for_RLOF(M1, M2, metallicity, store_memaddr=-1): function to calculate the minimum period that leads to RLOF on ZAMS</p></li>
+<li><p>minimum_separation_for_RLOF(M1, M2, metallicity, store_memaddr=-1): function to calculate the minimum period that leads to RLOF on ZAMS</p></li>
+<li><p>maximum_mass_ratio_for_RLOF(M1, orbital_period, store_memaddr=None): Function to calculate the maximum mass ratio that leads to RLOF on ZAMS</p></li>
 </ul>
 </dd>
 <dt>Tasks:</dt><dd><ul class="simple">
 <li><p>TODO: check whether these functions are correct</p></li>
-<li><p>TODO: add unittest for maximum_mass_ratio_for_RLOF</p></li>
+<li><p>TODO: add unit test for maximum_mass_ratio_for_RLOF</p></li>
 </ul>
 </dd>
 </dl>
@@ -257,14 +287,14 @@
 <dt id="binarycpython.utils.useful_funcs.minimum_period_for_RLOF">
 <code class="sig-prename descclassname">binarycpython.utils.useful_funcs.</code><code class="sig-name descname">minimum_period_for_RLOF</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">M1</span></em>, <em class="sig-param"><span class="n">M2</span></em>, <em class="sig-param"><span class="n">metallicity</span></em>, <em class="sig-param"><span class="n">store_memaddr</span><span class="o">=</span><span class="default_value">- 1</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binarycpython/utils/useful_funcs.html#minimum_period_for_RLOF"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binarycpython.utils.useful_funcs.minimum_period_for_RLOF" title="Permalink to this definition">¶</a></dt>
 <dd><p>Wrapper function for _binary_c_bindings.return_minimum_orbit_for_RLOF</p>
-<p>Handles the output and returns the minimum orbital period at which RLOF just does not occur at zams</p>
+<p>Handles the output and returns the minimum orbital period at which RLOF just does not occur at ZAMS</p>
 <dl class="field-list simple">
 <dt class="field-odd">Parameters</dt>
 <dd class="field-odd"><ul class="simple">
 <li><p><strong>M1</strong> – Primary mass in solar mass</p></li>
 <li><p><strong>M2</strong> – Secondary mass in solar mass</p></li>
 <li><p><strong>metallicity</strong> – metallicity</p></li>
-<li><p><strong>store_memaddr</strong> (<em>optional</em>) – store memory adress</p></li>
+<li><p><strong>store_memaddr</strong> (<em>optional</em>) – store memory address</p></li>
 </ul>
 </dd>
 <dt class="field-even">Returns</dt>
@@ -385,7 +415,7 @@ determine if two stars collide on the ZAMS</p>
   
     <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
       
-        <a href="examples.html" class="btn btn-neutral float-right" title="Examples" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
+        <a href="example_notebooks.html" class="btn btn-neutral float-right" title="Example notebooks" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
       
       
         <a href="stellar_types.html" class="btn btn-neutral float-left" title="stellar_types module" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
@@ -411,9 +441,9 @@ determine if two stars collide on the ZAMS</p>
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 
 
diff --git a/docs/source/_templates/footer.html b/docs/source/_templates/footer.html
index 2d75d5c50f868db37d63a887788d8fa2b2adb837..8651c6d1e1373f3ea69b60a37b797e470083663d 100644
--- a/docs/source/_templates/footer.html
+++ b/docs/source/_templates/footer.html
@@ -2,8 +2,8 @@
 
 {%- block extrafooter %}
 <br><br>
-Generated on binarycpython git branch: development_version/2.1.7 git revision 22f07b8a31dab843d58073f9b3da63a5f40b852b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/development_version/2.1.7">git url</a>.
+Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision ea5125892022d4b75619193546b5462398ba903b url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">git url</a>.
 <br><br>
-Using binary_c with bit branch branch_david: git revision: "6044:20210720:d1ed5b6c1" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
+Using binary_c with bit branch branch_david: git revision: "6101:20210807:c5232be5c" url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c/-/tree/branch_david">git url</a>.
 
 {% endblock %}
\ No newline at end of file
diff --git a/docs/source/binary_c_parameters.rst b/docs/source/binary_c_parameters.rst
index cdca213e0895c0790c4f7097c7731afe40b9e315..96a16995f44edbe0c9af9b78993e06515eaadf1b 100644
--- a/docs/source/binary_c_parameters.rst
+++ b/docs/source/binary_c_parameters.rst
@@ -4,7 +4,7 @@ The following chapter contains all the parameters that the current version of bi
 
 
 This information was obtained by the following binary_c build:
-	**binary_c git branch**: branch_david	**binary_c git revision**: 6044:20210720:d1ed5b6c1	**Built on**: Jul 20 2021 13:54:45
+	**binary_c git branch**: branch_david	**binary_c git revision**: 6101:20210807:c5232be5c	**Built on**: Aug  7 2021 17:32:06
 
 
 Section: stars
diff --git a/docs/source/conf.py b/docs/source/conf.py
index cb25228599ceb5b3605588e6989f2041502d7907..2ed92c07178bdba851ec0d59af3ad0e8e01c7e0d 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -50,6 +50,7 @@ extensions = [
     "m2r2",
     "sphinx_rtd_theme",
     "sphinx_autodoc_typehints",  # https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html
+    "nbsphinx",
 ]
 
 
diff --git a/docs/source/example_notebooks.rst b/docs/source/example_notebooks.rst
new file mode 100644
index 0000000000000000000000000000000000000000..7e2eef403ef98e8f4cf2785691ed1aadca497439
--- /dev/null
+++ b/docs/source/example_notebooks.rst
@@ -0,0 +1,15 @@
+Example notebooks
+=================
+We have a set of notebooks that explain and show the usage of the binarycpython features. The notebooks are also stored in the examples/ directory in the `repository <https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/master/examples>`_
+
+The order of the notebooks below is more or less the recommended order to read.
+
+.. toctree::
+    :maxdepth: 2
+    :caption: Contents:
+    
+    notebook_individual_systems.ipynb
+    notebook_custom_logging.ipynb
+    notebook_population.ipynb
+    notebook_extra_features.ipynb
+    notebook_api_functionality.ipynb
\ No newline at end of file
diff --git a/docs/source/examples.rst b/docs/source/examples.rst
deleted file mode 100644
index ab58720d9b5a670eb13d8468daa687e72ab86e52..0000000000000000000000000000000000000000
--- a/docs/source/examples.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-Examples
-========
-This chapter contains the source code of example scripts which show the way of using certain functions
-
-.. toctree::                                                                    
-   :hidden:                                                                     
-
-   general_examples
-   population_example
\ No newline at end of file
diff --git a/docs/source/general_examples.rst b/docs/source/general_examples.rst
deleted file mode 100644
index 8509de5b72faf82bc026ed2b785b2d72b4ccc702..0000000000000000000000000000000000000000
--- a/docs/source/general_examples.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-Examples
-========
-The source code of the general examples.
-
-.. literalinclude:: ../../examples/examples.py
-    :language: python
-    :linenos:
\ No newline at end of file
diff --git a/docs/source/grid_options_descriptions.rst b/docs/source/grid_options_descriptions.rst
index 5a77792e1c16a5d29844979038458f27e145a08d..319b8d56a6d616f55498ec2c10fbc358a8de8183 100644
--- a/docs/source/grid_options_descriptions.rst
+++ b/docs/source/grid_options_descriptions.rst
@@ -13,19 +13,21 @@ The following options are meant to be changed by the user.
 
 | **C_logging_code**: Variable to store the exact code that is used for the custom_logging. In this way the user can do more complex logging, as well as putting these logging strings in files.
 
-| **amt_cores**: The amount of cores that the population grid will use. The multiprocessing is useful but make sure to figure out how many logical cores the machine has. The core is multiprocessed, not multithreaded, and will gain no extra speed when amt_cores exceeds the amount of logical cores. Input: int
+| **amt_cores**: The amount of cores that the population grid will use. The multiprocessing is useful but make sure to figure out how many logical cores the machine has. The core is multi processed, not multi threaded, and will gain no extra speed when amt_cores exceeds the amount of logical cores. Input: int
 
-| **combine_ensemble_with_thread_joining**: BOolean flag on whether to combine everything and return it to the user or if false: write it to data_dir/ensemble_output_{popuation_id}_{thread_id}.json
+| **combine_ensemble_with_thread_joining**: Boolean flag on whether to combine everything and return it to the user or if false: write it to data_dir/ensemble_output_{population_id}_{thread_id}.json
 
 | **condor**: Int flag whether to use a condor type population evolution. Not implemented yet.
 
-| **custom_logging_func_memaddr**: Memory adress where the custom_logging_function is stored. Input: int
+| **custom_logging_func_memaddr**: Memory address where the custom_logging_function is stored. Input: int
+
+| **do_dry_run**: Whether to do a dry run to calculate the total probability for this run
 
 | **ensemble_factor_in_probability_weighted_mass**: Flag to multiply all the ensemble results with 1/probability_weighted_mass
 
 | **evolution_type**: Variable containing the type of evolution used of the grid. Multiprocessing or linear processing
 
-| **failed_systems_threshold**: Variable storing the maximum amount of systems that are allowed to fail before logging their commandline arguments to failed_systems log files
+| **failed_systems_threshold**: Variable storing the maximum amount of systems that are allowed to fail before logging their command line arguments to failed_systems log files
 
 | **gridcode_filename**: Filename for the grid code. Set and used by the population object. TODO: allow the user to provide their own function, rather than only a generated function.
 
@@ -35,7 +37,7 @@ The following options are meant to be changed by the user.
 
 | **log_file**: Log file for the population object. Unused
 
-| **log_runtime_systems**: Whether to log the runtime of the systems . Each systems run by the thread is logged to a file and is stored in the tmp_dir. (1 file per thread). Don't use this if you are planning to run alot of systems. This is mostly for debugging and finding systems that take long to run. Integer, default = 0. if value is 1 then the systems are logged
+| **log_runtime_systems**: Whether to log the runtime of the systems . Each systems run by the thread is logged to a file and is stored in the tmp_dir. (1 file per thread). Don't use this if you are planning to run a lot of systems. This is mostly for debugging and finding systems that take long to run. Integer, default = 0. if value is 1 then the systems are logged
 
 | **m&s_options**: Internal variable that holds the M&S options. Don't write to this your self
 
@@ -49,20 +51,20 @@ The following options are meant to be changed by the user.
 
 | **repeat**: Factor of how many times a system should be repeated. Consider the evolution splitting binary_c argument for supernovae kick repeating.
 
-| **run_zero_probability_system**: Whether to run the zero probability systems. Default: True. Input: boolean
+| **run_zero_probability_system**: Whether to run the zero probability systems. Default: True. Input: Boolean
 
-| **slurm**: Int flag whether to use a slurm type population evolution.
+| **slurm**: Int flag whether to use a Slurm type population evolution.
 
-| **source_file_filename**: Variable containing the source file containing lines of binary_c commandline calls. These all have to start with binary_c.
+| **source_file_filename**: Variable containing the source file containing lines of binary_c command line calls. These all have to start with binary_c.
 
 | **tmp_dir**: Directory where certain types of output are stored. The grid code is stored in that directory, as well as the custom logging libraries. Log files and other diagnostics will usually be written to this location, unless specified otherwise
 
 | **verbosity**: Verbosity of the population code. Default is 0, by which only errors will be printed. Higher values will show more output, which is good for debugging.
 
-| **weight**: Weight factor for each system. The calculated probability is mulitplied by this. If the user wants each system to be repeated several times, then this variable should not be changed, rather change the _repeat variable instead, as that handles the reduction in probability per system. This is useful for systems that have a process with some random element in it.
+| **weight**: Weight factor for each system. The calculated probability is multiplied by this. If the user wants each system to be repeated several times, then this variable should not be changed, rather change the _repeat variable instead, as that handles the reduction in probability per system. This is useful for systems that have a process with some random element in it.
 
-Moe & Distefano sampler options
--------------------------------
+Moe & di Stefano sampler options
+--------------------------------
 The following options are meant to be changed by the user.
 
 
@@ -71,7 +73,7 @@ The following options are meant to be changed by the user.
 | **multiplicity_model**: 
 	multiplicity model (as a function of log10M1)
 	
-	You can use 'Poisson' which uses the system multiplicty
+	You can use 'Poisson' which uses the system multiplicity
 	given by Moe and maps this to single/binary/triple/quad
 	fractions.
 	
@@ -90,13 +92,13 @@ The following options are meant to be changed by the user.
 	
 
 | **normalize_multiplicities**: 
-	'norm': normalize so the whole population is 1.0
+	'norm': normalise so the whole population is 1.0
 	        after implementing the appropriate fractions
 	        S/(S+B+T+Q), B/(S+B+T+Q), T/(S+B+T+Q), Q/(S+B+T+Q)
-	        given a mix of multiplities, you can either (noting that
+	        given a mix of multiplicities, you can either (noting that
 	        here (S,B,T,Q) = appropriate modulator * model(S,B,T,Q) )
 	        note: if you only set one multiplicity_modulator
-	        to 1, and all the others to 0, then normalizing
+	        to 1, and all the others to 0, then normalising
 	        will mean that you effectively have the same number
 	        of stars as single, binary, triple or quad (whichever
 	        is non-zero) i.e. the multiplicity fraction is ignored.
@@ -105,7 +107,7 @@ The following options are meant to be changed by the user.
 	
 	'raw'   : stick to what is predicted, i.e.
 	          S/(S+B+T+Q), B/(S+B+T+Q), T/(S+B+T+Q), Q/(S+B+T+Q)
-	          without normalization
+	          without normalisation
 	          (in which case the total probability < 1.0 unless
 	          all you use single, binary, triple and quadruple)
 	
@@ -160,9 +162,9 @@ The following options are not meant to be changed by the user, as these options
 
 | **_end_time_evolution**: Variable storing the end timestamp of the population evolution. Set by the object itself
 
-| **_errors_exceeded**: Variable storing a boolean flag whether the amount of errors was higher than the set threshold (failed_systems_threshold). If True, then the commandline arguments of the failing systems will not be stored in the failed_system_log files.
+| **_errors_exceeded**: Variable storing a Boolean flag whether the amount of errors was higher than the set threshold (failed_systems_threshold). If True, then the command line arguments of the failing systems will not be stored in the failed_system_log files.
 
-| **_errors_found**: Variable storing a boolean flag whether errors by binary_c are encountered.
+| **_errors_found**: Variable storing a Boolean flag whether errors by binary_c are encountered.
 
 | **_evolution_type_options**: List containing the evolution type options.
 
@@ -186,9 +188,9 @@ The following options are not meant to be changed by the user, as these options
 
 | **_start_time_evolution**: Variable storing the start timestamp of the population evolution. Set by the object itself.
 
-| **_store_memaddr**: Memory adress of the store object for binary_c.
+| **_store_memaddr**: Memory address of the store object for binary_c.
 
-| **_system_generator**: Function object that contains the system generator function. This can be from a grid, or a source file, or a montecarlo grid.
+| **_system_generator**: Function object that contains the system generator function. This can be from a grid, or a source file, or a Monte Carlo grid.
 
 | **_total_mass_run**: To count the total mass that thread/process has ran
 
diff --git a/docs/source/index.rst b/docs/source/index.rst
index b07d6ec3c6040192693d6609004c48afc362d124..dd3e4bb0cd3a29294bc3d9a19cc70e9470cdd746 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -14,7 +14,7 @@ Welcome to binary_c-python's documentation!
 
    readme_link
    modules
-   examples
+   example_notebooks
    binary_c_parameters
    grid_options_descriptions
    Visit the GitLab repo <https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python>
diff --git a/docs/source/notebook_api_functionality.ipynb b/docs/source/notebook_api_functionality.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..d81c31711bfc5d6de3159fd8958df96dd145ded0
--- /dev/null
+++ b/docs/source/notebook_api_functionality.ipynb
@@ -0,0 +1,951 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "cb9d00f5-9613-471e-a4bb-6181311bf73b",
+   "metadata": {},
+   "source": [
+    "# Using the API functionality of binarycpython\n",
+    "This notebook shows how to use the API functions that interface with binary_c. It usually is better to use wrapper functions that internally use these API functions, because most of the output here is very raw\n",
+    "\n",
+    "Binarycpython uses the Python-C extension framework to interface Python with C. The sourcecode for this is contained in `src/binary_c_python.c`, and the functions are available via `from binarycpython import _binary_c_bindings`.\n",
+    "\n",
+    "The following functions are available through the API: (run cell below)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "id": "ded7eaf6-e1ba-46c2-9f6f-9ebcb14a264d",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Help on module binarycpython._binary_c_bindings in binarycpython:\n",
+      "\n",
+      "NAME\n",
+      "    binarycpython._binary_c_bindings - Module to interface the Binary_c API with python.\n",
+      "\n",
+      "FUNCTIONS\n",
+      "    free_persistent_data_memaddr_and_return_json_output(...)\n",
+      "        Frees the persistent_data memory and returns the json output\n",
+      "    \n",
+      "    free_store_memaddr(...)\n",
+      "        Frees the store memaddr\n",
+      "    \n",
+      "    return_arglines(...)\n",
+      "        Return the default args for a binary_c system\n",
+      "    \n",
+      "    return_help(...)\n",
+      "        Return the help info for a given parameter\n",
+      "    \n",
+      "    return_help_all(...)\n",
+      "        Return an overview of all the parameters, their description, categorized in sections\n",
+      "    \n",
+      "    return_maximum_mass_ratio_for_RLOF(...)\n",
+      "        Returns a string containing the maximum mass ratio for which a binary system does not RLOF at zams. Optionally accepts a store_capsule. Please use the wrapper functions in utils for this except when you know what you're doing\n",
+      "    \n",
+      "    return_minimum_orbit_for_RLOF(...)\n",
+      "        Returns a string containing the minimum orbit and separation for which a binary system does not RLOF at zams. Please use the wrapper functions in utils for this except when you know what you're doing\n",
+      "    \n",
+      "    return_persistent_data_memaddr(...)\n",
+      "        Return the store memory adress that will be passed to run_population\n",
+      "    \n",
+      "    return_store_memaddr(...)\n",
+      "        Return the store memory adress that will be passed to run_population\n",
+      "    \n",
+      "    return_version_info(...)\n",
+      "        Return the version information of the used binary_c build\n",
+      "    \n",
+      "    run_system(...)\n",
+      "        Function to run a system. This is a general function that will be able to handle different kinds of situations: single system run with different settings, population run with different settings, etc. To avoid having too many functions doing slightly different things. \n",
+      "        \n",
+      "        Arguments:\n",
+      "                argstring: argument string for binary_c\n",
+      "                (opt) custom_logging_func_memaddr: memory address value for custom logging function. Default = -1 (None)\n",
+      "                (opt) store_memaddr: memory adress of the store. Default = -1 (None)\n",
+      "                (opt) write_logfile: Boolean (in int form) for whether to enable the writing of the log function. Default = 0\n",
+      "                (opt) population: Boolean (in int form) for whether this system is part of a population run. Default = 0.\n",
+      "    \n",
+      "    test_func(...)\n",
+      "        Function that contains random snippets. Do not expect this to remain available, or reliable. i.e. dont use it.\n",
+      "\n",
+      "FILE\n",
+      "    /home/david/.pyenv/versions/3.6.4/envs/dev-binarycpython3.6.4/lib/python3.6/site-packages/binarycpython/_binary_c_bindings.cpython-36m-x86_64-linux-gnu.so\n",
+      "\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "from binarycpython import _binary_c_bindings\n",
+    "help(_binary_c_bindings)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "7ddede71-ffaa-4b24-aece-e94128a60d7f",
+   "metadata": {},
+   "source": [
+    "There are three main categories of functions:\n",
+    "\n",
+    "- Functions to get information from binary_c: these can be used to evolve systems, and get utility information from binary_c.\n",
+    "    - run_system\n",
+    "    - return_minimum_orbit_for_RLOF\n",
+    "    - return_maximum_mass_ratio_for_RLOF\n",
+    "    - return_help\n",
+    "    - return_help_all\n",
+    "    - return_arglines\n",
+    "\n",
+    "- Memory creation functions: these can be used to have binary_c allocate memory which is used or written to by binary_c\n",
+    "    - return_persistent_data_memaddr\n",
+    "    - return_store_memaddr\n",
+    "\n",
+    "- Memory freeing functions: These can be used to free the allocated memory, and in the case of persistent memory it will also return the contents of the ensemble\n",
+    "    - free_persistent_data_memaddr_and_return_json_output\n",
+    "    - free_store_memaddr"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "0dd3e115-1571-42f7-9ab9-cf7688fa28c1",
+   "metadata": {},
+   "source": [
+    "## Example usage:"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "c5015daa-35ab-4736-a04d-f3cbe661638c",
+   "metadata": {},
+   "source": [
+    "### Setting up, using and freeing store"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 10,
+   "id": "10a74d5a-a3d5-4543-a5bc-20d1fe885bb4",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "<capsule object \"STORE\" at 0x7f163859d0c0>\n",
+      "SINGLE_STAR_LIFETIME 10 27.7358\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# allocating store memory\n",
+    "store_memaddr = _binary_c_bindings.return_store_memaddr()\n",
+    "print(store_memaddr)\n",
+    "\n",
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=10,\n",
+    "    orbital_period=4500,\n",
+    "    eccentricity=0.0,\n",
+    "    metallicity=0.02,\n",
+    "    max_evolution_time=15000,\n",
+    ").strip()\n",
+    "\n",
+    "#\n",
+    "output = _binary_c_bindings.run_system(argstring, store_memaddr=store_memaddr)\n",
+    "print(output)\n",
+    "\n",
+    "# Freeing store\n",
+    "_binary_c_bindings.free_store_memaddr(store_memaddr)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "e9da5fc6-e680-483c-982e-4819767ed5b2",
+   "metadata": {},
+   "source": [
+    "### Getting information from binary_c"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "24f7ffe5-0076-459d-a37f-254e10d0d9f9",
+   "metadata": {},
+   "source": [
+    "We can get information for a parameter via return_help(parameter_name):\n",
+    "This will return an unparsed output"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 11,
+   "id": "318874f6-7acf-49bb-9786-299d4dffc0b3",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "binary_c help for variable : M_1 <Float>\n",
+      "\n",
+      "The initial mass of star one (in solar units, internally this is star index 0).\n",
+      "\n",
+      "Default : 0\n",
+      "\n",
+      "\n",
+      "\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(_binary_c_bindings.return_help('M_1'))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f7fafce6-a522-43ac-a0c2-15a3db393b49",
+   "metadata": {},
+   "source": [
+    "We can get information on all available parameters via return_help(parameter_name):"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 16,
+   "id": "d7e757ae-579c-42a2-a310-f0401b7800e8",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "\n",
+      "############################################################\n",
+      "##### Section Stars\n",
+      "############################################################\n",
+      "metallicity : This sets the metallicity of the stars, i.e. the amount (by mass) of matter which is not hydrogen or helium. If you are using the BSE algorithm, this must be 1e-4 <= metallicity <= 0.03. See also nucsyn_metallicity and effective_metallicity. : (null)\n",
+      "effective_metallicity : This sets effective metallicity of stars as used in routines like the Schneider wind loss. If not set, or set to DEFAULT_TO_METALLICITY (==-1, the default), this is just the same as metallicity. The main difference between effective_metallicity and metallicity is the range of validity: 0 <= effective_metallicity <= 1, while metallicity's range of validity is limited by the stellar evolution algorithm (so, for BSE, is 1e-4 <= metallicity <= 0.03). : (null)\n",
+      "M_1 : The initial mass of star one (in solar units, internally this is star index 0). : (null)\n",
+      "M_2 : The initial mass of star two (in solar units, internally this is star index 1). : (null)\n",
+      "M_3 : The initial mass of star three (in solar units, internally this is star index 2). : (null)\n",
+      "M_4 : The initial mass of star four (in solar units, internally this is star index 3). : (null)\n",
+      "vrot1 : The initial equatorial rotational velocity of star one (in km/s, internally this is star index 0). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot2,3,4. : (null)\n",
+      "vrot2 : The initial equatorial rotational velocity of star two (in km/s, internally this is star index 1). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,3,4. : (null)\n",
+      "vrot3 : The initial equatorial rotational velocity of star three (in km/s, internally this is star index 2). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,2,4. : (null)\n",
+      "vrot4 : The initial equatorial rotational velocity of star four (in km/s, internally this is star index 3). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,2,3. : (null)\n",
+      "Prot1 : The initial equatorial rotational velocity of star one (in km/s, internally this is star index 0). See also Prot2,3,4. : (null)\n",
+      "Prot2 : The initial equatorial rotational velocity of star two (in km/s, internally this is star index 1). See also Prot1,3,4. : (null)\n",
+      "Prot3 : The initial equatorial rotational period of star three (in days, internally this is star index 2). See also Prot1,2,4. : (null)\n",
+      "Prot4 : The initial equatorial rotational period of star four (in days, internally this is star index 3). See also Prot1,2,3. : (null)\n",
+      "inclination1 : The initial inclination of star one (in degrees). : (null)\n",
+      "inclination2 : The initial inclination of star two (in degrees). : (null)\n",
+      "inclination3 : The initial inclination of star three (in degrees). : (null)\n",
+      "inclination4 : The initial inclination of star four (in degrees). : (null)\n",
+      "B_1 : The initial magnetic field of star one (in Gauss, internally this is star index 0). : (null)\n",
+      "B_2 : The initial magnetic field of star two (in Gauss, internally this is star index 1). : (null)\n",
+      "B_3 : The initial magnetic field of star three (in Gauss, internally this is star index 2). : (null)\n",
+      "B_4 : The initial magnetic field of star four (in Gauss, internally this is star index 3). : (null)\n",
+      "B_inclination1 : The initial inclination of the magnetic field of star one (in degrees). : (null)\n",
+      "B_inclination2 : The initial inclination of the magnetic field of star two (in degrees). : (null)\n",
+      "B_inclination3 : The initial inclination of the magnetic field of star three (in degrees). : (null)\n",
+      "B_inclination4 : The initial inclination of the magnetic field of star four (in degrees). : (null)\n",
+      "stellar_type_1 : Set the stellar type of star 1 (internal index 0), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "stellar_type_2 : Set the stellar type of star 2 (internal index 1), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "stellar_type_3 : Set the stellar type of star 3 (internal index 2), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "stellar_type_4 : Set the stellar type of star 4 (internal index 3), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "max_stellar_type_1 : The maximum stellar type of star 1 (internal index 0). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value. \n",
+      " : (null)\n",
+      "max_stellar_type_2 : The maximum stellar type of star 2 (internal index 1). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.\n",
+      " : (null)\n",
+      "max_stellar_type_3 : The maximum stellar type of star 3 (internal index 2). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.\n",
+      " : (null)\n",
+      "max_stellar_type_4 : The maximum stellar type of star 4 (internal index 3). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.\n",
+      " : (null)\n",
+      "probability : The probability is a weighting applied to the star based on, say, the initial mass function. When running a grid of stars to simulate *all* stars, the summed probability of all the stars should be 1.0. : (null)\n",
+      "phasevol : The system's phase volume, used by binary_grid. : (null)\n",
+      "stellar_structure_algorithm : Set the stellar structure algorithm. 0=modified BSE (default), 1=none, 2=external function (must be defined by the calling code), 3=binary_c (not yet implemented). : (null)\n",
+      "solver : The type of solver. Default is the Forward-Euler (0), but could be RK2 (1), RK4 (2) or a predictor-corretor (3). : (null)\n",
+      "max_evolution_time : Set the maximum age for the stars (Myr). : (null)\n",
+      "max_model_number : Set the maximum number of models, ignored if 0 (default is 0). : (null)\n",
+      "monte_carlo_kicks : Turn on Monte-Carlo SN kicks. On (True) by default, and indeed other algorithms are probably broken. : (null)\n",
+      "disable_debug : Disables debug output. Only has an effect when DEBUG is 1, which probably requires a rebuild. Default FALSE. : (null)\n",
+      "timestep_logging : Turn on timestep logging (default is False). : (null)\n",
+      "rejects_in_log : Show timestep rejections in the main log (default is False). : (null)\n",
+      "vandenHeuvel_logging : Turn on van den Heuvel logging (default is False). : (null)\n",
+      "evolution_splitting : If True, turn on splitting of an evolutionary run if splitpoint (e.g. supernova) occurs. : (null)\n",
+      "disable_events : Whether to disable the new events code (defaults to False, so we use events by default)\n",
+      " : (null)\n",
+      "evolution_splitting_sn_eccentricity_threshold : Threshold eccentricity above which evolution splitting happens in a system with no SN kick. (0.01) : (null)\n",
+      "evolution_splitting_sn_n : Number of runs to split into when a SN occurs. : (null)\n",
+      "evolution_splitting_maxdepth : Max number of splits in an evolutionary run. : (null)\n",
+      "equation_of_state_algorithm : Set the equation of state algorithm. 0 = Paczynski. : (null)\n",
+      "opacity_algorithm : Set the opacity algorithm. 0 = Paczynski, 1 = Ferguson/Opal. : (null)\n",
+      "wind_mass_loss : Defines the algorithm used for stellar winds. 0 = none, 1 = Hurley et al. (2002), 2 = Schneider (2018). : 0\n",
+      "gbwind : Wind prescription for first red giant branch stars.  0=Reimers (Hurley et al 2000/2002; choose gb_reimers_eta=0.5 for their mass loss rate), 1=Schroeder+Cuntz 2005 (set gb_reimers_eta=1.0 for their mass loss rate). : (null)\n",
+      "mattsson_Orich_tpagbwind : Experimental : turns on Mattsson's TPAGB wind when the star is oxygen rich. Requires MATTSSON_MASS_LOSS. : (null)\n",
+      "magnetic_braking_factor : Multiplier for the magnetic braking angular momentum loss rate. : (null)\n",
+      "magnetic_braking_gamma : gamma factor in Rappaport style magnetic braking expression. : (null)\n",
+      "magnetic_braking_algorithm : Algorithm for the magnetic braking angular momentum loss rate. 0 = Hurley et al. 2002, 1 = Andronov, Pinnsonneault and Sills 2003, 2 = Barnes and Kim 2010  : (null)\n",
+      "helium_flash_mass_loss : Mass to be lost at the helium flash. : (null)\n",
+      "gb_reimers_eta : First red giant branch wind multiplication factor, cf. eta in Reimers' mass loss formula. (This multiplies the 4e-13 in Reimers' formula, or the 8e-14 in Schroeder and Cuntz.) : (null)\n",
+      "gbwindfac : Multiplier for the giant branch wind mass loss rate : (null)\n",
+      "tpagbwindfac : Multiplier for the TPAGB wind mass loss rate : (null)\n",
+      "eagbwindfac : Multiplier for the EAGB wind mass loss rate : (null)\n",
+      "nieuwenhuijzen_windfac : Multiplier for the Nieuwenhuijzen & de Jager wind mass loss rate : (null)\n",
+      "tpagbwind : Wind prescription during the TPAGB. 0=Karakas 2002 (a modified Vassiliadis and Wood 1993), 1=Hurley et al 2000/2002 (Vassiliadis and Wood 1993), 2=Reimers, 3=Bloecker, 4=Van Loon,  5=Rob's C-wind (broken?), 6,7=Vassiliadis and Wood 1993 (Karakas,Hurley variants respectively) when C/O>1, 8=Mattsson, 9 = Goldman et al. (2017), 10 = Beasor et al. (2020). : (null)\n",
+      "eagbwind : Wind prescription during the EAGB. 0=BSE (Hurley+2002, based on VW93), 1 = Goldman et al. (2017), 2 = Beasor et al. (2020). : (null)\n",
+      "wind_gas_to_dust_ratio : Gas to dust ratio used in wind calculations (e.g. Goldman et al. 2017). Typically 200 (Milky Way)-500 (Magellanic Clouds). Default is 200, approximately as in MW stars. : (null)\n",
+      "vwind_multiplier : Multiplier for the stellar wind velocity. : (null)\n",
+      "vwind_beta : Beta for stellar wind speed calculations, where vwind=sqrt(beta) * escape velocity. Default 0.125 (from BSE, Hurley et al. 2002).  : (null)\n",
+      "superwind_mira_switchon : In the Vassiliadis and Wood (1993) AGB wind prescription, the superwind is turned on at a given Mira period, usually 500 days. You can vary when this switch-on happens with this parameter. : (null)\n",
+      "vw93_mira_shift : In the Vassiliadis and Wood (1993) AGB wind prescription, the wind loss rate depends on the Mira period plus this offset. Requires VW93_MIRA_SHIFT. : (null)\n",
+      "vw93_multiplier : In the Vassiliadis and Wood (1993) AGB wind prescription, the wind loss rate is multiplied by this factor. Requires VW93_MULTIPLIER. : (null)\n",
+      "tpagb_reimers_eta : TPAGB Reimers wind multiplication factor, cf. eta in Reimers' mass loss formula. (This multiplies the 4e-13 in Reimers' formula, or the 8e-14 in Schroeder and Cuntz.) Note that Reimers is not the default TPAGB wind prescription. See also tpagbwind. : (null)\n",
+      "artificial_mass_accretion_rate%d : Constant mass accretion rate for star <n>. : (null)\n",
+      "artificial_angular_momentum_accretion_rate%d : Constant angular momentum accretion for star <n>. : (null)\n",
+      "artificial_orbital_angular_momentum_accretion_rate : Constant angular momentum accretion rate on the orbit. : (null)\n",
+      "artificial_accretion_start_time : Time at which artificial accretion stars. Ignored if <0 (default is -1). : (null)\n",
+      "artificial_accretion_end_time : Time at which artificial accretion ends. Ignored if <0 (default is -1). : (null)\n",
+      "wr_wind : Massive-star (WR) wind prescription. 0 = Hurley et al 2000/2002, 1=Maeder and Meynet, 2=Nugis and Lamers, 3=John Eldridge's version of Vink's early-2000s wind (See Lynnette Dray's thesis, or John Eldridge's thesis) : (null)\n",
+      "wr_wind_fac : Massive-star (WR) wind multiplication factor. : (null)\n",
+      "wrwindfac : Massive-star (WR) wind multiplication factor. Synonymous with wr_wind_fac (which you should use instead). : (null)\n",
+      "BH_prescription : Black hole mass prescrition: relates the mass of a newly formed black hole to its progenitor's (CO) core mass. 0=Hurley et al 2000/2002, 1=Belczynski (early 2000s). : (null)\n",
+      "PPISN_prescription : (Pulsational) Pair-Instability Supernova prescription: Relates initial helium core mass of star to whether the star undergoes PPISN or PISN. Requires PPISN flag to be True (see binary_c_parameters.h). 0=no ppisn, 1=Farmer et al 2019. : Ignore\n",
+      "sn_kick_distribution_II : Set the distribution of speeds applied to kick type II core collapse supernova systems. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_ECAP : Set the distribution of speeds applied to the remnants of electron-capture supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_NS_NS : Set the distribution of speeds applied to kick neutron stars and black holes that survive a NS-NS merger. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_IBC : Set the distribution of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_GRB_COLLAPSAR : Set the distribution of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova which is also a collapsar. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_TZ : Set the distribution of speeds applied to kick newly-born neutron stars and black holes at the death of a Thorne-Zytkow object. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_AIC_BH : Set the distribution of speeds applied to kick newly-born neutron stars black holes after accretion induced collapse of a neutron star. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_BH_BH : Set the distribution of speeds applied to black holes formed by the merger of two black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_BH_NS : Set the distribution of speeds applied to black holes formed by the merger of a neutron star and a black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_IA_Hybrid_HeCOWD : Set the distribution of speeds applied to any survivor of a hybrid He-COWD SNIa explosion. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_IA_Hybrid_HeCOWD_subluminous : Set the distribution of speeds applied to any survivor of a subluminous hybrid He-COWD SNIa explosion. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_PPISN : Set the distribution of speeds applied to PPISN supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_PISN : Set the distribution of speeds applied to PISN supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_PHDIS : Set the distribution of speeds applied to PHDIS supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_II : Set the dispersion of speeds applied to kick type II core collapse supernova systems. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_ECAP : Set the dispersion of speeds applied to the remnants of electron-capture supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_NS_NS : Set the dispersion of speeds applied to kick neutron stars and black holes that survive a NS-NS merger. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_IBC : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_GRB_COLLAPSAR : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova which is also a collapsar. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_TZ : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes at the death of a Thorne-Zytkow object. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_AIC_BH : Set the dispersion of speeds applied to kick newly-born neutron stars black holes after accretion induced collapse of a neutron star. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_BH_BH : Set the dispersion of speeds applied to black holes formed by the merger of two black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_BH_NS : Set the dispersion of speeds applied to black holes formed by the merger of a neutron star and a black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_IA_Hybrid_HeCOWD : Set the dispersion of speeds applied to the survivor of a SNIa explosion of a hybrid He-COWD. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_IA_Hybrid_HeCOWD_subluminous : Set the dispersion of speeds applied to the survivor of a subluminous SNIa explosion of a hybrid He-COWD. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_PPISN : Set the dispersion of speeds applied to the survivor of a PPISN supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_PISN : Set the dispersion of speeds applied to the survivor of a PISN supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_PHDIS : Set the dispersion of speeds applied to the survivor of a PHDIS supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_companion_IA_He : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia He supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_ELD : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia ELD (sub-Mch) supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_CHAND : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia Mch supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_AIC : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when an accretion induced collapse (supernova) occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_ECAP : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when an electron capture supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_He_Coal : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia helium merger supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_CHAND_Coal : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia Mch merger supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_NS_NS : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a neutron-star neutron-star merger. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_GRB_COLLAPSAR : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a GRB Collapsar (rapidly rotating SN Ibc) supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_HeStarIa : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a He-star Ia supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IBC : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a type Ib/c supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_II : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a type II supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IIa : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a type IIa supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_WDKICK : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a WD is kicked. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_TZ : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Thorne-Zytkow object is formed. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_AIC_BH : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a neutron star collapses to a black hole. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_BH_BH : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when two black holes merge. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_BH_NS : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a black hole merges with a neutron star. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_Hybrid_HeCOWD : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a hybrid He-COWD type Ia explosion. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_Hybrid_HeCOWD_subluminous : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a subluminous hybrid He-COWD type Ia explosion. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_PPISN : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a PPISN supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_PISN : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a PISN supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_PHDIS : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a PHDIS supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "wd_sigma : Set the speed at which white dwarfs are kicked when they form, in km/s. Default is zero (i.e. no kick). Requires WD_KICKS. : (null)\n",
+      "wd_kick_direction : Set the direction of white dwarf kicks. 0 = random, 1 = up, 2 = forward, 3 = backward, 4 = inward, 5 = outward. Requires WD_KICKS. : (null)\n",
+      "wd_kick_when : Decide when to kick a white dwarf. 0=at birth, 1=at first RLOF, 2=at given pulse number (see wd_kick_pulse_number), 3 at every pulse Requires WD_KICKS. : (null)\n",
+      "wd_kick_pulse_number : Apply a kick to a star at a desired pulse number on the TPAGB (i.e. pre-WD). Requires WD_KICKS. : (null)\n",
+      "minimum_helium_ignition_core_mass : Minimum helium core mass required to ignite helium in the case that the hydrogen envelope is stripped on the giant branch, e.g. to make an sdB or sdO star. Typically 0.4, if 0.0 then the BSE algorithm (based on the total mass) is used. : (null)\n",
+      "minimum_CO_core_mass_for_carbon_ignition : Minimum CO core mass for carbon ignition, assuming Mc,bagb>1.6Msun. Typically around 1.08Msun (Pols+1998). : (null)\n",
+      "minimum_CO_core_mass_for_neon_ignition : Minimum CO core mass for neon ignition. Typically around 1.42Msun. Stars that have cores that ignite carbon, but not neon explode in electon-capture supernovae. : (null)\n",
+      "minimum_mcbagb_for_nondegenerate_carbon_ignition : Minimum Mc,bagb (core mass at the base of the AGB) for non-degenerate carbon ignition. Typically around 2.25Msun (Pols+1998). : (null)\n",
+      "maximum_mcbagb_for_degenerate_carbon_ignition : Maximum Mc,bagb (core mass at the base of the AGB) for degenerate carbon ignition. Typically around 1.6Msun (Pols+1998). : (null)\n",
+      "max_neutron_star_mass : Maximum mass of a neutron star before it collapses to a black hole. Typically around 2Msun. : (null)\n",
+      "chandrasekhar_mass : The Chandrasekhar mass, usually 1.44Msun : (null)\n",
+      "delta_mcmin : A parameter to reduce the minimum core mass for third dredge up to occur on the TPAGB. As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. : (null)\n",
+      "lambda_min : A parameter to increase the efficiency of third dredge up on the TPAGB. The efficiency is lambda * lambda_mult, and setting lambda_min>0 implies that, once Mc>Mcmin (see delta_mcmin) lambda=Max(lambda(fit to Karakas), lambda_min). As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. See also lambda_multiplier. : (null)\n",
+      "lambda_multiplier : A parameter to increase the efficiency of third dredge up on the TPAGB. The efficiency is lambda * lambda_mult, and setting lambda_min>0 implies that, once Mc>Mcmin (see delta_mcmin) lambda=Max(lambda(fit to Karakas), lambda_min). As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. : (null)\n",
+      "minimum_envelope_mass_for_third_dredgeup : The minimum envelope mass for third dredge up on the TPAGB. Early, solar metallicity models by Straniero et al suggested 0.5Msun is typical. However, circumstantial evidence (Izzard et al 2009) as well as newer models by Stancliffe and Karakas suggest that at low metallicity a value nearer zero is more appropriate. : (null)\n",
+      "mass_of_pmz : The mass in the partial mixing zone of a TPAGB star, using the Karakas 2012 tables. Ask Carlo Abate for more details, or see the series of papers Abate et al 2012, 2013, 2014. Requires NUCSYN and USE_TABULAR_INTERSHELL_ABUNDANCES_KARAKAS_2012. : (null)\n",
+      "c13_eff : The \"efficiency\" of partial mixing in a TPAGB star intershell region, when using the s-process tables of Gallino, Busso, Lugaro et al. as provided by Maria Lugaro for the Izzard et al. 2009 paper. Requires NUCSYN and NUCSYN_S_PROCESS. : (null)\n",
+      "mc13_pocket_multiplier : Multiplies the mass in the partial mixing zone of a TPAGB star, when using the s-process tables of Gallino, Busso, Lugaro et al. as provided by Maria Lugaro for the Izzard et al. 2009 paper. Requires NUCSYN and NUCSYN_S_PROCESS. : (null)\n",
+      "tides_convective_damping : Tidal convective damping algorithm. 0=TIDES_HURLEY2002 Zahn 197x timescales + Hut, as in Hurley et al (2002), 1 = TIDES_ZAHN1989 : Zahn 1989 lambdas + Hut. : (null)\n",
+      "E2_prescription : Choose how to calculate the E2 structural parameter (used in tidal timescale calculations). 0=Hurley 1=Izzard (see Siess et al 2013). : (null)\n",
+      "dtfac : A parameter to decrease the timestep ONLY during the TPAGB phase. : (null)\n",
+      "hbbtfac : A parameter to modulate the temperature at the base of the hot-bottom burning zone in TPAGB stars. (Works only if NUCSYN is defined) : (null)\n",
+      "wind_multiplier_%d : Wind multiplier for the stellar type specified by the intger %d. By default these are all 1.0. : (null)\n",
+      "wind_type_multiplier_%d : Wind multiplier for different types of wind (MS, GB, AGB, WR, LBV, OTHER), given by the integer %d. By default these are all 1.0. : (null)\n",
+      "pre_main_sequence : Set to True to turn on pre-main sequence evolution. Currently this is not a special stellar type, rather the first (small) fraction of the main sequence has increased radii to match the Railton et al 2014 fits to Tout's pre-main sequence stars. Requires PRE_MAIN_SEQUENCE. See also pre_main_sequence_fit_lobes. : (null)\n",
+      "pre_main_sequence_fit_lobes : Set to True force a pre-main sequence star into its Roche lobe. This is done by artificially aging it. Requires PRE_MAIN_SEQUENCE : (null)\n",
+      "small_envelope_method : Choose the method used to determine the stellar radius when the envelope mass is very thin. 0 = Hurley et al. (2002), 1 = Miller Bertolami et al. (2016+) for GB and AGB stars only. : (null)\n",
+      "timestep_modulator : Multiplier applied to the global timestep. Requires TIMESTEP_MODULATION. : (null)\n",
+      "timestep_multiplier%d : Multiplier applied to timestep limit <n>. : (null)\n",
+      "maximum_timestep : The maximum timestep (MYr). : (null)\n",
+      "zoomfac_multiplier_decrease : When a timestep is rejected, decrease the timestep by this factor (0.5). : (null)\n",
+      "zoomfac_multiplier_increase : When a timestep is rejected, zooms, then succeeds, increase the timestep by this factor (1.2). : (null)\n",
+      "maximum_timestep_factor : The maximum factor between two subsequent timesteps (1.2). : (null)\n",
+      "maximum_nuclear_burning_timestep : The maximum timestep (MYr) in any nuclear burning phase. : (null)\n",
+      "nova_retention_method : Algorithm used to calculate the amount of mass retained during a nova explosion. 0=use nova_retention_fraction. (other methods pending) : (null)\n",
+      "MINT_metallicity : This sets the metallicity for MINT. It is ignored if set to -1.0, the default, in which case the normal metallicity parameter is used. : (null)\n",
+      "gaia_Teff_binwidth : log10(Effective temperature) bin width used to make Gaia-like HRDs\n",
+      " : (null)\n",
+      "gaia_L_binwidth : log10(luminosity) bin width used to make Gaia-like HRDs\n",
+      " : (null)\n",
+      "gaia_colour_transform_method : Use this to select the method used to transform to Gaia colours from other colour schemes. GAIA_CONVERSION_UBVRI_UNIVARIATE_JORDI2010 = 0 Jordi et al.'s univariate UBVRI fits, GAIA_CONVERSION_UBVRI_BIVARIATE_JORDI2010 = 1 Jordi et al.'s bivariate UBVRI fits, GAIA_CONVERSION_ugriz_UNIVARIATE_JORDI2010 = 2 Jordi et al.'s univariate UBVRI fits, GAIA_CONVERSION_ugriz_BIVARIATE_JORDI2010 = 3 Jordi et al.'s univariate ugriv fits, GAIA_CONVERSION_UBVRI_UNIVARIATE_EVANS2018 = 4 Evans et al. (2018, DR2) fits, GAIA_CONVERSION_ugriz_UNIVARIATE_EVANS2018 = 5 Evans et al. (2018, DR2) fits, GAIA_CONVERSION_UBVRI_RIELLO2020 = 6 Riello et al. (2020, DR3) fits, GAIA_CONVERSION_ugriz_RIELLO2020 = 7 Riello et al. (2020, DR3) fits. : (null)\n",
+      "rotationally_enhanced_mass_loss : Set to 1 to enable rotationally enhanced mass loss rate algorithms: 0= none, 1=formula cf. Langer models (=ROTATIONALLY_ENHANCED_MASSLOSS_LANGER_FORMULA), 2=limit accretion rate before wind loss is applied, 3 = both 1 and 2. See also rotationally_enhanced_exponent : (null)\n",
+      "AGB_core_algorithm : Algorithm to use for calculating AGB core masses. 0=Hurley et al. 2002 if no NUCSYN, Karakas 2002 if NUCSYN is defined; 1=Hurley et al. 2002 (overshooting models); 1=Karakas 2002 (non-overshooting models). : (null)\n",
+      "AGB_radius_algorithm : Algorithm to use for calculating radii on the TPAGB. : (null)\n",
+      "AGB_luminosity_algorithm : Algorithm to use for calculating luminosities on the TPAGB. : (null)\n",
+      "AGB_3dup_algorithm : Algorithm to use for calculating third dredge up efficiency on the TPAGB. : (null)\n",
+      "overspin_algorithm : Algorithm to determine what we do when a star is rotating at its breakup velocity. OVERSPIN_BSE (0) conservatively transfers the angular momentum back to the orbit. OVERSPIN_MASSLOSS uses the rotationally_enhanced_massloss parameter to lose mass which carries away the angular momentum. : (null)\n",
+      "rotationally_enhanced_exponent : The exponent (power) by which rotationally enhanced mass loss is raised. Requires ROTATIONALLY_ENHANCED_MASS_LOSS. See also rotationally_enhanced_mass_loss. : (null)\n",
+      "batchmode : Set the batchmode control variable. Use only if you know what you are doing! : (null)\n",
+      "speedtests : If True, turns on speedtests during version information (off by default). : (null)\n",
+      "use_fixed_timestep_%d : Set to True to use fixed timestep <n>, False to turn off. Fixed timesteps are on (this is True) by default. : (null)\n",
+      "task%d : Control tasks to be performed by binary_c. By default, these are all TRUE. For more information see binary_c_macros.h, particularly the BINARY_C_TASK_* macros. : (null)\n",
+      "orbiting_object : Usage: --orbiting_object mass,spinrate,central_object,period. : 1.0\n",
+      "orbiting_objects_log : If True, turn on orbiting-object log. : (null)\n",
+      "orbiting_objects_log : If True, turn on orbiting-object log. : (null)\n",
+      "orbiting_objects_wind_accretion_multiplier : Multiplier for wind accretion on orbiting objects. Hurley et al 2002 use 1.5, which is the default. : (null)\n",
+      "orbiting_objects_close_pc_threshold : How close are orbiting objects allowed to be? Set this to be the absolute percentage difference minimum. : (null)\n",
+      "orbiting_objects_tides_multiplier : Multiplier for tidal torques on orbiting objects. : (null)\n",
+      "evaporate_escaped_orbiting_objects : If True, evaporate orbiting objects that have escaped the system. : (null)\n",
+      "RLOF_transition_objects_escape : If True, objects that escape their Roche lobe are ejected from the system, otherwise they are placed just outside the minimum stable orbit. : (null)\n",
+      "PN_resolve : If True, the timestep will be shortened to resolve better the PN phase (FALSE). : (null)\n",
+      "PN_resolve_minimum_luminosity : The luminosity above which extra time resolution for PNe is applied (see PN_resolve). : (null)\n",
+      "PN_resolve_maximum_envelope_mass : The envelope mass below which extra time resolution for PNe is applied (see PN_resolve). : (null)\n",
+      "PN_resolve_minimum_effective_temperature : The minimum effective temperature above which extra time resolution for PNe is applied (see PN_resolve). : (null)\n",
+      "PN_fast_wind : If True, thin-envelope PNe will have fast winds (FALSE). : (null)\n",
+      "PN_fast_wind_dm_GB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_GB) : (null)\n",
+      "PN_fast_wind_mdot_GB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_GB) : (null)\n",
+      "PN_fast_wind_dm_AGB : The envelope mass below which fast wind used during the AGB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_AGB) : (null)\n",
+      "PN_fast_wind_mdot_AGB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_AGB) : (null)\n",
+      "HeWD_HeWD_ignition_mass : HeWD-HeWD mergers above this mass reignite helium. (0.3) : (null)\n",
+      "wind_Nieuwenhuijzen_luminosity_lower_limit : Above this luminosity we activate the Nieuwenhuijzen and de Jager wind (4e3 Lsun). : (null)\n",
+      "wind_LBV_luminosity_lower_limit : Above this luminosity we activate the LBV wind (6e5 Lsun). : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Binary\n",
+      "############################################################\n",
+      "separation : Set the orbital separation (actually the semi-major axis) of the binary (internal index 0, stellar indices 0 and 1) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)\n",
+      "separation_triple : Set the orbital separation (actually the semi-major axis) of the triple (internal index 1) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)\n",
+      "separation_quadruple : Set the orbital separation (actually the semi-major axis) of the quadruple (internal index 2) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)\n",
+      "orbital_period : Set the initial orbital period of the binary, stars 1 and 2 (internal indices 0 and 1) in days. See also separation. : (null)\n",
+      "orbital_period_triple : Set the initial orbital period of the triple in days. See also separation. : (null)\n",
+      "orbital_period_quadruple : Set the orbital period of the outer binary in a quadrulple (stars 3 and 4, internal indices 2 and 3) in days. See also separation. : (null)\n",
+      "eccentricity : Set the initial eccentricity of the binary orbit (stars 1 and 2, internal indices 0 and 1). : (null)\n",
+      "eccentricity_triple : Set the initial eccentricity of the triple orbit. : (null)\n",
+      "eccentricity_quadruple : Set the initial eccentricity of the outer binary of a quadruple (stars 3 and 4, internal indices 2 and 3). : (null)\n",
+      "incliniation : Set the initial orbital_inclination of the binary relative to zero. : (null)\n",
+      "incliniation_triple : Set the initial orbital_inclination of the triple orbit relative to zero. : (null)\n",
+      "incliniation_quadruple : Set the initial orbital_inclinationy of the quadruple orbit relative to zero. : (null)\n",
+      "orbital_phase : Set the initial orbital phase of the binary orbit. : (null)\n",
+      "orbital_phase_triple : Set the initial orbital phase of the triple orbit. : (null)\n",
+      "orbital_phase_quadruple : Set the initial orbital phase of the quadruple orbit. : (null)\n",
+      "argument_of_periastron : Set the initial argument of periastron of the binary orbit. : (null)\n",
+      "argument_of_periastron_triple : Set the initial argument of periastron of the triple orbit. : (null)\n",
+      "argument_of_periastron_quadruple : Set the initial argument of periastron of the quadruple orbit. : (null)\n",
+      "disc_timestep_factor : Factor that multiplies the natural timestep of a disc. : (null)\n",
+      "white_dwarf_cooling_model : White dwarf cooling model, relates age to luminosity. WHITE_DWARF_COOLING_MESTEL = 0 is Mestel's model, WHITE_DWARF_COOLING_MESTEL_MODIFIED = 1 is Hurley's modified Mestel model, WHITE_DWARF_COOLING_CARRASCO2014 = 2 is based on Carrasco (2014) tables.   : (null)\n",
+      "white_dwarf_radius_model : White dwarf radius model, radius to mass (and perhaps age). WHITE_DWARF_RADIUS_NAUENBERG1972 = 0 Nauenberg (1972), WHITE_DWARF_RADIUS_MU = 1 mu-dependent variant, WHITE_DWARF_RADIUS_CARRASCO2014 = 2 is based on Carrasco (2014) tables. : (null)\n",
+      "cbdisc_mass_loss_inner_viscous_accretion_method : Chooses where the mass that is accreted from the inner edge of a circumbinary disc goes, i.e. to which star. 0 = Young and Clarke 2015, 1 = Gerosa et al 2015, 2 = 50:50 (i.e. not dependence on mass). : (null)\n",
+      "cbdisc_inner_edge_stripping : If True, allow inner edge mass stripping. : (null)\n",
+      "cbdisc_end_evolution_after_disc : If True, stop evolution when a disc evaporates. : (null)\n",
+      "cbdisc_no_wind_if_cbdisc : If True, disable stellar winds when there is a circumbinary disc. : (null)\n",
+      "cbdisc_outer_edge_stripping : If True, allow outer edge mass stripping. : (null)\n",
+      "disc_n_monte_carlo_guesses : Number of monte carlo guesses to try in the disc solver if the normal list of guesses fails (0). : (null)\n",
+      "disc_log : If 1, turn on the disc log. Requires DISC_LOG to be defined on build. : (null)\n",
+      "disc_log2d : If 1, turn on the 2d disc log. Requires DISC_LOG to be defined on build. : (null)\n",
+      "disc_log_dt : If non-zero, only allows disc log output every disc_log_dt Myr. : (null)\n",
+      "disc_log_directory : Directory into which disc logging is sent (must exist!). : /tmp/\n",
+      "post_ce_adaptive_menv : If TRUE, and if post_ce_objects_have_envelopes is TRUE, then the envelope mass of a post-CE star is such that it sits just inside its Roche lobe. If FALSE then a fixed (thin) envelope mass is applied that depends on the stellar type (see macros POST_CE_ENVELOPE_DM_GB, POST_CE_ENVELOPE_DM_EAGB and POST_CE_ENVELOPE_DM_TPAGB). : (null)\n",
+      "post_ce_objects_have_envelopes : If TRUE then post-common-envelope objects have thin envelopes. You need this if you are to have post-CE post-AGB stars. Note that this *may* be unstable, i.e. you may end up having many CEEs. The mass in the envelope is controlled by post_ce_adaptive_menv. TRUE by default. : (null)\n",
+      "PN_comenv_transition_time : post-common envelope transition time in years (1e2).  This is the time taken to move from CEE ejection to Teff > 30e4 K. Hall et al. (2013) suggest ~100 years. : (null)\n",
+      "minimum_time_between_PNe : The minimum time (Myr) between planetary nebula detections. This prevents multiple, fast common envelopes triggering two PNe (0.1). : (null)\n",
+      "PN_Hall_fading_time_algorithm : In stars with low mass (<0.45Msun) cores, you can choose to set the PN fading time to either the minimum (PN_HALL_FADING_TIME_ALGORITHM_MINIMUM) or maximum (PN_HALL_FADING_TIME_ALGORITHM_MAXIMUM) as shown in Fig. 6 of Hall et al. (2013). : (null)\n",
+      "PPN_envelope_mass : Desired pre-planetary nebula (post-AGB) envelope mass. : (null)\n",
+      "cbdisc_eccentricity_pumping_method : Select from various eccentricity-pumping methods when there is a circumbinary disc. Requires DISCS. 0 = off. : (null)\n",
+      "cbdisc_viscous_photoevaporative_coupling : Set to 1 to turn on viscous-photoevaporative coupling in circumbinary discs. Requires DISCS. 0 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_NONE = off, 1 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_INSTANT instant, 2 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_VISCOUS slow, viscous wind. : (null)\n",
+      "cbdisc_inner_edge_stripping_timescale : Defines the timescale for mass loss from by inner edge stripping. 0 = instant, 1 = very long, 2 = viscous at Revap_in, 3 = orbital at Revap_in. : (null)\n",
+      "cbdisc_outer_edge_stripping_timescale : Defines the timescale for mass loss from by outer edge stripping. 0 = instant, 1 = very long, 2 = viscous at Revap_in, 3 = orbital at Revap_out. : (null)\n",
+      "cbdisc_viscous_L2_coupling : Set to 1 to turn on viscous-L2-loss coupling in circumbinary discs. Requires DISCS. 0 = off. : (null)\n",
+      "gravitational_radiation_model : Model for gravitational radiation from the system. 0=Hurley et al 2002 (Landau and Lifshitz 1951). 1 = as 0 but only when there is no RLOF. 2 = none. : (null)\n",
+      "nova_irradiation_multiplier : Multiplier for nova-radiative induced mass loss. (Shara+1986) : (null)\n",
+      "gravitational_radiation_modulator_J : Modulator for gravitational wave radiation angular momentum loss rate (1.0). : (null)\n",
+      "gravitational_radiation_modulator_e : Modulator for gravitational wave radiation eccentricity pumping rate (1.0). : (null)\n",
+      "nova_faml_multiplier : Nova friction-induced angular momentum loss multiplier. (Shara+1986) : (null)\n",
+      "RLOF_angular_momentum_transfer_model : Choose angular momentum transfer model in RLOF. 0=BSE (with discs), 1=conservative : (null)\n",
+      "post_SN_orbit_method : Method by which the post-SN orbit is calculated. 0=BSE, 1=Tauris&Taken 1998. : (null)\n",
+      "multiplicity : Multiplicity: 1=single star, 2=binary, 3=triple, 4=quadruple. : (null)\n",
+      "accretion_limit_eddington_steady_multiplier : Steady accretion is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_steady_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)\n",
+      "accretion_limit_eddington_LMMS_multiplier : Accretion from a low-mass, convective, main_sequence star is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_LMMS_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)\n",
+      "accretion_limit_eddington_WD_to_remnant_multiplier : Accretion from a WD onto a remnant star (e.g. another white dwarf, neutron star or black hole) is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_WD_to_remnant_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)\n",
+      "accretion_limit_thermal_multiplier : Mass transfer onto a MS, HG or CHeB star is limited by the accretor's thermal rate times this multiplier. : (null)\n",
+      "accretion_limit_dynamical_multiplier : Mass transfer is limited by the accretor's dynamical rate times this multiplier. : (null)\n",
+      "donor_limit_envelope_multiplier : Mass transfer by RLOF is limited by this fraction of the donor's envelope mass per timestep : (null)\n",
+      "donor_limit_thermal_multiplier : Mass transfer by RLOF is limited by the accretor's thermal rate times this multiplier. : (null)\n",
+      "donor_limit_dynamical_multiplier : Mass transfer by RLOF is limited by the donor's dynamical rate times this multiplier. : (null)\n",
+      "Bondi_Hoyle_accretion_factor : Wind accretion rate, as calculated by the Bondi-Hoyle-Littleton formula, multiplcation factor. Hurley et al 2002 use 1.5, which is the default. : (null)\n",
+      "tidal_strength_factor : A modulator for the tidal strength. If this factor > 1 then tides are stronger, i.e. tidal timescales are reduced. : (null)\n",
+      "hachisu_qcrit : Critical q=Maccretor/Mdonor above which Hachisu's disk wind turns on. : (null)\n",
+      "hachisu_disk_wind : Set to True to turn on Hachisu's disk wind when material accretes too fast onto a white dwarf. This helps to make more SNeIa. See also hachisu_qcrit. : (null)\n",
+      "mass_accretion_for_eld : The mass that must be accreted onto a COWD for it to ignite as an edge-lit detonation SNIa. : (null)\n",
+      "WDWD_merger_algorithm : Algorithm to be used when merging two white dwarfs. 0 = Hurley et al. (2002), 1 = Perets+ (2019), 2 = Chen+ (2016, todo)  : (null)\n",
+      "type_Ia_MCh_supernova_algorithm : Algorithm to be used when calculating type Ia yields from Chandrasekhar-mass exploders. 0 = DD7 (Iwamoto 1999), 1 = Seitenzahl 2013 3D hydro yields (you must also set Seitenzahl2013_model)  : (null)\n",
+      "Seitenzahl2013_model : Which of Seitenzahl et al. 2013's models to use? One of N1,N3,N5,N10,N20,N40,N100L,N100,N100H,N150,N200,N300C,N1600,N1600C,N100_Z0.5,N100_Z0.1,N100_Z0.01 (defaults to N100). : N1\n",
+      "type_Ia_sub_MCh_supernova_algorithm : Algorithm to be used when calculating type Ia yields from sub-Chandrasekhar-mass exploders. (Currently unused.) : (null)\n",
+      "max_HeWD_mass : The maximum mass a HeWD can have before it ignites helium (0.7). : (null)\n",
+      "merger_mass_loss_fraction : Fraction of the total mass which is lost when stars merge. : (null)\n",
+      "merger_angular_momentum_factor : When two stars merge the resulting single star retains a fraction of the total system angular momentum (or the critical spin angular momentum, if it is smaller) multiplied by this factor. : (null)\n",
+      "wind_angular_momentum_loss : Prescription for losing angular momentum in a stellar wind. 0=Hurley et al 2002 ('Tout') prescription, 1=lw i.e. a factor multiplying the specific orbital angular momentum, 2=lw hybrid for fast winds. Set wind_djorb_fac to the desired factor.. : (null)\n",
+      "wind_djorb_fac : Factor multiplying angular momentum loss in a stellar wind when wind_angular_momentum_loss=0 (the Tout/Hurley et al 2002 prescription). See wind_angular_momentum_loss. : (null)\n",
+      "lw : Factor multiplying angular momentum loss in a stellar wind when wind_angular_momentum_loss=1,2 (the 'lw' prescription). See wind_angular_momentum_loss. : (null)\n",
+      "VW93_EAGB_wind_speed : Activate this to use Vassiliadis and Wood (1993) wind speed during the EAGB. : (null)\n",
+      "VW93_TPAGB_wind_speed : Activate this to use Vassiliadis and Wood (1993) wind speed during the EAGB. : (null)\n",
+      "use_periastron_Roche_radius : Set this to True to use the Roche lobe radius at periastron, rather than (the default to) assume a circular orbit. This will be useful one day when we treat RLOF in eccentric orbits properly, hopefully. : (null)\n",
+      "qcrit_LMMS : Apply critical q=Mdonor/Maccretor value for low-mass main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_MS : Apply critical q=Mdonor/Maccretor value for (non-low mass) main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HG : Apply critical q=Mdonor/Maccretor value for Hertzsprung gap stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_GB : Apply critical q=Mdonor/Maccretor value for first red giant branch stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_CHeB : Apply critical q=Mdonor/Maccretor value for core helium burning stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_EAGB : Apply critical q=Mdonor/Maccretor value for early-AGB stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_TPAGB : Apply critical q=Mdonor/Maccretor value for TP-AGB stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeMS : Apply critical q=Mdonor/Maccretor value for helium main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeHG : Apply critical q=Mdonor/Maccretor value for helium Hertzsprung gap stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeGB : Apply critical q=Mdonor/Maccretor value for helium red giant stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeWD : Apply critical q=Mdonor/Maccretor value for helium white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_COWD : Apply critical q=Mdonor/Maccretor value for carbon-oxygen white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_ONeWD : Apply critical q=Mdonor/Maccretor value for oxygen-neon white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_NS : Apply critical q=Mdonor/Maccretor value for neutron stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_BH : Apply critical q=Mdonor/Maccretor value for black holes to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_LMMS : Apply critical q=Mdonor/Maccretor value for (low mass) main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_MS : Apply critical q=Mdonor/Maccretor value for (non-low mass) main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HG : Apply critical q=Mdonor/Maccretor value for Hertzsprung gap stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_GB : Apply critical q=Mdonor/Maccretor value for first red giant branch stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_CHeB : Apply critical q=Mdonor/Maccretor value for core helium burning stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_EAGB : Apply critical q=Mdonor/Maccretor value for early-AGB stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_TPAGB : Apply critical q=Mdonor/Maccretor value for TP-AGB stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeMS : Apply critical q=Mdonor/Maccretor value for helium main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeHG : Apply critical q=Mdonor/Maccretor value for helium Hertzsprung gap stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeGB : Apply critical q=Mdonor/Maccretor value for helium red giant stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeWD : Apply critical q=Mdonor/Maccretor value for helium white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_COWD : Apply critical q=Mdonor/Maccretor value for carbon-oxygen white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_ONeWD : Apply critical q=Mdonor/Maccretor value for oxygen-neon white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_NS : Apply critical q=Mdonor/Maccretor value for neutron stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_BH : Apply critical q=Mdonor/Maccretor value for black holes to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "mass_for_Hestar_Ia_upper : Only helium stars below this mass can explode as SNIa. Default is zero, i.e. it never happens. See also mass_for_Hestar_Ia_lower. : (null)\n",
+      "mass_for_Hestar_Ia_lower : Only helium stars above this mass can explode as SNIa. Default is zero, i.e. it never happens. See also mass_for_Hestar_Ia_upper. : (null)\n",
+      "alphaCB : Circumbinary disk viscosity parameter, alpha. : (null)\n",
+      "minimum_donor_menv_for_comenv : Minimum donor envelope mass for common envelope evolution to be triggered (Msun). Default 0. : (null)\n",
+      "comenv_prescription : Use this to choose which common envelope prescription you should use. 0=Hurley et al 2002 (based on the Paczyński energy model) or 1=Nelemans and Tout (angular momentum model). See also alpha_ce, comenv_ms_accretion_mass, comenv_ms_accretion_fraction, comenv_ns_accretion_fraction, comenv_ns_accretion_mass, nelemans_gamma, nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs, lambda_ce, lambda_ionisation. : (null)\n",
+      "comenv_prescription%d : Use this to choose which common envelope prescription you should use. 0=Hurley et al 2002 (based on the Paczyński energy model) or 1=Nelemans and Tout (angular momentum model). See also alpha_ce, comenv_ms_accretion_mass, comenv_ms_accretion_fraction, comenv_ns_accretion_fraction, comenv_ns_accretion_mass, nelemans_gamma, nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs, lambda_ce, lambda_ionisation. : (null)\n",
+      "comenv_ejection_spin_method : When a common envelope is ejected, we need to decide how fast the stars are left spinning. COMENV_EJECTION_SPIN_METHOD_DO_NOTHING (0) is the default, this just leaves the stars/stellar cores spinning with the same spin rate (omega = angular velocity) with which they entered the common envelope phase. COMENV_EJECTION_SPIN_METHOD_SYCHRONIZE instead tidally synchronizes the stars with their new orbital angular velocity. : (null)\n",
+      "comenv_merger_spin_method : When a common envelope binary merges, we need to decide how fast the resulting single star is left spinning. COMENV_MERGER_SPIN_METHOD_SPECIFIC (0) is the default, this preserves angular momentum but limits the specific angular momentum of the merged star to the specific angular momentum of the system at the onset of common envelope evolution. COMENV_MERGER_SPIN_METHOD_CONSERVE_ANGMOM (1) sets the merger's angular momentum to be that of the system at the onset of common envelope evolution (which means the star may be rotating supercritically). COMENV_MERGER_SPIN_METHOD_CONSERVE_OMEGA (2) sets the spin rate (angular frequency = omega) of the merged star to be that of the orbit just at the onset of common envelope evolution. : (null)\n",
+      "comenv_ms_accretion_mass : Experimental. During common envelope evolution, a main sequence star may accrete some of the envelope's mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_fraction. : (null)\n",
+      "comenv_ms_accretion_fraction : Experimental. During common envelope evolution, a main sequence may accrete a fraction of the envelope's mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_mass. : (null)\n",
+      "comenv_ns_accretion_mass : Experimental. During common envelope evolution, a neutron star may accrete some of the envelope's mass. Requires COMENV_NS_ACCRETION. See also comenv_ns_accretion_fraction. : (null)\n",
+      "comenv_ns_accretion_fraction : Experimental. During common envelope evolution, a neutron star may accrete a fraction of the envelope's mass. Requires COMENV_NS_ACCRETION. See also comenv_ns_accretion_mass. : (null)\n",
+      "alpha_ce : Common envelope energy formalism parameter. A fraction alpha of the orbital energy is used to eject the envelope. See Hurley et al 2002 for details. : (null)\n",
+      "alpha_ce%d : Common envelope energy formalism parameter. A fraction alpha of the orbital energy is used to eject the envelope. See Hurley et al 2002 for details. : (null)\n",
+      "lambda_ce : Common envelope parameter. The binding energy of the common envelope is G*M*Menv/(lambda*R). Typically this is taken to be 0.5, but if set to -1 binary_c uses the Dewi and Tauris fits instead, -2 uses the formalism of Wang, Jia and Li (2016) and if -3 then a polytropic formalism is used (see also comenv_splitmass). : (null)\n",
+      "lambda_ce%d : Common envelope parameter. The binding energy of the common envelope is G*M*Menv/(lambda*R). Typically this is taken to be 0.5, but if set to -1 binary_c uses the Dewi and Tauris fits instead, -2 uses the formalism of Wang, Jia and Li (2016) and if -3 then a polytropic formalism is used (see also comenv_splitmass). : (null)\n",
+      "comenv_splitmass : When lambda_ce=-2, the envelope binding energy, lambda, is calculated using a polytropic formalism. The comenv_splitmass defines the point, in the units of the core mass, above which material is ejected. : (null)\n",
+      "nelemans_recalc_eccentricity : If True, recalculate the eccentricity after angular momentum is removed.  : (null)\n",
+      "comenv_post_eccentricity : Eccentricity remaining after common envelope ejection. : (null)\n",
+      "nelemans_gamma : Set the fraction of the orbital specific angular momentum that is used to eject the common envelope according to the Nelemans and Tout prescription. See also nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs. : (null)\n",
+      "nelemans_minq : Only activate the Nelemans and Tout common envelope prescription for q>nelemans_minq. See also nelemans_gamma, nelemans_max_frac_j_change, nelemans_n_comenvs. : (null)\n",
+      "nelemans_max_frac_j_change : Maximum fractional angular momentum change in the Nelemans and Tout common envelope prescription. See also nelemans_gamma, nelemans_minq, nelemans_n_comenvs. : (null)\n",
+      "nelemans_n_comenvs : Set the maximum number of common envelope ejections allowed to follow the Nelemans and Tout prescription, after which the standard alpha prescription is used. : (null)\n",
+      "lambda_ionisation : A fraction lambda_ionisation of the recombination energy in the common envelope goes into ejecting the envelope. This is usually 0.0, but a positive value can make a big difference to the outcome of common envelope evolution. : (null)\n",
+      "lambda_ionisation%d : A fraction lambda_ionisation of the recombination energy in the common envelope goes into ejecting the envelope. This is usually 0.0, but a positive value can make a big difference to the outcome of common envelope evolution. : (null)\n",
+      "lambda_enthalpy : A fraction of the enthalpy to be included in the common envelope evolution binding energy. Only used for the Wang 2016 prescription (so far). : (null)\n",
+      "lambda_enthalpy%d : A fraction of the enthalpy to be included in the common envelope evolution binding energy. Only used for the Wang 2016 prescription (so far). : (null)\n",
+      "cbdisc_albedo : Circumbinary-disc albedo. Requires DISCS. : (null)\n",
+      "cbdisc_gamma : Circumbinary disc gamma (equation of state) parameter. Requires DISCS. : (null)\n",
+      "cbdisc_alpha : Circumbinary disc alpha (viscosity) parameter. Requires DISCS. : (null)\n",
+      "cbdisc_kappa : Circumbinary disc kappa (opacity) parameter. Requires DISCS. : (null)\n",
+      "cbdisc_minimum_evaporation_timescale : Circumbinary disc minimum evaporation timescale (years). If (slow, not edge stripped) mass loss would evaporate the disc on a timescale less than this, simply evaporate the disc immediated. Usually set to 1y, ignore if zero. Requires DISCS. : (null)\n",
+      "cbdisc_torquef : Circumbinary disc binary torque multiplier. Requires DISCS. : (null)\n",
+      "cbdisc_max_lifetime : Circumbinary disc maximum lifetime (years, ignored if 0). Requires DISCS. : (null)\n",
+      "cbdisc_init_dM : On cbdisc start, reduce mass by a fraction dM if it won't converge. Requires DISCS. : (null)\n",
+      "cbdisc_init_dJdM : On cbdisc start, reduce angular momentum by a fraction dJ/dM*dM if it won't converge. Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_constant_rate : Circumbinary disc constant mass loss rate (Msun/year). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_FUV_multiplier : Circumbinary disc FUV mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_Xray_multiplier : Circumbinary disc X-ray mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_ISM_ram_pressure_multiplier : Circumbinary disc interstellar medium ram pressure stripping mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_ISM_pressure : Circumbinary disc interstellar medium ram pressure in units of Boltzmann constant per Kelvin (I think...). Requires DISCS. Typically 3000.0. See e.g. http://www.astronomy.ohio-state.edu/~pogge/Ast871/Notes/Intro.pdf page 15 or https://arxiv.org/pdf/0902.0820.pdf Fig. 1 (left panel). : (null)\n",
+      "cbdisc_mass_loss_inner_viscous_multiplier : Circumbinary disc inner edge viscous mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_inner_viscous_angular_momentum_multiplier : Circumbinary disc inner edge viscous angular momentum multiplier (no units). The inner edge angular momentum Requires DISCS. : (null)\n",
+      "cbdisc_resonance_multiplier : Circumbinary disc resonant interaction multiplier, affects eccentricity pumping and angular momentum rates. Requires DISCS. : (null)\n",
+      "cbdisc_resonance_damping : Circumbinary disc resonant interaction damping: should be on (True) to damp the l=1, m=2 resonance when the disc inner edge lies outside the resonance location. Requires DISCS. : (null)\n",
+      "cbdisc_fail_ring_inside_separation : If True, while converging on a structure, circumbinary discs with Rring < the binary separation are immediately failed. : (null)\n",
+      "cbdisc_mass_loss_inner_L2_cross_multiplier : Circumbinary disc inner edge L2-crossing mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_minimum_luminosity : Circumbinary disc minimum luminosity. If the disc becomes dimmer than this, the disc is evaporated instantly. Requires DISCS. : (null)\n",
+      "cbdisc_minimum_mass : Circumbinary disc minimum mass. If the disc becomes less massive than this, the disc is evaporated instantly. Requires DISCS. : (null)\n",
+      "cbdisc_minimum_fRing : Circumbinary disc minimum fRing. If the disc becomes a ring, and fRing = |Rout/Rin-1| < this value (and this value is non-zero), the disc is evaporated instantly. Requires DISCS. : (null)\n",
+      "comenv_disc_angmom_fraction : If >0 Fraction of the common envelope's angular momentum that goes into the circumbinary disc. If -1 then uses the moments of inertia to calculate (deprecated), if -2 use the common envelope's specific angular momentum, if -3 uses the L2 point at the end of the common envelope to set the angular momentum. Requires DISCS and DISCS_CIRCUMBINARY_FROM_COMENV. : (null)\n",
+      "comenv_disc_mass_fraction : Fraction of the common envelope's mass that goes into the circumbinary disc. Requires DISCS and DISCS_CIRCUMBINARY_FROM_COMENV. : (null)\n",
+      "wind_disc_angmom_fraction : If >0 Fraction of the wind envelope's angular momentum that goes into the circumbinary disc. If -1 then uses the L2 point's specific angular momentum. Requires DISCS and DISCS_CIRCUMBINARY_FROM_WIND. : (null)\n",
+      "wind_disc_mass_fraction : Fraction of the stellar wind's mass that goes into the circumbinary disc. Requires DISCS and DISCS_CIRCUMBINARY_FROM_WIND. : (null)\n",
+      "WRLOF_method : Choose whether and how to apply wind-Roche-lobe-overflow. 0=none, 1=q-dependent, 2=quadratic See Abate et al 2013/14 for details. Requires WRLOF_MASS_TRANSFER. : (null)\n",
+      "minimum_timestep : The minimum timestep (Myr). : (null)\n",
+      "timestep_solver_factor : Factor applied in timestep_limits, e.g. to prevent X changing too fast by comparing to X/dX/dt, which is usually 1 but can be higher to lengthen timesteps when using an alternative solver. : (null)\n",
+      "RLOF_mdot_factor : Multiplier applied to the mass transfer rate during Roche-lobe overflow. Requires RLOF_MDOT_MODULATION. : (null)\n",
+      "RLOF_f : Factor to enlarge a Roche lobe, nominally because of radiation pressure (see Dermine et al paper). Requires RLOF_RADIATION_CORRECTION. : (null)\n",
+      "minimum_separation_for_instant_RLOF : If True, instead of evolving the system just report the minimum separation (on the zero-age main sequence) that would lead to instant RLOF. Used by binary_grid. See also minimum_orbital_period_for_instant_RLOF and maximum_mass_ratio_for_instant_RLOF. : (null)\n",
+      "minimum_orbital_period_for_instant_RLOF : If True, instead of evolving the system just report the minimum orbital period (on the zero-age main sequence) that would lead to instant RLOF. Used by binary_grid. See also minimum_separation_for_instant_RLOF and maximum_mass_ratio_for_instant_RLOF. : (null)\n",
+      "maximum_mass_ratio_for_instant_RLOF : If True, instead of evolving the system just report the maximum mass ratio (on the zero-age main sequence) that would lead to instant RLOF, given M1 and orbital period. Used by binary_grid. See also minimum_separation_for_instant_RLOF and minimum_orbital_period_for_instant_RLOF. : (null)\n",
+      "RLOF_method : Use RLOF_method to choose the algorithm you use for Roche-lobe overflow mass loss rate calculations. 0=Hurley et al 2002, 1=Adaptive (for radiative stars) R=RL method, 2=Ritter (probably broken), 3=Claeys etal 2014 variant on Hurley et al 2002. : (null)\n",
+      "RLOF_interpolation_method : When a star overflows its Roche lobe, it always has R>RL because of the limited time resolution of the simulation. Binary_c then uses an algorithm to get back to when R~RL (within a desired tolerance, set in RLOF_ENTRY_THRESHOLD which is usually 1.02, i.e. overflow of 2%). You can choose algorithm 0, the Hurley et al 2002 method which reverses time (i.e. uses a Newton-like scheme), or 1 to use the binary_c method which rejects a timestep (and hence does no logging on that timestep) and repeats with half the timestep until R~RL. The latter is now the default, because this means there are no negative timesteps which break various other algorithms (e.g. nucleosynthesis). : (null)\n",
+      "nova_retention_fraction : The mass accreted during a nova as fraction of mass transferred : (null)\n",
+      "beta_reverse_nova : The fraction of mass ejected in a nova explosion which is accreted back onto the companion star. Set to -1 to automatically calculate based on a geometric argument, or 0 or positive to set the value. : (null)\n",
+      "WD_accretion_rate_novae_upper_limit_hydrogen_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is hydrogen rich : above this rate the mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_novae_upper_limit_helium_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is helium rich : above this rate the mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_novae_upper_limit_other_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is neither hydrogen nor helium rich : above this rate the mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_new_giant_envelope_lower_limit_hydrogen_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope with a hydrogen-rich donor. Below this mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_new_giant_envelope_lower_limit_helium_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope with a helium-rich donor. Below this mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_new_giant_envelope_lower_limit_other_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope when the donor is neither hydrogen nor helium rich. Below this mass transfer leads to stable burning. : (null)\n",
+      "CRAP_parameter : Tidally enhanced mass loss parameter. See Tout and Eggleton's paper on the subject. (Was the parameter bb). : (null)\n",
+      "individual_novae : If individual_novae is True, novae are resolved such that each explosion is performed separtaely. : (null)\n",
+      "nova_timestep_accelerator_num : The nova timestep is accelerated if the nova number exceeds nova_timestep_accelerator_num. If zero or negative, acceleration is off. See also nova_timestep_accelerator_index and nova_timestep_accelerator_max. Only used if individual_novae is on.\n",
+      " : (null)\n",
+      "nova_timestep_accelerator_index : The index at which the nova timestep is accelerated. A larger value gives longer timesteps. See also nova_timestep_accelerator_num and nova_timestep_accelerator_max. Only used if individual_novae is on.\n",
+      " : (null)\n",
+      "nova_timestep_accelerator_max : The nova timestep is accelerated by a factor that is capped at nova_timestep_accelerator_max. This parameter is ignored if it is zero or negative. See also nova_timestep_accelerator_num and nova_timestep_accelerator_index. Only used if individual_novae is on.\n",
+      " : (null)\n",
+      "nonconservative_angmom_gamma : Mass lost from the system (but NOT from a stellar wind) takes a fraction gamma of the orbital angular momentum with it. Set to -1 to take the specific angular momentum of the donor star. Set to -2 to take super-Eddington, nova and disk-wind angular momenta as if a wind from the accretor. : (null)\n",
+      "max_stellar_angmom_change : Maxmimum fractional change in stellar angular momentum allowed before a timestep is rejected (0.05). : (null)\n",
+      "comenv_ms_accretion_mass : Experimental. During common envelope evolution, a main sequence star may accrete some of the envelope's mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_fraction. : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Nucsyn\n",
+      "############################################################\n",
+      "third_dup : If True, enables third dredge up. Requires NUCSYN and NUCSYN_THIRD_DREDGE_UP. : (null)\n",
+      "third_dup_multiplier : Usage: --third_dup_multiplier <i> <f>. Multiplies the abundance of element <i> by <f> during third dredge up. : 1.0\n",
+      "NeNaMgAl : Enables NeNaMgAl reaction network. Requires NUCSYN and NUCSYN_HBB. : Ignore\n",
+      "nucsyn_network%d : Usage: --nucsyn_network%d <boolean>. Turn a nuclear network on or off. : (null)\n",
+      "nucsyn_network_error%d : Usage: --nucsyn_network_error%d <f>. Threshold error in nuclear network solver for network %d. : (null)\n",
+      "nucreacmult%d : Usage: --nucreacmult%d <f>. Multiply nuclear reaction given by the integer %d (integer) by f (float).  : (null)\n",
+      "nucsyn_metallicity : This sets the metallicity of the nucleosynthesis algorithms, i.e. the amount (by mass) of matter which is not hydrogen or helium. Usually you'd just set this with the metallicity parameter, but if you want the nucleosynthesis to be outside the range of the stellar evolution algorithm (e.g. Z=0 or Z=0.04) then you need to use nucsyn_metallicity. That said, it's also outside the range of some of the nucleosynthesis algorithms as well, so you have been warned! : (null)\n",
+      "nucsyn_solver : Choose the solver used in nuclear burning. 0 = KAPS_RENTROP is a Kaps-Rentrop scheme (fast, not great for stiff problems), 1 = LSODA (Adams/BSF switcher), 2 = CVODE library (https://computing.llnl.gov/projects/sundials. Default 0.  : 0\n",
+      "initial_abundance_mix : initial abundance mixture: 0=AG89, 1=Karakas 2002, 2=Lodders 2003, 3=Asplund 2005 (not available?), 4=Garcia Berro, 5=Grevesse Noels 1993 : 0\n",
+      "init_abund : Usage: --init_abund <i> <X>. Sets the initial abundance of isotope number <i> to mass fraction <X>. : 0.02\n",
+      "init_abund_mult : Usage: --init_abund_mult <i> <f>. Multiplies the initial abundance of isotope number <i> by <f>. : 1.0\n",
+      "init_abund_dex : Usage: --init_abund_dex <i> <f>. Changes the initial abundance of isotope number <i> by <f> dex. : 0.0\n",
+      "init_abunds_only : If True, outputs only the initial abundances, then exits. : (null)\n",
+      "initial_abunds_only : If True, outputs only the initial abundances, then exits. : (null)\n",
+      "no_thermohaline_mixing : If True, disables thermohaline mixing. : (null)\n",
+      "lithium_GB_post_Heflash : Sets the lithium abundances after the helium flash. Requires NUCSYN and LITHIUM_TABLES. : (null)\n",
+      "lithium_GB_post_1DUP : Sets the lithium abundance after first dredge up. Requires NUCSYN and LITHIUM_TABLES. : (null)\n",
+      "lithium_hbb_multiplier : Multiplies the lithium abundances on the AGB during HBB (based on Karakas/Fishlock et al models).Requires NUCSYN and LITHIUM_TABLES. : (null)\n",
+      "angelou_lithium_decay_function : Functional form which describes Li7 decay. Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Choices are : 0 expoential (see angelou_lithium_decay_time). : (null)\n",
+      "angelou_lithium_LMMS_time : Time at which lithium manufacture is triggered in a low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_MS_time : Time at which lithium manufacture is triggered on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_HG_time : Time at which lithium manufacture is triggered on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_GB_time : Time at which lithium manufacture is triggered on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_CHeB_time : Time at which lithium manufacture is triggered during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_EAGB_time : Time at which lithium manufacture is triggered on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_TPAGB_time : Time at which lithium manufacture is triggered on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_LMMS_decay_time : Decay time for surface lithium abundance during the low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_MS_decay_time : Decay time for surface lithium abundance on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_HG_decay_time : Decay time for surface lithium abundance on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_GB_decay_time : Decay time for surface lithium abundance on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_CHeB_decay_time : Decay time for surface lithium abundance during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_EAGB_decay_time : Decay time for surface lithium abundance on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_TPAGB_decay_time : Decay time for surface lithium abundance on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_LMMS_massfrac : Lithium mass fraction when its manufacture is triggered during the low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_MS_massfrac : Lithium mass fraction when its manufacture is triggered on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_HG_massfrac : Lithium mass fraction when its manufacture is triggered on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_GB_massfrac : Lithium mass fraction when its manufacture is triggered on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_CHeB_massfrac : Lithium mass fraction when its manufacture is triggered during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_EAGB_massfrac : Lithium mass fraction when its manufacture is triggered on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_TPAGB_massfrac : Lithium mass fraction when its manufacture is triggered on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_vrot_trigger : Equatorial rotational velocity at which lithium manufacture is triggered (km/s). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0.\n",
+      " : (null)\n",
+      "angelou_lithium_vrotfrac_trigger : Fraction of Keplerian (breakup) equatorial rotational velocity at which lithium manufacture is triggered (must be <1, ignored if 0). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0.\n",
+      " : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Output\n",
+      "############################################################\n",
+      "david_logging_function : Function to choose which kind of information gets logged Requires DAVID. Choices are: 0= None, >0 for custom logging functions : Ignore\n",
+      "cf_amanda_log : Enable logging to compare to Amanda's models. : (null)\n",
+      "float_overflow_checks : Turn on to enable floating-point overflow checks at the end of each timestep, if they are available. 0=off, 1=warn (stderr) on failure, 2=exit on failure (0) : (null)\n",
+      "save_pre_events_stardata : Enable this to save a copy of stardata to stardata->pre_events_stardata just before an event. : (null)\n",
+      "disable_end_logging : Disable the logging that happens at the end of the evolution. : (null)\n",
+      "ensemble : Turn on ensemble calculations and output. : (null)\n",
+      "ensemble_filters_off : Sets all ensemble filters to be off (FALSE) - these can then be enabled one-by-one with --ensemble_filter_[...] TRUE. : (null)\n",
+      "ensemble_filter_%d : Turn on or off ensemble filter <n>. For a list of filters, see ensemble_macros.h. : (null)\n",
+      "ensemble_legacy_ensemble : Turn on ensemble legacy population output. : (null)\n",
+      "legacy_yields : Turn on ensemble legacy yield output. : (null)\n",
+      "ensemble_defer : Defer ensemble output. : (null)\n",
+      "ensemble_dt : When doing ensemble calculations, data are stored and/or output every ensemble_dt Myr. See also ensemble, ensemble_logdt, ensemble_startlogtime. : (null)\n",
+      "ensemble_logdt : When doing ensemble calculations, and when logensembletimes is set, the ensemble is stored/output every ensemble_logdt Myr. See also ensemble, ensemble_dt, ensemble_startlogtime. : (null)\n",
+      "ensemble_startlogtime : Start log ensemble data storage/calculations/output at ensemble_startlogtime. See also ensemble, ensemble_dt, ensemble_startlogtime. : (null)\n",
+      "ensemble_logtimes : When doing ensemble calculations/output, set this to act at log times rather than linear times. : (null)\n",
+      "postagb_legacy_logging : Turn on post-AGB legacy logging. : (null)\n",
+      "disc_legacy_logging : Turn on disc legacy logging. : (null)\n",
+      "EMP_logg_maximum : Maximum logg that EMP stars are allowed to have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_minimum_age. : (null)\n",
+      "EMP_minimum_age : Minimum age that EMP stars are required to have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_logg_maximum. : (null)\n",
+      "EMP_feh_maximum : Maximum [Fe/H] that an EMP stars may have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default -2.0. : (null)\n",
+      "CEMP_cfe_minimum : Minimum [C/Fe] that CEMP stars are required to have. See Izzard et al 2009. See also NEMP_cfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default 0.7. : (null)\n",
+      "NEMP_cfe_minimum : Minimum [N/Fe] that NEMP stars are required to have. See Izzard et al 2009, Pols et al. 2012. See also CEMP_cfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default 1.0. : (null)\n",
+      "thick_disc_start_age : Lookback time for the start of the thick disc star formation, e.g. 13e3 Myr. Units = Myr. : (null)\n",
+      "thick_disc_end_age : Lookback time for the end of the thick disc star formation, e.g. 4e3 Myr. Units = Myr. : (null)\n",
+      "thick_disc_logg_min : Minimum logg for thick disc giants to be logged. : (null)\n",
+      "thick_disc_logg_max : Maximum logg for thick disc giants to be logged. : (null)\n",
+      "escape_velocity : A parameter used in constructing galactic chemical evolution (GCE) models. If the stellar wind velocity exceeds this value, any chemical yield from the wind is ignored, i.e. assumed lost. (km/s) Requires NUCSYN_GCE_OUTFLOW_CHECKS. Default 1e9 km/s. See also escape_fraction. : (null)\n",
+      "escape_fraction : A parameter used in constructing galactic chemical evolution (GCE) models. If the stellar wind velocity exceeds this value, any chemical yield from the wind is ignored, i.e. assumed lost. (km/s) Requires NUCSYN_GCE_OUTFLOW_CHECKS. Default 0.0. See also escape_velocity. : (null)\n",
+      "colour_log : If set to True, thelog is coloured with ANSI colour formatting. Requires FILE_LOG to be defined. : \n",
+      "log_filename : Location of the output logging filename. If set to \"/dev/null\" then there is no logging. : \n",
+      "stopfile : File which, when it exists, will stop the current binary_c repeat run. : \n",
+      "stardata_dump_filename : Location of the stardata dump file. : \n",
+      "stardata_load_filename : Location of the stardata file to load. : \n",
+      "api_log_filename_prefix : Location of the output logging filename prefix for the API. If set to \"/dev/null\" then there is no logging. : 0\n",
+      "hrdiag_output : Set to True to output high time-resolution Hertzstrpung-Russell diagram information. Requires HRDIAG. : (null)\n",
+      "internal_buffering : Experimental. Set to non-zero values to implement internal buffering prior to output. For use with binary_grid, you shouldn't really be playing with this. : (null)\n",
+      "eccentric_RLOF_model : Chooses which model is used to handle eccentric RLOF. Default is RLOF_ECCENTRIC_AS_CIRCULAR, i.e. ignore the eccentricity. Note: requires force_corotation_of_primary_and_orbit to be FALSE.\n",
+      " : (null)\n",
+      "force_circularization_on_RLOF : If True forces circularization of stars and orbit when RLOF starts, this is as in the BSE algorithm. (True) : (null)\n",
+      "wtts_log : If True, enables log file output for WTTS2. : (null)\n",
+      "fabian_imf_log_time : Time at which to output for Fabian Schneider's IMF project. Requires FABIAN_IMF_LOG : Ignore\n",
+      "fabian_imf_log_timestep : Timestep for Fabian Schneider's IMF project logging. Requires FABIAN_IMF_LOG : Ignore\n",
+      "version : Display binary_c version and build information. Also performs timing tests. : Ignore\n",
+      "dumpversion : Display binary_c version number (short format). : Ignore\n",
+      "version_only : Display binary_c version number and build information, but do not perform timing tests or anything that requires stardata to be non-NULL. : Ignore\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Input\n",
+      "############################################################\n",
+      "MINT_dir : Location of MINT algorithm data. : \n",
+      "MINT_data_cleanup : Activate checks on incoming data to try to account for problems. Will make data-loading slower, but may fix a few things. : \n",
+      "MINT_MS_rejuvenation : Turn on or off (hydrogen) main-sequence rejuvenation. : \n",
+      "MINT_remesh : Turn on or off MINT's remeshing. : \n",
+      "MINT_use_ZAMS_profiles : Use chemical profiles at the ZAMS if MINT_use_ZAMS_profiles is TRUE, otherwise set homogeneous abundances. (Default is TRUE, so we use the profiles if they are available.) : \n",
+      "MINT_disable_grid_load_warnings : Use this to explicitly disable MINT's warnings when loading a grid with, e.g., missing or too much data. : \n",
+      "MINT_Kippenhahn : Turn on or off MINT's Kippenhahn diagrams. If 0, off, if 1, output star 1 (index 0), if 2 output star 2 (index 1). Default 0. : \n",
+      "MINT_Kippenhahn_stellar_type : Stellar type selector for Kippenhahn plots. Set to -1 to ignore, otherwise the stellar type number for which Kippenhahn plot data should be output. : \n",
+      "MINT_Kippenhahn_companion_stellar_type : Companion stellar type selector for Kippenhahn plots. Set to -1 to ignore, otherwise the stellar type number for the companion for which Kippenhahn plot data should be output. : \n",
+      "MINT_nuclear_burning : Turn on or off MINT's nuclear burning algorithm. : \n",
+      "MINT_minimum_shell_mass : Minimum shell mass in MINT's nuclear burning routines. : \n",
+      "MINT_maximum_shell_mass : Maximum shell mass in MINT's nuclear burning routines. : \n",
+      "\n",
+      "############################################################\n",
+      "##### Section I/O\n",
+      "############################################################\n",
+      "go : batchmode control command : Ignore\n",
+      "gogo : batchmode control command : Ignore\n",
+      "reset_stars : Reset the star structures. Used in batchmode : Ignore\n",
+      "reset_stars_defaults : Reset the star structures and set defaults. Used in batchmode : Ignore\n",
+      "defaults : Reset all defaults. Used in batchmode : Ignore\n",
+      "echo : Activate batchmode command echoing, i.e. when you enter a command, binary_c repeats the command then executes it. : Ignore\n",
+      "noecho : Deactivate batchmode command echoing. See 'echo'. : Ignore\n",
+      "noechonow : Deactivate batchmode command echoing. See 'echo'. : Ignore\n",
+      "bye : Quit binary_c. Used in batchmode. : Ignore\n",
+      "fin : batchmode control command : Ignore\n",
+      "reset_prefs : Reset preferences struct. Used in batchmode : Ignore\n",
+      "status : Output batchmode status information. : Ignore\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Algorithms\n",
+      "############################################################\n",
+      "repeat : If > 1, repeats the system as many times as required. Handy if you're using Monte-Carlo kicks and want to sample the parameter space well. Also, if you are running speed tests this is good to give a statistically more reasonable result. (See e.g. 'tbse pgo'). : (null)\n",
+      "random_systems : Experimental. Use this to apply random initial system parameters (masses, separations, etc.). Useful for testing only. : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Misc\n",
+      "############################################################\n",
+      "random_seed : Random number seed, usually a (possibly negative) integer. Useful for exactly reproducing the evolution of a system which involves a kick (which is a Monte-Carlo, i.e. pseudorandom, process). : (null)\n",
+      "random_systems_seed : Random number seed for the generation of random systems. See random_systems and random_seed. : (null)\n",
+      "random_skip : Skip the first <random_seed> random numbers that are generated. Usually this is 0 so they are all used. : (null)\n",
+      "idum : [NB: deprecated, please use 'random_seed' instead.] Random number seed, usually a (possibly negative) integer. Useful for exactly reproducing the evolution of a system which involves a kick (which is a Monte-Carlo, i.e. pseudorandom, process). : (null)\n",
+      "reverse_time : Make time go backwards. To be considered very experimental! : (null)\n",
+      "start_time : Start time for the simulation. : (null)\n",
+      "warmup_cpu : Uses the CPU at maximum power the given number of seconds, prior to running normal stellar evolution. : Ignore\n",
+      "help : Display help pages. Usage: --help <help topic>. : Ignore\n",
+      "argopts : Display argument options. Usage: --argopts <argument>. : Ignore\n",
+      "help_all : Display all help pages. : Ignore\n",
+      "list_args : Display list of arguments with their default values. Useful for batchmode. : Ignore\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(_binary_c_bindings.return_help_all())"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "bfec32cf-7240-4a82-ac30-b3d99a018a28",
+   "metadata": {},
+   "source": [
+    "We can get all the parameter names and their default values with return_arglines(): (abridged output)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 20,
+   "id": "3d29ca9d-ac66-4f9e-81cf-2edd14a98b79",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "__ARG_BEGIN\n",
+      "metallicity = 0.02\n",
+      "effective_metallicity = -1\n",
+      "M_1 = 0\n"
+     ]
+    }
+   ],
+   "source": [
+    "print('\\n'.join(_binary_c_bindings.return_arglines().splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "e8b1c8b6-a878-43f4-bc36-1b20b3e66c6f",
+   "metadata": {},
+   "source": [
+    "Lastly, we can ask binary_c to determine the minimum period or maximum mass for RLOF at the ZAMS: Both of them need an argstring as input"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "e517f561-09c6-419d-ba89-d9cb61e6ebab",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MINIMUM SEPARATION 0.31\n",
+      "MINIMUM PERIOD 0.00632092\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=10,\n",
+    "    orbital_period=4500,\n",
+    "    eccentricity=0.0,\n",
+    "    metallicity=0.02,\n",
+    "    max_evolution_time=15000,\n",
+    ").strip()\n",
+    "\n",
+    "#\n",
+    "output = _binary_c_bindings.return_minimum_orbit_for_RLOF(argstring, store_capsule=store_memaddr)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 46,
+   "id": "7da75a95-8831-4346-a584-e042ced75249",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MAXIMUM MASS RATIO 0.0141\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=5,\n",
+    "    M_2=1,\n",
+    "    orbital_period=0.0001,\n",
+    "    eccentricity=0.0,\n",
+    "    metallicity=0.02,\n",
+    "    max_evolution_time=15000,\n",
+    ").strip()\n",
+    "\n",
+    "#\n",
+    "output = _binary_c_bindings.return_maximum_mass_ratio_for_RLOF(argstring)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "id": "5fe52d8e-1721-4796-a856-002cf4525d96",
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/source/notebook_custom_logging.ipynb b/docs/source/notebook_custom_logging.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..e84895375014ce29b29a572a9a264d1505eb1db9
--- /dev/null
+++ b/docs/source/notebook_custom_logging.ipynb
@@ -0,0 +1,517 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "879b596b-d70c-4f90-b668-563b4ad93ffc",
+   "metadata": {},
+   "source": [
+    "# Notebook custom logging\n",
+    "In this notebook you'll learn how to use the custom logging functionality"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 37,
+   "id": "696ecbb9-1efd-48f4-a57e-2cf6dfe416f1",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from binarycpython import _binary_c_bindings\n",
+    "from binarycpython.utils.custom_logging_functions import (\n",
+    "    autogen_C_logging_code,\n",
+    "    binary_c_log_code,\n",
+    "    create_and_load_logging_function,\n",
+    ")\n",
+    "from binarycpython.utils.run_system_wrapper import run_system\n",
+    "from binarycpython.utils.grid import Population"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "d4d721cc-df4f-4ac2-b6f9-62e85ca0c1e5",
+   "metadata": {},
+   "source": [
+    "The custom logging functionality allows us to decide the output of binary_c _without_ modifying the actual sourcecode of binary_c (i.e. editing `src/logging/log_every_timestep` in binary_c). Rather, we can create a logging routine from within python.\n",
+    "\n",
+    "Technically, the following steps are taken:\n",
+    "- User creates a logging print statement from within python\n",
+    "- The logging print statement string gets wrapped into a proper c-function by `binary_c_log_code`\n",
+    "- The c-function string gets compiled and loaded into memory by `create_and_load_logging_function`\n",
+    "- The memory adress of the compiled and loaded print function can now be passed to C\n",
+    "- binary_c uses the custom print function \n",
+    "\n",
+    "The custom logging functionality can be used when running systems via `run_system()`, via `Population.evolve()` and `Population.evolve_single()`, and directly via the API\n",
+    "\n",
+    "Within the logging statement we can access information from the stardata object, as well as use logical statements to determine when to log information. What we cannot do, however, is access functions that are not _publicly available_. For very elaborate printing routines it is still advised to actually hardcode the print statement into binary_c itself."
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "be137151-bb57-43d7-bab1-0167512ac727",
+   "metadata": {},
+   "source": [
+    "## Usage"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ac4e5f4c-81e6-4980-b852-aca84ca74f4c",
+   "metadata": {},
+   "source": [
+    "There are two methods to create the C-code that will be compiled:\n",
+    "- Automatically generate the print statement and use the wrapper to generate the full function string, by using `autogen_C_logging_code`\n",
+    "- Create your custom print statement and use the wrapper to generate the full function string, by writing out the print statement. Here the logging statement obviously has to be valid C code"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "236cf821-09ac-4237-9b8f-6e36d2edf446",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Printf(\"MY_STELLAR_DATA %g %g\\n\",((double)stardata->model.time),((double)stardata->star[0].mass));\n"
+     ]
+    }
+   ],
+   "source": [
+    "# generate logging lines. Here you can choose whatever you want to have logged, and with what header\n",
+    "# this generates working print statements\n",
+    "logging_line = autogen_C_logging_code(\n",
+    "    {\n",
+    "        \"MY_STELLAR_DATA\": [\"model.time\", \"star[0].mass\"],\n",
+    "    }\n",
+    ")\n",
+    "print(logging_line)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 30,
+   "id": "feb423d5-5cc3-433c-9801-f8017abbc03a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Printf(\"MY_STELLAR_DATA time=%g mass=%g\\n\", stardata->model.time, stardata->star[0].mass)\n"
+     ]
+    }
+   ],
+   "source": [
+    "# You can also decide to `write` your own logging_line, which allows you to write a more complex logging statement with conditionals.\n",
+    "logging_line = 'Printf(\"MY_STELLAR_DATA time=%g mass=%g\\\\n\", stardata->model.time, stardata->star[0].mass)'\n",
+    "print(logging_line)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 31,
+   "id": "2f5defbf-c623-49ed-a238-fba52a563a58",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "#pragma push_macro(\"Max\")\n",
+      "#pragma push_macro(\"Min\")\n",
+      "#undef Max\n",
+      "#undef Min\n",
+      "#include \"binary_c.h\"\n",
+      "\n",
+      "// add visibility __attribute__ ((visibility (\"default\"))) to it \n",
+      "void binary_c_API_function custom_output_function(struct stardata_t * stardata);\n",
+      "void binary_c_API_function custom_output_function(struct stardata_t * stardata)\n",
+      "{\n",
+      "    // struct stardata_t * stardata = (struct stardata_t *)x;\n",
+      "    Printf(\"MY_STELLAR_DATA time=%g mass=%g\\n\", stardata->model.time, stardata->star[0].mass);\n",
+      "}\n",
+      "\n",
+      "#undef Max \n",
+      "#undef Min\n",
+      "#pragma pop_macro(\"Min\")\n",
+      "#pragma pop_macro(\"Max\")    \n"
+     ]
+    }
+   ],
+   "source": [
+    "# Generate the entire 'script' by wrapping the logging line\n",
+    "custom_logging_code = binary_c_log_code(logging_line)\n",
+    "print(custom_logging_code)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "efa7f1e9-247e-4196-a883-bcff05265d02",
+   "metadata": {},
+   "source": [
+    "Combining the above with e.g. run_system() (see notebook_individual_systems for more examples):"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 32,
+   "id": "dcd74bbc-478b-43e4-b495-8c456e8d1d88",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MY_STELLAR_DATA time=0 mass=2\n",
+      "MY_STELLAR_DATA time=0 mass=2\n",
+      "MY_STELLAR_DATA time=1e-06 mass=2\n",
+      "MY_STELLAR_DATA time=2e-06 mass=2\n"
+     ]
+    }
+   ],
+   "source": [
+    "# logging statement\n",
+    "logging_line = 'Printf(\"MY_STELLAR_DATA time=%g mass=%g\\\\n\", stardata->model.time, stardata->star[0].mass)'\n",
+    "\n",
+    "# Entire script\n",
+    "custom_logging_code = binary_c_log_code(logging_line)\n",
+    "\n",
+    "# Run system\n",
+    "output = run_system(M_1=2, custom_logging_code=custom_logging_code)\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print(\"\\n\".join(output.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "1998ee8f-8c0a-462b-b1e0-54f5963902cc",
+   "metadata": {},
+   "source": [
+    "### Using custom logging with the population object\n",
+    "Custom logging can be used for a whole population by setting the print statement (so not the entire logging script) in `C_logging_code`"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 33,
+   "id": "77bd09b0-1a94-499d-97db-a1f991c67c12",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "EXAMPLE_ABOVE_MS             1.041660877905e+02 4.99198 4.99198 6.1357 6.1357 2 1\n",
+      "EXAMPLE_ABOVE_MS             1.041662558619e+02 4.99198 4.99198 6.14057 6.1357 2 2\n",
+      "EXAMPLE_ABOVE_MS             1.041662560111e+02 4.99198 4.99198 6.14057 6.14057 2 2\n",
+      "EXAMPLE_ABOVE_MS             1.041662564579e+02 4.99198 4.99198 6.14059 6.14057 2 2\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Set up population\n",
+    "pop = Population()\n",
+    "\n",
+    "# Set some BSE parameters\n",
+    "pop.set(\n",
+    "    M_1=5\n",
+    ")\n",
+    "\n",
+    "# Example logging that prints only if the star is post main-sequence\n",
+    "example_logging_string_post_MS = \"\"\"\n",
+    "if(stardata->star[0].stellar_type>MS)\n",
+    "{\n",
+    "    Printf(\"EXAMPLE_ABOVE_MS %30.12e %g %g %g %g %d %d\\\\n\",\n",
+    "        // \n",
+    "        stardata->model.time, // 1\n",
+    "\n",
+    "        stardata->star[0].mass, //2\n",
+    "        stardata->previous_stardata->star[0].mass, //3\n",
+    "\n",
+    "        stardata->star[0].radius, //4\n",
+    "        stardata->previous_stardata->star[0].radius, //5\n",
+    "\n",
+    "        stardata->star[0].stellar_type, //6\n",
+    "        stardata->previous_stardata->star[0].stellar_type //7\n",
+    "  );\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "# Set the logging\n",
+    "pop.set(\n",
+    "    C_logging_code=example_logging_string_post_MS\n",
+    ")\n",
+    "out = pop.evolve_single()\n",
+    "\n",
+    "# Print (abridged) output\n",
+    "print('\\n'.join(out.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "93397ff3-9b71-470d-8bc4-08fe5b1a5dca",
+   "metadata": {},
+   "source": [
+    "### Using custom logging when running directly from the API\n",
+    "When running a system directly with the API we need to manually load the custom logging into memory (via `create_and_load_logging_function`) and pass the memory address to the binary_c binding via `_binary_c_bindings.run_system(argstring, custom_logging_func_memaddr=custom_logging_memaddr)`"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 40,
+   "id": "30142286-34ce-433e-82c8-565e2160ff5b",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MY_STELLAR_DATA 0 15\n",
+      "MY_STELLAR_DATA 0 15\n",
+      "MY_STELLAR_DATA 1e-06 15\n",
+      "MY_STELLAR_DATA 2e-06 15\n"
+     ]
+    }
+   ],
+   "source": [
+    "# generate logging lines\n",
+    "logging_line = autogen_C_logging_code(\n",
+    "    {\n",
+    "        \"MY_STELLAR_DATA\": [\"model.time\", \"star[0].mass\"],\n",
+    "    }\n",
+    ")\n",
+    "\n",
+    "# Generate code around logging lines\n",
+    "custom_logging_code = binary_c_log_code(logging_line)\n",
+    "\n",
+    "# Generate library and get memaddr\n",
+    "custom_logging_memaddr, shared_lib_filename = create_and_load_logging_function(\n",
+    "    custom_logging_code\n",
+    ")\n",
+    "\n",
+    "#\n",
+    "m1 = 15.0  # Msun\n",
+    "m2 = 14.0  # Msun\n",
+    "separation = 0  # 0 = ignored, use period\n",
+    "orbital_period = 4530.0  # days\n",
+    "eccentricity = 0.0\n",
+    "metallicity = 0.02\n",
+    "max_evolution_time = 15000\n",
+    "argstring = \"binary_c M_1 {0:g} M_2 {1:g} separation {2:g} orbital_period {3:g} eccentricity {4:g} metallicity {5:g} max_evolution_time {6:g}\".format(\n",
+    "    m1,\n",
+    "    m2,\n",
+    "    separation,\n",
+    "    orbital_period,\n",
+    "    eccentricity,\n",
+    "    metallicity,\n",
+    "    max_evolution_time,\n",
+    ")\n",
+    "output = _binary_c_bindings.run_system(\n",
+    "    argstring, custom_logging_func_memaddr=custom_logging_memaddr\n",
+    ")\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print('\\n'.join(output.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "39c76b1d-d968-4eef-b5ae-2542ed9557c3",
+   "metadata": {},
+   "source": [
+    "## Examples of logging strings\n",
+    "Below are some examples of logging strings"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "2ac4af72-6dab-4cc9-986e-5b5b1fa31b73",
+   "metadata": {},
+   "source": [
+    "### Compact object\n",
+    "This logging will print the timestep when the star becomes a compact object. After it does, we change the maximum time to be the current time, effectively terminating the evolution"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 42,
+   "id": "6f0edc65-a788-4706-a0c5-2ace030765ec",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "SINGLE_STAR_LIFETIME 10 27.7358\n",
+      "EXAMPLE_LOG_CO             2.773581245005e+01 1.33524 9.19314 1.72498e-05 730.446 13 5\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_logging_string_CO = \"\"\"\n",
+    "if(stardata->star[0].stellar_type>=NS)\n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"EXAMPLE_LOG_CO %30.12e %g %g %g %g %d %d\\\\n\",\n",
+    "            // \n",
+    "            stardata->model.time, // 1\n",
+    "\n",
+    "            stardata->star[0].mass, //2\n",
+    "            stardata->previous_stardata->star[0].mass, //3\n",
+    "\n",
+    "            stardata->star[0].radius, //4\n",
+    "            stardata->previous_stardata->star[0].radius, //5\n",
+    "\n",
+    "            stardata->star[0].stellar_type, //6\n",
+    "            stardata->previous_stardata->star[0].stellar_type //7\n",
+    "      );\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "# Entire script\n",
+    "custom_logging_code = binary_c_log_code(example_logging_string_CO)\n",
+    "\n",
+    "# Run system\n",
+    "output = run_system(M_1=10, custom_logging_code=custom_logging_code)\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print(\"\\n\".join(output.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "51c51592-6406-43bd-a879-10ace64aaf28",
+   "metadata": {},
+   "source": [
+    "### Logging mass evolution and the supernova\n",
+    "This logging code prints the mass evolution and the moment the star goes supernova"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 47,
+   "id": "8f58fdf9-3e76-4c18-a1c5-eed0980d4133",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "EXAMPLE_MASSLOSS             9.878236827680e+00 1.61349 8.38063 20 13 1\n",
+      "EXAMPLE_SN             9.878236827680e+00 1.61349 8.38063 20 12 13 5 1 6.74037 4.92267 6.74037 0 0\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_logging_string_CO = \"\"\"\n",
+    "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %g %d %g\\\\n\",\n",
+    "    // \n",
+    "    stardata->model.time, // 1\n",
+    "    stardata->star[0].mass, //2\n",
+    "    stardata->previous_stardata->star[0].mass, //3\n",
+    "    stardata->common.zero_age.mass[0], //4\n",
+    "\n",
+    "    stardata->star[0].stellar_type, //5\n",
+    "    stardata->model.probability //6\n",
+    ");\n",
+    "if(stardata->star[0].SN_type != SN_NONE)\n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        if(stardata->pre_events_stardata != NULL)\n",
+    "        {\n",
+    "            Printf(\"EXAMPLE_SN %30.12e \" // 1\n",
+    "                \"%g %g %g %d \" // 2-5\n",
+    "                \"%d %d %g %g \" // 6-9\n",
+    "                \"%g %g %g %g\\\\n\", // 10-13\n",
+    "\n",
+    "                // \n",
+    "                stardata->model.time, // 1\n",
+    "\n",
+    "                stardata->star[0].mass, //2\n",
+    "                stardata->pre_events_stardata->star[0].mass, //3\n",
+    "                stardata->common.zero_age.mass[0], //4\n",
+    "                stardata->star[0].SN_type, //5\n",
+    "\n",
+    "                stardata->star[0].stellar_type, //6\n",
+    "                stardata->pre_events_stardata->star[0].stellar_type, //7\n",
+    "                stardata->model.probability, //8\n",
+    "                stardata->pre_events_stardata->star[0].core_mass[ID_core(stardata->pre_events_stardata->star[0].stellar_type)],           // 9\n",
+    "\n",
+    "                stardata->pre_events_stardata->star[0].core_mass[CORE_CO],     // 10\n",
+    "                stardata->pre_events_stardata->star[0].core_mass[CORE_He],    // 11\n",
+    "                stardata->star[0].fallback, // 12\n",
+    "                stardata->star[0].fallback_mass // 13\n",
+    "            );\n",
+    "        }\n",
+    "        else\n",
+    "        {\n",
+    "            Printf(\"EXAMPLE_SN %30.12e \" // 1\n",
+    "                \"%g %g %g %d \" // 2-5\n",
+    "                \"%d %d %g %g \" // 6-9\n",
+    "                \"%g %g %g %g\\\\n\", // 10-13\n",
+    "\n",
+    "                // \n",
+    "                stardata->model.time, // 1\n",
+    "\n",
+    "                stardata->star[0].mass, //2\n",
+    "                stardata->previous_stardata->star[0].mass, //3\n",
+    "                stardata->common.zero_age.mass[0], //4\n",
+    "                stardata->star[0].SN_type, //5\n",
+    "\n",
+    "                stardata->star[0].stellar_type, //6\n",
+    "                stardata->previous_stardata->star[0].stellar_type, //7\n",
+    "                stardata->model.probability, //8\n",
+    "                stardata->previous_stardata->star[0].core_mass[ID_core(stardata->previous_stardata->star[0].stellar_type)],           // 9\n",
+    "\n",
+    "                stardata->previous_stardata->star[0].core_mass[CORE_CO],     // 10\n",
+    "                stardata->previous_stardata->star[0].core_mass[CORE_He],    // 11\n",
+    "                stardata->star[0].fallback, // 12\n",
+    "                stardata->star[0].fallback_mass // 13\n",
+    "            );\n",
+    "        }\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "# Entire script\n",
+    "custom_logging_code = binary_c_log_code(example_logging_string_CO)\n",
+    "\n",
+    "# Run system\n",
+    "output = run_system(M_1=20, custom_logging_code=custom_logging_code)\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print(\"\\n\".join(output.splitlines()[-2:]))"
+   ]
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/source/notebook_extra_features.ipynb b/docs/source/notebook_extra_features.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..d453a6f5bef5a661a59491fde19511cee3f6c579
--- /dev/null
+++ b/docs/source/notebook_extra_features.ipynb
@@ -0,0 +1,44 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "d5c04b77-f0be-4b33-8c03-c72eb846527c",
+   "metadata": {},
+   "source": [
+    "# Extra features and functionality of binarycpython\n",
+    "In this notebook we'll go over some of the extra features and functionality that was not covered in the other notebooks.\n",
+    "\n",
+    "TODO"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "id": "0020f1bc-2a23-455c-8216-9e63e6e038ae",
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/source/notebook_individual_systems.ipynb b/docs/source/notebook_individual_systems.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..19c2d29fbd316324eb39a361e897be2b835955e8
--- /dev/null
+++ b/docs/source/notebook_individual_systems.ipynb
@@ -0,0 +1,563 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "a544d28c-c2e1-4c6a-b55b-8caec440743f",
+   "metadata": {},
+   "source": [
+    "# Running individual systems with binarycpython\n",
+    "This notebook will show you how to run single systems and analyze their results.\n",
+    "\n",
+    "It can be useful to have some functions to quickly run a single system to e.g. inspect what evolutionary steps a specific system goes through, to plot the mass loss evolution of a single star, etc. "
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "dd5d9ec7-5791-45f1-afbd-225947e2a583",
+   "metadata": {},
+   "source": [
+    "## Single system with run_wrapper\n",
+    "The simplest method to run a single system is to use the run_system wrapper. This function deals with setting up the argument string, makes sure all the required parameters are included and handles setting and cleaning up the custom logging functionality (see notebook_custom_logging).\n",
+    "\n",
+    "As arguments to this function we can add any of the parameters that binary_c itself actually knows, as well as:\n",
+    "- custom_logging_code: string containing a print statement that binary_c can use to print information\n",
+    "- log_filename: path of the logfile that binary_c generates\n",
+    "- parse_function: function that handles parsing the output of binary-c"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "id": "425efed3-d8e3-432d-829e-41d8ebe05162",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from binarycpython.utils.run_system_wrapper import run_system\n",
+    "# help(run_system) # Uncomment to see the docstring"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "id": "b2abab48-433d-4936-8434-14804c52c9f6",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "SINGLE_STAR_LIFETIME 1 12462\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "output = run_system(M_1=1)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f127a5e4-dc01-4472-9130-8a943c92e8a7",
+   "metadata": {},
+   "source": [
+    "Lets try adding a log filename now:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
+   "id": "029fc3f2-f09a-49af-a32b-248505738f2e",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "      TIME      M1       M2   K1  K2           SEP   ECC  R1/ROL1 R2/ROL2  TYPE RANDOM_SEED=67365 RANDOM_COUNT=0\n",
+      "     0.0000    1.000    0.000  1  15            -1 -1.00   0.000   0.000  \"INITIAL \"\n",
+      " 11003.1302    1.000    0.000  2  15            -1 -1.00   0.000   0.000  \"OFF_MS\"\n",
+      " 11003.1302    1.000    0.000  2  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 11582.2424    1.000    0.000  3  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12325.1085    0.817    0.000  4  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12457.1300    0.783    0.000  5  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12460.8955    0.774    0.000  6  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12460.8955    0.774    0.000  6  15            -1 -1.00   0.000   0.000  \"shrinkAGB\"\n",
+      " 12461.9514    0.523    0.000 11  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 15000.0000    0.523    0.000 11  15            -1 -1.00   0.000   0.000  \"MAX_TIME\"\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "output = run_system(M_1=1, log_filename='/tmp/test_logfile.txt')\n",
+    "with open('/tmp/test_logfile.txt', 'r') as f:\n",
+    "    print(f.read())"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "606670f2-3e0a-43c7-a885-006b92fac9d2",
+   "metadata": {},
+   "source": [
+    "To get more useful output we can include a custom_logging snippet (see notebook_custom_logging):"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 6,
+   "id": "e6a23b55-ca42-440d-83ac-e76a24a83a67",
+   "metadata": {
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "['EXAMPLE_MASSLOSS             0.000000000000e+00 1 1 1', 'EXAMPLE_MASSLOSS             0.000000000000e+00 1 1 1', 'EXAMPLE_MASSLOSS             1.000000000000e-06 1 1 1', 'EXAMPLE_MASSLOSS             2.000000000000e-06 1 1 1']\n"
+     ]
+    }
+   ],
+   "source": [
+    "from binarycpython.utils.custom_logging_functions import binary_c_log_code\n",
+    "\n",
+    "# Create the print statement\n",
+    "custom_logging_print_statement = \"\"\"\n",
+    "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %d\\\\n\",\n",
+    "    // \n",
+    "    stardata->model.time, // 1\n",
+    "    stardata->star[0].mass, //2\n",
+    "    stardata->common.zero_age.mass[0], //4\n",
+    "\n",
+    "    stardata->star[0].stellar_type //5\n",
+    ");\n",
+    "\"\"\"\n",
+    "\n",
+    "# Generate entire shared lib code around logging lines\n",
+    "custom_logging_code = binary_c_log_code(custom_logging_print_statement)\n",
+    "\n",
+    "output = run_system(M_1=1, custom_logging_code=custom_logging_code)\n",
+    "print(output.splitlines()[:4])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "4c885143-db79-4fed-b4c4-0bd846e24f7d",
+   "metadata": {},
+   "source": [
+    "Now we have some actual output, it is time to create a parse_function which parses the output. Adding a parse_function to the run_system will make run_system run the output of binary_c through the parse_function."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "3822721f-217a-495b-962e-d57137b9e290",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "[['time', 'mass', 'initial_mass', 'stellar_type'], [0.0, 1.0, 1.0, 1.0], [0.0, 1.0, 1.0, 1.0]]\n"
+     ]
+    }
+   ],
+   "source": [
+    "def parse_function(output):\n",
+    "    \"\"\"\n",
+    "    Example function to parse the output of binary_c\n",
+    "    \"\"\"\n",
+    "\n",
+    "    # \n",
+    "    column_names = ['time', 'mass', 'initial_mass', 'stellar_type']\n",
+    "    value_lines = [column_names]\n",
+    "    \n",
+    "    # Loop over output\n",
+    "    for line in output.splitlines():\n",
+    "        \n",
+    "        # Select the lines starting with the header we chose\n",
+    "        if line.startswith(\"EXAMPLE_MASSLOSS\"):\n",
+    "        \n",
+    "        # Split the output and fetch the data\n",
+    "            split_line = line.split()\n",
+    "            values = [float(el) for el in split_line[1:]]\n",
+    "            value_lines.append(values)\n",
+    "\n",
+    "    return value_lines\n",
+    "\n",
+    "# Catch output\n",
+    "output = run_system(M_1=1, custom_logging_code=custom_logging_code, parse_function=parse_function)\n",
+    "print(output[:3])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "a551f07f-2eff-4425-9375-267579a581b3",
+   "metadata": {},
+   "source": [
+    "This output can now be turned into e.g. an Numpy array or Pandas dataframe (my favorite: makes querying the data very easy)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 8,
+   "id": "654a07ed-2a88-46ff-9da0-b7759580f9f3",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "0        time      mass initial_mass stellar_type\n",
+      "1           0         1            1            1\n",
+      "2           0         1            1            1\n",
+      "3       1e-06         1            1            1\n",
+      "4       2e-06         1            1            1\n",
+      "5       3e-06         1            1            1\n",
+      "...       ...       ...          ...          ...\n",
+      "1612  12461.8  0.577754            1            6\n",
+      "1613    12462  0.522806            1           11\n",
+      "1614    13462  0.522806            1           11\n",
+      "1615    14462  0.522806            1           11\n",
+      "1616    15000  0.522806            1           11\n",
+      "\n",
+      "[1616 rows x 4 columns]\n"
+     ]
+    }
+   ],
+   "source": [
+    "import pandas as pd\n",
+    "\n",
+    "# Load data into dataframe\n",
+    "example_df = pd.DataFrame(output)\n",
+    "\n",
+    "# Fix column headers\n",
+    "example_df.columns = example_df.iloc[0]\n",
+    "example_df = example_df.drop(example_df.index[0])\n",
+    "\n",
+    "print(example_df)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "325c2ce6-f9a1-46b7-937f-84040e1252cf",
+   "metadata": {
+    "tags": []
+   },
+   "source": [
+    "## Single system via population object\n",
+    "When setting up your population object (see notebook_population), and configuring all the parameters, it is possible to run a single system using that same configuration. It will use the parse_function if set, and running a single system is a good method to test if everything works accordingly."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 9,
+   "id": "4a98ffca-1b72-4bb8-8df1-3bf3187d882f",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from binarycpython.utils.grid import Population\n",
+    "# help(Population) # Uncomment to see the docstring"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "7e2c2ef0-3db2-46a6-8c85-9b6cf720eb6a",
+   "metadata": {},
+   "source": [
+    "First, let's try this without any custom logging or parsing functionality"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 10,
+   "id": "bff1cc2e-6b32-4ba0-879f-879ffbabd223",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: M_1=10 to BSE_options\n",
+      "Creating and loading custom logging functionality\n",
+      "Running binary_c M_1 10\n",
+      "Cleaning up the custom logging stuff. type: single\n",
+      "SINGLE_STAR_LIFETIME 10 27.7358\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Create the population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# Set some parameters\n",
+    "example_pop.set(\n",
+    "    verbosity=1\n",
+    ")\n",
+    "example_pop.set(\n",
+    "    M_1=10\n",
+    ")\n",
+    "\n",
+    "# get output and print\n",
+    "output = example_pop.evolve_single()\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ae01fa35-f8b1-4a40-bfb2-b9e872cae0e7",
+   "metadata": {},
+   "source": [
+    "Now lets add some actual output with the custom logging"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 13,
+   "id": "dd748bab-b57e-4129-8350-9ea11fa179d0",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: C_logging_code=\n",
+      "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %g %d\\n\",\n",
+      "    // \n",
+      "    stardata->model.time, // 1\n",
+      "    stardata->star[0].mass, //2\n",
+      "    stardata->previous_stardata->star[0].mass, //3\n",
+      "    stardata->common.zero_age.mass[0], //4\n",
+      "\n",
+      "    stardata->star[0].stellar_type //5\n",
+      ");\n",
+      " to grid_options\n",
+      "Creating and loading custom logging functionality\n",
+      "Running binary_c M_1 10\n",
+      "Cleaning up the custom logging stuff. type: single\n",
+      "Removed /tmp/binary_c_python/custom_logging/libcustom_logging_eac2dfc438a14e5a9f5be98b1b6b4294.so\n",
+      "['EXAMPLE_MASSLOSS             0.000000000000e+00 10 0 10 1', 'EXAMPLE_MASSLOSS             0.000000000000e+00 10 10 10 1', 'EXAMPLE_MASSLOSS             1.000000000000e-06 10 10 10 1', 'EXAMPLE_MASSLOSS             2.000000000000e-06 10 10 10 1']\n"
+     ]
+    }
+   ],
+   "source": [
+    "custom_logging_print_statement = \"\"\"\n",
+    "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %g %d\\\\n\",\n",
+    "    // \n",
+    "    stardata->model.time, // 1\n",
+    "    stardata->star[0].mass, //2\n",
+    "    stardata->previous_stardata->star[0].mass, //3\n",
+    "    stardata->common.zero_age.mass[0], //4\n",
+    "\n",
+    "    stardata->star[0].stellar_type //5\n",
+    ");\n",
+    "\"\"\"   \n",
+    "\n",
+    "example_pop.set(C_logging_code=custom_logging_print_statement)\n",
+    "\n",
+    "# get output and print\n",
+    "output = example_pop.evolve_single()\n",
+    "print(output.splitlines()[:4])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "588a7d9e-9d64-4b3b-8907-656b905286e8",
+   "metadata": {},
+   "source": [
+    "Lastly we can add a parse_function to handle parsing the output again. \n",
+    "\n",
+    "Because the parse_function will now be part of the population object, it can access information of the object. We need to make a new parse function that is fit for an object: we the arguments now need to be (self, output). Returning the data is useful when running evolve_single(), but won't be used in a population evolution."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 14,
+   "id": "fec39154-cce6-438c-8c2c-509d76b00f34",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "import os\n",
+    "import json\n",
+    "import numpy as np\n",
+    "\n",
+    "def object_parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parse function that can be added to the population object\n",
+    "    \"\"\"\n",
+    "\n",
+    "    # We can access object instance information now. \n",
+    "    # In this way we can store the results in a file for example. \n",
+    "    output_file = os.path.join(self.custom_options['output_dir'], 'example_output.json')\n",
+    "    \n",
+    "    # \n",
+    "    column_names = ['time', 'mass', 'initial_mass', 'stellar_type']\n",
+    "    value_lines = [column_names]\n",
+    "    \n",
+    "    # Loop over output\n",
+    "    for line in output.splitlines():\n",
+    "        \n",
+    "        # Select the lines starting with the header we chose\n",
+    "        if line.startswith(\"EXAMPLE_MASSLOSS\"):\n",
+    "        \n",
+    "        # Split the output and fetch the data\n",
+    "            split_line = line.split()\n",
+    "            values = [float(el) for el in split_line[1:]]\n",
+    "            value_lines.append(values)\n",
+    "\n",
+    "    # Turn into an array\n",
+    "    values_array = np.array(value_lines[1:])\n",
+    "    \n",
+    "    # make dict and fill\n",
+    "    output_dict = {}\n",
+    "    for i in range(len(column_names)):\n",
+    "        output_dict[column_names[i]] = list(values_array[:,i])\n",
+    "\n",
+    "    # Write to file\n",
+    "    with open(output_file, 'w') as f:\n",
+    "        f.write(json.dumps(output_dict, indent=4))\n",
+    "        \n",
+    "    # Return something anyway\n",
+    "    return value_lines"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 15,
+   "id": "57347512-fd4a-434b-b13c-5e6dbd3ac415",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: parse_function=<function object_parse_function at 0x7f9265091598> to grid_options\n",
+      "<<<< Warning: Key does not match previously known parameter:                     adding: output_dir=/tmp/ to custom_options >>>>\n",
+      "Creating and loading custom logging functionality\n",
+      "Running binary_c M_1 10\n",
+      "Cleaning up the custom logging stuff. type: single\n",
+      "Removed /tmp/binary_c_python/custom_logging/libcustom_logging_e9c2bec7f15541eb847fc6013e48e7ed.so\n",
+      "[['time', 'mass', 'initial_mass', 'stellar_type'], [0.0, 10.0, 0.0, 10.0, 1.0], [0.0, 10.0, 10.0, 10.0, 1.0], [1e-06, 10.0, 10.0, 10.0, 1.0]]\n",
+      "dict_keys(['time', 'mass', 'initial_mass', 'stellar_type'])\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_pop.set(\n",
+    "    parse_function=object_parse_function,\n",
+    "    output_dir='/tmp/'\n",
+    ")\n",
+    "output = example_pop.evolve_single()\n",
+    "print(output[:4])\n",
+    "\n",
+    "# Example of loading the data that was written\n",
+    "with open(os.path.join(example_pop.custom_options['output_dir'], 'example_output.json')) as f:\n",
+    "    written_data = json.loads(f.read())\n",
+    "\n",
+    "print(written_data.keys())"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ddc06da3-fc68-4c6f-8067-14ea862b964d",
+   "metadata": {},
+   "source": [
+    "## Single system via API functionality\n",
+    "It is possible to construct your own functionality to run a single system by directly calling the API function to run a system. Under the hood all the other functions and wrappers actually use this API.\n",
+    "\n",
+    "There are less failsafes for this method, so this make sure the input is correct and binary_c knows all the arguments you pass in.\n",
+    "\n",
+    "for more details on this API function see `notebook_api_functions`"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "56886792-d379-4eac-b0d4-54508edb39c7",
+   "metadata": {},
+   "source": [
+    "First we must construct the argument string that we pass to binary_c"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 16,
+   "id": "ec48125c-6bf5-48f4-9357-8261800b5d8b",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "SINGLE_STAR_LIFETIME 15 14.2383\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# For a binary system we need to pass in these arguments\n",
+    "M_1 = 15.0  # Msun\n",
+    "M_2 = 14.0  # Msun\n",
+    "separation = 0  # 0 = ignored, use period\n",
+    "orbital_period = 4530.0  # days\n",
+    "eccentricity = 0.0\n",
+    "metallicity = 0.02\n",
+    "max_evolution_time = 15000  # Myr. You need to include this argument.\n",
+    "\n",
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} M_2 {M_2} separation {separation} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=M_1,\n",
+    "    M_2=M_2,\n",
+    "    separation=separation,\n",
+    "    orbital_period=orbital_period,\n",
+    "    eccentricity=eccentricity,\n",
+    "    metallicity=metallicity,\n",
+    "    max_evolution_time=max_evolution_time,\n",
+    ").strip()\n",
+    "\n",
+    "from binarycpython import _binary_c_bindings\n",
+    "\n",
+    "output = _binary_c_bindings.run_system(argstring)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "55c8ea24-0fc0-452c-8121-1e7667433479",
+   "metadata": {},
+   "source": [
+    "As we can see above, the output is rather empty. But if SINGLE_STAR_LIFETIME is printed we know we caught the output correctly. To get actual output we should have timesteps printed in the `log_every_timestep.c` in binary_c, or add some custom_logging (see notebook_custom_logging). "
+   ]
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/source/notebook_population.ipynb b/docs/source/notebook_population.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..56f3b153c23064e82863f188906d50243e795715
--- /dev/null
+++ b/docs/source/notebook_population.ipynb
@@ -0,0 +1,1213 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "bbbaafbb-fd7d-4b73-a970-93506ba35d71",
+   "metadata": {},
+   "source": [
+    "# Running populations with binarycpython\n",
+    "This notebook will show you how to evolve a population of stars\n",
+    "\n",
+    "Much of the code in the binarycpython package is written to evolve a population of stars through the Population object, rather than running a single system. Let's go through the functionality of this object step by step and set up some example populations. \n",
+    "\n",
+    "At the bottom of this notebook there are some complete example scripts"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "id": "bf6b8673-a2b5-4b50-ad1b-e90671f57470",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "import os\n",
+    "from binarycpython.utils.custom_logging_functions import temp_dir\n",
+    "from binarycpython.utils.grid import Population\n",
+    "\n",
+    "# help(Population) # Uncomment to see the public functions of this object"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "a081ab23-7822-4971-aa82-991548534714",
+   "metadata": {},
+   "source": [
+    "- running ensemble\n",
+    "- using M&S grid"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f268eff3-4e08-4f6b-8b59-f22dba4d2074",
+   "metadata": {},
+   "source": [
+    "## Setting up the Population object\n",
+    "To set up and configure the population object we need to make an object instance of the `Population` object, and add configuration via the `.set()` function.\n",
+    "\n",
+    "There are three categories of options that the Population object can set:\n",
+    "- BSE options: these options will be used for the binary_c calls, and are recognized by comparing the arguments to a known list of available arguments of binary_c. To see which options are available, see section [`binary_c parameters` in the documentation](https://ri0005.pages.surrey.ac.uk/binary_c-python/binary_c_parameters.html). You can access these through `population.bse_options['<bse option name>']` after you have set them. \n",
+    "\n",
+    "- Grid options: these options will be used to configure the behaviour of the Population object. To see which options are available, see section [`Population grid code options` in the documentation](https://ri0005.pages.surrey.ac.uk/binary_c-python/grid_options_descriptions.html). They can be accessed via `population.grid_options['<grid option name>']` after you have set them. \n",
+    "\n",
+    "- Custom options: these options are not recognized as either of the above, so they will be stored in the custom_options, and can be accessed via `population.custom_options['<custom option name>']`"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "id": "79ab50b7-591f-4883-af09-116d1835a751",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: M_1=10 to BSE_options\n",
+      "adding: orbital_period=45000000080 to BSE_options\n",
+      "adding: max_evolution_time=15000 to BSE_options\n",
+      "adding: eccentricity=0.02 to BSE_options\n",
+      "adding: amt_cores=2 to grid_options\n",
+      "<<<< Warning: Key does not match previously known parameter:                     adding: data_dir=/tmp/binary_c_python/example_python_population_result to custom_options >>>>\n",
+      "<<<< Warning: Key does not match previously known parameter:                     adding: base_filename=example_pop.dat to custom_options >>>>\n",
+      "1\n",
+      "example_pop.dat\n",
+      "10\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Create population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# If you want verbosity, set this before other things\n",
+    "example_pop.set(verbosity=1)\n",
+    "\n",
+    "# Setting values can be done via .set(<parameter_name>=<value>)\n",
+    "# Values that are known to be binary_c_parameters are loaded into bse_options.\n",
+    "# Those that are present in the default grid_options are set in grid_options\n",
+    "# All other values that you set are put in a custom_options dict\n",
+    "example_pop.set(\n",
+    "    # binary_c physics options\n",
+    "    M_1=10,  # bse_options\n",
+    "    orbital_period=45000000080,  # bse_options\n",
+    "    max_evolution_time=15000,  # bse_options\n",
+    "    eccentricity=0.02,  # bse_options\n",
+    "\n",
+    "\n",
+    "    # grid_options\n",
+    "    amt_cores=2,  # grid_options\n",
+    "    \n",
+    "    # Custom options # TODO: need to be set in grid_options probably\n",
+    "    data_dir=os.path.join(\n",
+    "        temp_dir(), \"example_python_population_result\"\n",
+    "    ),  # custom_options\n",
+    "    base_filename=\"example_pop.dat\",  # custom_options\n",
+    ")\n",
+    "\n",
+    "# We can use the options through\n",
+    "print(example_pop.grid_options['verbosity'])\n",
+    "print(example_pop.custom_options['base_filename'])\n",
+    "print(example_pop.bse_options['M_1'])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f8d46d19-633d-4911-821d-a59daed31816",
+   "metadata": {},
+   "source": [
+    "After configuring the population, but before running the actual population, its usually a good idea to export the full configuration (including version info of binary_c and all the parameters) to a file. To do this we use `example_pop.export_all_info()`.\n",
+    "\n",
+    "On default this exports everything, each of the sections can be disabled:\n",
+    "  - population settings (bse_options, grid_options, custom_options), turn off with include_population\n",
+    "      settings=False\n",
+    "  - binary_c_defaults (all the commandline arguments that binary c accepts, and their defaults).\n",
+    "      turn off with include_binary_c_defaults=False\n",
+    "  - include_binary_c_version_info (all the compilation info, and information about the compiled\n",
+    "      parameters), turn off with include_binary_c_version_info=False\n",
+    "  - include_binary_c_help_all (all the help information for all the binary_c parameters),\n",
+    "      turn off with include_binary_c_help_all=Fase\n",
+    "      \n",
+    "On default it will write this to the custom_options['data_dir'], but that can be overriden by setting use_datadir=False and providing an outfile=<>"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
+   "id": "b9c2471a-a5b0-48b7-a50b-2f0d22100926",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Writing settings to /tmp/binary_c_python/example_python_population_result/example_pop_settings.json\n"
+     ]
+    },
+    {
+     "data": {
+      "text/plain": [
+       "'/tmp/binary_c_python/example_python_population_result/example_pop_settings.json'"
+      ]
+     },
+     "execution_count": 3,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "example_pop.export_all_info()"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f9a65554-36ab-4a04-96ca-9f1422c307fd",
+   "metadata": {},
+   "source": [
+    "## Adding grid variables\n",
+    "The main purpose of the Population object is to handle the population synthesis side of running a set of stars. The main method to do this with binarycpython, as is the case with Perl binarygrid, is to use grid variables. These are loops over a predefined range of values, where a probability will be assigned to the systems based on the chosen probability distributions.\n",
+    "\n",
+    "Usually we use either 1 mass grid variable, or a trio of mass, mass ratio and period (See below for full examples of all of these). We can, however, also add grid sampling for e.g. eccentricity, metallicity or other parameters. \n",
+    "\n",
+    "In some cases it could be easier to set up a for loop that sets that parameter and calls the evolve function several times, e.g. when you want to vary a prescription (usually a discrete, unweighted parameter) \n",
+    "\n",
+    "\n",
+    "A notable special type of grid variable is that of the Moe & di Stefano 2017 dataset (see further down in the notebook).\n",
+    "\n",
+    "To add a grid variable to the population object we use `example_pop.add_grid_variable` (see next cell)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 4,
+   "id": "68c84521-9ae8-4020-af7a-5334173db969",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Help on method add_grid_variable in module binarycpython.utils.grid:\n",
+      "\n",
+      "add_grid_variable(name:str, longname:str, valuerange:Union[list, str], resolution:str, spacingfunc:str, probdist:str, dphasevol:Union[str, int], parameter_name:str, gridtype:str='edge', branchpoint:int=0, precode:Union[str, NoneType]=None, condition:Union[str, NoneType]=None) -> None method of binarycpython.utils.grid.Population instance\n",
+      "    Function to add grid variables to the grid_options.\n",
+      "    \n",
+      "    The execution of the grid generation will be through a nested for loop.\n",
+      "    Each of the grid variables will get create a deeper for loop.\n",
+      "    \n",
+      "    The real function that generates the numbers will get written to a new file in the TMP_DIR,\n",
+      "    and then loaded imported and evaluated.\n",
+      "    beware that if you insert some destructive piece of code, it will be executed anyway.\n",
+      "    Use at own risk.\n",
+      "    \n",
+      "    Tasks:\n",
+      "        - TODO: Fix this complex function.\n",
+      "    \n",
+      "    Args:\n",
+      "        name:\n",
+      "            name of parameter. This is evaluated as a parameter and you can use it throughout\n",
+      "            the rest of the function\n",
+      "            \n",
+      "            Examples:\n",
+      "                name = 'lnm1'\n",
+      "        longname:\n",
+      "            Long name of parameter\n",
+      "            \n",
+      "            Examples:\n",
+      "                longname = 'Primary mass'\n",
+      "        range:\n",
+      "            Range of values to take. Does not get used really, the spacingfunction is used to\n",
+      "            get the values from\n",
+      "            \n",
+      "            Examples:\n",
+      "                range = [math.log(m_min), math.log(m_max)]\n",
+      "        resolution:\n",
+      "            Resolution of the sampled range (amount of samples).\n",
+      "            TODO: check if this is used anywhere\n",
+      "    \n",
+      "            Examples: \n",
+      "                resolution = resolution[\"M_1\"]\n",
+      "        spacingfunction:\n",
+      "            Function determining how the range is sampled. You can either use a real function,\n",
+      "            or a string representation of a function call. Will get written to a file and\n",
+      "            then evaluated.\n",
+      "    \n",
+      "            Examples:\n",
+      "                spacingfunction = \"const(math.log(m_min), math.log(m_max), {})\".format(resolution['M_1'])\n",
+      "    \n",
+      "        precode:\n",
+      "            Extra room for some code. This code will be evaluated within the loop of the\n",
+      "            sampling function (i.e. a value for lnm1 is chosen already)\n",
+      "            \n",
+      "            Examples:\n",
+      "                precode = 'M_1=math.exp(lnm1);'\n",
+      "        probdist:\n",
+      "            Function determining the probability that gets assigned to the sampled parameter\n",
+      "            \n",
+      "            Examples:\n",
+      "                probdist = 'Kroupa2001(M_1)*M_1'\n",
+      "        dphasevol:\n",
+      "            part of the parameter space that the total probability is calculated with. Put to -1\n",
+      "            if you want to ignore any dphasevol calculations and set the value to 1\n",
+      "            Examples:\n",
+      "                dphasevol = 'dlnm1'\n",
+      "        condition:\n",
+      "            condition that has to be met in order for the grid generation to continue\n",
+      "            Examples:\n",
+      "                condition = 'self.grid_options['binary']==1'\n",
+      "        gridtype:\n",
+      "            Method on how the value range is sampled. Can be either 'edge' (steps starting at\n",
+      "            the lower edge of the value range) or 'center'\n",
+      "            (steps starting at lower edge + 0.5 * stepsize).\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "help(example_pop.add_grid_variable)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "bd75cebe-2152-4025-b680-dc020b80889b",
+   "metadata": {},
+   "source": [
+    "All the distribution functions that we can use are stored in the `binarycpython.utils.distribution_functions` or `binarycpython/utils/distribution_functions.py` on git. If you uncomment the help statement below you can see which functions are available now:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 5,
+   "id": "048db541-3e92-4c5d-a25c-9c5a34b9c857",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [],
+   "source": [
+    "# import binarycpython.utils.distribution_functions\n",
+    "# help(binarycpython.utils.distribution_functions)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "1b3a007b-5c17-42a7-a981-7e268e6f545c",
+   "metadata": {},
+   "source": [
+    "The next cell contains an example of adding the mass grid variable, but sampling in log mass. The commented grid variables are examples of the mass ratio sampling and the period sampling."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 6,
+   "id": "47979841-2c26-4b26-8945-603d013dc93a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Added grid variable: {\n",
+      "    \"name\": \"lnm1\",\n",
+      "    \"longname\": \"Primary mass\",\n",
+      "    \"valuerange\": [\n",
+      "        2,\n",
+      "        150\n",
+      "    ],\n",
+      "    \"resolution\": \"20\",\n",
+      "    \"spacingfunc\": \"const(math.log(2), math.log(150), 20)\",\n",
+      "    \"precode\": \"M_1=math.exp(lnm1)\",\n",
+      "    \"probdist\": \"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+      "    \"dphasevol\": \"dlnm1\",\n",
+      "    \"parameter_name\": \"M_1\",\n",
+      "    \"condition\": \"\",\n",
+      "    \"gridtype\": \"edge\",\n",
+      "    \"branchpoint\": 0,\n",
+      "    \"grid_variable_number\": 0\n",
+      "}\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Add grid variables\n",
+    "resolution = {\"M_1\": 20, \"q\": 20, \"per\": 40}\n",
+    "\n",
+    "# Mass\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"lnm1\",\n",
+    "    longname=\"Primary mass\",\n",
+    "    valuerange=[2, 150],\n",
+    "    resolution=\"{}\".format(resolution[\"M_1\"]),\n",
+    "    spacingfunc=\"const(math.log(2), math.log(150), {})\".format(resolution[\"M_1\"]),\n",
+    "    precode=\"M_1=math.exp(lnm1)\",\n",
+    "    probdist=\"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+    "    dphasevol=\"dlnm1\",\n",
+    "    parameter_name=\"M_1\",\n",
+    "    condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    ")\n",
+    "\n",
+    "# # Mass ratio\n",
+    "# test_pop.add_grid_variable(\n",
+    "#     name=\"q\",\n",
+    "#     longname=\"Mass ratio\",\n",
+    "#     valuerange=[\"0.1/M_1\", 1],\n",
+    "#     resolution=\"{}\".format(resolution['q']),\n",
+    "#     spacingfunc=\"const(0.1/M_1, 1, {})\".format(resolution['q']),\n",
+    "#     probdist=\"flatsections(q, [{'min': 0.1/M_1, 'max': 1.0, 'height': 1}])\",\n",
+    "#     dphasevol=\"dq\",\n",
+    "#     precode=\"M_2 = q * M_1\",\n",
+    "#     parameter_name=\"M_2\",\n",
+    "#     condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    "# )\n",
+    "\n",
+    "# #\n",
+    "# test_pop.add_grid_variable(\n",
+    "#    name=\"log10per\", # in days\n",
+    "#    longname=\"log10(Orbital_Period)\",\n",
+    "#    valuerange=[0.15, 5.5],\n",
+    "#    resolution=\"{}\".format(resolution[\"per\"]),\n",
+    "#    spacingfunc=\"const(0.15, 5.5, {})\".format(resolution[\"per\"]),\n",
+    "#    precode=\"\"\"orbital_period = 10** log10per\n",
+    "# sep = calc_sep_from_period(M_1, M_2, orbital_period)\n",
+    "# sep_min = calc_sep_from_period(M_1, M_2, 10**0.15)\n",
+    "# sep_max = calc_sep_from_period(M_1, M_2, 10**5.5)\"\"\",\n",
+    "#    probdist=\"sana12(M_1, M_2, sep, orbital_period, sep_min, sep_max, math.log10(10**0.15), math.log10(10**5.5), -0.55)\",\n",
+    "#    parameter_name=\"orbital_period\",\n",
+    "#    dphasevol=\"dlog10per\",\n",
+    "# )\n"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "163f13ae-fec1-4ee8-b9d4-c1b75c19ff39",
+   "metadata": {},
+   "source": [
+    "## Setting logging and handling the output\n",
+    "On default, binary_c will not output anything (except for 'SINGLE STAR LIFETIME'). It is up to us to determine what will be printed. We can either do that by hardcoding the print statements into `binary_c` (see documentation binary_c). Or, we can use the custom logging functionality of binarycpython (see notebook `notebook_custom_logging.ipynb`), which is faster to set up and requires no recompilation of binary_c, but is somewhat more limited in its functionality. \n",
+    "\n",
+    "After configuring what will be printed, we need to make a function to parse the output. This can be done by setting the parse_function parameter in the population object (see also notebook `notebook_individual_systems.ipynb`). \n",
+    "\n",
+    "In the code below we will set up both the custom logging, and a parse function to handle that output"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "0c986215-93b1-4e30-ad79-f7c397e9ff7d",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: C_logging_code=\n",
+      "if(stardata->star[0].stellar_type >= 13)    \n",
+      "{\n",
+      "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+      "    {\n",
+      "        Printf(\"EXAMPLE_COMPACT_OBJECT %30.12e %g %g %g %d\\n\",\n",
+      "            // \n",
+      "            stardata->model.time, // 1\n",
+      "            stardata->star[0].mass, // 2\n",
+      "            stardata->common.zero_age.mass[0], // 3\n",
+      "            stardata->model.probability, // 4\n",
+      "            stardata->star[0].stellar_type // 5\n",
+      "      );\n",
+      "    };\n",
+      "    /* Kill the simulation to save time */\n",
+      "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+      "};\n",
+      " to grid_options\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Create custom logging statement: in this case we will log when the star turns into a compact object, and then terminate the evolution.\n",
+    "custom_logging_statement = \"\"\"\n",
+    "if(stardata->star[0].stellar_type >= 13)    \n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"EXAMPLE_COMPACT_OBJECT %30.12e %g %g %g %d\\\\n\",\n",
+    "            // \n",
+    "            stardata->model.time, // 1\n",
+    "            stardata->star[0].mass, // 2\n",
+    "            stardata->common.zero_age.mass[0], // 3\n",
+    "            stardata->model.probability, // 4\n",
+    "            stardata->star[0].stellar_type // 5\n",
+    "      );\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "example_pop.set(\n",
+    "    C_logging_code=custom_logging_statement\n",
+    ")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ae1f1f0c-1f8b-42d8-b051-cbf8c6b51514",
+   "metadata": {},
+   "source": [
+    "The parse function must now catch lines that start with \"EXAMPLE_COMPACT_OBJECT\", and write that line to a file"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 8,
+   "id": "fd197154-a8ce-4865-8929-008d3483101a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: parse_function=<function parse_function at 0x7ff3bdf79620> to grid_options\n"
+     ]
+    }
+   ],
+   "source": [
+    "def parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parse function\n",
+    "    \"\"\"\n",
+    "    \n",
+    "    # get info from the population instance\n",
+    "    data_dir = self.custom_options[\"data_dir\"]\n",
+    "    base_filename = self.custom_options[\"base_filename\"]\n",
+    "\n",
+    "    # Check directory, make if necessary\n",
+    "    os.makedirs(data_dir, exist_ok=True)\n",
+    "\n",
+    "    seperator = \" \"\n",
+    "\n",
+    "    # Create filename\n",
+    "    outfilename = os.path.join(data_dir, base_filename)\n",
+    "\n",
+    "    parameters = [\"time\", \"mass\", \"zams_mass\", \"probability\", \"stellar_type\"]\n",
+    "\n",
+    "    # Go over the output.\n",
+    "    for line in output.splitlines():\n",
+    "        headerline = line.split()[0]\n",
+    "\n",
+    "        # CHeck the header and act accordingly\n",
+    "        if headerline == \"EXAMPLE_COMPACT_OBJECT\":\n",
+    "            values = line.split()[1:]\n",
+    "            print(line)\n",
+    "            \n",
+    "            if not len(parameters) == len(values):\n",
+    "                print(\"Amount of column names isnt equal to amount of columns\")\n",
+    "                raise ValueError\n",
+    "\n",
+    "            if not os.path.exists(outfilename):\n",
+    "                with open(outfilename, \"w\") as f:\n",
+    "                    f.write(seperator.join(parameters) + \"\\n\")\n",
+    "\n",
+    "            with open(outfilename, \"a\") as f:\n",
+    "                f.write(seperator.join(values) + \"\\n\")\n",
+    "\n",
+    "# Add the parsing function\n",
+    "example_pop.set(\n",
+    "    parse_function=parse_function,\n",
+    ")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "91509ce5-ffe7-4937-aa87-6d7baac9ac04",
+   "metadata": {},
+   "source": [
+    "## Evolving the grid\n",
+    "Now that we configured all the main parts of the population object, we can actually run the population! Doing this is straightforward: `example_pop.evolve()`\n",
+    "\n",
+    "This will start up the processing of all the systems. We can control how many cores are used by settings `amt_cores`. By setting the `verbosity` of the population object to a higher value we can get a lot of verbose information about the run, but for now we will set it to 0.\n",
+    "\n",
+    "There are many grid_options that can lead to different behaviour of the evolution of the grid. Please do have a look at those: [grid options docs](https://ri0005.pages.surrey.ac.uk/binary_c-python/grid_options_descriptions.html), and try  "
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 9,
+   "id": "8ea376c1-1e92-45af-8cab-9d7fdca564eb",
+   "metadata": {
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: verbosity=0 to grid_options\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Grid has handled 20 stars\n",
+      "with a total probability of 0.05150046619238192\n",
+      "Total starcount for this run will be: 20\n",
+      "EXAMPLE_COMPACT_OBJECT             2.867655467480e+01 1.33079 9.81391 0.00167028 13\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "EXAMPLE_COMPACT_OBJECT             1.931266944719e+01 1.3933 12.3177 0.00124307 13\n",
+      "EXAMPLE_COMPACT_OBJECT             4.439623364590e+01 1.38004 7.81906 0.00224431 13\n",
+      "EXAMPLE_COMPACT_OBJECT             1.364277535630e+01 1.47961 15.4603 0.000925128 13\n",
+      "EXAMPLE_COMPACT_OBJECT             1.017435498578e+01 1.59052 19.4046 0.000688507 13\n",
+      "EXAMPLE_COMPACT_OBJECT             8.294870923827e+00 1.7197 24.3552 0.000512406 13\n",
+      "EXAMPLE_COMPACT_OBJECT             6.802132608769e+00 1.84162 30.5689 0.000381347 13\n",
+      "EXAMPLE_COMPACT_OBJECT             5.723570798020e+00 1.99471 38.3678 0.00028381 13\n",
+      "EXAMPLE_COMPACT_OBJECT             4.933751523833e+00 2.15875 48.1564 0.000211219 13\n",
+      "EXAMPLE_COMPACT_OBJECT             4.337250536639e+00 2.35209 60.4424 0.000157195 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.862081089332e+00 2.56776 75.8628 0.000116989 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.449960890183e+00 2.80457 95.2174 8.70668e-05 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.172196856333e+00 3.05193 119.51 6.47976e-05 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.069627290216e+00 3.27563 150 4.82242e-05 14\n",
+      "Population-2a7732d03e594ef4b5dfe9051b41d9c0 finished! The total probability was: 0.05150046619238191. It took a total of 0.7797017097473145s to run 20 systems on 2 cores\n",
+      "There were no errors found in this run.\n"
+     ]
+    }
+   ],
+   "source": [
+    "# change verbosity\n",
+    "example_pop.set(verbosity=0)\n",
+    "\n",
+    "## Executing a population\n",
+    "## This uses the values generated by the grid_variables\n",
+    "analytics = example_pop.evolve()  # TODO: update this function call"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "91ab45c7-7d31-4543-aee4-127ab58e891f",
+   "metadata": {},
+   "source": [
+    "After the run is complete, some technical report on the run is returned. I stored that in `analytics`. As we can see below, this dictionary is like a status report of the evolution. Useful for e.g. debugging."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 10,
+   "id": "e1f0464b-0424-4022-b34b-5b744bc2c59d",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "{'population_name': '2a7732d03e594ef4b5dfe9051b41d9c0', 'evolution_type': 'grid', 'failed_count': 0, 'failed_prob': 0, 'failed_systems_error_codes': [], 'errors_exceeded': False, 'errors_found': False, 'total_probability': 0.05150046619238191, 'total_count': 20, 'start_timestamp': 1628444120.234709, 'end_timestamp': 1628444121.0144107, 'total_mass_run': 730.1048014407228, 'total_probability_weighted_mass_run': 0.2983275843337705, 'zero_prob_stars_skipped': 0}\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(analytics)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "6460df56-9fba-4817-9a1e-593ef15d98c1",
+   "metadata": {},
+   "source": [
+    "## Noteworthy functionality\n",
+    "Some extra features that are available from via the population object are:\n",
+    "- write_binary_c_calls_to_file: Function to write the calls that would be passed to binary_c to a file"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 11,
+   "id": "83f8e519-4f7c-474a-ad95-f175a34fae81",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Help on method write_binary_c_calls_to_file in module binarycpython.utils.grid:\n",
+      "\n",
+      "write_binary_c_calls_to_file(output_dir:Union[str, NoneType]=None, output_filename:Union[str, NoneType]=None, include_defaults:bool=False) -> None method of binarycpython.utils.grid.Population instance\n",
+      "    Function that loops over the grid code and writes the generated parameters to a file.\n",
+      "    In the form of a command line call\n",
+      "    \n",
+      "    Only useful when you have a variable grid as system_generator. MC wouldn't be that useful\n",
+      "    \n",
+      "    Also, make sure that in this export there are the basic parameters\n",
+      "    like m1,m2,sep, orb-per, ecc, probability etc.\n",
+      "    \n",
+      "    On default this will write to the datadir, if it exists\n",
+      "    \n",
+      "    Tasks:\n",
+      "        - TODO: test this function\n",
+      "        - TODO: make sure the binary_c_python .. output file has a unique name\n",
+      "    \n",
+      "    Args:\n",
+      "        output_dir: (optional, default = None) directory where to write the file to. If custom_options['data_dir'] is present, then that one will be used first, and then the output_dir\n",
+      "        output_filename: (optional, default = None) filename of the output. If not set it will be called \"binary_c_calls.txt\"\n",
+      "        include_defaults: (optional, default = None) whether to include the defaults of binary_c in the lines that are written. Beware that this will result in very long lines, and it might be better to just export the binary_c defaults and keep them in a separate file.\n",
+      "    \n",
+      "    Returns:\n",
+      "        filename: filename that was used to write the calls to\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "help(example_pop.write_binary_c_calls_to_file)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 12,
+   "id": "dacfed75-dfe3-4afd-a0ff-a4be17746021",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Generating grid code\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Saving grid code to grid_options\n",
+      "Writing grid code to /tmp/binary_c_python/binary_c_grid_2a7732d03e594ef4b5dfe9051b41d9c0.py\n",
+      "Loading grid code function from /tmp/binary_c_python/binary_c_grid_2a7732d03e594ef4b5dfe9051b41d9c0.py\n",
+      "Grid code loaded\n",
+      "Writing binary_c calls to /tmp/binary_c_python/example_python_population_result/binary_c_calls.txt\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "Grid has handled 20 stars\n",
+      "with a total probability of 0.05150046619238192\n",
+      "/tmp/binary_c_python/example_python_population_result/binary_c_calls.txt\n",
+      "binary_c M_1 2.0 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.013208238029791246\n",
+      "binary_c M_1 2.5102526289471614 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.009829948023831718\n",
+      "binary_c M_1 3.1506841305680684 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.0073157281034221516\n",
+      "binary_c M_1 3.9545065608702976 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.005444573822104362\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_pop.set(verbosity=10)\n",
+    "calls_filename = example_pop.write_binary_c_calls_to_file()\n",
+    "print(calls_filename)\n",
+    "\n",
+    "with open(calls_filename, 'r') as f:\n",
+    "    print('\\n'.join(f.read().splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "60359eb1-4d0c-4d2d-8265-ec5171b944a2",
+   "metadata": {},
+   "source": [
+    "## Full examples of population scripts\n",
+    "Below is a full setup for a population of single stars"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 13,
+   "id": "7212b6be-9787-4122-a7f1-86538cf38179",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Grid has handled 20 stars\n",
+      "with a total probability of 0.05150046619238192\n",
+      "Total starcount for this run will be: 20\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Population-3680f3882c0a449c944462abffea2447 finished! The total probability was: 0.05150046619238191. It took a total of 0.6246354579925537s to run 20 systems on 2 cores\n",
+      "There were no errors found in this run.\n",
+      "\n",
+      "\n",
+      "time mass zams_mass probability radius stellar_type\n",
+      "2.867655467480e+01 1.33079 9.81391 0.00167028 1.72498e-05 13\n",
+      "1.931266944719e+01 1.3933 12.3177 0.00124307 1.72498e-05 13\n",
+      "4.439623364590e+01 1.38004 7.81906 0.00224431 1.72498e-05 13\n",
+      "1.364277535630e+01 1.47961 15.4603 0.000925128 1.72498e-05 13\n",
+      "1.017435498578e+01 1.59052 19.4046 0.000688507 1.72498e-05 13\n",
+      "8.294870923827e+00 1.7197 24.3552 0.000512406 1.72498e-05 13\n",
+      "6.802132608769e+00 1.84162 30.5689 0.000381347 1.72498e-05 13\n",
+      "5.723570798020e+00 1.99471 38.3678 0.00028381 1.72498e-05 13\n",
+      "4.933751523833e+00 2.15875 48.1564 0.000211219 1.72498e-05 13\n",
+      "4.337250536639e+00 2.35209 60.4424 0.000157195 9.97286e-06 14\n",
+      "3.862081089332e+00 2.56776 75.8628 0.000116989 1.08873e-05 14\n",
+      "3.449960890183e+00 2.80457 95.2174 8.70668e-05 1.18914e-05 14\n",
+      "3.172196856333e+00 3.05193 119.51 6.47976e-05 1.29402e-05 14\n",
+      "3.069627290216e+00 3.27563 150 4.82242e-05 1.38887e-05 14\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "import os\n",
+    "\n",
+    "from binarycpython.utils.grid import Population\n",
+    "from binarycpython.utils.custom_logging_functions import temp_dir\n",
+    "\n",
+    "def parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parsing function\n",
+    "    \"\"\"\n",
+    "    \n",
+    "    # extract info from the population instance\n",
+    "\n",
+    "    # Get some information from the\n",
+    "    data_dir = self.custom_options[\"data_dir\"]\n",
+    "    base_filename = self.custom_options[\"base_filename\"]\n",
+    "\n",
+    "    # Check directory, make if necessary\n",
+    "    os.makedirs(data_dir, exist_ok=True)\n",
+    "\n",
+    "    #\n",
+    "    seperator = \" \"\n",
+    "\n",
+    "    # Create filename\n",
+    "    outfilename = os.path.join(data_dir, base_filename)\n",
+    "\n",
+    "    # The header columns matching this \n",
+    "    parameters = [\"time\", \"mass\", \"zams_mass\", \"probability\", \"radius\", \"stellar_type\"]\n",
+    "\n",
+    "    # Go over the output.\n",
+    "    for el in output.splitlines():\n",
+    "        headerline = el.split()[0]\n",
+    "\n",
+    "        # CHeck the header and act accordingly\n",
+    "        if headerline == \"MY_STELLAR_DATA\":\n",
+    "            values = el.split()[1:]\n",
+    "\n",
+    "            if not len(parameters) == len(values):\n",
+    "                print(\"Amount of column names isnt equal to amount of columns\")\n",
+    "                raise ValueError\n",
+    "\n",
+    "            if not os.path.exists(outfilename):\n",
+    "                with open(outfilename, \"w\") as f:\n",
+    "                    f.write(seperator.join(parameters) + \"\\n\")\n",
+    "\n",
+    "            with open(outfilename, \"a\") as f:\n",
+    "                f.write(seperator.join(values) + \"\\n\")\n",
+    "\n",
+    "\n",
+    "# Create population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# If you want verbosity, set this before other things\n",
+    "example_pop.set(verbosity=0)\n",
+    "\n",
+    "# Setting values can be done via .set(<parameter_name>=<value>)\n",
+    "example_pop.set(\n",
+    "    # binary_c physics options\n",
+    "    M_1=10,  # bse_options\n",
+    "    separation=0,  # bse_options\n",
+    "    orbital_period=45000000080,  # bse_options\n",
+    "    max_evolution_time=15000,  # bse_options\n",
+    "    eccentricity=0.02,  # bse_options\n",
+    "    \n",
+    "    # grid_options\n",
+    "    amt_cores=2,  # grid_options\n",
+    "\n",
+    "    # Custom options: the data directory and the output filename\n",
+    "    data_dir=os.path.join(\n",
+    "        temp_dir(), \"example_python_population_result\"\n",
+    "    ),  # custom_options\n",
+    "    base_filename=\"example_pop.dat\",  # custom_options\n",
+    ")\n",
+    "\n",
+    "# Creating a parsing function\n",
+    "example_pop.set(\n",
+    "    parse_function=parse_function,  # Setting the parse function thats used in the evolve_population\n",
+    ")\n",
+    "\n",
+    "### Custom logging\n",
+    "# Log the moment when the star turns into neutron\n",
+    "example_pop.set(\n",
+    "    C_logging_code=\"\"\"\n",
+    "if(stardata->star[0].stellar_type >= 13)    \n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"MY_STELLAR_DATA %30.12e %g %g %g %g %d\\\\n\",\n",
+    "            // \n",
+    "            stardata->model.time, // 1\n",
+    "            stardata->star[0].mass, // 2\n",
+    "            stardata->common.zero_age.mass[0], // 4\n",
+    "            stardata->model.probability, // 5\n",
+    "            stardata->star[0].radius, // 6\n",
+    "            stardata->star[0].stellar_type // 7\n",
+    "      );\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    ")\n",
+    "\n",
+    "# Add grid variables\n",
+    "resolution = {\"M_1\": 20}\n",
+    "\n",
+    "# Mass\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"lnm1\",\n",
+    "    longname=\"Primary mass\",\n",
+    "    valuerange=[2, 150],\n",
+    "    resolution=\"{}\".format(resolution[\"M_1\"]),\n",
+    "    spacingfunc=\"const(math.log(2), math.log(150), {})\".format(resolution[\"M_1\"]),\n",
+    "    precode=\"M_1=math.exp(lnm1)\",\n",
+    "    probdist=\"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+    "    dphasevol=\"dlnm1\",\n",
+    "    parameter_name=\"M_1\",\n",
+    "    condition=\"\",\n",
+    ")\n",
+    "\n",
+    "# Exporting of all the settings can be done with .export_all_info()\n",
+    "example_pop.export_all_info()\n",
+    "\n",
+    "# remove the result file if it exists\n",
+    "if os.path.isfile(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\")):\n",
+    "    os.remove(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"))\n",
+    "\n",
+    "\n",
+    "# Evolve the population\n",
+    "example_pop.evolve()\n",
+    "\n",
+    "# \n",
+    "with open(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"), 'r') as f:\n",
+    "    output = f.read()\n",
+    "print(\"\\n\")\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "c2ab0979-6575-481d-9c1c-ca98517b2437",
+   "metadata": {},
+   "source": [
+    "We can also set up a population that samples biinary systems, by adding extra grid variables. Below is an example of a full script that runs a binary population and registers when a double compact object is formed. The logging is rather compact and should be expanded top be more useful"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 14,
+   "id": "79acdbb2-7dd6-45c4-9609-80994f03619a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Constructing/adding: q\n",
+      "Constructing/adding: log10per\n",
+      "Grid has handled 125 stars\n",
+      "with a total probability of 0.0862478164626921\n",
+      "Total starcount for this run will be: 125\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Constructing/adding: q\n",
+      "Constructing/adding: log10per\n",
+      "Population-d20a4c74d20a43b881c0c9e5def5f76c finished! The total probability was: 0.08624781646269201. It took a total of 8.561265707015991s to run 125 systems on 2 cores\n",
+      "There were no errors found in this run.\n",
+      "\n",
+      "\n",
+      "time mass_1 zams_mass_1 mass_2 zams_mass_2 stellar_type_1 prev_stellar_type_1 stellar_type_2 prev_stellar_type_2 metallicity probability\n",
+      "8.863377990313e+01 1.29444 5.88566 0 2.99283 13 5 15 15 0.02 0.000627913\n",
+      "1.146421815741e+02 0 5.88566 1.33062 4.43925 15 15 13 5 0.02 0.000627913\n",
+      "7.222715508467e+01 1.34922 5.88566 0 5.88566 13 5 15 15 0.02 0.000627913\n",
+      "1.350021848285e+01 1.48488 17.3205 0 0.1 13 5 15 15 0.02 0.000154349\n",
+      "1.171108213270e+01 1.53113 17.3205 0 0.1 13 5 15 15 0.02 0.000154349\n",
+      "1.171086983243e+01 1.53177 17.3205 0 0.1 13 9 15 15 0.02 0.000154349\n",
+      "1.170770599495e+01 1.53176 17.3205 0 4.40513 13 5 15 15 0.02 0.000172877\n",
+      "1.230407246199e+01 1.59499 17.3205 0 4.40513 13 5 15 15 0.02 0.000610573\n",
+      "1.108751340926e+01 1.70319 17.3205 0 8.71025 13 4 15 15 0.02 0.000610573\n",
+      "1.941017702765e+01 1.34903 17.3205 1.65097 8.71025 13 13 13 5 0.02 0.000172877\n",
+      "1.980988739731e+01 1.36979 17.3205 1.60808 8.71025 13 13 13 5 0.02 0.000121486\n",
+      "3.571858031651e+01 1.53174 17.3205 1.30504 8.71025 13 13 13 5 0.02 8.42148e-05\n",
+      "3.459153942631e+01 1.53176 17.3205 1.31004 8.71025 13 13 13 5 0.02 9.8162e-05\n",
+      "1.687368550125e+01 1.34937 17.3205 1.73856 13.0154 13 13 13 8 0.02 0.000172877\n",
+      "1.194842917007e+01 1.78096 17.3205 0 13.0154 13 8 15 15 0.02 0.000610573\n",
+      "1.733614170983e+01 1.53184 17.3205 1.42375 13.0154 13 13 13 5 0.02 9.8162e-05\n",
+      "1.723547465714e+01 1.38403 17.3205 1.71288 13.0154 13 13 13 8 0.02 0.000121486\n",
+      "1.764340254985e+01 1.53174 17.3205 1.41264 13.0154 13 13 13 5 0.02 8.42148e-05\n",
+      "1.170425790780e+01 1.52963 17.3205 0 17.3205 13 5 15 15 0.02 0.000172877\n",
+      "8.922967341481e+00 1.85486 17.3205 0 17.3205 13 8 15 15 0.02 0.000610573\n",
+      "1.232906623449e+01 1.41074 17.3205 1.34281 17.3205 13 13 13 8 0.02 0.000121486\n",
+      "1.170775828562e+01 1.53183 17.3205 1.53183 17.3205 13 5 13 5 0.02 9.8162e-05\n",
+      "1.170770422321e+01 1.53175 17.3205 1.53175 17.3205 13 5 13 5 0.02 8.42148e-05\n",
+      "5.075844624794e+00 2.12303 50.9713 0 0.1 13 8 15 15 0.02 3.79411e-05\n",
+      "4.766606588165e+00 2.20484 50.9713 0 0.1 14 8 15 15 0.02 3.79411e-05\n",
+      "4.768305081494e+00 2.18838 50.9713 0 0.1 13 8 15 15 0.02 3.79411e-05\n",
+      "4.458869865939e+00 2.29864 50.9713 0 12.8178 14 8 15 15 0.02 0.000150087\n",
+      "1.806014211040e+01 2.10446 50.9713 1.40749 12.8178 13 13 13 5 0.02 2.9863e-05\n",
+      "4.797342083485e+00 2.10328 50.9713 0 12.8178 13 13 15 1 0.02 4.24954e-05\n",
+      "1.721374713429e+01 2.21673 50.9713 1.42212 12.8178 14 14 13 5 0.02 2.41295e-05\n",
+      "4.055645404546e+00 2.47276 50.9713 0 25.5357 14 7 15 15 0.02 0.000150087\n",
+      "1.806123543037e+01 2.21893 50.9713 1.40745 12.8178 14 14 13 5 0.02 2.07011e-05\n",
+      "8.117519147635e+00 2.10433 50.9713 2.21473 25.5357 13 13 14 8 0.02 4.24954e-05\n",
+      "8.315554923168e+00 2.15343 50.9713 2.08519 25.5357 13 13 13 8 0.02 2.9863e-05\n",
+      "7.917420996633e+00 2.21892 50.9713 1.7431 25.5357 14 14 13 8 0.02 2.07011e-05\n",
+      "7.693213405973e+00 2.21805 50.9713 1.78384 25.5357 14 14 13 8 0.02 2.41295e-05\n",
+      "3.753837732894e+00 2.62517 50.9713 0 38.2535 14 7 15 15 0.02 0.000150087\n",
+      "7.087296558990e+00 2.10417 50.9713 2.40935 38.2535 13 13 14 8 0.02 4.24954e-05\n",
+      "7.007109286263e+00 2.15854 50.9713 2.28672 38.2535 13 13 14 8 0.02 2.9863e-05\n",
+      "5.653200958306e+00 2.21878 50.9713 2.0587 38.2535 14 14 13 8 0.02 2.41295e-05\n",
+      "5.733794947644e+00 2.21892 50.9713 1.99255 38.2535 14 14 13 8 0.02 2.07011e-05\n",
+      "3.513216011269e+00 2.76647 50.9713 0 50.9713 14 7 15 15 0.02 0.000150087\n",
+      "4.750574783854e+00 2.27442 50.9713 0 50.9713 14 8 15 15 0.02 4.24954e-05\n",
+      "7.278384712062e+00 1.29678 50.9713 2.09216 50.9713 13 8 13 13 0.02 2.9863e-05\n",
+      "4.765996194699e+00 2.20787 50.9713 2.20787 50.9713 14 8 14 8 0.02 2.07011e-05\n",
+      "4.765535914728e+00 2.21331 50.9713 2.21331 50.9713 14 8 14 8 0.02 2.41295e-05\n",
+      "3.104706358826e+00 3.17639 150 0 0.1 14 7 15 15 0.02 9.32641e-06\n",
+      "3.069363482023e+00 3.27572 150 0 0.1 14 7 15 15 0.02 9.32641e-06\n",
+      "3.047074050271e+00 3.3836 150 0 37.575 14 7 15 15 0.02 3.68933e-05\n",
+      "5.974759306305e+00 3.23604 150 2.53922 37.575 14 14 14 7 0.02 1.04459e-05\n",
+      "6.074084349384e+00 3.30145 150 2.13876 37.575 14 14 13 8 0.02 7.34071e-06\n",
+      "5.733865371895e+00 3.29994 150 2.00498 37.575 14 14 13 8 0.02 5.93135e-06\n",
+      "3.027099358410e+00 3.53631 150 0 75.05 14 7 15 15 0.02 3.68933e-05\n",
+      "5.807147339697e+00 3.30197 150 1.9791 37.575 14 14 13 8 0.02 5.08861e-06\n",
+      "4.862942347290e+00 3.25294 150 2.97823 75.05 14 14 14 7 0.02 1.04459e-05\n",
+      "4.556479830908e+00 3.29942 150 2.73221 75.05 14 14 14 7 0.02 7.34071e-06\n",
+      "3.853070305680e+00 3.29977 150 2.62486 75.05 14 14 14 7 0.02 5.93135e-06\n",
+      "3.881529045940e+00 3.30149 150 2.55924 75.05 14 14 14 7 0.02 5.08861e-06\n",
+      "3.015033359333e+00 3.64419 150 0 112.525 14 7 15 15 0.02 3.68933e-05\n",
+      "4.126828648362e+00 3.32047 150 0 112.525 14 14 15 3 0.02 1.04459e-05\n",
+      "3.990017992944e+00 3.3032 150 2.94027 112.525 14 14 14 7 0.02 7.34071e-06\n",
+      "3.206771867883e+00 3.07671 150 3.11282 112.525 14 14 14 7 0.02 5.93135e-06\n",
+      "3.006827156705e+00 3.72638 150 0 150 14 7 15 15 0.02 3.68933e-05\n",
+      "3.218786094847e+00 3.30337 150 3.01344 112.525 14 14 14 7 0.02 5.08861e-06\n",
+      "4.527722847382e+00 1.42238 150 0 150 13 5 15 15 0.02 1.04459e-05\n",
+      "3.069567332611e+00 3.27804 150 3.27804 150 14 7 14 7 0.02 5.93135e-06\n",
+      "5.726405299909e+00 1.29746 150 3.22759 150 13 8 14 14 0.02 7.34071e-06\n",
+      "3.069626478211e+00 3.27565 150 3.27565 150 14 7 14 7 0.02 5.08861e-06\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "import os\n",
+    "\n",
+    "from binarycpython.utils.grid import Population\n",
+    "from binarycpython.utils.custom_logging_functions import temp_dir\n",
+    "\n",
+    "def parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parsing function\n",
+    "    \"\"\"\n",
+    "    \n",
+    "    # extract info from the population instance\n",
+    "\n",
+    "    # Get some information from the\n",
+    "    data_dir = self.custom_options[\"data_dir\"]\n",
+    "    base_filename = self.custom_options[\"base_filename\"]\n",
+    "\n",
+    "    # Check directory, make if necessary\n",
+    "    os.makedirs(data_dir, exist_ok=True)\n",
+    "\n",
+    "    #\n",
+    "    seperator = \" \"\n",
+    "\n",
+    "    # Create filename\n",
+    "    outfilename = os.path.join(data_dir, base_filename)\n",
+    "\n",
+    "    # The header columns matching this \n",
+    "    parameters = [\n",
+    "        \"time\", \n",
+    "        \"mass_1\", \"zams_mass_1\", \"mass_2\", \"zams_mass_2\",\n",
+    "        \"stellar_type_1\", \"prev_stellar_type_1\", \"stellar_type_2\", \"prev_stellar_type_2\", \n",
+    "        \"metallicity\", \"probability\"\n",
+    "    ]\n",
+    "    \n",
+    "    # Go over the output.\n",
+    "    for el in output.splitlines():\n",
+    "        headerline = el.split()[0]\n",
+    "\n",
+    "        # CHeck the header and act accordingly\n",
+    "        if headerline == \"EXAMPLE_DCO\":\n",
+    "            values = el.split()[1:]\n",
+    "\n",
+    "            if not len(parameters) == len(values):\n",
+    "                print(\"Amount of column names isnt equal to amount of columns\")\n",
+    "                raise ValueError\n",
+    "\n",
+    "            if not os.path.exists(outfilename):\n",
+    "                with open(outfilename, \"w\") as f:\n",
+    "                    f.write(seperator.join(parameters) + \"\\n\")\n",
+    "\n",
+    "            with open(outfilename, \"a\") as f:\n",
+    "                f.write(seperator.join(values) + \"\\n\")\n",
+    "\n",
+    "\n",
+    "# Create population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# If you want verbosity, set this before other things\n",
+    "example_pop.set(verbosity=0)\n",
+    "\n",
+    "# Setting values can be done via .set(<parameter_name>=<value>)\n",
+    "example_pop.set(\n",
+    "    # binary_c physics options\n",
+    "    M_1=10,  # bse_options\n",
+    "    separation=0,  # bse_options\n",
+    "    orbital_period=45000000080,  # bse_options\n",
+    "    max_evolution_time=15000,  # bse_options\n",
+    "    eccentricity=0.02,  # bse_options\n",
+    "    \n",
+    "    # grid_options\n",
+    "    amt_cores=2,  # grid_options\n",
+    "\n",
+    "    # Custom options: the data directory and the output filename\n",
+    "    data_dir=os.path.join(\n",
+    "        temp_dir(), \"example_python_population_result\"\n",
+    "    ),  # custom_options\n",
+    "    base_filename=\"example_pop.dat\",  # custom_options\n",
+    ")\n",
+    "\n",
+    "# Creating a parsing function\n",
+    "example_pop.set(\n",
+    "    parse_function=parse_function,  # Setting the parse function thats used in the evolve_population\n",
+    ")\n",
+    "\n",
+    "### Custom logging\n",
+    "# Log the moment when the star turns into neutron\n",
+    "example_pop.set(\n",
+    "    C_logging_code=\"\"\"\n",
+    "// logger to find gravitational wave progenitors\n",
+    "if(stardata->star[0].stellar_type>=NS && stardata->star[1].stellar_type>=NS)\n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"EXAMPLE_DCO %30.12e \" // 1\n",
+    "            \"%g %g %g %g \" // 2-5\n",
+    "            \"%d %d %d %d \" // 6-9\n",
+    "            \"%g %g\\\\n\", // 10-11\n",
+    "\n",
+    "            stardata->model.time, // 1\n",
+    "\n",
+    "            stardata->star[0].mass, //2\n",
+    "            stardata->common.zero_age.mass[0], //3\n",
+    "            stardata->star[1].mass, //4\n",
+    "            stardata->common.zero_age.mass[1], //5\n",
+    "\n",
+    "            stardata->star[0].stellar_type, //6\n",
+    "            stardata->previous_stardata->star[0].stellar_type, //7\n",
+    "            stardata->star[1].stellar_type, //8\n",
+    "            stardata->previous_stardata->star[1].stellar_type, //9\n",
+    "\n",
+    "            // model stuff\n",
+    "            stardata->common.metallicity, //10\n",
+    "            stardata->model.probability //11\n",
+    "        );\n",
+    "    }\n",
+    "    /* Kill the simulation to safe time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "}\n",
+    "\"\"\"\n",
+    ")\n",
+    "\n",
+    "# Add grid variables\n",
+    "resolution = {\"M_1\": 5, \"q\": 5, \"per\": 5}\n",
+    "\n",
+    "# Mass\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"lnm1\",\n",
+    "    longname=\"Primary mass\",\n",
+    "    valuerange=[2, 150],\n",
+    "    resolution=\"{}\".format(resolution[\"M_1\"]),\n",
+    "    spacingfunc=\"const(math.log(2), math.log(150), {})\".format(resolution[\"M_1\"]),\n",
+    "    precode=\"M_1=math.exp(lnm1)\",\n",
+    "    probdist=\"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+    "    dphasevol=\"dlnm1\",\n",
+    "    parameter_name=\"M_1\",\n",
+    "    condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    ")\n",
+    "\n",
+    "# Mass ratio\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"q\",\n",
+    "    longname=\"Mass ratio\",\n",
+    "    valuerange=[\"0.1/M_1\", 1],\n",
+    "    resolution=\"{}\".format(resolution['q']),\n",
+    "    spacingfunc=\"const(0.1/M_1, 1, {})\".format(resolution['q']),\n",
+    "    probdist=\"flatsections(q, [{'min': 0.1/M_1, 'max': 1.0, 'height': 1}])\",\n",
+    "    dphasevol=\"dq\",\n",
+    "    precode=\"M_2 = q * M_1\",\n",
+    "    parameter_name=\"M_2\",\n",
+    "    condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    ")\n",
+    "\n",
+    "#\n",
+    "example_pop.add_grid_variable(\n",
+    "   name=\"log10per\", # in days\n",
+    "   longname=\"log10(Orbital_Period)\",\n",
+    "   valuerange=[0.15, 5.5],\n",
+    "   resolution=\"{}\".format(resolution[\"per\"]),\n",
+    "   spacingfunc=\"const(0.15, 5.5, {})\".format(resolution[\"per\"]),\n",
+    "   precode=\"\"\"orbital_period = 10** log10per\n",
+    "sep = calc_sep_from_period(M_1, M_2, orbital_period)\n",
+    "sep_min = calc_sep_from_period(M_1, M_2, 10**0.15)\n",
+    "sep_max = calc_sep_from_period(M_1, M_2, 10**5.5)\"\"\",\n",
+    "   probdist=\"sana12(M_1, M_2, sep, orbital_period, sep_min, sep_max, math.log10(10**0.15), math.log10(10**5.5), -0.55)\",\n",
+    "   parameter_name=\"orbital_period\",\n",
+    "   dphasevol=\"dlog10per\",\n",
+    ")\n",
+    "\n",
+    "# Exporting of all the settings can be done with .export_all_info()\n",
+    "example_pop.export_all_info()\n",
+    "\n",
+    "# remove the result file if it exists\n",
+    "if os.path.isfile(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\")):\n",
+    "    os.remove(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"))\n",
+    "\n",
+    "# Evolve the population\n",
+    "example_pop.evolve()\n",
+    "\n",
+    "# \n",
+    "with open(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"), 'r') as f:\n",
+    "    output = f.read()\n",
+    "print(\"\\n\")\n",
+    "print(output)"
+   ]
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/docs/source/population_example.rst b/docs/source/population_example.rst
deleted file mode 100644
index 192372d019133d818c4ba6ad207c5dc09989de62..0000000000000000000000000000000000000000
--- a/docs/source/population_example.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-Example of population script
-============================
-The source code of a script to run a population of stars. 
-
-.. literalinclude:: ../../examples/example_population.py
-    :language: python
-    :linenos:
\ No newline at end of file
diff --git a/examples/.ipynb_checkpoints/examples-checkpoint.py b/examples/.ipynb_checkpoints/examples-checkpoint.py
deleted file mode 100644
index ab728b6e4679484d265be8068ed00d8ca4fe2dbf..0000000000000000000000000000000000000000
--- a/examples/.ipynb_checkpoints/examples-checkpoint.py
+++ /dev/null
@@ -1,167 +0,0 @@
-#!/usr/bin/python3
-import os
-import sys
-
-import binary_c_python_api
-
-from binarycpython.utils.functions import run_system, parse_output
-from binarycpython.utils.custom_logging_functions import (
-    autogen_C_logging_code,
-    binary_c_log_code,
-)
-
-"""
-Very basic scripts to run a binary system and print the output.
-
-Use these as inspiration/base.
-"""
-
-
-def run_example_binary():
-    """
-    Function to run a binary system. Very basic approach which directly adresses the run_binary(..) python-c wrapper function. 
-    """
-
-    m1 = 15.0  # Msun
-    m2 = 14.0  # Msun
-    separation = 0  # 0 = ignored, use period
-    orbital_period = 4530.0  # days
-    eccentricity = 0.0
-    metallicity = 0.02
-    max_evolution_time = 15000  # Myr. You need to include this argument.
-
-    #
-    argstring = "binary_c M_1 {m1} M_2 {m2} separation {separation} orbital_period {orbital_period} \
-        eccentricity {eccentricity} metallicity {metallicity} \
-        max_evolution_time {max_evolution_time}".format(
-        m1=m1,
-        m2=m2,
-        separation=separation,
-        orbital_period=orbital_period,
-        eccentricity=eccentricity,
-        metallicity=metallicity,
-        max_evolution_time=max_evolution_time,
-    )
-    output = binary_c_python_api.run_binary(argstring)
-    print(output)
-
-run_example_binary()
-
-
-def run_example_binary_with_run_system():
-    """
-    This function serves as an example on the function run_system and parse_output. 
-    There is more functionality with this method and several tasks are done behind the scene.
-
-    Requires pandas, numpy to run.
-
-    run_system: mostly just makes passing arguments to the function easier. It also loads all the necessary defaults in the background
-    parse_output: Takes the raw output of binary_c and selects those lines that start with the given header. 
-    Note, if you dont use the custom_logging functionality binary_c should be configured to have output that starts with that given header
-
-    The parsing of the output only works correctly if either all of the values are described inline like `mass=<number>' or none of them are.    
-    """
-
-    import pandas as pd
-    import numpy as np
-
-    # Run system. all arguments can be given as optional arguments.
-    output = run_system(M_1=10, M_2=20, separation=0, orbital_period=100000000000)
-
-    # print(output)
-
-    # Catch results that start with a given header. (Mind that binary_c has to be configured to print them if your not using a custom logging function)
-    result_example_header_1 = parse_output(output, selected_header="example_header_1")
-    result_example_header_2 = parse_output(output, selected_header="example_header_2")
-
-    # print(result_example_header_1)
-
-    #### Now do whatever you want with it:
-    # Put it in numpy arrays
-    # t_res = np.asarray(result_example_header['t'], dtype=np.float64, order='C')
-    # m_res = np.asarray(result_example_header['mass'], dtype=np.float64, order='C')
-
-    # Or put them into a pandas array
-
-
-    # Cast the data into a dataframe.
-    # This example automatically catches the column names because the binary_c output line is constructed as 'example_header_1 time=<number>..'
-    df = pd.DataFrame.from_dict(result_example_header_1, dtype=np.float64)
-    print(df)
-
-    # This example has column headers which are numbered, but we can override that with custom headers.
-    df2 = pd.DataFrame.from_dict(result_example_header_2, dtype=np.float64)
-    df2.columns=['time', 'mass_1', 'mass_2', 'st1', 'st2', 'sep', 'ecc']
-    print(df2)
-
-    # print(df)
-    # sliced_df = df[df.t < 1000] # Cut off late parts of evolution
-    # print(sliced_df[["t","m1"]])
-
-    # Some routine to plot.
-
-run_example_binary_with_run_system()
-
-def run_example_binary_with_custom_logging():
-    """
-    Function that will use a automatically generated piece of logging code. Compile it, load it 
-    into memory and run a binary system. See run_system on how several things are done in the background here.
-    """
-
-    import pandas as pd
-    import numpy as np
-
-    # generate logging lines. Here you can choose whatever you want to have logged, and with what header
-    # this generates working print statements
-    logging_line = autogen_C_logging_code(
-        {"MY_STELLAR_DATA": ["model.time", "star[0].mass"],}
-    )
-    # OR
-    # You can also decide to `write` your own logging_line, which allows you to write a more complex logging statement with conditionals.
-    logging_line = 'Printf("MY_STELLAR_DATA time=%g mass=%g\\n", stardata->model.time, stardata->star[0].mass)'
-
-    # Generate entire shared lib code around logging lines
-    custom_logging_code = binary_c_log_code(logging_line)
-
-    # Run system. all arguments can be given as optional arguments. the custom_logging_code is one of them and will be processed automatically.
-    output = run_system(
-        M_1=1,
-        metallicity=0.002,
-        M_2=0.1,
-        separation=0,
-        orbital_period=100000000000,
-        custom_logging_code=custom_logging_code,
-    )
-
-    # Catch results that start with a given header. (Mind that binary_c has to be configured to print them if your not using a custom logging function)
-    # DOESNT WORK YET if you have the line autogenerated.
-    result_example_header = parse_output(output, "MY_STELLAR_DATA")
-
-    # Cast the data into a dataframe.
-    df = pd.DataFrame.from_dict(result_example_header, dtype=np.float64)
-
-    # Do whatever you like with the dataframe.
-    print(df)
-
-run_example_binary_with_custom_logging()
-
-def run_example_binary_with_writing_logfile():
-    """
-    Same as above but when giving the log_filename argument the log filename will be written
-    """
-
-    import pandas as pd
-    import numpy as np
-    import tempfile
-
-    # Run system. all arguments can be given as optional arguments.
-    output = run_system(
-        M_1=10,
-        M_2=20,
-        separation=0,
-        orbital_period=100000000000,
-        log_filename=tempfile.gettempdir() + "/test_log.txt",
-
-    )
-
-run_example_binary_with_writing_logfile()
\ No newline at end of file
diff --git a/examples/example_population.py b/examples/example_population.py
deleted file mode 100644
index 139531060c9145823d130bdfa1d793ca7830e604..0000000000000000000000000000000000000000
--- a/examples/example_population.py
+++ /dev/null
@@ -1,202 +0,0 @@
-
-
-import os
-from binarycpython.utils.grid import Population
-from binarycpython.utils.functions import (
-    get_help_all,
-    get_help,
-    create_hdf5,
-    output_lines,
-)
-from binarycpython.utils.custom_logging_functions import temp_dir
-
-#########################################################
-# This file serves as an example for running a population.
-# The use of help(<function>) is a good way to inspect what parameters are there to use
-#########################################################
-
-
-def parse_function(self, output):
-    # EXAMPLE PARSE_FUNCTION
-
-    # extract info from the population instance
-
-    # Get some information from the
-    data_dir = self.custom_options["data_dir"]
-    base_filename = self.custom_options["base_filename"]
-
-    # Check directory, make if necessary
-    os.makedirs(data_dir, exist_ok=True)
-
-    seperator = " "
-
-    # Create filename
-    outfilename = os.path.join(data_dir, base_filename)
-
-    parameters = ["time", "mass", "zams_mass", "probability", "radius", "stellar_type"]
-
-    # Go over the output.
-    for el in output_lines(output):
-        headerline = el.split()[0]
-
-        # CHeck the header and act accordingly
-        if headerline == "MY_STELLAR_DATA":
-            values = el.split()[1:]
-            print(values)
-
-            if not len(parameters) == len(values):
-                print("Amount of column names isnt equal to amount of columns")
-                raise ValueError
-
-            if not os.path.exists(outfilename):
-                with open(outfilename, "w") as f:
-                    f.write(seperator.join(parameters) + "\n")
-
-            with open(outfilename, "a") as f:
-                f.write(seperator.join(values) + "\n")
-
-
-# Create population object
-example_pop = Population()
-
-# If you want verbosity, set this before other things
-example_pop.set(verbose=1)
-
-# Setting values can be done via .set(<parameter_name>=<value>)
-# Values that are known to be binary_c_parameters are loaded into bse_options.
-# Those that are present in the default grid_options are set in grid_options
-# All other values that you set are put in a custom_options dict
-example_pop.set(
-    # binary_c physics options
-    M_1=10,  # bse_options
-    separation=0,  # bse_options
-    orbital_period=45000000080,  # bse_options
-    max_evolution_time=15000,  # bse_options
-    eccentricity=0.02,  # bse_options
-    # Set companion to low mass
-    M_2=0.08,  # Since in the example we run a single system, we should set the companion mass here. If we donm't do this, the code will complain.
-    # grid_options
-    amt_cores=2,  # grid_options
-    verbose=1,  # verbosity. Not fully configured correctly yet but having it value of 1 prints alot of stuff
-    # Custom options # TODO: need to be set in grid_options probably
-    data_dir=os.path.join(
-        temp_dir(), "example_python_population_result"
-    ),  # custom_options
-    base_filename="example_pop.dat",  # custom_options
-)
-
-# Creating a parsing function
-example_pop.set(
-    parse_function=parse_function,  # Setting the parse function thats used in the evolve_population
-)
-
-### Custom logging
-
-## Below example requires changing the parse function
-## very simple example of custom logging. Will work but need to change the parse function to handle that nicely.
-# example_pop.set(
-#     C_auto_logging={
-#         "MY_HEADER_LINE": ["star[0].mass", "star[1].mass", "model.probability"]
-#     }
-# )
-
-
-# Log the moment when the star turns into neutron
-example_pop.set(
-    C_logging_code="""
-if(stardata->star[0].stellar_type >= 13)    
-{
-    if (stardata->model.time < stardata->model.max_evolution_time)
-    {
-        Printf("MY_STELLAR_DATA %30.12e %g %g %g %g %d\\n",
-            // 
-            stardata->model.time, // 1
-            stardata->star[0].mass, // 2
-            stardata->common.zero_age.mass[0], // 4
-            stardata->model.probability, // 5
-            stardata->star[0].radius, // 6
-            stardata->star[0].stellar_type // 7
-      );
-    };
-    /* Kill the simulation to save time */
-    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;
-};
-"""
-)
-
-# Add grid variables
-resolution = {"M_1": 20, "q": 20, "per": 40}
-
-# Mass
-example_pop.add_grid_variable(
-    name="lnm1",
-    longname="Primary mass",
-    valuerange=[2, 150],
-    resolution="{}".format(resolution["M_1"]),
-    spacingfunc="const(math.log(2), math.log(150), {})".format(resolution["M_1"]),
-    precode="M_1=math.exp(lnm1)",
-    probdist="three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1",
-    dphasevol="dlnm1",
-    parameter_name="M_1",
-    condition="",  # Impose a condition on this grid variable. Mostly for a check for yourself
-)
-
-# # Mass ratio
-# test_pop.add_grid_variable(
-#     name="q",
-#     longname="Mass ratio",
-#     valuerange=["0.1/M_1", 1],
-#     resolution="{}".format(resolution['q']),
-#     spacingfunc="const(0.1/M_1, 1, {})".format(resolution['q']),
-#     probdist="flatsections(q, [{'min': 0.1/M_1, 'max': 1.0, 'height': 1}])",
-#     dphasevol="dq",
-#     precode="M_2 = q * M_1",
-#     parameter_name="M_2",
-#     condition="",  # Impose a condition on this grid variable. Mostly for a check for yourself
-# )
-
-# #
-# test_pop.add_grid_variable(
-#    name="log10per", # in days
-#    longname="log10(Orbital_Period)",
-#    valuerange=[0.15, 5.5],
-#    resolution="{}".format(resolution["per"]),
-#    spacingfunc="const(0.15, 5.5, {})".format(resolution["per"]),
-#    precode="""orbital_period = 10** log10per
-# sep = calc_sep_from_period(M_1, M_2, orbital_period)
-# sep_min = calc_sep_from_period(M_1, M_2, 10**0.15)
-# sep_max = calc_sep_from_period(M_1, M_2, 10**5.5)""",
-#    probdist="sana12(M_1, M_2, sep, orbital_period, sep_min, sep_max, math.log10(10**0.15), math.log10(10**5.5), -0.55)",
-#    parameter_name="orbital_period",
-#    dphasevol="dlog10per",
-# )
-
-
-# Exporting of all the settings can be done with .export_all_info()
-# on default it exports everything, but can be supressed by turning it off:
-#   population settings (bse_options, grid_options, custom_options), turn off with include_population
-#       settings=False
-#   binary_c_defaults (all the commandline arguments that binary c accepts, and their defaults).
-#       turn off with include_binary_c_defaults=False
-#   include_binary_c_version_info (all the compilation info, and information about the compiled
-#       parameters), turn off with include_binary_c_version_info=False
-#   include_binary_c_help_all (all the help information for all the binary_c parameters),
-#       turn off with include_binary_c_help_all=Fase
-# On default it will write this to the custom_options['data_dir'], but that can be overriden by
-#   setting use_datadir=False and providing an outfile=<>
-example_pop.export_all_info()
-
-## Executing a single system
-## This uses the M_1 orbital period etc set with the set function
-# output = example_pop.evolve_single()
-# print(output)
-
-## Executing a population
-## This uses the values generated by the grid_variables
-example_pop.evolve()  # TODO: update this function call
-
-# Wrapping up the results to an hdf5 file can be done by using the create_hdf5
-# (<directory containing data and settings>) This function takes the settings file
-# (ending in _settings.json) and the data files (ending in .dat) from the data_dir
-# and packing them into an hdf5 file, which is then written into the same data_dir directory
-create_hdf5(data_dir=example_pop.custom_options["data_dir"], name="example_pop.hdf5")
diff --git a/examples/example_systems/README.md b/examples/example_systems/README.md
deleted file mode 100644
index 45fd1d7814ccfe3ca074540e650a11e32a738e1b..0000000000000000000000000000000000000000
--- a/examples/example_systems/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# This directory is meant to contain script to generate test systems.
diff --git a/examples/examples.py b/examples/examples.py
deleted file mode 100644
index 767d8ea3547889a1d0e75c40ef5813c189d79632..0000000000000000000000000000000000000000
--- a/examples/examples.py
+++ /dev/null
@@ -1,229 +0,0 @@
-#!/usr/bin/python3
-import os
-import sys
-
-from binarycpython import _binary_c_bindings
-
-from binarycpython.utils.functions import example_parse_output
-from binarycpython.utils.custom_logging_functions import (
-    autogen_C_logging_code,
-    binary_c_log_code,
-    create_and_load_logging_function,
-)
-from binarycpython.utils.run_system_wrapper import run_system
-
-"""
-Very basic scripts to run a binary system and print the output.
-
-Use these as inspiration/base.
-"""
-
-
-def run_example_binary():
-    """
-    Function to run a binary system. Very basic approach which directly adresses the run_system(..) python-c wrapper function.
-    """
-
-    m1 = 15.0  # Msun
-    m2 = 14.0  # Msun
-    separation = 0  # 0 = ignored, use period
-    orbital_period = 4530.0  # days
-    eccentricity = 0.0
-    metallicity = 0.02
-    max_evolution_time = 15000  # Myr. You need to include this argument.
-
-    #
-    argstring = "binary_c M_1 {m1} M_2 {m2} separation {separation} orbital_period {orbital_period} \
-        eccentricity {eccentricity} metallicity {metallicity} \
-        max_evolution_time {max_evolution_time}".format(
-        m1=m1,
-        m2=m2,
-        separation=separation,
-        orbital_period=orbital_period,
-        eccentricity=eccentricity,
-        metallicity=metallicity,
-        max_evolution_time=max_evolution_time,
-    )
-    output = _binary_c_bindings.run_system(argstring)
-    print(output)
-
-
-run_example_binary()
-
-
-def run_example_binary_with_run_system():
-    """
-    This function serves as an example on the function run_system and parse_output.
-    There is more functionality with this method and several tasks are done behind the scene.
-
-    Requires pandas, numpy to run.
-
-    run_system: mostly just makes passing arguments to the function easier. It also loads all the necessary defaults in the background
-    parse_output: Takes the raw output of binary_c and selects those lines that start with the given header.
-    Note, if you dont use the custom_logging functionality binary_c should be configured to have output that starts with that given header
-
-    The parsing of the output only works correctly if either all of the values are described inline like `mass=<number>' or none of them are.
-    """
-
-    import pandas as pd
-    import numpy as np
-
-    # Run system. all arguments can be given as optional arguments.
-    output = run_system(M_1=10, M_2=20, separation=0, orbital_period=100000000000)
-
-    # print(output)
-
-    # Catch results that start with a given header. (Mind that binary_c has to be configured to print them if your not using a custom logging function)
-    result_example_header_1 = example_parse_output(
-        output, selected_header="example_header_1"
-    )
-    result_example_header_2 = example_parse_output(
-        output, selected_header="example_header_2"
-    )
-
-    # print(result_example_header_1)
-
-    #### Now do whatever you want with it:
-    # Put it in numpy arrays
-    # t_res = np.asarray(result_example_header['t'], dtype=np.float64, order='C')
-    # m_res = np.asarray(result_example_header['mass'], dtype=np.float64, order='C')
-
-    # Or put them into a pandas array
-
-    # Cast the data into a dataframe.
-    # This example automatically catches the column names because the binary_c output line is constructed as 'example_header_1 time=<number>..'
-    print(result_example_header_1)
-    df = pd.DataFrame.from_dict(result_example_header_1, dtype=np.float64)
-    print(df)
-
-    # This example has column headers which are numbered, but we can override that with custom headers.
-    df2 = pd.DataFrame.from_dict(result_example_header_2, dtype=np.float64)
-    df2.columns = ["time", "mass_1", "mass_2", "st1", "st2", "sep", "ecc"]
-    print(df2)
-
-    # print(df)
-    # sliced_df = df[df.t < 1000] # Cut off late parts of evolution
-    # print(sliced_df[["t","m1"]])
-
-    # Some routine to plot.
-
-
-# run_example_binary_with_run_system()
-
-
-def run_example_custom_logging_autogenerated():
-    """
-    This is an example function for the autogeneration of logging codes that binary_c uses.
-    """
-
-    # generate logging lines
-    logging_line = autogen_C_logging_code(
-        {
-            "MY_STELLAR_DATA": ["model.time", "star[0].mass"],
-            "my_sss2": ["model.time", "star[1].mass"],
-        }
-    )
-
-    # Generate code around logging lines
-    custom_logging_code = binary_c_log_code(logging_line)
-
-    # Generate library and get memaddr
-    func_memaddr, shared_lib_filename = create_and_load_logging_function(
-        custom_logging_code
-    )
-
-    #
-    m1 = 15.0  # Msun
-    m2 = 14.0  # Msun
-    separation = 0  # 0 = ignored, use period
-    orbital_period = 4530.0  # days
-    eccentricity = 0.0
-    metallicity = 0.02
-    max_evolution_time = 15000
-    argstring = "binary_c M_1 {0:g} M_2 {1:g} separation {2:g} orbital_period {3:g} eccentricity {4:g} metallicity {5:g} max_evolution_time {6:g}".format(
-        m1,
-        m2,
-        separation,
-        orbital_period,
-        eccentricity,
-        metallicity,
-        max_evolution_time,
-    )
-    output = _binary_c_bindings.run_system(
-        argstring, custom_logging_func_memaddr=func_memaddr
-    )
-    print(output)
-
-
-# run_example_custom_logging_autogenerated()
-
-
-def run_example_binary_with_custom_logging():
-    """
-    Function that will use a automatically generated piece of logging code. Compile it, load it
-    into memory and run a binary system. See run_system on how several things are done in the background here.
-    """
-
-    import pandas as pd
-    import numpy as np
-
-    # generate logging lines. Here you can choose whatever you want to have logged, and with what header
-    # this generates working print statements
-    logging_line = autogen_C_logging_code(
-        {
-            "MY_STELLAR_DATA": ["model.time", "star[0].mass"],
-        }
-    )
-    # OR
-    # You can also decide to `write` your own logging_line, which allows you to write a more complex logging statement with conditionals.
-    logging_line = 'Printf("MY_STELLAR_DATA time=%g mass=%g\\n", stardata->model.time, stardata->star[0].mass)'
-
-    # Generate entire shared lib code around logging lines
-    custom_logging_code = binary_c_log_code(logging_line)
-
-    # Run system. all arguments can be given as optional arguments. the custom_logging_code is one of them and will be processed automatically.
-    output = run_system(
-        M_1=1,
-        metallicity=0.002,
-        M_2=0.1,
-        separation=0,
-        orbital_period=100000000000,
-        custom_logging_code=custom_logging_code,
-    )
-
-    print(output)
-
-    # Catch results that start with a given header. (Mind that binary_c has to be configured to print them if your not using a custom logging function)
-    # DOESNT WORK YET if you have the line autogenerated.
-    result_example_header = parse_output(output, "MY_STELLAR_DATA")
-
-    # Cast the data into a dataframe.
-    df = pd.DataFrame.from_dict(result_example_header, dtype=np.float64)
-
-    # Do whatever you like with the dataframe.
-    print(df)
-
-
-# run_example_binary_with_custom_logging()
-
-
-def run_example_binary_with_writing_logfile():
-    """
-    Same as above but when giving the log_filename argument the log filename will be written
-    """
-
-    import pandas as pd
-    import numpy as np
-    import tempfile
-
-    # Run system. all arguments can be given as optional arguments.
-    output = run_system(
-        M_1=10,
-        M_2=20,
-        separation=0,
-        orbital_period=100000000000,
-        log_filename=tempfile.gettempdir() + "/test_log.txt",
-    )
-
-
-run_example_binary_with_writing_logfile()
\ No newline at end of file
diff --git a/examples/examples_custom_logging.py b/examples/examples_custom_logging.py
deleted file mode 100644
index 15e8109f1fabc2b252f039fd1eecd4b658c9eb80..0000000000000000000000000000000000000000
--- a/examples/examples_custom_logging.py
+++ /dev/null
@@ -1,105 +0,0 @@
-import binary_c_python_api
-
-from binarycpython.utils.custom_logging_functions import (
-    autogen_C_logging_code,
-    binary_c_log_code,
-    create_and_load_logging_function,
-)
-
-from binarycpython.utils.grid import Population
-
-#################################################
-# File containing examples for the custom logging
-# I'll put several logging snippets for different purposes in this file
-#
-
-#################################################
-# no logging set.
-pop = Population()
-pop.set(
-    M_1=10,
-    M_2=10,
-    separation=0,
-    orbital_period=4530,
-    eccentricity=0,
-    metallicity=0.02,
-    max_evolution_time=15000,
-)
-out = pop.evolve_single()
-print(out)
-
-#################################################
-# Example logging snippet for logging
-pop.set(
-    C_logging_code="""
-    if(stardata->star[0].stellar_type>=MS)
-    {
-        if (stardata->model.time < stardata->model.max_evolution_time)
-        {
-            Printf("EXAMPLE_ABOVE_MS %30.12e %g %g %g %g %d %d\\n",
-                // 
-                stardata->model.time, // 1
-
-                stardata->star[0].mass, //2
-                stardata->previous_stardata->star[0].mass, //3
-
-                stardata->star[0].radius, //4
-                stardata->previous_stardata->star[0].radius, //5
-
-                stardata->star[0].stellar_type, //6
-                stardata->previous_stardata->star[0].stellar_type //7
-          );
-        };
-        /* Kill the simulation to save time */
-        //stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;
-    };
-"""
-)
-out = pop.evolve_single()
-print(out)
-
-
-#################################################
-# Example logging snippet for checking whether the system becomes a NS, and stop the evolution if so.
-pop.set(
-    M_1=100,
-    M_2=10,
-    separation=0,
-    orbital_period=400530,
-    eccentricity=0,
-    metallicity=0.002,
-    max_evolution_time=15000,
-)
-pop.set(
-    C_logging_code="""
-    if(stardata->star[0].stellar_type>=NS)
-    {
-        if (stardata->model.time < stardata->model.max_evolution_time)
-        {
-            Printf("EXAMPLE_LOG_CO %30.12e %g %g %g %g %d %d\\n",
-                // 
-                stardata->model.time, // 1
-
-                stardata->star[0].mass, //2
-                stardata->previous_stardata->star[0].mass, //3
-
-                stardata->star[0].radius, //4
-                stardata->previous_stardata->star[0].radius, //5
-
-                stardata->star[0].stellar_type, //6
-                stardata->previous_stardata->star[0].stellar_type //7
-          );
-        };
-        /* Kill the simulation to save time */
-        stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;
-    };
-"""
-)
-out = pop.evolve_single()
-
-
-# TODO: add function that shows a
-
-# TODO: add function for compact object mergers
-
-# TODO: add function
diff --git a/examples/key_functions.py b/examples/key_functions.py
deleted file mode 100644
index b08671fa23cec9e1f25e1f7f758ce4857e053c94..0000000000000000000000000000000000000000
--- a/examples/key_functions.py
+++ /dev/null
@@ -1,5 +0,0 @@
-"""
-This script contains examples and explanation of the key functions of this package.
-
-TODO: describe the functions
-"""
diff --git a/examples/notebook_api_functionality.ipynb b/examples/notebook_api_functionality.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..d81c31711bfc5d6de3159fd8958df96dd145ded0
--- /dev/null
+++ b/examples/notebook_api_functionality.ipynb
@@ -0,0 +1,951 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "cb9d00f5-9613-471e-a4bb-6181311bf73b",
+   "metadata": {},
+   "source": [
+    "# Using the API functionality of binarycpython\n",
+    "This notebook shows how to use the API functions that interface with binary_c. It usually is better to use wrapper functions that internally use these API functions, because most of the output here is very raw\n",
+    "\n",
+    "Binarycpython uses the Python-C extension framework to interface Python with C. The sourcecode for this is contained in `src/binary_c_python.c`, and the functions are available via `from binarycpython import _binary_c_bindings`.\n",
+    "\n",
+    "The following functions are available through the API: (run cell below)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "id": "ded7eaf6-e1ba-46c2-9f6f-9ebcb14a264d",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Help on module binarycpython._binary_c_bindings in binarycpython:\n",
+      "\n",
+      "NAME\n",
+      "    binarycpython._binary_c_bindings - Module to interface the Binary_c API with python.\n",
+      "\n",
+      "FUNCTIONS\n",
+      "    free_persistent_data_memaddr_and_return_json_output(...)\n",
+      "        Frees the persistent_data memory and returns the json output\n",
+      "    \n",
+      "    free_store_memaddr(...)\n",
+      "        Frees the store memaddr\n",
+      "    \n",
+      "    return_arglines(...)\n",
+      "        Return the default args for a binary_c system\n",
+      "    \n",
+      "    return_help(...)\n",
+      "        Return the help info for a given parameter\n",
+      "    \n",
+      "    return_help_all(...)\n",
+      "        Return an overview of all the parameters, their description, categorized in sections\n",
+      "    \n",
+      "    return_maximum_mass_ratio_for_RLOF(...)\n",
+      "        Returns a string containing the maximum mass ratio for which a binary system does not RLOF at zams. Optionally accepts a store_capsule. Please use the wrapper functions in utils for this except when you know what you're doing\n",
+      "    \n",
+      "    return_minimum_orbit_for_RLOF(...)\n",
+      "        Returns a string containing the minimum orbit and separation for which a binary system does not RLOF at zams. Please use the wrapper functions in utils for this except when you know what you're doing\n",
+      "    \n",
+      "    return_persistent_data_memaddr(...)\n",
+      "        Return the store memory adress that will be passed to run_population\n",
+      "    \n",
+      "    return_store_memaddr(...)\n",
+      "        Return the store memory adress that will be passed to run_population\n",
+      "    \n",
+      "    return_version_info(...)\n",
+      "        Return the version information of the used binary_c build\n",
+      "    \n",
+      "    run_system(...)\n",
+      "        Function to run a system. This is a general function that will be able to handle different kinds of situations: single system run with different settings, population run with different settings, etc. To avoid having too many functions doing slightly different things. \n",
+      "        \n",
+      "        Arguments:\n",
+      "                argstring: argument string for binary_c\n",
+      "                (opt) custom_logging_func_memaddr: memory address value for custom logging function. Default = -1 (None)\n",
+      "                (opt) store_memaddr: memory adress of the store. Default = -1 (None)\n",
+      "                (opt) write_logfile: Boolean (in int form) for whether to enable the writing of the log function. Default = 0\n",
+      "                (opt) population: Boolean (in int form) for whether this system is part of a population run. Default = 0.\n",
+      "    \n",
+      "    test_func(...)\n",
+      "        Function that contains random snippets. Do not expect this to remain available, or reliable. i.e. dont use it.\n",
+      "\n",
+      "FILE\n",
+      "    /home/david/.pyenv/versions/3.6.4/envs/dev-binarycpython3.6.4/lib/python3.6/site-packages/binarycpython/_binary_c_bindings.cpython-36m-x86_64-linux-gnu.so\n",
+      "\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "from binarycpython import _binary_c_bindings\n",
+    "help(_binary_c_bindings)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "7ddede71-ffaa-4b24-aece-e94128a60d7f",
+   "metadata": {},
+   "source": [
+    "There are three main categories of functions:\n",
+    "\n",
+    "- Functions to get information from binary_c: these can be used to evolve systems, and get utility information from binary_c.\n",
+    "    - run_system\n",
+    "    - return_minimum_orbit_for_RLOF\n",
+    "    - return_maximum_mass_ratio_for_RLOF\n",
+    "    - return_help\n",
+    "    - return_help_all\n",
+    "    - return_arglines\n",
+    "\n",
+    "- Memory creation functions: these can be used to have binary_c allocate memory which is used or written to by binary_c\n",
+    "    - return_persistent_data_memaddr\n",
+    "    - return_store_memaddr\n",
+    "\n",
+    "- Memory freeing functions: These can be used to free the allocated memory, and in the case of persistent memory it will also return the contents of the ensemble\n",
+    "    - free_persistent_data_memaddr_and_return_json_output\n",
+    "    - free_store_memaddr"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "0dd3e115-1571-42f7-9ab9-cf7688fa28c1",
+   "metadata": {},
+   "source": [
+    "## Example usage:"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "c5015daa-35ab-4736-a04d-f3cbe661638c",
+   "metadata": {},
+   "source": [
+    "### Setting up, using and freeing store"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 10,
+   "id": "10a74d5a-a3d5-4543-a5bc-20d1fe885bb4",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "<capsule object \"STORE\" at 0x7f163859d0c0>\n",
+      "SINGLE_STAR_LIFETIME 10 27.7358\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# allocating store memory\n",
+    "store_memaddr = _binary_c_bindings.return_store_memaddr()\n",
+    "print(store_memaddr)\n",
+    "\n",
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=10,\n",
+    "    orbital_period=4500,\n",
+    "    eccentricity=0.0,\n",
+    "    metallicity=0.02,\n",
+    "    max_evolution_time=15000,\n",
+    ").strip()\n",
+    "\n",
+    "#\n",
+    "output = _binary_c_bindings.run_system(argstring, store_memaddr=store_memaddr)\n",
+    "print(output)\n",
+    "\n",
+    "# Freeing store\n",
+    "_binary_c_bindings.free_store_memaddr(store_memaddr)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "e9da5fc6-e680-483c-982e-4819767ed5b2",
+   "metadata": {},
+   "source": [
+    "### Getting information from binary_c"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "24f7ffe5-0076-459d-a37f-254e10d0d9f9",
+   "metadata": {},
+   "source": [
+    "We can get information for a parameter via return_help(parameter_name):\n",
+    "This will return an unparsed output"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 11,
+   "id": "318874f6-7acf-49bb-9786-299d4dffc0b3",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "binary_c help for variable : M_1 <Float>\n",
+      "\n",
+      "The initial mass of star one (in solar units, internally this is star index 0).\n",
+      "\n",
+      "Default : 0\n",
+      "\n",
+      "\n",
+      "\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(_binary_c_bindings.return_help('M_1'))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f7fafce6-a522-43ac-a0c2-15a3db393b49",
+   "metadata": {},
+   "source": [
+    "We can get information on all available parameters via return_help(parameter_name):"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 16,
+   "id": "d7e757ae-579c-42a2-a310-f0401b7800e8",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "\n",
+      "############################################################\n",
+      "##### Section Stars\n",
+      "############################################################\n",
+      "metallicity : This sets the metallicity of the stars, i.e. the amount (by mass) of matter which is not hydrogen or helium. If you are using the BSE algorithm, this must be 1e-4 <= metallicity <= 0.03. See also nucsyn_metallicity and effective_metallicity. : (null)\n",
+      "effective_metallicity : This sets effective metallicity of stars as used in routines like the Schneider wind loss. If not set, or set to DEFAULT_TO_METALLICITY (==-1, the default), this is just the same as metallicity. The main difference between effective_metallicity and metallicity is the range of validity: 0 <= effective_metallicity <= 1, while metallicity's range of validity is limited by the stellar evolution algorithm (so, for BSE, is 1e-4 <= metallicity <= 0.03). : (null)\n",
+      "M_1 : The initial mass of star one (in solar units, internally this is star index 0). : (null)\n",
+      "M_2 : The initial mass of star two (in solar units, internally this is star index 1). : (null)\n",
+      "M_3 : The initial mass of star three (in solar units, internally this is star index 2). : (null)\n",
+      "M_4 : The initial mass of star four (in solar units, internally this is star index 3). : (null)\n",
+      "vrot1 : The initial equatorial rotational velocity of star one (in km/s, internally this is star index 0). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot2,3,4. : (null)\n",
+      "vrot2 : The initial equatorial rotational velocity of star two (in km/s, internally this is star index 1). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,3,4. : (null)\n",
+      "vrot3 : The initial equatorial rotational velocity of star three (in km/s, internally this is star index 2). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,2,4. : (null)\n",
+      "vrot4 : The initial equatorial rotational velocity of star four (in km/s, internally this is star index 3). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,2,3. : (null)\n",
+      "Prot1 : The initial equatorial rotational velocity of star one (in km/s, internally this is star index 0). See also Prot2,3,4. : (null)\n",
+      "Prot2 : The initial equatorial rotational velocity of star two (in km/s, internally this is star index 1). See also Prot1,3,4. : (null)\n",
+      "Prot3 : The initial equatorial rotational period of star three (in days, internally this is star index 2). See also Prot1,2,4. : (null)\n",
+      "Prot4 : The initial equatorial rotational period of star four (in days, internally this is star index 3). See also Prot1,2,3. : (null)\n",
+      "inclination1 : The initial inclination of star one (in degrees). : (null)\n",
+      "inclination2 : The initial inclination of star two (in degrees). : (null)\n",
+      "inclination3 : The initial inclination of star three (in degrees). : (null)\n",
+      "inclination4 : The initial inclination of star four (in degrees). : (null)\n",
+      "B_1 : The initial magnetic field of star one (in Gauss, internally this is star index 0). : (null)\n",
+      "B_2 : The initial magnetic field of star two (in Gauss, internally this is star index 1). : (null)\n",
+      "B_3 : The initial magnetic field of star three (in Gauss, internally this is star index 2). : (null)\n",
+      "B_4 : The initial magnetic field of star four (in Gauss, internally this is star index 3). : (null)\n",
+      "B_inclination1 : The initial inclination of the magnetic field of star one (in degrees). : (null)\n",
+      "B_inclination2 : The initial inclination of the magnetic field of star two (in degrees). : (null)\n",
+      "B_inclination3 : The initial inclination of the magnetic field of star three (in degrees). : (null)\n",
+      "B_inclination4 : The initial inclination of the magnetic field of star four (in degrees). : (null)\n",
+      "stellar_type_1 : Set the stellar type of star 1 (internal index 0), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "stellar_type_2 : Set the stellar type of star 2 (internal index 1), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "stellar_type_3 : Set the stellar type of star 3 (internal index 2), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "stellar_type_4 : Set the stellar type of star 4 (internal index 3), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
+      "max_stellar_type_1 : The maximum stellar type of star 1 (internal index 0). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value. \n",
+      " : (null)\n",
+      "max_stellar_type_2 : The maximum stellar type of star 2 (internal index 1). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.\n",
+      " : (null)\n",
+      "max_stellar_type_3 : The maximum stellar type of star 3 (internal index 2). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.\n",
+      " : (null)\n",
+      "max_stellar_type_4 : The maximum stellar type of star 4 (internal index 3). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.\n",
+      " : (null)\n",
+      "probability : The probability is a weighting applied to the star based on, say, the initial mass function. When running a grid of stars to simulate *all* stars, the summed probability of all the stars should be 1.0. : (null)\n",
+      "phasevol : The system's phase volume, used by binary_grid. : (null)\n",
+      "stellar_structure_algorithm : Set the stellar structure algorithm. 0=modified BSE (default), 1=none, 2=external function (must be defined by the calling code), 3=binary_c (not yet implemented). : (null)\n",
+      "solver : The type of solver. Default is the Forward-Euler (0), but could be RK2 (1), RK4 (2) or a predictor-corretor (3). : (null)\n",
+      "max_evolution_time : Set the maximum age for the stars (Myr). : (null)\n",
+      "max_model_number : Set the maximum number of models, ignored if 0 (default is 0). : (null)\n",
+      "monte_carlo_kicks : Turn on Monte-Carlo SN kicks. On (True) by default, and indeed other algorithms are probably broken. : (null)\n",
+      "disable_debug : Disables debug output. Only has an effect when DEBUG is 1, which probably requires a rebuild. Default FALSE. : (null)\n",
+      "timestep_logging : Turn on timestep logging (default is False). : (null)\n",
+      "rejects_in_log : Show timestep rejections in the main log (default is False). : (null)\n",
+      "vandenHeuvel_logging : Turn on van den Heuvel logging (default is False). : (null)\n",
+      "evolution_splitting : If True, turn on splitting of an evolutionary run if splitpoint (e.g. supernova) occurs. : (null)\n",
+      "disable_events : Whether to disable the new events code (defaults to False, so we use events by default)\n",
+      " : (null)\n",
+      "evolution_splitting_sn_eccentricity_threshold : Threshold eccentricity above which evolution splitting happens in a system with no SN kick. (0.01) : (null)\n",
+      "evolution_splitting_sn_n : Number of runs to split into when a SN occurs. : (null)\n",
+      "evolution_splitting_maxdepth : Max number of splits in an evolutionary run. : (null)\n",
+      "equation_of_state_algorithm : Set the equation of state algorithm. 0 = Paczynski. : (null)\n",
+      "opacity_algorithm : Set the opacity algorithm. 0 = Paczynski, 1 = Ferguson/Opal. : (null)\n",
+      "wind_mass_loss : Defines the algorithm used for stellar winds. 0 = none, 1 = Hurley et al. (2002), 2 = Schneider (2018). : 0\n",
+      "gbwind : Wind prescription for first red giant branch stars.  0=Reimers (Hurley et al 2000/2002; choose gb_reimers_eta=0.5 for their mass loss rate), 1=Schroeder+Cuntz 2005 (set gb_reimers_eta=1.0 for their mass loss rate). : (null)\n",
+      "mattsson_Orich_tpagbwind : Experimental : turns on Mattsson's TPAGB wind when the star is oxygen rich. Requires MATTSSON_MASS_LOSS. : (null)\n",
+      "magnetic_braking_factor : Multiplier for the magnetic braking angular momentum loss rate. : (null)\n",
+      "magnetic_braking_gamma : gamma factor in Rappaport style magnetic braking expression. : (null)\n",
+      "magnetic_braking_algorithm : Algorithm for the magnetic braking angular momentum loss rate. 0 = Hurley et al. 2002, 1 = Andronov, Pinnsonneault and Sills 2003, 2 = Barnes and Kim 2010  : (null)\n",
+      "helium_flash_mass_loss : Mass to be lost at the helium flash. : (null)\n",
+      "gb_reimers_eta : First red giant branch wind multiplication factor, cf. eta in Reimers' mass loss formula. (This multiplies the 4e-13 in Reimers' formula, or the 8e-14 in Schroeder and Cuntz.) : (null)\n",
+      "gbwindfac : Multiplier for the giant branch wind mass loss rate : (null)\n",
+      "tpagbwindfac : Multiplier for the TPAGB wind mass loss rate : (null)\n",
+      "eagbwindfac : Multiplier for the EAGB wind mass loss rate : (null)\n",
+      "nieuwenhuijzen_windfac : Multiplier for the Nieuwenhuijzen & de Jager wind mass loss rate : (null)\n",
+      "tpagbwind : Wind prescription during the TPAGB. 0=Karakas 2002 (a modified Vassiliadis and Wood 1993), 1=Hurley et al 2000/2002 (Vassiliadis and Wood 1993), 2=Reimers, 3=Bloecker, 4=Van Loon,  5=Rob's C-wind (broken?), 6,7=Vassiliadis and Wood 1993 (Karakas,Hurley variants respectively) when C/O>1, 8=Mattsson, 9 = Goldman et al. (2017), 10 = Beasor et al. (2020). : (null)\n",
+      "eagbwind : Wind prescription during the EAGB. 0=BSE (Hurley+2002, based on VW93), 1 = Goldman et al. (2017), 2 = Beasor et al. (2020). : (null)\n",
+      "wind_gas_to_dust_ratio : Gas to dust ratio used in wind calculations (e.g. Goldman et al. 2017). Typically 200 (Milky Way)-500 (Magellanic Clouds). Default is 200, approximately as in MW stars. : (null)\n",
+      "vwind_multiplier : Multiplier for the stellar wind velocity. : (null)\n",
+      "vwind_beta : Beta for stellar wind speed calculations, where vwind=sqrt(beta) * escape velocity. Default 0.125 (from BSE, Hurley et al. 2002).  : (null)\n",
+      "superwind_mira_switchon : In the Vassiliadis and Wood (1993) AGB wind prescription, the superwind is turned on at a given Mira period, usually 500 days. You can vary when this switch-on happens with this parameter. : (null)\n",
+      "vw93_mira_shift : In the Vassiliadis and Wood (1993) AGB wind prescription, the wind loss rate depends on the Mira period plus this offset. Requires VW93_MIRA_SHIFT. : (null)\n",
+      "vw93_multiplier : In the Vassiliadis and Wood (1993) AGB wind prescription, the wind loss rate is multiplied by this factor. Requires VW93_MULTIPLIER. : (null)\n",
+      "tpagb_reimers_eta : TPAGB Reimers wind multiplication factor, cf. eta in Reimers' mass loss formula. (This multiplies the 4e-13 in Reimers' formula, or the 8e-14 in Schroeder and Cuntz.) Note that Reimers is not the default TPAGB wind prescription. See also tpagbwind. : (null)\n",
+      "artificial_mass_accretion_rate%d : Constant mass accretion rate for star <n>. : (null)\n",
+      "artificial_angular_momentum_accretion_rate%d : Constant angular momentum accretion for star <n>. : (null)\n",
+      "artificial_orbital_angular_momentum_accretion_rate : Constant angular momentum accretion rate on the orbit. : (null)\n",
+      "artificial_accretion_start_time : Time at which artificial accretion stars. Ignored if <0 (default is -1). : (null)\n",
+      "artificial_accretion_end_time : Time at which artificial accretion ends. Ignored if <0 (default is -1). : (null)\n",
+      "wr_wind : Massive-star (WR) wind prescription. 0 = Hurley et al 2000/2002, 1=Maeder and Meynet, 2=Nugis and Lamers, 3=John Eldridge's version of Vink's early-2000s wind (See Lynnette Dray's thesis, or John Eldridge's thesis) : (null)\n",
+      "wr_wind_fac : Massive-star (WR) wind multiplication factor. : (null)\n",
+      "wrwindfac : Massive-star (WR) wind multiplication factor. Synonymous with wr_wind_fac (which you should use instead). : (null)\n",
+      "BH_prescription : Black hole mass prescrition: relates the mass of a newly formed black hole to its progenitor's (CO) core mass. 0=Hurley et al 2000/2002, 1=Belczynski (early 2000s). : (null)\n",
+      "PPISN_prescription : (Pulsational) Pair-Instability Supernova prescription: Relates initial helium core mass of star to whether the star undergoes PPISN or PISN. Requires PPISN flag to be True (see binary_c_parameters.h). 0=no ppisn, 1=Farmer et al 2019. : Ignore\n",
+      "sn_kick_distribution_II : Set the distribution of speeds applied to kick type II core collapse supernova systems. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_ECAP : Set the distribution of speeds applied to the remnants of electron-capture supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_NS_NS : Set the distribution of speeds applied to kick neutron stars and black holes that survive a NS-NS merger. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_IBC : Set the distribution of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_GRB_COLLAPSAR : Set the distribution of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova which is also a collapsar. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_TZ : Set the distribution of speeds applied to kick newly-born neutron stars and black holes at the death of a Thorne-Zytkow object. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_AIC_BH : Set the distribution of speeds applied to kick newly-born neutron stars black holes after accretion induced collapse of a neutron star. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_BH_BH : Set the distribution of speeds applied to black holes formed by the merger of two black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_BH_NS : Set the distribution of speeds applied to black holes formed by the merger of a neutron star and a black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_IA_Hybrid_HeCOWD : Set the distribution of speeds applied to any survivor of a hybrid He-COWD SNIa explosion. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_IA_Hybrid_HeCOWD_subluminous : Set the distribution of speeds applied to any survivor of a subluminous hybrid He-COWD SNIa explosion. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_PPISN : Set the distribution of speeds applied to PPISN supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_PISN : Set the distribution of speeds applied to PISN supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_distribution_PHDIS : Set the distribution of speeds applied to PHDIS supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_II : Set the dispersion of speeds applied to kick type II core collapse supernova systems. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_ECAP : Set the dispersion of speeds applied to the remnants of electron-capture supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_NS_NS : Set the dispersion of speeds applied to kick neutron stars and black holes that survive a NS-NS merger. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_IBC : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_GRB_COLLAPSAR : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova which is also a collapsar. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_TZ : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes at the death of a Thorne-Zytkow object. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_AIC_BH : Set the dispersion of speeds applied to kick newly-born neutron stars black holes after accretion induced collapse of a neutron star. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_BH_BH : Set the dispersion of speeds applied to black holes formed by the merger of two black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_BH_NS : Set the dispersion of speeds applied to black holes formed by the merger of a neutron star and a black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_IA_Hybrid_HeCOWD : Set the dispersion of speeds applied to the survivor of a SNIa explosion of a hybrid He-COWD. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_IA_Hybrid_HeCOWD_subluminous : Set the dispersion of speeds applied to the survivor of a subluminous SNIa explosion of a hybrid He-COWD. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_PPISN : Set the dispersion of speeds applied to the survivor of a PPISN supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_PISN : Set the dispersion of speeds applied to the survivor of a PISN supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_dispersion_PHDIS : Set the dispersion of speeds applied to the survivor of a PHDIS supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
+      "sn_kick_companion_IA_He : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia He supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_ELD : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia ELD (sub-Mch) supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_CHAND : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia Mch supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_AIC : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when an accretion induced collapse (supernova) occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_ECAP : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when an electron capture supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_He_Coal : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia helium merger supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_CHAND_Coal : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia Mch merger supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_NS_NS : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a neutron-star neutron-star merger. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_GRB_COLLAPSAR : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a GRB Collapsar (rapidly rotating SN Ibc) supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_HeStarIa : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a He-star Ia supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IBC : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a type Ib/c supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_II : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a type II supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IIa : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a type IIa supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_WDKICK : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a WD is kicked. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_TZ : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Thorne-Zytkow object is formed. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_AIC_BH : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a neutron star collapses to a black hole. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_BH_BH : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when two black holes merge. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_BH_NS : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a black hole merges with a neutron star. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_Hybrid_HeCOWD : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a hybrid He-COWD type Ia explosion. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_IA_Hybrid_HeCOWD_subluminous : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a subluminous hybrid He-COWD type Ia explosion. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_PPISN : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a PPISN supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_PISN : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a PISN supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "sn_kick_companion_PHDIS : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a PHDIS supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
+      "wd_sigma : Set the speed at which white dwarfs are kicked when they form, in km/s. Default is zero (i.e. no kick). Requires WD_KICKS. : (null)\n",
+      "wd_kick_direction : Set the direction of white dwarf kicks. 0 = random, 1 = up, 2 = forward, 3 = backward, 4 = inward, 5 = outward. Requires WD_KICKS. : (null)\n",
+      "wd_kick_when : Decide when to kick a white dwarf. 0=at birth, 1=at first RLOF, 2=at given pulse number (see wd_kick_pulse_number), 3 at every pulse Requires WD_KICKS. : (null)\n",
+      "wd_kick_pulse_number : Apply a kick to a star at a desired pulse number on the TPAGB (i.e. pre-WD). Requires WD_KICKS. : (null)\n",
+      "minimum_helium_ignition_core_mass : Minimum helium core mass required to ignite helium in the case that the hydrogen envelope is stripped on the giant branch, e.g. to make an sdB or sdO star. Typically 0.4, if 0.0 then the BSE algorithm (based on the total mass) is used. : (null)\n",
+      "minimum_CO_core_mass_for_carbon_ignition : Minimum CO core mass for carbon ignition, assuming Mc,bagb>1.6Msun. Typically around 1.08Msun (Pols+1998). : (null)\n",
+      "minimum_CO_core_mass_for_neon_ignition : Minimum CO core mass for neon ignition. Typically around 1.42Msun. Stars that have cores that ignite carbon, but not neon explode in electon-capture supernovae. : (null)\n",
+      "minimum_mcbagb_for_nondegenerate_carbon_ignition : Minimum Mc,bagb (core mass at the base of the AGB) for non-degenerate carbon ignition. Typically around 2.25Msun (Pols+1998). : (null)\n",
+      "maximum_mcbagb_for_degenerate_carbon_ignition : Maximum Mc,bagb (core mass at the base of the AGB) for degenerate carbon ignition. Typically around 1.6Msun (Pols+1998). : (null)\n",
+      "max_neutron_star_mass : Maximum mass of a neutron star before it collapses to a black hole. Typically around 2Msun. : (null)\n",
+      "chandrasekhar_mass : The Chandrasekhar mass, usually 1.44Msun : (null)\n",
+      "delta_mcmin : A parameter to reduce the minimum core mass for third dredge up to occur on the TPAGB. As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. : (null)\n",
+      "lambda_min : A parameter to increase the efficiency of third dredge up on the TPAGB. The efficiency is lambda * lambda_mult, and setting lambda_min>0 implies that, once Mc>Mcmin (see delta_mcmin) lambda=Max(lambda(fit to Karakas), lambda_min). As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. See also lambda_multiplier. : (null)\n",
+      "lambda_multiplier : A parameter to increase the efficiency of third dredge up on the TPAGB. The efficiency is lambda * lambda_mult, and setting lambda_min>0 implies that, once Mc>Mcmin (see delta_mcmin) lambda=Max(lambda(fit to Karakas), lambda_min). As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. : (null)\n",
+      "minimum_envelope_mass_for_third_dredgeup : The minimum envelope mass for third dredge up on the TPAGB. Early, solar metallicity models by Straniero et al suggested 0.5Msun is typical. However, circumstantial evidence (Izzard et al 2009) as well as newer models by Stancliffe and Karakas suggest that at low metallicity a value nearer zero is more appropriate. : (null)\n",
+      "mass_of_pmz : The mass in the partial mixing zone of a TPAGB star, using the Karakas 2012 tables. Ask Carlo Abate for more details, or see the series of papers Abate et al 2012, 2013, 2014. Requires NUCSYN and USE_TABULAR_INTERSHELL_ABUNDANCES_KARAKAS_2012. : (null)\n",
+      "c13_eff : The \"efficiency\" of partial mixing in a TPAGB star intershell region, when using the s-process tables of Gallino, Busso, Lugaro et al. as provided by Maria Lugaro for the Izzard et al. 2009 paper. Requires NUCSYN and NUCSYN_S_PROCESS. : (null)\n",
+      "mc13_pocket_multiplier : Multiplies the mass in the partial mixing zone of a TPAGB star, when using the s-process tables of Gallino, Busso, Lugaro et al. as provided by Maria Lugaro for the Izzard et al. 2009 paper. Requires NUCSYN and NUCSYN_S_PROCESS. : (null)\n",
+      "tides_convective_damping : Tidal convective damping algorithm. 0=TIDES_HURLEY2002 Zahn 197x timescales + Hut, as in Hurley et al (2002), 1 = TIDES_ZAHN1989 : Zahn 1989 lambdas + Hut. : (null)\n",
+      "E2_prescription : Choose how to calculate the E2 structural parameter (used in tidal timescale calculations). 0=Hurley 1=Izzard (see Siess et al 2013). : (null)\n",
+      "dtfac : A parameter to decrease the timestep ONLY during the TPAGB phase. : (null)\n",
+      "hbbtfac : A parameter to modulate the temperature at the base of the hot-bottom burning zone in TPAGB stars. (Works only if NUCSYN is defined) : (null)\n",
+      "wind_multiplier_%d : Wind multiplier for the stellar type specified by the intger %d. By default these are all 1.0. : (null)\n",
+      "wind_type_multiplier_%d : Wind multiplier for different types of wind (MS, GB, AGB, WR, LBV, OTHER), given by the integer %d. By default these are all 1.0. : (null)\n",
+      "pre_main_sequence : Set to True to turn on pre-main sequence evolution. Currently this is not a special stellar type, rather the first (small) fraction of the main sequence has increased radii to match the Railton et al 2014 fits to Tout's pre-main sequence stars. Requires PRE_MAIN_SEQUENCE. See also pre_main_sequence_fit_lobes. : (null)\n",
+      "pre_main_sequence_fit_lobes : Set to True force a pre-main sequence star into its Roche lobe. This is done by artificially aging it. Requires PRE_MAIN_SEQUENCE : (null)\n",
+      "small_envelope_method : Choose the method used to determine the stellar radius when the envelope mass is very thin. 0 = Hurley et al. (2002), 1 = Miller Bertolami et al. (2016+) for GB and AGB stars only. : (null)\n",
+      "timestep_modulator : Multiplier applied to the global timestep. Requires TIMESTEP_MODULATION. : (null)\n",
+      "timestep_multiplier%d : Multiplier applied to timestep limit <n>. : (null)\n",
+      "maximum_timestep : The maximum timestep (MYr). : (null)\n",
+      "zoomfac_multiplier_decrease : When a timestep is rejected, decrease the timestep by this factor (0.5). : (null)\n",
+      "zoomfac_multiplier_increase : When a timestep is rejected, zooms, then succeeds, increase the timestep by this factor (1.2). : (null)\n",
+      "maximum_timestep_factor : The maximum factor between two subsequent timesteps (1.2). : (null)\n",
+      "maximum_nuclear_burning_timestep : The maximum timestep (MYr) in any nuclear burning phase. : (null)\n",
+      "nova_retention_method : Algorithm used to calculate the amount of mass retained during a nova explosion. 0=use nova_retention_fraction. (other methods pending) : (null)\n",
+      "MINT_metallicity : This sets the metallicity for MINT. It is ignored if set to -1.0, the default, in which case the normal metallicity parameter is used. : (null)\n",
+      "gaia_Teff_binwidth : log10(Effective temperature) bin width used to make Gaia-like HRDs\n",
+      " : (null)\n",
+      "gaia_L_binwidth : log10(luminosity) bin width used to make Gaia-like HRDs\n",
+      " : (null)\n",
+      "gaia_colour_transform_method : Use this to select the method used to transform to Gaia colours from other colour schemes. GAIA_CONVERSION_UBVRI_UNIVARIATE_JORDI2010 = 0 Jordi et al.'s univariate UBVRI fits, GAIA_CONVERSION_UBVRI_BIVARIATE_JORDI2010 = 1 Jordi et al.'s bivariate UBVRI fits, GAIA_CONVERSION_ugriz_UNIVARIATE_JORDI2010 = 2 Jordi et al.'s univariate UBVRI fits, GAIA_CONVERSION_ugriz_BIVARIATE_JORDI2010 = 3 Jordi et al.'s univariate ugriv fits, GAIA_CONVERSION_UBVRI_UNIVARIATE_EVANS2018 = 4 Evans et al. (2018, DR2) fits, GAIA_CONVERSION_ugriz_UNIVARIATE_EVANS2018 = 5 Evans et al. (2018, DR2) fits, GAIA_CONVERSION_UBVRI_RIELLO2020 = 6 Riello et al. (2020, DR3) fits, GAIA_CONVERSION_ugriz_RIELLO2020 = 7 Riello et al. (2020, DR3) fits. : (null)\n",
+      "rotationally_enhanced_mass_loss : Set to 1 to enable rotationally enhanced mass loss rate algorithms: 0= none, 1=formula cf. Langer models (=ROTATIONALLY_ENHANCED_MASSLOSS_LANGER_FORMULA), 2=limit accretion rate before wind loss is applied, 3 = both 1 and 2. See also rotationally_enhanced_exponent : (null)\n",
+      "AGB_core_algorithm : Algorithm to use for calculating AGB core masses. 0=Hurley et al. 2002 if no NUCSYN, Karakas 2002 if NUCSYN is defined; 1=Hurley et al. 2002 (overshooting models); 1=Karakas 2002 (non-overshooting models). : (null)\n",
+      "AGB_radius_algorithm : Algorithm to use for calculating radii on the TPAGB. : (null)\n",
+      "AGB_luminosity_algorithm : Algorithm to use for calculating luminosities on the TPAGB. : (null)\n",
+      "AGB_3dup_algorithm : Algorithm to use for calculating third dredge up efficiency on the TPAGB. : (null)\n",
+      "overspin_algorithm : Algorithm to determine what we do when a star is rotating at its breakup velocity. OVERSPIN_BSE (0) conservatively transfers the angular momentum back to the orbit. OVERSPIN_MASSLOSS uses the rotationally_enhanced_massloss parameter to lose mass which carries away the angular momentum. : (null)\n",
+      "rotationally_enhanced_exponent : The exponent (power) by which rotationally enhanced mass loss is raised. Requires ROTATIONALLY_ENHANCED_MASS_LOSS. See also rotationally_enhanced_mass_loss. : (null)\n",
+      "batchmode : Set the batchmode control variable. Use only if you know what you are doing! : (null)\n",
+      "speedtests : If True, turns on speedtests during version information (off by default). : (null)\n",
+      "use_fixed_timestep_%d : Set to True to use fixed timestep <n>, False to turn off. Fixed timesteps are on (this is True) by default. : (null)\n",
+      "task%d : Control tasks to be performed by binary_c. By default, these are all TRUE. For more information see binary_c_macros.h, particularly the BINARY_C_TASK_* macros. : (null)\n",
+      "orbiting_object : Usage: --orbiting_object mass,spinrate,central_object,period. : 1.0\n",
+      "orbiting_objects_log : If True, turn on orbiting-object log. : (null)\n",
+      "orbiting_objects_log : If True, turn on orbiting-object log. : (null)\n",
+      "orbiting_objects_wind_accretion_multiplier : Multiplier for wind accretion on orbiting objects. Hurley et al 2002 use 1.5, which is the default. : (null)\n",
+      "orbiting_objects_close_pc_threshold : How close are orbiting objects allowed to be? Set this to be the absolute percentage difference minimum. : (null)\n",
+      "orbiting_objects_tides_multiplier : Multiplier for tidal torques on orbiting objects. : (null)\n",
+      "evaporate_escaped_orbiting_objects : If True, evaporate orbiting objects that have escaped the system. : (null)\n",
+      "RLOF_transition_objects_escape : If True, objects that escape their Roche lobe are ejected from the system, otherwise they are placed just outside the minimum stable orbit. : (null)\n",
+      "PN_resolve : If True, the timestep will be shortened to resolve better the PN phase (FALSE). : (null)\n",
+      "PN_resolve_minimum_luminosity : The luminosity above which extra time resolution for PNe is applied (see PN_resolve). : (null)\n",
+      "PN_resolve_maximum_envelope_mass : The envelope mass below which extra time resolution for PNe is applied (see PN_resolve). : (null)\n",
+      "PN_resolve_minimum_effective_temperature : The minimum effective temperature above which extra time resolution for PNe is applied (see PN_resolve). : (null)\n",
+      "PN_fast_wind : If True, thin-envelope PNe will have fast winds (FALSE). : (null)\n",
+      "PN_fast_wind_dm_GB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_GB) : (null)\n",
+      "PN_fast_wind_mdot_GB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_GB) : (null)\n",
+      "PN_fast_wind_dm_AGB : The envelope mass below which fast wind used during the AGB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_AGB) : (null)\n",
+      "PN_fast_wind_mdot_AGB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_AGB) : (null)\n",
+      "HeWD_HeWD_ignition_mass : HeWD-HeWD mergers above this mass reignite helium. (0.3) : (null)\n",
+      "wind_Nieuwenhuijzen_luminosity_lower_limit : Above this luminosity we activate the Nieuwenhuijzen and de Jager wind (4e3 Lsun). : (null)\n",
+      "wind_LBV_luminosity_lower_limit : Above this luminosity we activate the LBV wind (6e5 Lsun). : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Binary\n",
+      "############################################################\n",
+      "separation : Set the orbital separation (actually the semi-major axis) of the binary (internal index 0, stellar indices 0 and 1) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)\n",
+      "separation_triple : Set the orbital separation (actually the semi-major axis) of the triple (internal index 1) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)\n",
+      "separation_quadruple : Set the orbital separation (actually the semi-major axis) of the quadruple (internal index 2) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)\n",
+      "orbital_period : Set the initial orbital period of the binary, stars 1 and 2 (internal indices 0 and 1) in days. See also separation. : (null)\n",
+      "orbital_period_triple : Set the initial orbital period of the triple in days. See also separation. : (null)\n",
+      "orbital_period_quadruple : Set the orbital period of the outer binary in a quadrulple (stars 3 and 4, internal indices 2 and 3) in days. See also separation. : (null)\n",
+      "eccentricity : Set the initial eccentricity of the binary orbit (stars 1 and 2, internal indices 0 and 1). : (null)\n",
+      "eccentricity_triple : Set the initial eccentricity of the triple orbit. : (null)\n",
+      "eccentricity_quadruple : Set the initial eccentricity of the outer binary of a quadruple (stars 3 and 4, internal indices 2 and 3). : (null)\n",
+      "incliniation : Set the initial orbital_inclination of the binary relative to zero. : (null)\n",
+      "incliniation_triple : Set the initial orbital_inclination of the triple orbit relative to zero. : (null)\n",
+      "incliniation_quadruple : Set the initial orbital_inclinationy of the quadruple orbit relative to zero. : (null)\n",
+      "orbital_phase : Set the initial orbital phase of the binary orbit. : (null)\n",
+      "orbital_phase_triple : Set the initial orbital phase of the triple orbit. : (null)\n",
+      "orbital_phase_quadruple : Set the initial orbital phase of the quadruple orbit. : (null)\n",
+      "argument_of_periastron : Set the initial argument of periastron of the binary orbit. : (null)\n",
+      "argument_of_periastron_triple : Set the initial argument of periastron of the triple orbit. : (null)\n",
+      "argument_of_periastron_quadruple : Set the initial argument of periastron of the quadruple orbit. : (null)\n",
+      "disc_timestep_factor : Factor that multiplies the natural timestep of a disc. : (null)\n",
+      "white_dwarf_cooling_model : White dwarf cooling model, relates age to luminosity. WHITE_DWARF_COOLING_MESTEL = 0 is Mestel's model, WHITE_DWARF_COOLING_MESTEL_MODIFIED = 1 is Hurley's modified Mestel model, WHITE_DWARF_COOLING_CARRASCO2014 = 2 is based on Carrasco (2014) tables.   : (null)\n",
+      "white_dwarf_radius_model : White dwarf radius model, radius to mass (and perhaps age). WHITE_DWARF_RADIUS_NAUENBERG1972 = 0 Nauenberg (1972), WHITE_DWARF_RADIUS_MU = 1 mu-dependent variant, WHITE_DWARF_RADIUS_CARRASCO2014 = 2 is based on Carrasco (2014) tables. : (null)\n",
+      "cbdisc_mass_loss_inner_viscous_accretion_method : Chooses where the mass that is accreted from the inner edge of a circumbinary disc goes, i.e. to which star. 0 = Young and Clarke 2015, 1 = Gerosa et al 2015, 2 = 50:50 (i.e. not dependence on mass). : (null)\n",
+      "cbdisc_inner_edge_stripping : If True, allow inner edge mass stripping. : (null)\n",
+      "cbdisc_end_evolution_after_disc : If True, stop evolution when a disc evaporates. : (null)\n",
+      "cbdisc_no_wind_if_cbdisc : If True, disable stellar winds when there is a circumbinary disc. : (null)\n",
+      "cbdisc_outer_edge_stripping : If True, allow outer edge mass stripping. : (null)\n",
+      "disc_n_monte_carlo_guesses : Number of monte carlo guesses to try in the disc solver if the normal list of guesses fails (0). : (null)\n",
+      "disc_log : If 1, turn on the disc log. Requires DISC_LOG to be defined on build. : (null)\n",
+      "disc_log2d : If 1, turn on the 2d disc log. Requires DISC_LOG to be defined on build. : (null)\n",
+      "disc_log_dt : If non-zero, only allows disc log output every disc_log_dt Myr. : (null)\n",
+      "disc_log_directory : Directory into which disc logging is sent (must exist!). : /tmp/\n",
+      "post_ce_adaptive_menv : If TRUE, and if post_ce_objects_have_envelopes is TRUE, then the envelope mass of a post-CE star is such that it sits just inside its Roche lobe. If FALSE then a fixed (thin) envelope mass is applied that depends on the stellar type (see macros POST_CE_ENVELOPE_DM_GB, POST_CE_ENVELOPE_DM_EAGB and POST_CE_ENVELOPE_DM_TPAGB). : (null)\n",
+      "post_ce_objects_have_envelopes : If TRUE then post-common-envelope objects have thin envelopes. You need this if you are to have post-CE post-AGB stars. Note that this *may* be unstable, i.e. you may end up having many CEEs. The mass in the envelope is controlled by post_ce_adaptive_menv. TRUE by default. : (null)\n",
+      "PN_comenv_transition_time : post-common envelope transition time in years (1e2).  This is the time taken to move from CEE ejection to Teff > 30e4 K. Hall et al. (2013) suggest ~100 years. : (null)\n",
+      "minimum_time_between_PNe : The minimum time (Myr) between planetary nebula detections. This prevents multiple, fast common envelopes triggering two PNe (0.1). : (null)\n",
+      "PN_Hall_fading_time_algorithm : In stars with low mass (<0.45Msun) cores, you can choose to set the PN fading time to either the minimum (PN_HALL_FADING_TIME_ALGORITHM_MINIMUM) or maximum (PN_HALL_FADING_TIME_ALGORITHM_MAXIMUM) as shown in Fig. 6 of Hall et al. (2013). : (null)\n",
+      "PPN_envelope_mass : Desired pre-planetary nebula (post-AGB) envelope mass. : (null)\n",
+      "cbdisc_eccentricity_pumping_method : Select from various eccentricity-pumping methods when there is a circumbinary disc. Requires DISCS. 0 = off. : (null)\n",
+      "cbdisc_viscous_photoevaporative_coupling : Set to 1 to turn on viscous-photoevaporative coupling in circumbinary discs. Requires DISCS. 0 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_NONE = off, 1 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_INSTANT instant, 2 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_VISCOUS slow, viscous wind. : (null)\n",
+      "cbdisc_inner_edge_stripping_timescale : Defines the timescale for mass loss from by inner edge stripping. 0 = instant, 1 = very long, 2 = viscous at Revap_in, 3 = orbital at Revap_in. : (null)\n",
+      "cbdisc_outer_edge_stripping_timescale : Defines the timescale for mass loss from by outer edge stripping. 0 = instant, 1 = very long, 2 = viscous at Revap_in, 3 = orbital at Revap_out. : (null)\n",
+      "cbdisc_viscous_L2_coupling : Set to 1 to turn on viscous-L2-loss coupling in circumbinary discs. Requires DISCS. 0 = off. : (null)\n",
+      "gravitational_radiation_model : Model for gravitational radiation from the system. 0=Hurley et al 2002 (Landau and Lifshitz 1951). 1 = as 0 but only when there is no RLOF. 2 = none. : (null)\n",
+      "nova_irradiation_multiplier : Multiplier for nova-radiative induced mass loss. (Shara+1986) : (null)\n",
+      "gravitational_radiation_modulator_J : Modulator for gravitational wave radiation angular momentum loss rate (1.0). : (null)\n",
+      "gravitational_radiation_modulator_e : Modulator for gravitational wave radiation eccentricity pumping rate (1.0). : (null)\n",
+      "nova_faml_multiplier : Nova friction-induced angular momentum loss multiplier. (Shara+1986) : (null)\n",
+      "RLOF_angular_momentum_transfer_model : Choose angular momentum transfer model in RLOF. 0=BSE (with discs), 1=conservative : (null)\n",
+      "post_SN_orbit_method : Method by which the post-SN orbit is calculated. 0=BSE, 1=Tauris&Taken 1998. : (null)\n",
+      "multiplicity : Multiplicity: 1=single star, 2=binary, 3=triple, 4=quadruple. : (null)\n",
+      "accretion_limit_eddington_steady_multiplier : Steady accretion is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_steady_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)\n",
+      "accretion_limit_eddington_LMMS_multiplier : Accretion from a low-mass, convective, main_sequence star is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_LMMS_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)\n",
+      "accretion_limit_eddington_WD_to_remnant_multiplier : Accretion from a WD onto a remnant star (e.g. another white dwarf, neutron star or black hole) is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_WD_to_remnant_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)\n",
+      "accretion_limit_thermal_multiplier : Mass transfer onto a MS, HG or CHeB star is limited by the accretor's thermal rate times this multiplier. : (null)\n",
+      "accretion_limit_dynamical_multiplier : Mass transfer is limited by the accretor's dynamical rate times this multiplier. : (null)\n",
+      "donor_limit_envelope_multiplier : Mass transfer by RLOF is limited by this fraction of the donor's envelope mass per timestep : (null)\n",
+      "donor_limit_thermal_multiplier : Mass transfer by RLOF is limited by the accretor's thermal rate times this multiplier. : (null)\n",
+      "donor_limit_dynamical_multiplier : Mass transfer by RLOF is limited by the donor's dynamical rate times this multiplier. : (null)\n",
+      "Bondi_Hoyle_accretion_factor : Wind accretion rate, as calculated by the Bondi-Hoyle-Littleton formula, multiplcation factor. Hurley et al 2002 use 1.5, which is the default. : (null)\n",
+      "tidal_strength_factor : A modulator for the tidal strength. If this factor > 1 then tides are stronger, i.e. tidal timescales are reduced. : (null)\n",
+      "hachisu_qcrit : Critical q=Maccretor/Mdonor above which Hachisu's disk wind turns on. : (null)\n",
+      "hachisu_disk_wind : Set to True to turn on Hachisu's disk wind when material accretes too fast onto a white dwarf. This helps to make more SNeIa. See also hachisu_qcrit. : (null)\n",
+      "mass_accretion_for_eld : The mass that must be accreted onto a COWD for it to ignite as an edge-lit detonation SNIa. : (null)\n",
+      "WDWD_merger_algorithm : Algorithm to be used when merging two white dwarfs. 0 = Hurley et al. (2002), 1 = Perets+ (2019), 2 = Chen+ (2016, todo)  : (null)\n",
+      "type_Ia_MCh_supernova_algorithm : Algorithm to be used when calculating type Ia yields from Chandrasekhar-mass exploders. 0 = DD7 (Iwamoto 1999), 1 = Seitenzahl 2013 3D hydro yields (you must also set Seitenzahl2013_model)  : (null)\n",
+      "Seitenzahl2013_model : Which of Seitenzahl et al. 2013's models to use? One of N1,N3,N5,N10,N20,N40,N100L,N100,N100H,N150,N200,N300C,N1600,N1600C,N100_Z0.5,N100_Z0.1,N100_Z0.01 (defaults to N100). : N1\n",
+      "type_Ia_sub_MCh_supernova_algorithm : Algorithm to be used when calculating type Ia yields from sub-Chandrasekhar-mass exploders. (Currently unused.) : (null)\n",
+      "max_HeWD_mass : The maximum mass a HeWD can have before it ignites helium (0.7). : (null)\n",
+      "merger_mass_loss_fraction : Fraction of the total mass which is lost when stars merge. : (null)\n",
+      "merger_angular_momentum_factor : When two stars merge the resulting single star retains a fraction of the total system angular momentum (or the critical spin angular momentum, if it is smaller) multiplied by this factor. : (null)\n",
+      "wind_angular_momentum_loss : Prescription for losing angular momentum in a stellar wind. 0=Hurley et al 2002 ('Tout') prescription, 1=lw i.e. a factor multiplying the specific orbital angular momentum, 2=lw hybrid for fast winds. Set wind_djorb_fac to the desired factor.. : (null)\n",
+      "wind_djorb_fac : Factor multiplying angular momentum loss in a stellar wind when wind_angular_momentum_loss=0 (the Tout/Hurley et al 2002 prescription). See wind_angular_momentum_loss. : (null)\n",
+      "lw : Factor multiplying angular momentum loss in a stellar wind when wind_angular_momentum_loss=1,2 (the 'lw' prescription). See wind_angular_momentum_loss. : (null)\n",
+      "VW93_EAGB_wind_speed : Activate this to use Vassiliadis and Wood (1993) wind speed during the EAGB. : (null)\n",
+      "VW93_TPAGB_wind_speed : Activate this to use Vassiliadis and Wood (1993) wind speed during the EAGB. : (null)\n",
+      "use_periastron_Roche_radius : Set this to True to use the Roche lobe radius at periastron, rather than (the default to) assume a circular orbit. This will be useful one day when we treat RLOF in eccentric orbits properly, hopefully. : (null)\n",
+      "qcrit_LMMS : Apply critical q=Mdonor/Maccretor value for low-mass main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_MS : Apply critical q=Mdonor/Maccretor value for (non-low mass) main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HG : Apply critical q=Mdonor/Maccretor value for Hertzsprung gap stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_GB : Apply critical q=Mdonor/Maccretor value for first red giant branch stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_CHeB : Apply critical q=Mdonor/Maccretor value for core helium burning stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_EAGB : Apply critical q=Mdonor/Maccretor value for early-AGB stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_TPAGB : Apply critical q=Mdonor/Maccretor value for TP-AGB stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeMS : Apply critical q=Mdonor/Maccretor value for helium main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeHG : Apply critical q=Mdonor/Maccretor value for helium Hertzsprung gap stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeGB : Apply critical q=Mdonor/Maccretor value for helium red giant stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_HeWD : Apply critical q=Mdonor/Maccretor value for helium white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_COWD : Apply critical q=Mdonor/Maccretor value for carbon-oxygen white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_ONeWD : Apply critical q=Mdonor/Maccretor value for oxygen-neon white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_NS : Apply critical q=Mdonor/Maccretor value for neutron stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_BH : Apply critical q=Mdonor/Maccretor value for black holes to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_LMMS : Apply critical q=Mdonor/Maccretor value for (low mass) main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_MS : Apply critical q=Mdonor/Maccretor value for (non-low mass) main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HG : Apply critical q=Mdonor/Maccretor value for Hertzsprung gap stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_GB : Apply critical q=Mdonor/Maccretor value for first red giant branch stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_CHeB : Apply critical q=Mdonor/Maccretor value for core helium burning stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_EAGB : Apply critical q=Mdonor/Maccretor value for early-AGB stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_TPAGB : Apply critical q=Mdonor/Maccretor value for TP-AGB stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeMS : Apply critical q=Mdonor/Maccretor value for helium main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeHG : Apply critical q=Mdonor/Maccretor value for helium Hertzsprung gap stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeGB : Apply critical q=Mdonor/Maccretor value for helium red giant stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_HeWD : Apply critical q=Mdonor/Maccretor value for helium white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_COWD : Apply critical q=Mdonor/Maccretor value for carbon-oxygen white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_ONeWD : Apply critical q=Mdonor/Maccretor value for oxygen-neon white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_NS : Apply critical q=Mdonor/Maccretor value for neutron stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "qcrit_degenerate_BH : Apply critical q=Mdonor/Maccretor value for black holes to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
+      "mass_for_Hestar_Ia_upper : Only helium stars below this mass can explode as SNIa. Default is zero, i.e. it never happens. See also mass_for_Hestar_Ia_lower. : (null)\n",
+      "mass_for_Hestar_Ia_lower : Only helium stars above this mass can explode as SNIa. Default is zero, i.e. it never happens. See also mass_for_Hestar_Ia_upper. : (null)\n",
+      "alphaCB : Circumbinary disk viscosity parameter, alpha. : (null)\n",
+      "minimum_donor_menv_for_comenv : Minimum donor envelope mass for common envelope evolution to be triggered (Msun). Default 0. : (null)\n",
+      "comenv_prescription : Use this to choose which common envelope prescription you should use. 0=Hurley et al 2002 (based on the Paczyński energy model) or 1=Nelemans and Tout (angular momentum model). See also alpha_ce, comenv_ms_accretion_mass, comenv_ms_accretion_fraction, comenv_ns_accretion_fraction, comenv_ns_accretion_mass, nelemans_gamma, nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs, lambda_ce, lambda_ionisation. : (null)\n",
+      "comenv_prescription%d : Use this to choose which common envelope prescription you should use. 0=Hurley et al 2002 (based on the Paczyński energy model) or 1=Nelemans and Tout (angular momentum model). See also alpha_ce, comenv_ms_accretion_mass, comenv_ms_accretion_fraction, comenv_ns_accretion_fraction, comenv_ns_accretion_mass, nelemans_gamma, nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs, lambda_ce, lambda_ionisation. : (null)\n",
+      "comenv_ejection_spin_method : When a common envelope is ejected, we need to decide how fast the stars are left spinning. COMENV_EJECTION_SPIN_METHOD_DO_NOTHING (0) is the default, this just leaves the stars/stellar cores spinning with the same spin rate (omega = angular velocity) with which they entered the common envelope phase. COMENV_EJECTION_SPIN_METHOD_SYCHRONIZE instead tidally synchronizes the stars with their new orbital angular velocity. : (null)\n",
+      "comenv_merger_spin_method : When a common envelope binary merges, we need to decide how fast the resulting single star is left spinning. COMENV_MERGER_SPIN_METHOD_SPECIFIC (0) is the default, this preserves angular momentum but limits the specific angular momentum of the merged star to the specific angular momentum of the system at the onset of common envelope evolution. COMENV_MERGER_SPIN_METHOD_CONSERVE_ANGMOM (1) sets the merger's angular momentum to be that of the system at the onset of common envelope evolution (which means the star may be rotating supercritically). COMENV_MERGER_SPIN_METHOD_CONSERVE_OMEGA (2) sets the spin rate (angular frequency = omega) of the merged star to be that of the orbit just at the onset of common envelope evolution. : (null)\n",
+      "comenv_ms_accretion_mass : Experimental. During common envelope evolution, a main sequence star may accrete some of the envelope's mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_fraction. : (null)\n",
+      "comenv_ms_accretion_fraction : Experimental. During common envelope evolution, a main sequence may accrete a fraction of the envelope's mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_mass. : (null)\n",
+      "comenv_ns_accretion_mass : Experimental. During common envelope evolution, a neutron star may accrete some of the envelope's mass. Requires COMENV_NS_ACCRETION. See also comenv_ns_accretion_fraction. : (null)\n",
+      "comenv_ns_accretion_fraction : Experimental. During common envelope evolution, a neutron star may accrete a fraction of the envelope's mass. Requires COMENV_NS_ACCRETION. See also comenv_ns_accretion_mass. : (null)\n",
+      "alpha_ce : Common envelope energy formalism parameter. A fraction alpha of the orbital energy is used to eject the envelope. See Hurley et al 2002 for details. : (null)\n",
+      "alpha_ce%d : Common envelope energy formalism parameter. A fraction alpha of the orbital energy is used to eject the envelope. See Hurley et al 2002 for details. : (null)\n",
+      "lambda_ce : Common envelope parameter. The binding energy of the common envelope is G*M*Menv/(lambda*R). Typically this is taken to be 0.5, but if set to -1 binary_c uses the Dewi and Tauris fits instead, -2 uses the formalism of Wang, Jia and Li (2016) and if -3 then a polytropic formalism is used (see also comenv_splitmass). : (null)\n",
+      "lambda_ce%d : Common envelope parameter. The binding energy of the common envelope is G*M*Menv/(lambda*R). Typically this is taken to be 0.5, but if set to -1 binary_c uses the Dewi and Tauris fits instead, -2 uses the formalism of Wang, Jia and Li (2016) and if -3 then a polytropic formalism is used (see also comenv_splitmass). : (null)\n",
+      "comenv_splitmass : When lambda_ce=-2, the envelope binding energy, lambda, is calculated using a polytropic formalism. The comenv_splitmass defines the point, in the units of the core mass, above which material is ejected. : (null)\n",
+      "nelemans_recalc_eccentricity : If True, recalculate the eccentricity after angular momentum is removed.  : (null)\n",
+      "comenv_post_eccentricity : Eccentricity remaining after common envelope ejection. : (null)\n",
+      "nelemans_gamma : Set the fraction of the orbital specific angular momentum that is used to eject the common envelope according to the Nelemans and Tout prescription. See also nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs. : (null)\n",
+      "nelemans_minq : Only activate the Nelemans and Tout common envelope prescription for q>nelemans_minq. See also nelemans_gamma, nelemans_max_frac_j_change, nelemans_n_comenvs. : (null)\n",
+      "nelemans_max_frac_j_change : Maximum fractional angular momentum change in the Nelemans and Tout common envelope prescription. See also nelemans_gamma, nelemans_minq, nelemans_n_comenvs. : (null)\n",
+      "nelemans_n_comenvs : Set the maximum number of common envelope ejections allowed to follow the Nelemans and Tout prescription, after which the standard alpha prescription is used. : (null)\n",
+      "lambda_ionisation : A fraction lambda_ionisation of the recombination energy in the common envelope goes into ejecting the envelope. This is usually 0.0, but a positive value can make a big difference to the outcome of common envelope evolution. : (null)\n",
+      "lambda_ionisation%d : A fraction lambda_ionisation of the recombination energy in the common envelope goes into ejecting the envelope. This is usually 0.0, but a positive value can make a big difference to the outcome of common envelope evolution. : (null)\n",
+      "lambda_enthalpy : A fraction of the enthalpy to be included in the common envelope evolution binding energy. Only used for the Wang 2016 prescription (so far). : (null)\n",
+      "lambda_enthalpy%d : A fraction of the enthalpy to be included in the common envelope evolution binding energy. Only used for the Wang 2016 prescription (so far). : (null)\n",
+      "cbdisc_albedo : Circumbinary-disc albedo. Requires DISCS. : (null)\n",
+      "cbdisc_gamma : Circumbinary disc gamma (equation of state) parameter. Requires DISCS. : (null)\n",
+      "cbdisc_alpha : Circumbinary disc alpha (viscosity) parameter. Requires DISCS. : (null)\n",
+      "cbdisc_kappa : Circumbinary disc kappa (opacity) parameter. Requires DISCS. : (null)\n",
+      "cbdisc_minimum_evaporation_timescale : Circumbinary disc minimum evaporation timescale (years). If (slow, not edge stripped) mass loss would evaporate the disc on a timescale less than this, simply evaporate the disc immediated. Usually set to 1y, ignore if zero. Requires DISCS. : (null)\n",
+      "cbdisc_torquef : Circumbinary disc binary torque multiplier. Requires DISCS. : (null)\n",
+      "cbdisc_max_lifetime : Circumbinary disc maximum lifetime (years, ignored if 0). Requires DISCS. : (null)\n",
+      "cbdisc_init_dM : On cbdisc start, reduce mass by a fraction dM if it won't converge. Requires DISCS. : (null)\n",
+      "cbdisc_init_dJdM : On cbdisc start, reduce angular momentum by a fraction dJ/dM*dM if it won't converge. Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_constant_rate : Circumbinary disc constant mass loss rate (Msun/year). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_FUV_multiplier : Circumbinary disc FUV mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_Xray_multiplier : Circumbinary disc X-ray mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_ISM_ram_pressure_multiplier : Circumbinary disc interstellar medium ram pressure stripping mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_ISM_pressure : Circumbinary disc interstellar medium ram pressure in units of Boltzmann constant per Kelvin (I think...). Requires DISCS. Typically 3000.0. See e.g. http://www.astronomy.ohio-state.edu/~pogge/Ast871/Notes/Intro.pdf page 15 or https://arxiv.org/pdf/0902.0820.pdf Fig. 1 (left panel). : (null)\n",
+      "cbdisc_mass_loss_inner_viscous_multiplier : Circumbinary disc inner edge viscous mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_mass_loss_inner_viscous_angular_momentum_multiplier : Circumbinary disc inner edge viscous angular momentum multiplier (no units). The inner edge angular momentum Requires DISCS. : (null)\n",
+      "cbdisc_resonance_multiplier : Circumbinary disc resonant interaction multiplier, affects eccentricity pumping and angular momentum rates. Requires DISCS. : (null)\n",
+      "cbdisc_resonance_damping : Circumbinary disc resonant interaction damping: should be on (True) to damp the l=1, m=2 resonance when the disc inner edge lies outside the resonance location. Requires DISCS. : (null)\n",
+      "cbdisc_fail_ring_inside_separation : If True, while converging on a structure, circumbinary discs with Rring < the binary separation are immediately failed. : (null)\n",
+      "cbdisc_mass_loss_inner_L2_cross_multiplier : Circumbinary disc inner edge L2-crossing mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
+      "cbdisc_minimum_luminosity : Circumbinary disc minimum luminosity. If the disc becomes dimmer than this, the disc is evaporated instantly. Requires DISCS. : (null)\n",
+      "cbdisc_minimum_mass : Circumbinary disc minimum mass. If the disc becomes less massive than this, the disc is evaporated instantly. Requires DISCS. : (null)\n",
+      "cbdisc_minimum_fRing : Circumbinary disc minimum fRing. If the disc becomes a ring, and fRing = |Rout/Rin-1| < this value (and this value is non-zero), the disc is evaporated instantly. Requires DISCS. : (null)\n",
+      "comenv_disc_angmom_fraction : If >0 Fraction of the common envelope's angular momentum that goes into the circumbinary disc. If -1 then uses the moments of inertia to calculate (deprecated), if -2 use the common envelope's specific angular momentum, if -3 uses the L2 point at the end of the common envelope to set the angular momentum. Requires DISCS and DISCS_CIRCUMBINARY_FROM_COMENV. : (null)\n",
+      "comenv_disc_mass_fraction : Fraction of the common envelope's mass that goes into the circumbinary disc. Requires DISCS and DISCS_CIRCUMBINARY_FROM_COMENV. : (null)\n",
+      "wind_disc_angmom_fraction : If >0 Fraction of the wind envelope's angular momentum that goes into the circumbinary disc. If -1 then uses the L2 point's specific angular momentum. Requires DISCS and DISCS_CIRCUMBINARY_FROM_WIND. : (null)\n",
+      "wind_disc_mass_fraction : Fraction of the stellar wind's mass that goes into the circumbinary disc. Requires DISCS and DISCS_CIRCUMBINARY_FROM_WIND. : (null)\n",
+      "WRLOF_method : Choose whether and how to apply wind-Roche-lobe-overflow. 0=none, 1=q-dependent, 2=quadratic See Abate et al 2013/14 for details. Requires WRLOF_MASS_TRANSFER. : (null)\n",
+      "minimum_timestep : The minimum timestep (Myr). : (null)\n",
+      "timestep_solver_factor : Factor applied in timestep_limits, e.g. to prevent X changing too fast by comparing to X/dX/dt, which is usually 1 but can be higher to lengthen timesteps when using an alternative solver. : (null)\n",
+      "RLOF_mdot_factor : Multiplier applied to the mass transfer rate during Roche-lobe overflow. Requires RLOF_MDOT_MODULATION. : (null)\n",
+      "RLOF_f : Factor to enlarge a Roche lobe, nominally because of radiation pressure (see Dermine et al paper). Requires RLOF_RADIATION_CORRECTION. : (null)\n",
+      "minimum_separation_for_instant_RLOF : If True, instead of evolving the system just report the minimum separation (on the zero-age main sequence) that would lead to instant RLOF. Used by binary_grid. See also minimum_orbital_period_for_instant_RLOF and maximum_mass_ratio_for_instant_RLOF. : (null)\n",
+      "minimum_orbital_period_for_instant_RLOF : If True, instead of evolving the system just report the minimum orbital period (on the zero-age main sequence) that would lead to instant RLOF. Used by binary_grid. See also minimum_separation_for_instant_RLOF and maximum_mass_ratio_for_instant_RLOF. : (null)\n",
+      "maximum_mass_ratio_for_instant_RLOF : If True, instead of evolving the system just report the maximum mass ratio (on the zero-age main sequence) that would lead to instant RLOF, given M1 and orbital period. Used by binary_grid. See also minimum_separation_for_instant_RLOF and minimum_orbital_period_for_instant_RLOF. : (null)\n",
+      "RLOF_method : Use RLOF_method to choose the algorithm you use for Roche-lobe overflow mass loss rate calculations. 0=Hurley et al 2002, 1=Adaptive (for radiative stars) R=RL method, 2=Ritter (probably broken), 3=Claeys etal 2014 variant on Hurley et al 2002. : (null)\n",
+      "RLOF_interpolation_method : When a star overflows its Roche lobe, it always has R>RL because of the limited time resolution of the simulation. Binary_c then uses an algorithm to get back to when R~RL (within a desired tolerance, set in RLOF_ENTRY_THRESHOLD which is usually 1.02, i.e. overflow of 2%). You can choose algorithm 0, the Hurley et al 2002 method which reverses time (i.e. uses a Newton-like scheme), or 1 to use the binary_c method which rejects a timestep (and hence does no logging on that timestep) and repeats with half the timestep until R~RL. The latter is now the default, because this means there are no negative timesteps which break various other algorithms (e.g. nucleosynthesis). : (null)\n",
+      "nova_retention_fraction : The mass accreted during a nova as fraction of mass transferred : (null)\n",
+      "beta_reverse_nova : The fraction of mass ejected in a nova explosion which is accreted back onto the companion star. Set to -1 to automatically calculate based on a geometric argument, or 0 or positive to set the value. : (null)\n",
+      "WD_accretion_rate_novae_upper_limit_hydrogen_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is hydrogen rich : above this rate the mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_novae_upper_limit_helium_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is helium rich : above this rate the mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_novae_upper_limit_other_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is neither hydrogen nor helium rich : above this rate the mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_new_giant_envelope_lower_limit_hydrogen_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope with a hydrogen-rich donor. Below this mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_new_giant_envelope_lower_limit_helium_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope with a helium-rich donor. Below this mass transfer leads to stable burning. : (null)\n",
+      "WD_accretion_rate_new_giant_envelope_lower_limit_other_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope when the donor is neither hydrogen nor helium rich. Below this mass transfer leads to stable burning. : (null)\n",
+      "CRAP_parameter : Tidally enhanced mass loss parameter. See Tout and Eggleton's paper on the subject. (Was the parameter bb). : (null)\n",
+      "individual_novae : If individual_novae is True, novae are resolved such that each explosion is performed separtaely. : (null)\n",
+      "nova_timestep_accelerator_num : The nova timestep is accelerated if the nova number exceeds nova_timestep_accelerator_num. If zero or negative, acceleration is off. See also nova_timestep_accelerator_index and nova_timestep_accelerator_max. Only used if individual_novae is on.\n",
+      " : (null)\n",
+      "nova_timestep_accelerator_index : The index at which the nova timestep is accelerated. A larger value gives longer timesteps. See also nova_timestep_accelerator_num and nova_timestep_accelerator_max. Only used if individual_novae is on.\n",
+      " : (null)\n",
+      "nova_timestep_accelerator_max : The nova timestep is accelerated by a factor that is capped at nova_timestep_accelerator_max. This parameter is ignored if it is zero or negative. See also nova_timestep_accelerator_num and nova_timestep_accelerator_index. Only used if individual_novae is on.\n",
+      " : (null)\n",
+      "nonconservative_angmom_gamma : Mass lost from the system (but NOT from a stellar wind) takes a fraction gamma of the orbital angular momentum with it. Set to -1 to take the specific angular momentum of the donor star. Set to -2 to take super-Eddington, nova and disk-wind angular momenta as if a wind from the accretor. : (null)\n",
+      "max_stellar_angmom_change : Maxmimum fractional change in stellar angular momentum allowed before a timestep is rejected (0.05). : (null)\n",
+      "comenv_ms_accretion_mass : Experimental. During common envelope evolution, a main sequence star may accrete some of the envelope's mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_fraction. : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Nucsyn\n",
+      "############################################################\n",
+      "third_dup : If True, enables third dredge up. Requires NUCSYN and NUCSYN_THIRD_DREDGE_UP. : (null)\n",
+      "third_dup_multiplier : Usage: --third_dup_multiplier <i> <f>. Multiplies the abundance of element <i> by <f> during third dredge up. : 1.0\n",
+      "NeNaMgAl : Enables NeNaMgAl reaction network. Requires NUCSYN and NUCSYN_HBB. : Ignore\n",
+      "nucsyn_network%d : Usage: --nucsyn_network%d <boolean>. Turn a nuclear network on or off. : (null)\n",
+      "nucsyn_network_error%d : Usage: --nucsyn_network_error%d <f>. Threshold error in nuclear network solver for network %d. : (null)\n",
+      "nucreacmult%d : Usage: --nucreacmult%d <f>. Multiply nuclear reaction given by the integer %d (integer) by f (float).  : (null)\n",
+      "nucsyn_metallicity : This sets the metallicity of the nucleosynthesis algorithms, i.e. the amount (by mass) of matter which is not hydrogen or helium. Usually you'd just set this with the metallicity parameter, but if you want the nucleosynthesis to be outside the range of the stellar evolution algorithm (e.g. Z=0 or Z=0.04) then you need to use nucsyn_metallicity. That said, it's also outside the range of some of the nucleosynthesis algorithms as well, so you have been warned! : (null)\n",
+      "nucsyn_solver : Choose the solver used in nuclear burning. 0 = KAPS_RENTROP is a Kaps-Rentrop scheme (fast, not great for stiff problems), 1 = LSODA (Adams/BSF switcher), 2 = CVODE library (https://computing.llnl.gov/projects/sundials. Default 0.  : 0\n",
+      "initial_abundance_mix : initial abundance mixture: 0=AG89, 1=Karakas 2002, 2=Lodders 2003, 3=Asplund 2005 (not available?), 4=Garcia Berro, 5=Grevesse Noels 1993 : 0\n",
+      "init_abund : Usage: --init_abund <i> <X>. Sets the initial abundance of isotope number <i> to mass fraction <X>. : 0.02\n",
+      "init_abund_mult : Usage: --init_abund_mult <i> <f>. Multiplies the initial abundance of isotope number <i> by <f>. : 1.0\n",
+      "init_abund_dex : Usage: --init_abund_dex <i> <f>. Changes the initial abundance of isotope number <i> by <f> dex. : 0.0\n",
+      "init_abunds_only : If True, outputs only the initial abundances, then exits. : (null)\n",
+      "initial_abunds_only : If True, outputs only the initial abundances, then exits. : (null)\n",
+      "no_thermohaline_mixing : If True, disables thermohaline mixing. : (null)\n",
+      "lithium_GB_post_Heflash : Sets the lithium abundances after the helium flash. Requires NUCSYN and LITHIUM_TABLES. : (null)\n",
+      "lithium_GB_post_1DUP : Sets the lithium abundance after first dredge up. Requires NUCSYN and LITHIUM_TABLES. : (null)\n",
+      "lithium_hbb_multiplier : Multiplies the lithium abundances on the AGB during HBB (based on Karakas/Fishlock et al models).Requires NUCSYN and LITHIUM_TABLES. : (null)\n",
+      "angelou_lithium_decay_function : Functional form which describes Li7 decay. Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Choices are : 0 expoential (see angelou_lithium_decay_time). : (null)\n",
+      "angelou_lithium_LMMS_time : Time at which lithium manufacture is triggered in a low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_MS_time : Time at which lithium manufacture is triggered on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_HG_time : Time at which lithium manufacture is triggered on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_GB_time : Time at which lithium manufacture is triggered on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_CHeB_time : Time at which lithium manufacture is triggered during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_EAGB_time : Time at which lithium manufacture is triggered on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_TPAGB_time : Time at which lithium manufacture is triggered on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_LMMS_decay_time : Decay time for surface lithium abundance during the low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_MS_decay_time : Decay time for surface lithium abundance on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_HG_decay_time : Decay time for surface lithium abundance on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_GB_decay_time : Decay time for surface lithium abundance on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_CHeB_decay_time : Decay time for surface lithium abundance during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_EAGB_decay_time : Decay time for surface lithium abundance on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_TPAGB_decay_time : Decay time for surface lithium abundance on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_LMMS_massfrac : Lithium mass fraction when its manufacture is triggered during the low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_MS_massfrac : Lithium mass fraction when its manufacture is triggered on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_HG_massfrac : Lithium mass fraction when its manufacture is triggered on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_GB_massfrac : Lithium mass fraction when its manufacture is triggered on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_CHeB_massfrac : Lithium mass fraction when its manufacture is triggered during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_EAGB_massfrac : Lithium mass fraction when its manufacture is triggered on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_TPAGB_massfrac : Lithium mass fraction when its manufacture is triggered on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
+      " : (null)\n",
+      "angelou_lithium_vrot_trigger : Equatorial rotational velocity at which lithium manufacture is triggered (km/s). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0.\n",
+      " : (null)\n",
+      "angelou_lithium_vrotfrac_trigger : Fraction of Keplerian (breakup) equatorial rotational velocity at which lithium manufacture is triggered (must be <1, ignored if 0). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0.\n",
+      " : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Output\n",
+      "############################################################\n",
+      "david_logging_function : Function to choose which kind of information gets logged Requires DAVID. Choices are: 0= None, >0 for custom logging functions : Ignore\n",
+      "cf_amanda_log : Enable logging to compare to Amanda's models. : (null)\n",
+      "float_overflow_checks : Turn on to enable floating-point overflow checks at the end of each timestep, if they are available. 0=off, 1=warn (stderr) on failure, 2=exit on failure (0) : (null)\n",
+      "save_pre_events_stardata : Enable this to save a copy of stardata to stardata->pre_events_stardata just before an event. : (null)\n",
+      "disable_end_logging : Disable the logging that happens at the end of the evolution. : (null)\n",
+      "ensemble : Turn on ensemble calculations and output. : (null)\n",
+      "ensemble_filters_off : Sets all ensemble filters to be off (FALSE) - these can then be enabled one-by-one with --ensemble_filter_[...] TRUE. : (null)\n",
+      "ensemble_filter_%d : Turn on or off ensemble filter <n>. For a list of filters, see ensemble_macros.h. : (null)\n",
+      "ensemble_legacy_ensemble : Turn on ensemble legacy population output. : (null)\n",
+      "legacy_yields : Turn on ensemble legacy yield output. : (null)\n",
+      "ensemble_defer : Defer ensemble output. : (null)\n",
+      "ensemble_dt : When doing ensemble calculations, data are stored and/or output every ensemble_dt Myr. See also ensemble, ensemble_logdt, ensemble_startlogtime. : (null)\n",
+      "ensemble_logdt : When doing ensemble calculations, and when logensembletimes is set, the ensemble is stored/output every ensemble_logdt Myr. See also ensemble, ensemble_dt, ensemble_startlogtime. : (null)\n",
+      "ensemble_startlogtime : Start log ensemble data storage/calculations/output at ensemble_startlogtime. See also ensemble, ensemble_dt, ensemble_startlogtime. : (null)\n",
+      "ensemble_logtimes : When doing ensemble calculations/output, set this to act at log times rather than linear times. : (null)\n",
+      "postagb_legacy_logging : Turn on post-AGB legacy logging. : (null)\n",
+      "disc_legacy_logging : Turn on disc legacy logging. : (null)\n",
+      "EMP_logg_maximum : Maximum logg that EMP stars are allowed to have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_minimum_age. : (null)\n",
+      "EMP_minimum_age : Minimum age that EMP stars are required to have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_logg_maximum. : (null)\n",
+      "EMP_feh_maximum : Maximum [Fe/H] that an EMP stars may have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default -2.0. : (null)\n",
+      "CEMP_cfe_minimum : Minimum [C/Fe] that CEMP stars are required to have. See Izzard et al 2009. See also NEMP_cfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default 0.7. : (null)\n",
+      "NEMP_cfe_minimum : Minimum [N/Fe] that NEMP stars are required to have. See Izzard et al 2009, Pols et al. 2012. See also CEMP_cfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default 1.0. : (null)\n",
+      "thick_disc_start_age : Lookback time for the start of the thick disc star formation, e.g. 13e3 Myr. Units = Myr. : (null)\n",
+      "thick_disc_end_age : Lookback time for the end of the thick disc star formation, e.g. 4e3 Myr. Units = Myr. : (null)\n",
+      "thick_disc_logg_min : Minimum logg for thick disc giants to be logged. : (null)\n",
+      "thick_disc_logg_max : Maximum logg for thick disc giants to be logged. : (null)\n",
+      "escape_velocity : A parameter used in constructing galactic chemical evolution (GCE) models. If the stellar wind velocity exceeds this value, any chemical yield from the wind is ignored, i.e. assumed lost. (km/s) Requires NUCSYN_GCE_OUTFLOW_CHECKS. Default 1e9 km/s. See also escape_fraction. : (null)\n",
+      "escape_fraction : A parameter used in constructing galactic chemical evolution (GCE) models. If the stellar wind velocity exceeds this value, any chemical yield from the wind is ignored, i.e. assumed lost. (km/s) Requires NUCSYN_GCE_OUTFLOW_CHECKS. Default 0.0. See also escape_velocity. : (null)\n",
+      "colour_log : If set to True, thelog is coloured with ANSI colour formatting. Requires FILE_LOG to be defined. : \n",
+      "log_filename : Location of the output logging filename. If set to \"/dev/null\" then there is no logging. : \n",
+      "stopfile : File which, when it exists, will stop the current binary_c repeat run. : \n",
+      "stardata_dump_filename : Location of the stardata dump file. : \n",
+      "stardata_load_filename : Location of the stardata file to load. : \n",
+      "api_log_filename_prefix : Location of the output logging filename prefix for the API. If set to \"/dev/null\" then there is no logging. : 0\n",
+      "hrdiag_output : Set to True to output high time-resolution Hertzstrpung-Russell diagram information. Requires HRDIAG. : (null)\n",
+      "internal_buffering : Experimental. Set to non-zero values to implement internal buffering prior to output. For use with binary_grid, you shouldn't really be playing with this. : (null)\n",
+      "eccentric_RLOF_model : Chooses which model is used to handle eccentric RLOF. Default is RLOF_ECCENTRIC_AS_CIRCULAR, i.e. ignore the eccentricity. Note: requires force_corotation_of_primary_and_orbit to be FALSE.\n",
+      " : (null)\n",
+      "force_circularization_on_RLOF : If True forces circularization of stars and orbit when RLOF starts, this is as in the BSE algorithm. (True) : (null)\n",
+      "wtts_log : If True, enables log file output for WTTS2. : (null)\n",
+      "fabian_imf_log_time : Time at which to output for Fabian Schneider's IMF project. Requires FABIAN_IMF_LOG : Ignore\n",
+      "fabian_imf_log_timestep : Timestep for Fabian Schneider's IMF project logging. Requires FABIAN_IMF_LOG : Ignore\n",
+      "version : Display binary_c version and build information. Also performs timing tests. : Ignore\n",
+      "dumpversion : Display binary_c version number (short format). : Ignore\n",
+      "version_only : Display binary_c version number and build information, but do not perform timing tests or anything that requires stardata to be non-NULL. : Ignore\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Input\n",
+      "############################################################\n",
+      "MINT_dir : Location of MINT algorithm data. : \n",
+      "MINT_data_cleanup : Activate checks on incoming data to try to account for problems. Will make data-loading slower, but may fix a few things. : \n",
+      "MINT_MS_rejuvenation : Turn on or off (hydrogen) main-sequence rejuvenation. : \n",
+      "MINT_remesh : Turn on or off MINT's remeshing. : \n",
+      "MINT_use_ZAMS_profiles : Use chemical profiles at the ZAMS if MINT_use_ZAMS_profiles is TRUE, otherwise set homogeneous abundances. (Default is TRUE, so we use the profiles if they are available.) : \n",
+      "MINT_disable_grid_load_warnings : Use this to explicitly disable MINT's warnings when loading a grid with, e.g., missing or too much data. : \n",
+      "MINT_Kippenhahn : Turn on or off MINT's Kippenhahn diagrams. If 0, off, if 1, output star 1 (index 0), if 2 output star 2 (index 1). Default 0. : \n",
+      "MINT_Kippenhahn_stellar_type : Stellar type selector for Kippenhahn plots. Set to -1 to ignore, otherwise the stellar type number for which Kippenhahn plot data should be output. : \n",
+      "MINT_Kippenhahn_companion_stellar_type : Companion stellar type selector for Kippenhahn plots. Set to -1 to ignore, otherwise the stellar type number for the companion for which Kippenhahn plot data should be output. : \n",
+      "MINT_nuclear_burning : Turn on or off MINT's nuclear burning algorithm. : \n",
+      "MINT_minimum_shell_mass : Minimum shell mass in MINT's nuclear burning routines. : \n",
+      "MINT_maximum_shell_mass : Maximum shell mass in MINT's nuclear burning routines. : \n",
+      "\n",
+      "############################################################\n",
+      "##### Section I/O\n",
+      "############################################################\n",
+      "go : batchmode control command : Ignore\n",
+      "gogo : batchmode control command : Ignore\n",
+      "reset_stars : Reset the star structures. Used in batchmode : Ignore\n",
+      "reset_stars_defaults : Reset the star structures and set defaults. Used in batchmode : Ignore\n",
+      "defaults : Reset all defaults. Used in batchmode : Ignore\n",
+      "echo : Activate batchmode command echoing, i.e. when you enter a command, binary_c repeats the command then executes it. : Ignore\n",
+      "noecho : Deactivate batchmode command echoing. See 'echo'. : Ignore\n",
+      "noechonow : Deactivate batchmode command echoing. See 'echo'. : Ignore\n",
+      "bye : Quit binary_c. Used in batchmode. : Ignore\n",
+      "fin : batchmode control command : Ignore\n",
+      "reset_prefs : Reset preferences struct. Used in batchmode : Ignore\n",
+      "status : Output batchmode status information. : Ignore\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Algorithms\n",
+      "############################################################\n",
+      "repeat : If > 1, repeats the system as many times as required. Handy if you're using Monte-Carlo kicks and want to sample the parameter space well. Also, if you are running speed tests this is good to give a statistically more reasonable result. (See e.g. 'tbse pgo'). : (null)\n",
+      "random_systems : Experimental. Use this to apply random initial system parameters (masses, separations, etc.). Useful for testing only. : (null)\n",
+      "\n",
+      "############################################################\n",
+      "##### Section Misc\n",
+      "############################################################\n",
+      "random_seed : Random number seed, usually a (possibly negative) integer. Useful for exactly reproducing the evolution of a system which involves a kick (which is a Monte-Carlo, i.e. pseudorandom, process). : (null)\n",
+      "random_systems_seed : Random number seed for the generation of random systems. See random_systems and random_seed. : (null)\n",
+      "random_skip : Skip the first <random_seed> random numbers that are generated. Usually this is 0 so they are all used. : (null)\n",
+      "idum : [NB: deprecated, please use 'random_seed' instead.] Random number seed, usually a (possibly negative) integer. Useful for exactly reproducing the evolution of a system which involves a kick (which is a Monte-Carlo, i.e. pseudorandom, process). : (null)\n",
+      "reverse_time : Make time go backwards. To be considered very experimental! : (null)\n",
+      "start_time : Start time for the simulation. : (null)\n",
+      "warmup_cpu : Uses the CPU at maximum power the given number of seconds, prior to running normal stellar evolution. : Ignore\n",
+      "help : Display help pages. Usage: --help <help topic>. : Ignore\n",
+      "argopts : Display argument options. Usage: --argopts <argument>. : Ignore\n",
+      "help_all : Display all help pages. : Ignore\n",
+      "list_args : Display list of arguments with their default values. Useful for batchmode. : Ignore\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(_binary_c_bindings.return_help_all())"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "bfec32cf-7240-4a82-ac30-b3d99a018a28",
+   "metadata": {},
+   "source": [
+    "We can get all the parameter names and their default values with return_arglines(): (abridged output)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 20,
+   "id": "3d29ca9d-ac66-4f9e-81cf-2edd14a98b79",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "__ARG_BEGIN\n",
+      "metallicity = 0.02\n",
+      "effective_metallicity = -1\n",
+      "M_1 = 0\n"
+     ]
+    }
+   ],
+   "source": [
+    "print('\\n'.join(_binary_c_bindings.return_arglines().splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "e8b1c8b6-a878-43f4-bc36-1b20b3e66c6f",
+   "metadata": {},
+   "source": [
+    "Lastly, we can ask binary_c to determine the minimum period or maximum mass for RLOF at the ZAMS: Both of them need an argstring as input"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "e517f561-09c6-419d-ba89-d9cb61e6ebab",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MINIMUM SEPARATION 0.31\n",
+      "MINIMUM PERIOD 0.00632092\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=10,\n",
+    "    orbital_period=4500,\n",
+    "    eccentricity=0.0,\n",
+    "    metallicity=0.02,\n",
+    "    max_evolution_time=15000,\n",
+    ").strip()\n",
+    "\n",
+    "#\n",
+    "output = _binary_c_bindings.return_minimum_orbit_for_RLOF(argstring, store_capsule=store_memaddr)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 46,
+   "id": "7da75a95-8831-4346-a584-e042ced75249",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MAXIMUM MASS RATIO 0.0141\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=5,\n",
+    "    M_2=1,\n",
+    "    orbital_period=0.0001,\n",
+    "    eccentricity=0.0,\n",
+    "    metallicity=0.02,\n",
+    "    max_evolution_time=15000,\n",
+    ").strip()\n",
+    "\n",
+    "#\n",
+    "output = _binary_c_bindings.return_maximum_mass_ratio_for_RLOF(argstring)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "id": "5fe52d8e-1721-4796-a856-002cf4525d96",
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/examples/notebook_custom_logging.ipynb b/examples/notebook_custom_logging.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..05ffbccfc23f0b08e85abed0d467233385520a4b
--- /dev/null
+++ b/examples/notebook_custom_logging.ipynb
@@ -0,0 +1,517 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "879b596b-d70c-4f90-b668-563b4ad93ffc",
+   "metadata": {},
+   "source": [
+    "# Using custom logging routines with binarycpython\n",
+    "In this notebook you'll learn how to use the custom logging functionality"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 37,
+   "id": "696ecbb9-1efd-48f4-a57e-2cf6dfe416f1",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from binarycpython import _binary_c_bindings\n",
+    "from binarycpython.utils.custom_logging_functions import (\n",
+    "    autogen_C_logging_code,\n",
+    "    binary_c_log_code,\n",
+    "    create_and_load_logging_function,\n",
+    ")\n",
+    "from binarycpython.utils.run_system_wrapper import run_system\n",
+    "from binarycpython.utils.grid import Population"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "d4d721cc-df4f-4ac2-b6f9-62e85ca0c1e5",
+   "metadata": {},
+   "source": [
+    "The custom logging functionality allows us to decide the output of binary_c _without_ modifying the actual sourcecode of binary_c (i.e. editing `src/logging/log_every_timestep` in binary_c). Rather, we can create a logging routine from within python.\n",
+    "\n",
+    "Technically, the following steps are taken:\n",
+    "- User creates a logging print statement from within python\n",
+    "- The logging print statement string gets wrapped into a proper c-function by `binary_c_log_code`\n",
+    "- The c-function string gets compiled and loaded into memory by `create_and_load_logging_function`\n",
+    "- The memory adress of the compiled and loaded print function can now be passed to C\n",
+    "- binary_c uses the custom print function \n",
+    "\n",
+    "The custom logging functionality can be used when running systems via `run_system()`, via `Population.evolve()` and `Population.evolve_single()`, and directly via the API\n",
+    "\n",
+    "Within the logging statement we can access information from the stardata object, as well as use logical statements to determine when to log information. What we cannot do, however, is access functions that are not _publicly available_. For very elaborate printing routines it is still advised to actually hardcode the print statement into binary_c itself."
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "be137151-bb57-43d7-bab1-0167512ac727",
+   "metadata": {},
+   "source": [
+    "## Usage"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ac4e5f4c-81e6-4980-b852-aca84ca74f4c",
+   "metadata": {},
+   "source": [
+    "There are two methods to create the C-code that will be compiled:\n",
+    "- Automatically generate the print statement and use the wrapper to generate the full function string, by using `autogen_C_logging_code`\n",
+    "- Create your custom print statement and use the wrapper to generate the full function string, by writing out the print statement. Here the logging statement obviously has to be valid C code"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "236cf821-09ac-4237-9b8f-6e36d2edf446",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Printf(\"MY_STELLAR_DATA %g %g\\n\",((double)stardata->model.time),((double)stardata->star[0].mass));\n"
+     ]
+    }
+   ],
+   "source": [
+    "# generate logging lines. Here you can choose whatever you want to have logged, and with what header\n",
+    "# this generates working print statements\n",
+    "logging_line = autogen_C_logging_code(\n",
+    "    {\n",
+    "        \"MY_STELLAR_DATA\": [\"model.time\", \"star[0].mass\"],\n",
+    "    }\n",
+    ")\n",
+    "print(logging_line)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 30,
+   "id": "feb423d5-5cc3-433c-9801-f8017abbc03a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Printf(\"MY_STELLAR_DATA time=%g mass=%g\\n\", stardata->model.time, stardata->star[0].mass)\n"
+     ]
+    }
+   ],
+   "source": [
+    "# You can also decide to `write` your own logging_line, which allows you to write a more complex logging statement with conditionals.\n",
+    "logging_line = 'Printf(\"MY_STELLAR_DATA time=%g mass=%g\\\\n\", stardata->model.time, stardata->star[0].mass)'\n",
+    "print(logging_line)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 31,
+   "id": "2f5defbf-c623-49ed-a238-fba52a563a58",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "#pragma push_macro(\"Max\")\n",
+      "#pragma push_macro(\"Min\")\n",
+      "#undef Max\n",
+      "#undef Min\n",
+      "#include \"binary_c.h\"\n",
+      "\n",
+      "// add visibility __attribute__ ((visibility (\"default\"))) to it \n",
+      "void binary_c_API_function custom_output_function(struct stardata_t * stardata);\n",
+      "void binary_c_API_function custom_output_function(struct stardata_t * stardata)\n",
+      "{\n",
+      "    // struct stardata_t * stardata = (struct stardata_t *)x;\n",
+      "    Printf(\"MY_STELLAR_DATA time=%g mass=%g\\n\", stardata->model.time, stardata->star[0].mass);\n",
+      "}\n",
+      "\n",
+      "#undef Max \n",
+      "#undef Min\n",
+      "#pragma pop_macro(\"Min\")\n",
+      "#pragma pop_macro(\"Max\")    \n"
+     ]
+    }
+   ],
+   "source": [
+    "# Generate the entire 'script' by wrapping the logging line\n",
+    "custom_logging_code = binary_c_log_code(logging_line)\n",
+    "print(custom_logging_code)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "efa7f1e9-247e-4196-a883-bcff05265d02",
+   "metadata": {},
+   "source": [
+    "Combining the above with e.g. run_system() (see notebook_individual_systems for more examples):"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 32,
+   "id": "dcd74bbc-478b-43e4-b495-8c456e8d1d88",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MY_STELLAR_DATA time=0 mass=2\n",
+      "MY_STELLAR_DATA time=0 mass=2\n",
+      "MY_STELLAR_DATA time=1e-06 mass=2\n",
+      "MY_STELLAR_DATA time=2e-06 mass=2\n"
+     ]
+    }
+   ],
+   "source": [
+    "# logging statement\n",
+    "logging_line = 'Printf(\"MY_STELLAR_DATA time=%g mass=%g\\\\n\", stardata->model.time, stardata->star[0].mass)'\n",
+    "\n",
+    "# Entire script\n",
+    "custom_logging_code = binary_c_log_code(logging_line)\n",
+    "\n",
+    "# Run system\n",
+    "output = run_system(M_1=2, custom_logging_code=custom_logging_code)\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print(\"\\n\".join(output.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "1998ee8f-8c0a-462b-b1e0-54f5963902cc",
+   "metadata": {},
+   "source": [
+    "### Using custom logging with the population object\n",
+    "Custom logging can be used for a whole population by setting the print statement (so not the entire logging script) in `C_logging_code`"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 33,
+   "id": "77bd09b0-1a94-499d-97db-a1f991c67c12",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "EXAMPLE_ABOVE_MS             1.041660877905e+02 4.99198 4.99198 6.1357 6.1357 2 1\n",
+      "EXAMPLE_ABOVE_MS             1.041662558619e+02 4.99198 4.99198 6.14057 6.1357 2 2\n",
+      "EXAMPLE_ABOVE_MS             1.041662560111e+02 4.99198 4.99198 6.14057 6.14057 2 2\n",
+      "EXAMPLE_ABOVE_MS             1.041662564579e+02 4.99198 4.99198 6.14059 6.14057 2 2\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Set up population\n",
+    "pop = Population()\n",
+    "\n",
+    "# Set some BSE parameters\n",
+    "pop.set(\n",
+    "    M_1=5\n",
+    ")\n",
+    "\n",
+    "# Example logging that prints only if the star is post main-sequence\n",
+    "example_logging_string_post_MS = \"\"\"\n",
+    "if(stardata->star[0].stellar_type>MS)\n",
+    "{\n",
+    "    Printf(\"EXAMPLE_ABOVE_MS %30.12e %g %g %g %g %d %d\\\\n\",\n",
+    "        // \n",
+    "        stardata->model.time, // 1\n",
+    "\n",
+    "        stardata->star[0].mass, //2\n",
+    "        stardata->previous_stardata->star[0].mass, //3\n",
+    "\n",
+    "        stardata->star[0].radius, //4\n",
+    "        stardata->previous_stardata->star[0].radius, //5\n",
+    "\n",
+    "        stardata->star[0].stellar_type, //6\n",
+    "        stardata->previous_stardata->star[0].stellar_type //7\n",
+    "  );\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "# Set the logging\n",
+    "pop.set(\n",
+    "    C_logging_code=example_logging_string_post_MS\n",
+    ")\n",
+    "out = pop.evolve_single()\n",
+    "\n",
+    "# Print (abridged) output\n",
+    "print('\\n'.join(out.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "93397ff3-9b71-470d-8bc4-08fe5b1a5dca",
+   "metadata": {},
+   "source": [
+    "### Using custom logging when running directly from the API\n",
+    "When running a system directly with the API we need to manually load the custom logging into memory (via `create_and_load_logging_function`) and pass the memory address to the binary_c binding via `_binary_c_bindings.run_system(argstring, custom_logging_func_memaddr=custom_logging_memaddr)`"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 40,
+   "id": "30142286-34ce-433e-82c8-565e2160ff5b",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "MY_STELLAR_DATA 0 15\n",
+      "MY_STELLAR_DATA 0 15\n",
+      "MY_STELLAR_DATA 1e-06 15\n",
+      "MY_STELLAR_DATA 2e-06 15\n"
+     ]
+    }
+   ],
+   "source": [
+    "# generate logging lines\n",
+    "logging_line = autogen_C_logging_code(\n",
+    "    {\n",
+    "        \"MY_STELLAR_DATA\": [\"model.time\", \"star[0].mass\"],\n",
+    "    }\n",
+    ")\n",
+    "\n",
+    "# Generate code around logging lines\n",
+    "custom_logging_code = binary_c_log_code(logging_line)\n",
+    "\n",
+    "# Generate library and get memaddr\n",
+    "custom_logging_memaddr, shared_lib_filename = create_and_load_logging_function(\n",
+    "    custom_logging_code\n",
+    ")\n",
+    "\n",
+    "#\n",
+    "m1 = 15.0  # Msun\n",
+    "m2 = 14.0  # Msun\n",
+    "separation = 0  # 0 = ignored, use period\n",
+    "orbital_period = 4530.0  # days\n",
+    "eccentricity = 0.0\n",
+    "metallicity = 0.02\n",
+    "max_evolution_time = 15000\n",
+    "argstring = \"binary_c M_1 {0:g} M_2 {1:g} separation {2:g} orbital_period {3:g} eccentricity {4:g} metallicity {5:g} max_evolution_time {6:g}\".format(\n",
+    "    m1,\n",
+    "    m2,\n",
+    "    separation,\n",
+    "    orbital_period,\n",
+    "    eccentricity,\n",
+    "    metallicity,\n",
+    "    max_evolution_time,\n",
+    ")\n",
+    "output = _binary_c_bindings.run_system(\n",
+    "    argstring, custom_logging_func_memaddr=custom_logging_memaddr\n",
+    ")\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print('\\n'.join(output.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "39c76b1d-d968-4eef-b5ae-2542ed9557c3",
+   "metadata": {},
+   "source": [
+    "## Examples of logging strings\n",
+    "Below are some examples of logging strings"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "2ac4af72-6dab-4cc9-986e-5b5b1fa31b73",
+   "metadata": {},
+   "source": [
+    "### Compact object\n",
+    "This logging will print the timestep when the star becomes a compact object. After it does, we change the maximum time to be the current time, effectively terminating the evolution"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 42,
+   "id": "6f0edc65-a788-4706-a0c5-2ace030765ec",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "SINGLE_STAR_LIFETIME 10 27.7358\n",
+      "EXAMPLE_LOG_CO             2.773581245005e+01 1.33524 9.19314 1.72498e-05 730.446 13 5\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_logging_string_CO = \"\"\"\n",
+    "if(stardata->star[0].stellar_type>=NS)\n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"EXAMPLE_LOG_CO %30.12e %g %g %g %g %d %d\\\\n\",\n",
+    "            // \n",
+    "            stardata->model.time, // 1\n",
+    "\n",
+    "            stardata->star[0].mass, //2\n",
+    "            stardata->previous_stardata->star[0].mass, //3\n",
+    "\n",
+    "            stardata->star[0].radius, //4\n",
+    "            stardata->previous_stardata->star[0].radius, //5\n",
+    "\n",
+    "            stardata->star[0].stellar_type, //6\n",
+    "            stardata->previous_stardata->star[0].stellar_type //7\n",
+    "      );\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "# Entire script\n",
+    "custom_logging_code = binary_c_log_code(example_logging_string_CO)\n",
+    "\n",
+    "# Run system\n",
+    "output = run_system(M_1=10, custom_logging_code=custom_logging_code)\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print(\"\\n\".join(output.splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "51c51592-6406-43bd-a879-10ace64aaf28",
+   "metadata": {},
+   "source": [
+    "### Logging mass evolution and the supernova\n",
+    "This logging code prints the mass evolution and the moment the star goes supernova"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 47,
+   "id": "8f58fdf9-3e76-4c18-a1c5-eed0980d4133",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "EXAMPLE_MASSLOSS             9.878236827680e+00 1.61349 8.38063 20 13 1\n",
+      "EXAMPLE_SN             9.878236827680e+00 1.61349 8.38063 20 12 13 5 1 6.74037 4.92267 6.74037 0 0\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_logging_string_CO = \"\"\"\n",
+    "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %g %d %g\\\\n\",\n",
+    "    // \n",
+    "    stardata->model.time, // 1\n",
+    "    stardata->star[0].mass, //2\n",
+    "    stardata->previous_stardata->star[0].mass, //3\n",
+    "    stardata->common.zero_age.mass[0], //4\n",
+    "\n",
+    "    stardata->star[0].stellar_type, //5\n",
+    "    stardata->model.probability //6\n",
+    ");\n",
+    "if(stardata->star[0].SN_type != SN_NONE)\n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        if(stardata->pre_events_stardata != NULL)\n",
+    "        {\n",
+    "            Printf(\"EXAMPLE_SN %30.12e \" // 1\n",
+    "                \"%g %g %g %d \" // 2-5\n",
+    "                \"%d %d %g %g \" // 6-9\n",
+    "                \"%g %g %g %g\\\\n\", // 10-13\n",
+    "\n",
+    "                // \n",
+    "                stardata->model.time, // 1\n",
+    "\n",
+    "                stardata->star[0].mass, //2\n",
+    "                stardata->pre_events_stardata->star[0].mass, //3\n",
+    "                stardata->common.zero_age.mass[0], //4\n",
+    "                stardata->star[0].SN_type, //5\n",
+    "\n",
+    "                stardata->star[0].stellar_type, //6\n",
+    "                stardata->pre_events_stardata->star[0].stellar_type, //7\n",
+    "                stardata->model.probability, //8\n",
+    "                stardata->pre_events_stardata->star[0].core_mass[ID_core(stardata->pre_events_stardata->star[0].stellar_type)],           // 9\n",
+    "\n",
+    "                stardata->pre_events_stardata->star[0].core_mass[CORE_CO],     // 10\n",
+    "                stardata->pre_events_stardata->star[0].core_mass[CORE_He],    // 11\n",
+    "                stardata->star[0].fallback, // 12\n",
+    "                stardata->star[0].fallback_mass // 13\n",
+    "            );\n",
+    "        }\n",
+    "        else\n",
+    "        {\n",
+    "            Printf(\"EXAMPLE_SN %30.12e \" // 1\n",
+    "                \"%g %g %g %d \" // 2-5\n",
+    "                \"%d %d %g %g \" // 6-9\n",
+    "                \"%g %g %g %g\\\\n\", // 10-13\n",
+    "\n",
+    "                // \n",
+    "                stardata->model.time, // 1\n",
+    "\n",
+    "                stardata->star[0].mass, //2\n",
+    "                stardata->previous_stardata->star[0].mass, //3\n",
+    "                stardata->common.zero_age.mass[0], //4\n",
+    "                stardata->star[0].SN_type, //5\n",
+    "\n",
+    "                stardata->star[0].stellar_type, //6\n",
+    "                stardata->previous_stardata->star[0].stellar_type, //7\n",
+    "                stardata->model.probability, //8\n",
+    "                stardata->previous_stardata->star[0].core_mass[ID_core(stardata->previous_stardata->star[0].stellar_type)],           // 9\n",
+    "\n",
+    "                stardata->previous_stardata->star[0].core_mass[CORE_CO],     // 10\n",
+    "                stardata->previous_stardata->star[0].core_mass[CORE_He],    // 11\n",
+    "                stardata->star[0].fallback, // 12\n",
+    "                stardata->star[0].fallback_mass // 13\n",
+    "            );\n",
+    "        }\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "# Entire script\n",
+    "custom_logging_code = binary_c_log_code(example_logging_string_CO)\n",
+    "\n",
+    "# Run system\n",
+    "output = run_system(M_1=20, custom_logging_code=custom_logging_code)\n",
+    "\n",
+    "# print (abridged) output\n",
+    "print(\"\\n\".join(output.splitlines()[-2:]))"
+   ]
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/examples/notebook_extra_features.ipynb b/examples/notebook_extra_features.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..d453a6f5bef5a661a59491fde19511cee3f6c579
--- /dev/null
+++ b/examples/notebook_extra_features.ipynb
@@ -0,0 +1,44 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "d5c04b77-f0be-4b33-8c03-c72eb846527c",
+   "metadata": {},
+   "source": [
+    "# Extra features and functionality of binarycpython\n",
+    "In this notebook we'll go over some of the extra features and functionality that was not covered in the other notebooks.\n",
+    "\n",
+    "TODO"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "id": "0020f1bc-2a23-455c-8216-9e63e6e038ae",
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/examples/notebook_individual_systems.ipynb b/examples/notebook_individual_systems.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..19c2d29fbd316324eb39a361e897be2b835955e8
--- /dev/null
+++ b/examples/notebook_individual_systems.ipynb
@@ -0,0 +1,563 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "a544d28c-c2e1-4c6a-b55b-8caec440743f",
+   "metadata": {},
+   "source": [
+    "# Running individual systems with binarycpython\n",
+    "This notebook will show you how to run single systems and analyze their results.\n",
+    "\n",
+    "It can be useful to have some functions to quickly run a single system to e.g. inspect what evolutionary steps a specific system goes through, to plot the mass loss evolution of a single star, etc. "
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "dd5d9ec7-5791-45f1-afbd-225947e2a583",
+   "metadata": {},
+   "source": [
+    "## Single system with run_wrapper\n",
+    "The simplest method to run a single system is to use the run_system wrapper. This function deals with setting up the argument string, makes sure all the required parameters are included and handles setting and cleaning up the custom logging functionality (see notebook_custom_logging).\n",
+    "\n",
+    "As arguments to this function we can add any of the parameters that binary_c itself actually knows, as well as:\n",
+    "- custom_logging_code: string containing a print statement that binary_c can use to print information\n",
+    "- log_filename: path of the logfile that binary_c generates\n",
+    "- parse_function: function that handles parsing the output of binary-c"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "id": "425efed3-d8e3-432d-829e-41d8ebe05162",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from binarycpython.utils.run_system_wrapper import run_system\n",
+    "# help(run_system) # Uncomment to see the docstring"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "id": "b2abab48-433d-4936-8434-14804c52c9f6",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "SINGLE_STAR_LIFETIME 1 12462\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "output = run_system(M_1=1)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f127a5e4-dc01-4472-9130-8a943c92e8a7",
+   "metadata": {},
+   "source": [
+    "Lets try adding a log filename now:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
+   "id": "029fc3f2-f09a-49af-a32b-248505738f2e",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "      TIME      M1       M2   K1  K2           SEP   ECC  R1/ROL1 R2/ROL2  TYPE RANDOM_SEED=67365 RANDOM_COUNT=0\n",
+      "     0.0000    1.000    0.000  1  15            -1 -1.00   0.000   0.000  \"INITIAL \"\n",
+      " 11003.1302    1.000    0.000  2  15            -1 -1.00   0.000   0.000  \"OFF_MS\"\n",
+      " 11003.1302    1.000    0.000  2  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 11582.2424    1.000    0.000  3  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12325.1085    0.817    0.000  4  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12457.1300    0.783    0.000  5  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12460.8955    0.774    0.000  6  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 12460.8955    0.774    0.000  6  15            -1 -1.00   0.000   0.000  \"shrinkAGB\"\n",
+      " 12461.9514    0.523    0.000 11  15            -1 -1.00   0.000   0.000  \"TYPE_CHNGE\"\n",
+      " 15000.0000    0.523    0.000 11  15            -1 -1.00   0.000   0.000  \"MAX_TIME\"\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "output = run_system(M_1=1, log_filename='/tmp/test_logfile.txt')\n",
+    "with open('/tmp/test_logfile.txt', 'r') as f:\n",
+    "    print(f.read())"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "606670f2-3e0a-43c7-a885-006b92fac9d2",
+   "metadata": {},
+   "source": [
+    "To get more useful output we can include a custom_logging snippet (see notebook_custom_logging):"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 6,
+   "id": "e6a23b55-ca42-440d-83ac-e76a24a83a67",
+   "metadata": {
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "['EXAMPLE_MASSLOSS             0.000000000000e+00 1 1 1', 'EXAMPLE_MASSLOSS             0.000000000000e+00 1 1 1', 'EXAMPLE_MASSLOSS             1.000000000000e-06 1 1 1', 'EXAMPLE_MASSLOSS             2.000000000000e-06 1 1 1']\n"
+     ]
+    }
+   ],
+   "source": [
+    "from binarycpython.utils.custom_logging_functions import binary_c_log_code\n",
+    "\n",
+    "# Create the print statement\n",
+    "custom_logging_print_statement = \"\"\"\n",
+    "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %d\\\\n\",\n",
+    "    // \n",
+    "    stardata->model.time, // 1\n",
+    "    stardata->star[0].mass, //2\n",
+    "    stardata->common.zero_age.mass[0], //4\n",
+    "\n",
+    "    stardata->star[0].stellar_type //5\n",
+    ");\n",
+    "\"\"\"\n",
+    "\n",
+    "# Generate entire shared lib code around logging lines\n",
+    "custom_logging_code = binary_c_log_code(custom_logging_print_statement)\n",
+    "\n",
+    "output = run_system(M_1=1, custom_logging_code=custom_logging_code)\n",
+    "print(output.splitlines()[:4])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "4c885143-db79-4fed-b4c4-0bd846e24f7d",
+   "metadata": {},
+   "source": [
+    "Now we have some actual output, it is time to create a parse_function which parses the output. Adding a parse_function to the run_system will make run_system run the output of binary_c through the parse_function."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "3822721f-217a-495b-962e-d57137b9e290",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "[['time', 'mass', 'initial_mass', 'stellar_type'], [0.0, 1.0, 1.0, 1.0], [0.0, 1.0, 1.0, 1.0]]\n"
+     ]
+    }
+   ],
+   "source": [
+    "def parse_function(output):\n",
+    "    \"\"\"\n",
+    "    Example function to parse the output of binary_c\n",
+    "    \"\"\"\n",
+    "\n",
+    "    # \n",
+    "    column_names = ['time', 'mass', 'initial_mass', 'stellar_type']\n",
+    "    value_lines = [column_names]\n",
+    "    \n",
+    "    # Loop over output\n",
+    "    for line in output.splitlines():\n",
+    "        \n",
+    "        # Select the lines starting with the header we chose\n",
+    "        if line.startswith(\"EXAMPLE_MASSLOSS\"):\n",
+    "        \n",
+    "        # Split the output and fetch the data\n",
+    "            split_line = line.split()\n",
+    "            values = [float(el) for el in split_line[1:]]\n",
+    "            value_lines.append(values)\n",
+    "\n",
+    "    return value_lines\n",
+    "\n",
+    "# Catch output\n",
+    "output = run_system(M_1=1, custom_logging_code=custom_logging_code, parse_function=parse_function)\n",
+    "print(output[:3])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "a551f07f-2eff-4425-9375-267579a581b3",
+   "metadata": {},
+   "source": [
+    "This output can now be turned into e.g. an Numpy array or Pandas dataframe (my favorite: makes querying the data very easy)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 8,
+   "id": "654a07ed-2a88-46ff-9da0-b7759580f9f3",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "0        time      mass initial_mass stellar_type\n",
+      "1           0         1            1            1\n",
+      "2           0         1            1            1\n",
+      "3       1e-06         1            1            1\n",
+      "4       2e-06         1            1            1\n",
+      "5       3e-06         1            1            1\n",
+      "...       ...       ...          ...          ...\n",
+      "1612  12461.8  0.577754            1            6\n",
+      "1613    12462  0.522806            1           11\n",
+      "1614    13462  0.522806            1           11\n",
+      "1615    14462  0.522806            1           11\n",
+      "1616    15000  0.522806            1           11\n",
+      "\n",
+      "[1616 rows x 4 columns]\n"
+     ]
+    }
+   ],
+   "source": [
+    "import pandas as pd\n",
+    "\n",
+    "# Load data into dataframe\n",
+    "example_df = pd.DataFrame(output)\n",
+    "\n",
+    "# Fix column headers\n",
+    "example_df.columns = example_df.iloc[0]\n",
+    "example_df = example_df.drop(example_df.index[0])\n",
+    "\n",
+    "print(example_df)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "325c2ce6-f9a1-46b7-937f-84040e1252cf",
+   "metadata": {
+    "tags": []
+   },
+   "source": [
+    "## Single system via population object\n",
+    "When setting up your population object (see notebook_population), and configuring all the parameters, it is possible to run a single system using that same configuration. It will use the parse_function if set, and running a single system is a good method to test if everything works accordingly."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 9,
+   "id": "4a98ffca-1b72-4bb8-8df1-3bf3187d882f",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from binarycpython.utils.grid import Population\n",
+    "# help(Population) # Uncomment to see the docstring"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "7e2c2ef0-3db2-46a6-8c85-9b6cf720eb6a",
+   "metadata": {},
+   "source": [
+    "First, let's try this without any custom logging or parsing functionality"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 10,
+   "id": "bff1cc2e-6b32-4ba0-879f-879ffbabd223",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: M_1=10 to BSE_options\n",
+      "Creating and loading custom logging functionality\n",
+      "Running binary_c M_1 10\n",
+      "Cleaning up the custom logging stuff. type: single\n",
+      "SINGLE_STAR_LIFETIME 10 27.7358\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Create the population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# Set some parameters\n",
+    "example_pop.set(\n",
+    "    verbosity=1\n",
+    ")\n",
+    "example_pop.set(\n",
+    "    M_1=10\n",
+    ")\n",
+    "\n",
+    "# get output and print\n",
+    "output = example_pop.evolve_single()\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ae01fa35-f8b1-4a40-bfb2-b9e872cae0e7",
+   "metadata": {},
+   "source": [
+    "Now lets add some actual output with the custom logging"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 13,
+   "id": "dd748bab-b57e-4129-8350-9ea11fa179d0",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: C_logging_code=\n",
+      "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %g %d\\n\",\n",
+      "    // \n",
+      "    stardata->model.time, // 1\n",
+      "    stardata->star[0].mass, //2\n",
+      "    stardata->previous_stardata->star[0].mass, //3\n",
+      "    stardata->common.zero_age.mass[0], //4\n",
+      "\n",
+      "    stardata->star[0].stellar_type //5\n",
+      ");\n",
+      " to grid_options\n",
+      "Creating and loading custom logging functionality\n",
+      "Running binary_c M_1 10\n",
+      "Cleaning up the custom logging stuff. type: single\n",
+      "Removed /tmp/binary_c_python/custom_logging/libcustom_logging_eac2dfc438a14e5a9f5be98b1b6b4294.so\n",
+      "['EXAMPLE_MASSLOSS             0.000000000000e+00 10 0 10 1', 'EXAMPLE_MASSLOSS             0.000000000000e+00 10 10 10 1', 'EXAMPLE_MASSLOSS             1.000000000000e-06 10 10 10 1', 'EXAMPLE_MASSLOSS             2.000000000000e-06 10 10 10 1']\n"
+     ]
+    }
+   ],
+   "source": [
+    "custom_logging_print_statement = \"\"\"\n",
+    "Printf(\"EXAMPLE_MASSLOSS %30.12e %g %g %g %d\\\\n\",\n",
+    "    // \n",
+    "    stardata->model.time, // 1\n",
+    "    stardata->star[0].mass, //2\n",
+    "    stardata->previous_stardata->star[0].mass, //3\n",
+    "    stardata->common.zero_age.mass[0], //4\n",
+    "\n",
+    "    stardata->star[0].stellar_type //5\n",
+    ");\n",
+    "\"\"\"   \n",
+    "\n",
+    "example_pop.set(C_logging_code=custom_logging_print_statement)\n",
+    "\n",
+    "# get output and print\n",
+    "output = example_pop.evolve_single()\n",
+    "print(output.splitlines()[:4])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "588a7d9e-9d64-4b3b-8907-656b905286e8",
+   "metadata": {},
+   "source": [
+    "Lastly we can add a parse_function to handle parsing the output again. \n",
+    "\n",
+    "Because the parse_function will now be part of the population object, it can access information of the object. We need to make a new parse function that is fit for an object: we the arguments now need to be (self, output). Returning the data is useful when running evolve_single(), but won't be used in a population evolution."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 14,
+   "id": "fec39154-cce6-438c-8c2c-509d76b00f34",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "import os\n",
+    "import json\n",
+    "import numpy as np\n",
+    "\n",
+    "def object_parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parse function that can be added to the population object\n",
+    "    \"\"\"\n",
+    "\n",
+    "    # We can access object instance information now. \n",
+    "    # In this way we can store the results in a file for example. \n",
+    "    output_file = os.path.join(self.custom_options['output_dir'], 'example_output.json')\n",
+    "    \n",
+    "    # \n",
+    "    column_names = ['time', 'mass', 'initial_mass', 'stellar_type']\n",
+    "    value_lines = [column_names]\n",
+    "    \n",
+    "    # Loop over output\n",
+    "    for line in output.splitlines():\n",
+    "        \n",
+    "        # Select the lines starting with the header we chose\n",
+    "        if line.startswith(\"EXAMPLE_MASSLOSS\"):\n",
+    "        \n",
+    "        # Split the output and fetch the data\n",
+    "            split_line = line.split()\n",
+    "            values = [float(el) for el in split_line[1:]]\n",
+    "            value_lines.append(values)\n",
+    "\n",
+    "    # Turn into an array\n",
+    "    values_array = np.array(value_lines[1:])\n",
+    "    \n",
+    "    # make dict and fill\n",
+    "    output_dict = {}\n",
+    "    for i in range(len(column_names)):\n",
+    "        output_dict[column_names[i]] = list(values_array[:,i])\n",
+    "\n",
+    "    # Write to file\n",
+    "    with open(output_file, 'w') as f:\n",
+    "        f.write(json.dumps(output_dict, indent=4))\n",
+    "        \n",
+    "    # Return something anyway\n",
+    "    return value_lines"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 15,
+   "id": "57347512-fd4a-434b-b13c-5e6dbd3ac415",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: parse_function=<function object_parse_function at 0x7f9265091598> to grid_options\n",
+      "<<<< Warning: Key does not match previously known parameter:                     adding: output_dir=/tmp/ to custom_options >>>>\n",
+      "Creating and loading custom logging functionality\n",
+      "Running binary_c M_1 10\n",
+      "Cleaning up the custom logging stuff. type: single\n",
+      "Removed /tmp/binary_c_python/custom_logging/libcustom_logging_e9c2bec7f15541eb847fc6013e48e7ed.so\n",
+      "[['time', 'mass', 'initial_mass', 'stellar_type'], [0.0, 10.0, 0.0, 10.0, 1.0], [0.0, 10.0, 10.0, 10.0, 1.0], [1e-06, 10.0, 10.0, 10.0, 1.0]]\n",
+      "dict_keys(['time', 'mass', 'initial_mass', 'stellar_type'])\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_pop.set(\n",
+    "    parse_function=object_parse_function,\n",
+    "    output_dir='/tmp/'\n",
+    ")\n",
+    "output = example_pop.evolve_single()\n",
+    "print(output[:4])\n",
+    "\n",
+    "# Example of loading the data that was written\n",
+    "with open(os.path.join(example_pop.custom_options['output_dir'], 'example_output.json')) as f:\n",
+    "    written_data = json.loads(f.read())\n",
+    "\n",
+    "print(written_data.keys())"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ddc06da3-fc68-4c6f-8067-14ea862b964d",
+   "metadata": {},
+   "source": [
+    "## Single system via API functionality\n",
+    "It is possible to construct your own functionality to run a single system by directly calling the API function to run a system. Under the hood all the other functions and wrappers actually use this API.\n",
+    "\n",
+    "There are less failsafes for this method, so this make sure the input is correct and binary_c knows all the arguments you pass in.\n",
+    "\n",
+    "for more details on this API function see `notebook_api_functions`"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "56886792-d379-4eac-b0d4-54508edb39c7",
+   "metadata": {},
+   "source": [
+    "First we must construct the argument string that we pass to binary_c"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 16,
+   "id": "ec48125c-6bf5-48f4-9357-8261800b5d8b",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "SINGLE_STAR_LIFETIME 15 14.2383\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# For a binary system we need to pass in these arguments\n",
+    "M_1 = 15.0  # Msun\n",
+    "M_2 = 14.0  # Msun\n",
+    "separation = 0  # 0 = ignored, use period\n",
+    "orbital_period = 4530.0  # days\n",
+    "eccentricity = 0.0\n",
+    "metallicity = 0.02\n",
+    "max_evolution_time = 15000  # Myr. You need to include this argument.\n",
+    "\n",
+    "# Here we set up the argument string that is passed to the bindings\n",
+    "argstring = \"\"\"\n",
+    "binary_c M_1 {M_1} M_2 {M_2} separation {separation} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
+    "\"\"\".format(\n",
+    "    M_1=M_1,\n",
+    "    M_2=M_2,\n",
+    "    separation=separation,\n",
+    "    orbital_period=orbital_period,\n",
+    "    eccentricity=eccentricity,\n",
+    "    metallicity=metallicity,\n",
+    "    max_evolution_time=max_evolution_time,\n",
+    ").strip()\n",
+    "\n",
+    "from binarycpython import _binary_c_bindings\n",
+    "\n",
+    "output = _binary_c_bindings.run_system(argstring)\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "55c8ea24-0fc0-452c-8121-1e7667433479",
+   "metadata": {},
+   "source": [
+    "As we can see above, the output is rather empty. But if SINGLE_STAR_LIFETIME is printed we know we caught the output correctly. To get actual output we should have timesteps printed in the `log_every_timestep.c` in binary_c, or add some custom_logging (see notebook_custom_logging). "
+   ]
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/examples/notebook_population.ipynb b/examples/notebook_population.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..56f3b153c23064e82863f188906d50243e795715
--- /dev/null
+++ b/examples/notebook_population.ipynb
@@ -0,0 +1,1213 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "bbbaafbb-fd7d-4b73-a970-93506ba35d71",
+   "metadata": {},
+   "source": [
+    "# Running populations with binarycpython\n",
+    "This notebook will show you how to evolve a population of stars\n",
+    "\n",
+    "Much of the code in the binarycpython package is written to evolve a population of stars through the Population object, rather than running a single system. Let's go through the functionality of this object step by step and set up some example populations. \n",
+    "\n",
+    "At the bottom of this notebook there are some complete example scripts"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "id": "bf6b8673-a2b5-4b50-ad1b-e90671f57470",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "import os\n",
+    "from binarycpython.utils.custom_logging_functions import temp_dir\n",
+    "from binarycpython.utils.grid import Population\n",
+    "\n",
+    "# help(Population) # Uncomment to see the public functions of this object"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "a081ab23-7822-4971-aa82-991548534714",
+   "metadata": {},
+   "source": [
+    "- running ensemble\n",
+    "- using M&S grid"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f268eff3-4e08-4f6b-8b59-f22dba4d2074",
+   "metadata": {},
+   "source": [
+    "## Setting up the Population object\n",
+    "To set up and configure the population object we need to make an object instance of the `Population` object, and add configuration via the `.set()` function.\n",
+    "\n",
+    "There are three categories of options that the Population object can set:\n",
+    "- BSE options: these options will be used for the binary_c calls, and are recognized by comparing the arguments to a known list of available arguments of binary_c. To see which options are available, see section [`binary_c parameters` in the documentation](https://ri0005.pages.surrey.ac.uk/binary_c-python/binary_c_parameters.html). You can access these through `population.bse_options['<bse option name>']` after you have set them. \n",
+    "\n",
+    "- Grid options: these options will be used to configure the behaviour of the Population object. To see which options are available, see section [`Population grid code options` in the documentation](https://ri0005.pages.surrey.ac.uk/binary_c-python/grid_options_descriptions.html). They can be accessed via `population.grid_options['<grid option name>']` after you have set them. \n",
+    "\n",
+    "- Custom options: these options are not recognized as either of the above, so they will be stored in the custom_options, and can be accessed via `population.custom_options['<custom option name>']`"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "id": "79ab50b7-591f-4883-af09-116d1835a751",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: M_1=10 to BSE_options\n",
+      "adding: orbital_period=45000000080 to BSE_options\n",
+      "adding: max_evolution_time=15000 to BSE_options\n",
+      "adding: eccentricity=0.02 to BSE_options\n",
+      "adding: amt_cores=2 to grid_options\n",
+      "<<<< Warning: Key does not match previously known parameter:                     adding: data_dir=/tmp/binary_c_python/example_python_population_result to custom_options >>>>\n",
+      "<<<< Warning: Key does not match previously known parameter:                     adding: base_filename=example_pop.dat to custom_options >>>>\n",
+      "1\n",
+      "example_pop.dat\n",
+      "10\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Create population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# If you want verbosity, set this before other things\n",
+    "example_pop.set(verbosity=1)\n",
+    "\n",
+    "# Setting values can be done via .set(<parameter_name>=<value>)\n",
+    "# Values that are known to be binary_c_parameters are loaded into bse_options.\n",
+    "# Those that are present in the default grid_options are set in grid_options\n",
+    "# All other values that you set are put in a custom_options dict\n",
+    "example_pop.set(\n",
+    "    # binary_c physics options\n",
+    "    M_1=10,  # bse_options\n",
+    "    orbital_period=45000000080,  # bse_options\n",
+    "    max_evolution_time=15000,  # bse_options\n",
+    "    eccentricity=0.02,  # bse_options\n",
+    "\n",
+    "\n",
+    "    # grid_options\n",
+    "    amt_cores=2,  # grid_options\n",
+    "    \n",
+    "    # Custom options # TODO: need to be set in grid_options probably\n",
+    "    data_dir=os.path.join(\n",
+    "        temp_dir(), \"example_python_population_result\"\n",
+    "    ),  # custom_options\n",
+    "    base_filename=\"example_pop.dat\",  # custom_options\n",
+    ")\n",
+    "\n",
+    "# We can use the options through\n",
+    "print(example_pop.grid_options['verbosity'])\n",
+    "print(example_pop.custom_options['base_filename'])\n",
+    "print(example_pop.bse_options['M_1'])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f8d46d19-633d-4911-821d-a59daed31816",
+   "metadata": {},
+   "source": [
+    "After configuring the population, but before running the actual population, its usually a good idea to export the full configuration (including version info of binary_c and all the parameters) to a file. To do this we use `example_pop.export_all_info()`.\n",
+    "\n",
+    "On default this exports everything, each of the sections can be disabled:\n",
+    "  - population settings (bse_options, grid_options, custom_options), turn off with include_population\n",
+    "      settings=False\n",
+    "  - binary_c_defaults (all the commandline arguments that binary c accepts, and their defaults).\n",
+    "      turn off with include_binary_c_defaults=False\n",
+    "  - include_binary_c_version_info (all the compilation info, and information about the compiled\n",
+    "      parameters), turn off with include_binary_c_version_info=False\n",
+    "  - include_binary_c_help_all (all the help information for all the binary_c parameters),\n",
+    "      turn off with include_binary_c_help_all=Fase\n",
+    "      \n",
+    "On default it will write this to the custom_options['data_dir'], but that can be overriden by setting use_datadir=False and providing an outfile=<>"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
+   "id": "b9c2471a-a5b0-48b7-a50b-2f0d22100926",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Writing settings to /tmp/binary_c_python/example_python_population_result/example_pop_settings.json\n"
+     ]
+    },
+    {
+     "data": {
+      "text/plain": [
+       "'/tmp/binary_c_python/example_python_population_result/example_pop_settings.json'"
+      ]
+     },
+     "execution_count": 3,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "example_pop.export_all_info()"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "f9a65554-36ab-4a04-96ca-9f1422c307fd",
+   "metadata": {},
+   "source": [
+    "## Adding grid variables\n",
+    "The main purpose of the Population object is to handle the population synthesis side of running a set of stars. The main method to do this with binarycpython, as is the case with Perl binarygrid, is to use grid variables. These are loops over a predefined range of values, where a probability will be assigned to the systems based on the chosen probability distributions.\n",
+    "\n",
+    "Usually we use either 1 mass grid variable, or a trio of mass, mass ratio and period (See below for full examples of all of these). We can, however, also add grid sampling for e.g. eccentricity, metallicity or other parameters. \n",
+    "\n",
+    "In some cases it could be easier to set up a for loop that sets that parameter and calls the evolve function several times, e.g. when you want to vary a prescription (usually a discrete, unweighted parameter) \n",
+    "\n",
+    "\n",
+    "A notable special type of grid variable is that of the Moe & di Stefano 2017 dataset (see further down in the notebook).\n",
+    "\n",
+    "To add a grid variable to the population object we use `example_pop.add_grid_variable` (see next cell)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 4,
+   "id": "68c84521-9ae8-4020-af7a-5334173db969",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Help on method add_grid_variable in module binarycpython.utils.grid:\n",
+      "\n",
+      "add_grid_variable(name:str, longname:str, valuerange:Union[list, str], resolution:str, spacingfunc:str, probdist:str, dphasevol:Union[str, int], parameter_name:str, gridtype:str='edge', branchpoint:int=0, precode:Union[str, NoneType]=None, condition:Union[str, NoneType]=None) -> None method of binarycpython.utils.grid.Population instance\n",
+      "    Function to add grid variables to the grid_options.\n",
+      "    \n",
+      "    The execution of the grid generation will be through a nested for loop.\n",
+      "    Each of the grid variables will get create a deeper for loop.\n",
+      "    \n",
+      "    The real function that generates the numbers will get written to a new file in the TMP_DIR,\n",
+      "    and then loaded imported and evaluated.\n",
+      "    beware that if you insert some destructive piece of code, it will be executed anyway.\n",
+      "    Use at own risk.\n",
+      "    \n",
+      "    Tasks:\n",
+      "        - TODO: Fix this complex function.\n",
+      "    \n",
+      "    Args:\n",
+      "        name:\n",
+      "            name of parameter. This is evaluated as a parameter and you can use it throughout\n",
+      "            the rest of the function\n",
+      "            \n",
+      "            Examples:\n",
+      "                name = 'lnm1'\n",
+      "        longname:\n",
+      "            Long name of parameter\n",
+      "            \n",
+      "            Examples:\n",
+      "                longname = 'Primary mass'\n",
+      "        range:\n",
+      "            Range of values to take. Does not get used really, the spacingfunction is used to\n",
+      "            get the values from\n",
+      "            \n",
+      "            Examples:\n",
+      "                range = [math.log(m_min), math.log(m_max)]\n",
+      "        resolution:\n",
+      "            Resolution of the sampled range (amount of samples).\n",
+      "            TODO: check if this is used anywhere\n",
+      "    \n",
+      "            Examples: \n",
+      "                resolution = resolution[\"M_1\"]\n",
+      "        spacingfunction:\n",
+      "            Function determining how the range is sampled. You can either use a real function,\n",
+      "            or a string representation of a function call. Will get written to a file and\n",
+      "            then evaluated.\n",
+      "    \n",
+      "            Examples:\n",
+      "                spacingfunction = \"const(math.log(m_min), math.log(m_max), {})\".format(resolution['M_1'])\n",
+      "    \n",
+      "        precode:\n",
+      "            Extra room for some code. This code will be evaluated within the loop of the\n",
+      "            sampling function (i.e. a value for lnm1 is chosen already)\n",
+      "            \n",
+      "            Examples:\n",
+      "                precode = 'M_1=math.exp(lnm1);'\n",
+      "        probdist:\n",
+      "            Function determining the probability that gets assigned to the sampled parameter\n",
+      "            \n",
+      "            Examples:\n",
+      "                probdist = 'Kroupa2001(M_1)*M_1'\n",
+      "        dphasevol:\n",
+      "            part of the parameter space that the total probability is calculated with. Put to -1\n",
+      "            if you want to ignore any dphasevol calculations and set the value to 1\n",
+      "            Examples:\n",
+      "                dphasevol = 'dlnm1'\n",
+      "        condition:\n",
+      "            condition that has to be met in order for the grid generation to continue\n",
+      "            Examples:\n",
+      "                condition = 'self.grid_options['binary']==1'\n",
+      "        gridtype:\n",
+      "            Method on how the value range is sampled. Can be either 'edge' (steps starting at\n",
+      "            the lower edge of the value range) or 'center'\n",
+      "            (steps starting at lower edge + 0.5 * stepsize).\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "help(example_pop.add_grid_variable)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "bd75cebe-2152-4025-b680-dc020b80889b",
+   "metadata": {},
+   "source": [
+    "All the distribution functions that we can use are stored in the `binarycpython.utils.distribution_functions` or `binarycpython/utils/distribution_functions.py` on git. If you uncomment the help statement below you can see which functions are available now:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 5,
+   "id": "048db541-3e92-4c5d-a25c-9c5a34b9c857",
+   "metadata": {
+    "scrolled": true,
+    "tags": []
+   },
+   "outputs": [],
+   "source": [
+    "# import binarycpython.utils.distribution_functions\n",
+    "# help(binarycpython.utils.distribution_functions)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "1b3a007b-5c17-42a7-a981-7e268e6f545c",
+   "metadata": {},
+   "source": [
+    "The next cell contains an example of adding the mass grid variable, but sampling in log mass. The commented grid variables are examples of the mass ratio sampling and the period sampling."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 6,
+   "id": "47979841-2c26-4b26-8945-603d013dc93a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Added grid variable: {\n",
+      "    \"name\": \"lnm1\",\n",
+      "    \"longname\": \"Primary mass\",\n",
+      "    \"valuerange\": [\n",
+      "        2,\n",
+      "        150\n",
+      "    ],\n",
+      "    \"resolution\": \"20\",\n",
+      "    \"spacingfunc\": \"const(math.log(2), math.log(150), 20)\",\n",
+      "    \"precode\": \"M_1=math.exp(lnm1)\",\n",
+      "    \"probdist\": \"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+      "    \"dphasevol\": \"dlnm1\",\n",
+      "    \"parameter_name\": \"M_1\",\n",
+      "    \"condition\": \"\",\n",
+      "    \"gridtype\": \"edge\",\n",
+      "    \"branchpoint\": 0,\n",
+      "    \"grid_variable_number\": 0\n",
+      "}\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Add grid variables\n",
+    "resolution = {\"M_1\": 20, \"q\": 20, \"per\": 40}\n",
+    "\n",
+    "# Mass\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"lnm1\",\n",
+    "    longname=\"Primary mass\",\n",
+    "    valuerange=[2, 150],\n",
+    "    resolution=\"{}\".format(resolution[\"M_1\"]),\n",
+    "    spacingfunc=\"const(math.log(2), math.log(150), {})\".format(resolution[\"M_1\"]),\n",
+    "    precode=\"M_1=math.exp(lnm1)\",\n",
+    "    probdist=\"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+    "    dphasevol=\"dlnm1\",\n",
+    "    parameter_name=\"M_1\",\n",
+    "    condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    ")\n",
+    "\n",
+    "# # Mass ratio\n",
+    "# test_pop.add_grid_variable(\n",
+    "#     name=\"q\",\n",
+    "#     longname=\"Mass ratio\",\n",
+    "#     valuerange=[\"0.1/M_1\", 1],\n",
+    "#     resolution=\"{}\".format(resolution['q']),\n",
+    "#     spacingfunc=\"const(0.1/M_1, 1, {})\".format(resolution['q']),\n",
+    "#     probdist=\"flatsections(q, [{'min': 0.1/M_1, 'max': 1.0, 'height': 1}])\",\n",
+    "#     dphasevol=\"dq\",\n",
+    "#     precode=\"M_2 = q * M_1\",\n",
+    "#     parameter_name=\"M_2\",\n",
+    "#     condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    "# )\n",
+    "\n",
+    "# #\n",
+    "# test_pop.add_grid_variable(\n",
+    "#    name=\"log10per\", # in days\n",
+    "#    longname=\"log10(Orbital_Period)\",\n",
+    "#    valuerange=[0.15, 5.5],\n",
+    "#    resolution=\"{}\".format(resolution[\"per\"]),\n",
+    "#    spacingfunc=\"const(0.15, 5.5, {})\".format(resolution[\"per\"]),\n",
+    "#    precode=\"\"\"orbital_period = 10** log10per\n",
+    "# sep = calc_sep_from_period(M_1, M_2, orbital_period)\n",
+    "# sep_min = calc_sep_from_period(M_1, M_2, 10**0.15)\n",
+    "# sep_max = calc_sep_from_period(M_1, M_2, 10**5.5)\"\"\",\n",
+    "#    probdist=\"sana12(M_1, M_2, sep, orbital_period, sep_min, sep_max, math.log10(10**0.15), math.log10(10**5.5), -0.55)\",\n",
+    "#    parameter_name=\"orbital_period\",\n",
+    "#    dphasevol=\"dlog10per\",\n",
+    "# )\n"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "163f13ae-fec1-4ee8-b9d4-c1b75c19ff39",
+   "metadata": {},
+   "source": [
+    "## Setting logging and handling the output\n",
+    "On default, binary_c will not output anything (except for 'SINGLE STAR LIFETIME'). It is up to us to determine what will be printed. We can either do that by hardcoding the print statements into `binary_c` (see documentation binary_c). Or, we can use the custom logging functionality of binarycpython (see notebook `notebook_custom_logging.ipynb`), which is faster to set up and requires no recompilation of binary_c, but is somewhat more limited in its functionality. \n",
+    "\n",
+    "After configuring what will be printed, we need to make a function to parse the output. This can be done by setting the parse_function parameter in the population object (see also notebook `notebook_individual_systems.ipynb`). \n",
+    "\n",
+    "In the code below we will set up both the custom logging, and a parse function to handle that output"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "id": "0c986215-93b1-4e30-ad79-f7c397e9ff7d",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: C_logging_code=\n",
+      "if(stardata->star[0].stellar_type >= 13)    \n",
+      "{\n",
+      "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+      "    {\n",
+      "        Printf(\"EXAMPLE_COMPACT_OBJECT %30.12e %g %g %g %d\\n\",\n",
+      "            // \n",
+      "            stardata->model.time, // 1\n",
+      "            stardata->star[0].mass, // 2\n",
+      "            stardata->common.zero_age.mass[0], // 3\n",
+      "            stardata->model.probability, // 4\n",
+      "            stardata->star[0].stellar_type // 5\n",
+      "      );\n",
+      "    };\n",
+      "    /* Kill the simulation to save time */\n",
+      "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+      "};\n",
+      " to grid_options\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Create custom logging statement: in this case we will log when the star turns into a compact object, and then terminate the evolution.\n",
+    "custom_logging_statement = \"\"\"\n",
+    "if(stardata->star[0].stellar_type >= 13)    \n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"EXAMPLE_COMPACT_OBJECT %30.12e %g %g %g %d\\\\n\",\n",
+    "            // \n",
+    "            stardata->model.time, // 1\n",
+    "            stardata->star[0].mass, // 2\n",
+    "            stardata->common.zero_age.mass[0], // 3\n",
+    "            stardata->model.probability, // 4\n",
+    "            stardata->star[0].stellar_type // 5\n",
+    "      );\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    "\n",
+    "example_pop.set(\n",
+    "    C_logging_code=custom_logging_statement\n",
+    ")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "ae1f1f0c-1f8b-42d8-b051-cbf8c6b51514",
+   "metadata": {},
+   "source": [
+    "The parse function must now catch lines that start with \"EXAMPLE_COMPACT_OBJECT\", and write that line to a file"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 8,
+   "id": "fd197154-a8ce-4865-8929-008d3483101a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: parse_function=<function parse_function at 0x7ff3bdf79620> to grid_options\n"
+     ]
+    }
+   ],
+   "source": [
+    "def parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parse function\n",
+    "    \"\"\"\n",
+    "    \n",
+    "    # get info from the population instance\n",
+    "    data_dir = self.custom_options[\"data_dir\"]\n",
+    "    base_filename = self.custom_options[\"base_filename\"]\n",
+    "\n",
+    "    # Check directory, make if necessary\n",
+    "    os.makedirs(data_dir, exist_ok=True)\n",
+    "\n",
+    "    seperator = \" \"\n",
+    "\n",
+    "    # Create filename\n",
+    "    outfilename = os.path.join(data_dir, base_filename)\n",
+    "\n",
+    "    parameters = [\"time\", \"mass\", \"zams_mass\", \"probability\", \"stellar_type\"]\n",
+    "\n",
+    "    # Go over the output.\n",
+    "    for line in output.splitlines():\n",
+    "        headerline = line.split()[0]\n",
+    "\n",
+    "        # CHeck the header and act accordingly\n",
+    "        if headerline == \"EXAMPLE_COMPACT_OBJECT\":\n",
+    "            values = line.split()[1:]\n",
+    "            print(line)\n",
+    "            \n",
+    "            if not len(parameters) == len(values):\n",
+    "                print(\"Amount of column names isnt equal to amount of columns\")\n",
+    "                raise ValueError\n",
+    "\n",
+    "            if not os.path.exists(outfilename):\n",
+    "                with open(outfilename, \"w\") as f:\n",
+    "                    f.write(seperator.join(parameters) + \"\\n\")\n",
+    "\n",
+    "            with open(outfilename, \"a\") as f:\n",
+    "                f.write(seperator.join(values) + \"\\n\")\n",
+    "\n",
+    "# Add the parsing function\n",
+    "example_pop.set(\n",
+    "    parse_function=parse_function,\n",
+    ")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "91509ce5-ffe7-4937-aa87-6d7baac9ac04",
+   "metadata": {},
+   "source": [
+    "## Evolving the grid\n",
+    "Now that we configured all the main parts of the population object, we can actually run the population! Doing this is straightforward: `example_pop.evolve()`\n",
+    "\n",
+    "This will start up the processing of all the systems. We can control how many cores are used by settings `amt_cores`. By setting the `verbosity` of the population object to a higher value we can get a lot of verbose information about the run, but for now we will set it to 0.\n",
+    "\n",
+    "There are many grid_options that can lead to different behaviour of the evolution of the grid. Please do have a look at those: [grid options docs](https://ri0005.pages.surrey.ac.uk/binary_c-python/grid_options_descriptions.html), and try  "
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 9,
+   "id": "8ea376c1-1e92-45af-8cab-9d7fdca564eb",
+   "metadata": {
+    "tags": []
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "adding: verbosity=0 to grid_options\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Grid has handled 20 stars\n",
+      "with a total probability of 0.05150046619238192\n",
+      "Total starcount for this run will be: 20\n",
+      "EXAMPLE_COMPACT_OBJECT             2.867655467480e+01 1.33079 9.81391 0.00167028 13\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "EXAMPLE_COMPACT_OBJECT             1.931266944719e+01 1.3933 12.3177 0.00124307 13\n",
+      "EXAMPLE_COMPACT_OBJECT             4.439623364590e+01 1.38004 7.81906 0.00224431 13\n",
+      "EXAMPLE_COMPACT_OBJECT             1.364277535630e+01 1.47961 15.4603 0.000925128 13\n",
+      "EXAMPLE_COMPACT_OBJECT             1.017435498578e+01 1.59052 19.4046 0.000688507 13\n",
+      "EXAMPLE_COMPACT_OBJECT             8.294870923827e+00 1.7197 24.3552 0.000512406 13\n",
+      "EXAMPLE_COMPACT_OBJECT             6.802132608769e+00 1.84162 30.5689 0.000381347 13\n",
+      "EXAMPLE_COMPACT_OBJECT             5.723570798020e+00 1.99471 38.3678 0.00028381 13\n",
+      "EXAMPLE_COMPACT_OBJECT             4.933751523833e+00 2.15875 48.1564 0.000211219 13\n",
+      "EXAMPLE_COMPACT_OBJECT             4.337250536639e+00 2.35209 60.4424 0.000157195 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.862081089332e+00 2.56776 75.8628 0.000116989 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.449960890183e+00 2.80457 95.2174 8.70668e-05 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.172196856333e+00 3.05193 119.51 6.47976e-05 14\n",
+      "EXAMPLE_COMPACT_OBJECT             3.069627290216e+00 3.27563 150 4.82242e-05 14\n",
+      "Population-2a7732d03e594ef4b5dfe9051b41d9c0 finished! The total probability was: 0.05150046619238191. It took a total of 0.7797017097473145s to run 20 systems on 2 cores\n",
+      "There were no errors found in this run.\n"
+     ]
+    }
+   ],
+   "source": [
+    "# change verbosity\n",
+    "example_pop.set(verbosity=0)\n",
+    "\n",
+    "## Executing a population\n",
+    "## This uses the values generated by the grid_variables\n",
+    "analytics = example_pop.evolve()  # TODO: update this function call"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "91ab45c7-7d31-4543-aee4-127ab58e891f",
+   "metadata": {},
+   "source": [
+    "After the run is complete, some technical report on the run is returned. I stored that in `analytics`. As we can see below, this dictionary is like a status report of the evolution. Useful for e.g. debugging."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 10,
+   "id": "e1f0464b-0424-4022-b34b-5b744bc2c59d",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "{'population_name': '2a7732d03e594ef4b5dfe9051b41d9c0', 'evolution_type': 'grid', 'failed_count': 0, 'failed_prob': 0, 'failed_systems_error_codes': [], 'errors_exceeded': False, 'errors_found': False, 'total_probability': 0.05150046619238191, 'total_count': 20, 'start_timestamp': 1628444120.234709, 'end_timestamp': 1628444121.0144107, 'total_mass_run': 730.1048014407228, 'total_probability_weighted_mass_run': 0.2983275843337705, 'zero_prob_stars_skipped': 0}\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(analytics)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "6460df56-9fba-4817-9a1e-593ef15d98c1",
+   "metadata": {},
+   "source": [
+    "## Noteworthy functionality\n",
+    "Some extra features that are available from via the population object are:\n",
+    "- write_binary_c_calls_to_file: Function to write the calls that would be passed to binary_c to a file"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 11,
+   "id": "83f8e519-4f7c-474a-ad95-f175a34fae81",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Help on method write_binary_c_calls_to_file in module binarycpython.utils.grid:\n",
+      "\n",
+      "write_binary_c_calls_to_file(output_dir:Union[str, NoneType]=None, output_filename:Union[str, NoneType]=None, include_defaults:bool=False) -> None method of binarycpython.utils.grid.Population instance\n",
+      "    Function that loops over the grid code and writes the generated parameters to a file.\n",
+      "    In the form of a command line call\n",
+      "    \n",
+      "    Only useful when you have a variable grid as system_generator. MC wouldn't be that useful\n",
+      "    \n",
+      "    Also, make sure that in this export there are the basic parameters\n",
+      "    like m1,m2,sep, orb-per, ecc, probability etc.\n",
+      "    \n",
+      "    On default this will write to the datadir, if it exists\n",
+      "    \n",
+      "    Tasks:\n",
+      "        - TODO: test this function\n",
+      "        - TODO: make sure the binary_c_python .. output file has a unique name\n",
+      "    \n",
+      "    Args:\n",
+      "        output_dir: (optional, default = None) directory where to write the file to. If custom_options['data_dir'] is present, then that one will be used first, and then the output_dir\n",
+      "        output_filename: (optional, default = None) filename of the output. If not set it will be called \"binary_c_calls.txt\"\n",
+      "        include_defaults: (optional, default = None) whether to include the defaults of binary_c in the lines that are written. Beware that this will result in very long lines, and it might be better to just export the binary_c defaults and keep them in a separate file.\n",
+      "    \n",
+      "    Returns:\n",
+      "        filename: filename that was used to write the calls to\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "help(example_pop.write_binary_c_calls_to_file)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 12,
+   "id": "dacfed75-dfe3-4afd-a0ff-a4be17746021",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Generating grid code\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Saving grid code to grid_options\n",
+      "Writing grid code to /tmp/binary_c_python/binary_c_grid_2a7732d03e594ef4b5dfe9051b41d9c0.py\n",
+      "Loading grid code function from /tmp/binary_c_python/binary_c_grid_2a7732d03e594ef4b5dfe9051b41d9c0.py\n",
+      "Grid code loaded\n",
+      "Writing binary_c calls to /tmp/binary_c_python/example_python_population_result/binary_c_calls.txt\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "_calculate_multiplicity_fraction: Chosen not to use any multiplicity fraction.\n",
+      "Grid has handled 20 stars\n",
+      "with a total probability of 0.05150046619238192\n",
+      "/tmp/binary_c_python/example_python_population_result/binary_c_calls.txt\n",
+      "binary_c M_1 2.0 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.013208238029791246\n",
+      "binary_c M_1 2.5102526289471614 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.009829948023831718\n",
+      "binary_c M_1 3.1506841305680684 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.0073157281034221516\n",
+      "binary_c M_1 3.9545065608702976 eccentricity 0.02 max_evolution_time 15000 orbital_period 45000000080 phasevol 0.22723621650191106 probability 0.005444573822104362\n"
+     ]
+    }
+   ],
+   "source": [
+    "example_pop.set(verbosity=10)\n",
+    "calls_filename = example_pop.write_binary_c_calls_to_file()\n",
+    "print(calls_filename)\n",
+    "\n",
+    "with open(calls_filename, 'r') as f:\n",
+    "    print('\\n'.join(f.read().splitlines()[:4]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "60359eb1-4d0c-4d2d-8265-ec5171b944a2",
+   "metadata": {},
+   "source": [
+    "## Full examples of population scripts\n",
+    "Below is a full setup for a population of single stars"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 13,
+   "id": "7212b6be-9787-4122-a7f1-86538cf38179",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Grid has handled 20 stars\n",
+      "with a total probability of 0.05150046619238192\n",
+      "Total starcount for this run will be: 20\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Population-3680f3882c0a449c944462abffea2447 finished! The total probability was: 0.05150046619238191. It took a total of 0.6246354579925537s to run 20 systems on 2 cores\n",
+      "There were no errors found in this run.\n",
+      "\n",
+      "\n",
+      "time mass zams_mass probability radius stellar_type\n",
+      "2.867655467480e+01 1.33079 9.81391 0.00167028 1.72498e-05 13\n",
+      "1.931266944719e+01 1.3933 12.3177 0.00124307 1.72498e-05 13\n",
+      "4.439623364590e+01 1.38004 7.81906 0.00224431 1.72498e-05 13\n",
+      "1.364277535630e+01 1.47961 15.4603 0.000925128 1.72498e-05 13\n",
+      "1.017435498578e+01 1.59052 19.4046 0.000688507 1.72498e-05 13\n",
+      "8.294870923827e+00 1.7197 24.3552 0.000512406 1.72498e-05 13\n",
+      "6.802132608769e+00 1.84162 30.5689 0.000381347 1.72498e-05 13\n",
+      "5.723570798020e+00 1.99471 38.3678 0.00028381 1.72498e-05 13\n",
+      "4.933751523833e+00 2.15875 48.1564 0.000211219 1.72498e-05 13\n",
+      "4.337250536639e+00 2.35209 60.4424 0.000157195 9.97286e-06 14\n",
+      "3.862081089332e+00 2.56776 75.8628 0.000116989 1.08873e-05 14\n",
+      "3.449960890183e+00 2.80457 95.2174 8.70668e-05 1.18914e-05 14\n",
+      "3.172196856333e+00 3.05193 119.51 6.47976e-05 1.29402e-05 14\n",
+      "3.069627290216e+00 3.27563 150 4.82242e-05 1.38887e-05 14\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "import os\n",
+    "\n",
+    "from binarycpython.utils.grid import Population\n",
+    "from binarycpython.utils.custom_logging_functions import temp_dir\n",
+    "\n",
+    "def parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parsing function\n",
+    "    \"\"\"\n",
+    "    \n",
+    "    # extract info from the population instance\n",
+    "\n",
+    "    # Get some information from the\n",
+    "    data_dir = self.custom_options[\"data_dir\"]\n",
+    "    base_filename = self.custom_options[\"base_filename\"]\n",
+    "\n",
+    "    # Check directory, make if necessary\n",
+    "    os.makedirs(data_dir, exist_ok=True)\n",
+    "\n",
+    "    #\n",
+    "    seperator = \" \"\n",
+    "\n",
+    "    # Create filename\n",
+    "    outfilename = os.path.join(data_dir, base_filename)\n",
+    "\n",
+    "    # The header columns matching this \n",
+    "    parameters = [\"time\", \"mass\", \"zams_mass\", \"probability\", \"radius\", \"stellar_type\"]\n",
+    "\n",
+    "    # Go over the output.\n",
+    "    for el in output.splitlines():\n",
+    "        headerline = el.split()[0]\n",
+    "\n",
+    "        # CHeck the header and act accordingly\n",
+    "        if headerline == \"MY_STELLAR_DATA\":\n",
+    "            values = el.split()[1:]\n",
+    "\n",
+    "            if not len(parameters) == len(values):\n",
+    "                print(\"Amount of column names isnt equal to amount of columns\")\n",
+    "                raise ValueError\n",
+    "\n",
+    "            if not os.path.exists(outfilename):\n",
+    "                with open(outfilename, \"w\") as f:\n",
+    "                    f.write(seperator.join(parameters) + \"\\n\")\n",
+    "\n",
+    "            with open(outfilename, \"a\") as f:\n",
+    "                f.write(seperator.join(values) + \"\\n\")\n",
+    "\n",
+    "\n",
+    "# Create population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# If you want verbosity, set this before other things\n",
+    "example_pop.set(verbosity=0)\n",
+    "\n",
+    "# Setting values can be done via .set(<parameter_name>=<value>)\n",
+    "example_pop.set(\n",
+    "    # binary_c physics options\n",
+    "    M_1=10,  # bse_options\n",
+    "    separation=0,  # bse_options\n",
+    "    orbital_period=45000000080,  # bse_options\n",
+    "    max_evolution_time=15000,  # bse_options\n",
+    "    eccentricity=0.02,  # bse_options\n",
+    "    \n",
+    "    # grid_options\n",
+    "    amt_cores=2,  # grid_options\n",
+    "\n",
+    "    # Custom options: the data directory and the output filename\n",
+    "    data_dir=os.path.join(\n",
+    "        temp_dir(), \"example_python_population_result\"\n",
+    "    ),  # custom_options\n",
+    "    base_filename=\"example_pop.dat\",  # custom_options\n",
+    ")\n",
+    "\n",
+    "# Creating a parsing function\n",
+    "example_pop.set(\n",
+    "    parse_function=parse_function,  # Setting the parse function thats used in the evolve_population\n",
+    ")\n",
+    "\n",
+    "### Custom logging\n",
+    "# Log the moment when the star turns into neutron\n",
+    "example_pop.set(\n",
+    "    C_logging_code=\"\"\"\n",
+    "if(stardata->star[0].stellar_type >= 13)    \n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"MY_STELLAR_DATA %30.12e %g %g %g %g %d\\\\n\",\n",
+    "            // \n",
+    "            stardata->model.time, // 1\n",
+    "            stardata->star[0].mass, // 2\n",
+    "            stardata->common.zero_age.mass[0], // 4\n",
+    "            stardata->model.probability, // 5\n",
+    "            stardata->star[0].radius, // 6\n",
+    "            stardata->star[0].stellar_type // 7\n",
+    "      );\n",
+    "    };\n",
+    "    /* Kill the simulation to save time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "};\n",
+    "\"\"\"\n",
+    ")\n",
+    "\n",
+    "# Add grid variables\n",
+    "resolution = {\"M_1\": 20}\n",
+    "\n",
+    "# Mass\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"lnm1\",\n",
+    "    longname=\"Primary mass\",\n",
+    "    valuerange=[2, 150],\n",
+    "    resolution=\"{}\".format(resolution[\"M_1\"]),\n",
+    "    spacingfunc=\"const(math.log(2), math.log(150), {})\".format(resolution[\"M_1\"]),\n",
+    "    precode=\"M_1=math.exp(lnm1)\",\n",
+    "    probdist=\"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+    "    dphasevol=\"dlnm1\",\n",
+    "    parameter_name=\"M_1\",\n",
+    "    condition=\"\",\n",
+    ")\n",
+    "\n",
+    "# Exporting of all the settings can be done with .export_all_info()\n",
+    "example_pop.export_all_info()\n",
+    "\n",
+    "# remove the result file if it exists\n",
+    "if os.path.isfile(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\")):\n",
+    "    os.remove(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"))\n",
+    "\n",
+    "\n",
+    "# Evolve the population\n",
+    "example_pop.evolve()\n",
+    "\n",
+    "# \n",
+    "with open(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"), 'r') as f:\n",
+    "    output = f.read()\n",
+    "print(\"\\n\")\n",
+    "print(output)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "c2ab0979-6575-481d-9c1c-ca98517b2437",
+   "metadata": {},
+   "source": [
+    "We can also set up a population that samples biinary systems, by adding extra grid variables. Below is an example of a full script that runs a binary population and registers when a double compact object is formed. The logging is rather compact and should be expanded top be more useful"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 14,
+   "id": "79acdbb2-7dd6-45c4-9609-80994f03619a",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Constructing/adding: q\n",
+      "Constructing/adding: log10per\n",
+      "Grid has handled 125 stars\n",
+      "with a total probability of 0.0862478164626921\n",
+      "Total starcount for this run will be: 125\n",
+      "Generating grid code\n",
+      "Constructing/adding: lnm1\n",
+      "Constructing/adding: q\n",
+      "Constructing/adding: log10per\n",
+      "Population-d20a4c74d20a43b881c0c9e5def5f76c finished! The total probability was: 0.08624781646269201. It took a total of 8.561265707015991s to run 125 systems on 2 cores\n",
+      "There were no errors found in this run.\n",
+      "\n",
+      "\n",
+      "time mass_1 zams_mass_1 mass_2 zams_mass_2 stellar_type_1 prev_stellar_type_1 stellar_type_2 prev_stellar_type_2 metallicity probability\n",
+      "8.863377990313e+01 1.29444 5.88566 0 2.99283 13 5 15 15 0.02 0.000627913\n",
+      "1.146421815741e+02 0 5.88566 1.33062 4.43925 15 15 13 5 0.02 0.000627913\n",
+      "7.222715508467e+01 1.34922 5.88566 0 5.88566 13 5 15 15 0.02 0.000627913\n",
+      "1.350021848285e+01 1.48488 17.3205 0 0.1 13 5 15 15 0.02 0.000154349\n",
+      "1.171108213270e+01 1.53113 17.3205 0 0.1 13 5 15 15 0.02 0.000154349\n",
+      "1.171086983243e+01 1.53177 17.3205 0 0.1 13 9 15 15 0.02 0.000154349\n",
+      "1.170770599495e+01 1.53176 17.3205 0 4.40513 13 5 15 15 0.02 0.000172877\n",
+      "1.230407246199e+01 1.59499 17.3205 0 4.40513 13 5 15 15 0.02 0.000610573\n",
+      "1.108751340926e+01 1.70319 17.3205 0 8.71025 13 4 15 15 0.02 0.000610573\n",
+      "1.941017702765e+01 1.34903 17.3205 1.65097 8.71025 13 13 13 5 0.02 0.000172877\n",
+      "1.980988739731e+01 1.36979 17.3205 1.60808 8.71025 13 13 13 5 0.02 0.000121486\n",
+      "3.571858031651e+01 1.53174 17.3205 1.30504 8.71025 13 13 13 5 0.02 8.42148e-05\n",
+      "3.459153942631e+01 1.53176 17.3205 1.31004 8.71025 13 13 13 5 0.02 9.8162e-05\n",
+      "1.687368550125e+01 1.34937 17.3205 1.73856 13.0154 13 13 13 8 0.02 0.000172877\n",
+      "1.194842917007e+01 1.78096 17.3205 0 13.0154 13 8 15 15 0.02 0.000610573\n",
+      "1.733614170983e+01 1.53184 17.3205 1.42375 13.0154 13 13 13 5 0.02 9.8162e-05\n",
+      "1.723547465714e+01 1.38403 17.3205 1.71288 13.0154 13 13 13 8 0.02 0.000121486\n",
+      "1.764340254985e+01 1.53174 17.3205 1.41264 13.0154 13 13 13 5 0.02 8.42148e-05\n",
+      "1.170425790780e+01 1.52963 17.3205 0 17.3205 13 5 15 15 0.02 0.000172877\n",
+      "8.922967341481e+00 1.85486 17.3205 0 17.3205 13 8 15 15 0.02 0.000610573\n",
+      "1.232906623449e+01 1.41074 17.3205 1.34281 17.3205 13 13 13 8 0.02 0.000121486\n",
+      "1.170775828562e+01 1.53183 17.3205 1.53183 17.3205 13 5 13 5 0.02 9.8162e-05\n",
+      "1.170770422321e+01 1.53175 17.3205 1.53175 17.3205 13 5 13 5 0.02 8.42148e-05\n",
+      "5.075844624794e+00 2.12303 50.9713 0 0.1 13 8 15 15 0.02 3.79411e-05\n",
+      "4.766606588165e+00 2.20484 50.9713 0 0.1 14 8 15 15 0.02 3.79411e-05\n",
+      "4.768305081494e+00 2.18838 50.9713 0 0.1 13 8 15 15 0.02 3.79411e-05\n",
+      "4.458869865939e+00 2.29864 50.9713 0 12.8178 14 8 15 15 0.02 0.000150087\n",
+      "1.806014211040e+01 2.10446 50.9713 1.40749 12.8178 13 13 13 5 0.02 2.9863e-05\n",
+      "4.797342083485e+00 2.10328 50.9713 0 12.8178 13 13 15 1 0.02 4.24954e-05\n",
+      "1.721374713429e+01 2.21673 50.9713 1.42212 12.8178 14 14 13 5 0.02 2.41295e-05\n",
+      "4.055645404546e+00 2.47276 50.9713 0 25.5357 14 7 15 15 0.02 0.000150087\n",
+      "1.806123543037e+01 2.21893 50.9713 1.40745 12.8178 14 14 13 5 0.02 2.07011e-05\n",
+      "8.117519147635e+00 2.10433 50.9713 2.21473 25.5357 13 13 14 8 0.02 4.24954e-05\n",
+      "8.315554923168e+00 2.15343 50.9713 2.08519 25.5357 13 13 13 8 0.02 2.9863e-05\n",
+      "7.917420996633e+00 2.21892 50.9713 1.7431 25.5357 14 14 13 8 0.02 2.07011e-05\n",
+      "7.693213405973e+00 2.21805 50.9713 1.78384 25.5357 14 14 13 8 0.02 2.41295e-05\n",
+      "3.753837732894e+00 2.62517 50.9713 0 38.2535 14 7 15 15 0.02 0.000150087\n",
+      "7.087296558990e+00 2.10417 50.9713 2.40935 38.2535 13 13 14 8 0.02 4.24954e-05\n",
+      "7.007109286263e+00 2.15854 50.9713 2.28672 38.2535 13 13 14 8 0.02 2.9863e-05\n",
+      "5.653200958306e+00 2.21878 50.9713 2.0587 38.2535 14 14 13 8 0.02 2.41295e-05\n",
+      "5.733794947644e+00 2.21892 50.9713 1.99255 38.2535 14 14 13 8 0.02 2.07011e-05\n",
+      "3.513216011269e+00 2.76647 50.9713 0 50.9713 14 7 15 15 0.02 0.000150087\n",
+      "4.750574783854e+00 2.27442 50.9713 0 50.9713 14 8 15 15 0.02 4.24954e-05\n",
+      "7.278384712062e+00 1.29678 50.9713 2.09216 50.9713 13 8 13 13 0.02 2.9863e-05\n",
+      "4.765996194699e+00 2.20787 50.9713 2.20787 50.9713 14 8 14 8 0.02 2.07011e-05\n",
+      "4.765535914728e+00 2.21331 50.9713 2.21331 50.9713 14 8 14 8 0.02 2.41295e-05\n",
+      "3.104706358826e+00 3.17639 150 0 0.1 14 7 15 15 0.02 9.32641e-06\n",
+      "3.069363482023e+00 3.27572 150 0 0.1 14 7 15 15 0.02 9.32641e-06\n",
+      "3.047074050271e+00 3.3836 150 0 37.575 14 7 15 15 0.02 3.68933e-05\n",
+      "5.974759306305e+00 3.23604 150 2.53922 37.575 14 14 14 7 0.02 1.04459e-05\n",
+      "6.074084349384e+00 3.30145 150 2.13876 37.575 14 14 13 8 0.02 7.34071e-06\n",
+      "5.733865371895e+00 3.29994 150 2.00498 37.575 14 14 13 8 0.02 5.93135e-06\n",
+      "3.027099358410e+00 3.53631 150 0 75.05 14 7 15 15 0.02 3.68933e-05\n",
+      "5.807147339697e+00 3.30197 150 1.9791 37.575 14 14 13 8 0.02 5.08861e-06\n",
+      "4.862942347290e+00 3.25294 150 2.97823 75.05 14 14 14 7 0.02 1.04459e-05\n",
+      "4.556479830908e+00 3.29942 150 2.73221 75.05 14 14 14 7 0.02 7.34071e-06\n",
+      "3.853070305680e+00 3.29977 150 2.62486 75.05 14 14 14 7 0.02 5.93135e-06\n",
+      "3.881529045940e+00 3.30149 150 2.55924 75.05 14 14 14 7 0.02 5.08861e-06\n",
+      "3.015033359333e+00 3.64419 150 0 112.525 14 7 15 15 0.02 3.68933e-05\n",
+      "4.126828648362e+00 3.32047 150 0 112.525 14 14 15 3 0.02 1.04459e-05\n",
+      "3.990017992944e+00 3.3032 150 2.94027 112.525 14 14 14 7 0.02 7.34071e-06\n",
+      "3.206771867883e+00 3.07671 150 3.11282 112.525 14 14 14 7 0.02 5.93135e-06\n",
+      "3.006827156705e+00 3.72638 150 0 150 14 7 15 15 0.02 3.68933e-05\n",
+      "3.218786094847e+00 3.30337 150 3.01344 112.525 14 14 14 7 0.02 5.08861e-06\n",
+      "4.527722847382e+00 1.42238 150 0 150 13 5 15 15 0.02 1.04459e-05\n",
+      "3.069567332611e+00 3.27804 150 3.27804 150 14 7 14 7 0.02 5.93135e-06\n",
+      "5.726405299909e+00 1.29746 150 3.22759 150 13 8 14 14 0.02 7.34071e-06\n",
+      "3.069626478211e+00 3.27565 150 3.27565 150 14 7 14 7 0.02 5.08861e-06\n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "import os\n",
+    "\n",
+    "from binarycpython.utils.grid import Population\n",
+    "from binarycpython.utils.custom_logging_functions import temp_dir\n",
+    "\n",
+    "def parse_function(self, output):\n",
+    "    \"\"\"\n",
+    "    Example parsing function\n",
+    "    \"\"\"\n",
+    "    \n",
+    "    # extract info from the population instance\n",
+    "\n",
+    "    # Get some information from the\n",
+    "    data_dir = self.custom_options[\"data_dir\"]\n",
+    "    base_filename = self.custom_options[\"base_filename\"]\n",
+    "\n",
+    "    # Check directory, make if necessary\n",
+    "    os.makedirs(data_dir, exist_ok=True)\n",
+    "\n",
+    "    #\n",
+    "    seperator = \" \"\n",
+    "\n",
+    "    # Create filename\n",
+    "    outfilename = os.path.join(data_dir, base_filename)\n",
+    "\n",
+    "    # The header columns matching this \n",
+    "    parameters = [\n",
+    "        \"time\", \n",
+    "        \"mass_1\", \"zams_mass_1\", \"mass_2\", \"zams_mass_2\",\n",
+    "        \"stellar_type_1\", \"prev_stellar_type_1\", \"stellar_type_2\", \"prev_stellar_type_2\", \n",
+    "        \"metallicity\", \"probability\"\n",
+    "    ]\n",
+    "    \n",
+    "    # Go over the output.\n",
+    "    for el in output.splitlines():\n",
+    "        headerline = el.split()[0]\n",
+    "\n",
+    "        # CHeck the header and act accordingly\n",
+    "        if headerline == \"EXAMPLE_DCO\":\n",
+    "            values = el.split()[1:]\n",
+    "\n",
+    "            if not len(parameters) == len(values):\n",
+    "                print(\"Amount of column names isnt equal to amount of columns\")\n",
+    "                raise ValueError\n",
+    "\n",
+    "            if not os.path.exists(outfilename):\n",
+    "                with open(outfilename, \"w\") as f:\n",
+    "                    f.write(seperator.join(parameters) + \"\\n\")\n",
+    "\n",
+    "            with open(outfilename, \"a\") as f:\n",
+    "                f.write(seperator.join(values) + \"\\n\")\n",
+    "\n",
+    "\n",
+    "# Create population object\n",
+    "example_pop = Population()\n",
+    "\n",
+    "# If you want verbosity, set this before other things\n",
+    "example_pop.set(verbosity=0)\n",
+    "\n",
+    "# Setting values can be done via .set(<parameter_name>=<value>)\n",
+    "example_pop.set(\n",
+    "    # binary_c physics options\n",
+    "    M_1=10,  # bse_options\n",
+    "    separation=0,  # bse_options\n",
+    "    orbital_period=45000000080,  # bse_options\n",
+    "    max_evolution_time=15000,  # bse_options\n",
+    "    eccentricity=0.02,  # bse_options\n",
+    "    \n",
+    "    # grid_options\n",
+    "    amt_cores=2,  # grid_options\n",
+    "\n",
+    "    # Custom options: the data directory and the output filename\n",
+    "    data_dir=os.path.join(\n",
+    "        temp_dir(), \"example_python_population_result\"\n",
+    "    ),  # custom_options\n",
+    "    base_filename=\"example_pop.dat\",  # custom_options\n",
+    ")\n",
+    "\n",
+    "# Creating a parsing function\n",
+    "example_pop.set(\n",
+    "    parse_function=parse_function,  # Setting the parse function thats used in the evolve_population\n",
+    ")\n",
+    "\n",
+    "### Custom logging\n",
+    "# Log the moment when the star turns into neutron\n",
+    "example_pop.set(\n",
+    "    C_logging_code=\"\"\"\n",
+    "// logger to find gravitational wave progenitors\n",
+    "if(stardata->star[0].stellar_type>=NS && stardata->star[1].stellar_type>=NS)\n",
+    "{\n",
+    "    if (stardata->model.time < stardata->model.max_evolution_time)\n",
+    "    {\n",
+    "        Printf(\"EXAMPLE_DCO %30.12e \" // 1\n",
+    "            \"%g %g %g %g \" // 2-5\n",
+    "            \"%d %d %d %d \" // 6-9\n",
+    "            \"%g %g\\\\n\", // 10-11\n",
+    "\n",
+    "            stardata->model.time, // 1\n",
+    "\n",
+    "            stardata->star[0].mass, //2\n",
+    "            stardata->common.zero_age.mass[0], //3\n",
+    "            stardata->star[1].mass, //4\n",
+    "            stardata->common.zero_age.mass[1], //5\n",
+    "\n",
+    "            stardata->star[0].stellar_type, //6\n",
+    "            stardata->previous_stardata->star[0].stellar_type, //7\n",
+    "            stardata->star[1].stellar_type, //8\n",
+    "            stardata->previous_stardata->star[1].stellar_type, //9\n",
+    "\n",
+    "            // model stuff\n",
+    "            stardata->common.metallicity, //10\n",
+    "            stardata->model.probability //11\n",
+    "        );\n",
+    "    }\n",
+    "    /* Kill the simulation to safe time */\n",
+    "    stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;\n",
+    "}\n",
+    "\"\"\"\n",
+    ")\n",
+    "\n",
+    "# Add grid variables\n",
+    "resolution = {\"M_1\": 5, \"q\": 5, \"per\": 5}\n",
+    "\n",
+    "# Mass\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"lnm1\",\n",
+    "    longname=\"Primary mass\",\n",
+    "    valuerange=[2, 150],\n",
+    "    resolution=\"{}\".format(resolution[\"M_1\"]),\n",
+    "    spacingfunc=\"const(math.log(2), math.log(150), {})\".format(resolution[\"M_1\"]),\n",
+    "    precode=\"M_1=math.exp(lnm1)\",\n",
+    "    probdist=\"three_part_powerlaw(M_1, 0.1, 0.5, 1.0, 150, -1.3, -2.3, -2.3)*M_1\",\n",
+    "    dphasevol=\"dlnm1\",\n",
+    "    parameter_name=\"M_1\",\n",
+    "    condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    ")\n",
+    "\n",
+    "# Mass ratio\n",
+    "example_pop.add_grid_variable(\n",
+    "    name=\"q\",\n",
+    "    longname=\"Mass ratio\",\n",
+    "    valuerange=[\"0.1/M_1\", 1],\n",
+    "    resolution=\"{}\".format(resolution['q']),\n",
+    "    spacingfunc=\"const(0.1/M_1, 1, {})\".format(resolution['q']),\n",
+    "    probdist=\"flatsections(q, [{'min': 0.1/M_1, 'max': 1.0, 'height': 1}])\",\n",
+    "    dphasevol=\"dq\",\n",
+    "    precode=\"M_2 = q * M_1\",\n",
+    "    parameter_name=\"M_2\",\n",
+    "    condition=\"\",  # Impose a condition on this grid variable. Mostly for a check for yourself\n",
+    ")\n",
+    "\n",
+    "#\n",
+    "example_pop.add_grid_variable(\n",
+    "   name=\"log10per\", # in days\n",
+    "   longname=\"log10(Orbital_Period)\",\n",
+    "   valuerange=[0.15, 5.5],\n",
+    "   resolution=\"{}\".format(resolution[\"per\"]),\n",
+    "   spacingfunc=\"const(0.15, 5.5, {})\".format(resolution[\"per\"]),\n",
+    "   precode=\"\"\"orbital_period = 10** log10per\n",
+    "sep = calc_sep_from_period(M_1, M_2, orbital_period)\n",
+    "sep_min = calc_sep_from_period(M_1, M_2, 10**0.15)\n",
+    "sep_max = calc_sep_from_period(M_1, M_2, 10**5.5)\"\"\",\n",
+    "   probdist=\"sana12(M_1, M_2, sep, orbital_period, sep_min, sep_max, math.log10(10**0.15), math.log10(10**5.5), -0.55)\",\n",
+    "   parameter_name=\"orbital_period\",\n",
+    "   dphasevol=\"dlog10per\",\n",
+    ")\n",
+    "\n",
+    "# Exporting of all the settings can be done with .export_all_info()\n",
+    "example_pop.export_all_info()\n",
+    "\n",
+    "# remove the result file if it exists\n",
+    "if os.path.isfile(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\")):\n",
+    "    os.remove(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"))\n",
+    "\n",
+    "# Evolve the population\n",
+    "example_pop.evolve()\n",
+    "\n",
+    "# \n",
+    "with open(os.path.join(temp_dir(), \"example_python_population_result\", \"example_pop.dat\"), 'r') as f:\n",
+    "    output = f.read()\n",
+    "print(\"\\n\")\n",
+    "print(output)"
+   ]
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.4"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/examples/notebooks/.ipynb_checkpoints/workshop_example_notebook-checkpoint.ipynb b/examples/notebooks/.ipynb_checkpoints/workshop_example_notebook-checkpoint.ipynb
deleted file mode 100644
index 163d9c5fc6235fd429ff434c94c410d9a0e52771..0000000000000000000000000000000000000000
--- a/examples/notebooks/.ipynb_checkpoints/workshop_example_notebook-checkpoint.ipynb
+++ /dev/null
@@ -1,641 +0,0 @@
-{
- "cells": [
-  {
-   "cell_type": "markdown",
-   "metadata": {
-    "Collapsed": "false"
-   },
-   "source": [
-    "# Binary_c and python example notebook\n",
-    "The following notebook servers as an example of how the binary_c python wrapper works and how it could be used.\n",
-    "\n",
-    "By: David Hendriks 30 nov 2019"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 16,
-   "metadata": {
-    "Collapsed": "false"
-   },
-   "outputs": [],
-   "source": [
-    "import binarycpython\n",
-    "import binary_c_python_api"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {
-    "Collapsed": "false"
-   },
-   "source": [
-    "## Core api wrapper functions:"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {
-    "Collapsed": "false"
-   },
-   "source": [
-    "### run_binary()\n"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 17,
-   "metadata": {
-    "Collapsed": "false"
-   },
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "\n",
-      "\n",
-      "Binary_c output:\n",
-      "\n",
-      "\n",
-      "example_header_1 time=0 mass_1=15 mass_2=14 st1=1 st2=1 sep=3540.3 ecc=0\n",
-      "example_header_2 0 15 14 1 1 3540.3 0\n",
-      "INITIAL_GRID 15 14 4530 0.02 1 0\n",
-      "example_header_1 time=0 mass_1=15 mass_2=14 st1=1 st2=1 sep=3540.3 ecc=0\n",
-      "example_header_2 0 15 14 1 1 3540.3 0\n",
-      "INITIAL_GRID 15 14 4530 0.02 1 0\n",
-      "example_header_1 time=1e-07 mass_1=15 mass_2=14 st1=1 st2=1 sep=3540.3 ecc=0\n",
-      "example_header_2 1e-07 15 14 1 1 3540.3 0\n",
-      "example_header_1 time=2e-07 mass_1=15 mass_2=14 st1=1 st2=1 sep=3540.3 ecc=0\n",
-      "example_header_2 2e-07 15 14 1 1 3540.3 0\n"
-     ]
-    }
-   ],
-   "source": [
-    "m1 = 15.0  # Msun\n",
-    "m2 = 14.0  # Msun\n",
-    "separation = 0  # 0 = ignored, use period\n",
-    "orbital_period = 4530.0  # days\n",
-    "eccentricity = 0.0\n",
-    "metallicity = 0.02\n",
-    "max_evolution_time = 15000 # You need to set this!\n",
-    "\n",
-    "argstring = \"binary_c M_1 {0:g} M_2 {1:g} separation {2:g} orbital_period {3:g} eccentricity {4:g} metallicity {5:g} max_evolution_time {6:g}  \".format(\n",
-    "    m1,\n",
-    "    m2,\n",
-    "    separation,\n",
-    "    orbital_period,\n",
-    "    eccentricity,\n",
-    "    metallicity,\n",
-    "    max_evolution_time,\n",
-    ")\n",
-    "\n",
-    "output = binary_c_python_api.run_binary(argstring)\n",
-    "\n",
-    "print(\"\\n\\nBinary_c output:\\n\\n\")\n",
-    "print('\\n'.join(output.split('\\n')[:10]))"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {
-    "Collapsed": "false"
-   },
-   "source": [
-    "### run_binary_with_log"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 18,
-   "metadata": {
-    "Collapsed": "false"
-   },
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "True\n",
-      "      TIME      M1       M2   K1  K2           SEP   ECC  R1/ROL1 R2/ROL2  TYPE RANDOM_SEED=7106 RANDOM_COUNT=0\n",
-      "     0.0000   15.000   14.000  1   1     2.786e+08  0.00   0.000   0.000  INITIAL \n",
-      "    12.7509   14.645   13.776  2   1    2.8427e+08  0.00   0.000   0.000  TYPE_CHNGE\n",
-      "    12.7773   14.639   13.775  4   1    2.8435e+08  0.00   0.000   0.000  TYPE_CHNGE\n",
-      "    13.1380   13.748   13.758  4   1    2.9373e+08  0.00   0.000   0.000  q-inv\n",
-      "    14.0900   10.830   13.705  4   2    3.2934e+08  0.00   0.000   0.000  OFF_MS\n",
-      "    14.0900   10.830   13.705  4   2    3.2934e+08  0.00   0.000   0.000  TYPE_CHNGE\n",
-      "    14.1204   10.726   13.700  4   4    3.3081e+08  0.00   0.000   0.000  TYPE_CHNGE\n",
-      "    14.2118   10.410   13.566  5   4    3.3702e+08  0.00   0.000   0.000  TYPE_CHNGE\n",
-      "    14.2646    1.472   13.462 13   4       -31.236 -1.00   0.000   0.000  Randbuf=34421 - d48r(0)=0.0570946 - d48r(1)=0.458272 - d48r(2)=0.13108 - d48r(3)=0.562029 - d48r(4)=0.924056 \n",
-      "    14.2646    1.472   13.462 13   4       -31.236 -1.00   0.000   0.000  SN kick II (SN type 12 12, pre-explosion M=9.89211 Mc=4.78817 type=5) -> kick 1(190) vk=302.148 vr=0.113492 omega=5.80602 phi=0.124379 -> vn=302.048 ; final sep -31.2365 ecc -1 (random count 0) - Runaway v=(0,0,0) |v|=0 : companion v=(0,0,0), |v|=0 ; \n",
-      "    14.2646    1.472   13.462 13   4       -31.236 -1.00   0.000   0.000  TYPE_CHNGE\n",
-      "    14.2646    1.472   13.462 13   4       -31.236 -1.00   0.000   0.000  DISRUPT \n",
-      "    14.2646    1.472   13.462 13   4       -31.236 -1.00   0.000   0.000  SN\n",
-      "    15.7087    1.472   10.210 13   5       -31.236 -1.00   0.000   0.000  TYPE_CHNGE\n",
-      "    15.7695    1.472    1.444 13  13       -31.236 -1.00   0.000   0.000  d48r(5)=0.608402 - d48r(6)=0.696003 - d48r(7)=0.796455 - d48r(8)=0.0834973 \n",
-      "    15.7695    1.472    1.444 13  13       -31.236 -1.00   0.000   0.000  SN kick II (SN type 12 12, pre-explosion M=9.85661 Mc=4.3914 type=5) -> kick 1(190) vk=392.156 vr=0 omega=0.524629 phi=0.634667 -> vn=392.156 ; final sep -31.2365 ecc -1 (random count 5) - Runaway v=(0,0,0) |v|=0 : companion v=(0,0,0), |v|=0 ; \n",
-      "    15.7695    1.472    1.444 13  13       -31.236 -1.00   0.000   0.000  TYPE_CHNGE\n",
-      "    15.7695    1.472    1.444 13  13       -31.236 -1.00   0.000   0.000  q-inv\n",
-      "    15.7695    1.472    1.444 13  13       -31.236 -1.00   0.000   0.000  SN\n",
-      " 15000.0000    1.472    1.444 13  13       -31.236 -1.00   0.000   0.000  MAX_TIME\n",
-      "Probability : 1\n",
-      "\n"
-     ]
-    }
-   ],
-   "source": [
-    "import tempfile\n",
-    "import os\n",
-    "\n",
-    "m1 = 15.0  # Msun\n",
-    "m2 = 14.0  # Msun\n",
-    "separation = 0  # 0 = ignored, use period\n",
-    "orbital_period = 4530.0  # days\n",
-    "eccentricity = 0.0\n",
-    "metallicity = 0.02\n",
-    "max_evolution_time = 15000 # You need to set this!\n",
-    "log_filename=tempfile.gettempdir() + \"/test_log.txt\"\n",
-    "\n",
-    "argstring = \"binary_c M_1 {0:g} M_2 {1:g} separation {2:g} orbital_period {3:g} eccentricity {4:g} metallicity {5:g} max_evolution_time {6:g} log_filename {7} \".format(\n",
-    "    m1,\n",
-    "    m2,\n",
-    "    separation,\n",
-    "    orbital_period,\n",
-    "    eccentricity,\n",
-    "    metallicity,\n",
-    "    max_evolution_time,\n",
-    "    log_filename,\n",
-    ")\n",
-    "\n",
-    "output = binary_c_python_api.run_binary(argstring)\n",
-    "\n",
-    "print(os.path.exists(log_filename))\n",
-    "\n",
-    "with open(log_filename, 'r') as f:\n",
-    "    print(f.read())\n",
-    "\n",
-    "\n",
-    "# print(\"\\n\\nBinary_c output:\\n\\n\")\n",
-    "# print(output)"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {
-    "Collapsed": "false"
-   },
-   "source": [
-    "### run binary with custom logging line"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 19,
-   "metadata": {
-    "Collapsed": "false"
-   },
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "example_header_1 time=0 mass_1=15 mass_2=14 st1=1 st2=1 sep=3540.3 ecc=0\n",
-      "example_header_2 0 15 14 1 1 3540.3 0\n",
-      "INITIAL_GRID 15 14 4530 0.02 1 0\n",
-      "MY_STELLAR_DATA time=0 mass=15\n",
-      "example_header_1 time=0 mass_1=15 mass_2=14 st1=1 st2=1 sep=3540.3 ecc=0\n",
-      "example_header_2 0 15 14 1 1 3540.3 0\n",
-      "INITIAL_GRID 15 14 4530 0.02 1 0\n",
-      "MY_STELLAR_DATA time=0 mass=15\n",
-      "example_header_1 time=1e-07 mass_1=15 mass_2=14 st1=1 st2=1 sep=3540.3 ecc=0\n",
-      "example_header_2 1e-07 15 14 1 1 3540.3 0\n",
-      "MY_STELLAR_DATA time=1e-07 mass=15\n",
-      "example_header_1 time=2e-07 mass_1=15 mass_2=14 st1=1 st2=1 sep=3540.3 ecc=0\n",
-      "example_header_2 2e-07 15 14 1 1 3540.3 0\n",
-      "MY_STELLAR_DATA time=2e-07 mass=15\n",
-      "example_header_1 time=3e-07 mass_1=15 mass_2=14 st1=1 st2=1 sep=3540.3 ecc=0\n",
-      "example_header_2 3e-07 15 14 1 1 3540.3 0\n",
-      "MY_STELLAR_DATA time=3e-07 mass=15\n",
-      "example_header_1 time=4e-07 mass_1=15 mass_2=14 st1=1 st2=1 sep=3540.3 ecc=0\n",
-      "example_header_2 4e-07 15 14 1 1 3540.3 0\n",
-      "MY_STELLAR_DATA time=4e-07 mass=15\n"
-     ]
-    }
-   ],
-   "source": [
-    "from binarycpython.utils import custom_logging_functions\n",
-    "# generate logging lines. Here you can choose whatever you want to have logged, and with what header\n",
-    "# this generates working print statements\n",
-    "logging_line = custom_logging_functions.autogen_C_logging_code(\n",
-    "    {\"MY_STELLAR_DATA\": [\"model.time\", \"star[0].mass\"],}\n",
-    ")\n",
-    "# OR\n",
-    "# You can also decide to `write` your own logging_line, which allows you to write a more complex logging statement with conditionals.\n",
-    "logging_line = 'Printf(\"MY_STELLAR_DATA time=%g mass=%g\\\\n\", stardata->model.time, stardata->star[0].mass)'\n",
-    "\n",
-    "# Generate entire shared lib code around logging lines\n",
-    "custom_logging_code = custom_logging_functions.binary_c_log_code(logging_line)\n",
-    "# print(custom_logging_code)\n",
-    "\n",
-    "# Make this code into a shared library and the function into memory\n",
-    "func_memaddr = custom_logging_functions.create_and_load_logging_function(custom_logging_code)\n",
-    "\n",
-    "# Run system with custom logging code\n",
-    "m1 = 15.0  # Msun\n",
-    "m2 = 14.0  # Msun\n",
-    "separation = 0  # 0 = ignored, use period\n",
-    "orbital_period = 4530.0  # days\n",
-    "eccentricity = 0.0\n",
-    "metallicity = 0.02\n",
-    "max_evolution_time = 15000 # You need to set this!\n",
-    "\n",
-    "argstring = \"binary_c M_1 {0:g} M_2 {1:g} separation {2:g} orbital_period {3:g} eccentricity {4:g} metallicity {5:g} max_evolution_time {6:g}  \".format(\n",
-    "    m1,\n",
-    "    m2,\n",
-    "    separation,\n",
-    "    orbital_period,\n",
-    "    eccentricity,\n",
-    "    metallicity,\n",
-    "    max_evolution_time,\n",
-    ")\n",
-    "\n",
-    "output = binary_c_python_api.run_binary_custom_logging(argstring, func_memaddr)\n",
-    "print('\\n'.join(output.split('\\n')[:20]))"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {
-    "Collapsed": "false"
-   },
-   "source": [
-    "## Using utils functions\n",
-    "In the utils.functions there are some functions that make it easier to interact with the core api functions. "
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {
-    "Collapsed": "false"
-   },
-   "source": [
-    "### run_system()\n",
-    "This function serves as an example on the function run_system and parse_output. \n",
-    "There is more functionality with this method and several tasks are done behind the scene.\n",
-    "\n",
-    "Requires pandas, numpy to run.\n",
-    "\n",
-    "run_system: mostly just makes passing arguments to the function easier. It also loads all the necessary defaults in the background\n",
-    "parse_output: Takes the raw output of binary_c and selects those lines that start with the given header. \n",
-    "Note, if you dont use the custom_logging functionality binary_c should be configured to have output that starts with that given header\n",
-    "\n",
-    "The parsing of the output only works correctly if either all of the values are described inline like `mass=<number>' or none of them are.    "
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 20,
-   "metadata": {
-    "Collapsed": "false"
-   },
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "example_header_1 time=0 mass_1=10 mass_2=20 st1=1 st2=1 sep=2.81762e+08 ecc=0\n",
-      "example_header_2 0 10 20 1 1 2.81762e+08 0\n",
-      "INITIAL_GRID 10 20 1e+11 0.02 1 0\n",
-      "example_header_1 time=0 mass_1=10 mass_2=20 st1=1 st2=1 sep=2.81762e+08 ecc=0\n",
-      "example_header_2 0 10 20 1 1 2.81762e+08 0\n",
-      "INITIAL_GRID 10 20 1e+11 0.02 1 0\n",
-      "example_header_1 time=1e-07 mass_1=10 mass_2=20 st1=1 st2=1 sep=2.81762e+08 ecc=0\n",
-      "example_header_2 1e-07 10 20 1 1 2.81762e+08 0\n",
-      "example_header_1 time=2e-07 mass_1=10 mass_2=20 st1=1 st2=1 sep=2.81762e+08 ecc=0\n",
-      "example_header_2 2e-07 10 20 1 1 2.81762e+08 0\n",
-      "\n",
-      "\n",
-      "\n",
-      "              time    mass_1    mass_2   st1   st2           sep  ecc\n",
-      "0     0.000000e+00  10.00000  20.00000   1.0   1.0  2.817620e+08  0.0\n",
-      "1     0.000000e+00  10.00000  20.00000   1.0   1.0  2.817620e+08  0.0\n",
-      "2     1.000000e-07  10.00000  20.00000   1.0   1.0  2.817620e+08  0.0\n",
-      "3     2.000000e-07  10.00000  20.00000   1.0   1.0  2.817620e+08  0.0\n",
-      "4     3.000000e-07  10.00000  20.00000   1.0   1.0  2.817620e+08  0.0\n",
-      "...            ...       ...       ...   ...   ...           ...  ...\n",
-      "3927  1.102750e+04   1.33817   1.62124  13.0  13.0 -4.896110e+01 -1.0\n",
-      "3928  1.202750e+04   1.33817   1.62124  13.0  13.0 -4.896110e+01 -1.0\n",
-      "3929  1.302750e+04   1.33817   1.62124  13.0  13.0 -4.896110e+01 -1.0\n",
-      "3930  1.402750e+04   1.33817   1.62124  13.0  13.0 -4.896110e+01 -1.0\n",
-      "3931  1.500000e+04   1.33817   1.62124  13.0  13.0 -4.896110e+01 -1.0\n",
-      "\n",
-      "[3932 rows x 7 columns]\n",
-      "              time    mass_1    mass_2   st1   st2           sep  ecc\n",
-      "0     0.000000e+00  10.00000  20.00000   1.0   1.0  2.817620e+08  0.0\n",
-      "1     0.000000e+00  10.00000  20.00000   1.0   1.0  2.817620e+08  0.0\n",
-      "2     1.000000e-07  10.00000  20.00000   1.0   1.0  2.817620e+08  0.0\n",
-      "3     2.000000e-07  10.00000  20.00000   1.0   1.0  2.817620e+08  0.0\n",
-      "4     3.000000e-07  10.00000  20.00000   1.0   1.0  2.817620e+08  0.0\n",
-      "...            ...       ...       ...   ...   ...           ...  ...\n",
-      "3927  1.102750e+04   1.33817   1.62124  13.0  13.0 -4.896110e+01 -1.0\n",
-      "3928  1.202750e+04   1.33817   1.62124  13.0  13.0 -4.896110e+01 -1.0\n",
-      "3929  1.302750e+04   1.33817   1.62124  13.0  13.0 -4.896110e+01 -1.0\n",
-      "3930  1.402750e+04   1.33817   1.62124  13.0  13.0 -4.896110e+01 -1.0\n",
-      "3931  1.500000e+04   1.33817   1.62124  13.0  13.0 -4.896110e+01 -1.0\n",
-      "\n",
-      "[3932 rows x 7 columns]\n"
-     ]
-    }
-   ],
-   "source": [
-    "from binarycpython.utils.functions import run_system, parse_output\n",
-    "import pandas as pd\n",
-    "import numpy as np\n",
-    "\n",
-    "# Run system. all arguments can be given as optional arguments.\n",
-    "output = run_system(M_1=10, M_2=20, separation=0, orbital_period=100000000000)\n",
-    "\n",
-    "print('\\n'.join(output.split('\\n')[:10]))\n",
-    "\n",
-    "# Catch results that start with a given header. (Mind that binary_c has to be configured to print them if your not using a custom logging function)\n",
-    "result_example_header_1 = parse_output(output, selected_header=\"example_header_1\")\n",
-    "result_example_header_2 = parse_output(output, selected_header=\"example_header_2\")\n",
-    "\n",
-    "# print(result_example_header_1)\n",
-    "\n",
-    "#### Now do whatever you want with it:\n",
-    "# Or put them into a pandas array\n",
-    "\n",
-    "# Cast the data into a dataframe.\n",
-    "# This example automatically catches the column names because the binary_c output line is constructed as 'example_header_1 time=<number>..'\n",
-    "print('\\n\\n')\n",
-    "\n",
-    "df = pd.DataFrame.from_dict(result_example_header_1, dtype=np.float64)\n",
-    "print(df)\n",
-    "\n",
-    "# This example has column headers which are numbered, but we can override that with custom headers.\n",
-    "df2 = pd.DataFrame.from_dict(result_example_header_2, dtype=np.float64)\n",
-    "df2.columns=['time', 'mass_1', 'mass_2', 'st1', 'st2', 'sep', 'ecc']\n",
-    "print(df2)\n"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {
-    "Collapsed": "false"
-   },
-   "source": [
-    "### run_system() and custom logging\n",
-    "Function that will use a automatically generated piece of logging code. Compile it, load it \n",
-    "into memory and run a binary system. See run_system on how several things are done in the background here.\n"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 21,
-   "metadata": {
-    "Collapsed": "false"
-   },
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "              time      mass\n",
-      "0     0.000000e+00  1.000000\n",
-      "1     0.000000e+00  1.000000\n",
-      "2     1.000000e-07  1.000000\n",
-      "3     2.000000e-07  1.000000\n",
-      "4     3.000000e-07  1.000000\n",
-      "...            ...       ...\n",
-      "3630  1.131680e+04  0.627748\n",
-      "3631  1.231680e+04  0.627748\n",
-      "3632  1.331680e+04  0.627748\n",
-      "3633  1.431680e+04  0.627748\n",
-      "3634  1.500000e+04  0.627748\n",
-      "\n",
-      "[3635 rows x 2 columns]\n"
-     ]
-    }
-   ],
-   "source": [
-    "from binarycpython.utils.custom_logging_functions import (\n",
-    "    autogen_C_logging_code,\n",
-    "    binary_c_log_code,\n",
-    ")\n",
-    "\n",
-    "import pandas as pd\n",
-    "import numpy as np\n",
-    "\n",
-    "# generate logging lines. Here you can choose whatever you want to have logged, and with what header\n",
-    "# this generates working print statements\n",
-    "logging_line = autogen_C_logging_code(\n",
-    "    {\"MY_STELLAR_DATA\": [\"model.time\", \"star[0].mass\"],}\n",
-    ")\n",
-    "# OR\n",
-    "# You can also decide to `write` your own logging_line, which allows you to write a more complex logging statement with conditionals.\n",
-    "logging_line = 'Printf(\"MY_STELLAR_DATA time=%g mass=%g\\\\n\", stardata->model.time, stardata->star[0].mass)'\n",
-    "\n",
-    "# Generate entire shared lib code around logging lines\n",
-    "custom_logging_code = binary_c_log_code(logging_line)\n",
-    "\n",
-    "# Run system. all arguments can be given as optional arguments. the custom_logging_code is one of them and will be processed automatically.\n",
-    "output = run_system(\n",
-    "    M_1=1,\n",
-    "    metallicity=0.002,\n",
-    "    M_2=0.1,\n",
-    "    separation=0,\n",
-    "    orbital_period=100000000000,\n",
-    "    custom_logging_code=custom_logging_code,\n",
-    ")\n",
-    "\n",
-    "# Catch results that start with a given header. (Mind that binary_c has to be configured to print them if your not using a custom logging function)\n",
-    "# DOESNT WORK YET if you have the line autogenerated.\n",
-    "result_example_header = parse_output(output, \"MY_STELLAR_DATA\")\n",
-    "\n",
-    "# Cast the data into a dataframe.\n",
-    "df = pd.DataFrame.from_dict(result_example_header, dtype=np.float64)\n",
-    "\n",
-    "# Do whatever you like with the dataframe.\n",
-    "print(df)"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {
-    "Collapsed": "false"
-   },
-   "source": [
-    "## Other example\n",
-    "Checking how much mass stars lose on the main sequence."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 12,
-   "metadata": {
-    "Collapsed": "false"
-   },
-   "outputs": [],
-   "source": [
-    "def run_and_calc_mass(**kwargs):\n",
-    "    \"\"\"\n",
-    "    Function to run a given system and look at the mass lost in the main sequence of the star\n",
-    "    \"\"\"\n",
-    "    # start = time.time()\n",
-    "    output = run_system(**kwargs)\n",
-    "    result = parse_output(output, 'example_header_1')\n",
-    "    # stop = time.time()\n",
-    "    # print(\"Took {:.2f}s to run single system\".format(stop-start))\n",
-    "    # print(\"The following keys are present in the results:\\n{}\".format(result.keys()))\n",
-    "    # print(len(result))\n",
-    "\n",
-    "    #### Now do whatever you want with it: \n",
-    "\n",
-    "    # Cast the data into a dataframe. \n",
-    "    df = pd.DataFrame.from_dict(result, dtype=np.float64)\n",
-    "\n",
-    "    # Get last change moment\n",
-    "    last_st = df['st1'].unique()[-1]\n",
-    "    last_stellar_type_change_time_1 = df[df.st1==last_st]['time'].iloc[0]\n",
-    "\n",
-    "    # slice to get that last time\n",
-    "    sliced_df = df[df.time < last_stellar_type_change_time_1] # Cut off late parts of evolution\n",
-    "\n",
-    "    main_sequence = sliced_df[sliced_df.st1==1]\n",
-    "    \n",
-    "    initial_mass = main_sequence.iloc[0].mass_1\n",
-    "    final_mass = main_sequence.iloc[-1].mass_1\n",
-    "    \n",
-    "    initial_time = main_sequence.iloc[0].time\n",
-    "    final_time = main_sequence.iloc[-1].time\n",
-    "    \n",
-    "    mass_lost = initial_mass - final_mass\n",
-    "    fraction = mass_lost/initial_mass\n",
-    "\n",
-    "    # Return the mass fraction (wrt initial mass)\n",
-    "    return fraction\n"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 13,
-   "metadata": {
-    "Collapsed": "false"
-   },
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "Took 14.214274644851685s\n"
-     ]
-    }
-   ],
-   "source": [
-    "import time\n",
-    "\n",
-    "metallicity_002 = 0.02\n",
-    "metallicity_001 = 0.01\n",
-    "metallicity_0002 = 0.002\n",
-    "\n",
-    "mass_range = np.arange(1, 25, .5)\n",
-    "\n",
-    "start = time.time()\n",
-    "fractions_z002 = [run_and_calc_mass(M_1=mass, \n",
-    "                                    M_2=10, \n",
-    "                                    separation=0, \n",
-    "                                    orbital_period=100000000000, \n",
-    "                                    metallicity=metallicity_002, \n",
-    "                                    effective_metallicity=metallicity_002) \n",
-    "                 for mass in mass_range]\n",
-    "\n",
-    "fractions_z001 = [run_and_calc_mass(M_1=mass, \n",
-    "                                    M_2=10, \n",
-    "                                    separation=0, \n",
-    "                                    orbital_period=100000000000, \n",
-    "                                    metallicity=metallicity_001, \n",
-    "                                    effective_metallicity=metallicity_001) \n",
-    "                 for mass in mass_range]\n",
-    "\n",
-    "fractions_z0002 = [run_and_calc_mass(M_1=mass, \n",
-    "                                     M_2=10, \n",
-    "                                     separation=0, \n",
-    "                                     orbital_period=100000000000, \n",
-    "                                     metallicity=metallicity_0002, \n",
-    "                                     effective_metallicity=metallicity_0002) \n",
-    "                 for mass in mass_range]\n",
-    "stop = time.time()\n",
-    "print(\"Took {}s\".format(stop-start))"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 22,
-   "metadata": {
-    "Collapsed": "false"
-   },
-   "outputs": [
-    {
-     "data": {
-      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAv4AAAH+CAYAAADkjQokAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nOydeXhVxdnAf5Od7BshkD2EJWGHsKmguAFWRVEhghtu1dbar7TWpdoqrVVrbdVPrVKXz6LUWlfcalVERWoRQVHWCAGysGQhG5B9vj/m3OTm5ubmXnLDTeD9Pc95kjtnzpx3zpkz8573vPOO0lojCIIgCIIgCMLxjZ+vBRAEQRAEQRAEoecRxV8QBEEQBEEQTgBE8RcEQRAEQRCEEwBR/AVBEARBEAThBEAUf0EQBEEQBEE4ARDFXxAEQRAEQRBOAETx7wZKqd8ppbRSKtnXsriLUmqwUmqFUqrUkv1pX8vkLkqpLEvmO93Ie6aV97JunG+1Uup7D/K/oJRq6sb5rrVkPuVoy+jL9MX6e9pGjqL8IqXUhz1Vfm+lu8+S0HtQSvkrpZYopXYqpZp8fV+VUgGOY5+zNCu9U9mVUvOVUhuVUkf6Wr91IuGsj3bWv3RHn/P0WF+Pdb1C8VdKnWZdhM62KT6Uba5S6te+On8P8DfgZOB+4HKgU8VfKTVeKXW3Uiq1Oyf0Vjm9AaXU1Uqpm30th3B0KKX8rLZ4vq9lEYQThKuBu4CPrP+v8K04HuFUdqVUNvAiUAHchBlLt/lIRo/oC+Px8dBPK6VOt+oQ6WtZHAnwtQAO/B1410l6j1nU3GAukAcscbLvbuB3Wuu6YyrRUaKUCgNOAv6stX7IjUPGA78BPgT2dOPU3irHE1YC/YCGbpRxupO0q4FE4FEn+xYB13TjfELP44dpi88AK3wsizsMBlp8LYQPkGfp+OEsjIJ8ve6lK4ZqrZuUUv0Ax68Rnck+A/AHbtZabzxGYnoLX4zHnuKLfvpujl6fc3bs6cCvMMbVaof8zwEvAPVHca5u09sU//Va6xc8PUgpFaG1rukJgVyhtW6iY0fRmxlg/a3wqRTHAK11C9CtFzKttUcvDVrrxu6cTxAAlFJBgNJa12utfTIw+Bp5lo4rEoGD3lb6vT3ud6LwdSZ7ovXXq2OpUsofCNZaH/ZmuULXdEef8/RYrXUz0Hw05/IKWmufb8BpgAZ+0UW+LCvfncClwHqMcve0tT8b+AuwGagBDgPrgKs7KS8K+D2w1SqnHPgMmGftX22dz3G7zNr/O+t3skO5mZi3uf2YN7rvrbz9HPLZjs8CHgCKrfwbgFkeXL8Eq95FGAv3HuB/gVi7PC90UpdTOinzd53kf9rD87osx7oH9wJrgTKr/vnWfXG8Xq33341rcqb9vXJMw1gTN1vn2wX83EkZq4Hv7X4XubqG1jVucijD7TYJXOvqnjjkfQHT0fTHuG+VY6wKrwEJVp4baWvbW4BznZRzE8byU2LdwxKrvFQnec8DPrXu0xFgN/AqkGWXJw1jzdhtXdsDwOfA5W7UyWn93WlnVr5+mC9z26zrfBD4Frjfof04bk1uyBaLsT6VA7WYL0rjnLSRAByeE1f1o+35GA48jOkDmu3aVBHwoUM5RdY9ywHes9pVFfCy7d475B9r5T9syf9/GCOAUzldyH0axrK127r//wEmWXlmWPf5kNWG7nBSzixLxgKrTR4E3gemdda+O2nzMcBSoNQqZzUw0c2+Mg54BNhJW5+/DljsJO+lVp1sz+0XwFwn+fwwlr3dVpkbMV+JO4wPju2lq77NKvsmzFh32JLlI+DUzo4H5gBfWbKUYNw6A5yccwjwPG3PVQnwBjDOId8k4E3rWtVjnq/bAf8urrWtv3U1hpxmtc1qq35fAVc5KWs1ZhwdjOnjKoBGN+73KODfVrssx/RtA53I0e65dSV7J+n2fUA08Adgh3W9SoHlQEYnz9UMjHV7J6Z9X+bptbe7PsnAPzDP1iFM/2DfP3c5rndyHb0y3rjzXOFGPw0sAN7CjAW2a/waMLKztuNG/9KZPudST3R2LJ3rW3c63HvHsS4E8wxvpq2PXAGMcdIv/BwzvtVY92Irpn26fC611r3O4h+qlIp3SKvXHd/qLwZSMMrAXzCDHsAZGP/1FZjBJRyYDzyjlIrTWj9oK0ApFYtpfMMxg9ETmE93E4AfWGlLMA/kFOBKu/N/3lkFlFIZGCU23Crze9o++ZyklDpLm7c9e2yffB4EgoH/Ad5USmVprQs7O5d1vmhgDZCBUUw2ALnAj4HTlVKTtda1liwbgD8Cr2A6E+jcL/GfGKvGNcBvge1W+vcentdlOZj7eDVGgXwR07nMAG4DxmDuhbe5CaNMPoNpO1cAf1RKFWqtX3Zx3E8wg2gU8Au7dFe+nW63yaNAYRSnAowf6lCsuiml3gGuAp7FDOo/BV5VSg3RWtt/3r0F0zF+gBlMR2Pux+lKqVFa64MASqkzMErBRkwnWAUkYQbITOB7y1L9AeZ+P4F5gYu2yjwFWOZxBd1vZwBPYu7l/2GU0kCMcmNz2dqHeY6fB1ZZ5UEXrjR29RpvHbvW+v8joLKr493kJcxA/UfMgLC/i/wpwMeYZ/kNS57rMO3rHDvZh2Ne1sC8WJQA5wLvHIWMD2La3MOYAeoXwL+VUouAv2KU8RcwSu+9SqmdWuuX7I6/GtMe/g/zgpOMGQBXKqVO1VqvcUMGhVHkSjAvIf2BxcA7SqlMu7bQGa8BUzFtZSMQhnk5Pw34U+tJlLofuBXjenoX5h5fhHmGbtRaP2lX5qOY9vgJ5v4lAk9hFL/u8iIwDzMePYN5ub0M+EgpNUdr7Xgfz8P0U09hlIALrXpUYJRRW/0mY9q0v1XuJsxL0WmY8W6Dle98TBvbhrn/BzH92b2Y5/pSF7J/h/F9v4v2faZtDLnAKnuvVfYhq7znlFIZWuvfOJQXiWnLn2DGU0ddoR1KqSwrfyDGUFAMnI97bb8z2Xdg+o6LMS9YN2OuSY11zhhMf5WE6Xs3A4OAHwFnKqUmOBnT/4y5D0sxCly+VZan1z7Cqu9q4A7MS9LNwBtKqdHafAXvajx2RbfHGzefK3f66ZswfeRT1t8s4HpgjVJqnNbaG8+eu3qiM57A9MX2bQTgaxfnCsL0bZMxL1ePYowc12HqdYrWeoOV/TfArzF63BOYMSPDOl8gXX1N6OrN4FhstFn8nW0vOXkTrAeGOiknzEmaP+ZBqMDuTQjzkGmcW179XL0ZunpDxLxta2CmQ94/W+lXOjn+DcynfVv6VCv9t25cuwesvNc7pP/USv+Nk+vXpcXc1VvpUZzXVTlBOLdG3WcdM/5o5Me1xb8QiLRLD8d6i3cow5mlwKnFrrO24mGb9NTir4FHHNIftdJ3AeF26eOdtalO5Jtp5V3spNw4FzKNdzzOk81Z/T1sZ9XAii7O0alF3sUxP7KOucsh/Rd0tPYdrcX/I5xYaujc4q9xsD5jBkFNewvfa1baZLs0hXnRdus62Mn9JRBolz7XSm/EzkqMMV4ccPI8OWtrA63nYIVDemcWfw086pB+qZV+TRf1iHV2vJN8k6x8S5zsexvzshdm/R5h5f037Z/lSRhFxXF8cNviD1yCkzEKM7BvAPKdHF+L3dc6jGVwC1DoJO0IMMKJLH7W31CMJfVjx7aJMRi421c560cDrXZcASQ6tJ0vMIpLpkMZGrjbg+f2ZeuYafZ1wxhh2rV9OnluXdyvzqzDj2Os2CMd0jOse2N/TttztZmOX7c9uvZ212exQ97brfQznJy3y3vn5Nk76vEGz54rl/00zvuSkZiXDsf+4agt/rivJzo71mkb6eweWPe1BTjTIW80DuMAxmix0d3757j1iqg+dizFTKax337nJN9bWuvtjola60O2/5VSIUqpOMwb0/vW36HWPn+M1fVbrfWzTso5KgueUioAY037Umv9vsPue62/Fzo59BFt3U3r/P/BdMpD3DjthZg35Gcc0v+C6VSdnc8beOW8WusGbfzjUEoFKqVirK8+H1hZJntJXnue1Vq3TrbRxkq4Fveut0e42ya7wcMOvz+z/v6ftrN+aq3XYyxq7epok8+KohBlXfuvMIOU/bW3fVW7yHp+nGHLc7pSqr/HNXGOJ+2sChillBrhpXPbuACj3P7ZIf0xzDX1Bn/WHb8EumKP1vo1h7SV1t8saO2PZgNrtNb/tWWy+hp3Jvc78oRu73tva2uf6zZLFNrMS/iSTtqaJVu49Sw0Yp49T55zx/tgq3dXz+9h63xTlFJpLvItxAzKf1NKxdtvGKUxyk7eOdbfh+zvn9Z6LUZp6w6XYZShtxxkiMIoSllKqUyHY17VdhZWayxbBSRbk1fBWCuHY5SqTY4ntRv/ZmKs6s8CMQ4y2IJwnH2UdZuIsYo/rbXeZ3du25dvP4x1vp1ouNlu7cbiL7TWtnZqq1t3vrK6OqcfxgVlFbDP4XrVYNq5s+v1hNb6iEPa0Vz7JkyfZI+7z4a7dGe88eS5conduKWUUpFWGfswXy68ojP0lJ7ogsswX96+drg2AVjufUqpYCtvFZCilDrpaE7U21x98rXW7sSs7qD0g5nsA9yDsZQ4i6caY/0dgPls2Olnl6NkAOZN3VlnWqaU2o9xi3Bkp5O0Csyn167IAFY7Kg1a6walVD7GD7gn8Np5lVI3AT+0jnF8GY3peES3cXa9y3HvenuEB23yaGjB+BXbY/ukWOAkfyUOdVRKnYXxKZyMsbZ1JtujGDeCp4AHlVKrMf6jL2mtywC01juUUg8Av8QMfBswHdY/tdbrPKybDU/a2U8xn4e/U0rtwCheK4C37V+sj4JMoFg7uJForeuUUgUY94vu4rRPc0FnbRja7nEixiXHmSva0YQedDynq7Z2kI5tLQtjAJmJGeTtcXcyr7M271hvp1j3azHGpWeXUmoTRjF6XWttr6RnY76K5LsozhYowdafb3WSZzPOI4O5SzbG2negCzns74urdhGLcXexKWMbnOR1PD8YtwNX5z8aMqy/HcZKuzTHsXKfdn8ybyLmuezsvvQEiZj7NRtjrXeGs4ARzp79o7n2RbpjQAq3ng036e5448lz5RKl1ASMq9J0jLuePa7K94Se0hM7YzjGA6KztgPmGd6LcYV+HfhcKVWMedl8G/Pi32Vf6pHir5QKx/grnY25KIu01l9YbyXXA684s8T3AJ3NeP8HZgLZk5jPO+WYT4bnYeTubV84bHRm6VPHVAofoJT6Jcad418Ya8JeTOeYirHy9sQ9O5bXuyfbpHZhdeiyjkqpqRjlfTvG77KAtmfrn/ayaa1Lrc52OuZL3HTMJMklSqlZloUTrfVtSqm/Yvwfp2H6hV8qpe7TWt9xdNV0D631a0qpTzA+7qdacl4LrFJKne1Oh+gNMVzsc9XfehrFw9XXgZ7qNzo7pzttLRJjHQzBWOy/w1hBWzAvnu4uZOOqzXdZb631Y0qp1zHtczrGf/4nSqkXtda2xf4Upk7n0Pn8je/clLeDCJ2kO2sbCmPFvNxFeY5KrDfbhS3/YswkQmcUe1hmd+jtkW5s1+t9zFwPZzhrT87qdTTXvqf7hG6NN3jpuVJKpWPmMlRg5mFux3xd0Ji5HIFdldFL8cO8ZNziIk8FgNb6c6XUYIwRZQbGwLAQ2GTNBah0dSK3FX/rs+xqjLWgAPM2HmoJUaaUuhbzNvKLTgvpQSz5ZmPcOH7ksG+WQ/b9GH/gsW4U7YmlcD/mIe7gamDJl4DxX/QmO4HhSil/e6uoUso2sdGZBchdXNXdk/O6KudyzISpc+ytskqpc49O5B7H7fbgYZv0BQsw8w1m6fYTsCLoaJHFus8fWxtKqXEYl45f0ebygDYTqx4FHrXcCz4AblNK/VFr7Wn4O4/at9a6HDOJeJlSSmE+6/8c89n/dTx7nu1lOE0pFW5v9VdKhWAsl/auCs1KqSpMX+iIs699Pck+TGSIYU72OUvrSc7CWESv0Fq3m+RtTfg7ZmitizFupUstl5AXgYVKqYcsl6V8zHygAq11V9ZDW/sbTkdrqLOvnhU4GR9w3jbyMddtjfZueEebca6r8c9W91o3v8R7gu26ObsWOQ55joZ9GHfZ4S7K9zb7MS+zEV64Xj157bvz9bM7ePJcuZLxIozuOcvejcvq7+NpczntLp7oic7w9DrnY4IVfOTOF2rr69cr1oYyC4s+glkDxdEdsh2eWBt/h/HJm2ptjm+Qb2Buqq+wKQXt5FJKJWGiSbRiKRAvYfyBr3QsyGpANmoBf+XG6muWr/rbwESllOO1uMOS7fWuyvGQNzAD6iKH9Bswykd3zmdTcpwpMZ6c11U5zZgHxN46GIj5lNUbqcV99xy326SP6MxKcycdZXYWQcMWDjXWyhNlKVKtWL6rW63yjsatya12ppQKUEq1e1mxOk/bZ9pYK60Zoww7a4ud8SbGivQzh/Sb6PiZGUwHfrL1YoAlXxztI4P1OFZ/9C9MNLFWv1erf/v5sZSFzp+F2Rif8x5HKRVq5+cOtF4jm0XV1iZsLyb3OZvPopSyd0ewLS602D6vUmoixhLnyHaMz/Z4u7x+mEhujvwNY5y718k+Rzk8YT3mmbxWmRVoHcu13aN3MV8ob1cmWo1jvn6WkeBo+BJjsb5GKZVgV2YQxnjYQjcWbrLu6zuY+RzT7MpXuLaoHjXWOZdjnrcLnOWxr2sX9OS1dzUe9yRuP1dd9NNO+xLMmOAy0pMneKgnOsPT6/w3jI79U2c77a9PJ+PxenfP54mrz3mYSShfWoOYIwWYEHM+QWtdqZT6CLhSKVWPmaCYhmkMOzAhAO25AxNN6DnL+roG8yI0ztp/lfX3C6uMJ5VS72F8Uf+jtXa07ti4DRPC8S2l1ONY1kKMj/fHmNnk3uR+zBvwU0qpXOAbzIx6W5z6o5nEZ2MtVjQTZSZrHgJ2aK2/9PC8rsp5BeOr965S6g2MpXkhPlrRzg2+AGYppf6XtugTH9r83O05ijZ5rHkN4270vlJqKWZy2EyML+ZBh7zPWYPWBxjLZigmmkoobX6oZwGPK6Vepe3zay5Gaf9cH12INXfbWTSwRym1AqPsH8BYUW/EWFntQ/h9Acy03MwKgWbtOozr05iQakusz6v/xSirc3Hu2/oYJmTlSqXUi5gXnuutvO4O/N7iVxiDzAdKqcdoC+dp68OPlfXvU4zv6sPWNSzG3MeFmM/7HRTQHiAH+NBy9dmEaeM5mDayAytMs9b6P0qp32LCDa5XStlCTg7EtOezseZ1aK2/U0o9iXmmP1RKvYZxg70J01YdrYVPYpT8FUqpRzDjySWYL2/t0Fq/ZL0Y/Y/V9t/FrKGRjAnrmMpRBAfQWrcoE4L1Q+BLpdTTmGcpBuMi9xbwF611rVLqCkw/sU0p9Rxm8mQMxpI+F9OWVh+FDE1KqZ9gXAq/tNwDD2FCwU7CRH7pjsUfzBh/NvCe1V8XY75Men0ulx23ASdhwlO+jOlrGoF0jIvLFxj3Q5f05LXH9XjcY3jyXFl01k+/gwkp/aKlY1VhXAVn4rw/7g7u6onOsHl3PKiUWo7RaTZqrTubY/InTF/9Z8twvArzBSkVo1PWYMZYgHyl1GeYe1mCCRl7vXUOV2OZQbsfzqkeK1wa5sFpAU63238jcMTd8hzKPg3TEN1ewKuT/f0xs+D3Yj7zbcQoCJ0tlhCD8cWzLbRRhhmgLrLL42/dENvCOhr3FvB6EaN8NFjl30vnC3g5C/fUIYyfi+uSgBlQijGdTBHOFzjyKJyndczVGOtQAx1DoLl1XlflWNf3Tusa1WHCgt2PCc3VTlZP5KeLBbyc5HcW3stZGLBwzAJVB2gL1+dqAS+322Rn7bST+jkNM9tFHZ2FhryItsWBbAvNJDvmxcStfstKty3M9TFwoV2ewZjJv1swnVQtRqG4G7vwqS7q1Nlz2mU7w0xMvh9jSSy32lIBRmkf7FDeMMwLTLV1PncW8Iq37nsFZqB0uoCXlVdhFIA9mPa+GWPtdxXOs0Mf4OKeOe0bOrv3tK05YL+A12Arr8vQll3cF1ehS509C2Mw/s+VVvv4GKPAdha6s8u0ruRw8iw+glHIKzHPYz7ms3iik/znW+3koNXm92CU7+sc8vljlJk9Vrv7lk4W8LLyn2vJ0GC16d/TFha0Q99mtZ3VVns9YrXrV4CL7fJ02je6kCMb87zvo20Br9eAsQ75RmHGM9sif/sxL0m/AmLcaD+uQiDPsNpmjVW39Zi5g26X0cW5x9C2eF0Fxurc5QJeXZ23s2tq7QvDxFn/zqpTDaZPfAq7heZwo79399q7kNNpu8DFuN6JHF4Zbzx8rjrtpzE6o20RsIMYT4scZ9ehkzS3wnla6e7oiZ0dezvmeW20vw+d3XvMl+X/wSwqeMja8q12e6Zdvjswc6ZKrXtYiJlPONbxejvblFVIlyil9gDLtNa/siz+pZYgK639SzGrCR5r31FBEATBAyzXny+AW7TWnU1EFLqBUup3GAUtRWtd5Gt5BEEQwDMf/3cx/ngd/Aqtz5BX0A2fPEEQBMH7OPq1W76pv7R+ftDxCEEQBOF4xRMf/yUY/7gNmAl3GrjM8hW8BPMJ6phGZxAEQRC65Ful1L8xLii2ZeRPBl7UWn/jU8kEQRCEY4rbir/WukSZuN+PYxZbUpiJDRqzXPkPtQmlJwiCIPQe3sTErb8C0+fvxLig/MGXQgmCIAjHHrd9/NsdpFQsZuKFwkyacLWyoCAIgiAIgiAIPuaoFH9BEARBEARBEPoWnqzcewlmdVXHhXRs+58F3tJae3uBKq8THx+v09PTfS2GIAiCIAiCcJzz1VdflWmt+/taDvBscu9PMDHWO0NhVhzr9Yp/eno669at87UYgiAIgiAIwnGOUqqzRV+POZ6E88zBrDzaGRusPIIgCIIgCIIg9DI8UfzDMCvXdkYLENE9cQRBEARBEARB6Ak8Ufx3ASe52H8SZonmXotS6jyl1NKqqipfiyIIgiAIgiAIxxRPfPxfB25VSr2vtX7efodS6gpgHvAnbwrnbbTWbwFv5ebmXue4r7GxkaKiIurq6nwgWd8mJCSE5ORkAgMDfS2KIAiCIAiC0AmeKP73AxcCzyqlfgZ8baWPBUYB+cC93hXv2FFUVERERATp6emYFe0Fd9BaU15eTlFRERkZGb4WRxAEQRAEQegEt119tNbVGHeeZ4B0zCqQV1j//xU4SWvdZ31o6urqiIuLE6XfQ5RSxMXFyZcSQRAEQRCEXo4nFn+01geB65VSNwADrOT9WusWr0vmA0TpPzrkugmCIAiCIPR+PJnc24rWukVrvdfajgul39e8/vrrjB07tt3m5+fHe++91+WxBQUFTJ48maysLObPn09DQ4PTfPfddx9ZWVkMGzaM999/H4DCwkJmzJhBTk4OI0aM4JFHHvFqvQRBEARBEITegdJae3aAUplAFhCHWbSrHVrr5d4Rzfsopc4DzsvKyrouPz+/3b4tW7aQnZ3tG8GcsHTpUl588UU+/vhj/Pxcv5/NmzePuXPnkpeXxw033MCYMWO48cYb2+XZvHkzl156KWvXrqWkpIQzzzyT7du3c+DAAfbu3cv48eOpqalhwoQJvPHGG+TkeLYkQ2+7foIgCIIgCL0BpdRXWutcX8sBHlj8lVL9lVJvYybxvge8CLzgsC3rCSG9hdb6La319VFRUb4WxSXbt29nyZIlLFu2rEulX2vNypUrufjiiwG48soreeONNzrke/PNN8nLyyM4OJiMjAyysrJYu3YtAwcOZPz48QBERESQnZ1NcXGx9yslCIIgCIIg+BRPfPwfA2ZjJvKuBMp7RKJewvyn/tMh7dzRA7l8ajpHGpq56rm1HfZfPCGZS3JTqDjUwI0vtF/k+B8/nOrWeRsbG1mwYAEPPfQQqamp1NTUMG3aNKd5ly9fTkJCAtHR0QQEmFuZnJzsVHEvLi5mypQprb+d5du1axcbNmxg8uTJbskqCIIgCIIg9B08UfxnAku11jd2mVM4au666y5GjBjB/PnzAWOF//rrrzvNX1ZW5pXz1tbWctFFF/Hwww8TGRnplTIFQRAEQRCE3oMnir8fsL6nBOltuLLQ9wvyd7k/NizIbQu/PatWreLVV19l/fq2y9yVxT87O5vKykqampoICAigqKiIpKSkDnmTkpIoLCxs/W2fr7GxkYsuuoiFCxcyd+5cj+UWBEEQBEEQej+eKP6fA6N7SpATnYMHD7Jo0SKWL19OREREa3pXFn+AGTNm8Morr5CXl8fzzz/PnDlzOuQ5//zzWbBgAYsXL6akpIT8/HwmTZqE1pprrrmG7OxsFi9e7PV6CYIgCIIgCL0DT8J5LgYuVkp11CqFbvPkk09y4MABbrzxxnYhPf/xj390eewDDzzAn/70J7KysigvL+eaa64BYMWKFfz6178GYMSIEcybN4+cnBxmzZrF448/jr+/P59//jnLli1j5cqVred89913e7SugiAIgiAIwrHH7XCeSql/A6nAEGAPsBNodsimtdYzvSphD5Cbm6vXrVvXLk3CUXYPuX6CIAiCIAgd6U3hPD1x9ckBNFBiHTfUSR7PFgU4xtjF8fe1KIIgCIIgCMIxoKDsEOlxoSjVYfmpEw63FX+tdXJPCnIs0Fq/BbyVm5t7na9lEQRBEARBELpPaU09n+WXsqfiMHsqDlNo/X1i4XgmpMWysaiSiJAA4sODfS2qz/HE4i8IgiAIgiAIx5TDDU38t6CCPeWH2V1+mD0Vh9hdfpifnz2UWSMHUlB2iMUvf4NSMDAyhJTYUKYP6U9YsFFzz8weQKC/J9Naj188VvyVUinAGcAA4O9a6z1KqUCgP1CqtW70soyCIAiCIAjCcUpzi2bbvppWhX6XpdyfP2YQ8yemUl7bwKLnvgQgNMif1NhQMuLDCA8OBGBUUhQf/fxUkqL7ERLo36F82wuA4KHir5S6F7jFOk4DX2Im+oYC24E7gEe9LKMgCIIgCILQh6mtb2JX2SF2lR+y/h5m5KBIrjo5g6aWFs79389osWaKxoQGkhYXhsL45A+K7scrN0wlNS6U/uHBHXz1+wX5M7h/+LGuUp/EbasVX08AACAASURBVMVfKXUdcDvwBPA20BrzUWtdpZR6CzgfUfwFQRAEQRBOOGrqGtldfpiCMqPcR4QEcNXJGQDM+OMqSmvqW/MOiAwmLjwIgOAAf566PJfEyBBS40KJ6hfYrlx/P0Vueuyxq8hxjCcW/x8Db2qtb1JKxTnZ/w1wk3fEOvF4/fXXueeee9qlbdy4kXfeeYfZs2e7PLagoIC8vDzKy8uZMGECy5YtIygoqEO+++67j2eeeQZ/f38effRRZs40kVevvvpq3n77bRISEvjuu++8VylBEARBEI4r6hqbW5X72vomLp5gYr9c8exaPt1e2i7vKVnxrYr/HecMJyTAn/T4MNLiQgkNaq+CnpUz4NhU4ATHE8V/GPCki/2lQHz3xDlxufDCC7nwwgtbfy9dupQXX3yxVTl3xa233srPfvYz8vLyuOGGG3jmmWe48cYb2+XZvHkzL730Eps2baKkpIQzzzyT7du34+/vz1VXXcVNN93EFVdc4fV6CYIgCILQt2hu0RQdPExhxRFOGWJUu0c+zOfldYWUVB3BtgRUZEgAF41PQinF7JGJTM2MIyM+lPT4MFJj2yv3F47r88Ehjws8UfzrMb78nZEKVHVPHAFg+/btLFmyhDVr1uDn53oWutaalStXsnz5cgCuvPJK7r777g6K/5tvvkleXh7BwcFkZGSQlZXF2rVrmTp1KtOnT2fXrl09VR1BEARBEHohVYcbCQ8JwN9P8eHm/fzzq0J2lpoJtg3NLQBsumcmYcEBxIYFkpseQ0Z8MhnxYWTGh5Me3xYb/9JJqb6siuAmnij+a4ELgD857lBKBQOXAZ97Sa4ewaMFvJ77Qdd5hs6Ek29uyz92AYxbCIfK4WUH6/mid9ySsbGxkQULFvDQQw+RmppKTU0N06ZNc5p3+fLlJCQkEB0dTUCAuZXJyckUFxd3yFtcXMyUKVNaf3eWTxAEQRCE449dZYf49+Z97DhwiJ1ltewsPUT5oQY+XHwqWQnh7K+pI/9ALZnx4ZyenUBmfBiZ/cMJCjAGyMunpnP51HTfVkLoNp4o/g8B7yqlngOes9L6K6XOAJZgLP6Xe1k+r9IXFvC66667GDFiBPPnzwcgIiKCr7/+utP8ZWVlx0o0QRAEQRB6KfVNzeTvr2VHaS3fH2jblswZydTBcWzfX8Pv391KXFgQmf3DODN7AJn9w4jsZ1TBhZPTWDg5zce1EHoaT1bufV8pdRPwZ8Bmzl5u/W0EbtRar/GyfL7DTQu90/xhcZ4fD6xatYpXX32V9evXt6Z1ZfHPzs6msrKSpqYmAgICKCoqIikpqUPepKQkCgsLW393lk8QBEEQhN5LeW29UeotBf+M4QM4ZUg82/fVct5jqwETBSctNtSy2BtXnOlD+/P1r88iOrRj8A/hxMGjOP5a678opVYA84DhgALygX9orff0gHwnDAcPHmTRokUsX76ciIiI1vSuLP4AM2bM4JVXXiEvL4/nn3+eOXPmdMhz/vnns2DBAhYvXkxJSQn5+flMmjTJ6/UQBEEQBKH7VB1pJH9/DSGB/oxMiqLqcCOnP7SK8kMNrXlCAv1IiQnllCHxDBkQzl8WjmdwQjhpcaEEB7RfyCok0N/p4lbCiYXHS5lprYsxVn/Bizz55JMcOHCgw6Tc22+/vdXtpzMeeOAB8vLyuPPOOxk3bhzXXHMNACtWrGDdunUsWbKEESNGMG/ePHJycggICODxxx/H3990AJdeeimrVq2irKyM5ORk7rnnntYyBEEQBEHoOZpbNP5+xir/4Ptb+ba4mvz9NeytqgNgzthBPJI3jsh+AZw7eiApsaFkJYSTlRDOoKh++FnHhgT6M3vUQJ/VQ+gbKG2LyXQCkZubq9etW9cubcuWLWRnZ/tIor6PXD9BEARBcE3l4Qa+La5iY1EV3xVXsamkmqTofvz9ehN8Y87jn9PU3MKwAREMGRDBsMRwsgdGMjCqn48lF7qDUuorrXWur+UAz1bu/bcb2bTWuuvA84IgCIIgCMcxBw8ZJX9PxWEum2Imzd780teti1ylxoYyMimSCWltK9K+8aOTWsNjCkJP4ImrTw7g+HkgAEjA+PpXAIe9JJcgCIIgCEKfYuXW/fxzXRHfFldRdPAIAH4K5o5PIjQogJtmZPHD6ZmMHBRFVGhgh+NF6Rd6Gk+i+jhdck0pFQr8HFgInOoluQRBEARBEHoddY3NbCqp4uvCKjYWVbKxqIq/XT2JlNhQCiuOsKmkmjHJ0Vw2JY1RSVGMHBTVuoLtpIzYLkoXhJ7F48m9jmitDwO/VUoNx8T6v6zbUgmCIAiCIPiYxuYWtu+voX9EMAkRIazadoBrnl9Hc4txgBgYFcKY5Gjqm8wqt1dMTePKk9J9KLEguKbbir8dnwG/92J5giAIgiAIx4zDDU28vXEvW/ZWt07ArW9q4e7zcrjq5AyGJ0byo9MGMzo5mjHJUSREhrQ7Xlx1hN6ONxX/NKBXrwqhlDoPOC8rK8vXogiCIAiC4AO01uytqmPrvmq27K1h674aJqRGc9XJGWgNv3xlIyGBfowcFMVlU9IYnRzFlMw4ABKjQvj52cN8XANBOHo8ieozqJNdscCZwE+BT70hVE+htX4LeCs3N/c6X8viyOuvv84999zTLm3jxo288847zJ492+WxBQUF5OXlUV5ezoQJE1i2bBlBQR3fwe677z6eeeYZ/P39efTRR5k50wRg+te//sVPf/pTmpubufbaa7ntttsAWLhwIevWrSMwMJBJkybx1FNPERjYcTKSIAiCIPRGjjQ0s31/DXWNzUy2lPdTH1zFnoq2WCTJMf0YkhAOQFhwAJ/eMoOkmH6tsfUF4XjC7Tj+SqkWOkb1ad0NfA+cq7Xe7iXZeoy+EMd/6dKlvPjii3z88cf4+fm5zDtv3jzmzp1LXl4eN9xwA2PGjOmwENjmzZu59NJLWbt2LSUlJZx55pls325u1dChQ/nggw9ITk5m4sSJ/P3vfycnJ4d333239aVjwYIFTJ8+vUO5Nnrb9RMEQRBOHLTWrW42y77Yzer8Urbtq2F3xWG0hhGDInnn5mkAPPXJDkKD/Bk+MJJhiRFEhohB67jmcAXUVUFshs9E6JNx/DH++46Kv8aE8dwOvK+1bvaWYCcy27dvZ8mSJaxZs6ZLpV9rzcqVK1m+fDkAV155JXfffXcHBf3NN98kLy+P4OBgMjIyyMrKYu3atQBkZWWRmZkJQF5eHm+++SY5OTmcc845rcdPmjSJoqIib1ZTEARBEDymvLaeTSXVbNtn3HS27a+m8nAjq289HYB1uyrIP1BLzqBILhyXzLDECHIGRrYe/8NTB/tKdKEnaG6C6mI4WAAHd0FFATQegXP+YPb/8ypoOATXfeRLKXsNnoTzvLMnBelNPLD2AbZWbPVqmcNjh3PrpFu7zNfY2MiCBQt46KGHSE1NpaamhmnTpjnNu3z5chISEoiOjiYgwNzK5ORkiouLO+QtLi5mypQprb/t86WkpLRL/+9//9tBpmXLlvHII490XVFBEARB8AJ1jc18f6CWLXur2bqvhl/OGkZwgD9/WbWDp1cXANA/IpjhiRFMyYijsbmFQH8/Hp4/VibZHm801UNAsPl/y1uw42Oj5B8sgMo90NLUltcvEOKHgtagFJzyM9AtPhG7N+LNyb2CF7jrrrsYMWIE8+fPByAiIoKvv/660/xlZWU9LtOPfvQjpk+f3ukLiCAIgiAcLVprDtTUExkSSL8gf1Zu3c/9721lR+mh1rCZIYF+XDoplayEcOZPTOH07ASGJ0YSG9ZxPpso/X2U+hpjra/YabaJ10JIJKx+GFb+Fu7YCwFBUPAZfPcKxGTAwDGQcwHEpBtXnpgMiBwEfv5t5Q6e4bMq9UY8mdy74GhOoLVefjTH+RJ3LPM9wapVq3j11VdZv359a1pXFv/s7GwqKytpamoiICCAoqIikpKSOuRNSkqisLCw9bd9vs7SAe655x5KS0t56qmnul0/QRAEQTh4qIGPth5gc0m1FVmnmoOHG3n2qlxOHz6AiJBAUmJCOTsnkeEDI8geGEl6XFjrZNshAyIYMiDCx7UQjprqEti9xlLyd7Qp+odK2+cbPAMGjYOUyXDqrdDSCATBzHvb3HgEj/HE4v8C7X38ba/UztKw29fnFH9fcPDgQRYtWsTy5cuJiGjr0Lqy+APMmDGDV155hby8PJ5//nnmzJnTIc/555/PggULWLx4MSUlJeTn5zNp0iS01uTn51NQUEBSUhIvvfRS63yBp59+mvfff5+PPvqoy7kGgiAIgmBP1ZFGtuytZnNJNZv3VnNWzgBmjkiktLaeX/zzG0IC/Rg2IIKZIxLJHhjJUEuZn5gey8SrZIXbPkt9jVHkwwdARCLs3wRvL4ZZv4ekCUbpf/UakzdiEMRmwtBZ5m/rlgHBli6UNtVsNvxlMnZ38ETxn42Z4JsAPAVsttJHANcD+4FfAU1OjxZc8uSTT3LgwIEOk3Jvv/32VrefznjggQfIy8vjzjvvZNy4cVxzjXmgVqxYwbp161iyZAkjRoxg3rx55OTkEBAQwOOPP46/v/kU9thjjzFz5kyam5u5+uqrGTFiBAA33HADaWlpTJ1qHri5c+fy61//2ttVFwRBEPowWmuKK4/Q0NRCZv9wjjQ0c9afP6Ho4JHWPPHhQYxKigIgMz6MDxefSkZ8mITM7Ks01Rsf+/Lv7bYd5m/tfpNn1v0w5UYICjOuN82NJn3w6XDD50a5DwrzWRVOVDwJ5/kbYD4wRWtd7bAvGvgP8Het9RKvS+ll+kI4z76GXD9BEIQTh/e+3cuGwkq+K65iU0k1VUcamTliAE9dbiIW3vnGtwyK7kfOwEhyBkWSEBHSRYlCr6WlBdY9A/2HQcZ0qCqGh0e2nzAb1h/isiB2MMRlmr/JuRCV7Du5exF9NZzn1cBjjko/gNa6Uin1HPAjoNcr/oIgCIIguKahqYXt+2vYVGKU+6YWze8vHAXAk5/uZMveaoYnRnDOqERyBkUxLiW69djfXTDKV2ILnlJfayz1ZflQth3K883/A8fABU+Anx+sus9Mos2Ybtx3pt9iKflZEDcY+kV3fR6hV+CJ4p9ARx9+exQwoHviCIIgCIJwrLGFzhxpueMseWszy77YRWOz8QoIC/JnQnqb3/1fL59ATFgQgf4y/6tP0NIC9VXQL8b8XnkvFK01Cn61XQhw5QfRaSYc5oARbek//hJCrfvv5w8z7jh2sgtexRPFfxtwrVJqqda60n6HUioGuNbKIwiCIAhCL2Z3+SE+3V7Kt8VVfFtcTf7+GppaNN/8+myiQgMZkxJFUEAmIwZFMjIpirTYUPzs/PETIsV1p1fS1GAi5ZRtN9FzpljzBv95BZTvhB+tMb/3fWsm4aZPg/gh1jbUTKy1xcu3Jyzu2NVB6FE8UfyXAP8EtiilnqFNyR+OcQNKAC7xrnjHFvslvwX3cXeeiCAIgnBsqWtsZuu+Gr4tquTb4ip+PCOLtLgwPv++nLve3ERMaCAjk6KYMSyTUUlRBAUYC/6csUnMGetj4YXOqa+B0u1Qtg1Kt1luOttMiEzdbPIoP5hwFQT2gzEL4HB52/ELXvKJ2ILv8WTl3teUUnnAw8AdmFCdNi15L7BAa/2a90X0Hkqp84DzsrKyOuwLCQmhvLycuLg4Uf49QGtNeXk5ISFi/REEQfAljc0tNDVr+gX5s7mkmlte+YZt+4wlHyA2LIg5Y5NIiwvjnFGJTB8aT1J0PxnzejO21WdLvoZvXoIz7jKRcD79I3z+sMnjF2j87BNyYMSFxnIfP9RY8QP7mTzDz/FdHYRehdtRfVoPUMofmARkWkk7gbVa214xez/Oovo0NjZSVFREXV2dj6Tqu4SEhJCcnExgoMTWFQRBOBZordlZdoiNRZV8U1jFxqJKNpVU84uzh3Hd9EwOVNex+OVvGJ0cxejkKEYmRYmS35s5VA6lW6F0i7Hgl26FA1vh4mchYxpsXgGv3wDXrYSE4SY2/sFdED8MYtIktn0vpzdF9fFY8T8ecKb4C4IgCEJvZV9VHV8XHiQ40J8ZwxKoa2xm5G/ep6lF0y/Qn5FJkYxOjmb2yERy02Xxq15JUwO0NEFQqHHJ+fxhE/v+wBY4XNaWLyjChM7sPxwmX2+i6zQ3GdcdWUyzT9KbFH9PfPwBUEqdBJyNieDzsNZ6m1IqHBgNbNJaV3lZRkEQBEE44Xjhi918/n0ZG/ZUsq/afI0+OSuOGcMSCAn057EF40mPDyWrfzgBEl2nd9DSAtVFbQtaxQ02C1bVlsJDQ2H2H2DSdWYxq80rTDjMYbMhIbtN2Y9MMu499vh7rK4JglPcbklKKT9gGZCH8e3XmMm+2zCr9b4DPADc730xBUEQBOH4o6VFs7Oslg17KtlQWEnl4QaeWDgBgA8276eg7BCTM2MZmxLN2JRocgZFth47a2Sir8Q+cbH53GsNG1+GqkITDrOqCCr3GEt+c31b/nGXG8U/LB5OvRWSxpv0+CFwa4Fv6iCc0HjyCvlLjNJ/K/Ae8K1th9a6Tin1OvADRPEXBEEQBKdUHW4ksl8ASin+smoHT6z6npq6JgAiggMYlxZDU3MLAf5+/PWK3NYoO8IxoqkeKnaaKDlVRRAYArlXm31Pn2X86S962ij/790CdVUQGmes9LGDYchZ1qJW1hZuLW+kFJx2W9t5ZK6F4CM8UfyvApZprf+olHIW0HULMNsrUgmCIAhCH6elRbOjtJavdh9k/Z6DrN9TyfcHavnslzNIiQ0lNTaU88YMYmxKNONTo8mMD28XK1+U/h6meD3s22iFwrRWra3cDbqlLU/iqDbFf/gPjOXexg8/g7D+xmdfEPoInij+6cBDLvYfBGK6JY0gCIIg9FFq6hr5urCSwf3DGRTdj/e+28ePl68HIDo0kPGpMVwwdhDBgUah/8Hogfxg9EBfinx809ICVXsgJt38Xvcs7FgJ818wv1fdD/nvQ0AIxA2BQeNg9DwTCjMuC6JT21a6BTjlf9qXH5N2TKohCN7EE8W/FteKfRZQ5mK/IAiCIBw3HGlo5l+b9vLlroOs332Qbftr0Bp+c14Oi07OYHJmLA9ePJrxaTFkxodJKM2epLYUDmyC/ZvN3wNbTDjMxkNwy06z8mxTvXHNaWkGP3+YeS+c8yBEpUi0HOGEwRPF/3NgIfAHxx1KqWhgEfBvL8klCIIgCL2G5hbNlr3VrNtVQUJkCOeMGkiz1vz85W8ICwpgbGo0s0YmMiEthrEp0QDEhwdzSW6KjyU/zqivBf8gCAiC/A9hzSNG2bcPhxkaDwNyYPwVJlqOLcb9lBvNZiN+yLGVXRB6AZ4o/vcCnymlPgSes9JGKqUygNuBCGRiryAIgnAc8ddPd/Jpfikb9lRSW28m4Z47eiDnjBpIeHAAHyw+lfS4MPz9xJrvVVpaoHKXWagqIceExSz4DJ4/F656B9JPMTHxGw7BsFmQMMIo+wk5EJ7ga+kFodfituKvtV6rlLoEeBr4m5X8Z0xoz3LgIq31Ju+LKAiCIAg9y8FDDXy5q4K1BRVUHGrgT/PHAvBpfimlNfVcMG4QE9NjyU2PJSm6X+txg/uH+0rk44e6aqPg7//O+rsJDmyGhlqz/8x7jH99QjbM+BVEDjLpw2aZTRAEt/FoRQit9QqlVBowE8jGKP35wLta60M9IJ8gCIIg9Bj/+HIPz67exbb9NYCJpDMhNYbmFo2/n+K5qybK4ljepKLARM2JGwyHK2DpqSb+vY2QKBgwCsYuhAEjIHEk9M82+8Li4dRf+kZuQThO8HgpOK31EeANaxMEQRCEXo3WmsKKI/y3oJy1BRWs3VXBS9dPYWCUsdwPiArh/LGDmJQRy+jkKIID/FuPFaX/KGk8YibY7v8OUDD+cpP+7CwYPAMufNJEzEmfZl4CBow0ir6zVWsFQfAanqzcq4BArXWDXVokZlJvLPCyuPoIgiAIvkZrTVOLJtDfj7UFFdz89w3sq64DICY0kInpsRxuaAZg/sRU5k9M9aW4fZ9DZSYe/r5v27ayfNDmGpM4uk3xn/NYm6uOUnDBE76RWRBOUDyx+C8FTgZyAJRSAZhIPyOs/bcopaZorTd6V0RBEARB6BytNbvLD/OfneX8Z0c5X+ws5ydnDOHyKWkkxfRjUkYsEzNimZwRS1b/9otkCR5Ss89Y8gfPML//uQg2vda2PzLZLHqVfb5x00kcBdHpbfuHnHVMxRUEoT2eKP6n0N695yKM0v9TYAPwInAbsMBr0gmCIAiCEw43NBEaFEBdYzNnPPQJxZVHAOgfEczUzDgy48MASIrux6OXjvOlqH2TlmYo/x72boR938Cpt0JwBKz9K6z+M9xRDIH9zGq2SeONVT9xFITG+lpyQRBc4IniPwgosPt9LrBFa/2/AEqppcD1XpRNEARBEADYW3WENd+Xt1r1sxLCef7qSYQE+vOD0QNJiQ1lamYcg/vLQlke09wEZdth79dQsgH2fmPcdRoPm/3+wTDqEhg4BsYthKGzwM+KjT/qYt/JLQiCx3ii+Ctrs3Ea7b8AlAADvCCTIAiCcIJTU9dIRIhRLm/++wZWfFMCQHRoIFMy4pgxvH9r3jvOyfaJjH2SlmYo3WZi3YfFw/cfwkuXQZP5YkJQuOWTfyUMHG2U/fihbYtgxWaaTRCEPokniv8u4GzgKaXUVMwXgI/t9g8CqrwnmiAIgnCiUFvfxNqCctZ8X87nO8rZcaCWr39zFqFBAZyRncDo5CimDo4jOzFSfPTdxabk7/0aotMg/WSoKoS/TIVz/wy5V0PcEMhdBAPHwqCxEJcFfv5dly0IQp/EE8X/eeBBpdTXQApQCrxvt38SsNWLsnkdpdR5wHlZWVm+FkUQBOGEpq6xGaUgOMCf19YX8ctXNtLUolvj6N98RhaNzRqAOWOTfCxtH0BrqNhpXHWK10PJeuOyY3PXGXe5Ufyj02Du05B2kkmPSYNZ9/lObkEQjilKa+1eRuM0eTdwAcayf5vWeo21Lw6zkNcftNb394yo3iM3N1evW7fO12IIgiCcMGit2bK3htXfl/JZfhlrCyp4eP5YZo8aSP7+Gl7fUMzJWfFMSIshJFAszi7R2qxqGxxhfv99AexeDXXWR/eAEOOukzQeBo0zm1jyBcFnKKW+0lrn+loO8EDxP54QxV8QBKHnaWpuIcDfj9KaemY/8hlltfUADEkI55Qh8VwyIYWcQZE+lrIPcLjCTL5NnWJ+v7QQavbCdSvN7zdvMkr9oPFG2e8/vM0nXxAEn9ObFH+PV+4VBEEQBGccaWjmvwXlrM4v47P8MkYmRfHQvDHEhwcxe2Qio5OjmDakP4lRIb4WtffSWGci6hR/ZW3rjAuPXwDcXmRCaI6cC3XVbcfMecx38gqC0KcQxV8QBEHoNre+spHXNxTT0NxCUIAfk9JjmZAWA4BSit9eMNLHEvZiCr+Ejf8wSv6+76Cl0aRHDDIW/PFXQNIEo/wDjLzId7IKgtCnEcVfEARBcJuDhxr47PsyPtlWyrfFlbz30+n4+yky+odx5UlpTBvSn4npsfQLEn/yDmgNSplFsT74Ncz+A/QfCmXb4Ju/G1/8qT+G5Fyj6EcO8rXEgiAcZ4jiLwiCIHTJJ9tLefjD7XxTWEmLNvH0pw3pT01dI9GhQdxw6mBfi9i7aGmGA1ugaC0UrYPCtXDyzcZ6HxgKh8rgSIXJO+oSGHOpTL4VBKHHEcVfEARBaMeBmjo+217GJ9tLWXRyOuNSY/BXihYNPzl9CKcO68+Y5Gj8JZ5+G4fKjatO4Vqj7BevN5F3AELjIHkShFtrXMZnwY2r244NCD728gqCcEIiir8gCIJATV0jSz/dycqtB9hUYiaOxocHMWtkIuOAU4bEc8qQeN8K2Zso3Qb1tZA8AZoa4E/Z0FwPyh8SR8KYPKPsp0yEmAzj4iMIguBjRPEXBEE4Aampa+Sz/DK0hh+MHkhwgD/Pr9nF8MRIbpk5jFOH9idnoKySC0DDIWPBr9wD4xaatDdvAuUH17wPAUFw3sMQnWr89IPCfCuvIAhCJ3ik+CulJgI3AUOAOMBxRNBa62Fekk0QBEHwIrvKDvHhlv2s3HqAtQUVNLVoJqTF8IPRAwkK8GPtr86UxbMAqktgzxdQ+F+z7fsWWprMwlijLjGK/uz7ISS67ZixC3wnryAIgpu4rfgrpS4Dngeage+BAz0llCAIgtB9Gptb2FhUyYS0WAAefH8b73y7l6EDwrl2WiZnZCcwLqVNeT2hlf6CT2H9MqPwV+0xaQH9THSdk38KKZMheaJR+sGkC4Ig9DE8sfjfCeQDZ2mtC3tIHkEQBKEbVNc1smpbKf/etI9PtpVSU9/Ep7fMIDUulJ+dNZTbZg8nJTbU12L6nn3fwse/h5m/h9gMKN8BO1dB2lSYciOkTobE0bICriAIxxWeKP7pwC9F6RcEQehdaK1RSvHp9lKuef5LGps18eFBnDNqIGdkJ5AQaaLGZCWE+1hSH1Bfa6Ls7PkCdq+B3EVmASy/ADNBt2afUfzHXQ4TrpJJuIIgHNd4ovgXA2L6EARB8DFaa7bvr+Xfm/bxwZb9zB2XxFUnZzAyKYqrT8ng7JwBjE2JOTHDbR6ptJT81bDrc9j7DehmMxE3cZRZRAsgIRtuXt92nL/EuhAE4fjHk57uKWChUuphrXVzTwkkCIIgOEdrzX3vbeVf3+1jT8VhAMamRBMbbiz6sWFB3D4725ciHnuaG407TkszPHOWib6DBv8gSMqFU35m3HeSJ0FIpK+lFQThGNGiWzhw+ABFNUUU1RahUMzJmuNrsXyOJ4r/f4ALgf8opR4DCjATfduhtV7jJdkEQRBOaBqaWvh8Rxk7DtRy7bRMlFJsKqkis38YPzw1kzOzBzAgMsTXYh5b6qrbFPhXroZDpXDlW2bV/RaQ7AAAIABJREFU20HjYMjZkHYyJOdCYD/fyioIQo9S21BLcW1xq3JfWFNIUW0RxTXFFNcW09jS2Jo3LTJNFH88U/w/sfv/OSf7FaCBEzgshCAIQveoa2zmk+2l/Ou7fXy4ZT81dU3EhAZy2ZQ0QgL9WXb15BMrtv7hCtj1Gez8BHathqoiuG23sfKnT2tbHRfgBw/5Tk5BELyOzWpfWFNIUY1R7G3/F9UWUVlf2S5/RGAEyRHJDIkZwozUGSSHJ5MckUxyeDIDwwb6qBa9C08U/+sxir0gCILgRQ7VNxHgrwgO8Oe5z3fxwL+2EtUvkFkjEpk9KpGTs+IJDjA2leNe6a+vhT3/MRF2Cj410XfQEBhmXHbGXgpN9Ubxz13ka2kFQegm9c31FNcUt1rrbcp9YU0hxTXFNLQ0tOb1V/4MDBtIckQyZ6Wd1arUJ0UkkRyeTFRwlA9r0jdwW/HXWj/dk4IIgiCcSFQdaeSjLft577t9fLq9lD/NG8sPRg/kgnGDGJkUyZTMOAL9/XwtZs/TVG8m3AaGwHevwWvXmcWy/INM7PwZd0DGqZA0XkJrCkIfpa6pjsKaQvbU7GFP9Z52f/cf2o+2syv3C+hHSkQKmVGZnJp8KikRKSRHJJMSnkJieCKBftIPdAcJYyAIgnAMqa5r5CfLN7BmRxmNzZrEyBAunZTaGmpzYFQ/BkYdx77pLc3QcMj46ZfvgL+cBOf/L4yeBwPHwEk/MYp+ymQIkvUGBKGvcKTpiLHUVxeyu2Z3OwV//+H97fJGB0eTGplK7oBcUiNSjWJvKfhxIXEoCavbY3Sq+CulToK2ybq2310hk3sFQRDaOFTfxIdb9lN5uJErT0onIjiAFq1ZdHIGs0YmMjY5+vh33zm4C3Z8DDs/Nu47I+bCuX+CmHSYdD3EDzX54gbDmXf7Tk5BEFzSarmv3tNOud9dvZsDhw+0yxsbEktKRAqTB04mJSKF1IhU0iLTSI4QlxxforR27ravlGrB+PT301o32P3utCxAa617/eTe3NxcvW7dOl+LIQjCcUpdYzOrth3grW/28tHW/dQ1tjBsQAT/+p9pJ4Yl68hBo+DblP2Du0x6ZBJkzoCcOTD0bJ+KKAiCcxqaGyisKWRX9S6j4FfvprCmkN3VuztY7mNDYkmNSCU1MrXtr/V/RFCEj2rQ+1BKfaW1zvW1HODa1cc2mdcWC+m6nhdHEAShb9LQ1EKAn8LPT/Hg+9t4ZnUB8eFBzMtN4dzRg8hNizl+lf6WFvCz5iO89kP49mXQLRAUAemnwJQfGYU/foisjCsIvYDmlmb2Hd7H7qrd7Krexe7q3eyuNv+X1Ja087mPCY4hNTK11XKfFpkmyn0fplOL//GMWPwFQfAGTc0trNlRztsbS/jXd/t4+sqJTMqIZUdpLXsr65iSGUvA8ThB1zZuKAX/XQqf/RF+tslMvl37VxNbP3OGiaUvE3IFwWdU1VdRUFVAQVVBOwV/T/WedtFywgLDSItMIy0yjfTI9Nb/UyNTiQyShe+6S1+x+AuCIAhOqDrSyCMf5rPimxLKausJDw7g7JwBRPYzXerg/uEM7h/uYym9zJGDJpb+jo+MC8/8F2DQWGPFzz7PxNPvFwOT5OOwIBxLWnQLew/tpaCqgJ2VOymoLmhV9ivqKlrzBfgFtFrspyVNa1P0o9JlQu0JhMeKvzItYygQA3QwZcnkXkEQjkcKKw5TXHmEKZlx9Av0551vS5iQFs0FY5OYMTyBkMBeP73JM5qboPgr2LHSKPvFXxn3neBIyJje5rIzeIbZBEHoUeqb69ldvZudVTuNYl9ZQEF1AbuqdlHXXNeaLyo4isyoTE5LOY3MqEwyojJIj0xnUPggAvzE3nui41ELUP/P3p2HV1md6x//rsxkTggkIWEIJGEGgTAqCILghEPV09aBWqdqlZ/WttrayQ7naNXa2tZibaX2HGu1taWV1qqAIAoioMyTzHPIROZ5Z/3+eEMIyJAN7947yb4/17Wv5B32u2/bS/NkZa1nGfN14Ns4Rf/pdLKffiISrEqr6/n3hsP8Y81BVu05Sq/kaN775mQiwkJ4/+FLiAjrhNN4qktg/gOw+z2oLQMMZIyCid+A7KnO95q+I+IzrafnHCvyd5Xt4mDlQZpsEwAGQ4/YHmQlZDE6bXRLgZ+VkEVyVHKA/wmkPWtz4W+M+TLwFLAMeBv4EfBLoBH4MrADeMEHGUVE/O637+3k6Xe20eCxZHeP5Zsz+nPNBT1a/hzeqYr+pU9BWJTTQz8qAUp2OdN3+k2FvpMhWoWEiJuabBNHqo60TMs5NkVnV+kuimuLW+6LCImgd0JvBnUdxFV9r2op7nvH96ZLWCfe70N8xpsR/68CK4FJQDJO4f+GtfZdY8zPgTWAx/2IIiK+Vdvg4cNdxby9MZ+vXNyPrJQYBqbH86Xxfbh2RAaDe8R3nvmvNaXO9J2CzXDJd51zB9dAZHN3jpBQuHdZ4PKJdCLVDdUt03H2lO9p+bq3fC81jTUt98VFxNE3oS+TMie1jN73TehLj9gehIZoIoW4x5vCfxDwXWutNcYcawUUCmCtPWiM+S3wIPCSuxFFRNxXXd/Iv9YfZtGWI7y/vYjqeg8xEaFM7t+NrJQYJuV2Y1Jut0DHPH/WQtF22P42fPo27F0O1gPRXeHCB5yC//MvH2/HKSJn1WSbqG6opqqhiqqGKiobKimrK2tpibmnbA+7y3efsKlViAmhR0wP+iT0YXTaaPrE92kZwdfiWvEXbwp/D1DZ/H1V89eura7vAXJcyOQ1Y8y1wJVAPPCitfadQOQQkfbLWsunRyqprGtkVO8kPE2W78zbQLfYSK4fmcm0QamM65tMZFgnGF1rrId9y2HbW/DpW3B0t3O++2Cn2M+9zGm1eWwkUUW/BLEGTwMFNQXkV+W3vAprCqmor2gp7I8V962PTycuIo6s+CzGpY9rKe77xPehV3wvIkIj/PhPJvJZ3hT++4EsAGttnTHmAHAh8Grz9VFAqbcBjDFzgauAAmvtkFbnLwOexfmrwu+ttU+c7hnW2n8A/zDGJAFPAyr8RYT6xiZW7SlhweYjLNp6hP0lNeT1TuL1eycQFxXOwocupldydOcYaas56nztkgTb/g1/vc2Zt581CSbcDzkzILFnQCOK+Ju1liPVR04o6k84rs6nuKb4hA2rwOlrHx8RT0x4TMv36THpxEbEEh0WTWxELLHhsUSHRxMbHttyT2ZcpkbvpV3zpvBfClwBPNp8/Drw/4wxkThtPb8E/PEcMrwE/Br432MnjDGhwHPApcABYJUx5g2cXwIeP+n9t1trj/0t7bvN7xMR4at/+oSFW44QGRbCRdkp3HtxNlMHdm+53rtrTADTuaChFsKjoKoYfpYLl3wPLnoQsqfBF/4MfS+GiA7+zyjSBtZa8qvy2Vm2k52lO9lRuoNdpbvYWbbzM6Pz0WHRpMWkkRaTRm5yLqnRqc5xtHMuNSaVmHD9eyOdU5t37jXGDACmAnOttTXGmFjgL8BlzbcsAr5grS0+3TPO8Ow+wL+OjfgbY8YDj1lrZzQffxvAWnty0X/s/QZ4AlhgrV14ts/Tzr0inZOnyfKnj/Zy9fAeJEZHsGyHM3f/ouwUukR0gik8TU1OP/1tb8K2/0ByFnzxz861FXOc0f3UwYHNKOJDbS3wu0Z1JTsxm36J/VoWyR4r9mPDYzUiL37VIXfutdZuBba2Oq4ErjDGJAMea22Zi7kycKYWHXMAGHuG+2cD04AEY0y2tfb5k28wxtwN3A3Qq1cvF6OKSHuws7CSh19fz8d7j9LgsdxxURYXZqcEOtb5a6iFXUtg67+cxblVBWBCofcEZ2T/mHH3BiyiiC+U1payvXQ7249ub/m6o3THKQv8q/td3VLo90voR2JUYgCTi7Rf572Fm7W25Ox3+Za19pc4ewqc6Z4XaN5nIC8vr21/5hCRds/TZPn9+7t4ZsGnRIWH8vPPD+faCzICHev87X4fVs+F7e9AfaWzY272NOh/BeRMc+byi3QCtY217Crb5RT4rYr8wprClnsSIhPIScxhZt+Z5CTlqMAXOUdeF/7Nc/p743T0+czfyqy1y13IdRBovQots/mciMgJnnxrK79duovpg1L5yXVD6B4XFehI56am1BnV73+Fs2HWkU2w530Ycj0MvNqZxhOmjiDScVlrOVR1iG0l2/j06Kd8evRTth/dzr6KfS070kaGRtI3oS/je4wnJzGHnCTn1a1LN03PEXGBNzv3RuN0zPkycKqfPgawNPf2P0+rgBxjTBZOwf8F4CYXnisinUCjp4mK2kaSYiL48oVZDM5IYOaw9I5XGJQdhKZGSOrt7Jb7z/vgc7+HYTfCqNtgzF3HW26KdCDVDdXsKN3Bp0c/PaHQr2xwuoIbDJlxmeQm5XJZ1mUtRX6vuF7asErEh7wZ8Z8D3ArMB94HjroRwBjzZ2AykNLcIvQH1toXjTH3A2/j/CIx11q7yY3PE5GObVt+BQ+/vo7oiDBeuWssaQlRXD28R6BjtV3JLtj8T9gy31moO+o2mPks9BgBX1kKacOc+8I76F8uJKgca5e5tWQr20q2se2oU+TvK9/X0iIzJjyG3KRcrux7JblJufRP7k9OYg7R4dEBTi8SfLzp6lMGvG6tvcO3kXzHGDMTmJmdnX3X9u3bAx1HRLzQ4Gnit+/t5NlF24mLCufH1wzhymHpgY7VNqX7YNM82Ph3OLzWOddjBAycCQOvgZTswOYTaYMm28Te8r1sLdnKlpItbC3eytaSrRytOz4O2CuuF7lJueQm5zpFflJ/esT2IMRokzgJXh2yqw/Ozr0f+SqIP1hr5wPz8/Ly7gp0FhFpu/0l1dzz8sdsOlTOlcPS+dHVg+kaGxnoWGe37lVY+Ts42Nw+uMcIuPTHMPhaSFR3MWm/GjwN7CjdcbzIL3GK/JrGGgDCQ8LJTsxmSq8pDEgewMDkgeQm5WoUX6Sd86bwXwyMprkzjoiIvyTFRBAWGsKcm0dy+dB2PMpfWQib/+FM3wkNh6JPwVMHU38Ag69z+u6LtDOV9ZVsO7qtpbjfWrKVHaU7aGxqBJwNrwYkD+C67OucIr/rQPol9CM8NDzAyUXEW95M9emNM7f/p8Dz1lqPL4P5kjbwEukYdhZW0jMpmoiwEKy17XPxbmUhGAMxKc6mWn/+AnzpX5A1ETyNEHreXZNFXGGtpbCm8IQCf2vJVvZXHN82JzkqmQHJA1pG8Qd2HUjPuJ6aqiNyHtrTVJ82F/4AxpgvAC8DjTjddk4u/q21tr978XxDhb9I+7ezsJIbn/+Q6YNSeeL6YYGOc6Lacqf15oa/OptrTfwGXPIdaKyDkt3QfUCgE0qQa7JN7K/Yz+bizWwp2cK2EmdEv6T2+NY7PeN6thT5x15qmynivvZU+HvTzvNW4CWgAdiBS119REROdqS8llkvrsQA91zcL9BxHA21zmZaG/7q7KDrqYPE3nDR12DoDc49YZEq+sXvjhX5m4o2sbl4M5tLNrOleEtL68ywkDByEnOYlDmppcDvn9Sf2IjYACcXEX/z5m/Q3wPWA5dZa4/4KI9PterqE+goInIaZTUNfGnuSkqr63n17vH0SYkJbKA9H8DaP8OWN6CuHGK6OXP4h94ImXnONB8RP2myTewr3+cU+Kco8iNCIshNyuWKrCsY1HUQg7oOIjsxW/PxRQTwrvDPBL7ZUYt+UFcfkY7g639Zx87CSubeNpqhmQn+D2AtHF4H6cOdon7dn52++wNnOiP7WRdr3r74hbWWA5UH2FS0iU3FzuvkIr9/cn+u7HtlS5HfL7Ef4SEq8kXk1Lz56bUdSPJVEBERgK9Pz+X6kRlMzOnmvw9t8oCnwdk0a/1rMO8rcPd70OMCmPoYXPE0hHfxXx4JOsc2wtpYtNEp8puL/fL6cuDEIn9w18EM6jqIvol9VeSLiFe8Kfz/B3jGGDPXWnvIV4FEJPhYa3l/exGTcrsxMD2egenxvv/QsgOw813YschZoDvlOzD2bsiZDlf/GpL7OvfF+vEXEAkaRTVFbCraxMbijS1F/rGFt2EmjJykHC7tfSlDUoYwuOtgTdcREVd4U/j3Aw4BW40xrwO7OXVXn8fdCiciweHZRdv5xcLtzL0tj0sGpPrmQ+qrYe8yp9Df+S4UbXPOx6XDgCshdbBzHJ0MI2/1TQYJStUN1Wwq3sTGoo1sKNrAxqKNHK46DECICaFvQl8mZkxkcMpgBncdTP/k/kSGdoAN6kSkw/Gm8P9Jq+9vO809FlDhLyJt9qeP9vKLhdu5fmQmU/p3d/8DrIVXb4IdC8FTD2FR0HsCjJwF/S6B7gO1QFdc09jUyM7SnWwo2tDy2lm6kybbBEBGbAbDuw3nloG3MDhlMAOTB2q3WxHxG28K/xyfpfATdfURaV/e2pjP9/6xkSn9u/HE9UPd6x++/q+w8XW46TWnqE/IhDF3O4V+7wmary+usNaSX5XPuqJ1bCx0RvM3F2+m1lMLQEJkAkNShjC111SGpgxlSMoQkqOSA5xaRIJZmwt/a+1OXwbxB3X1EWk/Civq+NpraxmWmchzN48kPNTFnUFrjkJNqbNoNyQUrnjKvWdL0KpqqGJT0SbWF61nfeF6NhRtoKimCHAW3w7oOoAbcm9gSMoQhqYMpWdcT22GJSLtilc793YW2rlXpH1YtOUII3olkRwTcX4PaqyDD34BSX1g+OehyZlWQYiLv0xIUPE0edhVtosNRRtYX7ie9UXrT5iy0zu+N0NThjKs2zCGpQwjNylXi29F5JQ65M69IiJuOHC0mt1FVUzM6cbUgS4s5N2zDP71IBR9CqPvdAp/FfzipdLaUtYVrmNd4TrWF65nY/FGqhqqAIiPiGdoylCm9ZrG0JShDE0ZSmJUYoATi4h4T4W/iPhNeW0Ds+aupKy6gaUPTyEm8jz+E1RdAgu+D2v+DxJ7w81/g5xp7oWVTsvT5GFn2U7WFa5jbcFa1heuZ0/5HgBCTSi5Sblc1feqltH83vG9NWVHRDoFFf4i4jc/+Ocm9hZX88qdY8+96LcW1v8F3n7Umct/4YNw8SMQoc4ocmrl9eVsKNzA2sK1rCtYx4aiDS273yZHJTOs2zCuyb6G4d2GM7jrYHXZEZFOS4W/iPjFP9ceZN6agzx0aS5j+3Y9t4cU74R/P+RsuJWRB7P+CWlDXM0pHZu1lv0V+1lTsIY1BWtYW7CWXWW7sFhCTAg5iTlc2fdKhncbzvBuw7UAV0SCigp/EfG5I+W1fHfeRkb1TuKrk/ud+4Pm3QOFW+GKpyHvdqdjjwS1Bk8DW0q2tBT5awrWUFxbDEBcRBzDuw3n8qzLuaD7BQxJGUJMeEyAE4uIBE5QFf7q4y8SGN1iI3loei7TBqYS5m3bzsoCiEqEsAi45tcQGQ/x6b4JKu1eeX056wrWtYzobyza2NI3PzM2kwk9JjAidQQjuo2gb2JfQowWeouIHONVO09jzA3AbJzNvLoCJ/991Fpr2/0+42rnKeI/NfUeukSc48h8Yx08PxFSB8GNL7maSzqGwupCPj7yMauPrObjIx+zs3QnFkuoCWVg8kAu6H4BI7qPYET3EXSL7hbouCIin9Eh23kaYx4CngKOAiuBYl+FEpHOYe3+Uu54aRUvzBrFqN7nsGNpWCRMmA3JWe6Hk3bpcOVhVh9Z3VLo7y3fC0BMeAwXdLuAy/pcxojuIxiSMkSLcEVEvOTNVJ/ZwCpgqrW2ykd5RKSTqKpr5MFX1xAVHkp29zjv3txYD4VbIH04jLzVNwEl4I4txD1W5K/OX82hqkOA0zt/ZOpIbsy9kbzUPPon9ycsJKhmp4qIuM6b/4qmA0+p6BeRtvjR/M3sLanm1bvGkdDFix1Nm5pg3ldg239g9seQkOG7kOJX1lr2lO9hVf4qVuc7xX5BTQHgtNUclTqKWYNnkZeaR05Sjubni4i4zJvCfyeQ4KsgItJ5/GfDYV5bvZ/7pvTzrnWntfCfh2HT32HaD1X0d3DHRvRX5q9kVf4qVuWvorCmEIDuXbozKm0Ueal55KXmkZWQpbaaIiI+5k3h/wzwbWPMLzXqLyJn8tHuEoZlJvDgtFzv3vjek7Dqd868/ose9E048akDFQdaivyV+Ss5Un0EgJQuKYxOHc3o9NGMSRtDr7heKvRFRPzMm8K/BigENhtjXgR2A56Tb7LWvuJSNhHpoB67ejCVdY2Ee9O6c9XvYcn/wPCb4NIf+y6cuCq/Kp+V+StZedgZ1T82Rz85Kpm81DzGpI1hdPposuI1oi8iEmhtbudpjGlqw23WWtvud9RRO08R35i35gCDeySQm+rlYt6Nf4fXb4fcy+DzL0OoFnG2VxX1FazKX8WKwyv48NCH7CnfA0BCZIIzop/mjOj3S+ynQl9EhA7azhO41Gcp/EQbeIn4zqZDZTz8+nouG5LOr744ou1v3Pku/P1u6DUObvyDiv52pqGpgfWF61sK/Y1FG/FYD13CujAydSQ35N7AuPRxWowrItIBeLWBV2ehEX8Rd9XUe5j56w+oqG3grQcmkRQT0bY3VpfAs8MhsRfc9m/okujboHJW1lp2lu50Cv3DH7I6fzXVjdWEmBCGdB3C2PSxjO8xnuHdhhMR2sb/n0VEglhHHfE/gTEmEcBaW+peHBHpiP7nzS3sKKjk5TvGtr3oB4hOhuueh4xRKvoDqLimmBWHV7D80HI+PPRhS+ed3vG9mdlvJuPTx5OXlkdCpBq7iYh0ZF4V/saYNOC/gWuBxOZzR4F/AN+11ua7nlBE2rVlO4r4vxV7uWtiFhflpLTtTWUHoGg79JsCA670bUD5jAZPA2sL17L80HKWHVzGlpItACRGJjIufRzje4xnXPo4esT2CHBSERFxU5sLf2NMJrAC6AFsBN5pvjQIuB2YYYwZb6094HpKEWm38vok8egVA/jShD5tf9OC78OuJfDAeoiM9VU0aWatZV/FPpYdXMbyQ8tZmb+SmsYawkwYw7sPZ/aI2VzY40IGdh2oefoiIp2YNyP+PwZSgGuttW+0vtC8aPavwI9wfgkQkU7OWktVvYfYyDDuntTPuzdf9XMo3qmi34cq6ytbpu8sP7Scg5UHAciMzeTqflczoccExqSNITZC/x+IiAQLbwr/y4DfnFz0A1hr5xtj5gBfcC2ZiLRra/aXMvuVNbx69zh6Jke37U0bXof+l0NUAmSM9G3AIGOtZXfZbpYeWMr7B9/nkyOf0GgbiQ6LZkz6GG4bfBsX9riQnvE9Ax1VREQCxJvCPwn49AzXtzXfIyJB4O+fHKCoso7E6PC2vWHrm/C3O2Dq92Hi130bLkjUNtayKn9VS7F/bFQ/OzGbWYNncVHGRVzQ/QLCQ9r4/5GIiHRq3hT+B4FJwPOnuT6x+R4R6eTqGj38a/1hZgxOIy6qDUVl+SH4532QNgzG3+/7gJ3YocpDvH/gfZYeXMrKwyup9dQSFRrF2PSx3D7kdiZmTCQ9Nj3QMUVEpB3ypvD/K/BNY8xO4ElrbQWAMSYWeBhnms+T7kcUkfZm8dZCSqsb+NzIjLPf3OSBeV+Bxlq4YS6ERfo+YCfS2NTI2oK1LD24lPcPvM+O0h2AM1f/czmfY2LmREanjSYyVP+7iojImXm7uPdi4DvAw8aYY917MoFwnI4/P3Y3noi0R/PWHCAlNpKLstvQvnP5L2H3Urj6V5CS4/twnUBZXRnLDy1nyf4lfHDwA8rrywkLCWNU6iiuzb6WSZmT6BPfB2NMoKOKiEgH0ubC31pbZYyZCNyF08c/q/nSYpw+/i9aaxvcj+ie5u5DM7OzswMdRaRD+6+8nlw6KI2w0LO0fjzwMbz7Exh0DYy41T/hOqg9ZXt478B7vHfgPT458gke6yEpMonJPSdzcebFTOgxQR14RETkvBhrbaAz+F1eXp5dvXp1oGOIdG51FfD8RGhqhHvehy5a+99aQ1MDawvWsmT/EpYeWMqe8j0A5CTlcHHmxVyceTFDU4YSGhIa2KAiInJejDEfW2vzAp0DvNy5V0TklY/2MTEn5ewtPP/9DSjdC7e9qaK/WXVDNUsPLuXdve/ywaEPqKivIDwknDFpY7hp4E1MypxERmwb1k2IiIicAxX+ItJmu4uqeHTeBr59+QC+cvEZNu3yNIIxMOlh6D3efwHbofL6ct7b/x4L9i5g+aHl1HnqSI5KZmqvqUzOnMy4HuOICY8JdEwREQkCKvxFpM3mrTmIMXDNBWcZlQ4Ng+uehyCcSghwtPYoi/cvZsHeBaw4vILGpka6R3fn+pzrubT3pYzoPkJTeERExO9U+ItIm1hrmbfmABdlp5CWEHXqmzwNMP8Bp1d/6iBn1D9IFFYXsmjfIhbuXcjqI6vxWA8ZsRncMvAWpvWextCUoYSYsyyGFhER8SEV/iLSJqv3HmV/SQ1fm5Z7+ptKdsP2dyB7mlP4d3L5Vfks3LuQBXsXsKZgDRZLn/g+3D7kdqb1nsbA5IFquSkiIu2GCn8RaZOt+RUkdAlnxuC009/ULRdmfwJR8f4L5meF1YW8s/cd3t7zNmsK1gBOJ557h9/LtN7TyE7MVrEvIiLtUpvbeRpj6oFZ1tpXT3P9RuBP1toIF/P5hNp5ipyb2gYPUeGnmJteXQJrXobx90EnnLteXFPMwr0LeWvPW3x85GMsluzEbC7rcxnT+0wnKyHr7A8REZGg1FHbeYYBZ5qgGtr8EpFOpr6xiYiwkFMX/dbCP+93pvjkXArdB/o/oA8crT3Kwn0LeXvP26zKX0WTbSIrIYt7ht/DjD4z6Jd4hq5GIiIi7ZCbU316AhUuPk9E2omv/ukTIsNDeO6mkZ+9uHoubPs3TP9Jhy/6y+rKeHffu7y15y0+OvwRHuuhd3xv7hx6JzP6zCAnMUfTeEREpMM6Y+FvjJkJzGx16g5jzORT3JoMzABJgUDEAAAgAElEQVSWuxdNRNqDoso6lmwr4I6Jp5jOUrAF3n4U+l0C4+7zf7jzVO+pZ13hOj46/BEr81eyoXADjbaRzNhMbht8G5dlXUb/pP4q9kVEpFM424j/SODO5u8tMKX5dbJaYAVwv3vRRKQ9mL/uEI1Nls+NyDzxgqcBXr8DIuPg2uchpP23qvQ0edhSsoWPDn/ER4c/Yk3BGmo9tYSYEAZ3HcxtQ25jWq9pDOo6SMW+iIh0Omcr/H8E/AQwQD0wC/jzSfdYa22TD7KJSDswb81BBveIp39a3IkXtv4bCjbBjX+EuNTAhDsLay27ynax4vAKVh5eyaojq6iod2YkZidmc33u9YxNG8uotFHER3TeTkQiIiJwlsLfOi1/PADGmBwg31rr8UcwXzg2dSk7OzvQUUQ6hB0FFaw/UMZ3rzzF3P2Vv4PEXjBw5mevBdimok28vOVlVhxeQVFNEQAZsRlM7z2dMWljGJM+hpQuKQFOKSIi4l9tXtxrrd158jljTChwFc4c/39bawtczOY6a+18YH5eXt5dgc4i0hF0i4viR9cM5vIh6SdeOLIJ9n4Al/6oXbXv3FS8iTlr5/DegfeIi4hjYsZExqaPZUzaGDLjMs/+ABERkU6szYW/MeZxYIq1dlyr0+8Ak3GmAhUZY8Zaa3e7G1FEAiWhSzizxvf57IXtCyAsCkbc6vdMp7KleAu/WfcbluxfQnxEPLNHzOamATcRGxEb6GgiIiLthjftPK8EFh47MMZchbPQ92fAOuAXwLeAr7gZUEQCY8OBMjYeKuO6ERmf7d9/0YMw7L8gOjkw4ZptK9nGb9b+hnf3v0tcRBz3XXAfNw+8mbiIuLO/WUREJMh4U/hnAttbHV8N7LHWfhPAGDMA+KKL2UQkgP73wz38Z2M+143IOPGCpxFCwyC+R0BygVPwP7/ueRbuW0hceBxfHf5Vbh50sxboioiInIE3hX8k0NDqeAqt/gIA7AROmggsIh1RTb2HNzcc5sph6SeO9jc1wfMXwbAbYeLX/Z5r+9HtzFk3hwV7FxAbHss9w+/h1kG3quAXERFpA28K//3AOOD3xphBQD/gsVbXuwNV7kUTkUB5Z3M+VfUerju5d39DNWRNhK45fs2zs3Qnc9bN4Z097xAdHs3dw+5m1qBZJEQm+DWHiIhIR+ZN4f8X4DvGmBRgKFABvNnq+gXALheziUiA/P2Tg2QkdmFs1klz+CNj4Yqn/JrlzV1v8ugHjxIZGsmdQ+9k1qBZJEYl+jWDiIhIZ+BN4f8/QG/gWqAMuM1aexTAGBOPM+f/WdcTiohfNXiaqKxr5NoRPQgJabV7bdkBOLoHel8IftrV9q09b/HtD77NyO4jeWbyMyRFJfnlc0VERDojb/r41wJfOs3lKqAXzl8BRKQDCw8N4W/3TsDTZE+8sGIOfPQ8fG0TxKX5PMeCvQv41tJvcUG3C3hu6nNEh0f7/DNFREQ6sxA3HmKt9Vhri6219W48T0QCp7KuEYDQ1qP99dWw5v+cXXr9UPQv2reIh997mKEpQ/nNtN+o6BcREXGBV4W/MSbaGPM9Y8wnxpjS5tcnxpjvGmP0k1mkg9tyuJyRP17A4m0nbcK94a9QWwZj7vZ5hiX7l/CN977BoK6DmDNtDjHhMT7/TBERkWDgzc69ScBSYDBQAmxpvpQD/Aj4L2PMJGttqespRcQv5q05SFOTZXhmq8Wz1sLK30HqEOg13qefv/TAUh5a8hADkgbw/KXPa+ddERERF3kz4v9DYBDwIJBurR1vrR0PpAEP4PxC8JjrCUXELzxNln+sOcjk/t1Jjok4fmHfCjiyAcbc5dNFvcsOLuPBxQ+Sk5TDb6f/VrvvioiIuMybwv8aYK619pfW2paNvKy1jdbaXwFzgc+5HVBE/GPZjiIKKur43MiTdupd+QJEJcDQG3322R8e+pD/9+7/o19iP1649AVtyCUiIuID3hT+acDqM1z/GEg9vzgiEijz1hwkLiqMSwZ0P36y/DBseQNG3AoRvplr/9Hhj5j97mz6JPThd5f+TptyiYiI+Ig3ffwLcDbpOp3hzfeISAd0/yXZXDYkjajw0OMnP34JmjyQd7tPPnNV/iruX3Q/PeN68rvpv9PGXCIiIj7kzYj/v4A7jTF3GHN8oq9x3A7cCcx3O6CI+Ee/brHMGHxSq87orjDiZujaz/XP+/jIx9y36D4yYjP4/fTfkxyVfPY3iYiIyDkz1tqz3wUYY7oBHwJZQD6wtfnSAJxpQLuA8dbaIh/kdFVeXp5dvfpMs5ZEgkt5bQOLtxYwJiuZ9IQuPv+8tQVr+cqCr9A9ujt/uOwPpHRJ8flnioiIBIIx5mNrbV6gc4AXI/7W2kJgFPA0UAlMbH5VAE8BoztC0S8in7WvuJoHXl3L+gNlx0/uXAyehtO/6RytK1zHPQvvoVt0N16c8aKKfhERET/xagMva22ZtfYRa21/a21E82uAtfZb6t8v0nEd2603LrJ52U/+Bvi/a505/i7aVrKNexbcQ3JUMi9Of5Hu0d3P/iYRERFxhTeLezs8Y8xMYGZ2dnago4i0KxW1TuEfG9X8n4Tug+CLr0Gvsa59xpGqI9y36D6iw6J5cfqLpMaoCZiIiIg/nbbwN8ZMOJcHWmuXn3sc37LWzgfm5+Xl3RXoLCLtSWWdM6UnLircORESCv0vc+35VQ1V3LfoPirqK/jj5X8kPTbdtWeLiIhI25xpxP8DoG0rfx2m+f7Qs90oIu1L5bER/8gwZ3pP6T6Y8h3nF4Dz1NDUwNff+zo7Snfw3NTnGJA84LyfKSIiIt47U+GvUXGRIHHlsB4MzUwkKSoE3n8G4jNcKfqttfz3iv9m2cFlPDb+MS7MuNCFtCIiInIuTlv4W2tf9GcQEQmc5JgIkmMiYNtbULoXpj3mynNf3Pgif9v+N+4aehfX517vyjNFRETk3ATV4l4RObXlO4oorKzjmo2/g9g0GDjzvJ/55q43efaTZ7ki6wpmj5jtQkoRERE5Hyr8RYS/fnyAI7s3cU3tQpj8KISGn9fzVuev5rvLvsuo1FH8+MIf02qzbxEREQkQr/r4i0jnVFHbyI32bQgJh1G3ndezdpft5oHFD5ARm8GzU54lIjTCnZAiIiJyXlT4iwhVNbVMr18Ig66GuHPvr19cU8y9C+8lLCSMOdPmkBCZ4GJKEREROR+a6iMiRNYcIcZWQdakc35GTWMNs9+dTXFNMXNnzCUzLtPFhCIiInK+VPiLCNF1Bc438Rnn9H5Pk4dvLf0WG4s28ospv2Bot6EuphMRERE3nPdUH2NMojEmy40wIhIYj900hcoJj0D3gef0/qdXP827+9/lkTGPcEmvS1xOJyIiIm5oc+FvjLnFGDPnpHM/AYqAHcaY94wxsW4HFBHf695rALHTH4UE76fn/GnLn3h5y8vcMvAWbh54sw/SiYiIiBu8GfG/B4g6dmCMGQU8CnwI/AG4EPiaq+lExOfqG5v4w38+YPOnn3r93kX7FvHTlT9laq+pfCPvGz5IJyIiIm7xpvDPAda3Or4ROApMs9beCbwIfN7FbCLiBxW1DaQs/zGZ//BuZ939Ffv51tJvMTRlKI9PfJzQkFAfJRQRERE3eLO4NwEobXU8FVhora1rPl4FfNGtYCLiHxW1jbzUOIOUwV0Z78X7nlr1FMYYfjb5Z3QJ6+KzfCIiIuIOb0b884FsAGNMCjACeL/V9RjAuhdNRPyhsq6Rj21/KvrMaPN7lh1cxuL9i7l72N2kxaT5MJ2IiIi4xZsR/8XAfcaYQuBY245/t7qeCxxwK5iI+Ed5TR2TQ9aS1NQHOHsR3+Bp4ImVT9ArrhezBs3yeT4RERFxhzcj/j8ACoBngKuAJ621uwGMMaHA9cBS1xOKiE/VlxXwUsSTZBxe2Kb7X9n6CnvK9/DImEeICI3wcToRERFxS5tH/K21+4wxg4EhQJm1dleryzHAfcAal/OJiI9dlNoAQPeMs2/HUVhdyJx1c5iUOYlJmee+y6+IiIj4n1c791prGzhFcW+tLQf+5lYoEfGfsMrDztfEs+/a+4tPfkG9p56HRz/s61giIiLiMm828OprjJl20rk8Y8y85s27bnc/noj42vadTv/+ptgeZ7xvbcFa3tj5BrMGzaJ3fG9/RBMREREXeTPi/ySQAiwEMMZ0Bd4G4oE64CJjTJG19g3XU4qIzxQe3E2WDSEsrvtp72myTTy+8nG6d+nO3cPu9mM6ERERcYs3i3vzaC76m30Bp7d/HtAVp4//A+5FExF/6FKTT6FJhjNswDVv+zw2F2/mobyHiA6P9mM6ERERcYs3hX934GCr48uB5dbadc2beL0CDHYznIj4XnRdAcUhXU97vby+nGc/eZaR3UdyRdYVfkwmIiIibvKm8K/CGeHHGBMCXMSJ7Turj10XkY4jvr6Q0tCU017/zdrfUFZfxrfHfhtjjB+TiYiIiJu8Kfw3A7caYxKBO4A4YEGr672BQheziYivWUuSp5Dy8G6nvLz96HZe3foqN+TcwIDkAX4OJyIiIm7yZnHv08A8oLj5eB0njvhfivr4i3Q4kbe8xrQun53qY63liZVPEBMew+wRswOQTERERNzkzQZe840x04FrgDLgl9ZaCy0dfgqAP/okpYj4hjGYfpM51f67C/YuYGX+Sr4z9jskRiX6PZqIiIi4y9sNvN4F3j3F+WLgardCiYiflO7jtX++QdLQGUwfmdNyuqaxhqdXP01uUi435N4QwIAiIiLiFm/m+LdLxpiBxpjnjTGvG2PuDXQekY7E7lrC53d/h1379p9wfu7GuRyuOsy3x3ybsBCvxgdERESknfLqJ7oxJgH4MjAWSOKzvzhYa+0ML543F7gKKLDWDml1/jLgWSAU+L219onTPcNauwW4p7nT0P8Cc9r6+SLBri73aj5XV8HM+OO79h6oOMDcDXO5vM/l5KXlBTCdiIiIuKnNhb8xpiewDMgEKoEYnLn+CYABjuK0/PTGS8CvcQr2Y58TCjyHs1j4ALDKGPMGzi8Bj5/0/tuttQXGmKuBe4H/8/LzRYJaJV3YbPvwxS5RLeeeXv00oSGhPJT3UACTiYiIiNu8merzEyAZmAH0xSn2b8Ap/J8CSoBx3ny4tXZp8/taGwPssNbustbWA68C11hrN1hrrzrpVdD8nDestZcDN3vz+SLBrmnda8wIWUlslDMGsPzQchbtW8RdQ+8iLSYtwOlERETETd4U/tOAF621CwB77KS1ttJa+wiwFfipC5kygNYTjg80nzslY8xkY8wvjTG/Bd48w313G2NWG2NWFxZquwERgPhP5vDF8KXERYbT0NTAEyufoGdcT2YNnhXoaCIiIuIyb+b4pwDrm79vaP4a3er628D33AjlDWvtEmBJG+57AXgBIC8vz57ldpGgEFWdz+TR18KgVP646Y/sLtvNry75FZGhkYGOJiIiIi7zZsS/CGeqD0AFUAf0aXU9DGfe//k6CPRsdZzZfE5E3NRQCzUlEN+D6oZqnl/3PBdlXMTFmRcHOpmIiIj4gDcj/puBYeC07jHGrMTppjMPZ77/3TjTfc7XKiDHGJOFU/B/AbjJheeKSGsVhwB4eXMDcWnvU9lQyZcGfwljTICDiYiIiC94M+L/T2CiMaZL8/FPgP7APmBv8/f/7c2HG2P+DHwI9DfGHDDG3GGtbQTux5k6tAX4i7V2kzfPFZE2KHcK///sC2HZofeIC49jVOqoAIcSERERX2nziL+19tc4rTePHS8wxkzEGY33AH+31r7vzYdba794mvNvcoaFuufKGDMTmJmdne32o0U6nvLDABy2iezPf5OLMi8iPCQ8wKFERETEV85rS05r7QpghUtZfM5aOx+Yn5eXd1egs4gEXLmzdKYkphZP3VGm9JwS4EAiIiLiS95M9RGRzqT8ELUhMdj43YSZMC7MuDDQiURERMSHvBrxN8ZkAncBOUBXnEW9rVlr7QyXsomIL1UcojyiO6FxmxmVlkd8RHygE4mIiIgPtbnwN8ZcCbwORAJVQOkpblN/fJGO4rrfUl24kYaFdzK5522BTiMiIiI+5s2I/1PAYeB6a+0aH+UREX+JiOG9UqcD7+SekwObRURERHzOm8I/C/hWRy761dVHpJmnERb+gD/lr6FreB8yYjMCnUhERER8zJvFvXuADt3rz1o731p7d0JCQqCjiARWdTGlH79Ivt1PfNPwQKcRERERP/Cm8P8lcEerDbxEpKOKS2Xpf/0Wa6B3l9GBTiMiIiJ+4M0GXnOMMQnAJmPMH3D+AuA5xX2vuBdPRHxl8f4l2IZ4esbkBDqKiIiI+IE3XX26AVcCfYAfnuY2C6jwF2nn6jbNY9m+d2mqHElcVGSg44iIiIgfeLO493lgHPAr4H3gqE8SiYjPrdr5H2poonvYaNITogIdR0RERPzAm8J/GvAra+1DvgojIv6xuGInXSy8fe8dRIZqxF9ERCQYeLO4twH41FdB/MEYM9MY80JZWVmgo4gEjLWWJQ3FXEgXFf0iIiJBxJvC/01gqq+C+IPaeYrA5pLNFBgPo003rn1uGVsOlwc6koiIiPiBN4X/Q0BfY8wzxpjevgokIr61ZN9iQqxlUFgWa/eX0mRtoCOJiIiIH3gzx/9w89cLgAeMMU04XXxas9ZazR0QaceW7FvEBXV12Bhnt964yA69L5+IiIi0kTeF/2t8ttAXkQ7kUOUhtpbu4OtVNRzt1g2AuChv/jMgIiIiHZU3G3jd4ssgIuJ7S/YvAWBydQ0rTVcAYiJV+IuIiAQDb+b4i0gHt2T/EvpEpdAnPJ6I5AzG9EkmIkz/GRAREQkGQTXUZ4yZCczMzs4OdBQRv6uor2DVkVXcOuhW+PxDXAtce3GgU4mIiIi/BNVQn9p5SjBbdnAZjU2NTOk5JdBRREREJACCasRfJJgt3r+YpMgkhn38GkT8i2+WXE1tYxO/+uKIQEcTERERP1DhLxIEGpoaeP/g+1zS8xJCi44Clj3FVYSHBtUf/URERIKaCn+RILDmyBoq6iuY0msKXORswF3xi6X0So4OcDIRERHxFw33iQSBxfsXExESwfj08S3nKmobiVUPfxERkaBx2p/6xpgJ5/JAa+3yc48jIm6z1rJ4/2LG9RhHdNkh+PPn4cqfUVnXSHyUdu0VEREJFmca7vsA73bqNc33h55XIhFx1Y7SHRysPMgdQ++Asv1QvANCwpnQL45B6fGBjiciIiJ+cqbC/y6/pRARn2nZrTdzMny6wDkZn86cW/oGLJOIiIj432kLf2vti/4M4g/awEuC0ZL9SxiaMpRu0d2g/KBzMq5HYEOJiIiI3wXV4l5t4CXBprC6kPVF65ncc7JzovwQdElmd5mHUT9ewILNRwKaT0RERPzH65YexhgD5AJJnOIXBy3uFWk/3jvwHkCrwv8wxGdQVtNAcVU9auMvIiISPLwq/I0xXwe+jVP0n44W94q0E0v2LyEjNoOcxBznRPlBiO9BZW0jALGR6uojIiISLNo83meM+TLwFLAF+AFOF59fAT8HSoHVwN0+yCgi56C6oZoVh1cwpecUnD/U4Uz1iU+nsq4BgNhI9fEXEREJFt78of+rwEpgEjCn+dwb1tpvAMOALMDjbjwROVcrDq+gzlN3fJpPYx1UF0F8BuXNI/5x2sBLREQkaHhT+A8CXrPWWo739w8FsNYeBH4LPOhuPBE5V4v3LyYuIo6RqSOdE/VVkHsZpA4hM7ELVw/vQWK0pvqIiIgEC2+G+zxAZfP3Vc1fu7a6vgfIcSGTiJwnT5OHpQeWMjFjIuEhzcV9dDLc9BoAE4AJ2SmBCygiIiJ+582I/36c6TxYa+uAA8CFra6PwpnrLyIBtqFoAyW1JUzpOeWU150/3ImIiEgw8abwXwpc0er4deBeY8wLxpjf4+z0+x83w4nIuVm8fzFhJowLM1r9bv7hb+CZQVBfxaPzNnLxU4sDF1BERET8zpupPs8CG40xXay1NcD3gQHAnc3XFwGPuJxPRM7Bkv1LyEvLIy4i7vjJrtmQPRXCo6mobSD0WKcfERERCQptLvyttVuBra2OK4ErjDHJgMdaW+aDfK4yxswEZmZnZwc6iohP7SnfwyW9LjnxZO505wVU1jUSq44+IiIiQeW89+201pZ0hKIfwFo731p7d0JCQqCjiPhciDnpX++6Cmie219R26hWniIiIkHmvAt/EekgnhsHb9wPQGVtozbvEhERCTKn/clvjGkAmoBYa21D8/HZWoFYa22kmwFFxAVNHqg4DLGpAFw1LJ3U+KgAhxIRERF/OtOQ32s4hX7TScci0tFUFoD1QHwPAGZP1ZYbIiIiwea0hb+19pYzHYtIB1JxyPkan4G1lpoGD13CQzHq7CMiIhI02jzH3xgzwRjT9QzXk40xE9yJJSKuKm8u/OPSqa73MOj7b/PC0l2BzSQiIiJ+5c3i3veBGWe4fmnzPSLS3pQfH/GvrGsEIC4qPICBRERExN+8KfzPNicgFK0BEGmfyg9BaAREd6WitgFAffxFRESCjLftPM9U2I8Dis4ji4j4SvkhiEuDkBAqaptH/NXOU0REJKic8Se/MWY2MLvVqZ8ZY354iluTgGTgJfeiiYhryg9BfAZAS+GvEX8REZHgcraf/JXAkebvs4FyoPCkeyywA1gB/MzVdCLijqHXQ4jzr3tGUhfun5JNz6ToAIcSERERfzpj4W+t/QPwBwBjzH7gEWvtP/0RTERclHd7y7f9usXyjRn9AxhGREREAqHNf+u31vb0ZRAR8RFPg7OBV2wqhIZRXttAQ2MTyTER6uMvIiISRLxd3CsiHU3hNvj5INg6H4C5H+xm1E8W4mlSEy4REZFgctoRf2PMdqAJGGytbTTGfNqG51lrbbudQ2CMmQnMzM7ODnQUEf+JTYWrfg4ZowCorG0kOiKUsFD93i8iIhJMzjTV5wgntu8soIP36bfWzgfm5+Xl3RXoLCJ+E9vthDn+lXWNxKqVp4iISNA57U9/a+1FZzoWkQ6ieCc01EDaEAAq6hqJUytPERGRoKO/9Yt0dh88Ay9f33JYUdtIbFR4AAOJiIhIIGjYT6SzKz8M8ekth18Y3ZMGT1MAA4mIiEggeFX4G2NuwNnJNwfoCpzcC9BaayNdyiYibig/BF37tRxeMTT9DDeLiIhIZ9Xmwt8Y8xDwFHAUWAkU+yqUiLio4hD0Ob5EZ0dBJckxESTHRAQwlIiIiPibNyP+s4FVwFRrbZWP8oiIm+qroLYM4nu0nLruuWXckJfJD2YODmAwERER8TdvFvemA/+rol+kAyk/7HyNzwCgqclSWd9InNp5ioiIBB1vCv+dQIKvgoiID5QfdL42L+6tbvBgLcSpq4+IiEjQ8abwfwa4wxgT46swIuKyihNH/CtrGwGIVR9/ERGRoOPNT/8aoBDYbIx5EdgNeE6+yVr7ikvZROR8HRvxj3NG/CtqGwC0c6+IiEgQ8uan/8utvn/sNPdYQIW/SHsx8GpI7A0R0QB0i4vkyeuHcUHPxAAHExEREX/zpvC/1GcpRMQ3UnKcV7PE6Aj+a3TPAAYSERGRQGlz4W+tXeTLICLiAzvfhbge0H0AAIUVdRwsrWFgehyRYaEBDiciIiL+5M3iXhHpaObdAyueazl8d+sRrn1uGUWV9QEMJSIiIoFw2hF/Y8xNcHyx7rHjs9HiXpF25NZ5EBbVclhxrKuPFveKiIgEnTP99H8ZsMaY16219ceOAXOG92hxr0h7knri7rwq/EVERILXmX76XwrQXPS3HItI+2ethdpyWPV7GHgNxHYDoLKukZiIUEJDzvT7u4iIiHRGpy38T17Mq8W9Ih2LqTgMy5+EXuOPF/61jdq8S0REJEgFVQVgjJkJzMzOzg50FBHfq6twvsb3aDl16/jeTB+cGqBAIiIiEkhB1dXHWjvfWnt3QkJCoKOI+F5dJYR1gajjm3UNyUhg6kAV/iIiIsEoqAp/kaBSV+GM9pvj8/lX7i5h86HyAIYSERGRQFHhL9JZ1VecMM0H4DvzNvDrxdsDFEhEREQCSYW/SGdVV/mZwr+itlGtPEVERIKUCn+RzqrusyP+lXWNxEaGByiQiIiIBJIKf5HOyjZBfEbLYVOTpbKukTi18xQREQlKp60AjDGPnsPzrLX28fPIIyJuiktv+baq3tm1V4W/iIhIcDpTBfCTc3ieBVT4i7QHY+6Cvhe3HEaGhfLKXWPplRwdwFAiIiISKGcq/HP8lkJE3NclCSLjWg4jwkKY0C8lgIFEREQkkE5b+Ftrd/oziIi47ODHMOL4YUFFLSt2lXBhv650jY0MXC4REREJCC3uFemULBxYdcKZLYcr+H9/XsOe4uoAZRIREZFA8nqVnzHmAmAskMRnf3HQ4l6RdsFA3pdPOFNR2wBoca+IiEiwanMFYIyJAv4KXAEYnIW8pvmybXVOhb9IexAaccJhZa3T1UcbeImIiAQnb6b6fA+n6P8pMA2n0L8duBr4EFgFDHU7oIicCwvFJy7TqahVO08REZFg5k3hfyPwN2vto8C65nP7rLX/AqYAUcDNLucTkXNhLZQfOuFURZ1T+MdEqPAXEREJRt4U/r2Axc3fe5q/RgBYaxuAV4AvuhdNRNx0y7he/OO+CwkJMWe/WURERDodb4b+KlrdXwk0AemtrpcCaS7lEhGXdY+LontcVKBjiIiISIB4M+K/i+ZNvay1jcBm4PpW168FDroXTUTctGjLEd7amB/oGCIiIhIg3hT+C4HrjTHH3vMCcIUx5lNjzDZgOvAHtwOKiDteWr6HF5ZqXz4REZFg5c1Un5/izOMPAZqstb82xkQDt+DM+f8+8IT7EUXEDRW1jcR3CQ90DBEREQmQNhf+1tpyYNNJ554EnnQ7lIi4r6K2gYzELoGOISIiIgHS5qk+xpgXjDFjznA9zxjzgmw9ZmEAABq2SURBVDuxRMRtlXWN2rxLREQkiHkzx/9OIPsM1/sBd5xfHBHxlcraRm3eJSIiEsTcrAJigAYXnyci58qEQNbEE069/bVJRIWHBiiQiIiIBNoZC39jTCbOxl3H5BhjJpzi1mTgKzgtP0WkHcpMig50BBEREQmgs4343wH8ALDNr+83v05mmq9rqo9Iu2ChaHvLUVl1Ay9/tJfpg1LJSY0LYC4REREJlLMV/m8AB3AK+xeAF4EVJ91jcXbyXWmt3eN2QBE5B9ZCTUnLYX55LU+9vY2slBgV/iIiIkHqjIW/tXYNsAbAGNMb+Iu1doM/gonIeTAh0HNsy2FFrbP8Rl19REREgpc3ffy/58sgIuI7FXWNAMSqq4+IiEjQ8qadJ8aYaGPM94wxnxhjSptfnxhjvtu8i29AGGNijDGrjTFXBSqDSPti4cjx/fYqap3CP04j/iIiIkHLmw28koCPgB/idPrZ0vzqBfwIWGGMSfTmw40xc40xBcaYjSedv8wYs80Ys8MY8602POoR4C/efLZIp2YtVB+f4195rPCPCg9UIhEREQkwb4b/fggMAh4E5lhrGwCMMWHAvcAvgMear7fVS8Cvgf89dsIYEwo8B1yKs7B4lTHmDSAUePyk998ODAc2A1FefK5Ip2aNOeH4xrxMZgxOJTE6IkCJREREJNC8KfyvAeZaa3/Z+qS1thH4lTFmGPA5vCj8rbVLjTF9Tjo9Bthhrd0FYIx5FbjGWvs48JmpPMaYyTibhw0Caowxb1prm9qaQaSzal36h4eG0DU2MmBZREREJPC8KfzT+P/t3XuUXGWZ7/HvQycEciESCBC5CokygBK5DaAw4siAlxwu3pB1EAaY6BHPiIPrgAreUMBhBnQch2NUxAteZhCUsBgdQDy4HC5CYCAKCsSAhEC4pUkIuXT6OX/s3aSm6a50dVf1rnR9P2vVqt57v131C+xUnn773c+GO+scvwt4/8jiALAj8Kea7ceAPx9kLJn5SYCIOAV4erCiPyLmAnMBdtlll4GGSGPWzxYu5eGnXuCMI2ZWHUWSJFWkkYt7lwGz6xzftxxTicy8IjOvq3N8XmYekJkHTJ8+fTSjSZW78f5lfO+2R6qOIUmSKtRI4X8dcHpEnBaxYQFxFE4FTgfmNyHTEmDnmu2dyn2Shmnl6h6m2MpTkqSO1kjh/yngEYo7+D4WETdFxE0US3G+Diwux4zUb4BZEfGqiNgcOIHiDsKShmnlmh5v3iVJUocbcuGfmU8B+wP/AKwEDisfK4CLgQMz8+lG3jwifgDcCrwmIh6LiNPKi4U/DPycol3ov2bmb+u9jqT6VqxeZytPSZI6XENTgJnZTdEz/+xmvHlmvm+Q/dcD1zfjPWpFxBxgzsyZXuCoDjBuQ+vOF9auZ6dpzvhLktTJGrmB17yIOKjO8QMiYl5zYrVGZs7PzLlTp06tOorUersc/NKXN3z0cC59T71r8yVJ0ljXyBr/04F6U+V7AKeNLI6kVogINh/XyF93SZI01jSzEpgErGvi60kaiSeKS2PW9yYfv/pebvnDUxUHkiRJVaq76DcidgJq73Y1KyIOHWDoNOADwKImZpM0EuvXAEUrzx/c8SdmbjeFw1/tPSwkSepUG7va7zTg00CWj08xcMvOKI+71EdqFzvuB8CKNcUv4uzjL0lSZ9tYJXAtRZ/+oOjf/03gtn5jkqK95x2ZubjZAZvJrj7qRCvX9AAwxT7+kiR1tLqVQGbeDdwNEBG7UvTUv280grVCZs4H5h9wwAF/U3UWqeWWLIDZsGJ1UfhPdsZfkqSONuRKIDPPa2UQSU229gUA1qzrZcvxXd65V5KkDmclII1xb5y1Lfeff3TVMSRJUsVs7C1JkiR1AAt/aYz72cInOPOHd7O2p7fqKJIkqUIW/tIYt3BJNz/9r8cZ3xVVR5EkSRUatPCPiHkRcVDN9qERsc3oxGqNiJgTEfO6u7urjiKNmpVrepg8YRwRFv6SJHWyejP+pwO1De9/BRzV2jitlZnzM3Pu1KlTq44ijZoVq3vYaovxVceQJEkVq1f4Pw1sV7PtdKG0CVq5Zp2tPCVJUt12nrcBn4yIHYHnyn3HRMRudb4nM/PCJmWTNBKbTwJg4ubjeOUrtqg4jCRJqlq9wv9M4LvAWeV2Au8uH4NJwMJfagc77gfApe+dXXEQSZLUDgYt/DNzEfCGiJgI7AA8RPFDwLWjlE2SJElSk2x04W9mrgIWRcSVwK2Z+XDrY0kasSULYDacceUCDt5jG046eNeqE0mSpAoN+Yq/zDyplUFGQ0TMAebMnDlzo2OlTV7XBABueuBJdtx6y4rDSJKkqjV0A6+ImBgR50XEgohYXj4WRMS55ZKgtmY7T3WUHfZm3fpeVq/rtauPJEka+ox/RGwN3ALsDTwL3F8emgV8DnhPRByemcubnlLSsLywpgeAKVtY+EuS1OkamfH/LLAXRbefGZl5SGYeQnHh70cofiD4TNMTShqeR29nxeqi8HfGX5IkNVL4HwNcnpn/lJnr+nZmZk9mfgW4HDi+2QElDdP6tazvTV6z/RSmT5lQdRpJklSxRqYBdwDurHP8LuD9I4sjqZl223YSP//o4VXHkCRJbaCRGf9lQL07Ae1bjpEkSZLUZhop/K8DTo+I0yIi+nZG4VTgdGB+swNKGr6bH1jG8f/ya5Z2v1h1FEmSVLFGlvp8CjgSmAd8LiIeKPfvSbEMaFE5RlIbCGDJ8hdZ8Ohyujb8rC5JkjrUkGf8M/MpYH/gH4CVwGHlYwVwMXBgZj7dipDNEhFzImJed3d31VGkUfFSVx/beUqS1PEauoFXZnZn5tmZ+ZrM3Lx87JmZ52wK/fu9gZc6zco16+jaLNhyfFfVUSRJUsUaKvwlbVpWru5h8oRxhEt9JEnqeP7+XxqrtpzGjC235MDdplWdRJIktQELf2ms2mEfPjh7D/iLqoNIkqR24FIfSZIkqQNY+Etj1aO38TffuZNP/3Rh1UkkSVIbsPCXxqqJ03ho2UqeW7Wu6iSSJKkNWPhLY9W2r2bF6nX28JckSUCDF/dGxI7AXGAWsA3FzUFrZWYe1aRskkZoxeoepkyw8JckSQ0U/hFxFPATYALwIvDsAMOySbkkjVDvoltY07MrU5zxlyRJNDbjfyHwHHB8Zt7WojwtFRFzgDkzZ86sOorUcpnJW/5se2ZuN7nqKJIkqQ00ssZ/L+DSTbXoB8jM+Zk5d+rUqVVHkVqua7PgGycfwNH7zKg6iiRJagONFP5PA2taFUSSJElS6zRS+F8JHNeqIJKaa8XqHg78wo3c9chzVUeRJEltoJE1/vOAwyPix8CXgT8C6/sPyszHm5RN0gj09CZPrVjD+K7+zbckSVInaqTwf5Cia08Ax9YZ1zWiRJKaYn1v0WRrsu08JUkSjRX+F2C7TmmT8VLhbztPSZJEA4V/Zp7byiCSmqsnewHYaovxFSeRJEntoJGLeyVtQjabMoP/se8rmTDOv+aSJKmxpT5ERAD/k6K7z+7l7kXA1cCVmelSIKlNzNjjdZw/+/VVx5AkSW1iyIV/RGwBXAccQXGB75PlodcCxwAnR8Q7MtNe/1Ib8OdwSZJUq5E1AJ8E3kzRynN6Zs7IzBnAdOBLwF+WYyS1gQdvv553XvafVceQJEltopHC/wTgqsz8u8x8pm9nZj6bmWcBVwHva3ZAScOzdLPt6Qp7+EuSpEIjhf/OwC/qHL+5HCOpDSxhuq08JUnSSxop/JcDe9Q5vns5RlIb6F23hikW/pIkqdRI4X8jcEZEvKX/gYh4M/Ah4IZmBWuFiJgTEfO6u7urjiK13J/13O9deyVJ0ksaKfzPA1YBP4+I2yLim+XjNoqCf1U5pm1l5vzMnDt16tSqo0gtN33yBA7dY9uqY0iSpDbRyJ17/xgRBwBfBN4OHFQeWgX8G3BOZi5uekJJw7LLtIm8/XUzqo4hSZLaREPrAMrC/r0R0QVsX+5+MjPXNzuYpJHpzSQzCTv7SJIkGlvq85LMXJ+Zj5cPi36pDd2x+DmuXrCk6hiSJKlNDDrjHxGvBMjMx2u3N6ZvvKTq2dVHkiT1qVcVPAb0RsTEzFxbbucQXrOrKckkDUvmhr+m9vGXJEl96lUFF1AU+j39tiVtAgKYMmF81TEkSVKbGLTwz8xz621Lan/O+EuSpD5Dvrg3Ik6MiF3rHN8lIk5sTixJIzVp+93ZZvLmVceQJEltopGuPt8F3lDn+CHlGElt4LV778tWW7jUR5IkFRop/DfWDHw80DuCLJKa6MUXV1UdQZIktZFG+/gPeHFvREwG3go8MeJEkprit7f/R9URJElSG6lb+EfEeRGxNiLWUhT93+nbrn0A3cAJwI9GIbOkIVjStVPVESRJUhvZWMuPhRTFfAAnArcDf+w3JoGVwG3A95odUNLwrBg/veoIkiSpjdQt/DPzGuAagLKjz2cz88bRCCZpZKZ2ra46giRJaiNDbvKdmYe1Moik5prV81DVESRJUhtppI//uyLiW3WOXx4RxzUnlqSR2m6rCVVHkCRJbaSRrj5/C3TVOR7AR0YWR1KzTJvkzbskSdIGjRT+ewF31Tl+dzlGUhtYt37A7ruSJKlDNVL4TwLW1zneC0wZWZzWiog5ETGvu7u76ihSyy3t9uJeSZK0QSOF/2Lg0DrHDwUeG1GaFsvM+Zk5d+rUqVVHkSRJkkZVI4X/NcB7I+Lk/gci4v3Ae8oxkiRJktrMkNt5AhcBxwGXR8RHgXvK/bOB1wIPAl9objxJkiRJzdBIH//nI+JQ4IsUs/uvKw89D3wd+ERmunhekiRJakONzPiTmc8BcyPig8D25e4nM7O36ckkjcikGa+pOoIkSWojDRX+fcpCf2mTs0hqom1m7FZ1BEmS1EYaLvwjIoBXA1szwMXBmfmfTcglaYReWLG86giSJKmNNFT4R8RZwMcpiv7B1Lu7r6RR8syDt8NhVaeQJEntYsjtPCPir4GLgfuBTwMBfAW4FFgO3AnMbUFGScPw9MQ9qo4gSZLaSCN9/D8E3AEcDlxW7rs2Mz9G0eHnVdS/s6+kUfTi+FdUHUGSJLWRRgr/vYAfZWYCWe7rAsjMJcDXgDObG0/ScG25zjX+kiRpg0YK//XAyvLrF8rnbWqOLwZmNSGTpCbYdtXDVUeQJEltpJHC/08Uy3nIzDXAY8Abao7vT7HWX1Ib2GbS5lVHkCRJbaSRrj63AG8DPlFuXwX8bURMoPgB4mTg282NJ2m4Jk2wwZYkSdqgkcL/y8DCiNgyM18EPgXsCZxeHr8JOLvJ+SQN0+p13lBbkiRtMOTCPzMfAB6o2V4JvC0ipgHrM7O7BfkkDdOyFWuqjiBJktrIkNb4R8TkiJgXEe/qfywzn7XolyRJktrbkAr/cnb/JGBqa+NIkiRJaoVGuvr8Dti1VUEkSZIktU4U9+MawsCIE4CvAAdn5ibdIDwingIeqdm1LfB0RXHUPjwP5Dkg8DxQwfNAzToHds3M6U14nRFrpKvP7hS9+xdGxLXAg8CqfmMyMy9sVrhW6f8fPyLuzMwDqsqj9uB5IM8BgeeBCp4HGovnQCOF/+drvn73IGMSaPvCX5IkSeo0jRT+s1qWQpIkSVJLNdLHf5Ne178R86oOoLbgeSDPAYHngQqeBxpz50Ddi3sj4iDgocx8dvQiSZIkSWq2jbXzvBU4um+jvJHX9yNir9bGkiRJktRMGyv8o9/2BOAEYIfWxBl9EXF0RPw+Ih6KiHOqzqNqRMTiiLgvIu6JiDurzqPWi4jLI2JZRCys2TctIm6IiAfL562rzKjWG+Q8+ExELCk/D+6JiLdVmVGtFRE7R8TNEfG7iPhtRHyk3O/nQYeocw6Muc+CRm7gNeZERBfwVeCtwF7A+/xtRkc7IjNnj7XWXRrUFdT8RrN0DnBTZs4Cbiq3NbZdwcvPA4BLy8+D2Zl5/Shn0ujqAc7KzL2Ag4EzylrAz4POMdg5AGPss6CjC3+g7xqGRZm5FvghcEzFmSSNgsy8Beh//dIxwLfLr78NHDuqoTTqBjkP1EEyc2lmLii/XgHcD+yInwcdo845MOZ0euG/I/Cnmu3HGKP/o7VRCfxHRNwVEXOrDqPKbJ+ZS8uvnwC2rzKMKvXhiLi3XArkEo8OERG7Aa8HbsfPg47U7xyAMfZZMJR2nm+LiL41/RMpCqR3R8TsAcZmZl7atHTS6HljZi6JiO2AGyLigXImUB0qMzMiBm97prHsMuB8in/vzgf+ETi10kRquYiYDPwYODMzn4/YcJmjnwedYYBzYMx9Fgyl8D+xfNT6wCBjE9iUCv8lwM412zuV+9RhMnNJ+bwsIq6hWAZm4d95noyIGZm5NCJmAMuqDqTRl5lP9n0dEV8HrqswjkZBRIynKPiuzMyry91+HnSQgc6BsfhZsLHC/4hRSVGd3wCzIuJVFAX/Cbz8hxyNcRExCdgsM1eUX/8V8LmKY6ka1wInAxeVzz+tNo6q0FfslZvHAQvrjdemLYqp/W8C92fmJTWH/DzoEIOdA2Pxs6DuDbw6Qdma6UtAF3B5Zn6h4kgaZRGxO3BNuTkO+L7nwdgXET8A3gRsCzwJfBr4CfCvwC7AI8B7vIHh2DbIefAmYDbFb7EXAx+o+cdfY0xEvBH4FXAf0Fvu/gTFGm8/DzpAnXPgfYyxz4KOL/wlSZKkTtDpXX0kSZKkjmDhL0mSJHUAC39JkiSpA1j4S5IkSR3Awl+SJEnqABb+kiRJUgew8JekJomIN0VERsQprRjf7O/f1EXEPhHRExFHVvT+x0TE2oiYVcX7S1KjLPwlqVRTSH+sia85OyI+ExG7Nes1h5mj78+WEfHPg4zZrixkMyJ+OcoRh+MS4NeZeUPtzojYKiJ6yz/HHQN9Y0RMjYhl5Zju8s6dDcnMn1Lc8OeLw0ovSaPMwl+SmucWYEvguzX7ZlPcDXa3IY5vtdXAiRExYYBjJwEB9IxinmGJiEOAIymK//72o/hzvAjsNUhR/xlgq/Lru3P4d7P8MnBcROw9zO+XpFFj4S9JTZKZvZm5OjPXt2J8k1wDbA0cM8CxvwauB9aMYp7h+hDwNEXe/vYrn68BJgG71x6MiD2BM4CflLvuGkGOq4FVwAdH8BqSNCos/CWpjog4pVwO8uaI+FhEPBwRayLiDxFxcr+x/23NfUR8BvhWefjmmqU2Vww0vtw3JSI+HxG3R8TT5Xs9FBEXRcTEJvyRFgD3UhT5tdkPAvauydv/v8OQc0XEFuXypt9HxKqIWB4R90XExY2MGUxEjAOOBW7MzHUDDNm/fL68fH5tv+OXAo8BN9f8NxmWzFwJ/Ap413BfQ5JGy7iqA0jSJuICimU5X6OYEf9fwBUR8VBm/nqQ77kamAHMLb///nL/w3XeZ0fgdODHwPcplt38BfB/gNcDR43sjwEUBfElEbFjZi4p950KLAOua0Kur5av9x2KpTjjgFnAmxscM5j9gcnAgOv3KWb8H6UoyNcB+1DO7kfEO4CjgXcCbyrHj2TGH+BW4KiI2DMzHxjha0lSy1j4S9LQTAAOzMy1ABFxFbAI+DAwYOGfmfdGxK0Uhf8NmfnLIbzPImDnfjPZX42I84FzI+KgzBys4B2q7wF/D5wMXBARWwInAN/IzJ5BrnNtJNdxwL9n5skve5UNhjJmMHuVzy/7ASoiJgOvBq7NzLUR8TvKGf+IGA/8I/CLzLw6Iv4OWAn8YRgZavXl2Buw8JfUtlzqI0lD8y99RT9AOVP+B4pZ6qbJzLV9xXVEjIuIrSNiW+DGcsifN+E9ngGuBU4pdx0PTGXD0piR5uoG9o6IferEGMqYwUwvn58d4Nhsin/b+pbv3MOGpT4fAfYAzoyIzYB9gXsys3cYGWo9Uz5vN8LXkaSWsvCXpKFZNMC+Z4Btmv1GEfGhiLiXYknRs8BTwC/Lw1s36W2+BcyKiDdSLLm5IzN/16RcZ5bb95XXRHyj7Hm/WYNjBtPXgWegX030re+vLfxnRcQuwHnA1zLzPorfCkxmBOv7a/TlGG5nIEkaFRb+kjQ0g3Xeabj/ez3l8pOvAkuBDwBvp2hbeUo5pFmf2z8HllC0Gj2COrP9jeYq+9vvRtEe9BfAX1Kssf9lRGw+1DF1PFU+TxvgWF9Hn9rCfxzwI4rrEs7rN+5l6/sjYpuI+FpEPBkRL0TEnRHxzjp5+nI8VWeMJFXONf6S1FqNzgKfBCwG3lq7BCUijm5qqMz1EfEd4OMU/e5/0MxcmfksxbUE3yv76F9EcSHwMcC/DXXMIBaWzwMts9ofeCIzl5bb95TPBwP/u3zPvnHQb8Y/IqZRXBQ8n2LZ0NPAocA/R8SumTnQfQNm9sslSW3Jwl+SWmtl+TzQ7PRA1lP8sPDSbxLK9pXnNDkXwP8F1gKLMvP5ZuSKiC5gSmYu79uXmRkRd5eb04YyZiNZ7gaepyjma997IrAnxW8z+l53eUScTfHv3WU1w/ej+IHnfv67c4EfZeZna/b9v4g4ErgrIn6YmY/3+56DgScz8/cbyS1JlbLwl6TW+g3QC3wyIrYGXgD+mJm3DzL+KuBC4N8j4mqKu8ueSNGWsqky81GKO9gOxVBzTQGWRsS1FAX6MuBVFO1Pn6OYSR/KmHq515cZjo2ICZnZd8OxfYEu+s3iZ+bfD/Ays4H/GuDmaUdSXOxMRJwOXJSZ22bmExFxE0UL0O/3DS67CB3GRpZKSVI7sPCXpBbKzEcj4lTgbIoZ5/HAt4HBCv+LKWbVTwO+DDxBsT79W0Ddi29bbKi5VgFfoliz/xaKC2iXUnQRujAzHy/X8NcdM4Q8l1FcX/AOinsLwMvX9w8oIvYAXrGxcRStOb+7kTHvBCZS3N9BktpaZNqEQJK06YmInwGTMvOwJr7mJcDyzPxcv/3bU1wIfFDtDyYRsQBYnJnHNyuDJLWKXX0kSZuqs4BDIuKvmvianwdOiIiLImKHiBgfEYdT3K/gkn5F/7EUdwU+u4nvL0kt44y/JEk1ImIb4AKKuwtPpljKdGFm/rjuN0pSm7PwlyRJkjqAS30kSZKkDmDhL0mSJHUAC39JkiSpA1j4S5IkSR3Awl+SJEnqABb+kiRJUgew8JckSZI6gIW/JEmS1AH+PzcbE0UNHnkSAAAAAElFTkSuQmCC\n",
-      "text/plain": [
-       "<Figure size 864x576 with 1 Axes>"
-      ]
-     },
-     "metadata": {
-      "needs_background": "light"
-     },
-     "output_type": "display_data"
-    }
-   ],
-   "source": [
-    "import matplotlib.pyplot as plt\n",
-    "\n",
-    "fig, ax = plt.subplots(nrows=1, ncols=1, figsize=(12,8))\n",
-    "\n",
-    "ax.plot(mass_range, fractions_z002, '--', label='Z=0.02')\n",
-    "ax.plot(mass_range, fractions_z001, '-.', label='Z=0.01')\n",
-    "ax.plot(mass_range, fractions_z0002, '-', label='Z=0.002')\n",
-    "\n",
-    "ax.set_xlabel(r'Initial Mass ($M_{\\odot}$)', fontsize=18)\n",
-    "ax.set_ylabel(r'Fraction of total initial mass lost on main sequence', fontsize=18)\n",
-    "ax.set_title('Fraction of total initial mass lost during main sequence for different metallicities', fontsize=18)\n",
-    "ax.legend()\n",
-    "ax.set_yscale('log')\n",
-    "#save_loop(name='plots/mass_loss_MS.{format}', formats=['pdf', 'png', 'eps'], bbox_inches='tight')\n",
-    "plt.show()"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {
-    "Collapsed": "false"
-   },
-   "outputs": [],
-   "source": []
-  }
- ],
- "metadata": {
-  "kernelspec": {
-   "display_name": "Python 3",
-   "language": "python",
-   "name": "python3"
-  },
-  "language_info": {
-   "codemirror_mode": {
-    "name": "ipython",
-    "version": 3
-   },
-   "file_extension": ".py",
-   "mimetype": "text/x-python",
-   "name": "python",
-   "nbconvert_exporter": "python",
-   "pygments_lexer": "ipython3",
-   "version": "3.6.4"
-  }
- },
- "nbformat": 4,
- "nbformat_minor": 4
-}
diff --git a/examples/notebooks/workshop_example_notebook.pdf b/examples/notebooks/workshop_example_notebook.pdf
deleted file mode 100644
index 3e24ccc14b6e6ad9875420da4498337ad928d5ca..0000000000000000000000000000000000000000
Binary files a/examples/notebooks/workshop_example_notebook.pdf and /dev/null differ
diff --git a/examples/notebooks/basic_example.ipynb b/examples/old/basic_example.ipynb
similarity index 99%
rename from examples/notebooks/basic_example.ipynb
rename to examples/old/basic_example.ipynb
index ab0bd54d76b898f29e6b0bbb07651c415bd192c9..9078cfcb5fdcd35336ee3675accb3f810c21e5fe 100644
--- a/examples/notebooks/basic_example.ipynb
+++ b/examples/old/basic_example.ipynb
@@ -13,7 +13,7 @@
     "import binarycpython\n",
     "from binarycpython.utils.custom_logging_functions import binary_c_log_code\n",
     "from binarycpython.utils.run_system_wrapper import run_system\n",
-    "from binarycpython.utils.functions import example_parse_output\n"
+    "from binarycpython.utils.functions import example_parse_output"
    ]
   },
   {
diff --git a/examples/notebooks/workshop_example_notebook.ipynb b/examples/old/workshop_example_notebook.ipynb
similarity index 99%
rename from examples/notebooks/workshop_example_notebook.ipynb
rename to examples/old/workshop_example_notebook.ipynb
index 163d9c5fc6235fd429ff434c94c410d9a0e52771..4eca5879779a9fec40521c733bda59768c8c4140 100644
--- a/examples/notebooks/workshop_example_notebook.ipynb
+++ b/examples/old/workshop_example_notebook.ipynb
@@ -3,7 +3,7 @@
   {
    "cell_type": "markdown",
    "metadata": {
-    "Collapsed": "false"
+    "tags": []
    },
    "source": [
     "# Binary_c and python example notebook\n",
@@ -16,7 +16,7 @@
    "cell_type": "code",
    "execution_count": 16,
    "metadata": {
-    "Collapsed": "false"
+    "heading_collapsed": "false"
    },
    "outputs": [],
    "source": [
@@ -27,7 +27,7 @@
   {
    "cell_type": "markdown",
    "metadata": {
-    "Collapsed": "false"
+    "heading_collapsed": "false"
    },
    "source": [
     "## Core api wrapper functions:"
@@ -36,7 +36,7 @@
   {
    "cell_type": "markdown",
    "metadata": {
-    "Collapsed": "false"
+    "heading_collapsed": "false"
    },
    "source": [
     "### run_binary()\n"
@@ -46,7 +46,7 @@
    "cell_type": "code",
    "execution_count": 17,
    "metadata": {
-    "Collapsed": "false"
+    "heading_collapsed": "false"
    },
    "outputs": [
     {
@@ -99,7 +99,7 @@
   {
    "cell_type": "markdown",
    "metadata": {
-    "Collapsed": "false"
+    "heading_collapsed": "false"
    },
    "source": [
     "### run_binary_with_log"
@@ -109,7 +109,7 @@
    "cell_type": "code",
    "execution_count": 18,
    "metadata": {
-    "Collapsed": "false"
+    "heading_collapsed": "false"
    },
    "outputs": [
     {
@@ -182,7 +182,7 @@
   {
    "cell_type": "markdown",
    "metadata": {
-    "Collapsed": "false"
+    "heading_collapsed": "false"
    },
    "source": [
     "### run binary with custom logging line"
@@ -192,7 +192,7 @@
    "cell_type": "code",
    "execution_count": 19,
    "metadata": {
-    "Collapsed": "false"
+    "heading_collapsed": "false"
    },
    "outputs": [
     {
@@ -266,7 +266,7 @@
   {
    "cell_type": "markdown",
    "metadata": {
-    "Collapsed": "false"
+    "heading_collapsed": "false"
    },
    "source": [
     "## Using utils functions\n",
@@ -276,7 +276,7 @@
   {
    "cell_type": "markdown",
    "metadata": {
-    "Collapsed": "false"
+    "heading_collapsed": "false"
    },
    "source": [
     "### run_system()\n",
@@ -296,7 +296,7 @@
    "cell_type": "code",
    "execution_count": 20,
    "metadata": {
-    "Collapsed": "false"
+    "heading_collapsed": "false"
    },
    "outputs": [
     {
@@ -382,7 +382,7 @@
   {
    "cell_type": "markdown",
    "metadata": {
-    "Collapsed": "false"
+    "heading_collapsed": "false"
    },
    "source": [
     "### run_system() and custom logging\n",
@@ -394,7 +394,7 @@
    "cell_type": "code",
    "execution_count": 21,
    "metadata": {
-    "Collapsed": "false"
+    "heading_collapsed": "false"
    },
    "outputs": [
     {
@@ -463,7 +463,7 @@
   {
    "cell_type": "markdown",
    "metadata": {
-    "Collapsed": "false"
+    "heading_collapsed": "false"
    },
    "source": [
     "## Other example\n",
@@ -474,7 +474,7 @@
    "cell_type": "code",
    "execution_count": 12,
    "metadata": {
-    "Collapsed": "false"
+    "heading_collapsed": "false"
    },
    "outputs": [],
    "source": [
@@ -521,7 +521,7 @@
    "cell_type": "code",
    "execution_count": 13,
    "metadata": {
-    "Collapsed": "false"
+    "heading_collapsed": "false"
    },
    "outputs": [
     {
@@ -573,7 +573,7 @@
    "cell_type": "code",
    "execution_count": 22,
    "metadata": {
-    "Collapsed": "false"
+    "heading_collapsed": "false"
    },
    "outputs": [
     {
@@ -611,7 +611,7 @@
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
-    "Collapsed": "false"
+    "heading_collapsed": "false"
    },
    "outputs": [],
    "source": []
diff --git a/include/binary_c_python.h b/include/binary_c_python.h
index be717c3b993eb85baac6bf7b7c28a6eecb819432..3fba5fdf3cae65e0eee7c3ae20ca8cee9b452c8c 100644
--- a/include/binary_c_python.h
+++ b/include/binary_c_python.h
@@ -41,7 +41,7 @@ int return_version_info(char ** const outstring,
 
 
 int return_minimum_orbit_for_RLOF(char * argstring,
-                                   long int store_memaddr,
+                                   struct libbinary_c_store_t * store,
                                     char ** const buffer,
                                     char ** const error_buffer,
                                     size_t * const nbytes);
diff --git a/src/binary_c_python.c b/src/binary_c_python.c
index c4df7d76b989aad2235b557844cd11c33dff3755..c10f8dfd030c0ea6823b6c76c1ba10ff5197db94 100644
--- a/src/binary_c_python.c
+++ b/src/binary_c_python.c
@@ -33,21 +33,21 @@
  * https://docs.python.org/3/c-api/arg.html#c.PyArg_ParseTuple
  * https://realpython.com/python-bindings-overview/
  * http://scipy-lectures.org/advanced/interfacing_with_c/interfacing_with_c.html
+ * https://docs.python.org/3.6/c-api/capsule.html#c.PyCapsule_New
+ * https://gist.github.com/Sleepingwell/5259476
+ * https://bfroehle.com/2011/07/18/python-capsules/
+ * https://docs.python.domainunion.de/3.6/howto/cporting.html
+ * https://lappweb.in2p3.fr/~paubert/ASTERICS_HPC/5-6-3-651.html
+ * https://www.geeksforgeeks.org/c-api-from-extension-module-in-python-set-1/
+ * http://pageperso.lif.univ-mrs.fr/~francois.denis/IAAM1/python-3.6.5rc1-docs-html/howto/cporting.html
+ * http://python3porting.com/cextensions.html
+ * 
  * 
  * Open tasks for the Extension:
  * TODO: Put in clear debug statements
  * TODO: properly return stderr
  * TODO: describe all functions with docstrings
  * TODO: properly pass through all the pointers using Capsules:  
-    https://docs.python.org/3.6/c-api/capsule.html#c.PyCapsule_New
-    https://gist.github.com/Sleepingwell/5259476
-    https://bfroehle.com/2011/07/18/python-capsules/
-    https://docs.python.domainunion.de/3.6/howto/cporting.html
-    https://lappweb.in2p3.fr/~paubert/ASTERICS_HPC/5-6-3-651.html
-    https://www.geeksforgeeks.org/c-api-from-extension-module-in-python-set-1/
-    http://pageperso.lif.univ-mrs.fr/~francois.denis/IAAM1/python-3.6.5rc1-docs-html/howto/cporting.html
-    http://python3porting.com/cextensions.html
-    
  */
 
 
@@ -71,32 +71,32 @@ static char module_docstring[] MAYBE_UNUSED =
 
 // Evolution function docstrings
 static char run_system_docstring[] = 
-    "Function to run a system. This is a general function that will be able to handle different kinds of situations: single system run with different settings, population run with different settings, etc. To avoid having too many functions doing slightly different things. \n\nArguments:\n\targstring: argument string for binary_c\n\t(opt) custom_logging_func_memaddr: memory address value for custom logging function. Default = -1 (None)\n\t(opt) store_memaddr: memory adress of the store. Default = -1 (None)\n\t(opt) write_logfile: Boolean (in int form) for whether to enable the writing of the log function. Default = 0\n\t(opt) population: Boolean (in int form) for whether this system is part of a population run. Default = 0.";
+    "Function to run a system. This is a general function that will be able to handle different kinds of situations: single system run with different settings, population run with different settings, etc. To avoid having too many functions doing slightly different things.\n\nArguments:\n\targstring: argument string for binary_c\n\t(opt) custom_logging_func_memaddr: memory address value for custom logging function. Default = -1 (None)\n\t(opt) store_memaddr: memory adress of the store. Default = -1 (None)\n\t(opt) write_logfile: Boolean (in int form) for whether to enable the writing of the log function. Default = 0\n\t(opt) population: Boolean (in int form) for whether this system is part of a population run. Default = 0.";
 
 // Utility function docstrings
 static char return_arglines_docstring[] =
-    "Return the default args for a binary_c system";
+    "Return the default args for a binary_c system\n\nArguments:\n\tNo arguments.";
 static char return_help_info_docstring[] = 
-    "Return the help info for a given parameter";
+    "Return the help info for a given parameter\n\nArguments:\n\tparameter: parameter name.";
 static char return_help_all_info_docstring[] = 
-    "Return an overview of all the parameters, their description, categorized in sections";
+    "Return an overview of all the parameters, their description, categorized in sections\n\nArguments:\n\tNo arguments.";
 static char return_version_info_docstring[] = 
-    "Return the version information of the used binary_c build";
+    "Return the version information of the used binary_c build\n\nArguments:\n\tNo arguments.";
 static char return_minimum_orbit_for_RLOF_docstring[] = 
-    "Returns a string containing the minimum orbit and separation for which a binary system does not RLOF at zams. Please use the wrapper functions in utils for this except when you know what you're doing";
+    "Returns a string containing the minimum orbit and separation for which a binary system does not RLOF at ZAMS. Please use the wrapper functions in utils for this except when you know what you're doing.\n\nArguments:\n\targstring: argument string for binary_c\n\t(opt) store_capsule: capsule containing memory adress for the store object.unction. Default = Null";
 static char return_maximum_mass_ratio_for_RLOF_docstring[] = 
-    "Returns a string containing the maximum mass ratio for which a binary system does not RLOF at zams. Optionally accepts a store_capsule. Please use the wrapper functions in utils for this except when you know what you're doing";
+    "Returns a string containing the maximum mass ratio for which a binary system does not RLOF at ZAMS. Please use the wrapper functions in utils for this except when you know what you're doing.\n\nArguments:\n\targstring: argument string for binary_c\n\t(opt) store_capsule: capsule containing memory adress for the store object.unction. Default = Null";
 
 // other functionality
 static char return_store_memaddr_docstring[] = 
-    "Return the store memory adress that will be passed to run_population";
+    "Return the store memory adress that will be passed to run_population\n\nArguments:\n\tNo arguments.";
 static char return_persistent_data_memaddr_docstring[] = 
-    "Return the store memory adress that will be passed to run_population";
+    "Return the store memory adress that will be passed to run_population\n\nArguments:\n\tNo arguments.";
 
 static char free_persistent_data_memaddr_and_return_json_output_docstring[] = 
-    "Frees the persistent_data memory and returns the json output";
+    "Frees the persistent_data memory and returns the json output.\n\nArguments:\n\tstore capsule: capsule containing the memory adress of the persistent data object (contains the ensemble)";
 static char free_store_memaddr_docstring[] = 
-    "Frees the store memaddr";
+    "Frees the store memaddr.\n\nArguments:\n\tstore capsule: capsule containing the memory adress of the store object";
 static char test_func_docstring[] = 
     "Function that contains random snippets. Do not expect this to remain available, or reliable. i.e. dont use it. ";
 
@@ -110,7 +110,7 @@ static PyObject* python_return_arglines(PyObject *self, PyObject *args);
 static PyObject* python_return_help_info(PyObject *self, PyObject *args);
 static PyObject* python_return_help_all_info(PyObject *self, PyObject *args);
 static PyObject* python_return_version_info(PyObject *self, PyObject *args);
-static PyObject* python_return_minimum_orbit_for_RLOF(PyObject *self, PyObject *args);
+static PyObject* python_return_minimum_orbit_for_RLOF(PyObject *self, PyObject *args, PyObject *kwargs);
 static PyObject* python_return_maximum_mass_ratio_for_RLOF(PyObject *self, PyObject *args, PyObject *kwargs);
 
 // Other function headers
@@ -132,7 +132,7 @@ static PyMethodDef module_methods[] = {
     {"return_help", python_return_help_info, METH_VARARGS, return_help_info_docstring},
     {"return_help_all", python_return_help_all_info, METH_VARARGS, return_help_all_info_docstring},
     {"return_version_info", python_return_version_info, METH_VARARGS, return_version_info_docstring},
-    {"return_minimum_orbit_for_RLOF", python_return_minimum_orbit_for_RLOF, METH_VARARGS, return_minimum_orbit_for_RLOF_docstring},
+    {"return_minimum_orbit_for_RLOF", (PyCFunction)python_return_minimum_orbit_for_RLOF, METH_VARARGS|METH_KEYWORDS, return_minimum_orbit_for_RLOF_docstring},
     {"return_maximum_mass_ratio_for_RLOF", (PyCFunction)python_return_maximum_mass_ratio_for_RLOF, METH_VARARGS|METH_KEYWORDS, return_maximum_mass_ratio_for_RLOF_docstring},
 
     // memory
@@ -386,19 +386,33 @@ static PyObject* python_return_version_info(PyObject *self, PyObject *args)
     return return_string;
 }
 
-static PyObject* python_return_minimum_orbit_for_RLOF(PyObject *self, PyObject *args)
+static PyObject* python_return_minimum_orbit_for_RLOF(PyObject *self, PyObject *args, PyObject *kwargs)
 {
     /* set vars and default values for some */
     char *argstring;
-    long int store_memaddr = -1;
+    PyObject *  store_capsule = NULL;
+
+    static char* keywords[] = {"argstring", "store_capsule", NULL};
 
-    // By using the keywords argument it scans over the given set of kwargs, but if they are not given then the default value is used
     /* Parse the input tuple */
-    if(!PyArg_ParseTuple(args, "sl", &argstring, &store_memaddr))
+    // By using the keywords argument it scans over the given set of kwargs, but if they are not given then the default value is used
+    if(!PyArg_ParseTupleAndKeywords(args, kwargs, "s|O", keywords, &argstring, &store_capsule))
     {
         return NULL;
     }
 
+    // Store
+    struct libbinary_c_store_t * store = NULL;
+    if (store_capsule != NULL)
+    {
+        if (PyCapsule_IsValid(store_capsule, "STORE"))
+        {
+            if (!(store = (struct libbinary_c_store_t *) PyCapsule_GetPointer(store_capsule, "STORE")))
+                return NULL;   
+            debug_printf("Unpacked store pointer %p from capsule\n", store_capsule);            
+        }
+    }
+
     // Setup buffers
     char * buffer;
     char * error_buffer;
@@ -407,7 +421,7 @@ static PyObject* python_return_minimum_orbit_for_RLOF(PyObject *self, PyObject *
     /* Call c-function */
     int out MAYBE_UNUSED = return_minimum_orbit_for_RLOF(
                                         argstring, // String containing the arguments for the system
-                                        store_memaddr, // value for store memaddr
+                                        store, // value for store memaddr
                                         &buffer,
                                         &error_buffer,
                                         &nbytes);
@@ -1054,7 +1068,7 @@ int return_version_info(char ** const buffer,
 }
 
 int return_minimum_orbit_for_RLOF(char * argstring,
-                                   long int store_memaddr,
+                                   struct libbinary_c_store_t * store,
                                    char ** buffer,
                                    char ** error_buffer,
                                    size_t * nbytes)
@@ -1064,23 +1078,20 @@ int return_minimum_orbit_for_RLOF(char * argstring,
      * that leads to RLOF 
      */
 
+
+
     /* memory for system */
     struct libbinary_c_stardata_t *stardata = NULL;
 
-    // Store:
-    /* Check the value of the store_memaddr */
-    struct libbinary_c_store_t *store;
-    if(store_memaddr != -1)
-    {
-        // load the store from the integer that has been passed
-        store = (void*)store_memaddr;
-    }
-    else
+    /* Determine whether to free the store memory adress*/
+    Boolean free_store = FALSE;
+    if (store==NULL)
     {
-        // struct libbinary_c_store_t * store = NULL;
-        store = NULL;
+        debug_printf("Decided to free the store memaddr\n");
+        free_store = TRUE;
     }
-        
+
+    // 
     binary_c_new_system(&stardata,
                         NULL,
                         NULL,
@@ -1108,13 +1119,7 @@ int return_minimum_orbit_for_RLOF(char * argstring,
     /* Put errors in error buffer */
     binary_c_error_buffer(stardata, error_buffer);
  
-    /* Determine whether to free the store memory adress*/
-    Boolean free_store = FALSE; // TODO: fix this. Its using capsules now
-    if (store_memaddr == -1)
-    {
-        debug_printf("Decided to free the store memaddr\n");
-        free_store = TRUE;
-    }
+    //
     Boolean free_persistent_data = FALSE;
 
     /* free stardata (except the buffer) */