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

AVHRR instrument naming - allow avhrr-# #127

Closed
adybbroe opened this issue Jan 25, 2021 · 2 comments · Fixed by #136
Closed

AVHRR instrument naming - allow avhrr-# #127

adybbroe opened this issue Jan 25, 2021 · 2 comments · Fixed by #136
Assignees

Comments

@adybbroe
Copy link
Collaborator

adybbroe commented Jan 25, 2021

Code Sample, a minimal, complete, and verifiable piece of code

# Your code here
from pyspectral.rsr_reader import RelativeSpectralResponse
avhrr3 = RelativeSpectralResponse('NOAA-19', 'avhrr-3')

Problem description

The above code sample gives a warning. The accepted naming of the sensor is avhrr/3 and not avhrr-3. The former is how it is displayed on WMO Oscar, hence this is the accepted naming in Pyspectral.

It would be fair though to also accept avhrr-3. This is also what Satpy uses, as / can be problematic to handle in a yaml encoding for instance.

This means Satpy is always raising a warning here. Pyspectral anyhow fixes it so it reads the correct RSR data anyhow, so the warning in Satpy is most disturbing and confusing the user.

Expected Output

Actual Result, Traceback if applicable

Versions of Python, package at hand and relevant dependencies

Python 3.8
Latest Pyspectral release: 0.10.2

Thank you for reporting an issue !

@adybbroe adybbroe self-assigned this Jan 25, 2021
@djhoese
Copy link
Member

djhoese commented Jan 25, 2021

I could see this being handled in two ways: pyspectral adds functionality for sensor "aliases" or satpy converts the sensor name before call pyspectral. I suppose doing the fix in pyspectral makes more sense long term.

@adybbroe
Copy link
Collaborator Author

I could see this being handled in two ways: pyspectral adds functionality for sensor "aliases" or satpy converts the sensor name before call pyspectral. I suppose doing the fix in pyspectral makes more sense long term.

Yes, agree. I think in this case in particular it makes sense I would say, since slashes in names are awkward to handle in code

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

Successfully merging a pull request may close this issue.

2 participants