Skip to main content

My package description

Project description

AstrAFocus

AstrAFocus is a package that provides flexible autofocus (AF) procedures for telescopes. The tasks that this package aims to automate fall into two broad categories.

  1. Locate the focus calibration region:
    • Identify an area around the zenith that is suitable for focus calibration, given the chosen focus measurement operator.
  2. Perform autofocus:
    • Select the focus positions at which exposures should be taken.
    • Measure the focus of an exposure at a given focus position using a focus measure operator.
    • Estimate the point of optimal focus given a set of exposures taken at different focus positions.

logo image

Example Usage

The file, exploration/speculoos_main.py provides an example of using the Autofocus Telescope System. The key components include:

  • The initialisation of the interface with the hardware
    • TelescopeSpecs: Loading specs of the telescope from a .yaml file (see e.g. exploration/speculoos.yaml)
    • AutofocuserDeviceInterface: The interface between the API of the devices and this library.
      • CameraInterface: Interface for performing exposures.
      • FocuserInterface: Interface for changing the focus position of the telescope.
      • TelescopeInterface: The implementation of this interface is optional, as the telescope only needs to be oriented once after the focus calibration region has been determined with the targeting class ZenithNeighbourhoodQuery, which can be implemented externally. Accordingly, this swaying of the telescope can also be implemented externally. Note that it is currently assumed that the target tracking is controlled outside of this package.
  • Targeting
    • ZenithNeighbourhoodQuery: Queries the zenith neighbourhood in a database to find a suitable section of the sky for focusing.
  • Focsuing
    • SweepingAutofocuser: Performs the autofocusing using sweeping through a range of focus positions.
    • AnalyticResponseAutofocuser(SweepingAutofocuser): Performs the autofocusing utilising the analytic nature of the focus response curve of a given focus measure.
    • NonParametricResponseAutofocuser(SweepingAutofocuser): Performs the autofocusing using an arbitrary focus measure operator and then applying an extremum estimator from to find the position of maximal focus.

For detailed usage and customization, refer to the source code and docstrings in each module.

Installation

To install the package, clone the project and run:

python3 -m pip install

to install from source or

python3 -m pip install -e .

to install in editable mode. For more information, consult the Python Packaging User Guide.

The Gaia-2MASS Local Catalogue

The targeting procedure requires the Gaia-2MASS Local Catalogue which can be downlaoded here.

Optional Dependencies

The package supports additional features through optional dependencies. You can install these dependencies based on your needs. Choose from the following options:

# To also install visualization tools, including matplotlib, plotly and dash
python3 -m pip install ".[visualization]"

# To install packages for more statistics and machine learning, including scikit-learn.
python3 -m pip install ".[extended]"

# To install dash
python3 -m pip install ".[dash]"

# To install alpyca
python3 -m pip install ".[alpaca]"

Alpyca is a Python 3.7+ API library for all Astronomy Common Object Model (ASCOM) Alpaca universal interfaces. This library is a possible API for communication between this package and the devices required for focussing, namely the camera and the focuser.

Project Structure

The project structure includes several key directories:

  • astrafocus: The main package containing autofocus-related modules.
    • interface: Subpackage with modules for interfacing with the devices through their API components.
    • models: Modules defining mathematical models used by some of the autofocus procedures.
    • sql: Modules handling database queries of the Gaia-2MASS Local Catalogue (see above).
    • targeting: Modules related to targeting specific regions in the sky.
    • utils: General utility modules.

May your stars align and your focus be as sharp as a caffeinated owl spotting its prey!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

astrafocus-0.0.4.tar.gz (648.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

astrafocus-0.0.4-py3-none-any.whl (68.3 kB view details)

Uploaded Python 3

File details

Details for the file astrafocus-0.0.4.tar.gz.

File metadata

  • Download URL: astrafocus-0.0.4.tar.gz
  • Upload date:
  • Size: 648.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for astrafocus-0.0.4.tar.gz
Algorithm Hash digest
SHA256 6f40e31a2784a36a5f39496e619513b1e213fbd31bd80aeaa37eb73576f6f86d
MD5 3a7b4944179b800400f21085493e07cc
BLAKE2b-256 15cc4e469434871ba899980ac43e3eec7edb6cea454cb39db66b41ab863b1d92

See more details on using hashes here.

Provenance

The following attestation bundles were made for astrafocus-0.0.4.tar.gz:

Publisher: python-publish-to-pypi.yml on dgegen/astrafocus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file astrafocus-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: astrafocus-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 68.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for astrafocus-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7546ecbb0c343bf5a279e0720ed47224273fe3f923df95ec4bd674466cea6931
MD5 e1badbdb7ce98ae4b564a98e0ce5f2a1
BLAKE2b-256 4b97f07d2e34b6ce1826bdb30b6e9c1d17128c6b6a7dc435a573e54bce430583

See more details on using hashes here.

Provenance

The following attestation bundles were made for astrafocus-0.0.4-py3-none-any.whl:

Publisher: python-publish-to-pypi.yml on dgegen/astrafocus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page