handle_bandpass
- jwst.ami.utils.handle_bandpass(bandpass, throughput_model)[source]
Determine what to do with the input bandpass.
If user-provided, return in format expected by code. If none, fetch filter throughput and combine with flat spectrum to produce appropriate array.
- Parameters:
- bandpassSynphot spectrum or array, or None
User-defined bandpass to override filter/source. If bandpass is an array, wavelengths must have units of meters.
- throughput_modelThroughputModel
Datamodel containing filter throughput info. Wavelengths are in Angstroms. Will not be used if bandpass is not None.
- Returns:
- bandpassarray
Array of weights, wavelengths used to generate model. Wavelengths are in meters.