Skip to content
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

Merged
merged 21 commits into from
May 10, 2021
Merged

Conversation

adrn
Copy link
Member

@adrn adrn commented Sep 16, 2020

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.

  • Use @mwcraig 's script to update links to other notebooks in markdown cells (so as HTML, they link to HTML, but in notebooks they link to .ipynb files)
  • Swap tutorials 3 and 4 so we can cover proper motion propagation in Crossmatch

@adrn adrn marked this pull request as ready for review November 18, 2020 16:03
@adrn adrn force-pushed the coordinates-overhaul branch from c7dcd03 to add55cd Compare November 18, 2020 16:45
@adrn adrn force-pushed the coordinates-overhaul branch from ee4b984 to 693a6c3 Compare November 18, 2020 17:23
@adrn
Copy link
Member Author

adrn commented Nov 18, 2020

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.

cc @eblur @kelle @kakirastern @eteq

Copy link
Member

@astrojuanlu astrojuanlu left a 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.

Copy link
Member

@mwcraig mwcraig left a 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!

"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>"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The superscript/subscript are not rendering properly (see below) BUT I would suggest dropping the mention of class methods because I don't think it matters at all to the user.

Astronomical_Coordinates_1__Getting_Started_with_astropy_coordinates_—_astropy-tutorials_v3_0_dev

Copy link
Member Author

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:"
Copy link
Member

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.

Copy link
Member Author

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

@kakirastern
Copy link
Contributor

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. 👌🏼

@adrn adrn changed the title [WIP] Coordinates tutorials overhaul Coordinates tutorials overhaul May 6, 2021
@adrn
Copy link
Member Author

adrn commented May 10, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants