diff --git a/dist/PyGeoC-0.1-py2-none-any.whl b/dist/PyGeoC-0.1.0-py2-none-any.whl similarity index 58% rename from dist/PyGeoC-0.1-py2-none-any.whl rename to dist/PyGeoC-0.1.0-py2-none-any.whl index 3eb225f..e4911b0 100644 Binary files a/dist/PyGeoC-0.1-py2-none-any.whl and b/dist/PyGeoC-0.1.0-py2-none-any.whl differ diff --git a/dist/PyGeoC-0.1.0.tar.gz b/dist/PyGeoC-0.1.0.tar.gz new file mode 100644 index 0000000..7eb2c4b Binary files /dev/null and b/dist/PyGeoC-0.1.0.tar.gz differ diff --git a/dist/PyGeoC-0.1.tar.gz b/dist/PyGeoC-0.1.tar.gz deleted file mode 100644 index ae15eca..0000000 Binary files a/dist/PyGeoC-0.1.tar.gz and /dev/null differ diff --git a/setup.py b/setup.py index a05bae6..53b45b8 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ def run_tests(self): # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # https://packaging.python.org/en/latest/single_source_version.html - version='0.1', + version='0.1.0', description='Python for GeoComputation', long_description=long_description, diff --git a/test/StatisticsByMask.py b/test/StatisticsByMask.py index dbc459f..d9294ce 100644 --- a/test/StatisticsByMask.py +++ b/test/StatisticsByMask.py @@ -18,22 +18,22 @@ def StatisticsByMask(simf, obsf, maskf): E2 = 0. for row in range(rows): for col in range(cols): - if not FloatEqual(maskdata[row][col], nodata): - tmpx, tmpy = maskr.GetCentralCoors(row, col) + if not maskdata[row][col] == nodata: + tmpx, tmpy = maskr.GetCentralCoors(row + 1, col + 1) simV = simr.GetValueByXY(tmpx, tmpy) obsV = obsr.GetValueByXY(tmpx, tmpy) if simV is not None and obsV is not None and \ - not FloatEqual(simV, simNodata) and not FloatEqual(obsV, obsNodata): + not simV == simNodata and not obsV == obsNodata: n += 1 E += (simV - obsV) E2 += (simV - obsV) * (simV - obsV) - # print n, E, E2 + print n, E, E2 ME = E / n RMSE = math.sqrt(E2 / n) return ME, RMSE if __name__ == "__main__": - MaskRasterFile = r'C:\z_data_m\ArtificialDEM\MASK.tif' - SimulateRasterFile = r'C:\z_data_m\ArtificialDEM\SaddleSCA.asc' - TheoryRasterFile = r'C:\z_data_m\ArtificialDEM\SCATh.tif' + MaskRasterFile = r'C:\Users\ZhuLJ\Desktop\ME_RMSE_testdata\region.tif' + SimulateRasterFile = r'C:\Users\ZhuLJ\Desktop\ME_RMSE_testdata\result.tif' + TheoryRasterFile = r'C:\Users\ZhuLJ\Desktop\ME_RMSE_testdata\theoSCA_1m.asc' ME, RMSE = StatisticsByMask(SimulateRasterFile, TheoryRasterFile, MaskRasterFile) print "ME: %f, RMSE: %f" % (ME, RMSE)