From cb380219f9ab7754801c976195c392bfe73a7a19 Mon Sep 17 00:00:00 2001 From: nuluh Date: Mon, 21 Apr 2025 00:07:06 +0700 Subject: [PATCH] test(notebooks): update file paths for sensor data loading and add markdown for clarity --- code/notebooks/stft.ipynb | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/code/notebooks/stft.ipynb b/code/notebooks/stft.ipynb index 29125e7..9bc07b8 100644 --- a/code/notebooks/stft.ipynb +++ b/code/notebooks/stft.ipynb @@ -324,9 +324,9 @@ "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "ready_data1 = []\n", - "for file in os.listdir('D:/thesis/data/working/sensor1'):\n", - " ready_data1.append(pd.read_csv(os.path.join('D:/thesis/data/working/sensor1', file)))\n", - "# ready_data1[1]\n", + "for file in os.listdir('D:/thesis/data/converted/raw/sensor1'):\n", + " ready_data1.append(pd.read_csv(os.path.join('D:/thesis/data/converted/raw/sensor1', file)))\n", + "ready_data1[0]\n", "# colormesh give title x is frequency and y is time and rotate/transpose the data\n", "# Plotting the STFT Data" ] @@ -362,8 +362,8 @@ "outputs": [], "source": [ "ready_data2 = []\n", - "for file in os.listdir('D:/thesis/data/working/sensor2'):\n", - " ready_data2.append(pd.read_csv(os.path.join('D:/thesis/data/working/sensor2', file)))\n", + "for file in os.listdir('D:/thesis/data/converted/raw/sensor2'):\n", + " ready_data2.append(pd.read_csv(os.path.join('D:/thesis/data/converted/raw/sensor2', file)))\n", "ready_data2[5]" ] }, @@ -407,6 +407,13 @@ "print(x2)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Appending" + ] + }, { "cell_type": "code", "execution_count": null, @@ -448,15 +455,10 @@ ] }, { - "cell_type": "code", - "execution_count": null, + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [ - "y_1 = [1,1,1,1]\n", - "y_2 = [0,1,1,1]\n", - "y_3 = [1,0,1,1]\n", - "y_4 = [1,1,0,0]" + "### Labeling" ] }, { @@ -492,6 +494,16 @@ " print(ready_data1[i].shape[0])" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "for i in range(len(y_data)):\n", + " print(ready_data2[i].shape[0])" + ] + }, { "cell_type": "code", "execution_count": null, @@ -509,7 +521,8 @@ "metadata": {}, "outputs": [], "source": [ - "y_data" + "# len(y_data[0])\n", + "y_data[0]" ] }, {