h5analysis.beamlines.REIXS.SPEC_HDF5

class h5analysis.beamlines.REIXS.SPEC_HDF5

Bases: object

Methods

load(dir_path, header_file)

Loads ASCII data into memory, parsing older files

parse_img(file_path, file_suffix)

Parses image files, written by MCP

parse_mca(file_path, file_suffix)

Parses mca files, written by MCP/SDD/etc.

save_img(filename, img_datasets, img_xscale, ...)

Saves Image type date to HDF5 file

save_mca(filename, mca_datasets, mca_scales, ...)

Saves MCA type date to HDF5 file

write_hdf5([mono, epu, ring, overwrite, name])

Write data in memory to HDF5 file with REIXS structure

load(dir_path, header_file)

Loads ASCII data into memory, parsing older files

Parameters:
  • dir_Path (string) – relative or absolute path to ASCII files

  • header_file (string) – filename of base ASCII file

parse_img(file_path, file_suffix)

Parses image files, written by MCP

Parameters:
  • file_path (string) – relative or absolute path to ASCII files

  • file_suffix (string) – suffix for the ancillary file

parse_mca(file_path, file_suffix)

Parses mca files, written by MCP/SDD/etc.

Parameters:
  • file_path (string) – relative or absolute path to ASCII files

  • file_suffix (string) – suffix for the ancillary file

save_img(filename, img_datasets, img_xscale, img_yscale, img_xmotor, img_ymotor, img_scanNumbers, data_group, data_name)

Saves Image type date to HDF5 file

Parameters:
  • filename (string) – relative or absolute path to ASCII files

  • img_datasets (string list) – list of data read from ASCII file as strings

  • img_xscale (string list) – list of x-scales read from ASCII file

  • img_yscale (string list) – list of y-scales read from ASCII file

  • img_xmotor (string list) – list of motors used to scan x-scale read from ASCII file

  • img_ymotor (string list) – list of motors used to scan y-scale read from ASCII file

  • img_scanNumbers (string list) – list of scan numbers corresponding to img_datasets

  • data_group (string) – location within HDF5 file to write data

  • data_name (string) – name of dataset to be assigned within HDF5 file

save_mca(filename, mca_datasets, mca_scales, mca_scanNumbers, data_group, data_name, scale_name)

Saves MCA type date to HDF5 file

Parameters:
  • filename (string) – relative or absolute path to ASCII files

  • mca_datasets (string list) – list of data read from ASCII file as strings

  • mca_scales (string list) – scales read from ASCII file corresponding to datasets

  • mca_scanNumbers (string list) – list of scan numbers corresponding to mca_datasets

  • data_group (string) – location within HDF5 file to write data

  • data_name (string) – name of dataset to be assigned within HDF5 file

  • scale_name (string) – name of scale dataset corresponding to main dataset

write_hdf5(mono=[], epu=[], ring=[], overwrite=False, name=None)

Write data in memory to HDF5 file with REIXS structure

Parameters:

**kwargs

mono: string list

specifies which motors/counters should be in the mono group

epu: string list

specifies which motors/counters should be in the epu group

ring: string list

specifies which motors/counters should be in the ring group

overwrite: boolean

specifies True to overwrite existing files, typically False

name: string

specify and alternative filename to write the data