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 2b8b0fe1ca46d5a06a73efd23ab144570d88a675..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 8564058641095488be47b9c5a05e3a42bfa0d669..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/environment.pickle b/docs/build/doctrees/environment.pickle
index 9cac40f21767708fbffa9e71ccc2bc19c6d0c692..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 487fd3e3d1542a5bc3225a3cde737626765268bc..0000000000000000000000000000000000000000
Binary files a/docs/build/doctrees/examples.doctree and /dev/null differ
diff --git a/docs/build/doctrees/general_examples.doctree b/docs/build/doctrees/general_examples.doctree
deleted file mode 100644
index e1c0cd131775ba9aff94d24ef4c79963cf4e3d71..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 7a1e57aa7c4d3642e652335e52a163dc78c55582..6954097710a726daade6683f7c30f32b46b5f6eb 100644
Binary files a/docs/build/doctrees/grid.doctree and b/docs/build/doctrees/grid.doctree differ
diff --git a/docs/build/doctrees/index.doctree b/docs/build/doctrees/index.doctree
index 7d628604db8fc2ac7160e98c9ae762d91b6a70e7..c0b1adc8cd9411e63986831be12d8da490a424fc 100644
Binary files a/docs/build/doctrees/index.doctree and b/docs/build/doctrees/index.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
index 8d2bdbf982952c3a9debf9213d52656f2d8fa76e..56f3b153c23064e82863f188906d50243e795715 100644
--- a/docs/build/doctrees/nbsphinx/notebook_population.ipynb
+++ b/docs/build/doctrees/nbsphinx/notebook_population.ipynb
@@ -5,44 +5,82 @@
    "id": "bbbaafbb-fd7d-4b73-a970-93506ba35d71",
    "metadata": {},
    "source": [
-    "# Title page\n"
+    "# 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": null,
+   "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",
-    "from binarycpython.utils.functions import (\n",
-    "    get_help_all,\n",
-    "    get_help,\n",
-    "    create_hdf5,\n",
-    "    output_lines,\n",
-    ")\n",
-    "from binarycpython.utils.custom_logging_functions import temp_dir\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": null,
+   "execution_count": 2,
    "id": "79ab50b7-591f-4883-af09-116d1835a751",
    "metadata": {},
-   "outputs": [],
+   "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": [
-    "#########################################################\n",
-    "# This file serves as an example for running a population.\n",
-    "# The use of help(<function>) is a good way to inspect what parameters are there to use\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(verbose=1)\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",
@@ -51,115 +89,244 @@
     "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",
-    "    # Set companion to low mass\n",
-    "    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.\n",
+    "\n",
+    "\n",
     "    # grid_options\n",
     "    amt_cores=2,  # grid_options\n",
-    "    verbose=1,  # verbosity. Not fully configured correctly yet but having it value of 1 prints alot of stuff\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": "code",
-   "execution_count": null,
-   "id": "0c986215-93b1-4e30-ad79-f7c397e9ff7d",
+   "cell_type": "markdown",
+   "id": "f8d46d19-633d-4911-821d-a59daed31816",
    "metadata": {},
-   "outputs": [],
    "source": [
-    "def parse_function(self, output):\n",
-    "    # EXAMPLE PARSE_FUNCTION\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",
-    "    seperator = \" \"\n",
-    "\n",
-    "    # Create filename\n",
-    "    outfilename = os.path.join(data_dir, base_filename)\n",
-    "\n",
-    "    parameters = [\"time\", \"mass\", \"zams_mass\", \"probability\", \"radius\", \"stellar_type\"]\n",
+    "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",
-    "    # Go over the output.\n",
-    "    for el in output_lines(output):\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",
-    "            print(values)\n",
-    "\n",
-    "            if not len(parameters) == len(values):\n",
-    "                print(\"Amount of column names isnt equal to amount of columns\")\n",
-    "                raise ValueError\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",
-    "            if not os.path.exists(outfilename):\n",
-    "                with open(outfilename, \"w\") as f:\n",
-    "                    f.write(seperator.join(parameters) + \"\\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",
-    "            with open(outfilename, \"a\") as f:\n",
-    "                f.write(seperator.join(values) + \"\\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",
-    "# Creating a parsing function\n",
-    "example_pop.set(\n",
-    "    parse_function=parse_function,  # Setting the parse function thats used in the evolve_population\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": null,
-   "id": "2fa5188e-312f-4a05-aeda-0bd4c00629c8",
+   "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": [
-    "### 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",
-    ")"
+    "# 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": null,
-   "id": "fd197154-a8ce-4865-8929-008d3483101a",
+   "execution_count": 6,
+   "id": "47979841-2c26-4b26-8945-603d013dc93a",
    "metadata": {},
-   "outputs": [],
+   "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",
@@ -211,128 +378,815 @@
   },
   {
    "cell_type": "markdown",
-   "id": "8c96b151-8c3b-4479-969f-6c2f898497a5",
+   "id": "163f13ae-fec1-4ee8-b9d4-c1b75c19ff39",
    "metadata": {},
    "source": [
-    "Exporting of all the settings can be done with .export_all_info()\n",
-    "on default it exports everything, but can be supressed by turning it off:\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",
-    "On default it will write this to the custom_options['data_dir'], but that can be overriden by\n",
-    "  setting use_datadir=False and providing an outfile=<>"
+    "## 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": 5,
-   "id": "ba83443c-64b4-4126-90b3-b1ca76c0f73d",
+   "execution_count": 7,
+   "id": "0c986215-93b1-4e30-ad79-f7c397e9ff7d",
    "metadata": {},
    "outputs": [
     {
-     "data": {
-      "text/plain": [
-       "'/tmp/binary_c_python/example_python_population_result/example_pop_settings.json'"
-      ]
-     },
-     "execution_count": 5,
-     "metadata": {},
-     "output_type": "execute_result"
+     "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": [
-    "example_pop.export_all_info()"
+    "# 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": "ef5b51a1-e56d-4bec-a5c7-b9d5bceeceba",
+   "id": "ae1f1f0c-1f8b-42d8-b051-cbf8c6b51514",
    "metadata": {},
    "source": [
-    "Executing a single system\n",
-    "This uses the M_1 orbital period etc set with the set function"
+    "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": 7,
-   "id": "c0a9aed7-1fc9-4fe3-8bcf-4e987bfc00a9",
+   "execution_count": 8,
+   "id": "fd197154-a8ce-4865-8929-008d3483101a",
    "metadata": {},
    "outputs": [
     {
      "name": "stdout",
      "output_type": "stream",
      "text": [
-      "Creating the code for the shared library for the custom logging\n",
-      "['2.773586668293e+01', '1.33526', '10', '1', '1.72498e-05', '13']\n",
-      "None\n"
+      "adding: parse_function=<function parse_function at 0x7ff3bdf79620> to grid_options\n"
      ]
     }
    ],
    "source": [
-    "output = example_pop.evolve_single()\n",
-    "print(output)"
+    "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": "code",
-   "execution_count": null,
-   "id": "8ea376c1-1e92-45af-8cab-9d7fdca564eb",
-   "metadata": {
-    "tags": []
-   },
-   "outputs": [],
+   "cell_type": "markdown",
+   "id": "91509ce5-ffe7-4937-aa87-6d7baac9ac04",
+   "metadata": {},
    "source": [
-    "## Executing a population\n",
-    "## This uses the values generated by the grid_variables\n",
-    "example_pop.evolve()  # TODO: update this function call"
+    "## 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": "markdown",
-   "id": "ce937b07-7292-4bb1-b2e7-d69e51bdff6e",
+   "cell_type": "code",
+   "execution_count": 9,
+   "id": "8ea376c1-1e92-45af-8cab-9d7fdca564eb",
    "metadata": {
     "tags": []
    },
-   "source": [
-    "Wrapping up the results to an hdf5 file can be done by using the create_hdf5\n",
-    "(<directory containing data and settings>) This function takes the settings file\n",
-    "(ending in _settings.json) and the data files (ending in .dat) from the data_dir\n",
-    "and packing them into an hdf5 file, which is then written into the same data_dir directory"
+   "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": 8,
-   "id": "ad444138-f854-4fdb-8e18-49e35ac9c7e2",
+   "execution_count": 10,
+   "id": "e1f0464b-0424-4022-b34b-5b744bc2c59d",
    "metadata": {},
    "outputs": [
     {
      "name": "stdout",
      "output_type": "stream",
      "text": [
-      "Creating /tmp/binary_c_python/example_python_population_result/example_pop.hdf5\n",
-      "Adding settings to HDF5 file\n",
-      "Adding data to HDF5 file\n"
+      "{'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": [
-    "create_hdf5(data_dir=example_pop.custom_options[\"data_dir\"], name=\"example_pop.hdf5\")\n"
+    "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": null,
-   "id": "34da69bc-fe60-4a9d-b07a-f6cd2f216964",
+   "execution_count": 11,
+   "id": "83f8e519-4f7c-474a-ad95-f175a34fae81",
    "metadata": {},
-   "outputs": [],
-   "source": []
+   "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": {
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
index 08f0c57f12317e7f4149d83f15a4840761b0faaf..2fe6b3d2cc9149c8f3a8350e8ae7e16a7bbf1060 100644
Binary files a/docs/build/doctrees/notebook_population.doctree and b/docs/build/doctrees/notebook_population.doctree differ
diff --git a/docs/build/doctrees/notebooks.doctree b/docs/build/doctrees/notebooks.doctree
deleted file mode 100644
index f123d088aa1dfda9abcccddf71c255d92624ca9c..0000000000000000000000000000000000000000
Binary files a/docs/build/doctrees/notebooks.doctree and /dev/null differ
diff --git a/docs/build/doctrees/population_example.doctree b/docs/build/doctrees/population_example.doctree
deleted file mode 100644
index 6a13c71bb631c06a385ab1128f9652c3c2d2d912..0000000000000000000000000000000000000000
Binary files a/docs/build/doctrees/population_example.doctree and /dev/null differ
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 58baa7f283c772ac85577363d6a94ceb1c3b5702..6178bd94039490c5a55a10a5a7c9e087ecef43ea 100644
--- a/docs/build/html/_modules/binarycpython/utils/custom_logging_functions.html
+++ b/docs/build/html/_modules/binarycpython/utils/custom_logging_functions.html
@@ -87,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>
@@ -171,7 +171,7 @@
 <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 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>
@@ -208,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>
@@ -241,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>
 
@@ -272,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 explicitly.</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>
@@ -316,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 explicitly.</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>
@@ -331,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>
@@ -366,7 +370,7 @@
     <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>
 
@@ -376,16 +380,18 @@
 <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 explicitly.</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>
@@ -455,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>
@@ -478,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 explicitly.</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>
@@ -506,26 +514,32 @@
     <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>
@@ -536,7 +550,7 @@
 
 <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 explicitly.</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 address of the custom logging function in a capsule.</span>
@@ -562,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>
@@ -591,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>
@@ -626,9 +644,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 ea5e186868859966b86c49488f0dc16e245402b8..851e9eb7c21995973e2e0b7e7a7523abc0448676 100644
--- a/docs/build/html/_modules/binarycpython/utils/distribution_functions.html
+++ b/docs/build/html/_modules/binarycpython/utils/distribution_functions.html
@@ -87,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>
@@ -2482,9 +2482,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 1e2d750e9ae4005fac0de60de64ae3664560ea4e..dea1362a7f8d801dd3e01ac2a33611b6a37aec2b 100644
--- a/docs/build/html/_modules/binarycpython/utils/functions.html
+++ b/docs/build/html/_modules/binarycpython/utils/functions.html
@@ -87,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>
@@ -2153,9 +2153,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 c6fdf1d6e3510a24e7a02c6a5ac6dc2d547ba315..e3499d4720f63a169d2219156c463cfa867cf964 100644
--- a/docs/build/html/_modules/binarycpython/utils/grid.html
+++ b/docs/build/html/_modules/binarycpython/utils/grid.html
@@ -87,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>
@@ -205,6 +205,8 @@
     <span class="n">grid_options_defaults_dict</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>
@@ -387,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>
@@ -501,7 +506,7 @@
         <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">        Function that returns the last grid variable</span>
 <span class="sd">        (i.e. the one with the highest grid_variable_number)</span>
@@ -515,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>
@@ -652,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>
@@ -705,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>
@@ -835,7 +841,7 @@
             <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 address</span>
@@ -844,7 +850,7 @@
                 <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>
 
@@ -852,12 +858,12 @@
             <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 address</span>
@@ -866,9 +872,10 @@
                 <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>
@@ -918,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>
@@ -949,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>
@@ -1038,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>
@@ -1052,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>
 
@@ -1062,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>
@@ -1079,7 +1087,6 @@
             <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>
@@ -1101,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>
@@ -1176,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>
@@ -1246,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>
@@ -1298,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>
@@ -1328,7 +1339,7 @@
                 <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 memory address</span>
@@ -1345,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>
@@ -1513,7 +1524,10 @@
             <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>
@@ -1612,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>
@@ -1653,7 +1667,9 @@
             <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>
 
@@ -3160,6 +3176,9 @@
 <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 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>
@@ -3232,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>
@@ -3248,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>
@@ -4046,15 +4069,10 @@
         <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_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>
@@ -4221,9 +4239,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 3349af953a5c102d10b71721546b0730f5a9721c..eaf338168671ffc8a0a3069efcf23a13e3bcfeb0 100644
--- a/docs/build/html/_modules/binarycpython/utils/grid_options_defaults.html
+++ b/docs/build/html/_modules/binarycpython/utils/grid_options_defaults.html
@@ -87,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>
@@ -176,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>
@@ -1005,9 +1007,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 390e89bddbb4c21b7183267e3cf47bd3ef84856a..c0bd299b7a175c7bb273270217ea5c18deb5498e 100644
--- a/docs/build/html/_modules/binarycpython/utils/plot_functions.html
+++ b/docs/build/html/_modules/binarycpython/utils/plot_functions.html
@@ -87,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>
@@ -829,9 +829,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 cfa05a03bd5b80653aa133032183cfad8b37f8d5..52de49e394afa73603617c7bb11fc105b359707f 100644
--- a/docs/build/html/_modules/binarycpython/utils/run_system_wrapper.html
+++ b/docs/build/html/_modules/binarycpython/utils/run_system_wrapper.html
@@ -87,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>
@@ -287,9 +287,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 06d3820d3ae586205a60476fe99b721e0ea86879..ae925983e3bfeae8ecaa57c3e09faf70b235d174 100644
--- a/docs/build/html/_modules/binarycpython/utils/spacing_functions.html
+++ b/docs/build/html/_modules/binarycpython/utils/spacing_functions.html
@@ -87,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>
@@ -209,9 +209,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 8ba8b44261c72ccd2de1722967d6d3c2a4fe0de7..f7eda30338dfc263c512a7da17f734cd64619e03 100644
--- a/docs/build/html/_modules/binarycpython/utils/useful_funcs.html
+++ b/docs/build/html/_modules/binarycpython/utils/useful_funcs.html
@@ -87,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>
@@ -566,9 +566,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 1ed7f7d1c26a073f6a3aa518d9236695444a59fc..a432647e0709e1451a47c43e2eca7dbd9037ac43 100644
--- a/docs/build/html/_modules/index.html
+++ b/docs/build/html/_modules/index.html
@@ -87,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>
@@ -189,9 +189,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 0c1a4dd88ee625380f747f05594385a18ea74e0b..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**: 6068:20210727:8955b541d	**Built on**: Jul 27 2021 22:36:46
+	**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 16e4dc3a0f7b7bcd92dd5e32e85b18e708fdc653..0000000000000000000000000000000000000000
--- a/docs/build/html/_sources/examples.rst.txt
+++ /dev/null
@@ -1,10 +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
-   notebooks
\ 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/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
index 8d2bdbf982952c3a9debf9213d52656f2d8fa76e..56f3b153c23064e82863f188906d50243e795715 100644
--- a/docs/build/html/_sources/notebook_population.ipynb.txt
+++ b/docs/build/html/_sources/notebook_population.ipynb.txt
@@ -5,44 +5,82 @@
    "id": "bbbaafbb-fd7d-4b73-a970-93506ba35d71",
    "metadata": {},
    "source": [
-    "# Title page\n"
+    "# 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": null,
+   "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",
-    "from binarycpython.utils.functions import (\n",
-    "    get_help_all,\n",
-    "    get_help,\n",
-    "    create_hdf5,\n",
-    "    output_lines,\n",
-    ")\n",
-    "from binarycpython.utils.custom_logging_functions import temp_dir\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": null,
+   "execution_count": 2,
    "id": "79ab50b7-591f-4883-af09-116d1835a751",
    "metadata": {},
-   "outputs": [],
+   "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": [
-    "#########################################################\n",
-    "# This file serves as an example for running a population.\n",
-    "# The use of help(<function>) is a good way to inspect what parameters are there to use\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(verbose=1)\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",
@@ -51,115 +89,244 @@
     "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",
-    "    # Set companion to low mass\n",
-    "    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.\n",
+    "\n",
+    "\n",
     "    # grid_options\n",
     "    amt_cores=2,  # grid_options\n",
-    "    verbose=1,  # verbosity. Not fully configured correctly yet but having it value of 1 prints alot of stuff\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": "code",
-   "execution_count": null,
-   "id": "0c986215-93b1-4e30-ad79-f7c397e9ff7d",
+   "cell_type": "markdown",
+   "id": "f8d46d19-633d-4911-821d-a59daed31816",
    "metadata": {},
-   "outputs": [],
    "source": [
-    "def parse_function(self, output):\n",
-    "    # EXAMPLE PARSE_FUNCTION\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",
-    "    seperator = \" \"\n",
-    "\n",
-    "    # Create filename\n",
-    "    outfilename = os.path.join(data_dir, base_filename)\n",
-    "\n",
-    "    parameters = [\"time\", \"mass\", \"zams_mass\", \"probability\", \"radius\", \"stellar_type\"]\n",
+    "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",
-    "    # Go over the output.\n",
-    "    for el in output_lines(output):\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",
-    "            print(values)\n",
-    "\n",
-    "            if not len(parameters) == len(values):\n",
-    "                print(\"Amount of column names isnt equal to amount of columns\")\n",
-    "                raise ValueError\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",
-    "            if not os.path.exists(outfilename):\n",
-    "                with open(outfilename, \"w\") as f:\n",
-    "                    f.write(seperator.join(parameters) + \"\\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",
-    "            with open(outfilename, \"a\") as f:\n",
-    "                f.write(seperator.join(values) + \"\\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",
-    "# Creating a parsing function\n",
-    "example_pop.set(\n",
-    "    parse_function=parse_function,  # Setting the parse function thats used in the evolve_population\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": null,
-   "id": "2fa5188e-312f-4a05-aeda-0bd4c00629c8",
+   "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": [
-    "### 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",
-    ")"
+    "# 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": null,
-   "id": "fd197154-a8ce-4865-8929-008d3483101a",
+   "execution_count": 6,
+   "id": "47979841-2c26-4b26-8945-603d013dc93a",
    "metadata": {},
-   "outputs": [],
+   "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",
@@ -211,128 +378,815 @@
   },
   {
    "cell_type": "markdown",
-   "id": "8c96b151-8c3b-4479-969f-6c2f898497a5",
+   "id": "163f13ae-fec1-4ee8-b9d4-c1b75c19ff39",
    "metadata": {},
    "source": [
-    "Exporting of all the settings can be done with .export_all_info()\n",
-    "on default it exports everything, but can be supressed by turning it off:\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",
-    "On default it will write this to the custom_options['data_dir'], but that can be overriden by\n",
-    "  setting use_datadir=False and providing an outfile=<>"
+    "## 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": 5,
-   "id": "ba83443c-64b4-4126-90b3-b1ca76c0f73d",
+   "execution_count": 7,
+   "id": "0c986215-93b1-4e30-ad79-f7c397e9ff7d",
    "metadata": {},
    "outputs": [
     {
-     "data": {
-      "text/plain": [
-       "'/tmp/binary_c_python/example_python_population_result/example_pop_settings.json'"
-      ]
-     },
-     "execution_count": 5,
-     "metadata": {},
-     "output_type": "execute_result"
+     "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": [
-    "example_pop.export_all_info()"
+    "# 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": "ef5b51a1-e56d-4bec-a5c7-b9d5bceeceba",
+   "id": "ae1f1f0c-1f8b-42d8-b051-cbf8c6b51514",
    "metadata": {},
    "source": [
-    "Executing a single system\n",
-    "This uses the M_1 orbital period etc set with the set function"
+    "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": 7,
-   "id": "c0a9aed7-1fc9-4fe3-8bcf-4e987bfc00a9",
+   "execution_count": 8,
+   "id": "fd197154-a8ce-4865-8929-008d3483101a",
    "metadata": {},
    "outputs": [
     {
      "name": "stdout",
      "output_type": "stream",
      "text": [
-      "Creating the code for the shared library for the custom logging\n",
-      "['2.773586668293e+01', '1.33526', '10', '1', '1.72498e-05', '13']\n",
-      "None\n"
+      "adding: parse_function=<function parse_function at 0x7ff3bdf79620> to grid_options\n"
      ]
     }
    ],
    "source": [
-    "output = example_pop.evolve_single()\n",
-    "print(output)"
+    "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": "code",
-   "execution_count": null,
-   "id": "8ea376c1-1e92-45af-8cab-9d7fdca564eb",
-   "metadata": {
-    "tags": []
-   },
-   "outputs": [],
+   "cell_type": "markdown",
+   "id": "91509ce5-ffe7-4937-aa87-6d7baac9ac04",
+   "metadata": {},
    "source": [
-    "## Executing a population\n",
-    "## This uses the values generated by the grid_variables\n",
-    "example_pop.evolve()  # TODO: update this function call"
+    "## 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": "markdown",
-   "id": "ce937b07-7292-4bb1-b2e7-d69e51bdff6e",
+   "cell_type": "code",
+   "execution_count": 9,
+   "id": "8ea376c1-1e92-45af-8cab-9d7fdca564eb",
    "metadata": {
     "tags": []
    },
-   "source": [
-    "Wrapping up the results to an hdf5 file can be done by using the create_hdf5\n",
-    "(<directory containing data and settings>) This function takes the settings file\n",
-    "(ending in _settings.json) and the data files (ending in .dat) from the data_dir\n",
-    "and packing them into an hdf5 file, which is then written into the same data_dir directory"
+   "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": 8,
-   "id": "ad444138-f854-4fdb-8e18-49e35ac9c7e2",
+   "execution_count": 10,
+   "id": "e1f0464b-0424-4022-b34b-5b744bc2c59d",
    "metadata": {},
    "outputs": [
     {
      "name": "stdout",
      "output_type": "stream",
      "text": [
-      "Creating /tmp/binary_c_python/example_python_population_result/example_pop.hdf5\n",
-      "Adding settings to HDF5 file\n",
-      "Adding data to HDF5 file\n"
+      "{'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": [
-    "create_hdf5(data_dir=example_pop.custom_options[\"data_dir\"], name=\"example_pop.hdf5\")\n"
+    "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": null,
-   "id": "34da69bc-fe60-4a9d-b07a-f6cd2f216964",
+   "execution_count": 11,
+   "id": "83f8e519-4f7c-474a-ad95-f175a34fae81",
    "metadata": {},
-   "outputs": [],
-   "source": []
+   "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": {
diff --git a/docs/build/html/_sources/notebooks.rst.txt b/docs/build/html/_sources/notebooks.rst.txt
deleted file mode 100644
index 8002bcb2bc18ba071f737026c70fa34f8297207b..0000000000000000000000000000000000000000
--- a/docs/build/html/_sources/notebooks.rst.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-Notebooks
-=========
-The notebooks.
-
-
-.. toctree::
-    :maxdepth: 2
-    :caption: Contents:
-
-    notebook_population.ipynb
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 d76fcd53759765e9bc812e63ae60d7d96125f8be..afc5c2ce71cae53196ee37d8fa3b80f2ffa51ced 100644
--- a/docs/build/html/binary_c_parameters.html
+++ b/docs/build/html/binary_c_parameters.html
@@ -40,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="Title page" href="notebook_population.html" /> 
+    <link rel="prev" title="Using the API functionality of binarycpython" href="notebook_api_functionality.html" /> 
 </head>
 
 <body class="wy-body-for-nav">
@@ -89,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>
@@ -197,7 +197,7 @@
 <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>: 6068:20210727:8955b541d      <strong>Built on</strong>: Jul 27 2021 22:36:46</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">
@@ -3460,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="notebook_population.html" class="btn btn-neutral float-left" title="Title page" 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>
   
@@ -3483,9 +3483,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 40bf0c78f733ddd8d7f3fe89b93a46ae7240e96d..ab21c59032571bb6f8a4ddb622d12f18dafae0d8 100644
--- a/docs/build/html/custom_logging_functions.html
+++ b/docs/build/html/custom_logging_functions.html
@@ -102,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>
@@ -204,7 +204,7 @@
 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>
+<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>
@@ -225,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 explicitly.</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>
@@ -239,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>
@@ -270,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 explicitly.</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>
@@ -284,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 explicitly.</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>
@@ -302,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>
@@ -312,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 explicitly.</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>
@@ -323,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
@@ -332,7 +332,7 @@ 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 explicitly.</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>
@@ -366,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 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 explicitly.</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>
@@ -420,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: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 0261d69ff9fcd1941eab66fe03a15ff18a569cf5..7f5ad7906962abaf6fde311bca275cfd07fbd953 100644
--- a/docs/build/html/distribution_functions.html
+++ b/docs/build/html/distribution_functions.html
@@ -102,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>
@@ -911,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: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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/examples.html b/docs/build/html/example_notebooks.html
similarity index 57%
rename from docs/build/html/examples.html
rename to docs/build/html/example_notebooks.html
index 75ebcda6be31fb1f52a01d67a40dd189d52a4fc6..e089e287635d37b63b99ac3588b528c57f29046d 100644
--- a/docs/build/html/examples.html
+++ b/docs/build/html/example_notebooks.html
@@ -7,7 +7,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Examples &mdash; binary_c-python  documentation</title>
+  <title>Example notebooks &mdash; binary_c-python  documentation</title>
   
 
   
@@ -39,7 +39,7 @@
     
     <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="next" title="Running individual systems with binarycpython" href="notebook_individual_systems.html" />
     <link rel="prev" title="useful_funcs module" href="useful_funcs.html" /> 
 </head>
 
@@ -89,10 +89,12 @@
 <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>
-<li class="toctree-l2"><a class="reference internal" href="notebooks.html">Notebooks</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>
@@ -145,13 +147,13 @@
     
       <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
         
-      <li>Examples</li>
+      <li>Example notebooks</li>
     
     
       <li class="wy-breadcrumbs-aside">
         
             
-            <a href="_sources/examples.rst.txt" rel="nofollow"> View page source</a>
+            <a href="_sources/example_notebooks.rst.txt" rel="nofollow"> View page source</a>
           
         
       </li>
@@ -188,10 +190,39 @@
     text-align: unset;
 }
 </style>
-<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="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>
 
@@ -203,7 +234,7 @@
   
     <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="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>
@@ -229,9 +260,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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/functions.html b/docs/build/html/functions.html
index 995bd180d272c39de1f8dfa3f8766d0c828b8835..6fb57785b457f49c1a3f714f6d7a15dca6b76514 100644
--- a/docs/build/html/functions.html
+++ b/docs/build/html/functions.html
@@ -102,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>
@@ -975,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: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 c574cef1cc47975a591b8afcf5bad6935cbda0e2..0000000000000000000000000000000000000000
--- a/docs/build/html/general_examples.html
+++ /dev/null
@@ -1,719 +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 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="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>
-<li class="toctree-l2"><a class="reference internal" href="notebooks.html">Notebooks</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">
-            
-  
-<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="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: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 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: "6068:20210727:8955b541d" 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 8c67f1634361d3885f3de3a64dd9e1fb37da5b2b..99325fce36daf25649d5d4bd1837da05a0741346 100644
--- a/docs/build/html/genindex.html
+++ b/docs/build/html/genindex.html
@@ -87,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>
@@ -385,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>
@@ -449,8 +447,6 @@
       <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>
@@ -508,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>
@@ -648,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>
@@ -672,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_di_stefano_settings">set_moe_di_stefano_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>
@@ -762,9 +760,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 e1256802594797c82ac9256a31b0d5fadcd22702..678f92ce05829d11539e825533709c8e9239b57e 100644
--- a/docs/build/html/grid.html
+++ b/docs/build/html/grid.html
@@ -102,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>
@@ -334,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>
@@ -424,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>Function 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>
@@ -486,6 +457,18 @@ 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>
@@ -531,14 +514,6 @@ in the self.grid_options</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>
@@ -563,8 +538,11 @@ like m1,m2,sep, orb-per, ecc, probability etc.</p>
 <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>
@@ -607,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: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 fe3ca3872288f2e091c2adbbbb7b1606ae026ef9..112c791bf510891b0067ec103dc535438e0efb95 100644
--- a/docs/build/html/grid_options_defaults.html
+++ b/docs/build/html/grid_options_defaults.html
@@ -102,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>
@@ -308,9 +308,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 ec8a52d1b57e1156ab956c170a4b21fbbcc15457..a007d6ba10ab3d7ab81db60616e80ca71c394d9e 100644
--- a/docs/build/html/grid_options_descriptions.html
+++ b/docs/build/html/grid_options_descriptions.html
@@ -88,7 +88,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"><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>
@@ -479,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: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 b615bb2a71ae2d5bfec9d4730af13be485c03f98..2449b34111da6e6dced939c75514f5fa93324df6 100644
--- a/docs/build/html/hpc_functions.html
+++ b/docs/build/html/hpc_functions.html
@@ -102,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>
@@ -239,9 +239,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 07a6be2bccf170df6fbb6dccd451cc5baa7126fe..3cd491f71d4643a7b5c97a1090a9f6e73bc91ab0 100644
--- a/docs/build/html/index.html
+++ b/docs/build/html/index.html
@@ -88,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>
@@ -310,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>
@@ -375,9 +382,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 af71bd8bcce0ce404fb33faeecabe85baa47acd1..b15b9715b205cc11da2ff7fce27eb8fbda9eebfe 100644
--- a/docs/build/html/modules.html
+++ b/docs/build/html/modules.html
@@ -102,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>
@@ -250,9 +250,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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
index ff600f916c7761075de17d326c86358f5ad66cb5..20d542b9002f305bd88d97a16e9a92e91cb60ef6 100644
--- a/docs/build/html/notebook_population.html
+++ b/docs/build/html/notebook_population.html
@@ -7,7 +7,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Title page &mdash; binary_c-python  documentation</title>
+  <title>Running populations with binarycpython &mdash; binary_c-python  documentation</title>
   
 
   
@@ -39,8 +39,8 @@
     
     <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="Notebooks" href="notebooks.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">
@@ -89,13 +89,20 @@
 <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"><a class="reference internal" href="population_example.html">Example of population script</a></li>
-<li class="toctree-l2 current"><a class="reference internal" href="notebooks.html">Notebooks</a><ul class="current">
-<li class="toctree-l3 current"><a class="current reference internal" href="#">Title page</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>
@@ -148,11 +155,9 @@
     
       <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
         
-          <li><a href="examples.html">Examples</a> &raquo;</li>
+          <li><a href="example_notebooks.html">Example notebooks</a> &raquo;</li>
         
-          <li><a href="notebooks.html">Notebooks</a> &raquo;</li>
-        
-      <li>Title page</li>
+      <li>Running populations with binarycpython</li>
     
     
       <li class="wy-breadcrumbs-aside">
@@ -441,41 +446,47 @@ div.rendered_html tbody tr:hover {
     text-align: unset;
 }
 </style>
-<div class="section" id="Title-page">
-<h1>Title page<a class="headerlink" href="#Title-page" title="Permalink to this headline">¶</a></h1>
+<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>[ ]:
+<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.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="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>
-<div class="nbinput nblast docutils container">
-<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[ ]:
+<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">#########################################################</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="c1"># Create population object</span>
+<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">verbose</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">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>
@@ -484,110 +495,186 @@ div.rendered_html tbody tr:hover {
 <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"># 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="nbinput nblast docutils container">
-<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[ ]:
+<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="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"># 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></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="nbinput nblast docutils container">
-<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[ ]:
+<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="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></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>[ ]:
+<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>
@@ -641,34 +728,142 @@ div.rendered_html tbody tr:hover {
 </pre></div>
 </div>
 </div>
-<p>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=&lt;&gt;</p>
+<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>[5]:
+<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="n">example_pop</span><span class="o">.</span><span class="n">export_all_info</span><span class="p">()</span>
+<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 highlight-none notranslate"><div class="highlight"><pre><span></span>[5]:
-</pre></div>
+<div class="prompt empty docutils container">
 </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;
+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>Executing a single system This uses the M_1 orbital period etc set with the set function</p>
+<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>[7]:
+<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="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></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>
@@ -677,30 +872,134 @@ parameters), turn off with include_binary_c_version_info=False include_binary_c_
 </div>
 <div class="output_area docutils container">
 <div class="highlight"><pre>
-Creating the code for the shared library for the custom logging
-[&#39;2.773586668293e+01&#39;, &#39;1.33526&#39;, &#39;10&#39;, &#39;1&#39;, &#39;1.72498e-05&#39;, &#39;13&#39;]
-None
+adding: parse_function=&lt;function parse_function at 0x7ff3bdf79620&gt; to grid_options
 </pre></div></div>
 </div>
-<div class="nbinput nblast docutils container">
-<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[ ]:
+</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">## Executing a population</span>
+<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">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="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>
-<p>Wrapping up the results to an hdf5 file can be done by using the create_hdf5 () 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</p>
+<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>[8]:
+<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">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>
+<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>
@@ -709,20 +1008,508 @@ None
 </div>
 <div class="output_area docutils container">
 <div class="highlight"><pre>
-Creating /tmp/binary_c_python/example_python_population_result/example_pop.hdf5
-Adding settings to HDF5 file
-Adding data to HDF5 file
+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 class="nbinput nblast docutils container">
-<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[ ]:
+</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></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>
 
 
@@ -733,10 +1520,10 @@ Adding data to HDF5 file
   
     <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-right" title="Extra features and functionality of binarycpython" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
       
       
-        <a href="notebooks.html" class="btn btn-neutral float-left" title="Notebooks" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</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>
   
@@ -759,9 +1546,9 @@ Adding data to HDF5 file
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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_population.ipynb b/docs/build/html/notebook_population.ipynb
index 8d2bdbf982952c3a9debf9213d52656f2d8fa76e..56f3b153c23064e82863f188906d50243e795715 100644
--- a/docs/build/html/notebook_population.ipynb
+++ b/docs/build/html/notebook_population.ipynb
@@ -5,44 +5,82 @@
    "id": "bbbaafbb-fd7d-4b73-a970-93506ba35d71",
    "metadata": {},
    "source": [
-    "# Title page\n"
+    "# 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": null,
+   "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",
-    "from binarycpython.utils.functions import (\n",
-    "    get_help_all,\n",
-    "    get_help,\n",
-    "    create_hdf5,\n",
-    "    output_lines,\n",
-    ")\n",
-    "from binarycpython.utils.custom_logging_functions import temp_dir\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": null,
+   "execution_count": 2,
    "id": "79ab50b7-591f-4883-af09-116d1835a751",
    "metadata": {},
-   "outputs": [],
+   "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": [
-    "#########################################################\n",
-    "# This file serves as an example for running a population.\n",
-    "# The use of help(<function>) is a good way to inspect what parameters are there to use\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(verbose=1)\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",
@@ -51,115 +89,244 @@
     "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",
-    "    # Set companion to low mass\n",
-    "    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.\n",
+    "\n",
+    "\n",
     "    # grid_options\n",
     "    amt_cores=2,  # grid_options\n",
-    "    verbose=1,  # verbosity. Not fully configured correctly yet but having it value of 1 prints alot of stuff\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": "code",
-   "execution_count": null,
-   "id": "0c986215-93b1-4e30-ad79-f7c397e9ff7d",
+   "cell_type": "markdown",
+   "id": "f8d46d19-633d-4911-821d-a59daed31816",
    "metadata": {},
-   "outputs": [],
    "source": [
-    "def parse_function(self, output):\n",
-    "    # EXAMPLE PARSE_FUNCTION\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",
-    "    seperator = \" \"\n",
-    "\n",
-    "    # Create filename\n",
-    "    outfilename = os.path.join(data_dir, base_filename)\n",
-    "\n",
-    "    parameters = [\"time\", \"mass\", \"zams_mass\", \"probability\", \"radius\", \"stellar_type\"]\n",
+    "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",
-    "    # Go over the output.\n",
-    "    for el in output_lines(output):\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",
-    "            print(values)\n",
-    "\n",
-    "            if not len(parameters) == len(values):\n",
-    "                print(\"Amount of column names isnt equal to amount of columns\")\n",
-    "                raise ValueError\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",
-    "            if not os.path.exists(outfilename):\n",
-    "                with open(outfilename, \"w\") as f:\n",
-    "                    f.write(seperator.join(parameters) + \"\\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",
-    "            with open(outfilename, \"a\") as f:\n",
-    "                f.write(seperator.join(values) + \"\\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",
-    "# Creating a parsing function\n",
-    "example_pop.set(\n",
-    "    parse_function=parse_function,  # Setting the parse function thats used in the evolve_population\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": null,
-   "id": "2fa5188e-312f-4a05-aeda-0bd4c00629c8",
+   "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": [
-    "### 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",
-    ")"
+    "# 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": null,
-   "id": "fd197154-a8ce-4865-8929-008d3483101a",
+   "execution_count": 6,
+   "id": "47979841-2c26-4b26-8945-603d013dc93a",
    "metadata": {},
-   "outputs": [],
+   "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",
@@ -211,128 +378,815 @@
   },
   {
    "cell_type": "markdown",
-   "id": "8c96b151-8c3b-4479-969f-6c2f898497a5",
+   "id": "163f13ae-fec1-4ee8-b9d4-c1b75c19ff39",
    "metadata": {},
    "source": [
-    "Exporting of all the settings can be done with .export_all_info()\n",
-    "on default it exports everything, but can be supressed by turning it off:\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",
-    "On default it will write this to the custom_options['data_dir'], but that can be overriden by\n",
-    "  setting use_datadir=False and providing an outfile=<>"
+    "## 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": 5,
-   "id": "ba83443c-64b4-4126-90b3-b1ca76c0f73d",
+   "execution_count": 7,
+   "id": "0c986215-93b1-4e30-ad79-f7c397e9ff7d",
    "metadata": {},
    "outputs": [
     {
-     "data": {
-      "text/plain": [
-       "'/tmp/binary_c_python/example_python_population_result/example_pop_settings.json'"
-      ]
-     },
-     "execution_count": 5,
-     "metadata": {},
-     "output_type": "execute_result"
+     "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": [
-    "example_pop.export_all_info()"
+    "# 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": "ef5b51a1-e56d-4bec-a5c7-b9d5bceeceba",
+   "id": "ae1f1f0c-1f8b-42d8-b051-cbf8c6b51514",
    "metadata": {},
    "source": [
-    "Executing a single system\n",
-    "This uses the M_1 orbital period etc set with the set function"
+    "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": 7,
-   "id": "c0a9aed7-1fc9-4fe3-8bcf-4e987bfc00a9",
+   "execution_count": 8,
+   "id": "fd197154-a8ce-4865-8929-008d3483101a",
    "metadata": {},
    "outputs": [
     {
      "name": "stdout",
      "output_type": "stream",
      "text": [
-      "Creating the code for the shared library for the custom logging\n",
-      "['2.773586668293e+01', '1.33526', '10', '1', '1.72498e-05', '13']\n",
-      "None\n"
+      "adding: parse_function=<function parse_function at 0x7ff3bdf79620> to grid_options\n"
      ]
     }
    ],
    "source": [
-    "output = example_pop.evolve_single()\n",
-    "print(output)"
+    "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": "code",
-   "execution_count": null,
-   "id": "8ea376c1-1e92-45af-8cab-9d7fdca564eb",
-   "metadata": {
-    "tags": []
-   },
-   "outputs": [],
+   "cell_type": "markdown",
+   "id": "91509ce5-ffe7-4937-aa87-6d7baac9ac04",
+   "metadata": {},
    "source": [
-    "## Executing a population\n",
-    "## This uses the values generated by the grid_variables\n",
-    "example_pop.evolve()  # TODO: update this function call"
+    "## 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": "markdown",
-   "id": "ce937b07-7292-4bb1-b2e7-d69e51bdff6e",
+   "cell_type": "code",
+   "execution_count": 9,
+   "id": "8ea376c1-1e92-45af-8cab-9d7fdca564eb",
    "metadata": {
     "tags": []
    },
-   "source": [
-    "Wrapping up the results to an hdf5 file can be done by using the create_hdf5\n",
-    "(<directory containing data and settings>) This function takes the settings file\n",
-    "(ending in _settings.json) and the data files (ending in .dat) from the data_dir\n",
-    "and packing them into an hdf5 file, which is then written into the same data_dir directory"
+   "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": 8,
-   "id": "ad444138-f854-4fdb-8e18-49e35ac9c7e2",
+   "execution_count": 10,
+   "id": "e1f0464b-0424-4022-b34b-5b744bc2c59d",
    "metadata": {},
    "outputs": [
     {
      "name": "stdout",
      "output_type": "stream",
      "text": [
-      "Creating /tmp/binary_c_python/example_python_population_result/example_pop.hdf5\n",
-      "Adding settings to HDF5 file\n",
-      "Adding data to HDF5 file\n"
+      "{'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": [
-    "create_hdf5(data_dir=example_pop.custom_options[\"data_dir\"], name=\"example_pop.hdf5\")\n"
+    "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": null,
-   "id": "34da69bc-fe60-4a9d-b07a-f6cd2f216964",
+   "execution_count": 11,
+   "id": "83f8e519-4f7c-474a-ad95-f175a34fae81",
    "metadata": {},
-   "outputs": [],
-   "source": []
+   "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": {
diff --git a/docs/build/html/notebooks.html b/docs/build/html/notebooks.html
deleted file mode 100644
index ab64c80a4ccaf8be6605ac32383fe4398d56ad5d..0000000000000000000000000000000000000000
--- a/docs/build/html/notebooks.html
+++ /dev/null
@@ -1,269 +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>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="Title page" href="notebook_population.html" />
-    <link rel="prev" title="Example of population script" href="population_example.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"><a class="reference internal" href="population_example.html">Example of population script</a></li>
-<li class="toctree-l2 current"><a class="current reference internal" href="#">Notebooks</a><ul>
-<li class="toctree-l3"><a class="reference internal" href="notebook_population.html">Title page</a></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="examples.html">Examples</a> &raquo;</li>
-        
-      <li>Notebooks</li>
-    
-    
-      <li class="wy-breadcrumbs-aside">
-        
-            
-            <a href="_sources/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="notebooks">
-<h1>Notebooks<a class="headerlink" href="#notebooks" title="Permalink to this headline">¶</a></h1>
-<p>The notebooks.</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_population.html">Title page</a></li>
-</ul>
-</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="Title page" 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>
-      
-    </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 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 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: "6068:20210727:8955b541d" 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/objects.inv b/docs/build/html/objects.inv
index 4cb6e0762a38b40838d01448dffae4e83435d428..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 b6caf948e3bb3eb2893d6fef642c80586974eb6d..d8955d7894482744de8189e7860c519f83187d8e 100644
--- a/docs/build/html/plot_functions.html
+++ b/docs/build/html/plot_functions.html
@@ -102,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>
@@ -473,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: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 354a841484911274ecad9d6c728c06f22abd3e1c..0000000000000000000000000000000000000000
--- a/docs/build/html/population_example.html
+++ /dev/null
@@ -1,665 +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 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="Notebooks" href="notebooks.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>
-<li class="toctree-l2"><a class="reference internal" href="notebooks.html">Notebooks</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">
-            
-  
-<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-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="notebooks.html" class="btn btn-neutral float-right" title="Notebooks" 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: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 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: "6068:20210727:8955b541d" 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 eb74bf0b4902dcd64eee1812c38dc848bd4a4864..43da11415cc5827285014f94e54e0bc54fd7b808 100644
--- a/docs/build/html/py-modindex.html
+++ b/docs/build/html/py-modindex.html
@@ -90,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>
@@ -255,9 +255,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 e97273eb05acdca514386b29f76e8d4b2583e1cd..b846653c63d15e830fe3403e8f7733a5f7b05c6c 100644
--- a/docs/build/html/readme_link.html
+++ b/docs/build/html/readme_link.html
@@ -105,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>
@@ -334,9 +334,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 6a5470eb05353d492b3e1ed48a89bd183a3c22e3..eb8f48abaa4f16696ad585a356efb3deda76f21d 100644
--- a/docs/build/html/run_system_wrapper.html
+++ b/docs/build/html/run_system_wrapper.html
@@ -102,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>
@@ -283,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: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 fe57033668fb6bed7e6a042de6314d541254d00c..e620701e47189698ac404882e69a0a53eb23c560 100644
--- a/docs/build/html/search.html
+++ b/docs/build/html/search.html
@@ -89,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>
@@ -194,9 +194,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 e8f9060ba06422c87323c712a3724571fc34681b..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","notebook_population","notebooks","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,nbsphinx:3,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","notebook_population.ipynb","notebooks.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:[14,0,0,"-"],run_system_wrapper:[17,0,0,"-"],spacing_functions:[18,0,0,"-"],stellar_types:[19,0,0,"-"],useful_funcs:[20,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:[6,2,1,""]},"binarycpython.utils.grid.Population":{Moe_di_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_di_stefano_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:[14,1,1,""],dummy:[14,1,1,""],parse_function_hr_diagram:[14,1,1,""],parse_function_masses:[14,1,1,""],parse_function_orbit:[14,1,1,""],plot_HR_diagram:[14,1,1,""],plot_masses:[14,1,1,""],plot_orbit:[14,1,1,""],plot_system:[14,1,1,""]},"binarycpython.utils.run_system_wrapper":{run_system:[17,1,1,""]},"binarycpython.utils.spacing_functions":{"const":[18,1,1,""]},"binarycpython.utils.useful_funcs":{calc_period_from_sep:[20,1,1,""],calc_sep_from_period:[20,1,1,""],maximum_mass_ratio_for_RLOF:[20,1,1,""],minimum_period_for_RLOF:[20,1,1,""],minimum_separation_for_RLOF:[20,1,1,""],ragb:[20,1,1,""],roche_lobe:[20,1,1,""],rzams:[20,1,1,""],zams_collision:[20,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":20,"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,12,15],"13e3":0,"1403":2,"150":[12,15],"15000":[0,5,12,15],"15msun":2,"190":0,"1951":0,"1972":0,"1975":0,"197x":0,"1980":2,"1983":20,"1986":[0,2],"1989":0,"1991":2,"1993":0,"1996":20,"1998":[0,2],"1999":0,"1ckzg0p9":[10,16],"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,"20210727":0,"257":20,"25msun":0,"281":20,"2969346":2,"2msun":0,"3000":0,"30e4":0,"33526":12,"3msun":2,"4000":0,"42msun":0,"44msun":0,"45000000080":[12,15],"4530":5,"45msun":0,"4e3":0,"500":0,"5msun":0,"600000":0,"6068":0,"625":0,"6944":0,"6e1":2,"6e5":0,"6msun":0,"72498e":12,"7619":0,"763":2,"773586668293e":12,"78125":0,"795":2,"80msol":2,"8955b541d":0,"boolean":[0,4,6,8,14,20],"break":0,"case":[0,4,8],"catch":[4,5,8],"char":8,"class":[4,6],"const":[2,6,12,15,18],"default":[0,1,2,4,5,6,7,8,12,15,17],"export":[4,6,12,15],"float":[0,2,4,18,20],"function":[0,1,2,3,5,6,7,8,9,10,11,12,14,15,16,17,18,20],"import":[4,5,6,12,15],"int":[0,1,2,4,6,7,8,18,20],"long":[0,4,6,8,19],"new":[0,2,4,6],"null":[0,4],"paczy\u0144ski":0,"public":[7,10],"return":[1,2,4,6,7,8,14,17,18,20],"short":[0,19],"super":0,"switch":0,"throw":[10,16],"true":[0,4,6,7,8,12,14,15],"try":[0,6,10,16],"while":0,Adding:12,And:[7,10,16,20],For:[0,4,10,14,16],Gas:0,Its:8,NOT:[0,6,17],Not:[8,12,15],One:0,Pms:14,That:0,The:[0,1,2,4,5,6,8,10,12,13,14,15,16,17],Then:[4,10,16],There:[2,5,6,7,8,14],These:[4,8,14],Use:[0,5,6],Used:[0,8,14],Useful:[0,6,7],Uses:[0,18],Was:0,Will:[0,4,6,15,17],With:7,__enter__:4,__exit__:4,_actually_evolve_system:8,_binary_c_bind:[4,5,20],_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,12,15],_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:19,about:[4,6,7,12,15,20],abov:[0,2,4,5,6],absolut:0,abund:0,acceler:0,accept:[4,12,15],access:[2,8],accord:[0,2],accordingli:[12,15],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,20],act:[0,8,12,15],activ:[0,10,16],actual:[0,4,6,8,10,14,16],adam:0,adapt:0,add:[2,4,6,8,12,14,15,18,20],add_grid_vari:[6,12,15],added:4,address:[1,8,20],admittedli:14,adress:[5,20],affect:0,after:[0,6,8],ag89:0,again:[4,6,8,10,16],against:14,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,14,15,16,17],all_info:6,allow:[0,2,4,5,8],allow_nan:4,along:[0,7,8],alot:[12,15],alpha:0,alpha_c:0,alphacb:0,alreadi:6,also:[0,4,5,6,7,10,16,20],altern:[0,8],alwai:[0,2,8],amanda:0,amax:2,amin:2,amount:[0,4,6,7,8,12,15,18],amt_cor:[6,8,12,15],analys:17,analyt:6,andrew:[10,16],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,14],ani:[0,2,4,6,10,16],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,14],arg_dict:4,argopt:0,argpair:4,argstr:5,argument:[0,2,4,5,6,8,12,15,17],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,ask:[0,20],asplund:0,assign:6,assum:[0,14],ast871:0,astronomi:0,astropi:[10,14,16],atom:4,attempt:[4,6],auto:[1,11],autogen_c_logging_cod:[1,5],autogener:5,automat:[0,1,5,7,10,16],avaibl:[10,16],avail:[0,4,8,14],awai:0,axi:[0,14],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,14,16,20],base_filenam:[6,12,15],basic:[5,6],batchmod:0,beasor:0,becaus:[0,2,5,6,8,10,16],becom:[0,1,2,4],been:[0,6,8],befor:[0,6,8,10,12,15,16],behaviour:[4,17],behind:5,belczynski:0,below:[0,8,15],berro:0,bertolami:0,best:[6,8,10,16],beta:0,beta_reverse_nova:0,beta_reverse_novae_geometri:0,better:[0,4,6],between:[0,2,18],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,16],binari:[2,5,6,8,10,12,14,15,16,20],binary_c2:[10,16],binary_c:[1,2,4,5,6,8,12,14,15,17],binary_c_cal:6,binary_c_default:[12,15],binary_c_inline_config:1,binary_c_log_cod:[1,5],binary_c_macro:0,binary_c_output:4,binary_c_paramet:[0,12,15],binary_c_python:[4,6,12],binary_c_task_:0,binary_c_write_log_cod:1,binary_grid:0,binary_star:20,binaryc:[1,4,17],binaryc_config:1,binaryc_json_seri:4,binarycdecod:4,binarycencod:4,binarycpython:[1,2,4,5,6,7,10,12,14,15,16,17,18,20],bind:0,birth:0,bit:2,bivari:0,black:0,black_hol:0,bloecker:0,blog:1,boltzman:14,boltzmann:0,bondi:0,bondi_hoyle_accretion_factor:0,bool:[4,6,7,14],born:0,bosswissam:4,both:[0,4],bottom:0,bound:[2,18],boundari:2,brake:0,branch:[0,4],branch_david:0,branchpoint:6,breakup:0,broken:0,bse:[0,2],bse_opt:[6,12,15],bsf:0,buffer:0,build:[0,1,4],build_q_tabl:2,built:[0,1,4,10,16],burn:0,busso:0,bye:0,c13_eff:0,c_auto_log:[8,15],c_log:0,c_logging_cod:[8,12,15],calc_e_integr:2,calc_p_integr:2,calc_period_from_sep:20,calc_sep_from_period:[12,15,20],calc_total_probden:2,calcul:[0,2,4,6,8,20],calculate_constants_three_part_powerlaw:2,call:[0,1,4,6,8,12,14,15,17],call_binary_c_config:4,can:[0,1,2,4,5,6,8,10,12,14,15,16,17],cannot:6,canon:8,cap:0,capsul:[1,4],captur:[0,4],carbon:0,carbon_oxygen_white_dwarf:0,carlo:[0,8],carrasco:0,carri:0,cast:[4,5],catchtim:4,categoris:4,caught:4,caus:20,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,16],cf_amanda_log:0,cflag:[10,16],chabrier:2,chandrasekhar:0,chandrasekhar_mass:0,chang:[0,1,2,4,6,7,8,10,15,16],chapter:[0,3,8,11],cheb:0,check:[0,2,4,6,7,12,15,20],check_circular:4,chemic:0,chen:0,child:4,choic:[0,2,6,14],choos:[0,5,14],chosen:6,circular:0,circumbinari:0,circumstanti:0,claei:0,clark:0,clean:[1,6,10,16],clean_up_custom_logging_fil:6,clear:4,clock:4,clone:[10,16],close:0,cloud:0,cls:4,cluster:9,cmdline:6,code:[0,1,3,5,6,7,10,12,14,15,16,17],collaps:0,collapsar:0,collect:20,collid:20,color:14,color_by_index:14,colour:0,colour_log:0,column:[5,12,14,15],com:[1,4],combin:[1,4,6,8],combine_ensemble_with_thread_join:8,come:[2,10,16,18],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,16],commandlin:[12,15],commit:4,common:[0,12,15],companion:[0,12,15],compar:[0,8],compil:[1,5,10,12,15,16],compile_shared_lib:1,complain:[12,15],complex:[5,6,8,14],compon:[4,14],comput:[0,9],condit:[5,6,12,15],condor:[6,8,9],condor_grid:6,config:[1,4,8,10,16],config_fil:1,configur:[2,5,6,12,15],conserv:0,consid:[0,1,2,4,6,8,14],constant:[0,2,14],construct:[0,1,5],contain:[0,1,2,3,4,6,7,8,9,10,11,14,15,16,17,18,19],content:[4,10,13],context:4,continu:6,control:0,convect:0,converg:0,convert:[2,4,6],convert_byt:4,cool:0,copi:[0,6,20],core:[0,6,8,14],core_helium_burn:0,core_mass:0,correct:[2,6,14,20],correctli:[5,10,12,14,15,16],correspond:14,corretor:0,cosmic:2,cosmic_sfh_madau_dickinson2014:2,could:[0,4],count:[4,8],count_keys_recurs:4,counter:8,coupl:0,cours:14,coverag:[10,16],cowd:0,cpu:0,crap_paramet:0,creat:[2,4,6,12,15],create_and_load_logging_funct:[1,5],create_arg_str:4,create_hdf5:[4,12,15],critic:0,cross:0,ctype:1,cuntz:0,current:[0,4,10,16],custom:[0,1,4,5,6,8,12,14,15,17],custom_log:[5,6,8],custom_logging_cod:[1,5,17],custom_logging_func_memaddr:[5,8],custom_logging_funct:[5,8,10,11,12,15],custom_logging_info:6,custom_opt:[6,12,15],custom_sort_dict:4,custom_tmp_dir:1,customis:14,cut:5,cvode:0,dai:[0,2,5,12,15,20],damp:0,dat:[0,4,12,15],data:[0,4,5,6,8,12,15,17],data_dict:2,data_dir:[4,6,8,12,15],datadir:6,datafram:[5,14],dataset:4,date:6,david:[0,10,16],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,12,15],default_to_metal:0,defaultdict:4,defer:0,defin:[0,1,2,6,14],definit:[1,20],degener:0,degre:0,delta_mcmin:0,den:0,densiti:2,depend:[0,2,10,14,16],deprec:0,dermin:0,describ:[0,2,5,8],descript:[0,2,4,8,10,11],design:[6,14],desir:0,destruct:6,detail:[0,4],detect:0,determin:[0,6,20],deton:0,dev:0,develop:1,deviat:2,dewi:0,dex:0,df2:5,diagnost:8,diagram:[0,14],dickonson:2,dict2:4,dict:[1,2,4,6,7,12,15,19],dict_1:4,dict_2:4,dictionari:[1,2,4,6,7,8,14,19],did:[4,10,16],differ:[0,4,6,10,14,16],dimmer:0,dir:[10,16],direct:[0,6],directli:[4,5,8],director:8,directori:[0,4,6,8,10,12,15,16],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,16],distefano:2,distribut:[0,2,6,9],distribution_funct:[10,11],divid:9,dlnm1:[6,12,15],dlog10per:[12,15],dlogp:2,do_dry_run:8,doc:[4,7,10,16],doc_fetch:2,docstr:[10,14,16],document:[4,7,8,11],doe:[0,2,4,6,8,20],doesn:[6,8],doesnt:[5,7],doing:[0,1,6,7,10,16],don:[2,4,8],done:[0,4,5,6,10,12,15,16],donm:[12,15],donor:[0,20],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:5,dphasevol:[6,12,15],dr2:0,dr3:0,drai:0,dredg:0,dry:8,dstep:2,dtfac:0,dtlimit:4,dtm:[1,12,15],dtype:5,due:[10,16],dummi:[2,14],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,14,15,20],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,16],eggleton:[0,20],either:[0,4,5,6,8,10,16,17],eject:0,eld:0,eldridg:0,electon:0,electron:0,element:[0,1,4,8,14],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,12,15],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,16],enthalpi:0,entir:5,entri:[4,6],env:[10,14,16],envelop:0,equal:[4,12,15],equat:0,equation_of_state_algorithm:0,equation_of_state_paczynski:0,equatori:0,equival:8,errno:[10,16],error:[0,4,8,10,16],esa:2,escap:0,escape_fract:0,escape_veloc:0,eta:0,etal:0,etc:[0,4,6,9,10,12,14,15,16,17],euler:0,evalu:[2,6,20],evan:0,evapor:0,evaporate_escaped_orbiting_object:0,event:0,everi:[0,10,16],everyth:[6,8,12,15],everytim:[10,16],evid:0,evolut:[0,1,5,6,8,14],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,12,15],evolve_popul:[6,12,15],evolve_singl:[6,12,15],exact:[1,4,8],exactli:0,exampl:[1,2,4,6,12,17],example_head:4,example_header_1:5,example_header_2:5,example_log:17,example_log_co:1,example_parse_output:[4,5],example_pop:[12,15],example_pop_set:12,example_python_population_result:[12,15],exce:[0,8],except:[4,6,7,8,14],execut:[0,6,8,10,12,15,16],exist:[0,6,7,12,15],exist_ok:[4,12,15],exit:[0,4],exp:[6,12,15],expand:17,expect:[10,16],experiment:[0,4],explain:4,explicitli:[0,1],explod:0,explos:0,expoenti:0,expon:0,export_all_info:[6,12,15],express:0,extend:[10,16],extern:0,extra:[0,6,8,17],extra_text:7,extract:[4,12,15],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,16],fail_sil:4,failed_system:8,failed_system_log:8,failed_systems_threshold:8,failur:0,fals:[0,4,6,8,12,14,15],fancy_parsing_funct:17,far:0,farmer:0,fase:[12,15],fast:0,feed:8,ferguson:0,few:0,field:0,fig:[0,2],figur:[8,14],file:[0,1,4,6,7,8,9,10,12,14,15,16,17],file_log:0,filehandl:7,filenam:[0,1,4,5,6,8,12,15,17],filenotfounderror:[10,16],filepath:1,fill:6,fill_data:2,filter:[0,4],filter_arg_dict:4,filter_valu:4,fin:0,find:[4,6,8,10,16],finish:[4,14],first:[0,2,4,6,10,16,20],first_giant_branch:0,fishlock:0,fit:[0,2,4,6,20],fix:[0,2,4,6,14],flag:[0,1,4,8],flash:0,flat:[2,8],flatsect:[2,12,15],flaw:6,float64:5,float_overflow_check:0,flto:[10,16],fold:2,follow:[0,2,4,8,10,14,16],forc:[0,10,16],force_circularization_on_rlof:0,force_corotation_of_primary_and_orbit:0,form:[0,4,6,7],formal:0,format:[0,2,4,5,6,12,15],format_ensemble_result:6,formula:0,forward:0,found:[2,10,16],four:0,fpic:1,fraction:[0,2,8],frequenc:0,friction:0,fring:0,from:[0,2,4,5,6,8,12,14,15,20],from_binary_c_config:1,from_dict:5,ftz:[10,16],full:[4,6,8],full_path:4,fulli:[12,15],func_memaddr:5,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,16],gce:0,gener:[0,1,2,4,5,6,7,8,12,14,15],general_info:4,generalis:2,geometr:0,gerosa:0,get:[0,2,4,5,6,7,10,12,15,16,17,20],get_arg_kei:4,get_default:4,get_help:[4,12,15],get_help_al:[4,6,12,15],get_help_sup:4,get_integration_constant_q:2,get_max_multipl:2,get_moe_di_stefano_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,20],given:[0,1,2,4,5,6,8,17,20],global:[0,2],global_dict:2,gmax:2,gmin:2,goe:[0,4,6,14],gogo:0,going:[10,16],goldman:0,gonna:2,good:[0,8,12,15,20],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,12,15],grid_class:[10,11],grid_cod:6,grid_opt:[6,8,12,15],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,12,15],grid_variable_numb:6,gridcode_filenam:8,gridtyp:6,group:4,gsl:[10,16],gsl_dir:[10,16],guess:[0,2],h5py:[10,16],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,15,17,20],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,14,15,16],hbb:0,hbbtfac:0,hdf5:[4,12,15],hdf5file:4,header:[1,4,5,12,15],headerlin:[12,15],headlin:8,hegb:0,hehg:0,height:[2,12,15],helium:0,helium_flash_mass_loss:0,helium_white_dwarf:0,help:[0,4,7,12,15],help_al:0,hem:0,henc:0,hendrik:[10,16],here:[1,4,5,6,8,12,14,15],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,16],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:14,hrd:0,hrdiag:0,hrdiag_output:0,html:[10,16],http:[0,1,2,4],hurlei:0,hut:0,hybrid:0,hydro:0,hydrogen:0,ibc:0,idea:14,idum:0,ignit:0,ignor:[0,5,6,8,10,16],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:[12,15],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,14,16],include_binary_c_default:[6,12,15],include_binary_c_help_al:[6,12,15],include_binary_c_version_info:[6,12,15],include_default:6,include_popul:[12,15],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,14,15,16],inform:[0,1,4,6,7,12,14,15],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,14,20],input_dict:4,insert:6,insid:0,inspect:[4,12,14,15],inspect_dict:4,inspir:[1,5,14,20],instabl:0,instanc:[4,12,15],instant:0,instantli:0,instead:[0,4,8],integ:[0,6,8,20],integr:2,integrals_str:2,interact:[0,7],interfac:[4,10,16],interfer:[10,16],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:20,involv:0,inward:0,is_capsul:4,isn:[4,6],isnt:[12,15],isotop:[0,4],isotope_hash:6,isotope_list:6,item:1,iter:4,its:[0,4,6,7,10,14,16,17],itself:[4,8,10,16],iwamoto:0,izzard2012_period_distribut:2,izzard:[0,10,16],jager:0,jaschek:2,jeff:[10,16],jia:0,job_queu:6,john:0,join:[12,15],jordi:0,json:[4,6,8,12,15],jsondecod:4,jsonencod:4,jul:0,jupyt:[10,16],just:[0,2,4,5,6,8,20],kap:0,kappa:0,kaps_rentrop:0,karaka:0,keep:6,kei:[1,2,4,6,7,8,14],kelvin:0,keplerian:0,keyword:[14,17],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,12,15],kim:0,kind:0,kippenhahn:0,know:[0,1,6,7],known:[0,2,6,12,15,17],kroupa2001:[2,6],kroupa:2,ktg93:2,kwarg:[6,14,17],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,law_const:2,lbv:0,ld_library_path:[10,16],lead:[0,20],least:[10,16],leav:0,left:0,legaci:0,legacy_yield:0,len:[12,15],lengthen:0,less:[0,1,2],let:6,level:[1,4,6],li7:0,lib:[5,10,16],libbinary_c:8,libgsl:[10,16],libmemo:[10,16],librari:[0,1,5,6,8,12,17],library_path:[10,16],librinterpol:[10,16],lies:0,lifetim:0,lifshitz:0,like:[0,1,4,5,6,8,10,14,16,18],limit:[0,14],line:[1,4,5,6,8,10,14,16],linear2:8,linear:[0,2,8],linear_extrapolation_q:2,linearli:[6,18],linker:1,linspac:18,list:[0,1,2,4,8,17,18],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,12,15],load:[0,1,4,5,6,8,12,14,15],load_logfil:4,lobe:[0,20],local:2,locat:[0,2,8,10,16],lodder:0,log10:[0,2,12,15],log10m1:8,log10p:2,log10per:[12,15],log10pmin:2,log:[0,1,2,4,5,6,8,10,12,14,15,16,17,20],log_arg:8,log_args_dir:8,log_fil:8,log_filenam:[0,5,17],log_runtime_system:8,logarithm:2,logensembletim:0,logfil:[4,10,16],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,12,15],look:[1,4,10,16],lookback:0,loon:0,loop:6,loos:14,lose:0,loss:0,lost:0,lot:[4,8,17],low:[0,2,12,15],low_mass_m:0,low_mass_main_sequ:0,lower:[0,2,6,18],lsoda:0,lsun:[0,14],lugaro:0,luminos:[0,14],luminosity_1:14,luminosity_2:14,lynnett:0,m_1:[0,5,6,12,15,17],m_2:[0,5,12,15],m_3:0,m_4:0,m_max:[2,6],m_min:6,m_re:5,maccretor:0,machin:[8,10,16],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,16],main_sequ:0,mainli:9,major:0,make:[0,1,2,4,5,6,8,10,12,14,15,16,17],make_build_text:4,makedir:[4,12,15],manag:[4,10,16],mani:[0,6,8],manufactur:0,map:8,maria:0,mass:[0,1,2,4,5,6,8,12,14,15,17,20],mass_1:[5,14],mass_2:[5,14],mass_accretion_for_eld:0,mass_accretor:20,mass_donor:20,mass_evolut:14,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,14],match:[0,4,14],materi:0,math:[6,12,15],matplotlib:[10,14,16],matter:0,mattsson:0,mattsson_mass_loss:0,mattsson_orich_tpagbwind:0,max:[0,2,12,15],max_bound:[2,18],max_evolution_tim:[0,1,5,12,15],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,20],maximum_mass_ratio_for_instant_rlof:0,maximum_mass_ratio_for_rlof:20,maximum_mcbagb_for_degenerate_carbon_ignit:0,maximum_nuclear_burning_timestep:0,maximum_timestep:0,maximum_timestep_factor:0,maxmimum:0,maxwellian:0,mayb:14,mayor:2,mc13_pocket_multipli:0,mch:0,mcmin:0,mdonor:0,mean:[0,2,4,6,8,10,16],meant:8,measur:4,medium:0,mega:2,memaddr:5,memori:[1,5,6,8,20],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,16],mesasdk_init:[10,16],mesasdk_root:[10,16],messag:4,mestel:0,met:6,metal:[0,2,5,20],method:[0,5,6,8],meynet:0,might:[4,6,10,16],milki:0,miller:0,min:[2,12,15],min_bound:[2,18],min_p:2,min_per:2,min_val:2,mind:5,minimal_verbos:4,minimum:[0,2,4,8,20],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:20,minimum_separation_for_instant_rlof:0,minimum_separation_for_rlof:20,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:20,model:[0,1,5,8,12,15],modifi:0,modul:[0,7,8,11],modulo:8,moe:[2,4,6,10],moe_di_stefano_2017:6,moe_di_stefano_2017_multiplicity_fract:2,moe_di_stefano_2017_pdf:2,moment:[0,12,15,18],momenta:[0,14],momentum:0,mont:[0,8],monte_carlo_kick:0,more:[0,1,4,5,6,8,10,14,16,18],most:4,mostli:[4,5,7,8,12,14,15,17],move:0,msun:[0,2,5],much:[0,4],multi: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,multiply_values_dict:4,multiprocess:[6,8],must:[0,2],my_header_lin:15,my_sss2:5,my_stellar_data:[1,5,12,15],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,12,15,17,19],natur:0,nauenberg:0,nearer:0,nebula:0,necessari:[4,5,6,12,15],need:[0,2,5,6,10,12,15,16],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,12,15],neutron_star:0,never:0,newer:[0,2],newli:0,newopt:2,newton:0,next:4,nice:[1,6,14,15],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,12,20],nonzero:8,nor:0,norm:8,normal:[0,4],normalis:[2,8],normalize_dict:2,normalize_multipl:8,note:[0,5,8],notebook:[10,16],noth:[6,8],notifi:17,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,16],numer:4,numpi:[4,5,10,16,18],obj:4,object:[0,4,6,8,9,12,14,15],object_hook:4,object_pairs_hook:4,obtain:0,occur:[0,20],off:[0,5,12,15],offset:0,ohio:0,old:8,old_solut:[10,16],omega:0,onc:0,one:[0,4,5,6,8,14],onewd:0,onli:[0,4,5,6,8,20],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:[12,15],opm:2,opt:[2,4],option:[0,1,2,4,5,6,10,11,12,15,16,20],orb:6,orbit:[0,2,12,14,15,20],orbit_evolut:14,orbital_inclin:0,orbital_inclinationi:0,orbital_period:[0,5,12,15,20],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,16],other:[0,1,2,4,7,8,10,12,14,15,16],otherwis:[0,6,7,8],out:[4,7,8],outcom:0,outer:0,outfil:[6,12,15],outfile_nam:1,outfilenam:[12,15],output:[1,4,5,6,8,10,12,14,15,16,17,20],output_dir:6,output_fil:[4,7],output_filenam:6,output_lin:[4,12,15],outsid:[0,2],outward:0,over:[4,6,12,15],overflow:0,overlap:4,overrid:[2,5],overriden:[12,15],overshoot:0,overspin_algorithm:0,overspin_bs:0,overspin_massloss:0,own:[5,6,8,10,16],oxygen:0,oxygen_neon_white_dwarf:0,pack:[12,15],packag:[4,10,16,18],paczynski:0,page:[0,10,13,16],pair:[0,4],panda:[4,5,10,14,16],pane:14,panel:0,paper:0,param_nam:4,paramet:[1,2,4,6,7,8,10,12,14,15,17,18,20],parameter_nam:[4,6,12,15],parameter_value_input_typ:4,pars:[4,5,6,12,14,15,17],parse_binary_c_version_info:4,parse_cmdlin:6,parse_const:4,parse_float:4,parse_funct:[6,8,12,15,17],parse_function_hr_diagram:14,parse_function_mass:14,parse_function_orbit:14,parse_int:4,parse_output:5,parsec:2,part:[2,5,6,20],partial:0,particularli:0,pasp:2,pass:[5,6,8,10,14,16,17],path:[4,8,10,12,15,16],patho:[10,16],pdf:[0,2,10,16],pend:0,per:[0,4,6,8,12,15,20],percentag:0,peret:0,perform:0,perhap:0,periastron:0,pericent:20,period:[0,2,5,12,14,15,20],period_str:2,perl:1,pgo:0,phase:0,phasevol:0,phdi:0,photoevapor:0,php:2,physic:[12,15],pick:14,piec:[5,6],pinnsonneault:0,pisn:0,pkg:[10,16],place:0,placehold:14,plai:[0,6],plan:8,planetari:0,plaw2:8,pleas:[0,4],plot:[0,5,14],plot_funct:[10,11],plot_hr_diagram:14,plot_hr_diagram_singl:14,plot_mass:14,plot_orbit:14,plot_system:14,plot_typ:14,pls:6,plu:0,pms:14,pms_mass_1:14,pms_mass_2:14,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,6,10,16],poisson:[2,8],pol:0,polytrop:0,popul:[0,2,6,7,9,10,12,16,18],population_id:8,population_set:6,posit:[0,2],possibl:[0,1,2,4,7,10,16],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,14],pre_events_stardata:0,pre_main_sequ:0,pre_main_sequence_fit_lob:0,precis:4,precod:[6,12,15],predefin:2,predict:8,predictor:0,prefer:[0,6],prefix:0,prepar:2,prepare_dict:2,prescript:0,prescrit:0,present:[2,4,6,12,15],preserv:0,preset:14,pressur:0,prevent:[0,8],previou:4,previous_stardata:1,primari:[1,2,6,12,15,20],print:[4,5,7,8,12,15],print_help:4,print_info:7,print_option_descript:7,print_structur:4,printf:[1,5,12,15],prior:0,privat:[6,7,10],prob_dict:2,probability_weighted_mass:8,probabl:[0,1,2,6,7,8,12,14,15],probdist:[6,12,15],problem:0,process:[0,4,5,6,8],profil:0,progenitor:0,program:[10,16],project:0,proper:7,properli:0,properti:[0,4,8,14],prot1:0,prot2:0,prot3:0,prot4:0,provid:[0,2,6,8,12,15,17],pseudorandom:0,puls:[0,20],pulsat:0,pump:0,purpos:[8,14],put:[1,4,5,6,8,12,14,15],py_rinterpol:[10,16],pyenv:[10,16],pysiz:4,pytest:[10,16],python3:[5,10,16],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:14,queue:[6,8],quit:[0,4],r_l:20,radi:0,radiat:0,radii:[0,20],radiu:[0,1,12,14,15,20],radius_1:14,radius_2:14,ragb:20,raghavan2010_binary_fract:2,raghavan:2,rai:0,railton:0,rais:[0,4,8,12,15],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,18],rapidli:0,rappaport:0,rate:[0,2],rather:[0,4,6,8,10,16],ratio:[0,2,12,15,20],raw:[4,5,6,8,14,17],raw_output:4,reach:0,reaction:0,read:4,real:6,realli:[0,6,7,8],reason:0,rebuild:[0,10,16],rebuilt:[10,16],recalcul:0,receiv:4,recombin:0,recommend:[1,6],recompil:[10,16],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:14,region:0,reignit:0,reimer:0,reinstal:[10,16],reject:0,rejects_in_log:0,rejuven:0,rel:0,relat:0,releas:[4,10,16],remain:0,remesh:0,remnant:0,remov:[0,4,6],remove_fil:4,renormalis:2,rentrop:0,repeat:[0,8],repo:[10,16],report:0,repres:8,represent:[4,6],reproduc:0,requir:[0,2,4,5,14,15,17],reset:0,reset_pref:0,reset_star:0,reset_stars_default:0,resolut:[0,6,8,12,15],resolv:0,reson:0,respect:[0,2],respons:6,rest:[2,6],restructuredtext:4,result:[0,1,2,4,5,6,8,10,12,15,16],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:20,return_minimum_orbit_for_rlof:20,return_population_set:6,return_version_info:4,revap_in:0,revap_out:0,revers:[0,14],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,20],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,20],robert:[10,16],roch:[0,20],roche_lob:20,rochelob:20,room:6,root:[10,16],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,14],row:14,rring:0,rssd:2,rst:[4,7],rsun:14,rubric:6,run:[0,1,4,5,6,8,10,12,15,16,17],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,14,17],run_system_wrapp:[5,10,11],run_zero_probability_system:8,runtim:[1,8],russel:0,rzam:20,s_option:8,sai:0,said:0,same:[0,4,5,8,10,12,15,16],sampl:[0,2,6,18],sample_valu:2,sampler:10,sana12:[2,12,15],sana:2,save:[0,1,2,12,15],save_pre_events_stardata:0,scalo:2,scanf:0,scene:5,scheme:0,schneider:0,schroeder:0,script:[3,5,10,16],sdb:0,sdist:[10,16],sdo:0,search:10,second:[0,2,4,14],secondari:[2,20],section:[2,4,9,10,16],see:[0,5,6,10,14,16],seed:0,seem:[10,14,16],seen:4,segment:18,seitenzahl2013_model:0,seitenzahl:0,select:[0,4,5],selected_head:[4,5],selector:0,self:[6,8,12,15],semi:0,sent:0,sentenc:1,sep:[2,5,6,12,15,20],sep_max:[12,15],sep_min:[12,15],separ:[0,2,4,5,6,7,12,14,15,20],separation_quadrupl:0,separation_tripl:0,separta:0,seper:[12,15],sequenc:0,seri:0,serialis:[4,6],serv:[4,5,12,15],server:6,set:[0,1,2,4,6,7,8,10,12,14,15,16],set_moe_di_stefano_set:6,set_opt:2,setup:[10,16,17],sever:[5,7,8,14,17],sfh:2,shara:0,share:[1,5,8,12,17],shared_lib_filenam:5,shell:0,shorten:0,should:[0,1,2,5,6,7,8,10,12,14,15,16,17],shouldn:[0,4],show:[0,3,8,14],show_plot:14,show_stellar_typ:14,shown:[0,14],siess:0,sigma:2,silent:4,sill:0,simpl:15,simpli:0,simul:[0,1,12,15],simulation_:6,sinc:[4,12,14,15],singl:[0,2,6,8,12,14,15],sit:0,size:[4,6,8],skip:[0,4,8,10,16],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,2,20],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,14,15,16],someth:[0,6],soon:18,sort:4,sort_kei:4,sourc:[1,2,3,4,5,6,7,8,11,14,15,17,18,20],source_file_filenam:8,source_list:6,sourcecod:[10,16],sourcefile_nam:1,space:[0,6,18],spacing_funct:[10,11],spacingfunc:[6,12,15],spacingfunct:6,special:0,specif:[0,4,14],specifi:[0,8],spectral:2,speed:[0,8],speedtest:0,spent:4,spheric:0,spin:0,spinrat:0,split:[0,8,12,15],splitpoint:0,spread:6,sqrt:0,src:[10,16],st1:5,st2:5,stabil:0,stabl:0,stancliff:0,standard:[0,2],star:[1,2,5,6,8,10,12,14,15,20],star_with_no_mass:0,stardata:[0,1,5,12,15],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:14,stefano:[4,6,10],stellar:[0,2,8,14,19],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,14,15],stellar_type_1:[0,14],stellar_type_2:[0,14],stellar_type_3:0,stellar_type_4:0,stellar_type_dict:19,stellar_type_dict_short:19,step:[6,14,18],stepsiz:6,stick:8,stiff:0,still:[1,8],stop:[0,4],stopfil:0,storag:0,store:[0,2,4,6,8,10,16,20],store_memaddr:20,str:[1,4,6,7,14],straight:6,straniero:0,streamhandl:6,strength:0,strict:4,string:[0,1,4,6,7,8,14,17],strip:0,stronger:0,struct:0,structur:[0,4,8,14],stuff:[4,8,12,14,15],style:0,sub:[0,4],subdict:4,subject:0,sublumin:0,submit:10,subroutin:9,subsequ:0,subtract:4,subtract_dict:4,succe:0,suggest:[0,10,16],suit:[10,16],sum:0,sundial:0,supercrit:0,supernova:[0,8],superwind:0,superwind_mira_switchon:0,supress:[12,15],sure:[2,6,8,10,14,16,17],surfac:0,surviv:0,survivor:0,switcher:0,symmetr:0,synchron:0,synonym:0,synthesi:[8,10,16],sys:5,system:[0,4,5,6,8,10,12,14,15,16,17],system_gener:6,system_queue_fil:6,t_re:5,tabl:[0,2],take:[0,2,4,5,6,8,12,15,17],taken:[0,4],tar:[10,16],target:[1,7],task:[0,2,4,5,6,7,9,14,17,18,20],tauri:0,tbse:0,teff:[0,2],teff_1:14,teff_2:14,tell:4,temp_dir:[4,12,15],temperatur:[0,2,14],tempfil:5,termin:[1,10,16],test:[0,4,6,8,10,16,20],test_log:5,test_pop:[12,15],text:[4,7],than:[0,2,4,8,10,16],thats:[12,15],thei:[0,2,4,6,8,14],thelog:0,them:[2,4,5,6,12,15],themselv:[2,4],thermal:[0,2,20],thermally_pulsing_asymptotic_giant_branch:0,thermohalin:0,thesi:0,thi:[0,1,2,3,4,5,6,7,8,10,11,12,14,15,16,17,18,20],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,12,15,17],think:[0,4,6],third:[0,2],third_dup:0,third_dup_multipli:0,thorn:0,those:[4,5,6,10,12,15,16],thread:8,thread_id:8,three:[0,2],three_part_powerlaw:[2,12,15],threshold:[0,4,8],through:[6,14,17],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,14,15,16],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,13],tmp:[0,4,10,12,16],tmp_dir:[6,8],tmp_tabl:2,todo:[0,1,2,4,6,7,8,12,14,15,17,18,20],toler:0,too:[0,4,8,10,16,17],topic:0,torqu:0,total:[0,2,4,6,8,14],tout:[0,20],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,14],trade:0,transfer:0,transform:[0,4],transit:0,treat:0,trigger:0,tripl:[0,2,8],truli:0,tupl:1,turn:[0,4,12,15],two:[0,4,19,20],txt:[5,6,17],type:[0,1,2,4,6,7,8,14,18,19,20],type_ia_mch_supernova_algorithm:0,type_ia_sub_mch_supernova_algorithm:0,typic:0,ubvri:0,ugriv:0,uncom:6,under:18,undergo:0,understand:6,undescrib:7,uniform:2,union:[2,4,6,18,20],uniqu:[4,6,8],unit:[0,20],univari:0,unknown:17,unless:[1,6,8],unload:6,unrecogn:[10,16],unsign:0,unstabl:0,until:[0,2,4,6],unus:[0,8],updat:[2,4,6,10,12,15,16],update_dict:4,upper:[0,2,18],usag:0,use:[0,2,4,5,6,8,9,10,12,14,15,16,17],use_astropy_valu:14,use_datadir:[6,12,15],use_fixed_timestep_:0,use_periastron_roche_radiu:0,use_tabular_intershell_abundances_karakas_2012:0,used:[0,1,2,4,6,8,12,14,15],useful:[0,4,6,8,10,16,17,20],useful_func:[10,11],user:[1,2,4,6,7,8,17],uses:[0,5,8,12,15],using:[0,1,3,5,6,10,12,15,16],usr:5,usual:[0,2,8],util:[1,2,4,5,6,7,12,14,15,17,18,20],val:2,valid:[0,2,4],valu:[0,1,2,4,5,6,7,8,12,14,15],valueerror:[12,15],valuerang:[6,12,15],van:0,vandenheuvel_log:0,vari:0,variabl:[0,4,6,8,12,15],variant:0,variou:0,vassiliadi:0,veloc:[0,2],verbos:[1,2,4,8,10,12,15,16],verbose_print:4,veri:[0,5,6,15,18],versa:20,version:[0,4,6,10,16],version_info:4,version_info_str:4,version_onli:0,via:[6,8,12,14,15],vice:20,vink:0,virtual:[10,16],virtualenviron:[10,16],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,14,15],wang:0,want:[0,2,4,5,6,7,8,12,14,15],warmup_cpu:0,warn:0,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,16],were:4,what:[0,1,2,4,5,6,7,8,10,12,15,16,17],whatev:[5,6,10,16],wheeler:0,when:[0,1,2,4,5,6,7,8,10,12,15,16,17],whenev:[10,16],where:[0,1,2,4,6,7,8,10,16],whether:[0,2,4,6,7,8,14,20],which:[0,1,2,3,4,5,6,7,8,10,12,15,16,17,20],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,16],without:[2,6,8],won:0,wood:0,work:[0,4,5,10,14,15,16],would:[0,4,14],wouldn: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,12,15],wrapper:[4,5,20],write:[1,4,5,6,7,8,12,15,17],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,12,15,17],wrlof_mass_transf:0,wrlof_method:0,wrlof_non:0,wrlof_q_depend:0,wrlof_quadrat:0,wrong:[10,16],wrwindfac:0,wtts2:0,wtts_log:0,www:[0,2],year:[0,2],yet:[0,4,5,6,8,12,14,15],yield:0,you:[0,1,4,5,6,7,8,10,12,14,15,16,20],young:0,your:[5,8,10,16],yourself:[12,14,15],zahn:0,zam:[0,2,17,20],zams_collis:20,zams_mass:[12,15],zero:[0,1,8],zero_ag:[12,15],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","Title page","Notebooks","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,16],algorithm:0,binari:0,binary_c:[0,10,16],binarycpython:11,build:[10,16],code:[8,11],custom_logging_funct:1,descript:7,distribution_funct:2,document:[10,16],environ:[10,16],exampl:[3,5,10,15,16],faq:[10,16],from:[10,16],grid:[7,8],grid_class:6,hpc_function:9,indic:10,input:0,instal:[10,16],instruct:[10,16],issu:[10,16],misc:0,modul:[1,2,4,6,9,10,14,16,17,18,19,20],moe:8,note:[10,16],notebook:13,nucsyn:0,option:[7,8],output:0,page:12,paramet:0,pip:[10,16],plot_funct:14,popul:[8,15],privat:8,python:[10,16],requir:[10,16],run_system_wrapp:17,sampler:8,script:15,section:0,sourc:[10,16],spacing_funct:18,star:0,stefano:8,stellar_typ:19,tabl:10,titl:12,usag:[10,16],useful_func:20,variabl:[10,16],via:[10,16],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 edc1390990f545b27c19d4b246840a8cc87606a2..5543b73f89d3f1994dea222db52f2b4dc3e613f2 100644
--- a/docs/build/html/spacing_functions.html
+++ b/docs/build/html/spacing_functions.html
@@ -102,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>
@@ -262,9 +262,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 193b7a074b0a2e1d9a3965d6279e5930669981f3..5b735e30ff7b47966631d3042896b0ffbdca4035 100644
--- a/docs/build/html/stellar_types.html
+++ b/docs/build/html/stellar_types.html
@@ -102,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>
@@ -243,9 +243,9 @@
     
     provided by <a href="https://readthedocs.org">Read the Docs</a>.
 <br><br>
-Generated on binarycpython git branch: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 45b51577f9bdafe08d7a374a02a9cddbfe7edeab..2b0dd6dc5ab0ec14cbc730e9616e61f680bebf61 100644
--- a/docs/build/html/useful_funcs.html
+++ b/docs/build/html/useful_funcs.html
@@ -39,7 +39,7 @@
     
     <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>
 
@@ -102,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>
@@ -415,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>
@@ -441,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: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 6eb6edade2d8028c0b4f1e683baeb57afa41d7ac..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: feature/binaryc_notebook_docs git revision 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 url: <a href="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python/-/tree/feature/binaryc_notebook_docs">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: "6068:20210727:8955b541d" 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 0c1a4dd88ee625380f747f05594385a18ea74e0b..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**: 6068:20210727:8955b541d	**Built on**: Jul 27 2021 22:36:46
+	**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/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 16e4dc3a0f7b7bcd92dd5e32e85b18e708fdc653..0000000000000000000000000000000000000000
--- a/docs/source/examples.rst
+++ /dev/null
@@ -1,10 +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
-   notebooks
\ 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/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
index 8d2bdbf982952c3a9debf9213d52656f2d8fa76e..56f3b153c23064e82863f188906d50243e795715 100644
--- a/docs/source/notebook_population.ipynb
+++ b/docs/source/notebook_population.ipynb
@@ -5,44 +5,82 @@
    "id": "bbbaafbb-fd7d-4b73-a970-93506ba35d71",
    "metadata": {},
    "source": [
-    "# Title page\n"
+    "# 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": null,
+   "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",
-    "from binarycpython.utils.functions import (\n",
-    "    get_help_all,\n",
-    "    get_help,\n",
-    "    create_hdf5,\n",
-    "    output_lines,\n",
-    ")\n",
-    "from binarycpython.utils.custom_logging_functions import temp_dir\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": null,
+   "execution_count": 2,
    "id": "79ab50b7-591f-4883-af09-116d1835a751",
    "metadata": {},
-   "outputs": [],
+   "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": [
-    "#########################################################\n",
-    "# This file serves as an example for running a population.\n",
-    "# The use of help(<function>) is a good way to inspect what parameters are there to use\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(verbose=1)\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",
@@ -51,115 +89,244 @@
     "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",
-    "    # Set companion to low mass\n",
-    "    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.\n",
+    "\n",
+    "\n",
     "    # grid_options\n",
     "    amt_cores=2,  # grid_options\n",
-    "    verbose=1,  # verbosity. Not fully configured correctly yet but having it value of 1 prints alot of stuff\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": "code",
-   "execution_count": null,
-   "id": "0c986215-93b1-4e30-ad79-f7c397e9ff7d",
+   "cell_type": "markdown",
+   "id": "f8d46d19-633d-4911-821d-a59daed31816",
    "metadata": {},
-   "outputs": [],
    "source": [
-    "def parse_function(self, output):\n",
-    "    # EXAMPLE PARSE_FUNCTION\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",
-    "    seperator = \" \"\n",
-    "\n",
-    "    # Create filename\n",
-    "    outfilename = os.path.join(data_dir, base_filename)\n",
-    "\n",
-    "    parameters = [\"time\", \"mass\", \"zams_mass\", \"probability\", \"radius\", \"stellar_type\"]\n",
+    "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",
-    "    # Go over the output.\n",
-    "    for el in output_lines(output):\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",
-    "            print(values)\n",
-    "\n",
-    "            if not len(parameters) == len(values):\n",
-    "                print(\"Amount of column names isnt equal to amount of columns\")\n",
-    "                raise ValueError\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",
-    "            if not os.path.exists(outfilename):\n",
-    "                with open(outfilename, \"w\") as f:\n",
-    "                    f.write(seperator.join(parameters) + \"\\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",
-    "            with open(outfilename, \"a\") as f:\n",
-    "                f.write(seperator.join(values) + \"\\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",
-    "# Creating a parsing function\n",
-    "example_pop.set(\n",
-    "    parse_function=parse_function,  # Setting the parse function thats used in the evolve_population\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": null,
-   "id": "2fa5188e-312f-4a05-aeda-0bd4c00629c8",
+   "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": [
-    "### 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",
-    ")"
+    "# 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": null,
-   "id": "fd197154-a8ce-4865-8929-008d3483101a",
+   "execution_count": 6,
+   "id": "47979841-2c26-4b26-8945-603d013dc93a",
    "metadata": {},
-   "outputs": [],
+   "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",
@@ -211,128 +378,815 @@
   },
   {
    "cell_type": "markdown",
-   "id": "8c96b151-8c3b-4479-969f-6c2f898497a5",
+   "id": "163f13ae-fec1-4ee8-b9d4-c1b75c19ff39",
    "metadata": {},
    "source": [
-    "Exporting of all the settings can be done with .export_all_info()\n",
-    "on default it exports everything, but can be supressed by turning it off:\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",
-    "On default it will write this to the custom_options['data_dir'], but that can be overriden by\n",
-    "  setting use_datadir=False and providing an outfile=<>"
+    "## 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": 5,
-   "id": "ba83443c-64b4-4126-90b3-b1ca76c0f73d",
+   "execution_count": 7,
+   "id": "0c986215-93b1-4e30-ad79-f7c397e9ff7d",
    "metadata": {},
    "outputs": [
     {
-     "data": {
-      "text/plain": [
-       "'/tmp/binary_c_python/example_python_population_result/example_pop_settings.json'"
-      ]
-     },
-     "execution_count": 5,
-     "metadata": {},
-     "output_type": "execute_result"
+     "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": [
-    "example_pop.export_all_info()"
+    "# 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": "ef5b51a1-e56d-4bec-a5c7-b9d5bceeceba",
+   "id": "ae1f1f0c-1f8b-42d8-b051-cbf8c6b51514",
    "metadata": {},
    "source": [
-    "Executing a single system\n",
-    "This uses the M_1 orbital period etc set with the set function"
+    "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": 7,
-   "id": "c0a9aed7-1fc9-4fe3-8bcf-4e987bfc00a9",
+   "execution_count": 8,
+   "id": "fd197154-a8ce-4865-8929-008d3483101a",
    "metadata": {},
    "outputs": [
     {
      "name": "stdout",
      "output_type": "stream",
      "text": [
-      "Creating the code for the shared library for the custom logging\n",
-      "['2.773586668293e+01', '1.33526', '10', '1', '1.72498e-05', '13']\n",
-      "None\n"
+      "adding: parse_function=<function parse_function at 0x7ff3bdf79620> to grid_options\n"
      ]
     }
    ],
    "source": [
-    "output = example_pop.evolve_single()\n",
-    "print(output)"
+    "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": "code",
-   "execution_count": null,
-   "id": "8ea376c1-1e92-45af-8cab-9d7fdca564eb",
-   "metadata": {
-    "tags": []
-   },
-   "outputs": [],
+   "cell_type": "markdown",
+   "id": "91509ce5-ffe7-4937-aa87-6d7baac9ac04",
+   "metadata": {},
    "source": [
-    "## Executing a population\n",
-    "## This uses the values generated by the grid_variables\n",
-    "example_pop.evolve()  # TODO: update this function call"
+    "## 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": "markdown",
-   "id": "ce937b07-7292-4bb1-b2e7-d69e51bdff6e",
+   "cell_type": "code",
+   "execution_count": 9,
+   "id": "8ea376c1-1e92-45af-8cab-9d7fdca564eb",
    "metadata": {
     "tags": []
    },
-   "source": [
-    "Wrapping up the results to an hdf5 file can be done by using the create_hdf5\n",
-    "(<directory containing data and settings>) This function takes the settings file\n",
-    "(ending in _settings.json) and the data files (ending in .dat) from the data_dir\n",
-    "and packing them into an hdf5 file, which is then written into the same data_dir directory"
+   "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": 8,
-   "id": "ad444138-f854-4fdb-8e18-49e35ac9c7e2",
+   "execution_count": 10,
+   "id": "e1f0464b-0424-4022-b34b-5b744bc2c59d",
    "metadata": {},
    "outputs": [
     {
      "name": "stdout",
      "output_type": "stream",
      "text": [
-      "Creating /tmp/binary_c_python/example_python_population_result/example_pop.hdf5\n",
-      "Adding settings to HDF5 file\n",
-      "Adding data to HDF5 file\n"
+      "{'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": [
-    "create_hdf5(data_dir=example_pop.custom_options[\"data_dir\"], name=\"example_pop.hdf5\")\n"
+    "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": null,
-   "id": "34da69bc-fe60-4a9d-b07a-f6cd2f216964",
+   "execution_count": 11,
+   "id": "83f8e519-4f7c-474a-ad95-f175a34fae81",
    "metadata": {},
-   "outputs": [],
-   "source": []
+   "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": {
diff --git a/docs/source/notebooks.rst b/docs/source/notebooks.rst
deleted file mode 100644
index 8002bcb2bc18ba071f737026c70fa34f8297207b..0000000000000000000000000000000000000000
--- a/docs/source/notebooks.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-Notebooks
-=========
-The notebooks.
-
-
-.. toctree::
-    :maxdepth: 2
-    :caption: Contents:
-
-    notebook_population.ipynb
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