SpectrogramFactory#

class radiospectra.spectrogram.SpectrogramFactory(default_widget_type=None, additional_validation_functions=[], registry=None)[source]#

Bases: BasicRegistrationFactory

A factory for generating spectrograms.

Parameters:

*inputsstr or pathlib.Path to the file.

Returns:

radiospectra.spectrogram.Spectrogram – The spectrogram for the give file

Methods Summary

__call__(*args[, silence_errors])

Method for running the factory.

Methods Documentation

__call__(*args, silence_errors=False, **kwargs)[source]#

Method for running the factory.

Takes arbitrary arguments and keyword arguments and passes them to a sequence of pre-registered types to determine which is the correct spectrogram- type to build. Arguments args and kwargs are passed through to the validation function and to the constructor for the final type. For spectrogram types, validation function must take a data-header pair as an argument.

Parameters:

silence_errors (bool, optional) – If set, ignore data-header pairs which cause an exception. Default is False.

Notes

Extra keyword arguments are passed through to sunpy.io.read_file such as memmap for FITS files.