hyperspy.misc.eels.eelsdb module

This module provides tools to interact with The EELS Database.

hyperspy.misc.eels.eelsdb.eelsdb(spectrum_type=None, title=None, author=None, element=None, formula=None, edge=None, min_energy=None, max_energy=None, resolution=None, min_energy_compare='gt', max_energy_compare='lt', resolution_compare='lt', max_n=-1, monochromated=None, order=None, order_direction='ASC', verify_certificate=True)

Download spectra from the EELS Data Base.

Parameters
  • spectrum_type ({'coreloss', 'lowloss', 'zeroloss', 'xrayabs'}, optional) –

  • title (string) – Search spectra titles for a text string.

  • author (string, optional) – Search authors for a text string.

  • element (string or list of strings, optional) – Filter for the presence of one or more element. Each string must correspond with a valid element symbol.

  • formula (string) – Chemical formula of the sample.

  • edge ({'K', 'L1', 'L2,3', 'M2,3', 'M4,5', 'N2,3', 'N4,5' 'O2,3', 'O4,5'}, optional) – Filter for spectra with a specific class of edge.

  • max_energy (min_energy,) – Minimum and maximum energy in eV.

  • resolution (float, optional) – Energy resolution in eV.

  • resolution_compare ({"lt", "eq", "gt"}, optional, default "lt") – “lt” to search for all spectra with resolution less than resolution. “eq” for equal, “gt” for greater than.

  • max_energy_compare (min_energy_compare,) – “lt” to search for all spectra with min/max energy less than min_energy`max_energy`. “eq” for equal, “gt” for greater than. Deafault values are “gt”/”lt” for min_energy`max_energy` respectively.

  • monochromated (bool or None (default)) –

  • max_n (int, default -1) – Maximum number of spectra to return. -1 to return all.

  • order (string) – Key to sort results by. Valid keys are: * “spectrumType”, * “spectrumMin”, * “spectrumMax”, * “stepSize”, * “spectrumFormula”, * “spectrumElement”, * “spectrumUpload”, * “source_purity”, * “spectrumEdges”, * “microscope”, * “guntype”, * “beamenergy”, * “resolution”, * “monochromated”, * “acquisition_mode”, * “convergence”, * “collection”, * “probesize”, * “beamcurrent”, * “integratetime”, * “readouts”, * “detector”, * “darkcurrent”, * “gainvariation”, * “calibration”, * “zeroloss_deconv”, * “thickness”, * “deconv_fourier_log”, * “deconv_fourier_ratio”, * “deconv_stephens_deconvolution”, * “deconv_richardson_lucy”, * “deconv_maximum_entropy”, * “deconv_other”, * “assoc_spectra”, * “ref_freetext”, * “ref_doi”, * “ref_url”, * “ref_authors”, * “ref_journal”, * “ref_volume”, * “ref_issue”, * “ref_page”, * “ref_year”, * “ref_title”, * “otherURLs”

  • order_direction ({"ASC", "DESC"}) – Sorting order direction.

  • verify_certificate (bool) – If True, verify the eelsdb website certificate and raise an error if it is invalid. If False, continue querying the database if the certificate is invalid. (This is a potential security risk.)

Returns

spectra – A list containing all the spectra matching the given criteria if any.

Return type

list