Skip to content

Commit

Permalink
📝 Add example in notebook 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Xen0Xys committed Aug 6, 2024
1 parent 579cdbf commit db04f12
Showing 1 changed file with 45 additions and 44 deletions.
89 changes: 45 additions & 44 deletions examples/02_Base_Commands.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,20 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": []
},
"metadata": {},
"outputs": [],
"source": [
"aladin.target = \"sgr a*\""
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"aladin.target"
],
"outputs": [],
"execution_count": null
]
},
{
"cell_type": "markdown",
Expand All @@ -91,9 +89,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": []
},
"metadata": {},
"outputs": [],
"source": [
"aladin.fov = 2"
Expand All @@ -118,13 +114,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": []
},
"metadata": {},
"outputs": [],
"source": [
"aladin.overlay_survey = \"P/allWISE/color\"\n",
"aladin.overlay_survey_opacity = 0.5"
"aladin.add_hips(\"P/allWISE/color\", name=\"overlay\")\n",
"aladin.set_layer_opacity(\"overlay\", 0.5)"
]
},
{
Expand All @@ -137,9 +131,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": []
},
"metadata": {},
"outputs": [],
"source": [
"aladin.coo_frame = \"ICRSd\" # ICRS, and angles expressed in degrees"
Expand All @@ -163,12 +155,12 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from astropy.coordinates import Angle, SkyCoord"
],
"outputs": [],
"execution_count": null
]
},
{
"cell_type": "code",
Expand Down Expand Up @@ -204,32 +196,41 @@
"source": [
"aladin.add_fits(Path(\"images/m31.fits\"), name=\"M31\", opacity=0.5)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can get all layers identified by their name."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"aladin.layers"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"And remove a layer by its name."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"aladin.remove_layer(\"M31\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.8"
},
"vscode": {
"interpreter": {
"hash": "916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1"
}
}
},
"metadata": {},
"nbformat": 4,
"nbformat_minor": 4
}

0 comments on commit db04f12

Please sign in to comment.