data_loader

specutils.io.registers.data_loader(label, identifier=None, dtype=<class 'specutils.spectra.spectrum1d.Spectrum1D'>, extensions=None, priority=0)[source]

Wraps a function that can be added to an registry for custom file reading.

Parameters
labelstr

The label given to the function inside the registry.

identifierfunc

The identified function used to verify that a file is to use a particular file.

dtypeclass

A class reference for which the data loader should be store.

extensionslist

A list of file extensions this loader supports loading from. In the case that no identifier function is defined, but a list of file extensions is, a simple identifier function will be created to check for consistency with the extensions.

priorityint

Set the priority of the loader. Currently influences the sorting of the returned loaders for a dtype.