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

Postage stamps along the trajectory of a moving object

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

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 (9.7%) to scientific vocabulary

Keywords

asteroids astronomy
Last synced: 6 months ago · JSON representation

Repository

Postage stamps along the trajectory of a moving object

Basic Info
  • Host: GitHub
  • Owner: B612-Asteroid-Institute
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 1.16 MB
Statistics
  • Stars: 3
  • Watchers: 3
  • Forks: 2
  • Open Issues: 7
  • Releases: 1
Topics
asteroids astronomy
Created almost 4 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

cutouts: postage stamps along the trajectory of a moving object

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

Python 3.7+ License DOI
conda - Build, Lint, and Test docker - Build, Lint, and Test
Anaconda-Server Badge Anaconda-Server Badge Anaconda-Server Badge

Installation

Docker

You can build and use cutouts using the included Dockerfile and docker-compose.yml:
docker compose build cutouts docker compose run -it cutouts

Conda

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

Source / Pip

To install the latest from source: pip install git+https://github.com/B612-Asteroid-Institute/cutouts.git@main#egg=cutouts

Example

To reproduce the example that ships with the repository: ``` import pandas as pd import matplotlib.pyplot as plt from astropy.time import Time from cutouts import getcutouts from cutouts import plotcutouts

Read in observations and predicted ephemerides

observations = pd.readcsv("examples/2013RR163.csv", index_col=False)

Extract relevant quantities

ra = observations["predradeg"].values dec = observations["preddecdeg"].values vra = observations["predvradegpday"].values vdec = observations["predvdecdegpday"].values obscode = observations["obscode"].values mag = observations["mag"].values filter = observations["filter"].values magsigma = observations["magsigma"].values times = Time(observations["mjdutc"].values, scale="utc", format="mjd") exposureid = observations["exposure_id"].values

Find cutouts and save them

NSCSIAURL = "https://datalab.noirlab.edu/sia/nscdr2" cutoutpaths, cutoutresults = getcutouts( times, ra, dec, siaurl=NSCSIAURL, exposureid=exposureid, outdir="examples/cutouts" ) exposuretime = cutoutresults["exptime"].values.astype(int)

Plot cutouts

fig, ax = plotcutouts( cutoutpaths, times, ra, dec, vra, vdec, filters=filter, mag=mag, magsigma=magsigma, exposuretime=exposuretime, cutoutheight=75, cutoutwidth=75, ) fig.suptitle(f"(2013 RR163)", y=1.0) fig.savefig(f"examples/2013RR163.jpg", bboxinches="tight") ``` 2013 RR163) Cutouts Example

cutouts also comes with a simple command line interface (CLI) to quickly produce a grid of cutouts from a file of predicted ephemerides and observations.
cutouts examples/2013_RR163.csv --out_dir examples/cli_test

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: 1
Last Year
  • Issue comment event: 1

Dependencies

.github/workflows/conda-build-lint-test.yml actions
  • actions/checkout v2 composite
  • conda-incubator/setup-miniconda v2 composite
.github/workflows/conda-publish.yml actions
  • actions/checkout v2 composite
.github/workflows/docker-build-lint-test.yml actions
  • actions/checkout v3 composite
  • docker/setup-buildx-action v2 composite
  • jpribyl/action-docker-layer-caching v0.1.1 composite
.github/workflows/pip-build-lint-test.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v4 composite
Dockerfile docker
  • ubuntu jammy build
docker-compose.yml docker
pyproject.toml pypi
requirements.txt pypi
  • annotated-types ==0.6.0
  • astropy ==6.0.0
  • astropy-iers-data ==0.2024.1.22.0.30.30
  • backoff ==2.2.1
  • certifi ==2023.11.17
  • cfgv ==3.4.0
  • charset-normalizer ==3.3.2
  • contourpy ==1.2.0
  • coverage ==7.4.0
  • cycler ==0.12.1
  • distlib ==0.3.8
  • filelock ==3.13.1
  • fonttools ==4.47.2
  • identify ==2.5.33
  • idna ==3.6
  • imageio ==2.33.1
  • iniconfig ==2.0.0
  • kiwisolver ==1.4.5
  • matplotlib ==3.8.2
  • nodeenv ==1.8.0
  • numpy ==1.26.3
  • packaging ==23.2
  • pandas ==2.2.0
  • pillow ==10.2.0
  • platformdirs ==4.1.0
  • pluggy ==1.4.0
  • pre-commit ==3.6.0
  • pydantic ==2.5.3
  • pydantic-core ==2.14.6
  • pyerfa ==2.0.1.1
  • pyparsing ==3.1.1
  • pytest ==7.4.4
  • pytest-cov ==4.1.0
  • python-dateutil ==2.8.2
  • pytz ==2023.3.post1
  • pyvo ==1.5
  • pyyaml ==6.0.1
  • requests ==2.31.0
  • six ==1.16.0
  • typing-extensions ==4.9.0
  • tzdata ==2023.4
  • urllib3 ==2.1.0
  • virtualenv ==20.25.0