Decode IASI Satellite Spectrum – convert IDL to python
Question:
Answers:
It’s IDL and the python equivalent is the following:
SpectDecoded = np.empty_like(Spect, dtype=float)
for numScale in range(1, int(IDefScaleSondNbScale) + 1):
SF = IDefScaleSondScaleFactor[numScale - 1]
for chanNb in range(int(IDefScaleSondNsfirst[numScale - 1]), int(IDefScaleSondNslast[numScale - 1]) + 1):
w = int(chanNb - IDefNsfirst[0])
if w < SpectDecoded.shape[0]:
SpectDecoded[w] = Spect[w] * 10 ** (-SF)
It’s IDL and the python equivalent is the following:
SpectDecoded = np.empty_like(Spect, dtype=float)
for numScale in range(1, int(IDefScaleSondNbScale) + 1):
SF = IDefScaleSondScaleFactor[numScale - 1]
for chanNb in range(int(IDefScaleSondNsfirst[numScale - 1]), int(IDefScaleSondNslast[numScale - 1]) + 1):
w = int(chanNb - IDefNsfirst[0])
if w < SpectDecoded.shape[0]:
SpectDecoded[w] = Spect[w] * 10 ** (-SF)