From b3ba03cc6bac4c48256138868ee70c5942a0231b Mon Sep 17 00:00:00 2001 From: Xen0Xys Date: Thu, 8 Aug 2024 09:27:43 +0200 Subject: [PATCH] :memo: Update example 4 with new error plotting --- examples/04_Importing_Tables.ipynb | 86 ++++++++++++++++++------------ 1 file changed, 51 insertions(+), 35 deletions(-) diff --git a/examples/04_Importing_Tables.ipynb b/examples/04_Importing_Tables.ipynb index cd5df9a5..c30fa7b5 100644 --- a/examples/04_Importing_Tables.ipynb +++ b/examples/04_Importing_Tables.ipynb @@ -99,45 +99,61 @@ "source": [ "aladin.add_table(t)" ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "base", - "language": "python", - "name": "python3" }, - "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.11.3" + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Display the table with the error approximations\n", + "First, let's re-use the table from the Simbad query and specify the error columns and units, and the ellipse enclosed probability.\n", + "### Note\n", + "Ipyaladin only support oriented ellipse and radial errors for the moment.\n", + "Radial error can be specified with the `r` column in the table." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "error_dict = {\n", + " \"smaj\": {\"col\": \"coo_err_maj\", \"unit\": u.mas},\n", + " \"smin\": {\"col\": \"coo_err_min\", \"unit\": u.mas},\n", + " \"pa\": {\"col\": \"coo_err_angle\", \"unit\": u.deg},\n", + " # Let's the default value for the ellipse enclosed probability\n", + " \"ellipse_enclosed_probability\": 0.39347,\n", + "}" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "And then add the table to the Aladin widget" + ] }, - "toc": { - "base_numbering": 1, - "nav_menu": {}, - "number_sections": false, - "sideBar": false, - "skip_h1_title": false, - "title_cell": "Table of Contents", - "title_sidebar": "Contents", - "toc_cell": false, - "toc_position": {}, - "toc_section_display": false, - "toc_window_display": false + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "aladin2 = Aladin(target=\"M1\", fov=0.2)\n", + "aladin2" + ] }, - "vscode": { - "interpreter": { - "hash": "85bb43f988bdbdc027a50b6d744a62eda8a76617af1f4f9b115d38242716dbac" - } + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "aladin2.add_table(table, error_dict=error_dict)" + ] } - }, + ], + "metadata": {}, "nbformat": 4, "nbformat_minor": 4 }