diff --git a/applications/lofar2/model/pfb_os/pfb_reconstruction.ipynb b/applications/lofar2/model/pfb_os/pfb_reconstruction.ipynb index 48890cf6415d1eea14177dfe04b35808f2040ef5..8fbe59367c8c8f7e38722280600a54ad3bab9b3c 100644 --- a/applications/lofar2/model/pfb_os/pfb_reconstruction.ipynb +++ b/applications/lofar2/model/pfb_os/pfb_reconstruction.ipynb @@ -27,7 +27,7 @@ }, { "cell_type": "code", - "execution_count": 182, + "execution_count": 1, "id": "02689e50", "metadata": {}, "outputs": [], @@ -39,19 +39,10 @@ }, { "cell_type": "code", - "execution_count": 183, + "execution_count": 2, "id": "65235f50", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The autoreload extension is already loaded. To reload it, use:\n", - " %reload_ext autoreload\n" - ] - } - ], + "outputs": [], "source": [ "# Auto reload module when it is changed\n", "%load_ext autoreload\n", @@ -78,7 +69,7 @@ }, { "cell_type": "code", - "execution_count": 184, + "execution_count": 3, "id": "a39e99a2", "metadata": {}, "outputs": [], @@ -88,7 +79,7 @@ }, { "cell_type": "code", - "execution_count": 185, + "execution_count": 4, "id": "3436bc2a", "metadata": {}, "outputs": [], @@ -105,7 +96,7 @@ }, { "cell_type": "code", - "execution_count": 186, + "execution_count": 5, "id": "ca6b8c9d", "metadata": {}, "outputs": [], @@ -121,7 +112,7 @@ }, { "cell_type": "code", - "execution_count": 187, + "execution_count": 6, "id": "74eb2365", "metadata": {}, "outputs": [], @@ -133,7 +124,7 @@ }, { "cell_type": "code", - "execution_count": 188, + "execution_count": 7, "id": "55e0fe37", "metadata": {}, "outputs": [], @@ -145,7 +136,7 @@ }, { "cell_type": "code", - "execution_count": 189, + "execution_count": 8, "id": "20ae2f4a", "metadata": {}, "outputs": [], @@ -166,7 +157,7 @@ }, { "cell_type": "code", - "execution_count": 190, + "execution_count": 9, "id": "e08b5ba2", "metadata": {}, "outputs": [], @@ -211,7 +202,7 @@ }, { "cell_type": "code", - "execution_count": 191, + "execution_count": 10, "id": "bd4054d7", "metadata": {}, "outputs": [ @@ -267,7 +258,7 @@ }, { "cell_type": "code", - "execution_count": 192, + "execution_count": 11, "id": "181d6c07", "metadata": {}, "outputs": [], @@ -280,7 +271,7 @@ }, { "cell_type": "code", - "execution_count": 193, + "execution_count": 12, "id": "6108ff59", "metadata": {}, "outputs": [], @@ -299,7 +290,7 @@ }, { "cell_type": "code", - "execution_count": 194, + "execution_count": 13, "id": "3ec78793", "metadata": {}, "outputs": [], @@ -318,7 +309,7 @@ }, { "cell_type": "code", - "execution_count": 195, + "execution_count": 14, "id": "da37c5b9", "metadata": { "scrolled": true @@ -343,7 +334,7 @@ }, { "cell_type": "code", - "execution_count": 196, + "execution_count": 15, "id": "4f11bd88", "metadata": {}, "outputs": [], @@ -365,7 +356,7 @@ }, { "cell_type": "code", - "execution_count": 197, + "execution_count": 16, "id": "a3b429a8", "metadata": {}, "outputs": [], @@ -378,7 +369,7 @@ }, { "cell_type": "code", - "execution_count": 198, + "execution_count": 17, "id": "8e867248", "metadata": {}, "outputs": [ @@ -453,7 +444,7 @@ }, { "cell_type": "code", - "execution_count": 199, + "execution_count": 18, "id": "55808f1c", "metadata": {}, "outputs": [ @@ -499,7 +490,7 @@ }, { "cell_type": "code", - "execution_count": 200, + "execution_count": 19, "id": "6eb3b494", "metadata": {}, "outputs": [ @@ -523,7 +514,7 @@ }, { "cell_type": "code", - "execution_count": 201, + "execution_count": 20, "id": "eee415a1", "metadata": {}, "outputs": [], @@ -542,7 +533,7 @@ }, { "cell_type": "code", - "execution_count": 202, + "execution_count": 21, "id": "9468907a", "metadata": {}, "outputs": [], @@ -556,7 +547,7 @@ " # Input signal\n", " inData = wgData[b * Ndft : (b + 1) * Ndft]\n", " # Filter to downsample time signal\n", - " pfsDownData[b] = pfs.filter_block(inData)\n", + " pfsDownData[b] = pfs.filter_block(inData, flipped=False)\n", " # Frequency domain data\n", " # . The order of the pfs polyphases 0 : Ndft-1 fits the input order for FFT (and IFFT) \n", " if analysisFFT:\n", @@ -567,7 +558,7 @@ }, { "cell_type": "code", - "execution_count": 203, + "execution_count": 22, "id": "4d046175", "metadata": {}, "outputs": [ @@ -636,7 +627,7 @@ }, { "cell_type": "code", - "execution_count": 204, + "execution_count": 23, "id": "c8d0560c", "metadata": {}, "outputs": [], @@ -653,13 +644,13 @@ " if analysisFFT:\n", " timeData = Ndft * np.fft.ifft(freqData) # LOFAR\n", " else:\n", - " timeData = np.fft.fft(freqData) # [HARRIS Fig 7.16]\n", + " timeData = np.fft.fft(freqData) # [HARRIS Fig 7.16 has ifft]\n", " # Check that domain data is real\n", " if np.max(np.abs(timeData.imag)) > atol:\n", " plt.plot(timeData.imag)\n", " break;\n", " # Filter to upsample time domain data\n", - " pfsUpData[b] = Ndft * pfs.filter_block(timeData.real)\n", + " pfsUpData[b] = Ndft * pfs.filter_block(timeData.real, flipped=False)\n", " # Reconstructed time signal is the pfs output from the Ndft polyphases.\n", " # . For upsampling the commutator selects the pfs polyphases 0 : Ndft-1,\n", " # which fits the data output order in time\n", @@ -668,7 +659,7 @@ }, { "cell_type": "code", - "execution_count": 205, + "execution_count": 24, "id": "e01f671d", "metadata": {}, "outputs": [ @@ -693,7 +684,7 @@ }, { "cell_type": "code", - "execution_count": 207, + "execution_count": 25, "id": "c0573913", "metadata": {}, "outputs": [