astrafocus


Nameastrafocus JSON
Version 0.0.3 PyPI version JSON
download
home_page
SummaryMy package description
upload_time2023-12-11 17:34:25
maintainer
docs_urlNone
author
requires_python>=3.11.3
licenseMIT
keywords telescope autofocus
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.
<p align="center">
   <img src="docs/logo.png" alt="logo image" width="45%" style="margin: 20px;">
</p>

## 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:
```bash
python3 -m pip install
```
to install from source or
```bash
python3 -m pip install -e .
```
to install in editable mode.
For more information, consult the [Python Packaging User Guide](https://packaging.python.org/en/latest/tutorials/installing-packages/#installing-from-a-local-src-tree).

### <a name="catalogue"></a>The Gaia-2MASS Local Catalogue
The targeting procedure requires the `Gaia-2MASS Local Catalogue` which can be downlaoded [here](https://github.com/ppp-one/gaia-tmass-sqlite).

### Optional Dependencies
The package supports additional features through optional dependencies.
You can install these dependencies based on your needs. Choose from the following options:
```bash
# 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](https://pypi.org/project/alpyca/)
for all Astronomy Common Object Model ([ASCOM](https://ascom-standards.org/))
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](#catalogue)).
   - `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!

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "astrafocus",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11.3",
    "maintainer_email": "",
    "keywords": "telescope,autofocus",
    "author": "",
    "author_email": "David Degen <ddegen@ethz.ch>",
    "download_url": "https://files.pythonhosted.org/packages/0d/a6/3f3fd6bdde52ba9e3021bbb7c2a32e52d10080db8e2c6bf8aceb67f11db5/astrafocus-0.0.3.tar.gz",
    "platform": null,
    "description": "# AstrAFocus\nAstrAFocus is a package that provides flexible autofocus (AF) procedures for telescopes.\nThe tasks that this package aims to automate fall into two broad categories.\n1. **Locate the focus calibration region**: \n   - Identify an area around the zenith that is suitable for focus calibration, given the chosen\n   focus measurement operator.\n2. **Perform autofocus**: \n   - Select the focus positions at which exposures should be taken.\n   - Measure the focus of an exposure at a given focus position using a focus measure operator.\n   - Estimate the point of optimal focus given a set of exposures taken at different focus positions.\n<p align=\"center\">\n   <img src=\"docs/logo.png\" alt=\"logo image\" width=\"45%\" style=\"margin: 20px;\">\n</p>\n\n## Example Usage\n\nThe file, `exploration/speculoos_main.py` provides an example of using the Autofocus Telescope System.\nThe key components include:\n- The initialisation of the interface with the hardware\n  - `TelescopeSpecs`: Loading specs of the telescope from a `.yaml` file (see e.g. `exploration/speculoos.yaml`)\n  - `AutofocuserDeviceInterface`: The interface between the API of the devices and this library.\n    - `CameraInterface`: Interface for performing exposures.\n    - `FocuserInterface`: Interface for changing the focus position of the telescope.\n    - `TelescopeInterface`: The implementation of this interface is optional, as the telescope\n    only needs to be oriented once after the focus calibration region has been determined \n    with the targeting class `ZenithNeighbourhoodQuery`, which can be implemented externally.\n    Accordingly, this swaying of the telescope can also be implemented externally. Note that it is\n    currently assumed that the target tracking is controlled outside of this package.\n- Targeting\n  - `ZenithNeighbourhoodQuery`: Queries the zenith neighbourhood in a database to find a suitable section of the sky for focusing.\n- Focsuing\n  - `SweepingAutofocuser`: Performs the autofocusing using sweeping through a range of focus positions.\n  - `AnalyticResponseAutofocuser(SweepingAutofocuser)`: Performs the autofocusing utilising the analytic nature of the focus response curve of a given focus measure.\n  - `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.\n\n\nFor detailed usage and customization, refer to the source code and docstrings in each module.\n\n## Installation\n\nTo install the package, clone the project and run:\n```bash\npython3 -m pip install\n```\nto install from source or\n```bash\npython3 -m pip install -e .\n```\nto install in editable mode.\nFor more information, consult the [Python Packaging User Guide](https://packaging.python.org/en/latest/tutorials/installing-packages/#installing-from-a-local-src-tree).\n\n### <a name=\"catalogue\"></a>The Gaia-2MASS Local Catalogue\nThe targeting procedure requires the `Gaia-2MASS Local Catalogue` which can be downlaoded [here](https://github.com/ppp-one/gaia-tmass-sqlite).\n\n### Optional Dependencies\nThe package supports additional features through optional dependencies.\nYou can install these dependencies based on your needs. Choose from the following options:\n```bash\n# To also install visualization tools, including matplotlib, plotly and dash\npython3 -m pip install \".[visualization]\"\n\n# To install packages for more statistics and machine learning, including scikit-learn.\npython3 -m pip install \".[extended]\"\n\n# To install dash\npython3 -m pip install \".[dash]\"\n\n# To install alpyca\npython3 -m pip install \".[alpaca]\"\n```\n`Alpyca` is a [Python 3.7+ API library](https://pypi.org/project/alpyca/)\nfor all Astronomy Common Object Model ([ASCOM](https://ascom-standards.org/))\nAlpaca universal interfaces.\nThis library is a possible API for communication between this package and the devices required\nfor focussing, namely the camera and the focuser.\n\n## Project Structure\nThe project structure includes several key directories:\n- `astrafocus`: The main package containing autofocus-related modules.\n   - `interface`: Subpackage with modules for interfacing with the devices through their API components.\n   - `models`: Modules defining mathematical models used by some of the autofocus procedures.\n   - `sql`: Modules handling database queries of the Gaia-2MASS Local Catalogue (see [above](#catalogue)).\n   - `targeting`: Modules related to targeting specific regions in the sky.\n   - `utils`: General utility modules.\n\nMay your stars align and your focus be as sharp as a caffeinated owl spotting its prey!\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "My package description",
    "version": "0.0.3",
    "project_urls": null,
    "split_keywords": [
        "telescope",
        "autofocus"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fdb9b2102580b182487f813a6fa13e477608689f60781810ecc4632551559f12",
                "md5": "771d3c645b29f4613e85135f0a517404",
                "sha256": "05106f5e04463a31ebeddafdbed265aa3f641c24d549350c9da83b365b2097f0"
            },
            "downloads": -1,
            "filename": "astrafocus-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "771d3c645b29f4613e85135f0a517404",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11.3",
            "size": 64668,
            "upload_time": "2023-12-11T17:34:23",
            "upload_time_iso_8601": "2023-12-11T17:34:23.993795Z",
            "url": "https://files.pythonhosted.org/packages/fd/b9/b2102580b182487f813a6fa13e477608689f60781810ecc4632551559f12/astrafocus-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0da63f3fd6bdde52ba9e3021bbb7c2a32e52d10080db8e2c6bf8aceb67f11db5",
                "md5": "c288253c416f66142d445ebfb2f596d9",
                "sha256": "8732d2e2e287814e9a28e3e147be3f64253269a4797da2561a04169d6a0cfdd3"
            },
            "downloads": -1,
            "filename": "astrafocus-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "c288253c416f66142d445ebfb2f596d9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11.3",
            "size": 645727,
            "upload_time": "2023-12-11T17:34:25",
            "upload_time_iso_8601": "2023-12-11T17:34:25.119642Z",
            "url": "https://files.pythonhosted.org/packages/0d/a6/3f3fd6bdde52ba9e3021bbb7c2a32e52d10080db8e2c6bf8aceb67f11db5/astrafocus-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-11 17:34:25",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "astrafocus"
}
        
Elapsed time: 2.93034s