-
Notifications
You must be signed in to change notification settings - Fork 293
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
satpy slstr l1b reading issue #2365
Comments
Hi! Try passing the directory instead of the single scn = Scene(filenames=['/home/*/Desktop/mpc/slstr/S3A_SL_1_RBT____20170602T090746_20170602T091046_20181003T205946_0179_018_207______LR1_R_NT_003.SEN3/'], reader='slstr_l1b') My guess is the format is also using other files from the directory. |
hi, tried but no luck. i tried cheking yaml files too, with/without 'frames'
|
I usually use the
|
this one is for l2, but im using l1b |
sure, just use the correct reader in that call. |
no luck
|
Can you switch debugging on please?
I vaguely recall that the slstr reader needs an additional library, but this only shows up in the debugging info and not in the error message. |
hi, this resulted in
|
@kameshvinjamuri I just tested with this script and it works for me:
So, to go further, we need to answer a few questions:
|
hi, it is running into the same old error,
|
Ok, nothing wrong with dependencies or versions then it seems. Could you share the data you are running on, so I can try locally? |
okay, sure (let me know if the link is no accessible) |
@kameshvinjamuri it seems to work for me. I think you might need to change the files = find_files_and_readers(base_dir="/home/*/Desktop/mpc/slstr/", reader='slstr_l1b') Give that a shot :) |
An alternative is to do: files = glob.glob("/home/*/Desktop/mpc/slstr/S3A_SL_1_RBT____20170602T090746_20170602T091046_20181003T205946_0179_018_207______LR1_R_NT_003.SEN3/*")
scn = Scene(filenames=files, reader="slstr_l1b") |
showing this error now. can I know your python version?
|
python 3.10 |
okay, strange. one question: what exactly you plotted there? like the radiance of any band? |
It's a colored composite. If you want to take a look at the first channel only for example, just do |
yeah, that makes sense. but one more question is the slstr l1b specific, there are many stripes (grid) like a, b, i, etc. we should be specifying those somewhere? |
yes, you can do that, but it's a bit more complicated, eg: from satpy.dataset import DataQuery
dq = DataQuery(name="S4", stripe="b", view="nadir")
scn.load([dq]) As you probably know though, not all stripe modes are available for all channels... So S1 has only stripe "a" for example |
yeah I know regarding slstr, but regarding satpy my doubt is bit amateurish,
|
look at my code in the previous comment, you can specify the stripe in the |
yeah that's in the |
Are these reprocessed files? I can't remember the exact pattern but it looks like it from the filename. |
what I pasted above works for me with you data @kameshvinjamuri |
no, they are Level-1B product geolocated radiometric measurements. @mraspaud okay thanks, i will recheck everything |
@mraspaud everything looks correct what I am doing.
|
For the color composite, the defaults are used, which is nadir view, and the first available stripe (a for visible channels for example) |
hi @mraspaud , it does work when I exclusively create the env for satpy. all is good it seems but geotiff creation, resulting in the foloowong err:
|
Nice that it works at least for reading! |
hi @mraspaud , it came down to this
|
ok, does it mean you got it to work? |
9@mraspaud not exactly. but I see no error, it forms a tif, no geotiff ( I opened in quantum gis ). i see |
Good question! What happens if you save to png instead? |
unfortunately png is also not georeferenced |
Is SLSTR data a swath, or does it have a proper area definition already in the input files? If not, for geotiff you'll need to resample the data before saving to get georeferenced geotiffs. |
Indeed, but I was just trying to eliminate possible errors from satpy. So I just wanted to know if it was working for you with pngs. |
It is swath, no proper area definition. So resampling is needed for a georeferenced geotiff to be produced. |
tried the following,
are these lines common for your logs as well? @mraspaud
|
This is what I run: from satpy import Scene
from satpy.utils import debug_on
import glob
debug_on()
if __name__ == '__main__':
files = glob.glob("/home/a001673/data/satellite/Sentinel-3/current/S3A_SL_1_RBT____20170602T090746_20170602T091046_20181003T205946_0179_018_207______LR1_R_NT_003.SEN3/*")
scn = Scene(filenames=files, reader="slstr_l1b")
channel = "S1"
scn.load([channel])
scn.save_dataset("S1", filename="S1.tif") At the end I get a Here is the complete log output:
|
By the way, from satpy.utils import debug_on
import glob
debug_on()
if __name__ == '__main__':
files = glob.glob("/home/a001673/data/satellite/Sentinel-3/current/S3A_SL_1_RBT____20170602T090746_20170602T091046_20181003T205946_0179_018_207______LR1_R_NT_003.SEN3/*")
scn = Scene(filenames=files, reader="slstr_l1b")
channel = "S1"
scn.load([channel])
nscn = scn.resample('omerc_bb')
nscn.save_dataset(channel, filename=f"{channel}.tif") |
hi, sorry, it's been a while working on this,
|
Hi @kameshvinjamuri The F1 channel can have only the stripe |
yeah makes sense! (y) |
Describe the bug
Hi, i am using satpy to read slstr l1b data....using the following code, and got the error
To Reproduce
# Your code here
Expected behavior
read as xarray
Actual results
Screenshots
If applicable, add screenshots to help explain your problem.
Environment Info:
from satpy.utils import check_satpy; check_satpy()
]Additional context
is this due to the lack of filename_info, and file_type_info options?? What's the best way to deal slstr_l1b into an array or any georeferenced image? any suggestions are highly appreciated
The text was updated successfully, but these errors were encountered: