Skip to main content

Fayde

The fayde Python package provides the Fayde astrometric plate solver. You provide a FITS image of a star field and information about the frame, such as its pointing, pixel scale, and observation time. Fayde finds the stars in the image, matches them against the UCAC4 star catalog, and returns a verified world coordinate system (WCS) solution with its measured accuracy.

Prerequisites

To use the package, you need the following:

  • CPython 3.10 or later. One wheel works with every later version, and you don't need Rust to install it.
  • To solve frames, a local copy of the UCAC4 catalog. Detection with fayde.detect works without one. The catalog isn't included with this package. For download instructions, see Get the UCAC4 catalog.

Install the package

To install the package from PyPI, follow these steps:

  1. Activate a virtual environment.

  2. Install the package with pip:

    python -m pip install fayde
    

    The package also installs the fayde command. It runs the same code as the release binaries.

For more information about installation, see Install the Python package.

Solve a frame

To open the catalog and load the indexes only once, reuse one solver for every frame. To find the stars in an image and solve it, create the solver and call solve_image:

import fayde

solver = fayde.Solver("/path/to/UCAC4")
report = solver.solve_image("frame.fits")
if report["solved"]:
    cards = report["wcs_cards"]

Replace /path/to/UCAC4 with the path to your catalog directory and frame.fits with the path to your FITS image. If the FAYDE_UCAC4 environment variable contains the path to the catalog directory, you can omit the catalog argument: fayde.Solver().

The image argument accepts the path to a FITS file, a 2-D NumPy array, or an Astropy HDU. For an array, pass the frame's header with header. You can use Fayde without NumPy or Astropy.

If you detect the stars yourself, pass their positions to solve. In this example, x, y, and flux are sequences of the source positions and fluxes from your detector, and hdr is the image header. The indexes and instrument arguments are optional. To solve the source list, check the WCS, fit the WCS again, and find catalog stars at the source positions, use these methods:

solver = fayde.Solver("/path/to/UCAC4", indexes=["allsky-1.0.fidx"])
report = solver.solve(x, y, flux=flux, header=hdr, instrument="profiles/example.json",
                      deadline=5.0)
if report["solved"]:
    cards = report["wcs_cards"]
    check = solver.verify(x, y, cards, header=hdr)
    refit = solver.refit(x, y, cards, header=hdr)
    stars = solver.stars_at(cards, x, y, header=hdr)

The verify method checks the WCS against the catalog without changing it. The refit method fits the WCS again from the matched stars. It returns the same report fields as solve, including wcs_cards when it finds a solution.

The solve, verify, and refit methods take x and y as 0-based positions, as NumPy and Astropy index pixels. If your positions are 1-based, as in FITS, pass origin=1. These methods also accept the following optional sequences, with one value for each source:

  • flux: The integrated flux in any linear unit
  • sigma_px: The 1σ position error in pixels
  • p_star: The prior probability that the source is a real star, from 0 to 1
  • truncated: Whether the frame edge or a mask cuts the source, as booleans or as 0 and 1

Fayde ignores sigma_px values that aren't positive and p_star values outside that range. In flux, sigma_px, and p_star, NaN means that the source has no value.

To find the stars in an image without solving it, use fayde.detect:

detection = fayde.detect("frame.fits")
sources = detection["sources"]

The x and y positions in the detection report are 1-based, as in FITS. To solve these sources, pass the report to solve_detection:

report = solver.solve_detection(detection, header=hdr)

The solve_detection method passes the image size and each source's position, flux, sigma_px, p_star, and truncated value to the solver. If the report identifies star trails, the method also passes the measured trail unless you give trail_length and trail_angle. It doesn't read the image header, so pass the header with header. If you pass the detection report's positions to solve without origin=1, Fayde interprets each coordinate as one pixel larger than its actual value.

If an image shows star trails in more than one direction, give the expected direction to fayde.detect with trail_angle, in degrees from +x toward +y. Fayde still measures the trail from the image. With solve_image, give trail_length and trail_angle together. The angle guides detection, and the two values replace the measured trail in the solve.

The Python interface follows the fayde command line:

  • The solve, solve_detection, solve_image, verify, and refit methods take the command-line options under the same names with underscores, such as pointing_sigma and relax_priors_on_failure. In Python, run help(fayde) to list them. The detect function and the stars_at method have their own options. To list those options, run help(fayde.detect) and help(fayde.Solver.stars_at).
  • The solve_image method also takes the options of detect, such as detect_threshold, which must be at least 1.5.
  • Input coordinates x and y of solve, verify, refit, and stars_at are 0-based unless you pass origin=1. Pixel fields in the reports, including the source positions from detect, are 1-based, as in FITS.
  • The header argument accepts a dictionary, a list of header cards, or an astropy.io.fits.Header. The WCS argument of verify, refit, and stars_at accepts the same types.
  • The instrument argument accepts a profile dictionary or the path to a profile file.
  • The report is a dictionary with the same fields as the command-line JSON report. For more information about these fields, see Read the report.
  • An invalid option raises ValueError. A solver failure raises fayde.FaydeError, which stores the report in its report attribute.
  • Fayde releases the global interpreter lock (GIL) while it solves, so threads can share one Solver.

The package includes type information: the py.typed marker and the fayde.Report, fayde.AtReport, and fayde.DetectReport types.

For more information, see the following pages:

License

Fayde uses the GNU General Public License, version 3 or later. The wheel includes LICENSE, NOTICE, and THIRD-PARTY-LICENSES.md, which lists the licenses of the Rust crates compiled into the wheel. If you use Fayde in a publication, cite it as described in CITATION.cff.

Metadata

Release files for fayde 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fayde 0.4.0
File Size Uploaded Provenance Actions
fayde-0.4.0.tar.gz 450.9 kB With provenance Details for fayde-0.4.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for fayde 0.4.0
File Actions
fayde-0.4.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for fayde-0.4.0-cp310-abi3-win_amd64.whl
fayde-0.4.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for fayde-0.4.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
fayde-0.4.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for fayde-0.4.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
fayde-0.4.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for fayde-0.4.0-cp310-abi3-macosx_11_0_arm64.whl
fayde-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for fayde-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 7.0 MB

Release files / fayde-0.4.0.tar.gz

Download URL fayde-0.4.0.tar.gz
Size 450.9 kB
Tags Source
SHA-256 checksum
How to use checksums
eee03f7793f09b5dd006b55dcdb4f35cda5c5777fe21b871026d3a57510d0da4
BLAKE2b-256 checksum
How to use checksums
0352634c23a38d6d12e2e72856e7de6981fe9b5889624ddf95c0d0b42436d2c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / fayde-0.4.0-cp310-abi3-win_amd64.whl

Download URL fayde-0.4.0-cp310-abi3-win_amd64.whl
Size 1.3 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
b07666ed78bdac53077b8c5b084c121c8864f6a36ac4396362528ae7b8cda767
BLAKE2b-256 checksum
How to use checksums
6cdea9afe50f5a914ca22f1a2f9e22b029944a47c8fcddc4fe03f52ab56f3e29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / fayde-0.4.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL fayde-0.4.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.4 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
6d940feb5be91bb1899aacdc7a2aa0cc6134601ee44070e9e1f5e5b8dae0e001
BLAKE2b-256 checksum
How to use checksums
308bf1aea3a16f76a1522410b6aae98a8abbfd22ca97fbde86cb14c858588366
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / fayde-0.4.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL fayde-0.4.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.2 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
8f898ed4b62d066154550180f75a20edfdc2d20b8c37e6e7a121c4037188bc44
BLAKE2b-256 checksum
How to use checksums
5db0fb87263d0c5cc2b03284e92bc0d3e298de7ae58559c0b01d1e73e90a81f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / fayde-0.4.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL fayde-0.4.0-cp310-abi3-macosx_11_0_arm64.whl
Size 1.3 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c61265b2634213f858aa9b45593b258705cb1fa9e48cfcc92be7504fa76767e5
BLAKE2b-256 checksum
How to use checksums
20f41e1b668d09fb3be08e1f6b391c50d904742766e1f48e705f5b1e61916f3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / fayde-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL fayde-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 1.4 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
3ba059682da785a9256fe573d645b3ef21b171907b555e91c8e250e30d2f37d4
BLAKE2b-256 checksum
How to use checksums
c57994b4dc377618f705704497cf4352ab1ec18218b8e3fe2510a4a090b044e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Security for fayde 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for fayde-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page