Skip to content

Commit b6117a4

Browse files
committed
github reviews
1 parent 858937b commit b6117a4

File tree

3 files changed

+45
-3
lines changed

3 files changed

+45
-3
lines changed

tutorials/notebooks/astropy-coordinates/1-Coordinates-Intro.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"\n",
2323
"## Summary\n",
2424
"\n",
25-
"Astronomers use a wide variety of coordinate systems and formats to represent sky coordinates of celestial objects. For example, you may have seen terms like \"right ascension\" and \"declination\" or \"galactic latitude and longitude,\" and you may have seen angular coordinate components represented as \"0h39m15.9s,\" \"00:39:15.9,\" or 9.81625º. `astropy.coordinates` provides tools for representing the coordinates of objects and transforming them between different systems. \n",
25+
"Astronomers use a wide variety of coordinate systems and formats to represent sky coordinates of celestial objects. For example, you may have seen terms like \"right ascension\" and \"declination\" or \"galactic latitude and longitude,\" and you may have seen angular coordinate components represented as \"0h39m15.9s,\" \"00:39:15.9,\" or 9.81625º. The subpackage `astropy.coordinates` provides tools for representing the coordinates of objects and transforming them between different systems. \n",
2626
"\n",
2727
"In this tutorial, we will explore how the `astropy.coordinates` package can be used to work with astronomical coordinates. You may find it helpful to keep [the Astropy documentation for the coordinates package](http://docs.astropy.org/en/stable/coordinates/index.html) open alongside this tutorial for reference or additional reading. In the text below, you may also see some links that look like ([docs](http://docs.astropy.org/en/stable/coordinates/index.html)). These links will take you to parts of the documentation that are directly relevant to the cells from which they link. \n",
2828
"\n",
@@ -396,7 +396,7 @@
396396
"metadata": {},
397397
"outputs": [],
398398
"source": [
399-
"pleiades_center = SkyCoord.from_name('Pleiades')"
399+
"ngc188_center = SkyCoord.from_name('NGC 188')"
400400
]
401401
},
402402
{
@@ -421,7 +421,7 @@
421421
"cell_type": "markdown",
422422
"metadata": {},
423423
"source": [
424-
"Using a single method/function call on the `SkyCoord` object containing the results of our *Gaia* query, compute the angular separation between each resulting star and the coordinates of the cluster center.\n",
424+
"Using a single method/function call on the `SkyCoord` object containing the results of our *Gaia* query, compute the angular separation between each resulting star and the coordinates of the cluster center for NGC 188.\n",
425425
"\n",
426426
"<sub>(Hint: `SkyCoord.separation()` might be useful)</sub>"
427427
]

tutorials/notebooks/astropy-coordinates/2-Coordinates-Transforms.ipynb

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,46 @@
688688
"TODO"
689689
]
690690
},
691+
{
692+
"cell_type": "markdown",
693+
"metadata": {},
694+
"source": [
695+
"## Potential Caveats\n",
696+
"\n",
697+
"Transformations between some reference frames require knowing more information about a source. For example, the transformation from ICRS to Galactic coordinates (as demonstrated above) amounts to a 3D rotation, but no change of origin. This transformation is therefore supported for any spherical position (with or without distance information). However, some transformations include a change of origin, and therefore require that the source data (i.e., the `SkyCoord` object) has defined distance information. For example, for a `SkyCoord` with only sky position, we can transform from the ICRS to the FK5 coordinate system:"
698+
]
699+
},
700+
{
701+
"cell_type": "code",
702+
"execution_count": null,
703+
"metadata": {},
704+
"outputs": [],
705+
"source": [
706+
"icrs_c = coord.SkyCoord(150.4*u.deg, -11*u.deg)\n",
707+
"icrs_c.transform_to(coord.FK5())"
708+
]
709+
},
710+
{
711+
"cell_type": "markdown",
712+
"metadata": {},
713+
"source": [
714+
"However, we would *not* be able to transform this position to the `Galactocentric` frame ([docs](https://docs.astropy.org/en/stable/coordinates/galactocentric.html)), because this transformation involves a shift of origin from the solar system barycenter to the Galactic center:"
715+
]
716+
},
717+
{
718+
"cell_type": "code",
719+
"execution_count": null,
720+
"metadata": {
721+
"tags": [
722+
"raises-exception"
723+
]
724+
},
725+
"outputs": [],
726+
"source": [
727+
"# This cell will raise an exception - this is expected!\n",
728+
"icrs_c.transform_to(coord.Galactocentric())"
729+
]
730+
},
691731
{
692732
"cell_type": "markdown",
693733
"metadata": {},

tutorials/notebooks/astropy-coordinates/3-Coordinates-Velocities.ipynb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@
9191
"cell_type": "markdown",
9292
"metadata": {},
9393
"source": [
94+
"Here, you may notice that the proper motion in right ascension has \"cosdec\" in the name: This is to explicitly note that the input here is expected to be the proper motion scaled by the cosine of the declination, which accounts for the fact that a change in longitude (right ascension) has different physical length at different latitudes (declinations).\n",
95+
"\n",
9496
"Like the examples in previous tutorials demonstrated for positional coordinates, we can also create an array-valued `SkyCoord` object by passing in arrays of data for all of the components:"
9597
]
9698
},

0 commit comments

Comments
 (0)