aodn / compliance-checker

Python tool to check your datasets vs compliance standards. Forked to include AODN specific modifications.
Apache License 2.0
1 stars 0 forks source link

IMOS check_geospatial_x_min_max too precise #76

Closed mhidas closed 9 years ago

mhidas commented 9 years ago

These methods use strict equality to compare the min/max of the data with the global attributes, so we get results like this:

globalattr                             :3:    57/61 :  
    geospatial_lat_max                 :3:     1/ 2 :  
        check_maximum_value            :3:     0/ 1 : Maximum value of LATITUDE
                                                      (-42.599998) does not
                                                      match attributes
                                                      (-42.600000)

Need to re-write the comparison to use the np.isclose function, which allows a bit of leeway.

ggalibert commented 9 years ago

Could you please provide a dataset example?

ggalibert commented 9 years ago

I suggest I modify the check_value function in imos/util.py so that it uses numpy.isclose.

ggalibert commented 9 years ago

See PR https://github.com/aodn/compliance-checker/pull/82

mhidas commented 9 years ago

@ggalibert Looks good. All it needs is a unittest to check for this issue.

ggalibert commented 9 years ago

PR updated.

mhidas commented 9 years ago

Fixed in #82