{"action":"created","issue":{"url":"https://api.github.com/repos/hyperspy/hyperspy/issues/1859","repository_url":"https://api.github.com/repos/hyperspy/hyperspy","labels_url":"https://api.github.com/repos/hyperspy/hyperspy/issues/1859/labels{/name}","comments_url":"https://api.github.com/repos/hyperspy/hyperspy/issues/1859/comments","events_url":"https://api.github.com/repos/hyperspy/hyperspy/issues/1859/events","html_url":"https://github.com/hyperspy/hyperspy/issues/1859","id":303489814,"number":1859,"title":"DM EELS spectra do not read exposure from original_metadata","user":{"login":"thomasaarholt","id":2721423,"avatar_url":"https://avatars3.githubusercontent.com/u/2721423?v=4","gravatar_id":"","url":"https://api.github.com/users/thomasaarholt","html_url":"https://github.com/thomasaarholt","followers_url":"https://api.github.com/users/thomasaarholt/followers","following_url":"https://api.github.com/users/thomasaarholt/following{/other_user}","gists_url":"https://api.github.com/users/thomasaarholt/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasaarholt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasaarholt/subscriptions","organizations_url":"https://api.github.com/users/thomasaarholt/orgs","repos_url":"https://api.github.com/users/thomasaarholt/repos","events_url":"https://api.github.com/users/thomasaarholt/events{/privacy}","received_events_url":"https://api.github.com/users/thomasaarholt/received_events","type":"User","site_admin":false},"labels":[{"id":410127191,"url":"https://api.github.com/repos/hyperspy/hyperspy/labels/release:%20next%20patch","name":"release: next patch","color":"5319e7","default":false},{"id":142014,"url":"https://api.github.com/repos/hyperspy/hyperspy/labels/type:%20bug","name":"type: bug","color":"e10c02","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-08T14:02:59Z","updated_at":"2018-03-08T19:47:26Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I'm observing that for EELS spectra imported from dm3 files, the exposure (or dwell time or \"integration time\" depending on names) is not correctly placed in the metadata.\r\n\r\nThis is valid for dm3 files recorded in Oxford and Oslo on separate instruments.\r\n\r\nI noticed this in connection with #1851 as my lowloss and coreloss had not been acquired with similar exposure times. I then realised that it appears that the eelsmodel convolved with lowloss does not take into account exposure times or the number of frames, even if they are provided. \r\n"},"comment":{"url":"https://api.github.com/repos/hyperspy/hyperspy/issues/comments/371602363","html_url":"https://github.com/hyperspy/hyperspy/issues/1859#issuecomment-371602363","issue_url":"https://api.github.com/repos/hyperspy/hyperspy/issues/1859","id":371602363,"user":{"login":"thomasaarholt","id":2721423,"avatar_url":"https://avatars3.githubusercontent.com/u/2721423?v=4","gravatar_id":"","url":"https://api.github.com/users/thomasaarholt","html_url":"https://github.com/thomasaarholt","followers_url":"https://api.github.com/users/thomasaarholt/followers","following_url":"https://api.github.com/users/thomasaarholt/following{/other_user}","gists_url":"https://api.github.com/users/thomasaarholt/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasaarholt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasaarholt/subscriptions","organizations_url":"https://api.github.com/users/thomasaarholt/orgs","repos_url":"https://api.github.com/users/thomasaarholt/repos","events_url":"https://api.github.com/users/thomasaarholt/events{/privacy}","received_events_url":"https://api.github.com/users/thomasaarholt/received_events","type":"User","site_admin":false},"created_at":"2018-03-08T19:47:26Z","updated_at":"2018-03-08T19:47:26Z","author_association":"CONTRIBUTOR","body":"I've attached the smallest file I could find. \r\n[EELS Spectrum Image.dm3.zip](https://github.com/hyperspy/hyperspy/files/1794554/EELS.Spectrum.Image.dm3.zip)\r\n\r\nI'm fixing this now, but I'm unsure if I should go ahead and overwrite the (for my files) non-working code, or introduce a new line. I don't fully appreciate where this one is coming from? EFTEM? Old detectors?\r\n\r\nChanging [line 918 in `digital_micrograph.py`](https://github.com/hyperspy/hyperspy/blob/RELEASE_next_minor/hyperspy/io_plugins/digital_micrograph.py#L918):\r\n```python\r\n\"{}.EELS.Acquisition.Integration time (s)\".format(tags_path): (\r\n                    \"Acquisition_instrument.TEM.Detector.EELS.%s\" % mapped_attribute,\r\n                    None),\r\n```\r\nto:\r\n```python\r\n\"{}.EELS.Acquisition.Exposure_s\".format(tags_path): (\r\n                    \"Acquisition_instrument.TEM.Detector.EELS.%s\" % mapped_attribute,\r\n                    None),\r\n```\r\nIntroduces the following parameter to the metadata for the file I attached above:\r\n`├── dwell_time = 0.01`"}}
{"actor":{"display_login":"thomasaarholt"}}