awesome-spectral-indices / spyndex

Awesome Spectral Indices in Python.
https://spyndex.readthedocs.io/
MIT License
186 stars 22 forks source link

Separate bands and constants in `SpectralIndex` objects #24

Open maawoo opened 10 months ago

maawoo commented 10 months ago

Hi @davemlz,

I appreciate the work you have put into Awesome Spectral Indices and this package!

While working on this short guide for my students, I thought that it might be a good idea to separate bands and constants in SpectralIndex objects. Meaning that when someone calls spyndex.indices.EVI.bands, for example, it should not return ['g', 'N', 'R', 'C1', 'C2', 'B', 'L'] but only ['N', 'R', 'B']. The constants could be returned separately with spyndex.indices.EVI.constants.

I think it might otherwise lead to confusion, especially for inexperienced users. In the guide I've mentioned, I tried to clear this up by using list comprehension to separate them.

davemlz commented 4 months ago

This makes a lot of sense!

I will work on this for the future version ;)