diff --git a/jupyter-notebooks/HdbppReader_demonstrator.ipynb b/jupyter-notebooks/HdbppReader_demonstrator.ipynb index b072495de3a7f1b82847a6dd1efde2aeedb7caeb..ea1786979fa6083cc7660176f1ece3da2bba21ad 100644 --- a/jupyter-notebooks/HdbppReader_demonstrator.ipynb +++ b/jupyter-notebooks/HdbppReader_demonstrator.ipynb @@ -2,19 +2,19 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 3, "id": "d0328351", "metadata": {}, "outputs": [], "source": [ "import sys, time\n", - "sys.path.append('/hosthome/tango/tangostationcontrol/tangostationcontrol/')\n", - "from toolkit.hdbpp_reader.timescaledb import TimescaleDbReader" + "sys.path.append('/hosthome/tango/tangostationcontrol/tangostationcontrol/toolkit/libhdbpp-python')\n", + "from hdbpp_reader.timescaledb import TimescaleDbReader" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 4, "id": "c2295969", "metadata": {}, "outputs": [], @@ -25,7 +25,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 5, "id": "24cd0dbc", "metadata": {}, "outputs": [ @@ -39,7 +39,7 @@ " 'port': 5432}" ] }, - "execution_count": 12, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -50,17 +50,17 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 6, "id": "2e01bf2a", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "<connection object at 0x7fe83d1b0e08; dsn: 'user=postgres password=xxx dbname=hdb host=archiver-timescale port=5432', closed: 0>" + "<connection object at 0x7fcf8f18ee08; dsn: 'user=postgres password=xxx dbname=hdb host=archiver-timescale port=5432', closed: 0>" ] }, - "execution_count": 13, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -72,7 +72,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 7, "id": "582e2c9e", "metadata": {}, "outputs": [ @@ -164,7 +164,7 @@ " 'tango://databaseds:10000/stat/sdp/1/tr_software_version_r']" ] }, - "execution_count": 14, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -176,7 +176,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 8, "id": "9f985ceb", "metadata": {}, "outputs": [ @@ -212,7 +212,7 @@ " 'tango://databaseds:10000/stat/recv/1/status']" ] }, - "execution_count": 15, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -225,7 +225,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 9, "id": "5517c508", "metadata": {}, "outputs": [ @@ -235,7 +235,7 @@ "1" ] }, - "execution_count": 16, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -248,7 +248,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 10, "id": "740064f3", "metadata": {}, "outputs": [ @@ -258,7 +258,7 @@ "{}" ] }, - "execution_count": 26, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -274,46 +274,31 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 11, "id": "d48fe536", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "[(datetime.datetime(2022, 3, 8, 15, 38, 34, 497576, tzinfo=datetime.timezone.utc),\n", + "[(datetime.datetime(2022, 3, 9, 12, 0, 27, 686930, tzinfo=datetime.timezone.utc),\n", " None,\n", " None,\n", " 1,\n", - " 2),\n", - " (datetime.datetime(2022, 3, 8, 15, 38, 23, 838368, tzinfo=datetime.timezone.utc),\n", + " 1),\n", + " (datetime.datetime(2022, 3, 8, 15, 38, 34, 497576, tzinfo=datetime.timezone.utc),\n", " None,\n", " None,\n", " 1,\n", " 2),\n", - " (datetime.datetime(2022, 3, 8, 15, 38, 23, 401983, tzinfo=datetime.timezone.utc),\n", - " [0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0],\n", + " (datetime.datetime(2022, 3, 8, 15, 38, 23, 838368, tzinfo=datetime.timezone.utc),\n", " None,\n", - " 0,\n", - " None)]" + " None,\n", + " 1,\n", + " 2)]" ] }, - "execution_count": 27, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -328,14 +313,19 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 12, "id": "fcab2a21", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "[(datetime.datetime(2022, 3, 8, 15, 38, 34, 497576, tzinfo=datetime.timezone.utc),\n", + "[(datetime.datetime(2022, 3, 9, 12, 0, 27, 686930, tzinfo=datetime.timezone.utc),\n", + " None,\n", + " None,\n", + " 1,\n", + " 1),\n", + " (datetime.datetime(2022, 3, 8, 15, 38, 34, 497576, tzinfo=datetime.timezone.utc),\n", " None,\n", " None,\n", " 1,\n", @@ -1147,7 +1137,7 @@ " 1)]" ] }, - "execution_count": 28, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -1156,14 +1146,6 @@ "# Get the last attribute values given a start date and optionally a stop date\n", "reader.get_attribute_values(a, start_date='2022-03-08 00:00:00')" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "7caeb8a9", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": {