--- id: pyerfa version: "2.0.1.5" license: BSD 3-Clause License license_treatment: permissive maintenance: active --- # pyerfa — Python bindings for ERFA License: permissive · Maintenance: active · Downloads: 3.4M/mo ## What it is and what it does PyERFA is a Python wrapper around ERFA, a C library of fundamental astronomy algorithms published by the International Astronomical Union. It exposes ERFA routines as numpy universal functions, allowing them to work seamlessly with both scalar and array inputs. The package originated as a split from Astropy's internal _erfa module and now stands as a standalone dependency for astronomy and astrophysics work. The library provides access to ERFA's key algorithms—including coordinate transformations, time conversions, and planetary position calculations—along with ERFA constants and structured data types. It handles error and warning states automatically through wrapped Python functions, though direct access to raw ufuncs is also available for lower-level control. Installation requires numpy and targets Python 3.9+, with prebuilt wheels for most common platforms. Use it for: - Convert Julian dates to calendar dates for astronomical observations and data processing. - Calculate planetary positions and velocities for mission planning or ephemeris generation. - Perform time-scale conversions for precise astronomical timing and coordination. - Access ERFA constants and structured data types used in fundamental astronomy. - Batch-process large arrays of astronomical data using vectorized universal functions. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PyERFA wraps the ERFA C library (Essential Routines for Fundamental Astronomy) as NumPy universal functions, exposing key astronomy algorithms for scalar or array inputs. Yes. PyERFA is actively maintained, has no known vulnerabilities, and provides the standard Python interface to ERFA algorithms. Install it if you need fundamental astronomy calculations or if another package depends on it. The BSD 3-Clause License poses no restrictions, and prebuilt wheels minimize friction on common platforms. ## Install pip install pyerfa uv add pyerfa poetry add pyerfa ## Installing pyerfa Before you install: Medium install friction due to compiled C extension; prebuilt wheels cover common platforms (CPython 3.9+, PyPy 3.9+, x86_64/ARM64/Windows). Repository is active with recent commits. License in practice: BSD 3-Clause License is permissive; you can use, modify, and distribute pyerfa with minimal restrictions, provided you retain the license notice. Quickstart: pip install pyerfa import pyerfa result = pyerfa.jd2cal(2460000., [0, 1, 2, 3]) Requires Python 3.9 or later and numpy as a runtime dependency. Verify before relying: - Whether system-provided liberfa (via PYERFA_USE_SYSTEM_LIBERFA=1) offers performance or compatibility benefits. - Performance characteristics and numerical accuracy compared to other astronomy libraries. - Specific ERFA algorithms and their use cases beyond the examples in the documentation. ## Package facts - License: BSD 3-Clause License (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 3.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags astronomy coordinate transformations, fundamental astronomy algorithms, ERFA library python wrapper, celestial mechanics calculations, numpy ufuncs astronomy, IAU SOFA algorithms, astronomical time conversions, astronomy, coordinate-transforms, numpy-ufuncs [View on SkillFed](https://skillfed.io/packages/pyerfa) · [View on PyPI](https://pypi.org/project/pyerfa/)