Skip to content

Conversation

@adrn
Copy link
Contributor

@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
Contributor 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

@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
Contributor

@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
Contributor

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
Contributor 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
Contributor

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
Contributor 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
Contributor 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.

@adrn adrn merged commit 0e628ee into astropy-learn:master May 10, 2021
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