{"action":"created","issue":{"url":"https://api.github.com/repos/kasra-hosseini/obspyDMT/issues/9","labels_url":"https://api.github.com/repos/kasra-hosseini/obspyDMT/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/kasra-hosseini/obspyDMT/issues/9/comments","events_url":"https://api.github.com/repos/kasra-hosseini/obspyDMT/issues/9/events","html_url":"https://github.com/kasra-hosseini/obspyDMT/issues/9","id":52631388,"number":9,"title":"SAC header: missing information","user":{"login":"john-robert","id":9800323,"avatar_url":"https://avatars.githubusercontent.com/u/9800323?v=3","gravatar_id":"","url":"https://api.github.com/users/john-robert","html_url":"https://github.com/john-robert","followers_url":"https://api.github.com/users/john-robert/followers","following_url":"https://api.github.com/users/john-robert/following{/other_user}","gists_url":"https://api.github.com/users/john-robert/gists{/gist_id}","starred_url":"https://api.github.com/users/john-robert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/john-robert/subscriptions","organizations_url":"https://api.github.com/users/john-robert/orgs","repos_url":"https://api.github.com/users/john-robert/repos","events_url":"https://api.github.com/users/john-robert/events{/privacy}","received_events_url":"https://api.github.com/users/john-robert/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kasra-hosseini/obspyDMT/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/kasra-hosseini/obspyDMT/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-12-22T09:07:44Z","updated_at":"2015-01-15T18:55:49Z","closed_at":null,"body":"When using the following command:\r\n\r\n    obspyDMT --identity YV.RR*.*.* --preset 900 --offset 1500 --cut_time_phase --fdsn_base_url RESIF  --fdsn_user .. --fdsn_pass ..\r\n\r\nThe waveforms of my desired station(s) are downloaded for all events retrieved. Here, for each event and each station the first arrival time is predicted (--cut_time_phase) in order to cut the waveforms before (--preset 900) and after (--offset 1500) this time. \r\nI chose to save files in the SAC-format (default).\r\n\r\nHowever, the downloaded waveforms are not plotted with absolute time axis but relative ones, e.g. from 0 to 2400 (900 + 1500). \r\n\r\nI now need the offset between the earthquake origin time and the begin of the downloaded time window. In SAC headers, this offset is referred to as:\r\n\r\n**O (Event origin time - seconds relative to reference time)** \r\n\r\nand its value is basically **\"cut_time_phase\" - \"preset\"** (float - single precise). As I see it, this information is not written to SAC headers by obspyDMT and it therefore is not possible to refer the downloaded files to absolute times.\r\n\r\nCan you confirm this and if so, would you be able to make a commit on this quickly ? (shouldn't take you longer than ten minutes, myself, however, would need unequally longer) \r\nOver christmas, I'd like to run some calculations and would therefore need this infomation. Surely, I could make a (dirty) workaround but would rather prefer ..\r\n\r\n[SAC header information](http://ds.iris.edu/files/sac-manual/manual/file_format.html)\r\n[SAC commands](http://seismolab.gso.uri.edu/~savage/sac/commands/func_commands.html)\r\n\r\nFrohe Weihnacht & Merci"},"comment":{"url":"https://api.github.com/repos/kasra-hosseini/obspyDMT/issues/comments/70140070","html_url":"https://github.com/kasra-hosseini/obspyDMT/issues/9#issuecomment-70140070","issue_url":"https://api.github.com/repos/kasra-hosseini/obspyDMT/issues/9","id":70140070,"user":{"login":"kasra-hosseini","id":1899856,"avatar_url":"https://avatars.githubusercontent.com/u/1899856?v=3","gravatar_id":"","url":"https://api.github.com/users/kasra-hosseini","html_url":"https://github.com/kasra-hosseini","followers_url":"https://api.github.com/users/kasra-hosseini/followers","following_url":"https://api.github.com/users/kasra-hosseini/following{/other_user}","gists_url":"https://api.github.com/users/kasra-hosseini/gists{/gist_id}","starred_url":"https://api.github.com/users/kasra-hosseini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kasra-hosseini/subscriptions","organizations_url":"https://api.github.com/users/kasra-hosseini/orgs","repos_url":"https://api.github.com/users/kasra-hosseini/repos","events_url":"https://api.github.com/users/kasra-hosseini/events{/privacy}","received_events_url":"https://api.github.com/users/kasra-hosseini/received_events","type":"User","site_admin":false},"created_at":"2015-01-15T18:55:49Z","updated_at":"2015-01-15T18:55:49Z","body":"Are you sure about this? I just checked it with --tour flag and here is what I got:\r\n\r\n```python\r\ncd ./dmt-tour-data/2011-03-11_2011-03-11_9.1_9.1/20110311_1/BH_RAW\r\nfrom obspy import read\r\nst = read('TA.133A..BHZ', format='SAC')\r\nst[0].stats.sac.stel\r\nOut[4]: 418.0\r\nst[0].stats.sac.stdp\r\nOut[5]: 0.0\r\n```\r\n\r\nCan you provide me with one example that you could not get the elevation and depth information?\r\n\r\nThanks,\r\nKasra"}}