Skip to content

Commit

Permalink
Testing Sphinx Error
Browse files Browse the repository at this point in the history
Testing Sphinx Error
  • Loading branch information
Sorah-Darkhat committed Nov 7, 2024
1 parent 8f810e4 commit 5a23a84
Showing 1 changed file with 48 additions and 15 deletions.
63 changes: 48 additions & 15 deletions docs/source/test_Bayesian_inference_MITbag_EOS.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "edb2cf2a",
"metadata": {},
"source": [
"# MIT bag model EOS inference pipeline"
"# Bayesian inference demonstrator for MIT bag EOS"
]
},
{
Expand All @@ -28,7 +28,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "f6f20856",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -69,7 +69,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"id": "2b87dd3b",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -186,7 +186,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"id": "0d3a8359",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -244,25 +244,58 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"id": "f05849a0",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Creating directory for new run output/run2\n",
"[ultranest] Sampling 400 live points from prior ...\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"capi_return is NULL\n",
"Call-back cb_fcn_in___user__routines failed.\n"
]
},
{
"ename": "KeyboardInterrupt",
"evalue": "",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[4], line 5\u001b[0m\n\u001b[1;32m 2\u001b[0m live_point \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m400\u001b[39m\n\u001b[1;32m 4\u001b[0m max_calls \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m60000\u001b[39m\n\u001b[0;32m----> 5\u001b[0m samples \u001b[38;5;241m=\u001b[39m sampler\u001b[38;5;241m.\u001b[39mUltranestSampler(parameters,likelihood_transform,prior_transform,step,live_point,max_calls)\n",
"File \u001b[0;32m~/Desktop/HackWeek/CompactOject/InferenceWorkflow/BayesianSampler.py:32\u001b[0m, in \u001b[0;36mUltranestSampler\u001b[0;34m(parameters, likelihood, prior, step, live_points, max_calls)\u001b[0m\n\u001b[1;32m 24\u001b[0m sampler \u001b[38;5;241m=\u001b[39m ultranest\u001b[38;5;241m.\u001b[39mReactiveNestedSampler(parameters, likelihood, prior,log_dir\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124moutput\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[1;32m 25\u001b[0m sampler\u001b[38;5;241m.\u001b[39mstepsampler \u001b[38;5;241m=\u001b[39m ultranest\u001b[38;5;241m.\u001b[39mstepsampler\u001b[38;5;241m.\u001b[39mSliceSampler(\n\u001b[1;32m 26\u001b[0m nsteps\u001b[38;5;241m=\u001b[39mstep,\n\u001b[1;32m 27\u001b[0m generate_direction\u001b[38;5;241m=\u001b[39multranest\u001b[38;5;241m.\u001b[39mstepsampler\u001b[38;5;241m.\u001b[39mgenerate_mixture_random_direction,\n\u001b[1;32m 28\u001b[0m \u001b[38;5;66;03m# adaptive_nsteps=False,\u001b[39;00m\n\u001b[1;32m 29\u001b[0m \u001b[38;5;66;03m# max_nsteps=400\u001b[39;00m\n\u001b[1;32m 30\u001b[0m )\n\u001b[0;32m---> 32\u001b[0m result \u001b[38;5;241m=\u001b[39m sampler\u001b[38;5;241m.\u001b[39mrun(min_num_live_points\u001b[38;5;241m=\u001b[39mlive_points,max_ncalls\u001b[38;5;241m=\u001b[39m max_calls)\n\u001b[1;32m 33\u001b[0m flat_samples \u001b[38;5;241m=\u001b[39m sampler\u001b[38;5;241m.\u001b[39mresults[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124msamples\u001b[39m\u001b[38;5;124m'\u001b[39m]\n\u001b[1;32m 34\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m flat_samples\n",
"File \u001b[0;32m~/miniconda3/envs/Thesis-Project/lib/python3.11/site-packages/ultranest/integrator.py:2459\u001b[0m, in \u001b[0;36mReactiveNestedSampler.run\u001b[0;34m(self, update_interval_volume_fraction, update_interval_ncall, log_interval, show_status, viz_callback, dlogz, dKL, frac_remain, Lepsilon, min_ess, max_iters, max_ncalls, max_num_improvement_loops, min_num_live_points, cluster_num_live_points, insertion_test_zscore_threshold, insertion_test_window, region_class, widen_before_initial_plateau_num_warn, widen_before_initial_plateau_num_max)\u001b[0m\n\u001b[1;32m 2279\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mrun\u001b[39m(\n\u001b[1;32m 2280\u001b[0m \u001b[38;5;28mself\u001b[39m,\n\u001b[1;32m 2281\u001b[0m update_interval_volume_fraction\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m0.8\u001b[39m,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 2300\u001b[0m widen_before_initial_plateau_num_max\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m50000\u001b[39m,\n\u001b[1;32m 2301\u001b[0m ):\n\u001b[1;32m 2302\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124mr\u001b[39m\u001b[38;5;124;03m\"\"\"Run until target convergence criteria are fulfilled.\u001b[39;00m\n\u001b[1;32m 2303\u001b[0m \n\u001b[1;32m 2304\u001b[0m \u001b[38;5;124;03m Parameters\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 2457\u001b[0m \u001b[38;5;124;03m - converged (bool): whether the run is converged according to the MWW test, at the given threshold\u001b[39;00m\n\u001b[1;32m 2458\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m-> 2459\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m _result \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mrun_iter(\n\u001b[1;32m 2460\u001b[0m update_interval_volume_fraction\u001b[38;5;241m=\u001b[39mupdate_interval_volume_fraction,\n\u001b[1;32m 2461\u001b[0m update_interval_ncall\u001b[38;5;241m=\u001b[39mupdate_interval_ncall,\n\u001b[1;32m 2462\u001b[0m log_interval\u001b[38;5;241m=\u001b[39mlog_interval,\n\u001b[1;32m 2463\u001b[0m dlogz\u001b[38;5;241m=\u001b[39mdlogz, dKL\u001b[38;5;241m=\u001b[39mdKL,\n\u001b[1;32m 2464\u001b[0m Lepsilon\u001b[38;5;241m=\u001b[39mLepsilon, frac_remain\u001b[38;5;241m=\u001b[39mfrac_remain,\n\u001b[1;32m 2465\u001b[0m min_ess\u001b[38;5;241m=\u001b[39mmin_ess, max_iters\u001b[38;5;241m=\u001b[39mmax_iters,\n\u001b[1;32m 2466\u001b[0m max_ncalls\u001b[38;5;241m=\u001b[39mmax_ncalls, max_num_improvement_loops\u001b[38;5;241m=\u001b[39mmax_num_improvement_loops,\n\u001b[1;32m 2467\u001b[0m min_num_live_points\u001b[38;5;241m=\u001b[39mmin_num_live_points,\n\u001b[1;32m 2468\u001b[0m cluster_num_live_points\u001b[38;5;241m=\u001b[39mcluster_num_live_points,\n\u001b[1;32m 2469\u001b[0m show_status\u001b[38;5;241m=\u001b[39mshow_status,\n\u001b[1;32m 2470\u001b[0m viz_callback\u001b[38;5;241m=\u001b[39mviz_callback,\n\u001b[1;32m 2471\u001b[0m insertion_test_window\u001b[38;5;241m=\u001b[39minsertion_test_window,\n\u001b[1;32m 2472\u001b[0m insertion_test_zscore_threshold\u001b[38;5;241m=\u001b[39minsertion_test_zscore_threshold,\n\u001b[1;32m 2473\u001b[0m region_class\u001b[38;5;241m=\u001b[39mregion_class,\n\u001b[1;32m 2474\u001b[0m widen_before_initial_plateau_num_warn\u001b[38;5;241m=\u001b[39mwiden_before_initial_plateau_num_warn,\n\u001b[1;32m 2475\u001b[0m widen_before_initial_plateau_num_max\u001b[38;5;241m=\u001b[39mwiden_before_initial_plateau_num_max,\n\u001b[1;32m 2476\u001b[0m ):\n\u001b[1;32m 2477\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mlog:\n\u001b[1;32m 2478\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mlogger\u001b[38;5;241m.\u001b[39mdebug(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdid a run_iter pass!\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n",
"File \u001b[0;32m~/miniconda3/envs/Thesis-Project/lib/python3.11/site-packages/ultranest/integrator.py:2560\u001b[0m, in \u001b[0;36mReactiveNestedSampler.run_iter\u001b[0;34m(self, update_interval_volume_fraction, update_interval_ncall, log_interval, dlogz, dKL, frac_remain, Lepsilon, min_ess, max_iters, max_ncalls, max_num_improvement_loops, min_num_live_points, cluster_num_live_points, show_status, viz_callback, insertion_test_window, insertion_test_zscore_threshold, region_class, widen_before_initial_plateau_num_warn, widen_before_initial_plateau_num_max)\u001b[0m\n\u001b[1;32m 2557\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m viz_callback \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mauto\u001b[39m\u001b[38;5;124m'\u001b[39m:\n\u001b[1;32m 2558\u001b[0m viz_callback \u001b[38;5;241m=\u001b[39m get_default_viz_callback()\n\u001b[0;32m-> 2560\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_widen_roots_beyond_initial_plateau(\n\u001b[1;32m 2561\u001b[0m min_num_live_points,\n\u001b[1;32m 2562\u001b[0m widen_before_initial_plateau_num_warn, widen_before_initial_plateau_num_max)\n\u001b[1;32m 2564\u001b[0m Llo, Lhi \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m-\u001b[39mnp\u001b[38;5;241m.\u001b[39minf, np\u001b[38;5;241m.\u001b[39minf\n\u001b[1;32m 2565\u001b[0m Lmax \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m-\u001b[39mnp\u001b[38;5;241m.\u001b[39minf\n",
"File \u001b[0;32m~/miniconda3/envs/Thesis-Project/lib/python3.11/site-packages/ultranest/integrator.py:1435\u001b[0m, in \u001b[0;36mReactiveNestedSampler._widen_roots_beyond_initial_plateau\u001b[0;34m(self, nroots, num_warn, num_stop)\u001b[0m\n\u001b[1;32m 1433\u001b[0m user_has_been_warned \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mFalse\u001b[39;00m\n\u001b[1;32m 1434\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28;01mTrue\u001b[39;00m:\n\u001b[0;32m-> 1435\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_widen_roots(nroots_needed)\n\u001b[1;32m 1436\u001b[0m Ls \u001b[38;5;241m=\u001b[39m np\u001b[38;5;241m.\u001b[39marray([node\u001b[38;5;241m.\u001b[39mvalue \u001b[38;5;28;01mfor\u001b[39;00m node \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mroot\u001b[38;5;241m.\u001b[39mchildren])\n\u001b[1;32m 1437\u001b[0m Lmin \u001b[38;5;241m=\u001b[39m np\u001b[38;5;241m.\u001b[39mmin(Ls)\n",
"File \u001b[0;32m~/miniconda3/envs/Thesis-Project/lib/python3.11/site-packages/ultranest/integrator.py:1533\u001b[0m, in \u001b[0;36mReactiveNestedSampler._widen_roots\u001b[0;34m(self, nroots)\u001b[0m\n\u001b[1;32m 1531\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m num_live_points_todo \u001b[38;5;241m>\u001b[39m \u001b[38;5;241m0\u001b[39m:\n\u001b[1;32m 1532\u001b[0m active_u \u001b[38;5;241m=\u001b[39m np\u001b[38;5;241m.\u001b[39mrandom\u001b[38;5;241m.\u001b[39muniform(size\u001b[38;5;241m=\u001b[39m(num_live_points_todo, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mx_dim))\n\u001b[0;32m-> 1533\u001b[0m active_v \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtransform(active_u)\n\u001b[1;32m 1534\u001b[0m active_logl \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mloglike(active_v)\n\u001b[1;32m 1535\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n",
"File \u001b[0;32m~/miniconda3/envs/Thesis-Project/lib/python3.11/site-packages/ultranest/utils.py:137\u001b[0m, in \u001b[0;36mvectorize.<locals>.vectorized\u001b[0;34m(args)\u001b[0m\n\u001b[1;32m 135\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mvectorized\u001b[39m(args):\n\u001b[1;32m 136\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"Vectorized version of function.\"\"\"\u001b[39;00m\n\u001b[0;32m--> 137\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m np\u001b[38;5;241m.\u001b[39masarray([function(arg) \u001b[38;5;28;01mfor\u001b[39;00m arg \u001b[38;5;129;01min\u001b[39;00m args])\n",
"File \u001b[0;32m~/miniconda3/envs/Thesis-Project/lib/python3.11/site-packages/ultranest/utils.py:137\u001b[0m, in \u001b[0;36m<listcomp>\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m 135\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mvectorized\u001b[39m(args):\n\u001b[1;32m 136\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"Vectorized version of function.\"\"\"\u001b[39;00m\n\u001b[0;32m--> 137\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m np\u001b[38;5;241m.\u001b[39masarray([function(arg) \u001b[38;5;28;01mfor\u001b[39;00m arg \u001b[38;5;129;01min\u001b[39;00m args])\n",
"Cell \u001b[0;32mIn[2], line 15\u001b[0m, in \u001b[0;36mprior_transform\u001b[0;34m(cube)\u001b[0m\n\u001b[1;32m 13\u001b[0m density \u001b[38;5;241m=\u001b[39m np\u001b[38;5;241m.\u001b[39mlogspace(\u001b[38;5;241m14.3\u001b[39m, \u001b[38;5;241m15.6\u001b[39m, \u001b[38;5;241m50\u001b[39m) \n\u001b[1;32m 14\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mall\u001b[39m(x\u001b[38;5;241m<\u001b[39my \u001b[38;5;28;01mfor\u001b[39;00m x,y \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mzip\u001b[39m(epsilon[:], epsilon[\u001b[38;5;241m1\u001b[39m:])) \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;28mall\u001b[39m(x\u001b[38;5;241m<\u001b[39my \u001b[38;5;28;01mfor\u001b[39;00m x, y \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mzip\u001b[39m(p[:], p[\u001b[38;5;241m1\u001b[39m:])):\n\u001b[0;32m---> 15\u001b[0m MR \u001b[38;5;241m=\u001b[39m main\u001b[38;5;241m.\u001b[39mOutputMR(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m\"\u001b[39m,epsilon,p)\u001b[38;5;241m.\u001b[39mT \n\u001b[1;32m 17\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 18\u001b[0m MR \u001b[38;5;241m=\u001b[39m []\n",
"File \u001b[0;32m~/Desktop/HackWeek/CompactOject/TOVsolver/main.py:62\u001b[0m, in \u001b[0;36mOutputMR\u001b[0;34m(input_file, density, pressure, central_density_range)\u001b[0m\n\u001b[1;32m 60\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m 61\u001b[0m center_rho \u001b[38;5;241m=\u001b[39m central_density_range[i] \u001b[38;5;241m*\u001b[39m G \u001b[38;5;241m/\u001b[39m c\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m2\u001b[39m\n\u001b[0;32m---> 62\u001b[0m M, R \u001b[38;5;241m=\u001b[39m TOV_solver\u001b[38;5;241m.\u001b[39msolveTOV(center_rho, Pmin, eos, inveos)\n\u001b[1;32m 63\u001b[0m Mass\u001b[38;5;241m.\u001b[39mappend(M)\n\u001b[1;32m 64\u001b[0m Radius\u001b[38;5;241m.\u001b[39mappend(R)\n",
"File \u001b[0;32m~/Desktop/HackWeek/CompactOject/TOVsolver/solver_code.py:279\u001b[0m, in \u001b[0;36msolveTOV\u001b[0;34m(center_rho, Pmin, eos, inveos)\u001b[0m\n\u001b[1;32m 276\u001b[0m sy\u001b[38;5;241m.\u001b[39mset_initial_value(stateTOV, r)\u001b[38;5;241m.\u001b[39mset_f_params(inveos)\n\u001b[1;32m 278\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m sy\u001b[38;5;241m.\u001b[39msuccessful() \u001b[38;5;129;01mand\u001b[39;00m stateTOV[\u001b[38;5;241m0\u001b[39m] \u001b[38;5;241m>\u001b[39m Pmin:\n\u001b[0;32m--> 279\u001b[0m stateTOV \u001b[38;5;241m=\u001b[39m sy\u001b[38;5;241m.\u001b[39mintegrate(sy\u001b[38;5;241m.\u001b[39mt \u001b[38;5;241m+\u001b[39m dr)\n\u001b[1;32m 280\u001b[0m dpdr, dmdr \u001b[38;5;241m=\u001b[39m TOV(sy\u001b[38;5;241m.\u001b[39mt \u001b[38;5;241m+\u001b[39m dr, stateTOV, inveos)\n\u001b[1;32m 281\u001b[0m dr \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m0.46\u001b[39m \u001b[38;5;241m*\u001b[39m (\u001b[38;5;241m1.0\u001b[39m \u001b[38;5;241m/\u001b[39m stateTOV[\u001b[38;5;241m1\u001b[39m] \u001b[38;5;241m*\u001b[39m dmdr \u001b[38;5;241m-\u001b[39m \u001b[38;5;241m1.0\u001b[39m \u001b[38;5;241m/\u001b[39m stateTOV[\u001b[38;5;241m0\u001b[39m] \u001b[38;5;241m*\u001b[39m dpdr) \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39m (\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m1.0\u001b[39m)\n",
"File \u001b[0;32m~/miniconda3/envs/Thesis-Project/lib/python3.11/site-packages/scipy/integrate/_ode.py:431\u001b[0m, in \u001b[0;36mode.integrate\u001b[0;34m(self, t, step, relax)\u001b[0m\n\u001b[1;32m 428\u001b[0m mth \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_integrator\u001b[38;5;241m.\u001b[39mrun\n\u001b[1;32m 430\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 431\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_y, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mt \u001b[38;5;241m=\u001b[39m mth(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mf, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mjac \u001b[38;5;129;01mor\u001b[39;00m (\u001b[38;5;28;01mlambda\u001b[39;00m: \u001b[38;5;28;01mNone\u001b[39;00m),\n\u001b[1;32m 432\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_y, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mt, t,\n\u001b[1;32m 433\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mf_params, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mjac_params)\n\u001b[1;32m 434\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mSystemError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[1;32m 435\u001b[0m \u001b[38;5;66;03m# f2py issue with tuple returns, see ticket 1187.\u001b[39;00m\n\u001b[1;32m 436\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\n\u001b[1;32m 437\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mFunction to integrate must not return a tuple.\u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[1;32m 438\u001b[0m ) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01me\u001b[39;00m\n",
"File \u001b[0;32m~/miniconda3/envs/Thesis-Project/lib/python3.11/site-packages/scipy/integrate/_ode.py:1176\u001b[0m, in \u001b[0;36mdopri5.run\u001b[0;34m(self, f, jac, y0, t0, t1, f_params, jac_params)\u001b[0m\n\u001b[1;32m 1175\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mrun\u001b[39m(\u001b[38;5;28mself\u001b[39m, f, jac, y0, t0, t1, f_params, jac_params):\n\u001b[0;32m-> 1176\u001b[0m x, y, iwork, istate \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mrunner(\u001b[38;5;241m*\u001b[39m((f, t0, y0, t1) \u001b[38;5;241m+\u001b[39m\n\u001b[1;32m 1177\u001b[0m \u001b[38;5;28mtuple\u001b[39m(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mcall_args) \u001b[38;5;241m+\u001b[39m (f_params,)))\n\u001b[1;32m 1178\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mistate \u001b[38;5;241m=\u001b[39m istate\n\u001b[1;32m 1179\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m istate \u001b[38;5;241m<\u001b[39m \u001b[38;5;241m0\u001b[39m:\n",
"File \u001b[0;32m~/Desktop/HackWeek/CompactOject/TOVsolver/solver_code.py:74\u001b[0m, in \u001b[0;36mTOV\u001b[0;34m(r, y, inveos)\u001b[0m\n\u001b[1;32m 62\u001b[0m adind \u001b[38;5;241m=\u001b[39m (\n\u001b[1;32m 63\u001b[0m ci\n\u001b[1;32m 64\u001b[0m \u001b[38;5;241m*\u001b[39m presgrid[idx \u001b[38;5;241m-\u001b[39m \u001b[38;5;241m1\u001b[39m]\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 69\u001b[0m \u001b[38;5;241m/\u001b[39m P\n\u001b[1;32m 70\u001b[0m )\n\u001b[1;32m 71\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m adind\n\u001b[0;32m---> 74\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mTOV\u001b[39m(r, y, inveos):\n\u001b[1;32m 75\u001b[0m pres, m \u001b[38;5;241m=\u001b[39m y\n\u001b[1;32m 77\u001b[0m \u001b[38;5;66;03m# eps = 10**inveos(np.log10(pres))\u001b[39;00m\n",
"\u001b[0;31mKeyboardInterrupt\u001b[0m: "
]
}
],
"source": [
"step = 2 * len(parameters)\n",
"live_point = 400\n",
"\n",
"max_calls = 60000\n",
"samples = sampler.UltranestSampler(parameters,likelihood_transform,prior_transform,step,live_point,max_calls)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "240dec67",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -281,7 +314,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 5a23a84

Please sign in to comment.