Skip to main content

No project description provided

Project description

heinlein

heinlein is a high-level tool for interacting with local versions of astronomical survey datasets. heinlein empowers astronomers who work with large survey datasets to stop thinking about files and start thinking about astronomy. Let's say you had downloaded some catalogs from the Dark Energy Survey. You could add these catalogs to heinlein with a single command:

> heinlein add hsc catalog /path/to/catalogs

Once this is done retrieving data in a python script becomes a simple as:

from heinlein import load dataset
import astropy.units as u

des = load_dataset("des")
catalog = data.cone_search(center=(141.23246, 2.32358), radius=120*u.arcsec)
#Returns a standard astropy table

heinlein understands that it's pointless to load an entire dataset when you only need one small piece of it, so it contains tools to intelligently portions of the data based on what's needed at the moment. You can easily setup your previously-downloaded catalogs to work with these features by calling:

> heinlein split des /path/to/catalogs

heinlein also knows that if you're getting data from one part of the sky, there's a decent chance you'll come back and try to get data from a nearby part of the sky. heinlein caches data so queries nearby a perviously-queried area will return substantially faster.

But heinlein doesn't only work with catalogs. For analyses that rely on photometry, it can be necesary to remove objects from a catalog that fall within a mask provided by the survey team (often because of a nearby bright star). It's easy to use heinlein to manage these masks and apply them to catalogs:

des = load_dataset("des")
data = data.cone_search(center=(141.23246, 2.32358), radius=120*u.arcsec, dtypes=["catalg", "mask"])
catalog = data["catalog"]
mask = data["mask"]
masked_catalog = catalog[mask]

heinlein will happily keep track of any data you give it, but it only contains built-in tools for certain datatypes (currently catalogs and masks).

Currently supported surveys: DES, HSC SSP, CFHTLS

Data types with built-in utilities: Catalogs (plaintext (csv, tsv etc), sqlite) Masks (.fits, .reg, mangle)

Interested in adding something to these lists? Don't hesitate to add it in "Issues."

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

heinlein-0.10.6.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

heinlein-0.10.6-py3-none-any.whl (36.3 kB view details)

Uploaded Python 3

File details

Details for the file heinlein-0.10.6.tar.gz.

File metadata

  • Download URL: heinlein-0.10.6.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.1 Linux/6.8.0-1021-azure

File hashes

Hashes for heinlein-0.10.6.tar.gz
Algorithm Hash digest
SHA256 a9d4ce0850efb0d4183a7595de1c9a8aad458bfe4ddd5048b492b105e6d27108
MD5 34d657069e0211d3c195c830bd0101dd
BLAKE2b-256 508a0f5722af9b90b2806b9aa259d8469c3c348f2a88a1d4aa2d96e3b3705d4b

See more details on using hashes here.

File details

Details for the file heinlein-0.10.6-py3-none-any.whl.

File metadata

  • Download URL: heinlein-0.10.6-py3-none-any.whl
  • Upload date:
  • Size: 36.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.1 Linux/6.8.0-1021-azure

File hashes

Hashes for heinlein-0.10.6-py3-none-any.whl
Algorithm Hash digest
SHA256 54b15e05a7886eac656f5d881f35fca4cfd23c41e963f1889460f27dfb7d400b
MD5 296395a38ad390ca1cdb09dbdb5cc34d
BLAKE2b-256 333b3a92848a53087ee13e95023cc7d2de29c62c6751865035e8c975c38f7d88

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page