{"action":"created","issue":{"url":"https://api.github.com/repos/mit-crpg/openmc/issues/420","labels_url":"https://api.github.com/repos/mit-crpg/openmc/issues/420/labels{/name}","comments_url":"https://api.github.com/repos/mit-crpg/openmc/issues/420/comments","events_url":"https://api.github.com/repos/mit-crpg/openmc/issues/420/events","html_url":"https://github.com/mit-crpg/openmc/issues/420","id":95732637,"number":420,"title":"Unintuitive statepoint.py workflow","user":{"login":"friedmud","id":870705,"avatar_url":"https://avatars.githubusercontent.com/u/870705?v=3","gravatar_id":"","url":"https://api.github.com/users/friedmud","html_url":"https://github.com/friedmud","followers_url":"https://api.github.com/users/friedmud/followers","following_url":"https://api.github.com/users/friedmud/following{/other_user}","gists_url":"https://api.github.com/users/friedmud/gists{/gist_id}","starred_url":"https://api.github.com/users/friedmud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/friedmud/subscriptions","organizations_url":"https://api.github.com/users/friedmud/orgs","repos_url":"https://api.github.com/users/friedmud/repos","events_url":"https://api.github.com/users/friedmud/events{/privacy}","received_events_url":"https://api.github.com/users/friedmud/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-07-17T19:59:46Z","updated_at":"2015-07-17T20:56:39Z","closed_at":null,"body":"Doing the following:\r\n\r\n```python\r\nfrom openmc import statepoint\r\n\r\nsp = statepoint.StatePoint('../openmc/statepoint.100.h5')\r\nsp.read_results()\r\n\r\ntally = sp.get_tally(id=1)\r\n\r\nprint tally.mean\r\n```\r\n\r\nWill print `None`... meaning that `tally.mean` hasn't been set/computed yet.\r\n\r\nAfter digging around a bit it seems that the secret sauce is that you need a `tally.compute_std_dev()` call which has a side effect of computing the mean.  This is somewhat non-intuitive :-)\r\n\r\nI'd recommend that either accessing the mean would compute the mean (if it hasn't already been computed) or add a new function like `tally.compute_mean()` which would be a bit more obvious."},"comment":{"url":"https://api.github.com/repos/mit-crpg/openmc/issues/comments/122413914","html_url":"https://github.com/mit-crpg/openmc/issues/420#issuecomment-122413914","issue_url":"https://api.github.com/repos/mit-crpg/openmc/issues/420","id":122413914,"user":{"login":"smharper","id":4622797,"avatar_url":"https://avatars.githubusercontent.com/u/4622797?v=3","gravatar_id":"","url":"https://api.github.com/users/smharper","html_url":"https://github.com/smharper","followers_url":"https://api.github.com/users/smharper/followers","following_url":"https://api.github.com/users/smharper/following{/other_user}","gists_url":"https://api.github.com/users/smharper/gists{/gist_id}","starred_url":"https://api.github.com/users/smharper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smharper/subscriptions","organizations_url":"https://api.github.com/users/smharper/orgs","repos_url":"https://api.github.com/users/smharper/repos","events_url":"https://api.github.com/users/smharper/events{/privacy}","received_events_url":"https://api.github.com/users/smharper/received_events","type":"User","site_admin":false},"created_at":"2015-07-17T20:56:39Z","updated_at":"2015-07-17T20:56:39Z","body":"Okay, fair point.  I'll go back to voting for calling `compute_std_dev` in the getter decorator."}}