Skip to main content

A client to the ASI-SSDC's SED Builder API.

Project description

sedbuilder

The sedbuilder package implements a Python interface to the ASI Space Science Data Center's SED Builder REST API.

Overview

This package provides programmatic access to multi-wavelength spectral energy distribution (SED) data from catalogs, surveys, and archival observations across the electromagnetic spectrum. It is based on SED Builder, a software developed at the ASI-SSDC to produce and display the SED data over the web.

Installation

pip install ssdc-sedbuilder

Quick Start

You can fetch data querying a source name or its coordinates.

from sedbuilder import get_data

# By coordinates
response = get_data(ra=244.9795, dec=-15.64022)
# By name
response = get_data(name="Sco X-1")

# Access data in different formats
table = response.to_astropy()     # Astropy Table
data_dict = response.to_dict()    # Python dictionary
jt = response.to_jetset(z=0.034)  # Jetset table
json_str = response.to_json()     # JSON string
df = response.to_pandas()         # Pandas DataFrame (requires pandas)

When calling get_data by name, resolve_name queries the SSDC server — which checks SSDC, SIMBAD, and NED — falling back to the CDS Sesame resolver via astropy if no match is found.

from sedbuilder import resolve_name

(ra, dec), db = resolve_name("Crab Nebula")

Resolving a source name takes time. We suggest querying on coordinates when available.

Development

git clone https://github.com/peppedilillo/sedbuilder.git
cd sedbuilder
pip install -e ".[dev]"
pre-commit install
# next line will route queries to test server. 
# use only on SSDC internal network 
source dev.env 
pytest

To build and serve the documentation locally:

pip install -e ".[docs]"
mkdocs serve
mkdocs build

To publish the documentation to GitHub Pages:

mkdocs gh-deploy

Requests

Need a new feature? Don't hesitate to ask in our discussion section.

Documentation

Check out our API reference.

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

ssdc_sedbuilder-1.0.0.tar.gz (409.4 kB view details)

Uploaded Source

Built Distribution

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

ssdc_sedbuilder-1.0.0-py3-none-any.whl (37.2 kB view details)

Uploaded Python 3

File details

Details for the file ssdc_sedbuilder-1.0.0.tar.gz.

File metadata

  • Download URL: ssdc_sedbuilder-1.0.0.tar.gz
  • Upload date:
  • Size: 409.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for ssdc_sedbuilder-1.0.0.tar.gz
Algorithm Hash digest
SHA256 bc8d7192ff783819312604b42492bf7a2703636270602dfd66ee8243a3684ef4
MD5 ad78ea454420f35478c1fde928bb7f7f
BLAKE2b-256 25f2b0eceebbad02e3779503b81c53ac4bcead5ab314b588054b4bb1fd32077a

See more details on using hashes here.

File details

Details for the file ssdc_sedbuilder-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ssdc_sedbuilder-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b441f4b7ddc7bcaaa41553f9a782ad09c754c3159a4bb2b2ffe6c71943c72fdc
MD5 0697115b7633846540c461b946c28cb6
BLAKE2b-256 0d2fb35144bc3803edb466e854ae384ab7ab4a7220d23a237f99606384f6bc2c

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