data_loader¶
- specutils.io.registers.data_loader(label, identifier=None, dtype=<class 'specutils.spectra.spectrum1d.Spectrum1D'>, extensions=None, priority=0, force=False, autogenerate_spectrumlist=True, verbose=False)[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.
- forcebool, optional
Whether to override any existing function if already present. Default is
False
. Passed down to astropy registry.- autogenerate_spectrumlistbool, optional
Whether to automatically register a SpectrumList reader for any data_loader that reads Spectrum1D objects. Default is
True
.- verbosebool
Print extra info.