-
-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coordinates tutorials overhaul #460
Conversation
c7dcd03
to
add55cd
Compare
ee4b984
to
693a6c3
Compare
I think these tutorials are ready for others to start reviewing! Here are the rendered notebooks, in case you'd like to read those first: These are still missing some exercises, but otherwise I think the content I would like to highlight is there. I've already noticed a few formatting issues, but can address those later if nbcollection is also having issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These new tutorials look great! The first two look perfect IMO, I left a couple of minor comments on the third one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only had time to look at the first notebook this morning. Looks very good, just have some minor suggestions!
tutorials/notebooks/astropy-coordinates/1-Coordinates-Intro.ipynb
Outdated
Show resolved
Hide resolved
"source": [ | ||
"For the `SkyCoord` initializations demonstrated above, we assumed that we already had the coordinate component values ready. If you do not know the coordinate values and the object you are interested in is in [SESAME](http://cdsweb.u-strasbg.fr/cgi-bin/Sesame), you can also automatically look up and load coordinate values from the name of the object using the `SkyCoord.from_name()` class method<sup>1</sup> ([docs](http://docs.astropy.org/en/latest/coordinates/index.html#convenience-methods)). Note, however, that this requires an internet connection. It is safe to skip this cell if you are not connected to the internet because we already defined the object `ngc188_center` in the cells above.\n", | ||
"\n", | ||
"<sub> <sup>1</sup>If you do not know what a class method is, think of it like an alternative constructor for a `SkyCoord` object — calling `SkyCoord.from_name()` with a name gives you a new `SkyCoord` object. For more detailed background on what class methods are and when they're useful, see [this page](https://julien.danjou.info/blog/2013/guide-python-static-class-abstract-methods).</sub>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I disagree here! It's a footnote, so can be ignored, but I do think this is a "teachable moment" for people to learn more about Python?
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"The `SkyCoord` component attributes (here ``ra`` and ``dec``) return specialized `Quantity`-like objects that make working with angular data easier. While `Quantity` ([docs](http://docs.astropy.org/en/stable/units/index.html)) is a general class that represents numerical values and physical units of any kind, `astropy.coordinates` defines subclasses of `Quantity` that are specifically designed for working with angles, such as the `Angle` ([docs](http://docs.astropy.org/en/stable/api/astropy.coordinates.Angle.html)) class. The `Angle` class then has additional, more specialized subclasses `Latitude` ([docs](http://docs.astropy.org/en/stable/api/astropy.coordinates.Latitude.html)) and `Longitude` ([docs](http://docs.astropy.org/en/stable/api/astropy.coordinates.Longitude.html)). These objects store angles, provide useful attributes to quickly convert to common angular units, and enable formatting the numerical values in various formats. For example, in a Jupyter notebook, these objects know how to represent themselves using LaTeX:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this level of detail on the class structure is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to trim if others agree! I am neutral
tutorials/notebooks/astropy-coordinates/1-Coordinates-Intro.ipynb
Outdated
Show resolved
Hide resolved
Oh no @adrn Didn't get your invite to review by email (maybe it is those pesky glitches of GitHub again... some of us would miss the occasional email notifications, some maybe all). I will review your PR within the next few days. 👌🏼 |
The coordinates tutorials executed fine, and have been through at least two rounds of review. I'm going to merge, because I think they are a big improvement over the existing tutorials. The new tutorials contain fewer exercises than the original coordinates notebook, so I opened #482 to keep track of the follow-up "todo" item of adding more exercises. |
This is a solution to #422!
I wrote a very long, more modern astropy.coordinates tutorial for the AAS workshop earlier this year. I split up the content into (what I think are) "Learn Astropy tutorial"-sized chunks and am in the process of editing them to meet our contributing guide. Please let me know if you have any feedback about the tutorial content! I think the new tutorials supersede the existing Intro and Transforms tutorials, so I've removed them and consolidated.