redback.sed.get_correct_output_format_from_spectra

redback.sed.get_correct_output_format_from_spectra(time, time_eval, spectra, lambda_array, **kwargs)[source]

Use SNcosmo to get the bandpass flux or magnitude in AB from spectra at given times.

Parameters:
  • time – times in observer frame in days to evaluate the model on

  • time_eval – times in observer frame where spectra are evaluated. A densely sampled array for accuracy

  • bands – band array - must be same length as time array or a single band

  • spectra – spectra in mJy evaluated at all times and frequencies; shape (len(times), len(frequency_array))

  • lambda_array – wavelenth array in Angstrom in observer frame

  • kwargs – Additional parameters

  • output_format – ‘flux’, ‘magnitude’, ‘sncosmo_source’, ‘flux_density’

Returns:

flux, magnitude or SNcosmo TimeSeries Source depending on output format kwarg