{"id":301,"date":"2012-09-03T14:02:03","date_gmt":"2012-09-03T14:02:03","guid":{"rendered":"http:\/\/ahay.org\/blog\/?p=301"},"modified":"2015-09-02T19:42:25","modified_gmt":"2015-09-02T19:42:25","slug":"program-of-the-month-sfiwarp","status":"publish","type":"post","link":"https:\/\/ahay.org\/blog\/2012\/09\/03\/program-of-the-month-sfiwarp\/","title":{"rendered":"Program of the month: sfiwarp"},"content":{"rendered":"<p><a href=\"\/RSF\/sfiwarp.html\">sfiwarp<\/a> performs mapping between different coordinates. <\/p>\n<p>If you have sampled functions $f(x)$ and $y(x)$, <strong>sfiwarp<\/strong> with <strong>inv=y<\/strong> (the default) finds sampled $f(y)$. If <strong>inv=n<\/strong>, <strong>sfiwarp<\/strong> takes $f(y)$ and $y(x)$ and finds $f(x)$. In both cases, the sampled $y(x)$ function is supplied in a file specified by <strong>warp=<\/strong> parameter. The following example from <a href=\"\/RSF\/book\/milano\/taupvel\/cmp.html\">milano\/taupvel\/cmp<\/a> shows a seismic taup-p gather flattening by predictive painting and time warping. <\/p>\n<p><img decoding=\"async\" src=\"\/RSF\/book\/milano\/taupvel\/cmp\/Fig\/dataP.png\" alt=\"\" title=\"\" \/> <\/p>\n<p>Coordinate mapping is a fundamental data-transformation operation, which finds many applications. The term <em>warping<\/em> comes from medical imaging. See, for example, <\/p>\n<ul>\n<li>Wolberg, G., 1990, Digital image warping: IEEE Computer Society Press. <\/li>\n<li>W. Burnett and S. Fomel, 2009, Moveout analysis by time-warping: 79th Annual International Meeting, SEG, 3710-3714. <\/li>\n<\/ul>\n<p>The algorithm used in sfiwarp is B-spline interpolation and inverse spline interpolation. If forward warping (<strong>inv=n<\/strong>) is $\\mathbf{f}_x = \\mathbf{B}\\,\\mathbf{f}_y$, then the inverse transformation (<strong>inv=y<\/strong>) is given by the regularized least-squares inverse<br \/>\n$$\\mathbf{f}_y = \\left(\\mathbf{B}^T\\,\\mathbf{B} + \\epsilon^2\\,\\mathbf{D}\\right)^{-1}\\,\\mathbf{B}^T\\,\\mathbf{f}_x\\;,$$ where $\\mathbf{D}$ is the derivative operator. The $\\epsilon$ parameter is supplied by <strong>eps=<\/strong>. The sampling in $y$ is supplied by <strong>n1=<\/strong>, <strong>d1=<\/strong>, <strong>o1=<\/strong> parameters. <\/p>\n<p>For 2-D and 3-D versions, try <a href=\"\/RSF\/sfiwarp2.html\">sfiwarp2<\/a> and <a href=\"\/RSF\/sfiwarp3.html\">sfiwarp3<\/a>. <\/p>\n<h3 id=\"10previousprogramsofthemonth\">10 previous programs of the month<\/h3>\n<ul>\n<li><a href=\"\/blog\/2012\/08\/01\/program-of-the-month-sfpick\/\">sfpick<\/a><\/li>\n<li><a href=\"\/blog\/2012\/07\/02\/program-of-the-month-sffft3\/\">sffft3<\/a><\/li>\n<li><a href=\"\/blog\/2012\/06\/02\/program-of-the-month-sfdip\/\">sfdip<\/a><\/li>\n<li><a href=\"\/blog\/2012\/05\/01\/program-of-the-month-sfderiv\/\">sfderiv<\/a><\/li>\n<li><a href=\"\/blog\/2012\/04\/01\/program-of-the-month-sfgrey3\/\">sfgrey3<\/a><\/li>\n<li><a href=\"\/blog\/2012\/03\/18\/program-of-the-month-sfspectra\/\">sfspectra<\/a><\/li>\n<li><a href=\"\/blog\/2011\/07\/03\/program-of-the-month-sfnoise\/\">sfnoise<\/a><\/li>\n<li><a href=\"\/blog\/2011\/08\/09\/program-of-the-month-sfgraph\/\">sfgraph<\/a><\/li>\n<li><a href=\"\/blog\/2011\/09\/03\/program-of-the-month-sfclip\/\">sfclip<\/a><\/li>\n<li><a href=\"\/blog\/2011\/10\/01\/program-of-the-month-sfagc\/\">sfagc<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>sfiwarp performs mapping between different coordinates. If you have sampled functions $f(x)$ and $y(x)$, sfiwarp with inv=y (the default) finds sampled $f(y)$. If inv=n, sfiwarp takes $f(y)$ and $y(x)$ and finds $f(x)$. In both cases, the sampled $y(x)$ function is supplied in a file specified by warp= parameter. The following example from milano\/taupvel\/cmp shows a [&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":"local","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"","footnotes":""},"categories":[3],"tags":[],"class_list":["post-301","post","type-post","status-publish","format-standard","hentry","category-programs"],"_links":{"self":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/301","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=301"}],"version-history":[{"count":7,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/301\/revisions"}],"predecessor-version":[{"id":20005,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/301\/revisions\/20005"}],"wp:attachment":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/media?parent=301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/categories?post=301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/tags?post=301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}