Skip to content

Commit

Permalink
📝 Improve examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Xen0Xys authored and ManonMarchand committed May 7, 2024
1 parent 300fd15 commit 39415a9
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 4 deletions.
33 changes: 33 additions & 0 deletions examples/2_Base_Commands.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@
"aladin.target = \"sgr a*\""
]
},
{
"metadata": {},
"cell_type": "code",
"outputs": [],
"execution_count": null,
"source": "aladin.target"
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -122,6 +129,32 @@
"source": [
"aladin.coo_frame"
]
},
{
"metadata": {},
"cell_type": "markdown",
"source": "Some commands can be used with astropy objects"
},
{
"metadata": {},
"cell_type": "code",
"outputs": [],
"execution_count": null,
"source": "from astropy.coordinates import Angle, SkyCoord"
},
{
"metadata": {},
"cell_type": "code",
"outputs": [],
"execution_count": null,
"source": "aladin.target = SkyCoord(\"12h00m00s\", \"-30d00m00s\", frame=\"icrs\")"
},
{
"metadata": {},
"cell_type": "code",
"outputs": [],
"execution_count": null,
"source": "aladin.fov = Angle(5, \"deg\")"
}
],
"metadata": {
Expand Down
2 changes: 1 addition & 1 deletion examples/3_Functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
" \"http://vizier.u-strasbg.fr/viz-bin/votable?-source=HIP2&-c=LMC&-out.add=_RAJ,_\"\n",
" \"DEJ&-oc.form=dm&-out.meta=DhuL&-out.max=9999&-c.rm=180\"\n",
")\n",
"options = {\"sourceSize\": 12, \"color\": \"#f08080\", \"onClick\": \"showTable\"}\n",
"options = {\"source_size\": 12, \"color\": \"#f08080\", \"on_click\": \"showTable\"}\n",
"aladin.add_catalog_from_URL(url, options)"
]
},
Expand Down
4 changes: 2 additions & 2 deletions examples/4_Importing_Tables.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"metadata": {},
"outputs": [],
"source": [
"aladin.add_table(table, shape=\"rhomb\", color=\"lightskyblue\", sourceSize=20)\n",
"# This line also works with snake_case instead of camelCase: source_size=20"
"aladin.add_table(table, shape=\"rhomb\", color=\"lightskyblue\", source_size=20)\n",
"# This line also works with camelCase instead of snake_case: sourceSize=20"
]
},
{
Expand Down
4 changes: 3 additions & 1 deletion examples/5_Display_a_MOC.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@
" external_radius=20 * u.deg,\n",
" max_depth=16,\n",
")\n",
"aladin.add_moc(moc, color=\"teal\", edge=True, lineWidth=3, fillColor=\"teal\", opacity=0.5)"
"aladin.add_moc(\n",
" moc, color=\"teal\", edge=True, line_width=3, fill_color=\"teal\", opacity=0.5\n",
")"
]
}
],
Expand Down

0 comments on commit 39415a9

Please sign in to comment.