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

Documentation on SunZenithCorrector and EffectiveSolarPathlengthCorrector modifiers contradicts itself #3033

Open
gerritholl opened this issue Jan 16, 2025 · 1 comment

Comments

@gerritholl
Copy link
Member

Describe the bug

In the documentation for the SunZenithCorrector modifier, the class docstring says that beyond the correction_limit, correction is gradually reduced unless max_sza is None, in which case it's constant:

In addition to adjusting the provided reflectances by the cosine of the
solar zenith angle, this modifier forces all reflectances beyond a
solar zenith angle of ``max_sza`` to 0. It also gradually reduces the
amount of correction done between ``correction_limit`` and ``max_sza``. If
``max_sza`` is ``None`` then a constant correction is applied to zenith
angles beyond ``correction_limit``.

In the function initialisation docstring, it says the correction beyond correction_limit is constant:

correction_limit (float): Maximum solar zenith angle to apply the
correction in degrees. Pixels beyond this limit have a
constant correction applied. Default 88.

I think the class docstring is correct and the initialisation docstring is wrong (unless max_sza=None).

The same discrepancy exists for the EffectiveSolarPathlengthCorrector.

Class docstring:

It also gradually reduces the amount of correction done between
``correction_limit`` and ``max_sza``. If ``max_sza`` is ``None`` then a
constant correction is applied to zenith angles beyond
``correction_limit``.

Init docstring:

correction_limit (float): Maximum solar zenith angle to apply the
correction in degrees. Pixels beyond this limit have a
constant correction applied. Default 88.

@djhoese
Copy link
Member

djhoese commented Jan 16, 2025

Maybe the best fix for this is to add to the correction_limit description:

...have a constant correction applied is ``max_sza`` is ``None``, otherwise the correction is gradually reduced to 0 at ``max_sza``.

Or even just See class docstring for more information. since this information is essentially being repeated.

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

No branches or pull requests

2 participants