{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## EFIx_LP product access" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "\r", "[1/1] Processing: 0%| | [ Elapsed: 00:00, Remaining: ? ]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Can't download new leap second table\n", "Can't find leap second table. Using one built into code.\n", "Last leap second in built in table is on Jan 01 2017. \n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "[1/1] Processing: 100%|██████████| [ Elapsed: 00:01, Remaining: 00:00 ]\n", " Downloading: 100%|██████████| [ Elapsed: 00:00, Remaining: 00:00 ] (8.042MB)\n" ] } ], "source": [ "# load data from VirES server\n", "\n", "from viresclient import SwarmRequest\n", "\n", "request = SwarmRequest(\"https://staging.viresdisc.vires.services/openows\")\n", "request.set_collection(\"SW_OPER_EFIA_LP_1B\")\n", "request.set_products(\n", " measurements=[\n", " 'U_orbit', 'Ne', 'Te', 'Vs',\n", " 'Ne_error', 'Te_error', 'Vs_error',\n", " 'Flags_LP', 'Flags_Ne', 'Flags_Te', 'Flags_Vs',\n", " ],\n", " auxiliaries=[],\n", " sampling_step=\"PT1S\" \n", ")\n", "data = request.get_between(\n", " start_time=\"2018-09-15T00:00:00Z\",\n", " end_time=\"2018-09-16T00:00:00Z\"\n", ").as_xarray()" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "Dimensions: (Timestamp: 86388)\n", "Coordinates:\n", " * Timestamp (Timestamp) datetime64[ns] 2018-09-15T00:00:00.197000027 ... 2018-09-15T23:59:59.197000027\n", "Data variables:\n", " Spacecraft (Timestamp) " ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "# display residuals\n", "\n", "from matplotlib.pyplot import figure, subplot, show\n", "\n", "\n", "fig = figure(figsize=(12, 12), dpi=100)\n", "\n", "ax = subplot(411)\n", "ax.plot(times, ne)\n", "ax.grid()\n", "ax.set_xlabel('MJD2000')\n", "ax.set_ylabel('Ne / cm-3')\n", "\n", "ax = subplot(412)\n", "ax.plot(times, te)\n", "ax.grid()\n", "ax.set_xlabel('MJD2000')\n", "ax.set_ylabel('Te / K')\n", "\n", "ax = subplot(413)\n", "ax.plot(times, vs)\n", "ax.grid()\n", "ax.set_xlabel('MJD2000')\n", "ax.set_ylabel('Vs / V')\n", "\n", "ax = subplot(414)\n", "ax.plot(times, uorb)\n", "ax.grid()\n", "ax.set_xlabel('MJD2000')\n", "ax.set_ylabel('U_orbit / m/s')\n", "\n", "show();" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3.7 (conda)", "language": "python", "name": "python_3.7_conda" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.0" } }, "nbformat": 4, "nbformat_minor": 2 }