{"id":295,"date":"2012-07-02T05:12:15","date_gmt":"2012-07-02T05:12:15","guid":{"rendered":"http:\/\/ahay.org\/blog\/?p=295"},"modified":"2015-09-02T22:56:19","modified_gmt":"2015-09-02T22:56:19","slug":"program-of-the-month-sffft3","status":"publish","type":"post","link":"https:\/\/ahay.org\/blog\/2012\/07\/02\/program-of-the-month-sffft3\/","title":{"rendered":"Program of the month: sffft3"},"content":{"rendered":"<p><a href=\"\/RSF\/sffft3.html\">sffft3<\/a> implements a complex-to-complex Fast Fourier Transform (FFT) along an arbitrary axis. <\/p>\n<p>The FFT library that Madagascar uses by default is <a href=\"https:\/\/sourceforge.net\/projects\/kissfft\/\">KISS FFT<\/a>, created by Mark Borgerding. KISS stands for <a href=\"http:\/\/en.wikipedia.org\/wiki\/KISS_principle\">Keep it simple, Stupid!<\/a> <strong>KISS FFT<\/strong> may not be as fast as <a href=\"http:\/\/www.fftw.org\/\">FFTW<\/a> but it is lightweight and easy to include in the distribution. <\/p>\n<p>The <strong>axis=<\/strong> parameter specifies the data axis for performing the transform. The following example from <a href=\"\/RSF\/book\/bei\/ft1\/plane4.html\">bei\/ft1\/plane4<\/a> (Jon Claerbout&#8217;s <em>Basic Earth Imaging<\/em>) shows different forms of the Fourier transform applied to a 2-D dataset. <\/p>\n<p><img decoding=\"async\" src=\"\/RSF\/book\/bei\/ft1\/plane4\/Fig\/plane4.png\" alt=\"\" title=\"\" \/> <\/p>\n<p>The algorithm in <strong>KISS FFT<\/strong> uses a mixed-radix algorithm, which is most efficient when the input size is $N=2^k\\,3^l\\,5^m$. By default, the input data is padded to the next optimal size, additionally multiplied by 2. To disable this behavior, use <strong>opt=n pad=1<\/strong>. <\/p>\n<p>By default, <strong>sffft3<\/strong> applies no scaling in the forward transform and $1\/N$ scaling in the inverse transform. To apply a symmetric $1\/\\sqrt{N}$ scaling in both cases, use <strong>sym=y<\/strong>. <\/p>\n<p>For a real-to-complex FFT along the first axis, use <a href=\"\/RSF\/sffft1.html\">sffft1<\/a>. <\/p>\n<p>For a real-to-real Cosine Fourier Transform, use <a href=\"\/RSF\/sfcosft.html\">sfcosft<\/a>. <\/p>\n<p>To apply FFT as a linear operator, try <a href=\"\/RSF\/sffft.html\">sffft<\/a> wrapper script. <\/p>\n<h3 id=\"10previousprogramsofthemonth\">10 previous programs of the month:<\/h3>\n<ul>\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<li><a href=\"\/blog\/2011\/11\/05\/program-of-the-month-sfenvelope\/\">sfenvelope<\/a><\/li>\n<li><a href=\"\/blog\/2011\/12\/03\/programs-of-the-month-sfcontour\/\">sfcontour<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>sffft3 implements a complex-to-complex Fast Fourier Transform (FFT) along an arbitrary axis. The FFT library that Madagascar uses by default is KISS FFT, created by Mark Borgerding. KISS stands for Keep it simple, Stupid! KISS FFT may not be as fast as FFTW but it is lightweight and easy to include in the distribution. The [&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-295","post","type-post","status-publish","format-standard","hentry","category-programs"],"_links":{"self":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/295","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=295"}],"version-history":[{"count":3,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/295\/revisions"}],"predecessor-version":[{"id":20396,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/295\/revisions\/20396"}],"wp:attachment":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/media?parent=295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/categories?post=295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/tags?post=295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}