From d1212072b750ccaf92ca40e2246a67ebc31a5a27 Mon Sep 17 00:00:00 2001 From: Deaglan Bartlett Date: Thu, 17 Apr 2025 16:12:40 +0200 Subject: [PATCH] Increase sigma_vel to make problem feasible --- Plotting.ipynb | 37 +++++++++++++++++++++++++++++++++---- ini_example0.ini | 2 +- ini_example1.ini | 16 ++++++++-------- 3 files changed, 42 insertions(+), 13 deletions(-) diff --git a/Plotting.ipynb b/Plotting.ipynb index 5d99b30..4f4a110 100644 --- a/Plotting.ipynb +++ b/Plotting.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 3, + "execution_count": 7, "id": "faed859b-c6c1-448f-be71-28d6458e279b", "metadata": {}, "outputs": [], @@ -10,8 +10,9 @@ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import Pk_library as PKL\n", - "\n", - "import analysis" + "import os\n", + "import analysis\n", + "import h5py as h5" ] }, { @@ -191,9 +192,37 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 11, "id": "df7fc61f-05d5-498b-a8de-0ca00afaddf5", "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "mock_data.h5 0.521446084349996\n", + "mcmc_0.h5 0.05371104376346312\n", + "mcmc_20.h5 0.05765913633435571\n", + "mcmc_79.h5 0.06103314972961067\n" + ] + } + ], + "source": [ + "dirname = 'outdir/example1'\n", + "\n", + "all_fname = ['mock_data.h5', 'mcmc_0.h5', 'mcmc_20.h5', 'mcmc_79.h5']\n", + "\n", + "for fname in all_fname:\n", + " with h5.File(os.path.join(dirname, fname), 'r') as f:\n", + " sfield = f['scalars/BORG_final_density'][:]\n", + " print(fname, sfield.std())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ed3bc75f-b608-4aab-bc44-9798816fada4", + "metadata": {}, "outputs": [], "source": [] } diff --git a/ini_example0.ini b/ini_example0.ini index 1adb910..394f7b1 100644 --- a/ini_example0.ini +++ b/ini_example0.ini @@ -20,7 +20,7 @@ bias_sampler_blocked= true ares_heat = 1.0 [mcmc] -number_to_generate = 50 +number_to_generate = 5 random_ic = false init_random_scaling = 0.1 diff --git a/ini_example1.ini b/ini_example1.ini index 05ae4f3..ffb713c 100644 --- a/ini_example1.ini +++ b/ini_example1.ini @@ -1,9 +1,9 @@ [system] console_output = borg_log -VERBOSE_LEVEL = 2 -N0 = 64 -N1 = 64 -N2 = 64 +VERBOSE_LEVEL = 1 +N0 = 32 +N1 = 32 +N2 = 32 L0 = 500.0 L1 = 500.0 L2 = 500.0 @@ -20,8 +20,8 @@ bias_sampler_blocked= true ares_heat = 1.0 [mcmc] -number_to_generate = 1 -random_ic = false +number_to_generate = 10 +random_ic = true init_random_scaling = 0.1 [hades] @@ -54,7 +54,7 @@ z0 = 0 [mock] sigma_dens = 1. -sigma_vel = 100 +sigma_vel = 2000 [gravity] which_model = lpt @@ -65,5 +65,5 @@ forcesampling = 2 nsteps = 20 [velocity] -which_model = cic +which_model = linear rsmooth = 8.