Rayleight correction reflectance with Landsat 8
Acturio opened this issue · 1 comments
Could I obtain Correction reflectance by Rayleigh in numpy array for an entire image of Landsat 8? I would like to obtain channels 2,3,4,5. I saw issue #90 where there was an example with Goes, but i need to use Landsat 8 and i didnt found any clear example in the documentation to solve it.
The example in issue #90 said something like this:
from glob import glob
from satpy.scene import Scene
from satpy.dataset import DatasetID
from satpy.utils import debug_on
debug_on()
fl_ = glob("/home/a000680/data/GOES-16/20180114/OR_ABI-L1b-RadF*")
scn = Scene(reader='abi_l1b', filenames=fl_)
scn.load([DatasetID(name='C01', modifiers=('sunz_corrected', 'rayleigh_corrected')),
DatasetID(name='C01', modifiers=('sunz_corrected',))])
new_scn = scn.resample(resampler='native')
dsids = new_scn.keys()
print(dsids)
print(new_scn[dsids[0]][8000:8002, 8000:8002].values)
print(new_scn[dsids[1]][8000:8002, 8000:8002].values)
Any help will be appreciated. Thanks.
Hi @Acturio
So the example you refer to is using satpy to read the data. Unfortunately we don't have any reader for landsat 8 data in satpy for now afaics (PRs are welcome :) ).
So to get just the rayleigh correction array, you can use the first example in this part of the pyspectral documentation https://pyspectral.readthedocs.io/en/latest/rayleigh_correction.html#atmospheric-correction-in-the-visible-spectrum
Tell us if it works for you!