astrafocus 0.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. astrafocus-0.0.2/.github/workflows/python-publish-to-pypi.yml +70 -0
  2. astrafocus-0.0.2/.github/workflows/python-publish-to-testpypi.yml +86 -0
  3. astrafocus-0.0.2/.gitignore +189 -0
  4. astrafocus-0.0.2/CODE_OF_CONDUCT.md +138 -0
  5. astrafocus-0.0.2/CONTRIBUTING.md +19 -0
  6. astrafocus-0.0.2/LICENSE +674 -0
  7. astrafocus-0.0.2/PKG-INFO +111 -0
  8. astrafocus-0.0.2/README.md +80 -0
  9. astrafocus-0.0.2/docs/logo.png +0 -0
  10. astrafocus-0.0.2/explorations/speculoos.yaml +28 -0
  11. astrafocus-0.0.2/explorations/speculoos_main.py +111 -0
  12. astrafocus-0.0.2/pyproject.toml +35 -0
  13. astrafocus-0.0.2/scr/astrafocus/__init__.py +0 -0
  14. astrafocus-0.0.2/scr/astrafocus/autofocuser.py +507 -0
  15. astrafocus-0.0.2/scr/astrafocus/focus_measure_operators.py +197 -0
  16. astrafocus-0.0.2/scr/astrafocus/interface/__init__.py +0 -0
  17. astrafocus-0.0.2/scr/astrafocus/interface/alpaca.py +91 -0
  18. astrafocus-0.0.2/scr/astrafocus/interface/camera.py +47 -0
  19. astrafocus-0.0.2/scr/astrafocus/interface/device_manager.py +121 -0
  20. astrafocus-0.0.2/scr/astrafocus/interface/focuser.py +163 -0
  21. astrafocus-0.0.2/scr/astrafocus/interface/simulation.py +252 -0
  22. astrafocus-0.0.2/scr/astrafocus/interface/telescope.py +49 -0
  23. astrafocus-0.0.2/scr/astrafocus/interface/telescope_specs.py +210 -0
  24. astrafocus-0.0.2/scr/astrafocus/models/__init__.py +0 -0
  25. astrafocus-0.0.2/scr/astrafocus/models/elliptical_moffat_2D.py +198 -0
  26. astrafocus-0.0.2/scr/astrafocus/models/half_flux_radius_2D.py +59 -0
  27. astrafocus-0.0.2/scr/astrafocus/sql/__init__.py +0 -0
  28. astrafocus-0.0.2/scr/astrafocus/sql/local_gaia_database_query.py +248 -0
  29. astrafocus-0.0.2/scr/astrafocus/sql/shardwise_query.py +62 -0
  30. astrafocus-0.0.2/scr/astrafocus/star_finder.py +72 -0
  31. astrafocus-0.0.2/scr/astrafocus/star_fitter.py +262 -0
  32. astrafocus-0.0.2/scr/astrafocus/star_size_focus_measure_operators.py +247 -0
  33. astrafocus-0.0.2/scr/astrafocus/targeting/__init__.py +0 -0
  34. astrafocus-0.0.2/scr/astrafocus/targeting/airmass_models.py +164 -0
  35. astrafocus-0.0.2/scr/astrafocus/targeting/angle_difference.py +18 -0
  36. astrafocus-0.0.2/scr/astrafocus/targeting/celestial_bounds_calculator.py +117 -0
  37. astrafocus-0.0.2/scr/astrafocus/targeting/tangential_plane_projector.py +192 -0
  38. astrafocus-0.0.2/scr/astrafocus/targeting/zenith_angle_calculator.py +49 -0
  39. astrafocus-0.0.2/scr/astrafocus/targeting/zenith_neighbourhood.py +412 -0
  40. astrafocus-0.0.2/scr/astrafocus/targeting/zenith_neighbourhood_query.py +216 -0
  41. astrafocus-0.0.2/scr/astrafocus/targeting/zenith_neighbourhood_query_result.py +162 -0
  42. astrafocus-0.0.2/scr/astrafocus/utils/__init__.py +0 -0
  43. astrafocus-0.0.2/scr/astrafocus/utils/load_fits_from_directory.py +31 -0
  44. astrafocus-0.0.2/scr/astrafocus/utils/logger.py +184 -0
  45. astrafocus-0.0.2/scr/astrafocus/utils/plot.py +62 -0
  46. astrafocus-0.0.2/scr/astrafocus/utils/timer.py +50 -0
  47. astrafocus-0.0.2/scr/astrafocus/utils/typing.py +6 -0
  48. astrafocus-0.0.2/scr/astrafocus.egg-info/PKG-INFO +111 -0
  49. astrafocus-0.0.2/scr/astrafocus.egg-info/SOURCES.txt +54 -0
  50. astrafocus-0.0.2/scr/astrafocus.egg-info/dependency_links.txt +1 -0
  51. astrafocus-0.0.2/scr/astrafocus.egg-info/requires.txt +22 -0
  52. astrafocus-0.0.2/scr/astrafocus.egg-info/top_level.txt +1 -0
  53. astrafocus-0.0.2/setup.cfg +4 -0
  54. astrafocus-0.0.2/tests/test_autofocus_device_manager.py +45 -0
  55. astrafocus-0.0.2/tests/test_telescope_focuser.py +88 -0
  56. astrafocus-0.0.2/tests/test_zenith_neighbourhood.py +41 -0
@@ -0,0 +1,70 @@
1
+ # This workflow will upload a Python Package using Twine when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
+
4
+ # This workflow uses actions that are not certified by GitHub.
5
+ # They are provided by a third-party and are governed by
6
+ # separate terms of service, privacy policy, and support
7
+ # documentation.
8
+
9
+ name: Upload Python Package to PyPI
10
+
11
+ on:
12
+ release:
13
+ types: [published]
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ build:
20
+ name: Build distribution
21
+ runs-on: ubuntu-latest
22
+
23
+ steps:
24
+ - uses: actions/checkout@v4
25
+
26
+ - name: Set up Python
27
+ uses: actions/setup-python@v4
28
+ with:
29
+ python-version: "3.x"
30
+
31
+ - name: Install pypa/build
32
+ run: >-
33
+ python3 -m
34
+ pip install
35
+ setuptools build wheel
36
+ --user
37
+
38
+ - name: Build a binary wheel and a source tarball
39
+ run: python3 -m build
40
+
41
+ - name: Build a binary wheel and a source tarball
42
+ run: python3 -m build --sdist
43
+
44
+ - name: Store the distribution packages
45
+ uses: actions/upload-artifact@v3
46
+ with:
47
+ name: python-package-distributions
48
+ path: dist/
49
+
50
+ publish-to-pypi:
51
+ name: >-
52
+ Publish Python distribution to PyPI
53
+ if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
54
+ needs:
55
+ - build
56
+ runs-on: ubuntu-latest
57
+
58
+ environment:
59
+ name: pypi
60
+ url: https://pypi.org/p/astrafocus
61
+ permissions:
62
+ id-token: write # IMPORTANT: mandatory for trusted publishing
63
+ steps:
64
+ - name: Download all the dists
65
+ uses: actions/download-artifact@v3
66
+ with:
67
+ name: python-package-distributions
68
+ path: dist/
69
+ - name: Publish distribution to PyPI
70
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,86 @@
1
+ # This workflow will upload a Python Package using Twine when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
+
4
+ # This workflow uses actions that are not certified by GitHub.
5
+ # They are provided by a third-party and are governed by
6
+ # separate terms of service, privacy policy, and support
7
+ # documentation.
8
+
9
+ name: Publish Python distribution to TestPyPI
10
+
11
+ # on:
12
+ # push:
13
+ # # Sequence of patterns matched against refs/heads
14
+ # branches:
15
+ # - main
16
+ # tags:
17
+ # - v*
18
+ on:
19
+ release
20
+
21
+ permissions:
22
+ contents: read
23
+
24
+ jobs:
25
+
26
+ build:
27
+ name: Build distribution
28
+ runs-on: ubuntu-latest
29
+
30
+ steps:
31
+ - uses: actions/checkout@v4
32
+
33
+ - name: Set up Python
34
+ uses: actions/setup-python@v4
35
+ with:
36
+ python-version: "3.x"
37
+
38
+ - name: Install pypa/build
39
+ run: >-
40
+ python3 -m
41
+ pip install
42
+ setuptools build wheel
43
+ --user
44
+
45
+ - name: Build a binary wheel and a source tarball
46
+ run: python3 -m build
47
+
48
+ - name: Build a binary wheel and a source tarball
49
+ run: python3 -m build --sdist
50
+
51
+ - name: Store the distribution packages
52
+ uses: actions/upload-artifact@v3
53
+ with:
54
+ name: python-package-distributions
55
+ path: dist/
56
+
57
+ publish-to-testpypi:
58
+ name: Publish Python distribution to TestPyPI
59
+ needs:
60
+ - build
61
+ runs-on: ubuntu-latest
62
+
63
+ environment:
64
+ name: testpypi
65
+ url: https://test.pypi.org/p/astrafocus
66
+
67
+ permissions:
68
+ id-token: write # IMPORTANT: mandatory for trusted publishing
69
+
70
+ steps:
71
+ - name: Download all the dists
72
+ uses: actions/download-artifact@v3
73
+ with:
74
+ name: python-package-distributions
75
+ path: dist/
76
+ - name: Publish distribution to TestPyPI
77
+ uses: pypa/gh-action-pypi-publish@release/v1
78
+ with:
79
+ repository-url: https://test.pypi.org/legacy/
80
+ # user: __token__
81
+ # password: ${{ secrets.ASTRAFOCUS_PYPI }}
82
+
83
+ # with:
84
+ # repository-url: https://test.pypi.org/legacy/
85
+ # user: __token__
86
+ # password: ${{ secrets.TEST_PYPI_INITIAL }}
@@ -0,0 +1,189 @@
1
+ ### Linux ###
2
+ *~
3
+
4
+ # temporary files which can be created if a process still has a handle open of a
5
+ # deleted file
6
+ .fuse_hidden*
7
+
8
+ # KDE directory preferences
9
+ .directory
10
+
11
+ # Linux trash folder which might appear on any partition or disk
12
+ .Trash-*
13
+
14
+ # .nfs files are created when an open file is removed but is still being
15
+ # accessed
16
+ .nfs*
17
+
18
+ ### OSX ###
19
+ # General
20
+ .DS_Store
21
+ .AppleDouble
22
+ .LSOverride
23
+
24
+ # Icon must end with two \r
25
+ Icon
26
+
27
+ # Thumbnails
28
+ ._*
29
+
30
+ ### Python ###
31
+ # Byte-compiled / optimized / DLL files
32
+ __pycache__/
33
+ *.py[cod]
34
+ *$py.class
35
+
36
+ # C extensions
37
+ *.so
38
+
39
+ # Distribution / packaging
40
+ .Python
41
+ build/
42
+ develop-eggs/
43
+ dist/
44
+ downloads/
45
+ eggs/
46
+ .eggs/
47
+ parts/
48
+ sdist/
49
+ var/
50
+ wheels/
51
+ pip-wheel-metadata/
52
+ share/python-wheels/
53
+ *.egg-info/
54
+ .installed.cfg
55
+ *.egg
56
+ MANIFEST
57
+
58
+ # PyInstaller
59
+ # Usually these files are written by a python script from a template
60
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
61
+ *.manifest
62
+ *.spec
63
+
64
+ # Installer logs
65
+ pip-log.txt
66
+ pip-delete-this-directory.txt
67
+
68
+ # Unit test / coverage reports
69
+ htmlcov/
70
+ .tox/
71
+ .nox/
72
+ .coverage
73
+ .coverage.*
74
+ .cache
75
+ nosetests.xml
76
+ coverage.xml
77
+ *.cover
78
+ *.py,cover
79
+ .hypothesis/
80
+ .pytest_cache/
81
+ pytestdebug.log
82
+
83
+ # Translations
84
+ *.mo
85
+ *.pot
86
+
87
+ # Django stuff:
88
+ *.log
89
+ local_settings.py
90
+ db.sqlite3
91
+ db.sqlite3-journal
92
+
93
+ # Flask stuff:
94
+ instance/
95
+ .webassets-cache
96
+
97
+ # Scrapy stuff:
98
+ .scrapy
99
+
100
+ # Sphinx documentation
101
+ docs/_build/
102
+ doc/_build/
103
+
104
+ # PyBuilder
105
+ target/
106
+
107
+ # Jupyter Notebook
108
+ .ipynb_checkpoints
109
+ */.ipynb_checkpoints/*
110
+
111
+ # IPython
112
+ profile_default/
113
+ ipython_config.py
114
+
115
+ # pyenv
116
+ .python-version
117
+
118
+ # pipenv
119
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in
120
+ # version control.
121
+ # However, in case of collaboration, if having platform-specific dependencies
122
+ # or dependencies
123
+ # having no cross-platform support, pipenv may install dependencies that don't
124
+ # work, or not
125
+ # install all needed dependencies.
126
+ #Pipfile.lock
127
+
128
+ # poetry
129
+ #poetry.lock
130
+
131
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
132
+ __pypackages__/
133
+
134
+ # Celery stuff
135
+ celerybeat-schedule
136
+ celerybeat.pid
137
+
138
+ # SageMath parsed files
139
+ *.sage.py
140
+
141
+ # Environments
142
+ # .env
143
+ .env/
144
+ .venv/
145
+ env/
146
+ venv/
147
+ ENV/
148
+ env.bak/
149
+ venv.bak/
150
+ pythonenv*
151
+
152
+ # Spyder project settings
153
+ .spyderproject
154
+ .spyproject
155
+
156
+ # Rope project settings
157
+ .ropeproject
158
+
159
+ # mkdocs documentation
160
+ /site
161
+
162
+ # mypy
163
+ .mypy_cache/
164
+ .dmypy.json
165
+ dmypy.json
166
+
167
+ # Pyre type checker
168
+ .pyre/
169
+
170
+ # pytype static type analyzer
171
+ .pytype/
172
+
173
+ # operating system-related files
174
+ # file properties cache/storage on macOS
175
+ *.DS_Store
176
+ # thumbnail cache on Windows
177
+ Thumbs.db
178
+
179
+ # profiling data
180
+ .prof
181
+
182
+ ### CUDA ###
183
+ *.i
184
+ *.ii
185
+ *.gpu
186
+ *.ptx
187
+ *.cubin
188
+ *.fatbin
189
+
@@ -0,0 +1,138 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ - [Our Pledge](#our-pledge)
4
+ - [Our Standards](#our-standards)
5
+ - [Enforcement Responsibilities](#enforcement-responsibilities)
6
+ - [Scope](#scope)
7
+ - [Enforcement](#enforcement)
8
+ - [Enforcement Guidelines](#enforcement-guidelines)
9
+ - [1. Correction](#1-correction)
10
+ - [2. Warning](#2-warning)
11
+ - [3. Temporary Ban](#3-temporary-ban)
12
+ - [4. Permanent Ban](#4-permanent-ban)
13
+ - [Attribution](#attribution)
14
+
15
+ ## Our Pledge
16
+
17
+ We as members, contributors, and leaders pledge to make participation in our
18
+ community a harassment-free experience for everyone, regardless of age, body
19
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
20
+ identity and expression, level of experience, education, socio-economic status,
21
+ nationality, personal appearance, race, religion, or sexual identity
22
+ and orientation.
23
+
24
+ We pledge to act and interact in ways that contribute to an open, welcoming,
25
+ diverse, inclusive, and healthy community.
26
+
27
+ ## Our Standards
28
+
29
+ Examples of behavior that contributes to a positive environment for our
30
+ community include:
31
+
32
+ - Demonstrating empathy and kindness toward other people
33
+ - Being respectful of differing opinions, viewpoints, and experiences
34
+ - Giving and gracefully accepting constructive feedback
35
+ - Accepting responsibility and apologizing to those affected by our mistakes,
36
+ and learning from the experience
37
+ - Focusing on what is best not just for us as individuals, but for the
38
+ overall community
39
+
40
+ Examples of unacceptable behavior include:
41
+
42
+ - The use of sexualized language or imagery, and sexual attention or
43
+ advances of any kind
44
+ - Trolling, insulting or derogatory comments, and personal or political attacks
45
+ - Public or private harassment
46
+ - Publishing others' private information, such as a physical or email
47
+ address, without their explicit permission
48
+ - Other conduct which could reasonably be considered inappropriate in a
49
+ professional setting
50
+
51
+ ## Enforcement Responsibilities
52
+
53
+ Community leaders are responsible for clarifying and enforcing our standards of
54
+ acceptable behavior and will take appropriate and fair corrective action in
55
+ response to any behavior that they deem inappropriate, threatening, offensive,
56
+ or harmful.
57
+
58
+ Community leaders have the right and responsibility to remove, edit, or reject
59
+ comments, commits, code, wiki edits, issues, and other contributions that are
60
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
61
+ decisions when appropriate.
62
+
63
+ ## Scope
64
+
65
+ This Code of Conduct applies within all community spaces, and also applies when
66
+ an individual is officially representing the community in public spaces.
67
+ Examples of representing our community include using an official e-mail address,
68
+ posting via an official social media account, or acting as an appointed
69
+ representative at an online or offline event.
70
+
71
+ ## Enforcement
72
+
73
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
74
+ reported to the community leaders responsible for enforcement at
75
+ charlie.r.marsh@gmail.com.
76
+ All complaints will be reviewed and investigated promptly and fairly.
77
+
78
+ All community leaders are obligated to respect the privacy and security of the
79
+ reporter of any incident.
80
+
81
+ ## Enforcement Guidelines
82
+
83
+ Community leaders will follow these Community Impact Guidelines in determining
84
+ the consequences for any action they deem in violation of this Code of Conduct:
85
+
86
+ ### 1. Correction
87
+
88
+ **Community Impact**: Use of inappropriate language or other behavior deemed
89
+ unprofessional or unwelcome in the community.
90
+
91
+ **Consequence**: A private, written warning from community leaders, providing
92
+ clarity around the nature of the violation and an explanation of why the
93
+ behavior was inappropriate. A public apology may be requested.
94
+
95
+ ### 2. Warning
96
+
97
+ **Community Impact**: A violation through a single incident or series
98
+ of actions.
99
+
100
+ **Consequence**: A warning with consequences for continued behavior. No
101
+ interaction with the people involved, including unsolicited interaction with
102
+ those enforcing the Code of Conduct, for a specified period of time. This
103
+ includes avoiding interactions in community spaces as well as external channels
104
+ like social media. Violating these terms may lead to a temporary or
105
+ permanent ban.
106
+
107
+ ### 3. Temporary Ban
108
+
109
+ **Community Impact**: A serious violation of community standards, including
110
+ sustained inappropriate behavior.
111
+
112
+ **Consequence**: A temporary ban from any sort of interaction or public
113
+ communication with the community for a specified period of time. No public or
114
+ private interaction with the people involved, including unsolicited interaction
115
+ with those enforcing the Code of Conduct, is allowed during this period.
116
+ Violating these terms may lead to a permanent ban.
117
+
118
+ ### 4. Permanent Ban
119
+
120
+ **Community Impact**: Demonstrating a pattern of violation of community
121
+ standards, including sustained inappropriate behavior, harassment of an
122
+ individual, or aggression toward or disparagement of classes of individuals.
123
+
124
+ **Consequence**: A permanent ban from any sort of public interaction within
125
+ the community.
126
+
127
+ ## Attribution
128
+
129
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
130
+ version 2.0, available [here](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html).
131
+
132
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
133
+ enforcement ladder](https://github.com/mozilla/diversity).
134
+
135
+ For answers to common questions about this code of conduct, see the [FAQ](https://www.contributor-covenant.org/faq).
136
+ Translations are available [here](https://www.contributor-covenant.org/translations).
137
+
138
+ [homepage]: https://www.contributor-covenant.org
@@ -0,0 +1,19 @@
1
+ ## Contributing to telescope-autofocuser
2
+
3
+ ### Reporting issues
4
+
5
+ If you find a bug or other unexpected behavior while using `exoplanet-jax`,
6
+ open an issue on the [GitHub repository](https://github.com/dgegen/telescope-autofocuser/issues)
7
+ and we will try to respond and (hopefully) solve the problem in a timely manner.
8
+ Similarly, if you have a feature request or question about the library, the best
9
+ place to post those is currently on GitHub as an issue, but that is likely
10
+ change if the user community grows. If you report an issue, please give the
11
+ details needed to reproduce the problem (version of exoplanet, its dependencies,
12
+ and your platform) and a small standalone piece of code that demonstrates the
13
+ problem clearly.
14
+
15
+ ### Contributing code
16
+
17
+ We welcome contributions to the codebase of all scales from typo fixes to new features,
18
+ but if you would like to add a substantial feature, it would be a good idea to first
19
+ open an issue that describes your plan so that we can discuss in advance.