Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REVIEW] Notebook is raising an error #29

Closed
santisoler opened this issue Jul 15, 2019 · 1 comment
Closed

[REVIEW] Notebook is raising an error #29

santisoler opened this issue Jul 15, 2019 · 1 comment

Comments

@santisoler
Copy link
Contributor

santisoler commented Jul 15, 2019

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.

@brmather
Copy link
Owner

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(dx, dy, 1.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants