diff --git a/examples/notebook_individual_systems.ipynb b/examples/notebook_individual_systems.ipynb index fdf37b7e7ef6db9503f8a9e5d3a1e90d0966c2e6..8abd01f38c951674de9a64e4f21520ae42b8e4cd 100644 --- a/examples/notebook_individual_systems.ipynb +++ b/examples/notebook_individual_systems.ipynb @@ -27,18 +27,19 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 2, "id": "e32dcdee", "metadata": {}, "outputs": [], "source": [ + "import os\n", "from binarycpython.utils.functions import temp_dir\n", "TMP_DIR = temp_dir(\"notebooks\", \"notebook_individual_systems\")" ] }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 3, "id": "425efed3-d8e3-432d-829e-41d8ebe05162", "metadata": {}, "outputs": [], @@ -49,7 +50,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 4, "id": "b2abab48-433d-4936-8434-14804c52c9f6", "metadata": {}, "outputs": [ @@ -77,7 +78,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 5, "id": "029fc3f2-f09a-49af-a32b-248505738f2e", "metadata": {}, "outputs": [ @@ -85,7 +86,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " TIME M1 M2 K1 K2 SEP PER ECC R1/ROL1 R2/ROL2 TYPE RANDOM_SEED=84984 RANDOM_COUNT=0\n", + " TIME M1 M2 K1 K2 SEP PER ECC R1/ROL1 R2/ROL2 TYPE RANDOM_SEED=66377 RANDOM_COUNT=0\n", " 0.0000 1.000 0.000 1 15 -1 -1 -1.00 0.000 0.000 \"INITIAL \"\n", " 11003.1302 1.000 0.000 2 15 -1 -1 -1.00 0.000 0.000 \"OFF_MS\"\n", " 11003.1302 1.000 0.000 2 15 -1 -1 -1.00 0.000 0.000 \"TYPE_CHNGE\"\n", @@ -117,7 +118,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 15, "id": "e6a23b55-ca42-440d-83ac-e76a24a83a67", "metadata": { "tags": [] @@ -127,7 +128,10 @@ "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" + "EXAMPLE_MASSLOSS 0.000000000000e+00 1 1 1\n", + "EXAMPLE_MASSLOSS 0.000000000000e+00 1 1 1\n", + "EXAMPLE_MASSLOSS 1.000000000000e-06 1 1 1\n", + "EXAMPLE_MASSLOSS 2.000000000000e-06 1 1 1\n" ] } ], @@ -150,7 +154,7 @@ "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, api_log_filename_prefix=TMP_DIR)\n", - "print(output.splitlines()[:4])" + "print('\\n'.join(output.splitlines()[:4]))" ] }, { @@ -163,7 +167,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 7, "id": "3822721f-217a-495b-962e-d57137b9e290", "metadata": {}, "outputs": [ @@ -213,7 +217,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 8, "id": "654a07ed-2a88-46ff-9da0-b7759580f9f3", "metadata": {}, "outputs": [ @@ -264,7 +268,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 9, "id": "4a98ffca-1b72-4bb8-8df1-3bf3187d882f", "metadata": {}, "outputs": [], @@ -283,7 +287,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 10, "id": "bff1cc2e-6b32-4ba0-879f-879ffbabd223", "metadata": {}, "outputs": [ @@ -291,9 +295,10 @@ "name": "stdout", "output_type": "stream", "text": [ + "adding: api_log_filename_prefix=/tmp/binary_c_python/notebooks/notebook_individual_systems to BSE_options\n", "adding: M_1=10 to BSE_options\n", "Creating and loading custom logging functionality\n", - "Running binary_c M_1 10\n", + "Running binary_c M_1 10 api_log_filename_prefix /tmp/binary_c_python/notebooks/notebook_individual_systems\n", "Cleaning up the custom logging stuff. type: single\n", "SINGLE_STAR_LIFETIME 10 28.4838\n", "\n" @@ -328,7 +333,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 11, "id": "dd748bab-b57e-4129-8350-9ea11fa179d0", "metadata": { "scrolled": true, @@ -351,9 +356,9 @@ ");\n", " to grid_options\n", "Creating and loading custom logging functionality\n", - "Running binary_c M_1 10\n", + "Running binary_c M_1 10 api_log_filename_prefix /tmp/binary_c_python/notebooks/notebook_individual_systems\n", "Cleaning up the custom logging stuff. type: single\n", - "Removed /tmp/binary_c_python/custom_logging/libcustom_logging_273b1d161cc245acb09b7c20ee60be99.so\n", + "Removed /tmp/binary_c_python/custom_logging/libcustom_logging_e8bb03f627db4256b2f4ee3d99b66094.so\n", "EXAMPLE_MASSLOSS 0.000000000000e+00 10 0 10 1\n", "EXAMPLE_MASSLOSS 0.000000000000e+00 10 10 10 1\n", "EXAMPLE_MASSLOSS 1.000000000000e-06 10 10 10 1\n", @@ -393,7 +398,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 12, "id": "fec39154-cce6-438c-8c2c-509d76b00f34", "metadata": {}, "outputs": [], @@ -444,7 +449,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 13, "id": "57347512-fd4a-434b-b13c-5e6dbd3ac415", "metadata": { "scrolled": true, @@ -455,13 +460,13 @@ "name": "stdout", "output_type": "stream", "text": [ - "adding: parse_function=<function object_parse_function at 0x7fbe0c5d1950> to grid_options\n", + "adding: parse_function=<function object_parse_function at 0x7fa30c1f86a8> to grid_options\n", "<<<< Warning: Key does not match previously known parameter: adding: output_dir=/tmp/binary_c_python/notebooks/notebook_individual_systems to custom_options >>>>\n", "adding: api_log_filename_prefix=/tmp/binary_c_python/notebooks/notebook_individual_systems to BSE_options\n", "Creating and loading custom logging functionality\n", "Running binary_c M_1 10 api_log_filename_prefix /tmp/binary_c_python/notebooks/notebook_individual_systems\n", "Cleaning up the custom logging stuff. type: single\n", - "Removed /tmp/binary_c_python/custom_logging/libcustom_logging_6136984d369d4ba3b18ac029add5ee33.so\n", + "Removed /tmp/binary_c_python/custom_logging/libcustom_logging_6557922fae4b4d6fae29df772d4f8ce6.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" ] @@ -506,7 +511,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 14, "id": "ec48125c-6bf5-48f4-9357-8261800b5d8b", "metadata": {}, "outputs": [