[![GitHub release; latest by date](https://img.shields.io/github/v/release/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/releases)
[![GitHub Release Date](https://img.shields.io/github/release-date/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/releases)
[![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)
[![Documentation Status](https://readthedocs.org/projects/rms-starcat/badge/?version=latest)](https://rms-starcat.readthedocs.io/en/latest/?badge=latest)
[![Code coverage](https://img.shields.io/codecov/c/github/SETI/rms-starcat/main?logo=codecov)](https://codecov.io/gh/SETI/rms-starcat)
<br />
[![PyPI - Version](https://img.shields.io/pypi/v/rms-starcat)](https://pypi.org/project/rms-starcat)
[![PyPI - Format](https://img.shields.io/pypi/format/rms-starcat)](https://pypi.org/project/rms-starcat)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/rms-starcat)](https://pypi.org/project/rms-starcat)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/rms-starcat)](https://pypi.org/project/rms-starcat)
<br />
[![GitHub commits since latest release](https://img.shields.io/github/commits-since/SETI/rms-starcat/latest)](https://github.com/SETI/rms-starcat/commits/main/)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/commits/main/)
[![GitHub last commit](https://img.shields.io/github/last-commit/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/commits/main/)
<br />
[![Number of GitHub open issues](https://img.shields.io/github/issues-raw/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/issues)
[![Number of GitHub closed issues](https://img.shields.io/github/issues-closed-raw/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/issues)
[![Number of GitHub open pull requests](https://img.shields.io/github/issues-pr-raw/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/pulls)
[![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)
<br />
![GitHub License](https://img.shields.io/github/license/SETI/rms-starcat)
[![Number of GitHub stars](https://img.shields.io/github/stars/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/stargazers)
![GitHub forks](https://img.shields.io/github/forks/SETI/rms-starcat)
# Introduction
`starcat` is a set of classes for reading and searching star catalogs. Currently NAIF SPICE
star catalogs, the Yale Bright Star Catalog (YBSC), and UCAC4 are supported.
`starcat` is a product of the [PDS Ring-Moon Systems Node](https://pds-rings.seti.org).
# Installation
The `starcat` module is available via the `rms-starcat` package on PyPI and can be installed with:
```sh
pip install rms-starcat
```
# Getting Started
The `starcat` module provides the `StarCatalog` class, which is the superclass for classes
that handle specific star catalogs. Each star catalog class takes an optional directory
path to point at the root of the star catalog data; if no directory path is provided,
the contents of an environment variable is used instead. Each path can be a full URL
as supported by [`rms-filecache`](https://rms-filecache.readthedocs.io/en/latest/),
allowing the catalog data to be downloaded (and cached locally) at runtime.
- `SpiceStarCatalog`
- The `dir` argument, if specified, must point to a directory containing NAIF SPICE
kernels.
- Otherwise, the environment variable `SPICE_PATH`, if defined, must contain a `Stars`
subdirectory with NAIF SPICE kernels.
- Otherwise, the environment variable `OOPS_RESOURCES` must contain a `SPICE/Stars`
subdirectory.
- `YBSCStarCatalog`
- The `dir` argument, if specified, must point to a directory containing the file
`catalog`.
- Otherwise, the environment variable `YBSC_PATH` must point to that directory.
- `UCAC4StarCatalog`
- The `dir` argument, if specified, must point to a directory containing the directory
`u4b`.
- Otherwise, the environment variable `UCAC4_PATH` must point to that directory.
Each star catalog returns stars as a class that is a subclass of `Star`. Each subclass
contains the attributes provided by that star catalog, and none are guaranteed to be
filled in for all stars:
- `SpiceStar`
- `YBSCStar`
- `UCAC4Star`
Details of each class are available in the [module documentation](https://rms-starcat.readthedocs.io/en/latest/module.html).
Basic operation is as follows:
```python
from starcat import YBSCStarCatalog
import numpy as np
cat = YBSCStarCatalog()
ra_vega = 279.2333
dec_vega = 38.7836
vega_list = list(cat.find_stars(ra_min=np.radians(ra_vega-0.1),
ra_max=np.radians(ra_vega+0.1),
dec_min=np.radians(dec_vega-0.1),
dec_max=np.radians(dec_vega+0.1)))
assert len(vega_list) == 1
print(vega_list[0])
```
yields:
```
UNIQUE ID 7001 | RA 279.2345833° (18h36m56.300s) | DEC 38.7836111° (+038d47m1.000s)
VMAG 0.030 | PM RA 259.135 mas/yr | PM DEC 286.000 mas/yr
TEMP 10800 | SCLASS A0Va
Name "3Alp Lyr" | Durch "BD+38 3238" | Draper 172167 | SAO 67174 | FK5 699
IR 1 Ref NASA | Multiple " " | Aitken 11510 None | Variable "Alp Lyr"
SCLASS Code | Galactic LON 67.44 LAT 19.24
B-V 0.0 | U-B -0.01 | R-I -0.03
Parallax TRIG 0.1230000 arcsec | RadVel -14.0 km/s V | RotVel (v sin i) 15.0 km/s
Double mag diff 10.40 Sep 62.80 arcsec Components AB # 5
```
# Contributing
Information on contributing to this package can be found in the
[Contributing Guide](https://github.com/SETI/rms-starcat/blob/main/CONTRIBUTING.md).
# Links
- [Documentation](https://rms-starcat.readthedocs.io)
- [Repository](https://github.com/SETI/rms-starcat)
- [Issue tracker](https://github.com/SETI/rms-starcat/issues)
- [PyPi](https://pypi.org/project/rms-starcat)
# Licensing
This code is licensed under the [Apache License v2.0](https://github.com/SETI/rms-starcat/blob/main/LICENSE).
Raw data
{
"_id": null,
"home_page": null,
"name": "rms-starcat",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "\"Robert S. French\" <rfrench@seti.org>",
"keywords": "UCAC4, YBSC, star",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/73/43/17801af6468881ba6037ba87d01ef5f825cf1f0a6f47c16075053b2584b4/rms_starcat-1.0.0.tar.gz",
"platform": null,
"description": "[![GitHub release; latest by date](https://img.shields.io/github/v/release/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/releases)\n[![GitHub Release Date](https://img.shields.io/github/release-date/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/releases)\n[![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)\n[![Documentation Status](https://readthedocs.org/projects/rms-starcat/badge/?version=latest)](https://rms-starcat.readthedocs.io/en/latest/?badge=latest)\n[![Code coverage](https://img.shields.io/codecov/c/github/SETI/rms-starcat/main?logo=codecov)](https://codecov.io/gh/SETI/rms-starcat)\n<br />\n[![PyPI - Version](https://img.shields.io/pypi/v/rms-starcat)](https://pypi.org/project/rms-starcat)\n[![PyPI - Format](https://img.shields.io/pypi/format/rms-starcat)](https://pypi.org/project/rms-starcat)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/rms-starcat)](https://pypi.org/project/rms-starcat)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/rms-starcat)](https://pypi.org/project/rms-starcat)\n<br />\n[![GitHub commits since latest release](https://img.shields.io/github/commits-since/SETI/rms-starcat/latest)](https://github.com/SETI/rms-starcat/commits/main/)\n[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/commits/main/)\n[![GitHub last commit](https://img.shields.io/github/last-commit/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/commits/main/)\n<br />\n[![Number of GitHub open issues](https://img.shields.io/github/issues-raw/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/issues)\n[![Number of GitHub closed issues](https://img.shields.io/github/issues-closed-raw/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/issues)\n[![Number of GitHub open pull requests](https://img.shields.io/github/issues-pr-raw/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/pulls)\n[![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)\n<br />\n![GitHub License](https://img.shields.io/github/license/SETI/rms-starcat)\n[![Number of GitHub stars](https://img.shields.io/github/stars/SETI/rms-starcat)](https://github.com/SETI/rms-starcat/stargazers)\n![GitHub forks](https://img.shields.io/github/forks/SETI/rms-starcat)\n\n# Introduction\n\n`starcat` is a set of classes for reading and searching star catalogs. Currently NAIF SPICE\nstar catalogs, the Yale Bright Star Catalog (YBSC), and UCAC4 are supported.\n\n`starcat` is a product of the [PDS Ring-Moon Systems Node](https://pds-rings.seti.org).\n\n# Installation\n\nThe `starcat` module is available via the `rms-starcat` package on PyPI and can be installed with:\n\n```sh\npip install rms-starcat\n```\n\n# Getting Started\n\nThe `starcat` module provides the `StarCatalog` class, which is the superclass for classes\nthat handle specific star catalogs. Each star catalog class takes an optional directory\npath to point at the root of the star catalog data; if no directory path is provided,\nthe contents of an environment variable is used instead. Each path can be a full URL\nas supported by [`rms-filecache`](https://rms-filecache.readthedocs.io/en/latest/),\nallowing the catalog data to be downloaded (and cached locally) at runtime.\n\n- `SpiceStarCatalog`\n - The `dir` argument, if specified, must point to a directory containing NAIF SPICE\n kernels.\n - Otherwise, the environment variable `SPICE_PATH`, if defined, must contain a `Stars`\n subdirectory with NAIF SPICE kernels.\n - Otherwise, the environment variable `OOPS_RESOURCES` must contain a `SPICE/Stars`\n subdirectory.\n- `YBSCStarCatalog`\n - The `dir` argument, if specified, must point to a directory containing the file\n `catalog`.\n - Otherwise, the environment variable `YBSC_PATH` must point to that directory.\n- `UCAC4StarCatalog`\n - The `dir` argument, if specified, must point to a directory containing the directory\n `u4b`.\n - Otherwise, the environment variable `UCAC4_PATH` must point to that directory.\n\nEach star catalog returns stars as a class that is a subclass of `Star`. Each subclass\ncontains the attributes provided by that star catalog, and none are guaranteed to be\nfilled in for all stars:\n\n- `SpiceStar`\n- `YBSCStar`\n- `UCAC4Star`\n\nDetails of each class are available in the [module documentation](https://rms-starcat.readthedocs.io/en/latest/module.html).\n\nBasic operation is as follows:\n\n```python\nfrom starcat import YBSCStarCatalog\nimport numpy as np\ncat = YBSCStarCatalog()\nra_vega = 279.2333\ndec_vega = 38.7836\nvega_list = list(cat.find_stars(ra_min=np.radians(ra_vega-0.1),\n ra_max=np.radians(ra_vega+0.1),\n dec_min=np.radians(dec_vega-0.1),\n dec_max=np.radians(dec_vega+0.1)))\n\nassert len(vega_list) == 1\nprint(vega_list[0])\n```\n\nyields:\n\n```\nUNIQUE ID 7001 | RA 279.2345833\u00b0 (18h36m56.300s) | DEC 38.7836111\u00b0 (+038d47m1.000s)\nVMAG 0.030 | PM RA 259.135 mas/yr | PM DEC 286.000 mas/yr\nTEMP 10800 | SCLASS A0Va\nName \"3Alp Lyr\" | Durch \"BD+38 3238\" | Draper 172167 | SAO 67174 | FK5 699\nIR 1 Ref NASA | Multiple \" \" | Aitken 11510 None | Variable \"Alp Lyr\"\nSCLASS Code | Galactic LON 67.44 LAT 19.24\nB-V 0.0 | U-B -0.01 | R-I -0.03\nParallax TRIG 0.1230000 arcsec | RadVel -14.0 km/s V | RotVel (v sin i) 15.0 km/s\nDouble mag diff 10.40 Sep 62.80 arcsec Components AB # 5\n```\n\n# Contributing\n\nInformation on contributing to this package can be found in the\n[Contributing Guide](https://github.com/SETI/rms-starcat/blob/main/CONTRIBUTING.md).\n\n# Links\n\n- [Documentation](https://rms-starcat.readthedocs.io)\n- [Repository](https://github.com/SETI/rms-starcat)\n- [Issue tracker](https://github.com/SETI/rms-starcat/issues)\n- [PyPi](https://pypi.org/project/rms-starcat)\n\n# Licensing\n\nThis code is licensed under the [Apache License v2.0](https://github.com/SETI/rms-starcat/blob/main/LICENSE).\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Star catalog database",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/SETI/rms-starcat",
"Issues": "https://github.com/SETI/rms-starcat/issues",
"Repository": "https://github.com/SETI/rms-starcat",
"Source": "https://github.com/SETI/rms-starcat"
},
"split_keywords": [
"ucac4",
" ybsc",
" star"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "47bb140b1a25f7e08eb96923ba078c1ae23031b560f640ecc98e5a6327500db0",
"md5": "cd9f205d0444a8ceffec8d6c81532f56",
"sha256": "e3b4f3a519a45513e1f0eb503caddbc76a8bb7ebd206e5f48e0d1bfa95c13fca"
},
"downloads": -1,
"filename": "rms_starcat-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cd9f205d0444a8ceffec8d6c81532f56",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 32381,
"upload_time": "2024-12-19T02:30:06",
"upload_time_iso_8601": "2024-12-19T02:30:06.774682Z",
"url": "https://files.pythonhosted.org/packages/47/bb/140b1a25f7e08eb96923ba078c1ae23031b560f640ecc98e5a6327500db0/rms_starcat-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "734317801af6468881ba6037ba87d01ef5f825cf1f0a6f47c16075053b2584b4",
"md5": "0358482780baf0230cdc8886dbc4b936",
"sha256": "75f5b7faaba3ce9f858a2648a8c4aa48d93aabca20e3624cccb91dce875073f3"
},
"downloads": -1,
"filename": "rms_starcat-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "0358482780baf0230cdc8886dbc4b936",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 41106,
"upload_time": "2024-12-19T02:30:08",
"upload_time_iso_8601": "2024-12-19T02:30:08.975288Z",
"url": "https://files.pythonhosted.org/packages/73/43/17801af6468881ba6037ba87d01ef5f825cf1f0a6f47c16075053b2584b4/rms_starcat-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-19 02:30:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "SETI",
"github_project": "rms-starcat",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [
{
"name": "coverage",
"specs": []
},
{
"name": "cspyce",
"specs": []
},
{
"name": "flake8",
"specs": []
},
{
"name": "mypy",
"specs": []
},
{
"name": "myst-parser",
"specs": []
},
{
"name": "numpy",
"specs": []
},
{
"name": "pytest",
"specs": []
},
{
"name": "rms-filecache",
"specs": []
},
{
"name": "sphinx",
"specs": []
},
{
"name": "sphinxcontrib-napoleon",
"specs": []
},
{
"name": "sphinx-rtd-theme",
"specs": []
}
],
"lcname": "rms-starcat"
}