Skip to main content

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."

Metadata

Release files for heinlein 0.10.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for heinlein 0.10.11
File Size Uploaded
heinlein-0.10.11.tar.gz 26.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for heinlein 0.10.11
File Interpreter ABI Platform
heinlein-0.10.11-py3-none-any.whl Python 3 none any Details

Total release size: 62.7 kB

Release files / heinlein-0.10.11.tar.gz

Download URL heinlein-0.10.11.tar.gz
Size 26.1 kB
Tags Source
SHA-256 checksum
How to use checksums
435cac6efb61b505b9c3f7b012ba9ab60498422c9e5126ba94150f5d4d00811b
BLAKE2b-256 checksum
How to use checksums
aa06f91cd707e270f63c1d058e090bf27005db6a0f4ae0babb883de1f608f5ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.13.1 Linux/6.8.0-1021-azure

Release files / heinlein-0.10.11-py3-none-any.whl

Download URL heinlein-0.10.11-py3-none-any.whl
Size 36.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5753e0154d44e72836c2822501286de3575c99515670d6745c25550c7c0ba9d
BLAKE2b-256 checksum
How to use checksums
22c03741902377c9347147856ddb6b4cc1c877b07a5ff39ae74520331a44b397
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.13.1 Linux/6.8.0-1021-azure

Release history Release notifications | RSS feed

This release

0.10.11 This release

2 release files

0.10.9

2 release files

0.10.8

2 release files

0.10.7

2 release files

0.10.6

2 release files

0.10.5

2 release files

0.10.4

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

11 release files

0.6.2

11 release files

0.6.1

11 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.13

2 release files

0.4.12

2 release files

0.4.11

2 release files

0.4.10

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.15

2 release files

0.3.10

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.5

2 release files

0.2.4

1 release file

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page