{"action":"created","issue":{"url":"https://api.github.com/repos/xpdAcq/xpdAn/issues/20","repository_url":"https://api.github.com/repos/xpdAcq/xpdAn","labels_url":"https://api.github.com/repos/xpdAcq/xpdAn/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/xpdAcq/xpdAn/issues/20/comments","events_url":"https://api.github.com/repos/xpdAcq/xpdAn/issues/20/events","html_url":"https://github.com/xpdAcq/xpdAn/issues/20","id":179908685,"number":20,"title":"create Analysis class?","user":{"login":"CJ-Wright","id":6740689,"avatar_url":"https://avatars.githubusercontent.com/u/6740689?v=3","gravatar_id":"","url":"https://api.github.com/users/CJ-Wright","html_url":"https://github.com/CJ-Wright","followers_url":"https://api.github.com/users/CJ-Wright/followers","following_url":"https://api.github.com/users/CJ-Wright/following{/other_user}","gists_url":"https://api.github.com/users/CJ-Wright/gists{/gist_id}","starred_url":"https://api.github.com/users/CJ-Wright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJ-Wright/subscriptions","organizations_url":"https://api.github.com/users/CJ-Wright/orgs","repos_url":"https://api.github.com/users/CJ-Wright/repos","events_url":"https://api.github.com/users/CJ-Wright/events{/privacy}","received_events_url":"https://api.github.com/users/CJ-Wright/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/xpdAcq/xpdAn/milestones/2","html_url":"https://github.com/xpdAcq/xpdAn/milestones/v0.4%20release%20of%20xpdAcquire","labels_url":"https://api.github.com/repos/xpdAcq/xpdAn/milestones/2/labels","id":2036171,"number":2,"title":"v0.4 release of xpdAcquire","description":"Significant new functionality on data reduction and analysis, and increased metadata saving","creator":{"login":"CJ-Wright","id":6740689,"avatar_url":"https://avatars.githubusercontent.com/u/6740689?v=3","gravatar_id":"","url":"https://api.github.com/users/CJ-Wright","html_url":"https://github.com/CJ-Wright","followers_url":"https://api.github.com/users/CJ-Wright/followers","following_url":"https://api.github.com/users/CJ-Wright/following{/other_user}","gists_url":"https://api.github.com/users/CJ-Wright/gists{/gist_id}","starred_url":"https://api.github.com/users/CJ-Wright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJ-Wright/subscriptions","organizations_url":"https://api.github.com/users/CJ-Wright/orgs","repos_url":"https://api.github.com/users/CJ-Wright/repos","events_url":"https://api.github.com/users/CJ-Wright/events{/privacy}","received_events_url":"https://api.github.com/users/CJ-Wright/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2016-09-28T22:35:32Z","updated_at":"2016-09-28T22:35:35Z","due_on":"2016-04-28T00:00:00Z","closed_at":null},"comments":11,"created_at":"2016-09-28T22:35:35Z","updated_at":"2016-09-28T22:35:39Z","closed_at":null,"body":"<a href=\"https://github.com/sbillinge\"><img src=\"https://avatars.githubusercontent.com/u/4254545?v=3\" align=\"left\" width=\"96\" height=\"96\" hspace=\"10\"></img></a> **Issue by [sbillinge](https://github.com/sbillinge)**\n_Tuesday Feb 09, 2016 at 14:29 GMT_\n_Originally opened as https://github.com/xpdAcq/xpdAcq/issues/49_\n\n----\n\nI could envisage an analysis class then, kind of like our Beamtime class, that is a singleton in the Analysis environment (see #48).\r\n\r\non startup we create \r\n```\r\nanl  = Analysis(bt_uid = get_uid(bt),piLast = bt_piLast)\r\n```\r\nThen all our nice search and plot functions could be bound methods, which already pre-filter for bt_uid, so when we search for a compound, it is only searching in the bt_uid 'namespace'.\r\n\r\nIf we need to run this later to get a previous beamtime, we will have to get the ``bt_uid`` for that beamtime and pass it as the bt_uid argument.  We should probably also allow the user to give ``'all'`` as the argument so they can search over all their ``bt_uid``'s.\r\n\r\nPassing a ``piLast`` argument is a nod to the future where we may have to control access by experimenter.  In that case, we would need a uid for each experimenter rather than passing names around, but we can put this here as a kind of testing place-holder.\n"},"comment":{"url":"https://api.github.com/repos/xpdAcq/xpdAn/issues/comments/250321621","html_url":"https://github.com/xpdAcq/xpdAn/issues/20#issuecomment-250321621","issue_url":"https://api.github.com/repos/xpdAcq/xpdAn/issues/20","id":250321621,"user":{"login":"CJ-Wright","id":6740689,"avatar_url":"https://avatars.githubusercontent.com/u/6740689?v=3","gravatar_id":"","url":"https://api.github.com/users/CJ-Wright","html_url":"https://github.com/CJ-Wright","followers_url":"https://api.github.com/users/CJ-Wright/followers","following_url":"https://api.github.com/users/CJ-Wright/following{/other_user}","gists_url":"https://api.github.com/users/CJ-Wright/gists{/gist_id}","starred_url":"https://api.github.com/users/CJ-Wright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJ-Wright/subscriptions","organizations_url":"https://api.github.com/users/CJ-Wright/orgs","repos_url":"https://api.github.com/users/CJ-Wright/repos","events_url":"https://api.github.com/users/CJ-Wright/events{/privacy}","received_events_url":"https://api.github.com/users/CJ-Wright/received_events","type":"User","site_admin":false},"created_at":"2016-09-28T22:35:39Z","updated_at":"2016-09-28T22:35:39Z","body":"<a href=\"https://github.com/tacaswell\"><img src=\"https://avatars.githubusercontent.com/u/199813?v=3\" align=\"left\" width=\"48\" height=\"48\" hspace=\"10\"></img></a> **Comment by [tacaswell](https://github.com/tacaswell)**\n_Wednesday Feb 10, 2016 at 22:44 GMT_\n\n----\n\nThe flip side of this is to go all-in on the 'input drastically changes behavior' and call it a dispatcher :stuck_out_tongue_winking_eye: .  These are how almost all call-back systems work and if you look at the guts of the RunEngine there is a dict-lookup-and-dispatch like the `get` I wrote above that drives the whole thing.  In that case we did this to give the ability to defer the execution of messages (which we need to be able a) inspects plans before actually running them and b) provide the wrappings that are needed manage event bundling, ctrl-c handling, garunteed clean up on failure, and the asyncio event loop in a way that end users (you) do not have to see) and went into in knowing that we were writing a mini domain specific language (DSL) on top of python/asyncio.  Which is a very long winded way of saying that the dispatcher pattern is useful, but should be a sometimes food.  Using it imposes a pretty high burden on users as it strays from 'core' python and makes documentation/tab complete/discover-ability more difficult (which in turn puts more burden on you in terms of user support).\n"}}
{"actor":{"display_login":"CJ-Wright"}}