- speclite.filters.load_filter(name, load_from_cache=True, verbose=False)¶
Load a single filter response by name.
See Filter Response Curves for details on the filter response file format and the available standard filters.
A filter response is normally only loaded from disk the first time this function is called, and subsequent calls immediately return the same cached object. Use the
verboseoption for details on how a filter is loaded:
>>> rband = load_filter('sdss2010-r') >>> rband = load_filter('sdss2010-r', verbose=True) Returning cached filter response "sdss2010-r"
load_filters()to load a sequence of filters from one or more filter groups.
Name of the filter response to load, which should normally have the format “<group_name>-<band_name>”, and refer to one of the reference filters described here. Otherwise, the name of any file in the ECSV format and containing the required fields can be provided. The existence of the “.ecsv” extension is used to distinguish between these cases and any other extension is considered an error.
Return a previously cached response object if available. Otherwise, always load the file from disk.
Print verbose information about how this filter is loaded.
FilterResponseobject for the requested filter.
File does not exist or custom file has wrong extension.
File is incorrectly formatted. This should never happen for the files included in the source code distribution.