rms-starcat 0.0.1__tar.gz → 1.0.0__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 (44) hide show
  1. rms_starcat-1.0.0/.coveragerc +3 -0
  2. rms_starcat-1.0.0/.flake8 +6 -0
  3. rms_starcat-1.0.0/.github/workflows/run-tests.yml +87 -0
  4. rms_starcat-1.0.0/.mypy.ini +8 -0
  5. rms_starcat-1.0.0/.readthedocs.yaml +32 -0
  6. rms_starcat-1.0.0/CODE_OF_CONDUCT.md +132 -0
  7. rms_starcat-1.0.0/CONTRIBUTING.md +112 -0
  8. rms_starcat-1.0.0/PKG-INFO +152 -0
  9. rms_starcat-1.0.0/README.md +120 -0
  10. rms_starcat-1.0.0/docs/Makefile +20 -0
  11. rms_starcat-1.0.0/docs/conf.py +32 -0
  12. rms_starcat-1.0.0/docs/index.rst +25 -0
  13. rms_starcat-1.0.0/docs/make.bat +35 -0
  14. rms_starcat-1.0.0/docs/module.rst +34 -0
  15. {rms-starcat-0.0.1 → rms_starcat-1.0.0}/pyproject.toml +4 -1
  16. rms_starcat-1.0.0/requirements.txt +11 -0
  17. rms_starcat-1.0.0/rms_starcat.egg-info/PKG-INFO +152 -0
  18. {rms-starcat-0.0.1 → rms_starcat-1.0.0}/rms_starcat.egg-info/SOURCES.txt +16 -1
  19. rms_starcat-1.0.0/starcat/__init__.py +26 -0
  20. {rms-starcat-0.0.1 → rms_starcat-1.0.0}/starcat/_version.py +2 -2
  21. rms_starcat-1.0.0/starcat/py.typed +0 -0
  22. rms_starcat-1.0.0/starcat/spice.py +94 -0
  23. rms_starcat-1.0.0/starcat/starcatalog.py +522 -0
  24. {rms-starcat-0.0.1 → rms_starcat-1.0.0}/starcat/ucac4.py +321 -258
  25. {rms-starcat-0.0.1 → rms_starcat-1.0.0}/starcat/ybsc.py +313 -185
  26. rms_starcat-1.0.0/tests/test_spice.py +34 -0
  27. rms_starcat-1.0.0/tests/test_ucac4.py +70 -0
  28. rms_starcat-1.0.0/tests/test_ybsc.py +30 -0
  29. rms-starcat-0.0.1/.github/workflows/run-tests.yml +0 -46
  30. rms-starcat-0.0.1/PKG-INFO +0 -39
  31. rms-starcat-0.0.1/README.md +0 -7
  32. rms-starcat-0.0.1/requirements.txt +0 -2
  33. rms-starcat-0.0.1/rms_starcat.egg-info/PKG-INFO +0 -39
  34. rms-starcat-0.0.1/starcat/__init__.py +0 -12
  35. rms-starcat-0.0.1/starcat/spice.py +0 -97
  36. rms-starcat-0.0.1/starcat/starcatalog.py +0 -414
  37. {rms-starcat-0.0.1 → rms_starcat-1.0.0}/.github/workflows/publish_to_pypi.yml +0 -0
  38. {rms-starcat-0.0.1 → rms_starcat-1.0.0}/.github/workflows/publish_to_test_pypi.yml +0 -0
  39. {rms-starcat-0.0.1 → rms_starcat-1.0.0}/.gitignore +0 -0
  40. {rms-starcat-0.0.1 → rms_starcat-1.0.0}/LICENSE +0 -0
  41. {rms-starcat-0.0.1 → rms_starcat-1.0.0}/rms_starcat.egg-info/dependency_links.txt +0 -0
  42. {rms-starcat-0.0.1 → rms_starcat-1.0.0}/rms_starcat.egg-info/requires.txt +0 -0
  43. {rms-starcat-0.0.1 → rms_starcat-1.0.0}/rms_starcat.egg-info/top_level.txt +0 -0
  44. {rms-starcat-0.0.1 → rms_starcat-1.0.0}/setup.cfg +0 -0
@@ -0,0 +1,3 @@
1
+ [run]
2
+ branch = true
3
+ omit = tests/*
@@ -0,0 +1,6 @@
1
+ [flake8]
2
+ max-line-length: 90
3
+ extend-ignore =
4
+ # E265 block comment should start with '# '
5
+ # E266 too many leading '#' for block comment
6
+ E265, E266
@@ -0,0 +1,87 @@
1
+ name: Run Tests
2
+ run-name: Run Tests triggered by ${{ github.ref_type }} ${{ github.ref_name }} or ${{ github.triggering_actor }}
3
+
4
+ on:
5
+ workflow_dispatch:
6
+ pull_request:
7
+ branches: [ main ]
8
+ push:
9
+ branches: [ main ]
10
+ schedule:
11
+ - cron: "21 11 * * 0"
12
+
13
+ jobs:
14
+ flake8:
15
+ name: Lint starcat
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - name: Checkout
19
+ uses: actions/checkout@v4
20
+ with:
21
+ ref: ${{ github.event.pull_request.head.sha }}
22
+
23
+ - name: Set up Python ${{ matrix.python-version }}
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: ${{ matrix.python-version }}
27
+
28
+ - name: Install dependencies
29
+ run: |
30
+ python -m pip install -r requirements.txt
31
+
32
+ - name: Flake8
33
+ run: |
34
+ flake8 starcat tests
35
+
36
+ - name: Mypy
37
+ run: |
38
+ mypy starcat tests
39
+
40
+ test:
41
+ name: Test starcat
42
+ runs-on: ${{ matrix.os }}
43
+ strategy:
44
+ matrix:
45
+ os: [ubuntu-latest, macos-latest, windows-latest]
46
+ python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
47
+ fail-fast: false
48
+ permissions:
49
+ contents: read
50
+ id-token: write
51
+ steps:
52
+ - name: Checkout
53
+ uses: actions/checkout@v4
54
+ with:
55
+ ref: ${{ github.event.pull_request.head.sha }}
56
+
57
+ - name: Set up Python ${{ matrix.python-version }}
58
+ uses: actions/setup-python@v4
59
+ with:
60
+ python-version: ${{ matrix.python-version }}
61
+
62
+ - name: Install dependencies
63
+ run: |
64
+ python -m pip install -r requirements.txt
65
+
66
+ # See: https://www.youtube.com/watch?v=ZgVhU5qvK1M
67
+ # for a walkthrough on how to create the workload_identity_provider
68
+ - name: Authenticate to Google Cloud
69
+ uses: google-github-actions/auth@v2
70
+ with:
71
+ project_id: rms-node
72
+ workload_identity_provider: ${{ secrets.WIF_PROVIDER }}
73
+
74
+ - name: Test with coverage
75
+ run: |
76
+ coverage run -m pytest
77
+
78
+ - name: Print coverage report
79
+ run: |
80
+ coverage report -m
81
+
82
+ - name: Upload coverage report to codecov
83
+ uses: codecov/codecov-action@v5
84
+ if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
85
+ with:
86
+ token: ${{ secrets.CODECOV_TOKEN }}
87
+ verbose: true
@@ -0,0 +1,8 @@
1
+ [mypy]
2
+ strict = True
3
+
4
+ [mypy-cspyce.*]
5
+ ignore_missing_imports = True
6
+
7
+ [mypy-starcat._version]
8
+ ignore_missing_imports = True
@@ -0,0 +1,32 @@
1
+ # .readthedocs.yaml
2
+ # Read the Docs configuration file
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version: 2
7
+
8
+ # Set the OS, Python version and other tools you might need
9
+ build:
10
+ os: ubuntu-22.04
11
+ tools:
12
+ python: "3.12"
13
+ # You can also specify other tool versions:
14
+ # nodejs: "19"
15
+ # rust: "1.64"
16
+ # golang: "1.19"
17
+
18
+ # Build documentation in the "docs/" directory with Sphinx
19
+ sphinx:
20
+ configuration: docs/conf.py
21
+
22
+ # Optionally build your docs in additional formats such as PDF and ePub
23
+ # formats:
24
+ # - pdf
25
+ # - epub
26
+
27
+ # Optional but recommended, declare the Python requirements required
28
+ # to build your documentation
29
+ # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
30
+ python:
31
+ install:
32
+ - requirements: requirements.txt
@@ -0,0 +1,132 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official email address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ [INSERT CONTACT METHOD].
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
+
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
+
124
+ For answers to common questions about this code of conduct, see the FAQ at
125
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
127
+
128
+ [homepage]: https://www.contributor-covenant.org
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
+ [Mozilla CoC]: https://github.com/mozilla/diversity
131
+ [FAQ]: https://www.contributor-covenant.org/faq
132
+ [translations]: https://www.contributor-covenant.org/translations
@@ -0,0 +1,112 @@
1
+ # Information for Potential Contributors
2
+
3
+ First off, thanks for taking the time to contribute!
4
+
5
+ This software is maintained by the [Ring-Moon Systems Node](https://pds-rings.seti.org) of NASA's [Planetary Data System](https://pds.nasa.gov). All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them; please read the relevant section before making your contribution.
6
+
7
+ > If you like the project, but just don't have time to contribute, there are other easy ways to support the project and show your appreciation!
8
+ > - Star the project on GitHub
9
+ > - Post about it on social media
10
+ > - Refer to this project in your project's README
11
+ > - Mention the project at conferences and workshops and tell your friends/colleagues
12
+ > - Cite the project in your papers and posters
13
+
14
+
15
+ ## Table of Contents
16
+
17
+ - [Code of Conduct](#code-of-conduct)
18
+ - [I Have a Question](#i-have-a-question)
19
+ - [I Want to Report a Bug](#i-want-to-report-a-bug)
20
+ - [I Want to Suggest an Enhancement](#i-want-to-suggest-an-enhancement)
21
+ - [I Want To Contribute Code](#i-want-to-contribute-code)
22
+
23
+
24
+ ## Code of Conduct
25
+
26
+ This project and everyone participating in it are governed by the
27
+ [Code of Conduct](CODE_OF_CONDUCT.md).
28
+ By participating, you are expected to uphold this code. Please report unacceptable behavior
29
+ to <matt@seti.org>.
30
+
31
+
32
+ ## I Have a Question
33
+
34
+ > Please read the available documentation!
35
+
36
+ Before asking a question, you can search for existing [issues](https://github.com/SETI/rms-starcat/issues) that might help you. If you find a suitable issue and still need clarification, you can write your question in that issue.
37
+
38
+ If you can't find an appropriate issue and still want to ask a question, we recommend the following:
39
+
40
+ - Open an [issue](https://github.com/SETI/rms-starcat/issues/new).
41
+ - Provide as much context and detail as you can.
42
+ - Provide project and platform versions (operating system, Python version, etc.), depending on what seems relevant.
43
+
44
+ We will try to answer your question as soon as possible.
45
+
46
+
47
+ ## I Want to Report a Bug
48
+
49
+ ### Before Submitting a Bug Report
50
+
51
+ A good bug report shouldn't leave others needing to chase you for more information. Therefore, we ask you to investigate carefully and collect all appropriate information in advance.
52
+
53
+ - Make sure that you are using the latest version of this software and its supporting packages.
54
+ - Make sure that you have read the documentation.
55
+ - Determine that your bug really is a bug and not an error in your code or a misunderstanding in how to use our software.
56
+ - To see if other users have experienced (and potentially solved) the same issue you're having, check if there is an existing issue for your bug or error in the [bug tracker](https://github.com/SETI/rms-starcat/issues).
57
+ - Collect information about the bug:
58
+ - Stack trace (Traceback)
59
+ - OS and version (Windows/Linux/macOS), processor (x86/ARM/M1), Python version
60
+ - Detailed information on how to reproduce the bug, including function parameters, command line arguments, and input given/output received.
61
+
62
+ ### How Do I Submit a Good Bug Report?
63
+
64
+ > You must never report security-related issues, vulnerabilities, or bugs that include sensitive information to the issue tracker or elsewhere in public. Instead, sensitive bugs must be sent by email to <matt@seti.org>.
65
+
66
+ We use GitHub Issues to track bugs and errors. If you run into an issue with the project:
67
+
68
+ - Open an [issue](https://github.com/SETI/rms-starcat/issues/new) with a **clear and descriptive title**. Please label the issue as `A-Bug` with no other labels.
69
+ - Explain the **behavior you would expect** and the **behavior observed**.
70
+ - Provide as much context as possible and describe the **detailed steps** that someone can follow to reproduce the problem. This usually includes providing your code; for a good bug report you should isolate the problem and create a reduced test case.
71
+ - Provide other information collected in the previous section, such as the operating system and language version.
72
+
73
+ Once it's filed:
74
+
75
+ - The project team will label the issue accordingly.
76
+ - A team member will try to reproduce the issue with your provided steps. If there are no steps given and no obvious way to reproduce the issue, the team will ask you for clarification.
77
+ - If the team is able to reproduce the issue, it will be appropriately labeled and either assigned to a team member to fix, or left unassigned to be [implemented by someone else](#i-want-to-contribute-code).
78
+
79
+
80
+ ## I Want to Suggest an Enhancement
81
+
82
+ This section guides you through submitting an enhancement, **including completely new features and minor improvements to existing functionality**.
83
+
84
+ ### Before Submitting an Enhancement
85
+
86
+ - Make sure that you are using the latest version of this software and its supporting packages.
87
+ - Make sure that you have read the documentation to see if the desired functionality is already provided.
88
+ - Perform a [search](https://github.com/SETI/rms-starcat/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
89
+ - Find out whether your idea fits within the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
90
+
91
+ ### How Do I Submit a Good Enhancement Suggestion?
92
+
93
+ We use GitHub Issues to track enhancement requests. If you want to suggest an enhancement:
94
+
95
+ - Open an [issue](https://github.com/SETI/rms-starcat/issues/new) with a **clear and descriptive title**. Please label the issue as `A-Enhancement` with no other labels.
96
+ - Provide a **detailed** description of the suggested enhancement.
97
+ - **Explain why this enhancement would be useful** to most users.
98
+
99
+
100
+ ## I Want To Contribute Code
101
+
102
+ > ### Legal Notice
103
+ > When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content, and that the content you contribute may be provided under the project license.
104
+
105
+ We welcome all code contributions, including bug fixes, new features, and improvements to documentation.
106
+
107
+ - All suggested changes must be submitted using GitHub's "Pull Request" functionality.
108
+ - All code changes must include appropriate new or updated tests to verify the changes made.
109
+ - Existing documentation, including function- and file-level docstrings, must be updated as necessary, and new features fully described.
110
+ - Code style must conform to that of the existing code; for Python this is generally a variant of PEP8 and PEP257.
111
+
112
+ All submissions will be reviewed in detail by a project team member and changes may be suggested. Once the reviewer approves the changes, they will be merged into the main project branch and made a permanent part of the software. Your efforts to improve the software are greatly appreciated!
@@ -0,0 +1,152 @@
1
+ Metadata-Version: 2.1
2
+ Name: rms-starcat
3
+ Version: 1.0.0
4
+ Summary: Star catalog database
5
+ Maintainer-email: "Robert S. French" <rfrench@seti.org>
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/SETI/rms-starcat
8
+ Project-URL: Repository, https://github.com/SETI/rms-starcat
9
+ Project-URL: Source, https://github.com/SETI/rms-starcat
10
+ Project-URL: Issues, https://github.com/SETI/rms-starcat/issues
11
+ Keywords: UCAC4,YBSC,star
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Natural Language :: English
14
+ Classifier: Topic :: Scientific/Engineering
15
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
16
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
+ Classifier: Topic :: Utilities
18
+ Classifier: License :: OSI Approved :: Apache Software License
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Operating System :: MacOS :: MacOS X
25
+ Classifier: Operating System :: POSIX :: Linux
26
+ Classifier: Operating System :: Microsoft :: Windows
27
+ Requires-Python: >=3.8
28
+ Description-Content-Type: text/markdown
29
+ License-File: LICENSE
30
+ Requires-Dist: cspyce
31
+ Requires-Dist: numpy
32
+
33
+ [![GitHub release; latest by date](https://img.shields.io/github/v/release/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/releases)
34
+ [![GitHub Release Date](https://img.shields.io/github/release-date/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/releases)
35
+ [![Test Status](https://img.shields.io/github/actions/workflow/status/SETI/rms-starcat/run-tests.yml?branch=main)](https://github.com/SETI/rms-starcat/actions)
36
+ [![Documentation Status](https://readthedocs.org/projects/rms-starcat/badge/?version=latest)](https://rms-starcat.readthedocs.io/en/latest/?badge=latest)
37
+ [![Code coverage](https://img.shields.io/codecov/c/github/SETI/rms-starcat/main?logo=codecov)](https://codecov.io/gh/SETI/rms-starcat)
38
+ <br />
39
+ [![PyPI - Version](https://img.shields.io/pypi/v/rms-starcat)](https://pypi.org/project/rms-starcat)
40
+ [![PyPI - Format](https://img.shields.io/pypi/format/rms-starcat)](https://pypi.org/project/rms-starcat)
41
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/rms-starcat)](https://pypi.org/project/rms-starcat)
42
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/rms-starcat)](https://pypi.org/project/rms-starcat)
43
+ <br />
44
+ [![GitHub commits since latest release](https://img.shields.io/github/commits-since/SETI/rms-starcat/latest)](https://github.com/SETI/rms-starcat/commits/main/)
45
+ [![GitHub commit activity](https://img.shields.io/github/commit-activity/m/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/commits/main/)
46
+ [![GitHub last commit](https://img.shields.io/github/last-commit/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/commits/main/)
47
+ <br />
48
+ [![Number of GitHub open issues](https://img.shields.io/github/issues-raw/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/issues)
49
+ [![Number of GitHub closed issues](https://img.shields.io/github/issues-closed-raw/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/issues)
50
+ [![Number of GitHub open pull requests](https://img.shields.io/github/issues-pr-raw/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/pulls)
51
+ [![Number of GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed-raw/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/pulls)
52
+ <br />
53
+ ![GitHub License](https://img.shields.io/github/license/SETI/rms-starcat)
54
+ [![Number of GitHub stars](https://img.shields.io/github/stars/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/stargazers)
55
+ ![GitHub forks](https://img.shields.io/github/forks/SETI/rms-starcat)
56
+
57
+ # Introduction
58
+
59
+ `starcat` is a set of classes for reading and searching star catalogs. Currently NAIF SPICE
60
+ star catalogs, the Yale Bright Star Catalog (YBSC), and UCAC4 are supported.
61
+
62
+ `starcat` is a product of the [PDS Ring-Moon Systems Node](https://pds-rings.seti.org).
63
+
64
+ # Installation
65
+
66
+ The `starcat` module is available via the `rms-starcat` package on PyPI and can be installed with:
67
+
68
+ ```sh
69
+ pip install rms-starcat
70
+ ```
71
+
72
+ # Getting Started
73
+
74
+ The `starcat` module provides the `StarCatalog` class, which is the superclass for classes
75
+ that handle specific star catalogs. Each star catalog class takes an optional directory
76
+ path to point at the root of the star catalog data; if no directory path is provided,
77
+ the contents of an environment variable is used instead. Each path can be a full URL
78
+ as supported by [`rms-filecache`](https://rms-filecache.readthedocs.io/en/latest/),
79
+ allowing the catalog data to be downloaded (and cached locally) at runtime.
80
+
81
+ - `SpiceStarCatalog`
82
+ - The `dir` argument, if specified, must point to a directory containing NAIF SPICE
83
+ kernels.
84
+ - Otherwise, the environment variable `SPICE_PATH`, if defined, must contain a `Stars`
85
+ subdirectory with NAIF SPICE kernels.
86
+ - Otherwise, the environment variable `OOPS_RESOURCES` must contain a `SPICE/Stars`
87
+ subdirectory.
88
+ - `YBSCStarCatalog`
89
+ - The `dir` argument, if specified, must point to a directory containing the file
90
+ `catalog`.
91
+ - Otherwise, the environment variable `YBSC_PATH` must point to that directory.
92
+ - `UCAC4StarCatalog`
93
+ - The `dir` argument, if specified, must point to a directory containing the directory
94
+ `u4b`.
95
+ - Otherwise, the environment variable `UCAC4_PATH` must point to that directory.
96
+
97
+ Each star catalog returns stars as a class that is a subclass of `Star`. Each subclass
98
+ contains the attributes provided by that star catalog, and none are guaranteed to be
99
+ filled in for all stars:
100
+
101
+ - `SpiceStar`
102
+ - `YBSCStar`
103
+ - `UCAC4Star`
104
+
105
+ Details of each class are available in the [module documentation](https://rms-starcat.readthedocs.io/en/latest/module.html).
106
+
107
+ Basic operation is as follows:
108
+
109
+ ```python
110
+ from starcat import YBSCStarCatalog
111
+ import numpy as np
112
+ cat = YBSCStarCatalog()
113
+ ra_vega = 279.2333
114
+ dec_vega = 38.7836
115
+ vega_list = list(cat.find_stars(ra_min=np.radians(ra_vega-0.1),
116
+ ra_max=np.radians(ra_vega+0.1),
117
+ dec_min=np.radians(dec_vega-0.1),
118
+ dec_max=np.radians(dec_vega+0.1)))
119
+
120
+ assert len(vega_list) == 1
121
+ print(vega_list[0])
122
+ ```
123
+
124
+ yields:
125
+
126
+ ```
127
+ UNIQUE ID 7001 | RA 279.2345833° (18h36m56.300s) | DEC 38.7836111° (+038d47m1.000s)
128
+ VMAG 0.030 | PM RA 259.135 mas/yr | PM DEC 286.000 mas/yr
129
+ TEMP 10800 | SCLASS A0Va
130
+ Name "3Alp Lyr" | Durch "BD+38 3238" | Draper 172167 | SAO 67174 | FK5 699
131
+ IR 1 Ref NASA | Multiple " " | Aitken 11510 None | Variable "Alp Lyr"
132
+ SCLASS Code | Galactic LON 67.44 LAT 19.24
133
+ B-V 0.0 | U-B -0.01 | R-I -0.03
134
+ Parallax TRIG 0.1230000 arcsec | RadVel -14.0 km/s V | RotVel (v sin i) 15.0 km/s
135
+ Double mag diff 10.40 Sep 62.80 arcsec Components AB # 5
136
+ ```
137
+
138
+ # Contributing
139
+
140
+ Information on contributing to this package can be found in the
141
+ [Contributing Guide](https://github.com/SETI/rms-starcat/blob/main/CONTRIBUTING.md).
142
+
143
+ # Links
144
+
145
+ - [Documentation](https://rms-starcat.readthedocs.io)
146
+ - [Repository](https://github.com/SETI/rms-starcat)
147
+ - [Issue tracker](https://github.com/SETI/rms-starcat/issues)
148
+ - [PyPi](https://pypi.org/project/rms-starcat)
149
+
150
+ # Licensing
151
+
152
+ This code is licensed under the [Apache License v2.0](https://github.com/SETI/rms-starcat/blob/main/LICENSE).
@@ -0,0 +1,120 @@
1
+ [![GitHub release; latest by date](https://img.shields.io/github/v/release/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/releases)
2
+ [![GitHub Release Date](https://img.shields.io/github/release-date/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/releases)
3
+ [![Test Status](https://img.shields.io/github/actions/workflow/status/SETI/rms-starcat/run-tests.yml?branch=main)](https://github.com/SETI/rms-starcat/actions)
4
+ [![Documentation Status](https://readthedocs.org/projects/rms-starcat/badge/?version=latest)](https://rms-starcat.readthedocs.io/en/latest/?badge=latest)
5
+ [![Code coverage](https://img.shields.io/codecov/c/github/SETI/rms-starcat/main?logo=codecov)](https://codecov.io/gh/SETI/rms-starcat)
6
+ <br />
7
+ [![PyPI - Version](https://img.shields.io/pypi/v/rms-starcat)](https://pypi.org/project/rms-starcat)
8
+ [![PyPI - Format](https://img.shields.io/pypi/format/rms-starcat)](https://pypi.org/project/rms-starcat)
9
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/rms-starcat)](https://pypi.org/project/rms-starcat)
10
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/rms-starcat)](https://pypi.org/project/rms-starcat)
11
+ <br />
12
+ [![GitHub commits since latest release](https://img.shields.io/github/commits-since/SETI/rms-starcat/latest)](https://github.com/SETI/rms-starcat/commits/main/)
13
+ [![GitHub commit activity](https://img.shields.io/github/commit-activity/m/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/commits/main/)
14
+ [![GitHub last commit](https://img.shields.io/github/last-commit/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/commits/main/)
15
+ <br />
16
+ [![Number of GitHub open issues](https://img.shields.io/github/issues-raw/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/issues)
17
+ [![Number of GitHub closed issues](https://img.shields.io/github/issues-closed-raw/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/issues)
18
+ [![Number of GitHub open pull requests](https://img.shields.io/github/issues-pr-raw/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/pulls)
19
+ [![Number of GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed-raw/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/pulls)
20
+ <br />
21
+ ![GitHub License](https://img.shields.io/github/license/SETI/rms-starcat)
22
+ [![Number of GitHub stars](https://img.shields.io/github/stars/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/stargazers)
23
+ ![GitHub forks](https://img.shields.io/github/forks/SETI/rms-starcat)
24
+
25
+ # Introduction
26
+
27
+ `starcat` is a set of classes for reading and searching star catalogs. Currently NAIF SPICE
28
+ star catalogs, the Yale Bright Star Catalog (YBSC), and UCAC4 are supported.
29
+
30
+ `starcat` is a product of the [PDS Ring-Moon Systems Node](https://pds-rings.seti.org).
31
+
32
+ # Installation
33
+
34
+ The `starcat` module is available via the `rms-starcat` package on PyPI and can be installed with:
35
+
36
+ ```sh
37
+ pip install rms-starcat
38
+ ```
39
+
40
+ # Getting Started
41
+
42
+ The `starcat` module provides the `StarCatalog` class, which is the superclass for classes
43
+ that handle specific star catalogs. Each star catalog class takes an optional directory
44
+ path to point at the root of the star catalog data; if no directory path is provided,
45
+ the contents of an environment variable is used instead. Each path can be a full URL
46
+ as supported by [`rms-filecache`](https://rms-filecache.readthedocs.io/en/latest/),
47
+ allowing the catalog data to be downloaded (and cached locally) at runtime.
48
+
49
+ - `SpiceStarCatalog`
50
+ - The `dir` argument, if specified, must point to a directory containing NAIF SPICE
51
+ kernels.
52
+ - Otherwise, the environment variable `SPICE_PATH`, if defined, must contain a `Stars`
53
+ subdirectory with NAIF SPICE kernels.
54
+ - Otherwise, the environment variable `OOPS_RESOURCES` must contain a `SPICE/Stars`
55
+ subdirectory.
56
+ - `YBSCStarCatalog`
57
+ - The `dir` argument, if specified, must point to a directory containing the file
58
+ `catalog`.
59
+ - Otherwise, the environment variable `YBSC_PATH` must point to that directory.
60
+ - `UCAC4StarCatalog`
61
+ - The `dir` argument, if specified, must point to a directory containing the directory
62
+ `u4b`.
63
+ - Otherwise, the environment variable `UCAC4_PATH` must point to that directory.
64
+
65
+ Each star catalog returns stars as a class that is a subclass of `Star`. Each subclass
66
+ contains the attributes provided by that star catalog, and none are guaranteed to be
67
+ filled in for all stars:
68
+
69
+ - `SpiceStar`
70
+ - `YBSCStar`
71
+ - `UCAC4Star`
72
+
73
+ Details of each class are available in the [module documentation](https://rms-starcat.readthedocs.io/en/latest/module.html).
74
+
75
+ Basic operation is as follows:
76
+
77
+ ```python
78
+ from starcat import YBSCStarCatalog
79
+ import numpy as np
80
+ cat = YBSCStarCatalog()
81
+ ra_vega = 279.2333
82
+ dec_vega = 38.7836
83
+ vega_list = list(cat.find_stars(ra_min=np.radians(ra_vega-0.1),
84
+ ra_max=np.radians(ra_vega+0.1),
85
+ dec_min=np.radians(dec_vega-0.1),
86
+ dec_max=np.radians(dec_vega+0.1)))
87
+
88
+ assert len(vega_list) == 1
89
+ print(vega_list[0])
90
+ ```
91
+
92
+ yields:
93
+
94
+ ```
95
+ UNIQUE ID 7001 | RA 279.2345833° (18h36m56.300s) | DEC 38.7836111° (+038d47m1.000s)
96
+ VMAG 0.030 | PM RA 259.135 mas/yr | PM DEC 286.000 mas/yr
97
+ TEMP 10800 | SCLASS A0Va
98
+ Name "3Alp Lyr" | Durch "BD+38 3238" | Draper 172167 | SAO 67174 | FK5 699
99
+ IR 1 Ref NASA | Multiple " " | Aitken 11510 None | Variable "Alp Lyr"
100
+ SCLASS Code | Galactic LON 67.44 LAT 19.24
101
+ B-V 0.0 | U-B -0.01 | R-I -0.03
102
+ Parallax TRIG 0.1230000 arcsec | RadVel -14.0 km/s V | RotVel (v sin i) 15.0 km/s
103
+ Double mag diff 10.40 Sep 62.80 arcsec Components AB # 5
104
+ ```
105
+
106
+ # Contributing
107
+
108
+ Information on contributing to this package can be found in the
109
+ [Contributing Guide](https://github.com/SETI/rms-starcat/blob/main/CONTRIBUTING.md).
110
+
111
+ # Links
112
+
113
+ - [Documentation](https://rms-starcat.readthedocs.io)
114
+ - [Repository](https://github.com/SETI/rms-starcat)
115
+ - [Issue tracker](https://github.com/SETI/rms-starcat/issues)
116
+ - [PyPi](https://pypi.org/project/rms-starcat)
117
+
118
+ # Licensing
119
+
120
+ This code is licensed under the [Apache License v2.0](https://github.com/SETI/rms-starcat/blob/main/LICENSE).