Skip to content

Commit cafdbd6

Browse files
cppartsbmatthieu3
authored andcommitted
adding in rotation setting/getting to examples
1 parent 71e0804 commit cafdbd6

2 files changed

Lines changed: 55 additions & 2 deletions

File tree

examples/02_Base_Commands.ipynb

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,29 @@
8888
"aladin.fov"
8989
]
9090
},
91+
{
92+
"cell_type": "markdown",
93+
"metadata": {},
94+
"source": [
95+
"The orientation of the view (view center to north pole angle in degrees) can be set"
96+
]
97+
},
98+
{
99+
"cell_type": "markdown",
100+
"metadata": {},
101+
"source": [
102+
"aladin.rotation = 180"
103+
]
104+
},
105+
{
106+
"cell_type": "code",
107+
"execution_count": null,
108+
"metadata": {},
109+
"outputs": [],
110+
"source": [
111+
"aladin.rotation"
112+
]
113+
},
91114
{
92115
"cell_type": "markdown",
93116
"metadata": {},
@@ -134,7 +157,7 @@
134157
"cell_type": "markdown",
135158
"metadata": {},
136159
"source": [
137-
"The target and field of view can be set with astropy objects"
160+
"The target, rotation, and field of view can be set with astropy objects"
138161
]
139162
},
140163
{
@@ -146,6 +169,15 @@
146169
"aladin.target = SkyCoord(\"12h00m00s\", \"-30d00m00s\", frame=\"icrs\")"
147170
]
148171
},
172+
{
173+
"cell_type": "code",
174+
"execution_count": null,
175+
"metadata": {},
176+
"outputs": [],
177+
"source": [
178+
"aladin.rotation = Angle(0, \"deg\")"
179+
]
180+
},
149181
{
150182
"cell_type": "code",
151183
"execution_count": null,

examples/11_Extracting_information_from_the_view.ipynb

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@
8181
"aladin.survey = \"CDS/P/PLANCK/R2/HFI/color\"\n",
8282
"aladin.target = \"LMC\"\n",
8383
"aladin.frame = \"Galactic\"\n",
84-
"aladin.fov = 50"
84+
"aladin.fov = 50\n",
85+
"aladin.rotation = 90"
8586
]
8687
},
8788
{
@@ -124,6 +125,26 @@
124125
"aladin.fov_xy # Recover the current field of view for the x and y axis"
125126
]
126127
},
128+
{
129+
"cell_type": "markdown",
130+
"id": "fcd830c2",
131+
"metadata": {},
132+
"source": [
133+
"## Getting the rotation\n",
134+
"\n",
135+
"The rotation of the view (view center to north pole angle in degrees) can be found with:"
136+
]
137+
},
138+
{
139+
"cell_type": "code",
140+
"execution_count": null,
141+
"id": "8c20e7c1",
142+
"metadata": {},
143+
"outputs": [],
144+
"source": [
145+
"aladin.rotation # Recover the current rotation of the view"
146+
]
147+
},
127148
{
128149
"cell_type": "markdown",
129150
"id": "5ef087ca59d890ce",

0 commit comments

Comments
 (0)