edges_io.io.Spectrum#

class edges_io.io.Spectrum(path, log_level=40, *, check=True, fix=False)[source]#

Class representing an observed spectrum.

Standard initialization takes a filename which will be read directly (as long as it is in one of the supported formats). Initialization via from_load() will attempt to find a file with the default naming scheme of the database.

Supported formats: h5, acq, mat

Examples

>>> spec = Spectrum.from_load("Ambient", ".")
>>> spec.file_format
h5
>>> spectra = spec.read()

Methods

__init__(path[, log_level, check, fix])

Method generated by attrs for class Spectrum.

check_self(path, fix)

from_load(load, direc[, run_num, filetype])

Initialize the object in a simple way.

get_data()

Get a GSData object from the file.

typestr(name)

Generate a string uniquely defining the 'kind of thing' the object is.

Attributes

antsim_pattern

day

file_format

The file format of the data to be read.

hour

List of integer hours (one per file) at which data acquisition was begun.

known_patterns

known_substitutions

load_name

load_pattern

minute

List of integer minutes (one per file) at which data acquisition was begun.

path

pattern

run_num

The run number of the data.

second

List of integer seconds (one per file) at which data acquisition was begun.

supported_formats

write_pattern

year

Year on which data acquisition began.

check

fix