{"id":271,"date":"2011-11-05T09:00:58","date_gmt":"2011-11-05T09:00:58","guid":{"rendered":"http:\/\/ahay.org\/blog\/?p=271"},"modified":"2015-09-07T13:56:07","modified_gmt":"2015-09-07T13:56:07","slug":"program-of-the-month-sfenvelope","status":"publish","type":"post","link":"https:\/\/ahay.org\/blog\/2011\/11\/05\/program-of-the-month-sfenvelope\/","title":{"rendered":"Program of the month: sfenvelope"},"content":{"rendered":"<p>Complex trace attributes were introduced into geophysics by the paper <\/p>\n<p>Taner, M. T., F. Koehler, and R. E. Sheriff, 1979, <strong>Complex seismic trace analysis<\/strong>: Geophysics, 44, 1041-1063. <\/p>\n<p>If $s(t)$ is the input seismic trace, then the analytical trace is defined as the complex-valued signal $a(t) = s(t)+i h(t)$, where $h(t)$ is the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Hilbert_transform\">Hilbert transform<\/a> of $s(t)$<\/p>\n<p>$$h(t) =\\displaystyle \\frac{1}{\\pi} \\int \\frac{s(\\tau)}{t-\\tau} d\\tau\\;.$$<\/p>\n<p>The signal envelope is the positive signal $e(t)=\\sqrt{s^2(t)+h^2(t)}$. A phase-rotated seismic signal is $p(t)=s(t)\\,\\cos{\\phi} +h(t)\\,\\sin{\\phi}$ where $\\phi$ is the phase of rotation. By default, <a href=\"\/RSF\/sfenvelope.html\">sfenvelope<\/a> computes the signal envelope. It can also produce a phase-rotated signal if given <strong>hilb=y<\/strong> and <strong>phase=<\/strong>. If <strong>phase=90<\/strong> (the default value), the phase-rotated signal will be simply the Hilbert transform of the input. <\/p>\n<p>The following figure from <a href=\"\/RSF\/book\/rsf\/rsf\/sfenvelope.html\">book\/rsf\/rsf\/sfenvelope<\/a> illustrates an application of <strong>sfenvelope<\/strong>: <\/p>\n<p><img decoding=\"async\" src=\"\/RSF\/book\/rsf\/rsf\/sfenvelope\/Fig\/hilb.png\" alt=\"\" title=\"\" \/><\/p>\n<p>Computing the discrete Hilbert transform is not a trivial task. In the Fourier domain, the continuous Hilbert transform is given by <\/p>\n<p>$$\\displaystyle H(\\omega) = i\\,\\operatorname{sgn}(\\omega)\\,S(\\omega)$$ <\/p>\n<p>where $\\operatorname{sgn}$ is the sign function. The discontinuity of the sign function in the frequency domain at $\\omega=0$ is related to the slow $1\/t$ decay of the filter impulse response in the time domain. The discontinuity at the Nyquist frequency creates additional oscillations. Different practical implementations shorten the filter impulse response by effectively smoothing the Fourier-domain discontinuities. The Madagascar <a href=\"https:\/\/github.com\/ahay\/src\/blob\/master\/api\/c\/hilbert.c\">implementation<\/a> of the discrete Hilbert transform follows the algorithm described in <\/p>\n<p>Pei, S.-C., and P.-H. Wang, 2001, <strong><em>Closed-form design of maximally flat FIR Hilbert transformers, differentiators, and fractional delayers by power series expansion<\/em><\/strong>: IEEE Trans. on Circuits and Systems, v. 48, No. 4, 389-398. <\/p>\n<p>The accuracy\/cost trade-off is controlled by two parameters: <strong>order=<\/strong> and <strong>ref=<\/strong>. The following figures from<a href=\"\/RSF\/book\/rsf\/rsf\/sfenvelope.html\">book\/rsf\/rsf\/sfenvelope<\/a> illustrate the effect of the <strong>order=<\/strong> parameter: <\/p>\n<p><img decoding=\"async\" src=\"\/RSF\/book\/rsf\/rsf\/sfenvelope\/Fig\/time.png\" alt=\"\" title=\"\" \/> <img decoding=\"async\" src=\"\/RSF\/book\/rsf\/rsf\/sfenvelope\/Fig\/freq.png\" alt=\"\" title=\"\" \/> <\/p>\n<p>The <a href=\"http:\/\/en.wikipedia.org\/wiki\/Seismic_Unix\">Seismic Unix<\/a> implementation (<strong>suhilb<\/strong> program) applies a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Window_function#Hamming_window\">Hamming window<\/a> in the time domain. For some reason, it has the filter polarity reversed: <\/p>\n<p><img decoding=\"async\" src=\"\/RSF\/book\/rsf\/rsf\/sfenvelope\/Fig\/sutime.png\" alt=\"\" title=\"\" \/> <img decoding=\"async\" src=\"\/RSF\/book\/rsf\/rsf\/sfenvelope\/Fig\/sufreq.png\" alt=\"\" title=\"\" \/><\/p>\n<p>A multidimensional analog of the Hilbert transform is the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Riesz_transform\">Riesz transform<\/a>. It is implemented in the <a href=\"\/RSF\/sfriesz.html\">sfriesz<\/a> program. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Complex trace attributes were introduced into geophysics by the paper Taner, M. T., F. Koehler, and R. E. Sheriff, 1979, Complex seismic trace analysis: Geophysics, 44, 1041-1063. If $s(t)$ is the input seismic trace, then the analytical trace is defined as the complex-valued signal $a(t) = s(t)+i h(t)$, where $h(t)$ is the Hilbert transform of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[3],"tags":[],"class_list":["post-271","post","type-post","status-publish","format-standard","hentry","category-programs"],"_links":{"self":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/271","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/comments?post=271"}],"version-history":[{"count":3,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/271\/revisions"}],"predecessor-version":[{"id":101547,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/271\/revisions\/101547"}],"wp:attachment":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/media?parent=271"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/categories?post=271"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/tags?post=271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}