https://github.com/b612-asteroid-institute/precovery

Fast precovery of small body observations at scale

https://github.com/b612-asteroid-institute/precovery

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.6%) to scientific vocabulary

Keywords

asteroids comets python solar-system
Last synced: 5 months ago · JSON representation

Repository

Fast precovery of small body observations at scale

Basic Info
  • Host: GitHub
  • Owner: B612-Asteroid-Institute
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 3.16 MB
Statistics
  • Stars: 6
  • Watchers: 0
  • Forks: 2
  • Open Issues: 10
  • Releases: 1
Topics
asteroids comets python solar-system
Created over 4 years ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

precovery: fast asteroid precovery at scale

A Python package by the Asteroid Institute, a program of the B612 Foundation

Python 3.7+ License DOI
Python Package with conda Publish Python Package to conda
Anaconda-Server Badge Anaconda-Server Badge Anaconda-Server Badge

Installation

Conda

To get the latest released version and install it into a conda environment:
conda install -c asteroid-institute precovery

Source

To install the bleeding edge source code, clone this repository and then:

pip install .

healpy

healpy is available on PyPI, but as of version 1.16.2, only x86_64 wheels are published. For developers using Apple M1 Macbooks, these wheels won't be runnable.

Alternative wheels are therefore currently available on a B612 fork. aarch64 linux wheels can be found here: https://github.com/B612-Asteroid-Institute/healpy/releases/tag/1.16.2

Those wheels can be downloaded and directly pip-installed for developers using Docker containers on M1 Macbooks. See the Dockerfile for example.

Developer Setup

This project uses pre-commit to run linters and code formatters.

pre-commit sets the versions of these code analysis tools, and serves as an entrypoint for running them.

pre-commit installation

pre-commit is installed automatically inside the Docker container.

If you're developing on your local machine without Docker, install it using either pip install pre-commit or conda install -c conda-forge pre-commit. Then, install the hooks with pre-commit install-hooks, run from the root of this repository. This will install all the linters and tools in an isolated environment.

Running pre-commit

There are two ways you may choose to run pre-commit. You can run it manually, or you can run it automatically before every commit.

pre-commit generally only checks files that you have changed. It does this by comparing against git. This means that pre-commit will only check files you have staged (ones you have git add-ed). It will check the staged versions of those files.

Running pre-commit manually

Run pre-commit run to run linters against any files that you have changed.

Run pre-commit run --all-files to run linters against all files in the entire repository.

If you use a docker container for all development, you can use docker-compose run precovery pre-commit run [--all-files] to run within the container.

Running pre-commit automatically before every commit

Run pre-commit install to set up git hooks. These will block any commits if your changes don't pass the lint tests.

Sometimes, you might not pass lint but need to commit anyway. If you have automatic pre-commit enabled, this can get in the way.

You can disable all checks by using git commit --no-verify. You can disable a single check by using a SKIP environment variable. For example, to disable the mypy checks, use SKIP=mypy git commit.

You can skip multiple linters by passing a comma-separated list. For example, SKIP=mypy,black,flake8 git commit.

The values you pass to SKIP are the pre-commit hook IDs. These can be found in .pre-commit-config.yaml.

Observation Schema

Input CSV

precovery expects a specific set of columns to be able to index observations into a search efficient format. Input files should be sorted by ascending time.

|Name|Unit|Type|Description| |---|---|---|---| | obsid | None | str | Unique observation ID for the observation | | exposureid | None | str | Exposure or Image ID from which observation was measured | | mjd | days | float | MJD of the observation in UTC[^1] | | ra | degree | float | Right Ascension (J2000) | | dec | degree | float | Declination (J2000) | | rasigma | degree | float | 1-sigma uncertainty in Right Ascension (Optional)[^2] | | decsigma | degree | float | 1-sigma uncertainty in Declination (Optional)[^2] | | mag | None | float | Photometric magnitude measured for observation | | magsigma | None | float | 1-sigma uncertainty in photometric magnitude (Optional)[^2]| | filter | None | str | Filter/bandpass in which the observation was made | | exposuremjdstart | days | float | Start MJD of the exposure in UTC | | exposuremjdmid | days | float | Midpoint MJD of the exposure in UTC | | exposureduration | seconds | float | The length of the exposure | | observatory_code | None | str | MPC observatory code for the observatory/observing program |

Precovery Results

Precovery returns observations that lie within the angular tolerance of the predicted location of an input orbit propagated and mapped to the indexed observations. These observations are termed PrecoveryCandidates. Optionally, precovery can also return FrameCandidates which are frames where the orbit intersected the Healpix-mapped exposure for a specific dataset but no observations were found within the angular tolerance. In this case, quantities specific to individual observations will be returned as NaNs (mjd, radeg, decsigmaarcsec, rasigmaarcsec, mag, magsigma, observationid, deltaraarcsec, deltadecarcsec, distancearcsec), with the remaining quantities that define the Healpix-mapped exposure returned as normal.

|Name|Unit|Type|Description|NaN When?| |---|---|---|---|---| | mjd | days | float | MJD of the observation in UTC[^1] | FrameCandidates |
| radeg | degree | float | Right Ascension (J2000) | FrameCandidates |
| dec
deg | degree | float | Declination (J2000) | FrameCandidates |
| rasigmaarcsec | arcsecond | float | 1-sigma uncertainty in Right Ascension | FrameCandidates, Missing In Source Observations[^3] |
| decsigmaarcsec | arcsecond | float | 1-sigma uncertainty in Declination | FrameCandidates, Missing In Source Observations[^3]|
| mag | None | float | Photometric magnitude measured for observation | FrameCandidates |
| magsigma | None | float | 1-sigma uncertainty in photometric magnitude | FrameCandidates, Missing In Source Observations[^3]|
| filter | None | str | Filter/bandpass in which the observation was made | No |
| obscode | None | str | MPC observatory code for the observatory/observing program | No |
| exposure
id | None | str | Exposure or Image ID from which observation was measured | No |
| exposuremjdstart | days | float | Start MJD of the exposure in UTC | No |
| exposuremjdmid | days | float | Midpoint MJD of the exposure in UTC | No |
| exposureduration | seconds | float | The length of the exposure | No |
| observation
id | None | str |Unique observation ID for the observation | FrameCandidates |
| healpixid | None | int | ID of the HEALPixel onto which the exposure was mapped | No |
| pred
radeg | degree | float | Predicted Right Ascension (J2000) of the object at the time of the observation | No |
| pred
decdeg | degree | float | Predicted Declination (J2000) of the object at the time of the observation | No |
| pred
vradegpday | degree / day| float | Predicted velocity in Right Ascension (J2000) of the object at the time of the observation | No |
| pred
vdecdegpday | degree /day | float | Predicted velocity in Declination (J2000) of the object at the time of the observation | No |
| delta
raarcsec | arcsecond | float | Difference between predicted and observed Right Ascension (predicted - observed) | FrameCandidates |
| delta
decarcsec | arcsecond | float | Difference between predicted and observed Declination (predicted - observed) | FrameCandidates |
| distance
arcsec | arcsecond | float | Angular offset between the predicted location of the object and the obervation | FrameCandidates |
| dataset_id | None | str | Dataset ID from where the observation was precovered | No |

Footnotes:
[^1]: The time at which the observation is reported may be different than the exposure midpoint time to account for effects such as shutter motion.
[^2]: Quantities that are optional should be serialized as empty strings with the columns still defined in the input CSVs.
When using pandas to serialize dataframes, NaN values are automatically stored as empty strings.
[^3]: May be NaN if they were undefined in the source observations.

Owner

  • Name: Asteroid Institute
  • Login: B612-Asteroid-Institute
  • Kind: organization

B612’s Asteroid Institute brings together scientists+engineers to develop tools to understand & map our solar system + protect our planet from asteroid impacts

GitHub Events

Total
  • Issue comment event: 2
  • Push event: 37
  • Pull request review event: 3
  • Pull request event: 7
  • Create event: 5
Last Year
  • Issue comment event: 2
  • Push event: 37
  • Pull request review event: 3
  • Pull request event: 7
  • Create event: 5

Issues and Pull Requests

Last synced: 6 months ago

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 11 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
pypi.org: precovery

Fast asteroid precovery at scale

  • Homepage: https://github.com/b612-asteroid-institute/precovery
  • Documentation: https://precovery.readthedocs.io/
  • License: BSD 3-Clause License Copyright (c) 2022, Spencer Nelson, B612 Asteroid Institute All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * 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. * 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.
  • Latest release: 1.0.0
    published about 1 year ago
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 11 Last month
Rankings
Dependent packages count: 9.9%
Forks count: 21.0%
Stargazers count: 22.5%
Average: 27.3%
Dependent repos count: 55.8%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/dev-deploy.yml actions
  • shimataro/ssh-key-action v2 composite
.github/workflows/lint-test.yml actions
  • actions/checkout v2 composite
  • docker/setup-buildx-action v2 composite
  • jpribyl/action-docker-layer-caching v0.1.0 composite
.github/workflows/python-publish-conda.yml actions
  • actions/checkout v2 composite
  • conda-incubator/setup-miniconda v2 composite
.github/workflows/python-publish-pypi.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • pypa/gh-action-pypi-publish release/v1 composite
Dockerfile docker
  • ubuntu jammy build
docker-compose.yml docker
pyproject.toml pypi