Cone Search Alchemy
The conesearch_alchemy Python package enhances SQLAlchemy to provide fast,
indexed cone searches on astronomical catalogs using a PostgreSQL database. It
does not rely on any database extensions.
Installation
You can install conesearch_alchemy the Python Package Index:
$ pip install conesearch-alchemy
Usage
from conesearch_alchemy.point import Point
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
# Create two tables Catalog1 and Catalog2 that both have spherical coordinates.
class Catalog1(Point, Base):
__tablename__ = 'catalog1'
id = Column(Integer, primary_key=True)
class Catalog2(Point, Base):
__tablename__ = 'catalog2'
id = Column(Integer, primary_key=True)
...
# Populate Catalog1 and Catalog2 tables with some sample data...
session.add(Catalog1(id=0, ra=320.5, dec=-23.5))
...
session.add(Catalog2(id=0, ra=18.1, dec=18.3))
...
session.commit()
# Cross-match the two tables.
separation = 1 # separation in degrees
query = session.query(
Catalog1.id, Catalog2.id
).join(
Catalog2,
Catalog1.within(point, separation)
).order_by(
Catalog1.id, Catalog2.id
)
for row in query:
... # do something with the query results
# Do a cone search around literal ra, dec values.
separation = 1 # separation in degrees
point = Point(ra=212.5, dec=-33.2)
query = session.query(
Catalog1.id
).filter(
Catalog1.within(point, separation)
).order_by(
Catalog1.id
)
for row in query:
... # do something with the query results
Metadata
Release files for conesearch-alchemy 1.1.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 |
|---|---|---|---|---|
| conesearch_alchemy-1.1.0.tar.gz | 4.4 kB | Without provenance | Details for conesearch_alchemy-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| conesearch_alchemy-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for conesearch_alchemy-1.1.0-py3-none-any.whl |
Total release size: 9.9 kB
Release files / conesearch_alchemy-1.1.0.tar.gz
| Download URL | conesearch_alchemy-1.1.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63bb97aa32f9da6457338fd7202a907b8c0eee43b5f9362daebe2a594db132b3
|
|
BLAKE2b-256 checksum How to use checksums |
1db91ebd688a3ce0232626f974eab37ece6a0683979c8ac4ed54d1664d5349c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / conesearch_alchemy-1.1.0-py3-none-any.whl
| Download URL | conesearch_alchemy-1.1.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8291321b277ad18504d89f74e634c055dd35e70b1b1e967a57db10610e26df35
|
|
BLAKE2b-256 checksum How to use checksums |
adf2a4aaf8f783b9c57ef308143ddb75c56804eb0ee79f179f869f4d7b9fdb88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Security for conesearch-alchemy 1.1.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.