From c3a6d4836b17005292be04ff044a06d10215119a Mon Sep 17 00:00:00 2001 From: Eric Kooistra <kooistra@astron.nl> Date: Thu, 17 Oct 2024 17:21:53 +0200 Subject: [PATCH] Scale upsampling gain by Nup in function. --- .../model/pfb_os/up_down_sampling.ipynb | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/applications/lofar2/model/pfb_os/up_down_sampling.ipynb b/applications/lofar2/model/pfb_os/up_down_sampling.ipynb index e50e128cf1..afa3c5794f 100644 --- a/applications/lofar2/model/pfb_os/up_down_sampling.ipynb +++ b/applications/lofar2/model/pfb_os/up_down_sampling.ipynb @@ -18,7 +18,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 34, "id": "02689e50", "metadata": {}, "outputs": [], @@ -30,10 +30,19 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 35, "id": "acea4f0a", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The autoreload extension is already loaded. To reload it, use:\n", + " %reload_ext autoreload\n" + ] + } + ], "source": [ "# Auto reload module when it is changed\n", "%load_ext autoreload\n", @@ -56,7 +65,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 36, "id": "55e0fe37", "metadata": {}, "outputs": [], @@ -91,7 +100,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 37, "id": "e08b5ba2", "metadata": {}, "outputs": [ @@ -151,7 +160,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 38, "id": "0a69b385", "metadata": {}, "outputs": [ @@ -192,7 +201,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 39, "id": "ca83f348", "metadata": {}, "outputs": [ @@ -242,7 +251,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 40, "id": "5a402a30", "metadata": { "scrolled": true @@ -275,13 +284,13 @@ "tsUp = ts / Nup\n", "tUp = (np.arange(0, Nsim * Nup) - groupDelay) * tsUp\n", "\n", - "coefs = hPrototype * Nup\n", + "coefs = hPrototype\n", "upsampledData = upsample(wgData, Nup, coefs, verify=True)" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 41, "id": "ee8666c6", "metadata": {}, "outputs": [ @@ -318,7 +327,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 42, "id": "860828a7", "metadata": {}, "outputs": [ @@ -358,7 +367,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 43, "id": "53d6535f", "metadata": {}, "outputs": [ @@ -394,7 +403,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 44, "id": "ed8a87a4", "metadata": {}, "outputs": [ @@ -436,13 +445,13 @@ "Dsim = 1 + (Nsim * Nup - 1) // Ndown\n", "tResample = (np.arange(0, Dsim) * tsDown) - groupDelay * tsUp\n", "\n", - "coefs = hPrototype * Nup\n", + "coefs = hPrototype\n", "resampledData = resample(wgData, Nup, Ndown, coefs, verify=True)" ] }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 45, "id": "d085cf51", "metadata": {}, "outputs": [ -- GitLab