{"action":"created","issue":{"url":"https://api.github.com/repos/dials/dials/issues/148","repository_url":"https://api.github.com/repos/dials/dials","labels_url":"https://api.github.com/repos/dials/dials/issues/148/labels{/name}","comments_url":"https://api.github.com/repos/dials/dials/issues/148/comments","events_url":"https://api.github.com/repos/dials/dials/issues/148/events","html_url":"https://github.com/dials/dials/issues/148","id":158650513,"number":148,"title":"Reading Eiger data: are we casting twice?","user":{"login":"graeme-winter","id":1241716,"avatar_url":"https://avatars.githubusercontent.com/u/1241716?v=3","gravatar_id":"","url":"https://api.github.com/users/graeme-winter","html_url":"https://github.com/graeme-winter","followers_url":"https://api.github.com/users/graeme-winter/followers","following_url":"https://api.github.com/users/graeme-winter/following{/other_user}","gists_url":"https://api.github.com/users/graeme-winter/gists{/gist_id}","starred_url":"https://api.github.com/users/graeme-winter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graeme-winter/subscriptions","organizations_url":"https://api.github.com/users/graeme-winter/orgs","repos_url":"https://api.github.com/users/graeme-winter/repos","events_url":"https://api.github.com/users/graeme-winter/events{/privacy}","received_events_url":"https://api.github.com/users/graeme-winter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jmp1985","id":2241889,"avatar_url":"https://avatars.githubusercontent.com/u/2241889?v=3","gravatar_id":"","url":"https://api.github.com/users/jmp1985","html_url":"https://github.com/jmp1985","followers_url":"https://api.github.com/users/jmp1985/followers","following_url":"https://api.github.com/users/jmp1985/following{/other_user}","gists_url":"https://api.github.com/users/jmp1985/gists{/gist_id}","starred_url":"https://api.github.com/users/jmp1985/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmp1985/subscriptions","organizations_url":"https://api.github.com/users/jmp1985/orgs","repos_url":"https://api.github.com/users/jmp1985/repos","events_url":"https://api.github.com/users/jmp1985/events{/privacy}","received_events_url":"https://api.github.com/users/jmp1985/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2016-06-06T10:52:47Z","updated_at":"2016-06-06T11:36:48Z","closed_at":null,"body":"from format/nexus.py:\r\n\r\n```\r\n  def __getitem__(self, index):\r\n    from scitbx.array_family import flex\r\n    import numpy as np\r\n    d = self.lookup[index]\r\n    i = index - self.offset[d]\r\n    data = self.datasets[d][i,:,:]\r\n    if data.dtype == np.uint16:\r\n      data = data.astype(np.uint32)\r\n    return flex.int(data)\r\n```\r\n\r\nare we casting from uint16 to uint32 to int32? May be expensive for 16 Mpix images - better to have a constructor for flex.int which can take uint16?"},"comment":{"url":"https://api.github.com/repos/dials/dials/issues/comments/223934824","html_url":"https://github.com/dials/dials/issues/148#issuecomment-223934824","issue_url":"https://api.github.com/repos/dials/dials/issues/148","id":223934824,"user":{"login":"graeme-winter","id":1241716,"avatar_url":"https://avatars.githubusercontent.com/u/1241716?v=3","gravatar_id":"","url":"https://api.github.com/users/graeme-winter","html_url":"https://github.com/graeme-winter","followers_url":"https://api.github.com/users/graeme-winter/followers","following_url":"https://api.github.com/users/graeme-winter/following{/other_user}","gists_url":"https://api.github.com/users/graeme-winter/gists{/gist_id}","starred_url":"https://api.github.com/users/graeme-winter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graeme-winter/subscriptions","organizations_url":"https://api.github.com/users/graeme-winter/orgs","repos_url":"https://api.github.com/users/graeme-winter/repos","events_url":"https://api.github.com/users/graeme-winter/events{/privacy}","received_events_url":"https://api.github.com/users/graeme-winter/received_events","type":"User","site_admin":false},"created_at":"2016-06-06T11:36:48Z","updated_at":"2016-06-06T11:36:48Z","body":"[citation needed]\r\n\r\n```\r\nMon Jun  6 10:03:29 2016    dials_find_spots_profile.out\r\n\r\n         1616924 function calls (1614805 primitive calls) in 897.166 seconds\r\n\r\n   Ordered by: internal time\r\n   List reduced from 2416 to 10 due to restriction <10>\r\n\r\n   ncalls  tottime  percall  cumtime  percall filename:lineno(function)\r\n     1800  519.349    0.289  519.354    0.289 /dials/algorithms/spot_finding/threshold.py:106(__call__)\r\n     1800  195.363    0.109  307.773    0.171 /cctbx_project/dxtbx/imageset.py:513(get_corrected_data)\r\n     1879   41.746    0.022   42.166    0.022 /python2.7/site-packages/h5py/_hl/dataset.py:337(__getitem__)\r\n     1801   31.777    0.018   31.777    0.018 {method 'astype' of 'numpy.ndarray' objects}\r\n     1801   29.994    0.017  103.881    0.058 /cctbx_project/dxtbx/format/nexus.py:1105(__getitem__)\r\n     1800   21.698    0.012  541.082    0.301 /dials/extensions/kabsch_spotfinder_threshold_ext.py:85(compute_threshold)\r\n     1800   19.849    0.011  881.150    0.490 /dials/algorithms/spot_finding/finder.py:65(__call__)\r\n     3600   11.929    0.003   11.929    0.003 /dials/algorithms/spot_finding/finder.py:106(<genexpr>)\r\n        1    9.714    9.714  890.879  890.879 /dials/algorithms/spot_finding/finder.py:223(__call__)\r\n     1801    3.894    0.002  107.775    0.060 /cctbx_project/dxtbx/format/FormatHDFEigerNearlyNexus.py:341(get_raw_data)\r\n```"}}
{"actor":{"display_login":"graeme-winter"}}