zerocheck

Utility function to determine if a particular band in a file is all zeros. This is useful for Landsat8 since although the file and metadata exist for thermal, it may be all zeroes and hence unusable form cloud masking.

fmask.zerocheck.isBandAllZeroes(filename, band=0)[source]

Checks the specified band within a file to see if it is all zeroes. band should be 0 based.

Returns True if all zeroes, False otherwise.

This function firstly checks the stats if present and uses this and assumes that they are correct.

If they are not present, then the band is read and the values determined.

fmask.zerocheck.riosAllZeroes(info, inputs, outputs, otherArgs)[source]

Called from RIOS. Does the actual work.