scopesim.optics.surface_utils module¶
- scopesim.optics.surface_utils.is_flux_binned(unit)[source]¶
Checks if the (flux) unit is a binned unit
- Parameters:
- unitUnit
- Returns:
- flagbool
- scopesim.optics.surface_utils.make_emission_from_array(flux, wave, meta)[source]¶
Create an emission SourceSpectrum using array.
Takes care of bins and solid angles. The solid_angle is kept in the returned SourceSpectrum meta dictionary under self.meta[“solid_angle”]
- Parameters:
- fluxarray-like, Quantity
if flux is not an array, the
emission_unit
must be in meta dict- wavearray-like, Quantity
if flux is not an array, the
wavelength_unit
must be in meta dict- metadict
- Returns:
- fluxsynphot.SourceSpectrum
- scopesim.optics.surface_utils.make_emission_from_emissivity(temp, emiss_src_spec)[source]¶
Create an emission SourceSpectrum using a blackbody and an emissivity curve
- Parameters:
- tempfloat, Quantity
[Kelvin] If float, then must be in Kelvin
- emiss_src_specsynphot.SpectralElement
An emissivity response curve in the range [0..1]
- Returns:
- fluxsynphot.SourceSpectrum
- scopesim.optics.surface_utils.normalise_binned_flux(flux, wave)[source]¶
Convert a binned flux Quantity array back into flux density
The flux density normalising unit is taken from the wavelength Quantity unit
- Parameters:
- fluxarray-like Quantity
flux unit must include
bin
, e.g.ph s-1 m-2 bin-1
- wavearray-like Quantity
- Returns:
- fluxarray-like Quantity