From 36f8488253fb24757ef3c7e3d231fbaa4103f887 Mon Sep 17 00:00:00 2001 From: "Timothy P. Ellsworth Bowers" Date: Mon, 31 Jul 2023 09:57:26 -0700 Subject: [PATCH] Option name change PR comment; change option to `autogenerate_spectrumlist`. --- specutils/io/registers.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specutils/io/registers.py b/specutils/io/registers.py index 28e89d163..b8faf3c13 100644 --- a/specutils/io/registers.py +++ b/specutils/io/registers.py @@ -26,7 +26,7 @@ def _astropy_has_priorities(): def data_loader(label, identifier=None, dtype=Spectrum1D, extensions=None, - priority=0, force=False, opt_in_spectrumlist=True, verbose=False): + priority=0, force=False, autogenerate_spectrumlist=True, verbose=False): """ Wraps a function that can be added to an `~astropy.io.registry` for custom file reading. @@ -51,9 +51,9 @@ def data_loader(label, identifier=None, dtype=Spectrum1D, extensions=None, force : bool, optional Whether to override any existing function if already present. Default is ``False``. Passed down to astropy registry. - opt_in_spectrumlist : bool, optional - Whether to register a SpectrumList reader for any data_loader that - reads Spectrum1D objects. Default is ``True``. + autogenerate_spectrumlist : bool, optional + Whether to automatically register a SpectrumList reader for any + data_loader that reads Spectrum1D objects. Default is ``True``. verbose : bool Print extra info. @@ -110,7 +110,7 @@ def decorator(func): # Optionally register a SpectrumList reader for any data_loader that # reads Spectrum1D objects. - if dtype is Spectrum1D and opt_in_spectrumlist: + if dtype is Spectrum1D and autogenerate_spectrumlist: def load_spectrum_list(*args, **kwargs): return SpectrumList([ func(*args, **kwargs) ])