{"action":"created","issue":{"url":"https://api.github.com/repos/sgrid/pysgrid/issues/85","repository_url":"https://api.github.com/repos/sgrid/pysgrid","labels_url":"https://api.github.com/repos/sgrid/pysgrid/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/sgrid/pysgrid/issues/85/comments","events_url":"https://api.github.com/repos/sgrid/pysgrid/issues/85/events","html_url":"https://github.com/sgrid/pysgrid/pull/85","id":136529769,"number":85,"title":"Interpolation update","user":{"login":"jay-hennen","id":14843789,"avatar_url":"https://avatars.githubusercontent.com/u/14843789?v=3","gravatar_id":"","url":"https://api.github.com/users/jay-hennen","html_url":"https://github.com/jay-hennen","followers_url":"https://api.github.com/users/jay-hennen/followers","following_url":"https://api.github.com/users/jay-hennen/following{/other_user}","gists_url":"https://api.github.com/users/jay-hennen/gists{/gist_id}","starred_url":"https://api.github.com/users/jay-hennen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jay-hennen/subscriptions","organizations_url":"https://api.github.com/users/jay-hennen/orgs","repos_url":"https://api.github.com/users/jay-hennen/repos","events_url":"https://api.github.com/users/jay-hennen/events{/privacy}","received_events_url":"https://api.github.com/users/jay-hennen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sgrid/pysgrid/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"ocefpaf","id":950575,"avatar_url":"https://avatars.githubusercontent.com/u/950575?v=3","gravatar_id":"","url":"https://api.github.com/users/ocefpaf","html_url":"https://github.com/ocefpaf","followers_url":"https://api.github.com/users/ocefpaf/followers","following_url":"https://api.github.com/users/ocefpaf/following{/other_user}","gists_url":"https://api.github.com/users/ocefpaf/gists{/gist_id}","starred_url":"https://api.github.com/users/ocefpaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocefpaf/subscriptions","organizations_url":"https://api.github.com/users/ocefpaf/orgs","repos_url":"https://api.github.com/users/ocefpaf/repos","events_url":"https://api.github.com/users/ocefpaf/events{/privacy}","received_events_url":"https://api.github.com/users/ocefpaf/received_events","type":"User","site_admin":false},"milestone":null,"comments":30,"created_at":"2016-02-25T22:22:27Z","updated_at":"2016-03-11T16:04:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sgrid/pysgrid/pulls/85","html_url":"https://github.com/sgrid/pysgrid/pull/85","diff_url":"https://github.com/sgrid/pysgrid/pull/85.diff","patch_url":"https://github.com/sgrid/pysgrid/pull/85.patch"},"body":"Most of PR #78 can still describe this. However, there are a few important additions:\r\n\r\n1. Automatic slicing: When doing interpolation, only the data within the bounding box of the points will be requested, unless otherwise specified. This minimum request slicing applies to all variables and grid variables. Now, the ONLY information that needs to be 100% loaded before these interpolation routines can be run are the 'node' coordinates (for the cell tree)\r\n\r\n2. Highly flexible functions. Interpolation can be as simple as this: \r\n` sgrid.interpolate_var_to_points(points, sgrid.u, slices=[time_idx, v_idx])`\r\nThe variable in this case is lazy-loaded and sliced appropriately. There are a variety of other possible uses:  \r\n`sgrid.interpolate_var_to_points(points, sgrid.u[time_idx, v_idx])`\r\nThis pre-loads the whole variable slice  \r\n`sgrid.interpolate_var_to_points(points, nc.variables['u'], slices=[time_idx, depth_idx])`\r\nYou can use a raw variable or array-like of any kind, as long as it can be sliced, and has a shape that can fit on one of the grids.  \r\n`sgrid.interpolate_var_to_points(points, sgrid.u, indices=ind, alphas=alphas, slices=[time_idx, depth_idx])`\r\nConsiderable performance gains can be had by passing in pre-computed information, such as indices, alphas, or even translated indices (advanced). To see an example of this, you can see the interpolation function in demos/matlabanim.py.\r\n\r\nMuch of the code has stablilized. There are still improvements to be made, but no planned API or algorithm changes/additions."},"comment":{"url":"https://api.github.com/repos/sgrid/pysgrid/issues/comments/195429152","html_url":"https://github.com/sgrid/pysgrid/pull/85#issuecomment-195429152","issue_url":"https://api.github.com/repos/sgrid/pysgrid/issues/85","id":195429152,"user":{"login":"ocefpaf","id":950575,"avatar_url":"https://avatars.githubusercontent.com/u/950575?v=3","gravatar_id":"","url":"https://api.github.com/users/ocefpaf","html_url":"https://github.com/ocefpaf","followers_url":"https://api.github.com/users/ocefpaf/followers","following_url":"https://api.github.com/users/ocefpaf/following{/other_user}","gists_url":"https://api.github.com/users/ocefpaf/gists{/gist_id}","starred_url":"https://api.github.com/users/ocefpaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocefpaf/subscriptions","organizations_url":"https://api.github.com/users/ocefpaf/orgs","repos_url":"https://api.github.com/users/ocefpaf/repos","events_url":"https://api.github.com/users/ocefpaf/events{/privacy}","received_events_url":"https://api.github.com/users/ocefpaf/received_events","type":"User","site_admin":false},"created_at":"2016-03-11T16:04:14Z","updated_at":"2016-03-11T16:04:14Z","body":"As soon as you fix Travis-CI (and modify the tests as recommend) we can start the next round. I am not keen to merge a failing PR due to our low number of developers."}}