Closed santisoler closed 5 years ago
On Ex5-Mapping-Curie-depth-EMAG2.ipynb an error is raised when running the following cell:
grid = pycurious.CurieOptimise(mag_grid, xmin, xmax, ymin, ymax) window_size = 400e3 # centroid spacing of 50 km xc_list, yc_list = grid.create_centroid_list(window_size, spacingX=50e3, spacingY=50e3) print("number of centroids = {}".format(len(xc_list))) beta, zt, dz, C = grid.optimise_routine(window_size, xc_list, yc_list) >>> ValueError: node spacing should be identical (1000.5265929436546, 1000.5885815185403)
Seems that when creating the grid, the nodes are not equally spaced between two axis.
Ah this is an unexpected consequence of #14. Previously, we set a tolerance of 1.0:
abs(dx - dy) > 1.0
but now that we use np.allclose, I've fixed this issue with:
np.allclose
np.allclose(dx, dy, 1.0)
On Ex5-Mapping-Curie-depth-EMAG2.ipynb an error is raised when running the following cell:
Seems that when creating the grid, the nodes are not equally spaced between two axis.