Read emissivity from file
This commit is contained in:
parent
24de24aa6a
commit
fb0ecafd40
@ -13,8 +13,8 @@ class AHotOpticalComponent(AOpticalComponent):
|
|||||||
"""
|
"""
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
@u.quantity_input(wl_bins='length', temp=[u.Kelvin, u.Celsius], obstruction_temp=[u.Kelvin, u.Celsius])
|
@u.quantity_input(wl_bins='length', temp=[u.Kelvin, u.Celsius], obstruction_temp=[u.Kelvin, u.Celsius])
|
||||||
def __init__(self, parent: ITransmissive, emissivity: SpectralQty, temp: u.Quantity, obstruction: float = 0,
|
def __init__(self, parent: ITransmissive, emissivity: Union[SpectralQty, int, float, str], temp: u.Quantity,
|
||||||
obstructor_temp: u.Quantity = 0 * u.K, obstructor_emissivity: float = 1):
|
obstruction: float = 0, obstructor_temp: u.Quantity = 0 * u.K, obstructor_emissivity: float = 1):
|
||||||
"""
|
"""
|
||||||
Initialize a new optical component with thermal emission
|
Initialize a new optical component with thermal emission
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ class AHotOpticalComponent(AOpticalComponent):
|
|||||||
----------
|
----------
|
||||||
parent : ITransmissive
|
parent : ITransmissive
|
||||||
The parent element of the optical component from which the electromagnetic radiation is received.
|
The parent element of the optical component from which the electromagnetic radiation is received.
|
||||||
emissivity : SpectralQty
|
emissivity : Union[SpectralQty, int, float, str]
|
||||||
The spectral emissivity coefficient for the optical surface.
|
The spectral emissivity coefficient for the optical surface.
|
||||||
temp: Quantity in Kelvin / Celsius
|
temp: Quantity in Kelvin / Celsius
|
||||||
Temperature of the optical component
|
Temperature of the optical component
|
||||||
@ -44,6 +44,10 @@ class AHotOpticalComponent(AOpticalComponent):
|
|||||||
if isinstance(emissivity, SpectralQty):
|
if isinstance(emissivity, SpectralQty):
|
||||||
bb = self._gb_factory(temp)
|
bb = self._gb_factory(temp)
|
||||||
self._noise = SpectralQty(emissivity.wl, bb(emissivity.wl)) * emissivity
|
self._noise = SpectralQty(emissivity.wl, bb(emissivity.wl)) * emissivity
|
||||||
|
elif isinstance(emissivity, str):
|
||||||
|
em = SpectralQty.fromFile(emissivity, u.nm, u.dimensionless_unscaled)
|
||||||
|
bb = self._gb_factory(temp)
|
||||||
|
self._noise = SpectralQty(emissivity.wl, bb(emissivity.wl)) * em
|
||||||
else:
|
else:
|
||||||
bb = self._gb_factory(temp, emissivity)
|
bb = self._gb_factory(temp, emissivity)
|
||||||
self._noise = bb
|
self._noise = bb
|
||||||
|
Loading…
x
Reference in New Issue
Block a user