{"action":"created","issue":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/868","repository_url":"https://api.github.com/repos/MDAnalysis/mdanalysis","labels_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/868/labels{/name}","comments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/868/comments","events_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/868/events","html_url":"https://github.com/MDAnalysis/mdanalysis/pull/868","id":158461676,"number":868,"title":"[WIP] Issue 785 add auxiliary","user":{"login":"fiona-naughton","id":10507372,"avatar_url":"https://avatars.githubusercontent.com/u/10507372?v=3","gravatar_id":"","url":"https://api.github.com/users/fiona-naughton","html_url":"https://github.com/fiona-naughton","followers_url":"https://api.github.com/users/fiona-naughton/followers","following_url":"https://api.github.com/users/fiona-naughton/following{/other_user}","gists_url":"https://api.github.com/users/fiona-naughton/gists{/gist_id}","starred_url":"https://api.github.com/users/fiona-naughton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fiona-naughton/subscriptions","organizations_url":"https://api.github.com/users/fiona-naughton/orgs","repos_url":"https://api.github.com/users/fiona-naughton/repos","events_url":"https://api.github.com/users/fiona-naughton/events{/privacy}","received_events_url":"https://api.github.com/users/fiona-naughton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-03T21:51:25Z","updated_at":"2016-06-06T08:23:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/868","html_url":"https://github.com/MDAnalysis/mdanalysis/pull/868","diff_url":"https://github.com/MDAnalysis/mdanalysis/pull/868.diff","patch_url":"https://github.com/MDAnalysis/mdanalysis/pull/868.patch"},"body":"WIP for #785.\r\n\r\nCurrently, allows adding data from an xvg file to a trajectory by `add_auxiliary(filename, name, **kwargs)`. When reading the next trajectory timestep, the auxiliary timesteps closest to that trajectory timestep are read through, and a 'representative' value calculated from these and stored in the timestep in an aux namespace, as `ts.aux.name`. The 'representative' value can be either an average or the value from the closest timepoint (with an optional cutoff). \r\n\r\nThe `XVGReader` itself also has `go_to_step` and `go_to_ts` methods for jumping to specified auxiliary steps/trajectory timesteps; the latter's used to bring the auxiliary to the same time as the trajectory when it's first added, but I've not hooked it up with the equivalent trajectory method yet. \r\n\r\nThere's a couple things that seem to work but I'm not sure I've gone about the right way (particularly the `go_to` methods; they currently just start reading form the top of the file and wait till the times match up...); apologies if I'm doing anything particularly silly!\r\n\r\n\r\nTODO\r\n- Expand to other filetypes + implement a guess_reader\r\n- Allow to select columns/name individually when reading multi-column data?\r\n- Dealing with 'missing data'?\r\n- Allow to iterate with auxiliary `dt`, rather than trajectory's\r\n- Proper testing!\r\n\r\n\r\nPR Checklist\r\n------------\r\n - [ ] Tests?\r\n - [ ] Docs?\r\n - [ ] CHANGELOG updated?\r\n - [ ] Issue raised/referenced?\r\n"},"comment":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/comments/223896507","html_url":"https://github.com/MDAnalysis/mdanalysis/pull/868#issuecomment-223896507","issue_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/868","id":223896507,"user":{"login":"richardjgowers","id":9249543,"avatar_url":"https://avatars.githubusercontent.com/u/9249543?v=3","gravatar_id":"","url":"https://api.github.com/users/richardjgowers","html_url":"https://github.com/richardjgowers","followers_url":"https://api.github.com/users/richardjgowers/followers","following_url":"https://api.github.com/users/richardjgowers/following{/other_user}","gists_url":"https://api.github.com/users/richardjgowers/gists{/gist_id}","starred_url":"https://api.github.com/users/richardjgowers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardjgowers/subscriptions","organizations_url":"https://api.github.com/users/richardjgowers/orgs","repos_url":"https://api.github.com/users/richardjgowers/repos","events_url":"https://api.github.com/users/richardjgowers/events{/privacy}","received_events_url":"https://api.github.com/users/richardjgowers/received_events","type":"User","site_admin":false},"created_at":"2016-06-06T08:23:34Z","updated_at":"2016-06-06T08:23:34Z","body":"Looks good. With the xvgreader, you can probably get away with reading the entire file at once, then seeking is just finding places in the numpy array that stores it.\r\n\r\nThat said, all that is just an implementation detail, get the tests up and running as they will mostly stay the same as you keep working on this.  These can (and should) be very simple, eg you could have an xvg file with just [1, 2, 3] in it, then check that reading this gives you 1, 2, 3 again."}}
{"actor":{"display_login":"richardjgowers"}}