Try to convert emissivity to float
This commit is contained in:
parent
4bd8df8f86
commit
9b31b5d26e
@ -45,6 +45,11 @@ class AHotOpticalComponent(AOpticalComponent):
|
||||
bb = self.__gb_factory(temp)
|
||||
self.__noise = SpectralQty(emissivity.wl, bb(emissivity.wl)) * emissivity
|
||||
elif isinstance(emissivity, str):
|
||||
try:
|
||||
em = float(emissivity)
|
||||
bb = self.__gb_factory(temp, em)
|
||||
self.__noise = bb
|
||||
except ValueError:
|
||||
em = SpectralQty.fromFile(emissivity, u.nm, u.dimensionless_unscaled)
|
||||
bb = self.__gb_factory(temp)
|
||||
self.__noise = SpectralQty(em.wl, bb(em.wl)) * em
|
||||
|
Loading…
Reference in New Issue
Block a user