Given a multi-spectral image with the following shape:
a = np.random.random([240, 320, 30])
where the tail axis represent values at the following fractional wavelengths:
array([395.13, 408.62, 421.63, 434.71, 435.64, 453.39, 456.88, 471.48,
484.23, 488.89, 497.88, 513.35, 521.38, 528.19, 539.76, 548.39,
557.78, 568.06, 577.64, 590.22, 598.63, 613.13, 618.87, 632.75,
637.5 , 647.47, 655.6 , 672.66, 681.88, 690.1 ])
What is the most efficient, i.e. without iterating on every single wavelength,to regrid the data at integer wavelengths as follows:
array([400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500, 510, 520,
530, 540, 550, 560, 570, 580, 590, 600, 610, 620, 630, 640, 650,
660, 670, 680, 690])
from How to regrid efficiently a multi-spectral image?
No comments:
Post a Comment