Metadata-Version: 2.4
Name: skyloc
Version: 0.4
Summary: Convenience tools related to Solar System Objects (SSO) locator (e.g., apparent position and movements) for general purposes.
Author-email: ysBach <ysbach20766@gmail.com>
License: Copyright <2025> <Yoonsoo P. Bach>
        
        Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
        
Project-URL: Homepage, https://github.com/ysBach/skyloc
Project-URL: Documentation, https://ysbach.github.io/skyloc/
Project-URL: Repository, https://github.com/ysBach/skyloc
Project-URL: Bug Tracker, https://github.com/ysBach/skyloc/issues
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: numba
Requires-Dist: pandas
Requires-Dist: astropy
Requires-Dist: spiceypy
Requires-Dist: requests
Requires-Dist: astroquery
Requires-Dist: healpy
Requires-Dist: pyarrow
Requires-Dist: click
Requires-Dist: pqfilt>=0.4.0
Provides-Extra: kete
Requires-Dist: kete<3.4,>=3.3; extra == "kete"
Provides-Extra: kete-ipac
Requires-Dist: kete<2.0.0,>=1.1.3; python_version < "3.14" and extra == "kete-ipac"
Provides-Extra: full
Requires-Dist: skyloc[kete]; extra == "full"
Requires-Dist: plotly>=5.12; extra == "full"
Requires-Dist: matplotlib; extra == "full"
Requires-Dist: ipywidgets<9,>=8; extra == "full"
Requires-Dist: anywidget<1,>=0.9; extra == "full"
Dynamic: license-file

<!-- Header block for project -->
<hr>

<div align="center">

<!-- [INSERT YOUR LOGO IMAGE HERE (IF APPLICABLE)] -->
<!-- ☝️ Replace with your logo (if applicable) via ![](https://uri-to-your-logo-image) ☝️ -->
<!-- ☝️ If you see logo rendering errors, make sure you're not using indentation, or try an HTML IMG tag -->

<h1 align="center">skyloc: Sky Locator</h1>
<!-- ☝️ Replace with your repo name ☝️ -->

</div>

<pre align="center">Convenience tools related to Sidereal or Solar System Objects (SSO) locator (e.g., apparent position and movements) for general purposes.</pre>
<!-- ☝️ Replace with a single sentence describing the purpose of your repo / proj ☝️ -->

<!-- Header block for project -->

<!-- [INSERT YOUR BADGES HERE (SEE: https://shields.io)] [![SLIM](https://img.shields.io/badge/Best%20Practices%20from-SLIM-blue)](https://nasa-ammos.github.io/slim/) -->
<!-- ☝️ Add badges via: https://shields.io e.g. ![](https://img.shields.io/github/your_chosen_action/your_org/your_repo) ☝️ -->

<!-- [INSERT SCREENSHOT OF YOUR SOFTWARE, IF APPLICABLE] -->
<!-- ☝️ Screenshot of your software (if applicable) via ![](https://uri-to-your-screenshot) ☝️ -->

This project provides both kete-dependent and kete-independent features. Many utility functions can be used without installing [kete](https://github.com/Caltech-IPAC/kete/tree/main#).

Initially motivated by NASA's SPHEREx mission (and NEO Surveyor mission - kete).

["Why are your codes here so superficial and crude/messy?"](HISTORYNOTE.md)
<!-- example links>
[Website](INSERT WEBSITE LINK HERE) | [Docs/Wiki](INSERT DOCS/WIKI SITE LINK HERE) | [Discussion Board](INSERT DISCUSSION BOARD LINK HERE) | [Issue Tracker](INSERT ISSUE TRACKER LINK HERE)
-->

## Documentation

- [Usage guides and API reference](https://ysbach.github.io/skyloc/)
- [Build and publish documentation](docs/README.md)

## Orbit data and propagation

Keep using `orb, m_ng = fetch_orb(...)` to obtain the orbital-element
DataFrame and its non-gravitational-force mask. Pass `orb` to `SSOLocator`
or `locator_twice` for the usual field-of-view workflow.

For repeated full-catalog propagation, optionally build
`catalog = CachedOrbPropagator(orb, m_ng)` once and reuse its validated state
caches. It does not replace the DataFrame or shorten the fetch step. See
the [complete fetch-to-cache example](docs/quarto/guides/cached-orb-propagator.qmd).

## Installation

### Basic Installation (without kete)

To install `skyloc` without the large Rust-based `kete` dependency:

```bash
pip install skyloc
```

This provides access to utility functions, SPICE tools, and other features that don't require kete.

`pqfilt>=0.4.0` is installed with Skyloc and provides expression filtering.

### Installation with Kete

For FOV analysis and SSO propagation, use the default Kete extra. It installs
kete (>=3.3) and is also included in `skyloc[full]`.

```bash
pip install 'skyloc[kete]'
```

From a Skyloc checkout, use uv to install the Caltech-IPAC fork at v1.1.4.
This fork requires Python 3.9–3.13 and a Rust toolchain.

```bash
UV_PROJECT_ENVIRONMENT=.venv-ipac uv sync --python 3.13 --extra kete_ipac
```

For pip, specify the Git source explicitly. The published extra alone
selects the kete_ipac (v1.x) package from PyPI.

```bash
pip install --config-settings='build-args=--bindings pyo3 --features kete_core/pyo3' 'kete @ git+https://github.com/Caltech-IPAC/kete.git@v1.1.4'
pip install 'skyloc[kete_ipac]'
```

Both branches install and import as `kete`. The uv command above keeps the
IPAC build in `.venv-ipac`.

## Features

* **SSO Orbital Elements** (no kete required)
  - Query and manage SSO orbital elements from SBDB (Small-Body Database)
  - Convenient file management for orbital element data

* **JPL Horizons Integration** (no kete required for most features)
  - Download and manage DE (Development Ephemeris) files
  - Query vectors and ephemeris data using `astroquery`

* **SPICE toolkits** (no kete required)
  - Some convenience tools for SPICE toolkits (such as meta kernel generations)

* **Field of View (FOV) Analysis** (requires kete)
  - Check which FOVs contain specific sidereal sky locations and/or SSOs (similar to [kete](https://github.com/Caltech-IPAC/kete/tree/main#))
  - Easy-to-use interface for FOVs (`FOVCollection` class)

* **SSO Position and Motion** (requires kete)
  - Calculate apparent positions and movements of SSOs (uses [kete](https://github.com/Caltech-IPAC/kete/tree/main#))
  - Compute SSO magnitudes and phase angles
  - Additional ephemeris-related convenience tools


## Code Style

This project uses a 92-character line length (inspired by [Julia's BlueStyle](https://github.com/JuliaDiff/BlueStyle)) for code and 79 characters for docstrings. While this differs from the standard Python PEP8 recommendations, it provides a good balance for modern displays.

To maintain consistent formatting, use the `black` formatter:

```bash
black **/*.py
```

## Citation

`skyloc` is not intended to be published as an independent, citable package. Depending on your usage, simply cite this repo as a URL link, but always consider citing any of the following as appropriate: [kete](https://github.com/Caltech-IPAC/kete/tree/main#), [spiceypy](https://github.com/AndrewAnnex/SpiceyPy), or [NAIF SPICE](https://naif.jpl.nasa.gov/naif/credit.html).
