est.io package

est.io.io module

class est.io.io.InputType(value)

Bases: silx.utils.enum.Enum

An enumeration.

csv_spectrum = '*.csv'
dat_spectrum = '*.dat'
hdf5_spectra = '*.h5'
xmu_spectrum = '*.xmu'
est.io.io.get_column_name(dat_file)
est.io.io.get_xasproc(h5_file, entry)

Return the list of all NXxasproc existing at the data_path level

Parameters
  • h5_file (str) – hdf5 file

  • entry (str) – data location

Returns

Return type

list

est.io.io.load_data(data_url, name, dimensions, columns_names=None, energy_unit=<Unit('electron_volt')>)

Load a specific data from an url. Manage the different scheme (silx, fabio, numpy, PyMca, xraylarch)

Parameters
  • data_url – silx DataUrl with path to the data

  • name (str) – name of the data we want to load. Should be in (‘spectra’, ‘energy’, ‘configuration’)

  • columns_names (Union[None,dict]) –

    name of the column to pick for .dat files… Expect key ‘mu’ and

    ’energy’ to be registered

Type

DataUrl

Returns

data loaded

Return type

Union[None,dict,numpy.ndarray]

est.io.io.move_axis_to_standard(spectra, dimensions)
est.io.io.read_xas(information)

Read the given spectra, configuration… from the provided input Information

Parameters

informationUnion (InputInformation) –

Returns

spectra, energy, configuration

est.io.io.write_spectrum_saving_pt(h5_file, entry, obj, overwrite=True)

Save the current status of an est object

Parameters
  • h5_file (str) – path to the hdf5 file

  • entry (str) – entry name

  • obj – object to save.

  • obj_name (str) – name of the object to store

  • data_path (str) –

est.io.io.write_xas(h5_file, entry, energy, mu, sample=None, start_time=None, data_path='/', title=None, definition=None, overwrite=True)

Write raw date in nexus format

Parameters
  • h5_file (str) – path to the hdf5 file

  • entry (str) – entry name

  • sample – definition of the sample

  • energy – beam energy (1D)

  • mu – beam absorption (2D)

  • start_time

  • data_path (str) –

  • title (str) – experiment title

  • definition (str) – experiment definition

Type

Sample

Type

numpy.ndarray

Type

numpy.ndarray

est.io.io.write_xas_proc(h5_file, entry, process, results, processing_order, plots, data_path='/', overwrite=True)

Write a xas Process into .h5

Parameters
  • h5_file (str) – path to the hdf5 file

  • entry (str) – entry name

  • process – process executed

  • results – process result data

  • processing_order – processing order of treatment

  • data_path – path to store the data

Type

Process

Type

numpy.ndarray

Type

int

Type

str

Module contents