Why does `reflectance` accept multiple source images and `radiance` does not?
- Dominant language
- Python
- Stars
- 39
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
`reflectance` takes a list of sources as input:
https://github.com/mapbox/rio-toa/blob/0a40beb1bd3c05c76c65f2f20951591d831ad5ea/rio_toa/reflectance.py#L131-L137
while `radiance` takes just one and expects that it contains multiple bands:
https://github.com/mapbox/rio-toa/blob/0a40beb1bd3c05c76c65f2f20951591d831ad5ea/rio_toa/radiance.py#L64-L70
Why the difference? It should be easy to get the same behaviour in `radiance` with the principle used in `reflectance`:
https://github.com/mapbox/rio-toa/blob/0a40beb1bd3c05c76c65f2f20951591d831ad5ea/rio_toa/reflectance.py#L93-L96
If there is no real reason for having two different interfaces, I suggest we harmonize them.
Contributor guide
Research direction
Compare the cited input-handling sections in rio_toa/reflectance.py and rio_toa/radiance.py, starting at the referenced lines. Determine whether their different interfaces are required by the calculation, then define and implement a consistent radiance input behavior if not. Done means the interface decision is clear and the relevant behavior is covered by tests, though no test file is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100