diff --git a/notebooks/wut-web-dev.ipynb b/notebooks/wut-web-dev.ipynb index 741e8cd..af47100 100644 --- a/notebooks/wut-web-dev.ipynb +++ b/notebooks/wut-web-dev.ipynb @@ -12,6 +12,7 @@ "#\n", "# GPLv3+\n", "\n", + "import json\n", "import os\n", "import random\n", "import tempfile\n", @@ -203,11 +204,17 @@ "outputs": [], "source": [ "def wutObs(datObs):\n", - " if int(datObs) > minobsid and int(datObs) < maxobsid:\n", + " if int(datObs) > ( minobsid - 1 ) and int(datObs) < maxobsid:\n", " print('Observation URL: https://network.satnogs.org/observations/{}'.format(datObs));\n", - " !cat /srv/satnogs/download/$datObs/$datObs\\.json | jq\n", + " #!cat /srv/satnogs/download/$datObs/$datObs\\.json | jq\n", + " obsjsonfile=('/srv/satnogs/download/' + format(datObs) + '/' + format(datObs) + '.json')\n", + " print('observation json file: ', obsjsonfile )\n", " print('Files:')\n", - " !ls /srv/satnogs/download/$datObs" + " !ls /srv/satnogs/download/$datObs\n", + " with open(obsjsonfile) as json_data:\n", + " d = json.load(json_data)\n", + " print(d)\n", + " #display(Image(filename=rfile, width=100))" ] }, { @@ -221,10 +228,19 @@ }, "outputs": [], "source": [ - "print('Enter an Observation ID above', minobsid, 'and below', maxobsid)\n", - "wutObs_slide = wg.IntText(value='0');\n", + "print('Enter an Observation ID between', minobsid, 'and', maxobsid)\n", + "wutObs_slide = wg.IntText(value='1292461');\n", "wg.interact(wutObs, datObs=wutObs_slide);" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#display(Image(filename=rfile, width=300))" + ] } ], "metadata": {