NRLMMD-GEOIPS / geoips

Main Geolocated Information Processing System code base with basic functionality enabled.
https://nrlmmd-geoips.github.io/geoips/
Other
15 stars 11 forks source link

Improve docstrings for coverage_checker plugins #441

Open jsolbrig opened 8 months ago

jsolbrig commented 8 months ago

Requested Update

Description

I was very confused about a coverage issue today because the docstrings in the coverage_checker plugins are sorely lacking. It is not apparent, from either the module-level or the call function-level docstrings what the coverage_checkers actually do and how they differ from one another.

For example, the center_radius checker just has:

Neither of these say what the checker actually does.

Background and Motivation

Alternative Solutions

Environment

Code to demonstrate issue

Checklist for Completion

evrose54 commented 5 months ago

This is probably an issue that is better suited for @mindyls. Looking at the coverage checkers right now, and they seem to do similar things, though I'm not sure of the nuances between one and another. For center_radius coverage checker, we are given some 2D array of geospatial data, center coordinates, and a radius in KM. Given those parameters, we create a dumby_arr, which essentially is a masked array, where any value equal to 1 would be inside the circle based on the radius value and the center points. We then run an np.where call, combining points within the circle and non-masked data found within temp_arr, count the pixels which are in the circle and exist, and divide that by the total number of pixels within the circle. We then multiply this value by 100, which gives us the percentage of coverage based on the provided parameters. This is similar for all coverage checkers.