1# expose these publically 2from.stackimportStack 3from.modelSetimportModelSet 4 5# Define some useful spectral sampling suggestions to facilitate building models that are reusable (e.g., between sensors). 6# N.B. using these can help standardise the spectral resolution 7# used for building models, while reducing e.g., typically unnecessary bands 8# in the VNIR range. But, these suggestions should also be disregarded for 9# specific applications (e.g., involving REEs which have tight absorptions in the10# VNIR range so would deserve a higher spectral resolution).1112importnumpyasnp13VNIR=np.arange(450.,1000.,20.)# 20 nm spacing in VNIR14"""15Default spectral sampling for VNIR range (400 - 1000 nm) data. Note16that the ultra-blue has been removed as often this is very noisy under17(blue-poor) artificial light. The spectral resolution is kept constant at1820 nm. This results in 27 bands.19"""2021SWIR=np.hstack([np.arange(1000.,1300.,20.),np.arange(1300.,2500.,10.)])# 7.5 nm spacing in the upper SWIR22"""23Default spectral sampling for the SWIR range (1000-2500 nm). Note that this 24has two different spectral resolutions - 20 nm below 1300 nm (as there are 25rarely significant features in this range) and 10 nm between 1300 and 2500 nm26(a lot of exciting stuff happens in this range!). This results in a total of27134 bands.28"""29SWIR=np.vstack([SWIR[:-1],SWIR[1:]]).T# define start and end303132MWIR=np.arange(3000.,5250.,15.)33"""34Default spectral sampling for the MWIR spectral range (2700 - 5500 nm). Note35that we remove the first part of the MWIR (below 3000 nm) as this tends to be36very noisy. Spectral resolution is kept constant at 15 nm, resulting in 149 bands.37"""3839LWIR=np.arange(7750.,12000.,50.)40"""41Default spectral sampling for the LWIR spectral range (7700 - 13000 nm). Note42that we remove the first and last bands due to noise, limiting the (default) range43to 7750 - 12000 nm. Spectral resolution is constant at 50 nm, resulting in 84 bands.44"""4546# convert to array of (b,[start,end]) form47LWIR=np.vstack([LWIR[:-1],LWIR[1:]]).T48MWIR=np.vstack([MWIR[:-1],MWIR[1:]]).T49VNIR=np.vstack([VNIR[:-1],VNIR[1:]]).T5051# also very handy combination of VNIR and SWIR52VSWIR=np.vstack([VNIR,SWIR])53"""54Concatenated VNIR and SWIR spectral sampling (for VSWIR sensors). This55results in a total of 161 bands.56"""
Default spectral sampling for VNIR range (400 - 1000 nm) data. Note
that the ultra-blue has been removed as often this is very noisy under
(blue-poor) artificial light. The spectral resolution is kept constant at
20 nm. This results in 27 bands.
Default spectral sampling for the SWIR range (1000-2500 nm). Note that this
has two different spectral resolutions - 20 nm below 1300 nm (as there are
rarely significant features in this range) and 10 nm between 1300 and 2500 nm
(a lot of exciting stuff happens in this range!). This results in a total of
134 bands.
Default spectral sampling for the MWIR spectral range (2700 - 5500 nm). Note
that we remove the first part of the MWIR (below 3000 nm) as this tends to be
very noisy. Spectral resolution is kept constant at 15 nm, resulting in 149 bands.
Default spectral sampling for the LWIR spectral range (7700 - 13000 nm). Note
that we remove the first and last bands due to noise, limiting the (default) range
to 7750 - 12000 nm. Spectral resolution is constant at 50 nm, resulting in 84 bands.