Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rayleight correction reflectance with Landsat 8 #161

Open
Acturio opened this issue Oct 12, 2022 · 1 comment
Open

Rayleight correction reflectance with Landsat 8 #161

Acturio opened this issue Oct 12, 2022 · 1 comment

Comments

@Acturio
Copy link

Acturio commented Oct 12, 2022

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.

@mraspaud
Copy link
Member

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants