EELS Data Base API v1
Read-only JSON API for the spectra in the EELS Data Base. No key is needed. Used by exSpy's exspy.data.eelsdb(). Responses have Access-Control-Allow-Origin: *. Errors return a JSON object with message and documentation_url.
The full description is an OpenAPI file. Base address: https://api.eelsdb.eu.
New scripts should use API v2: typed values with units in the field names, where each acquisition value came from, total counts and paging links. v1 stays as it is for exSpy and older scripts.
From Python
import exspy spectra = exspy.data.eelsdb(spectrum_type="coreloss", element="Fe")
Examples
- All core-loss spectra:
/spectra/?type=coreloss&per_page=-1 - Spectra containing both Fe and O:
/spectra/?element[]=Fe&element[]=O - One spectrum:
/spectra/mlc-nanotube-ylas-tas2/
GET/spectra/
List spectra. Published spectra matching all given filters. /spectra (no trailing slash) works the same. An unknown query parameter returns 400. Without per_page, 50 spectra are returned; there is no total count.
| Parameter | Values | Meaning |
|---|---|---|
type | coreloss, lowloss, zeroloss, xrayabs | Spectrum type. |
phase | solid, liquid, gas | solid, liquid or gas. New: gas-phase spectra are listed only when phase=gas is given, so older queries return what they always did. |
title | string | Words to find in the title or description. Every word must match. |
author | string | Comma-separated parts of contributor names or profile names. Matches any of them. |
element | string | An element symbol. Use element[] more than once to require several elements (all must be present). |
formula | string | Text the chemical formula contains. |
edge | K, L1, L2,3, M2,3, M4,5, N2,3, N4,5, O2,3, O4,5 | An edge name, matched whole: K matches C_K but not K_L2,3. |
min_energy | number | Compare the start of the energy range (eV), rounded to whole eV, with this value. |
min_energy_compare | gt, ge, eq, lt | gt or ge: greater than or equal. eq: equal. Anything else, or missing: less than or equal. |
max_energy | number | Compare the end of the energy range (eV), rounded to whole eV, with this value. |
max_energy_compare | gt, ge, eq, lt | As min_energy_compare. |
resolution | number | Compare the energy resolution (eV), truncated to whole eV, with this value. |
resolution_compare | gt, ge, eq, lt | As min_energy_compare. |
monochromated | 1, 0 | 1: monochromated spectra only. 0: non-monochromated spectra only. Other values: no filter. |
per_page | integer | Spectra per page. -1 returns all. |
page | integer | Page number, from 1. A page past the end returns 404. |
order | string | Sort key: title, author, date, or a field key such as spectrumFormula, spectrumMin, spectrumMax, beamenergy, resolution, spectrumType, microscope. Default: spectrumFormula. |
order_direction | ASC, DESC | Sort direction. |
GET/spectra/{slug}/
One spectrum.
GET/news/
List news posts. The news archive. It no longer changes.
GET/{post_slug}/
One news post.
GET/registered-users/
List contributors. People who contributed published spectra. No personal contact details are included.
GET/author/{user}/
One contributor.