spectral_data_input¶
-
skypy.utils.spectral_data_input(**parameters)[source] [edit on github]¶ Decorator to load spectral data automatically and validate units.
Keyword arguments are pairs of parameters and their required
fluxunits.Examples
>>> from astropy import units >>> from skypy.utils import spectral_data_input
This function combines two bandpasses (i.e. dimensionless
fluxunits): >>> @spectral_data_input(bp1=units.dimensionless_unscaled, bp2=units.dimensionless_unscaled) … def combine_bandpasses(bp1, bp2): … return bp1*bp2