From d1e6013cae7cfccef6b9ea7be08f355d63ae9f97 Mon Sep 17 00:00:00 2001
From: David Hendriks <davidhendriks93@gmail.com>
Date: Thu, 27 Feb 2020 21:33:01 +0000
Subject: [PATCH] changed example

---
 examples/example_population.py | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/examples/example_population.py b/examples/example_population.py
index bfac41b69..e3a9cab26 100644
--- a/examples/example_population.py
+++ b/examples/example_population.py
@@ -14,7 +14,7 @@ from binarycpython.utils.custom_logging_functions import temp_dir
 #########################################################
 
 
-## Quick script to get some output about which stars go supernova when.
+## Quick script to get some output
 def output_lines(output):
     """
     Function that outputs the lines that were recieved from the binary_c run. 
@@ -43,7 +43,7 @@ def parse_function(self, output):
 
         # CHeck the header and act accordingly
         if (headerline=='MY_STELLAR_DATA'):
-            parameters = ['time', 'mass', 'zams_mass', 'probability'] 
+            parameters = ['time', 'mass', 'zams_mass', 'probability', 'radius'] 
             values = el.split()[1:]
 
             if not os.path.exists(outfilename):
@@ -67,7 +67,7 @@ example_pop.set(
     # binary_c physics options
     M_1=10,  # bse_options
     separation=0,  # bse_options
-    orbital_period=4580,  # bse_options
+    orbital_period=45000000080,  # bse_options
     max_evolution_time=15000,  # bse_options
     eccentricity=0.02,  # bse_options
 
@@ -101,12 +101,13 @@ if(stardata->star[0].stellar_type >= 2)
 {
     if (stardata->model.time < stardata->model.max_evolution_time)
     {
-        Printf("MY_STELLAR_DATA %30.12e %g %g %g\\n",
+        Printf("MY_STELLAR_DATA %30.12e %g %g %g %g\\n",
             // 
             stardata->model.time, // 1
             stardata->star[0].mass, //2
             stardata->star[0].pms_mass, //4
-            stardata->model.probability //6
+            stardata->model.probability, //5
+            stardata->star[0].radius // 6
       );
     };
     /* Kill the simulation to save time */
@@ -115,7 +116,7 @@ if(stardata->star[0].stellar_type >= 2)
 """)
 
 # Add grid variables
-resolution = {'M_1': 10}
+resolution = {'M_1': 100}
 
 # Mass
 example_pop.add_grid_variable(
@@ -129,7 +130,6 @@ example_pop.add_grid_variable(
     dphasevol="dlnm1",
     parameter_name="M_1",
     condition="", # Impose a condition on this grid variable. Mostly for a check for yourself
-
 )
 
 # Exporting of all the settings can be done with .export_all_info()
@@ -149,7 +149,6 @@ example_pop.export_all_info()
 # output = example_pop.evolve_single()
 # print(output)
 
-
 ## Executing a population
 ## This uses the values generated by the grid_variables
 example_pop.evolve_population_mp_chunks() # TODO: update this function call
-- 
GitLab