All Projects → astrocatalogs → OACAPI

astrocatalogs / OACAPI

Licence: MIT License
Open Astronomy Catalog API

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to OACAPI

Samples
Vue Js samples for Astronomy API
Stars: ✭ 20 (-65.52%)
Mutual labels:  astronomy, astronomy-api
sncosmo
Python library for supernova cosmology
Stars: ✭ 53 (-8.62%)
Mutual labels:  astronomy, supernovae
fritz
Astronomical data platform for the Zwicky Transient Facility.
Stars: ✭ 20 (-65.52%)
Mutual labels:  astronomy, transient-astronomy
astrodash
Deep learning for the automated spectral classification of supernovae
Stars: ✭ 25 (-56.9%)
Mutual labels:  astronomy, supernovae
MOSFiT
Modular Open Source Fitter for Transients
Stars: ✭ 27 (-53.45%)
Mutual labels:  astronomy, supernovae
gamma-astro-data-formats
Data formats for gamma-ray astronomy
Stars: ✭ 24 (-58.62%)
Mutual labels:  astronomy
ldtk
Python toolkit for calculating stellar limb darkening profiles and model-specific coefficients using the stellar atmosphere spectrum library by Husser et al. (2013). Described in Parviainen & Aigrain, MNRAS 453, 3821–3826 (2015).
Stars: ✭ 26 (-55.17%)
Mutual labels:  astronomy
TreeCorr
Code for efficiently computing 2-point and 3-point correlation functions. For documentation, go to
Stars: ✭ 85 (+46.55%)
Mutual labels:  astronomy
ccd-reduction-and-photometry-guide
Read the CCD guide here:
Stars: ✭ 55 (-5.17%)
Mutual labels:  astronomy
astromodels
Spatial and spectral models for astrophysics
Stars: ✭ 21 (-63.79%)
Mutual labels:  astronomy
SIES-Library
A simple catalog app for SIESGST Library using Google Books API
Stars: ✭ 34 (-41.38%)
Mutual labels:  catalog
kaggle-plasticc
Solution to Kaggle's PLAsTiCC Astronomical Classification Competition
Stars: ✭ 50 (-13.79%)
Mutual labels:  astronomy
pysynphot
Synthetic Photometry.
Stars: ✭ 21 (-63.79%)
Mutual labels:  astronomy
Chempy
Start with the Chempy tutorial
Stars: ✭ 21 (-63.79%)
Mutual labels:  astronomy
heyoka
C++ library for ODE integration via Taylor's method and LLVM
Stars: ✭ 151 (+160.34%)
Mutual labels:  astronomy
squest
Service request portal on top of Ansible Tower/AWX
Stars: ✭ 115 (+98.28%)
Mutual labels:  catalog
unity-excavator
Physical simulations on Unity
Stars: ✭ 20 (-65.52%)
Mutual labels:  astronomy
Comet
A complete VOEvent transport system
Stars: ✭ 20 (-65.52%)
Mutual labels:  astronomy
go-sunrise
Go package for calculating the sunrise and sunset times for a given location
Stars: ✭ 42 (-27.59%)
Mutual labels:  astronomy
catalog-manager
Backend Module ohne Programmierkenntnisse erstellen.
Stars: ✭ 28 (-51.72%)
Mutual labels:  catalog

Open Astronomy Catalog API v1.0

Website

API usage over the last 7 days:

Calls Uniques Trending

The Open Astronomy Catalog API (OACAPI) offers a lightweight, simple way to access data available via the Open Astronomy Catalogs (e.g. the Open Supernova, Tidal Disruption, Kilonova, and Fast Stars Catalogs). The API is accessible via a route that works via any of the catalog domains,

https://api.astrocats.space/

https://api.sne.space/

https://api.tde.space/

https://api.kilonova.space/

https://api.faststars.space/

where the only difference is preference in catalog when returning items that appear on multiple catalogs. For the examples below we will (usually) use the api.astrocats.space route. By default, all returned values are provided in JSON format, unless a format= URL variable is provided.

General use

The pattern for the API is one of the domains listed above (e.g. https://api.astrocats.space) followed by

/OBJECT/QUANTITY/ATTRIBUTE?ARGUMENT1=VALUE1&ARGUMENT2=VALUE2&...

where OBJECT is set to a transient's name, QUANTITY is set to a desired quantity to retrieve (e.g. redshift), ATTRIBUTE is a property of that quantity, and the ARGUMENT variables allow to user to filter data based upon various attribute values. The ARGUMENT variables can either be used to guarantee that a certain attribute appears in the returned results (e.g. adding &time&e_magnitude to the query will guarantee that each returned item has a time and e_magnitude attribute), or used to filter via a simple equality such as telescope=HST (which would only return QUANTITY objects where the telescope attribute equals "HST"), or they can be more powerful for certain filter attributes (examples being ra and dec for performing cone searches).

Key names that are usable in API calls can be found in the OAC schema. Below, we provide some example queries that demonstrate the API's capabilities.

Special arguments

There are a few arguments that have special meaning and are only a part of the API, not the schema:

  • closest: Return the quantities with the closest value to the specified attributes. If multiple attributes are specified, the closest to each will be returned (e.g., magnitude=15&time=56789&closest would return both the observation with magnitude closest to 15 and time closest to 56789.
  • complete: Return only quantities containing all of the requested attributes.
  • first: Return only the first of each of the listed quantities.
  • format=x: Return data in the specified format x, currently supports csv and tsv. Any other format specification will return JSON.
  • item=n: Return only the nth item of each of the listed quantities.
  • radius=r: Return objects within a distance r (in arcseconds) of a given set of ra and dec coordinates. Note that this disables exact matches for ra and dec.
  • width=w: Return objects within a distance w (in arcseconds) of a given ra value (for box searches).
  • height=h: Return objects within a distance h (in arcseconds) of a given dec value (for box searches).
  • sortby=s: Sort the returned array by the attribute s (only works when returning results in csv/tsv formats).

Example queries

Return basic information about the API service (and a link back to this README)

https://api.astrocats.space/

Return all objects within a 2" cone about a set of coordinates

https://api.astrocats.space/catalog?ra=21:23:32.16&dec=-53:01:36.08&radius=2

Return all supernova metadata in CSV format

https://api.sne.space/catalog?format=CSV

By default, queries such as the two above will return the catalog entries for objects that satisfy the search conditions. To return data from a specific catalog when searching by a criterion such as position, the user should insert catalog/ into the URL before the rest of the query of the specific catalog they are interested in, as shown in the example below:

Redshifts of all supernovae with a redshift reported within 5° of a coordinate, in CSV format

https://api.sne.space/catalog/redshift?ra=10:42:16.88&dec=-24:13:12.13&radius=18000&format=csv&redshift

If the user instead wishes to return info on all objects across all catalogs, the all/ route should be used instead (any URL can be used with this route):

Redshifts of all objects with a redshift reported within 5° of a coordinate, in CSV format

https://api.astrocats.space/catalog/redshift?ra=10:42:16.88&dec=-24:13:12.13&radius=18000&format=csv&redshift

Individual object queries can return more-detailed information about each object, including datafiles such as spectra. Below, we show some examples of this in action:

Get the available redshift values for an object

https://api.astrocats.space/SN2014J/redshift

Select the first (preferred) value of the redshift

https://api.astrocats.space/SN2014J/redshift?first, or https://api.astrocats.space/SN2014J/redshift?item=0

Return all photometric observations with at least one of the magnitude, e_magnitude, and band attributes

https://api.astrocats.space/SN2014J/photometry/magnitude+e_magnitude+band

Return the above in CSV format

https://api.astrocats.space/SN2014J/photometry/magnitude+e_magnitude+band?format=csv

Only return observations that contain all requested attributes

https://api.astrocats.space/SN2014J/photometry/magnitude+e_magnitude+band?complete

Sort the returned photometry by magnitude

https://api.astrocats.space/SN2014J/photometry/magnitude+e_magnitude+band?format=csv&sortby=magnitude

Return observations for multiple objects at once, in CSV format

https://api.astrocats.space/SN2014J+SN2015F/photometry/time+magnitude+band?format=csv

Return only observations whose attributes include the listed keys (e_magnitude and band)

https://api.astrocats.space/SN2014J/photometry/time+magnitude+e_magnitude+band?e_magnitude&band

Return only observations matching given criteria, in this case band = B

https://api.astrocats.space/SN2014J/photometry/magnitude+e_magnitude+band?band=B

In the following example, we filter upon the value of claimedtype, but note that this filters lumdist as well, since the value filter applies to both:

Luminosity distances and claimed types of all objects with luminosity distance and claimed type equal to Ia (probably not what you intend!)

https://api.astrocats.space/all/lumdist+claimedtype?value=ia

Note that the above returns an empty result. Instead, we want to do:

Luminosity distances and claimed types of all objects with an available luminosity distance and "Ia" listed as a type, in TSV format

https://api.astrocats.space/catalog/lumdist+claimedtype?lumdist&claimedtype=ia&format=tsv

Regular expressions are also supported in the ARGUMENT fields, allowing users to perform more sophisticated matches to attribute values:

Claimed types of all objects with a typing that has a prefix matching "Ia-", in TSV format

https://api.astrocats.space/catalog/claimedtype?claimedtype=Ia-(.*)&format=tsv

Note that many regular expression symbols must be URL-encoded to be passed properly to the API.

Return the spectrum closest to the listed MJD

https://api.astrocats.space/SN2014J/spectra/time+data?time=56703.2&closest

The catalog/ route (combined with filtering) can also return data from the individual object files if data isn't contained within the main OAC catalog files (i.e. the data that is visible on the main pages of the Open Supernova Catalog, etc.). Because these queries are expensive (the full dataset must be loaded for each object), they have some numeric limits to prevent overloading the server.

Return all photometry in a 2" radius about a coordinate, in CSV format

https://api.astrocats.space/catalog/photometry/time+band+magnitude?ra=21:23:32.16&dec=-53:01:36.08&radius=2&format=csv

Return the instruments used to produce spectra within a 5° of a given coordinate, in CSV format

https://api.astrocats.space/catalog/spectra/instrument?ra=21:23:32.16&dec=-53:01:36.08&radius=18000&format=csv

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].