<commit_before>.. _sgr-example:

Example: Defining A Coordinate Frame for the Sgr Dwarf
------------------------------------------------------

This document describes in detail how to subclass and define a custom
spherical coordinate frame, as discussed in :doc:`frames` and the
docstring for `~astropy.coordinates.BaseCoordinateFrame`. In this
example, we will define a coordinate system defined by the plane of orbit of
the Sagittarius Dwarf Galaxy (hereafter Sgr; as defined in Majewski et
al. 2003).  The Sgr coordinate system is often referred to in terms of two
angular coordinates, :math:`\Lambda,B`.

We need to define a subclass of `~astropy.coordinates.BaseCoordinateFrame`
that knows the preferred names and units of the coordinate system angles.
In this case, these are "Lambda" and "Beta."" Then we have to define the
transformation from this coordinate system to some other built-in system.
Here we will use Galactic coordinates, represented by the
`~astropy.coordinates.Galactic` class.
<commit_msg>Typo fix pointed out by @astrofrog<commit_after>.. _sgr-example:

Example: Defining A Coordinate Frame for the Sgr Dwarf
------------------------------------------------------

This document describes in detail how to subclass and define a custom
spherical coordinate frame, as discussed in :doc:`frames` and the
docstring for `~astropy.coordinates.BaseCoordinateFrame`. In this
example, we will define a coordinate system defined by the plane of orbit of
the Sagittarius Dwarf Galaxy (hereafter Sgr; as defined in Majewski et
al. 2003).  The Sgr coordinate system is often referred to in terms of two
angular coordinates, :math:`\Lambda,B`.

We need to define a subclass of `~astropy.coordinates.BaseCoordinateFrame`
that knows the preferred names and units of the coordinate system angles.
In this case, these are "Lambda" and "Beta. Then we have to define the
transformation from this coordinate system to some other built-in system.
Here we will use Galactic coordinates, represented by the
`~astropy.coordinates.Galactic` class.

{'fraction_non_alphanumeric': 0.1059053196681308, 'fraction_numerical': 0.003904343582235237, 'mean_word_length': 3.7674418604651163, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2247392', 'n_tokens_mistral': 527, 'n_tokens_neox': 505, 'n_words': 273}