<commit_before>
==========
 Skyfield
==========

.. rst-class:: motto

   *Elegant Astronomy for Python*

.. testsetup::

   __import__('skyfield.tests.fixes').tests.fixes.setup()

   import os
   os.chdir('../..')  # same directory as de430t.bsp, hopefully

.. testcode::

    from skyfield.api import load

    planets = load('de421.bsp')
    earth, mars = planets['earth'], planets['mars']

    ts = load.timescale()
    t = ts.now()
    position = earth.at(t).observe(mars)
    ra, dec, distance = position.radec()

    print(ra)
    print(dec)
    print(distance)

.. testoutput::

    10h 47m 56.24s
    +09deg 03' 23.1"
    2.33251 au

Skyfield is a pure-Python astronomy package
that makes it easy to generate high precision research-grade
positions for planets and Earth satellites.
You can compute either geocentric coordinates
as shown in the example above,
or topocentric coordinates specific to your location
on the Earth’s surface:

.. testcode::<commit_msg>Explain what Skyfield is at top of home page<commit_after>
==========
 Skyfield
==========

.. rst-class:: motto

   *Elegant Astronomy for Python*

Skyfield computes positions for the stars and planets.
Its results should agree
with the positions generated by the United States Naval Observatory
and their *Astronomical Almanac*
to within 0.001 arcseconds.

* Written in pure Python and installs without any compilation.
* Supports Python 2.6 through Python 3.5.
* Depends only upon NumPy,
  the fundamental package for scientific computing with Python,
  whose vector operations make Skyfield efficient.

.. testsetup::

   __import__('skyfield.tests.fixes').tests.fixes.setup()

   import os
   os.chdir('../..')  # same directory as de430t.bsp, hopefully

.. testcode::

    from skyfield.api import load

    planets = load('de421.bsp')
    earth, mars = planets['earth'], planets['mars']

    ts = load.timescale()
    t = ts.now()
    position = earth.at(t).observe(mars)
    ra, dec, distance = position.radec()

    print(ra)
    print(dec)
    print(distance)

.. testoutput::

    10h 47m 56.24s
    +09deg 03' 23.1"
    2.33251 au

Skyfield can compute geocentric coordinates,
as shown in the example above,
or topocentric coordinates specific to your location
on the Earth’s surface:

.. testcode::
{'fraction_non_alphanumeric': 0.11695137976346912, 'fraction_numerical': 0.02715724923346474, 'mean_word_length': 3.443579766536965, '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': '3606887', 'n_tokens_mistral': 769, 'n_tokens_neox': 693, 'n_words': 240}