-
Notifications
You must be signed in to change notification settings - Fork 13
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
Saving a ninjotiff file fails with AttributeError: 'XRImage' object has no attribute 'channels' #11
Comments
Running from the latest git master, the same test scripts fails with I don't know if this is the same issue or a different issue. It does appear to run slightly longer.
|
@gerritholl I'm guessing this is bad documentation, but what if you pass |
Then I get '''ls.save_datasets(writer="ninjotiff", filename="/tmp/testn.tif", sat_id=42, chan_id=0, data_source="unknown", data_cat="PORN")''' which gives me the traceback
Which leads me to believe this issue may well be one of documentation, as all I tried to get PyTroll to write |
The script works if I replace the last line by:
So ninjotiff does work, but I was calling it wrongly; it required certain keyword arguments, and apparently works with |
Given the keyword arguments needed that are per-dataset I don't think it would be possible to support save_datasets easily. We'll have to make sure it raises an exception. |
Ok, so we could fix the sat ID and probably the chan ID from the satpy metadata. Question is if we do it in the satpy writer, or in this package. @djhoese ? |
I could see it being in either. Correct me if I'm wrong, but I think some organizations have different ID numbers (@goodsonr?), so having one "truth" may not work. We could have defaults that work for most people though. I personally feel like the string -> ID number conversion could/should go here in pyninjotiff. If there needs to be another package (in the future?) to convert from "any name" -> "standard satellite name" -> "satellite ninjo ID" then we could do that too. |
correct in that not all organizations use the same IDs. IDs for satellites/channels are contained in ninjo config files SatNames.properties and SatChannels.properties. When I was fooling around with making ninjo-tiffs I just had my own translation table to read-up the NinJo ID given the SatPy channel or product name (for non-wavelength products such as RGB or Level 2) |
Alright, so I think we will leave the automatic sat and chan ID out for now. Regarding the |
Describe the bug
When calling the
satpy
Scene.save_datasets
usingwriter="ninjotiff"
, an uncaught exception is raised:AttributeError: 'XRImage' object has no attribute 'channels'
To Reproduce
Expected behavior
I expect that output is written and no exception is raised. I would probably also like to not see any warning messages but I don't know if those are related to the problem causing the exception.
Actual results
Environment Info:
The text was updated successfully, but these errors were encountered: