gladeparser
Parser for the GLADE+ galaxy catalog.
Usage
To read the catalog into a pandas.DataFrame:
from gladeparser import to_pandas_df
filename = "path/to/catalog"
df = to_pandas_df(filename)
The preferred way of reading the catalog is using a polars backend, especially if you want to filter out the data:
from gladeparser import to_polars_df
import polars as pl
# Grab objects from 2MASS catalog with redshifts corrected for peculiar velocity
filters = (
pl.col("2MASS name").is_not_null(),
pl.col("z_cmb").is_not_null(),
pl.col("z_cmb") > 0,
pl.col("z flag") == 1,
pl.col("dist flag").is_in([1, 3])
)
# Selected columns
cols = ["ra", "dec", "z_cmb"]
filename = "path/to/catalog"
df = to_polars_df(filename, cols=cols, **filters)
Parsing a subset of columns
from gladeparser import to_pandas_df, get_columns
# Select the columns you want and return their names
# See more options in get_columns docstring
cols = get_columns('Localization', 'Distance', names=True)
filename = "path/to/catalog"
df = to_pandas_df(filename, cols=cols)
Installation
Clone the repo and run
pip install .
Testing
Make sure that you have pytest installed, or run
pip install .[dev]
Then run
pytest
References
See the GLADE+ paper on arXiv.
Metadata
Release files for gladeparser 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gladeparser-0.2.0.tar.gz | 19.8 kB | Without provenance | Details for gladeparser-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gladeparser-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for gladeparser-0.2.0-py3-none-any.whl |
Total release size: 30.6 kB
Release files / gladeparser-0.2.0.tar.gz
| Download URL | gladeparser-0.2.0.tar.gz |
|---|---|
| Size | 19.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b11941962130621080056ab857b4397d45363bf3e22c6b7384ae4115588ff7e
|
|
BLAKE2b-256 checksum How to use checksums |
63627ac0fc3f1727f275f754849750acdae8270d7a637d586a342a79a9b124b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.2
|
Release files / gladeparser-0.2.0-py3-none-any.whl
| Download URL | gladeparser-0.2.0-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe099b1128c45bbcdd0fc7ae7bf6b646c7fdec443e9cd09ce24799bfc8a549b3
|
|
BLAKE2b-256 checksum How to use checksums |
b44d5da68a13b66dc10e3084737b84069723215cf19b7a3b783d8116afbefefa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.2
|
Security for gladeparser 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.