interpolate_spectral_element

stsynphot.spectrum.interpolate_spectral_element(parfilename, interpval, ext=1)[source]

Interpolate (or extrapolate) throughput spectra in given parameterized FITS table to given parameter value.

FITS table is parsed with stsynphot.stio.read_interp_spec(). Parameterized values must be in ascending order in the table columns.

If extrapolation is needed but not allowed, default throughput from THROUGHPUT column will be used.

Parameters:
parfilenamestr

Parameterized filename contains a suffix followed by a column name specificationin between square brackets. For example, path/acs_fr656n_006_syn.fits[fr656n#].

interpvalfloat

Desired parameter value.

extint, optional

FITS extension index of the data table.

Returns:
spsynphot.spectrum.SpectralElement

Empirical bandpass at interpval.

Raises:
synphot.exceptions.ExtrapolationNotAllowed

Extrapolation is not allowed by data table.

synphot.exceptions.SynphotError

No columns available for interpolation or extrapolation.